ATLAS Memo

解析グループのWiki

事象生成

setupATLAS
asetup AtlasProduction 19.2.5.30
Generate_tf.py --AMITag e6778 --ecmEnergy=13000 --evgenJobOpts=MC15JobOpts-00-10-17_v7.tar.gz --jobConfig=MC15JobOptions/MC15.310186.Pythia8EvtGen_A14NNPDF23LO_WmuHNL50_10G_lt10dd.py --runNumber=310186 --firstEvent=1 --maxEvents=5000 --skipEvents=0 --outputEVNTFile=EVNT.pool.root --randomSeed=0

Truth derivation生成

setupATLAS
asetup AthDerivation 21.2.44.0
Reco_tf.py --AMI p3655 --inputEVNTFile EVNT.pool.root --outputDAODFile pool.root --reductionConf TRUTH0

HNLからのレプトンの電荷を同符号に変える

SameSign/src/SameSignAlg.h

#ifndef SAMESIGNALG_H // Include guard
#define SAMESIGNALG_H
 
#include "AthenaBaseComps/AthAlgorithm.h"
 
class SameSignAlg:public AthAlgorithm
{
 public:
  SameSignAlg(const std::string& name, ISvcLocator* pSvcLocator); // Constructor
 
  StatusCode initialize();
  StatusCode finalize();
  StatusCode execute();

 private:
  bool m_setPositive;
};

#endif // SAMESIGNALG_H

SameSign/src/SameSignAlg.cxx

#include "SameSignAlg.h"
 
#include "GeneratorObjects/McEventCollection.h"

SameSignAlg::SameSignAlg(const std::string& name, ISvcLocator* pSvcLocator)
  : AthAlgorithm(name, pSvcLocator)
{
  declareProperty("SetPositive", m_setPositive=true);
}
 
StatusCode SameSignAlg::initialize() {
  ATH_MSG_INFO("initialize()");
  return StatusCode::SUCCESS;
}
 
StatusCode SameSignAlg::finalize() {
  ATH_MSG_INFO("finalize()");
  return StatusCode::SUCCESS;
}
  
StatusCode SameSignAlg::execute() {
  const McEventCollection* input_collection = nullptr;
  ATH_CHECK(evtStore()->retrieve(input_collection));
  unsigned int nChildren = 0;
  for (const HepMC::GenEvent* event : *input_collection) {
    for (HepMC::GenEvent::particle_const_iterator particleItr = event->particles_begin();
         particleItr != event->particles_end(); particleItr++ ) {
      const HepMC::GenParticle* particle = *particleItr;
      if (particle->status()==1) { // Stable
        if ((abs(particle->pdg_id())==11) or
            (abs(particle->pdg_id())==13) or
            (abs(particle->pdg_id())==15)) { // Charged leptons
          bool found = false;
          const HepMC::GenVertex* production_vertex = particle->production_vertex();
          if (production_vertex) {
            std::vector< HepMC::GenParticle* >::const_iterator itr = production_vertex->particles_in_const_begin();
            std::vector< HepMC::GenParticle* >::const_iterator end = production_vertex->particles_in_const_end();
            for (; itr != end and (not found); ++itr) {
              const HepMC::GenParticle* parentParticle = *itr;
              if (abs(parentParticle->pdg_id())==50) { // Parent is HNL
                found = true;
              }
            }
          }
          if (found) {
            // ATH_MSG_INFO(particle->pdg_id() << " " << particle->status() << " " << particle->barcode());
            if (((particle->pdg_id()>0) and      m_setPositive) or
                ((particle->pdg_id()<0) and (not m_setPositive))) {
              HepMC::GenParticle* particle_nonConst = const_cast<HepMC::GenParticle*>(particle);
              particle_nonConst->set_pdg_id(-particle->pdg_id()); // Flip charge
            }
            nChildren++;
          }
        }
      }
    }
  }
  ATH_MSG_INFO("nChildren: " << nChildren);
  return StatusCode::SUCCESS;
}

SameSign/src/components/SameSign_load.cxx

#include "GaudiKernel/LoadFactoryEntries.h"
 
LOAD_FACTORY_ENTRIES(SameSign)

SameSign/src/components/SameSign_entries.cxx

#include "GaudiKernel/DeclareFactoryEntries.h"
#include "../SameSignAlg.h"

DECLARE_ALGORITHM_FACTORY(SameSignAlg)

DECLARE_FACTORY_ENTRIES(SameSign) {
  DECLARE_ALGORITHM(SameSignAlg)
}

SameSign/cmt/requirements

package SameSign
 
author Susumu Oda <Susumu.Oda@cern.ch>
 
public
use AtlasPolicy     AtlasPolicy-*
 
private
use AthenaBaseComps AthenaBaseComps-* Control
use GaudiInterface  GaudiInterface-*  External
use GeneratorObjects GeneratorObjects-*    Generators
 
public
library SameSign *.cxx -s=components *.cxx
apply_pattern component_library

リリース19.2はまだCMTを使っている。コンパイルの仕方は

http://tomoe.web.cern.ch/tomoe/AtlasSoftWareTutorial/2016_2/Athena.html

を参照。

Generate_tf.py --AMITag e6778 --ecmEnergy=13000 --evgenJobOpts=MC15JobOpts-00-10-17_v7.tar.gz --jobConfig=MC15JobOptions/MC15.310186.Pythia8EvtGen_A14NNPDF23LO_WmuHNL50_10G_lt10dd.py --runNumber=310186 --firstEvent=1 --maxEvents=5000 --skipEvents=0 --outputEVNTFile=EVNT.pool.root --randomSeed=0 --postExec "from SameSign.SameSignConf import *; from AthenaCommon.AlgSequence import AlgSequence; job = AlgSequence(); job += SameSignAlg('SameSignAlg', OutputLevel = INFO, SetPositive=False)"

SetPositive=Trueだと++ペアにする。SetPositive=Falseだと--ペアにする。 postExecを落とせば、通常の+-, -+ペアになる。

Analysis framework

https://gitlab.cern.ch/atlas-phys/exot/ueh/EXOT-2017-19/DHNLAlgorithm/tree/master

Single photon samples

HITS->RDO->DAOD_RPVLL without pileup

  • r10790: MC16e DAOD_RPVLL with pileup

Private job without pileup

job=$1

cd /tmp/${LSB_JOBID}.tmpdir

export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase
alias setupATLAS='source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh'
setupATLAS

asetup Athena 21.0.77
export FRONTIER_SERVER="(proxyurl=http://conddb-px02.icepp.jp:3128)"$FRONTIER_SERVER

HITS=`\ls -1 /home/oda/fs7001/oda/HNL/mc16_13TeV.423001.ParticleGun_single_photon_egammaET.simul.HITS.e3566_s3113/ | head -$job | tail -1`

cp /home/oda/fs7001/oda/HNL/mc16_13TeV.423001.ParticleGun_single_photon_egammaET.simul.HITS.e3566_s3113/$HITS .

Reco_tf.py \
--digiSteeringConf 'StandardSignalOnlyTruth' \
--conditionsTag 'default:OFLCOND-MC16-SDR-25' \
--valid 'True' \
--steering 'doRDO_TRIG' \
--autoConfiguration 'everything' \
--geometryVersion 'default:ATLAS-R2-2016-01-00-01' \
--postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' \
"ESDtoAOD:fixedAttrib=[s if \"CONTAINER_SPLITLEVEL = '99'\" not in s else \"\" for s in svcMgr.AthenaPoolCnvSvc.PoolAttributes];svcMgr.AthenaPoolCnvSvc.PoolAttributes=fixedAttrib" \ 
--preExec 'all:rec.Commissioning.set_Value_and_Lock(True);from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True); from LArDigitization.LArDigitizationFlags import jobproperties;jobproperties.LArDigitizationFlags.useEmecIwHighGain.set_Value_and_Lock(False)' 'ESDtoAOD:from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.AODEDMSet.set_Value_and_Lock("AODSLIM");' 'all:from InDetRecExample.InDetJobProperties import InDetFlags; InDetFlags.keepAdditionalHitsOnTrackParticle.set_Value_and_Lock(True)' 'RAWtoESD:from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doLargeD0.set_Value_and_Lock(True); InDetFlags.doTrackSegmentsPixelPrdAssociation.set_Value_and_Lock(True); InDetFlags.doTrackSegmentsPixelFourLayer.set_Value_and_Lock(True); InDetFlags.doTrackSegmentsPixelThreeLayer.set_Value_and_Lock(True);' 'ESDtoAOD:from MuonRecExample.MuonRecFlags import muonRecFlags;muonRecFlags.prdToxAOD=True;' \
--triggerConfig 'RDOtoRDOTrigger=MCRECO:DBF:TRIGGERDBMC:2216,76,260' \
--postInclude 'default:PyJobTransforms/UseFrontier.py' 'RAWtoESD:VrtSecInclusive/VrtSecInclusive_DV_Configuration.py'  'ESDtoAOD:VrtSecInclusive/VrtSecInclusive_DV_postInclude_ESDtoAOD.py' \
--inputHITSFile $HITS \
--outputAODFile DAOD_RPVLL.pool.root \
--runNumber 310000 \
--maxEvents 10 \
--digiSeedOffset1 $job \
--digiSeedOffset2 $job \
--jobNumber $job

cp DAOD_RPVLL.pool.root /home/oda/fs7001/oda/HNL/singlePhoton/423001.DAOD_RPVLL/DAOD_RPVLL.$job.pool.root

ABCD method

https://twiki.cern.ch/twiki/bin/view/Main/ABCDMethod

Cosmic runs

asetup Athena 21.0.107
Reco_tf.py --AMI r11784 --inputBSFile data18_cos.00358716.physics_IDCosmic.merge.RAW/data18_cos.00358716.physics_IDCosmic.merge.RAW._lb0340._SFO-ALL._0001.1 --outputAODFile DAOD_RPVLL.pool.root  --preExec 'all:from AthenaCommon.BeamFlags import jobproperties; jobproperties.Beam.beamType.set_Value_and_Lock("collisions"); from InDetRecExample.InDetJobProperties import InDetFlags; InDetFlags.doDisplacedSoftPion=True; InDetFlags.doImprovedPixelPrdAssociation=True; InDetFlags.doVrtSecDecay=True; InDetFlags.useDynamicAlignFolders.set_Value_and_Lock(True); InDetFlags.keepAdditionalHitsOnTrackParticle.set_Value_and_Lock(True); TriggerFlags.AODEDMSet="AODSLIM"; from ParticleBuilderOptions.AODFlags import AODFlags; AODFlags.ThinInDetForwardTrackParticles.set_Value_and_Lock(True); from LArConditionsCommon.LArCondFlags import larCondFlags; larCondFlags.OFCShapeFolder.set_Value_and_Lock("4samples1phase"); from LArMonTools.LArMonFlags import LArMonFlags;LArMonFlags.doLArCoverage.set_Value_and_Lock(False); LArMonFlags.doLArDigitMon.set_Value_and_Lock(False); DQMonFlags.doHLTMon.set_Value_and_Lock(False); InDetFlags.doTrackSegmentsPixelPrdAssociation.set_Value_and_Lock(True);' 'RAWtoESD:from InDetRecExample.InDetJobProperties import InDetFlags; InDetFlags.doLargeD0.set_Value_and_Lock(True); InDetFlags.doTrackSegmentsPixelPrdAssociation.set_Value_and_Lock(True); InDetFlags.keepAdditionalHitsOnTrackParticle.set_Value_and_Lock(True);' 'ESDtoAOD:from MuonRecExample.MuonRecFlags import muonRecFlags;muonRecFlags.prdToxAOD=True;'
from AthenaCommon.BeamFlags import jobproperties; jobproperties.Beam.beamType.set_Value_and_Lock("collisions");

was added not to use cosmic reconstruction.

At least one primary vertex is required.

To disable the requirement:

ジョブは走るが、VrtSecInclusive_SecondaryVertices*はほぼ空のまま。 https://acode-browser1.usatlas.bnl.gov/lxr/source/athena/Reconstruction/VKalVrt/VrtSecInclusive/src/VrtSecInclusive.cxx?v=21.0#0398

0398     if( m_selectedTracks->size() < 2 ) {

で落ちているみたい。m_selectedTracksの選択基準を調べる必要。 ==>少しはイベントが残っている。

Cosmic rayのMCサンプルは https://its.cern.ch/jira/browse/ATLMCPROD-4508


トップ   編集 凍結解除 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2020-05-07 (木) 22:55:14 (210d)