ATLAS Memo

解析グループのWiki

https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/ExoticLongLivedHeavyNeutralLeptonRel21

事象生成

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を落とせば、通常の+-, -+ペアになる。


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