CMS 3D CMS Logo

TopDecaySubset.h
Go to the documentation of this file.
1 #include <memory>
2 #include <string>
3 #include <vector>
4 #include <map>
5 
9 
13 
15 
29 public:
32  enum FillMode { kStable, kME };
36  enum RunMode { kRun1, kRun2 };
37 
39  explicit TopDecaySubset(const edm::ParameterSet& cfg);
41  ~TopDecaySubset() override;
43  void produce(edm::Event& event, const edm::EventSetup& setup) override;
44 
45 private:
47  std::vector<const reco::GenParticle*> findTops(const reco::GenParticleCollection& parts);
50  std::vector<const reco::GenParticle*> findPrimalTops(const reco::GenParticleCollection& parts);
53  std::vector<const reco::GenParticle*> findDecayingTops(const reco::GenParticleCollection& parts);
59  // const reco::GenParticle* findDecayingW(const reco::GenParticle* top);
66  ShowerModel checkShowerModel(const std::vector<const reco::GenParticle*>& tops) const;
69  void checkWBosons(std::vector<const reco::GenParticle*>& tops) const;
71  void fillListing(const std::vector<const reco::GenParticle*>& tops, reco::GenParticleCollection& target);
73  void fillListing(const std::vector<const reco::GenParticle*>& primalTops,
74  const std::vector<const reco::GenParticle*>& decayingTops,
76 
78  void clearReferences();
82  reco::Particle::LorentzVector p4(const std::vector<const reco::GenParticle*>::const_iterator top, int statusFlag);
86  void addDaughters(int& idx,
89  bool recursive = true);
93 
94 private:
108 
114  std::map<int, std::vector<int> > refs_;
115 };
edm::RefProd< GenParticleCollection >
TopDecaySubset::kStable
Definition: TopDecaySubset.h:32
TopDecaySubset::findLastParticleInChain
const reco::GenParticle * findLastParticleInChain(const reco::GenParticle *p)
Definition: TopDecaySubset.cc:177
EDProducer.h
TopDecaySubset::fillMode_
FillMode fillMode_
Definition: TopDecaySubset.h:103
reco::GenParticle
Definition: GenParticle.h:21
TopDecaySubset::findTops
std::vector< const reco::GenParticle * > findTops(const reco::GenParticleCollection &parts)
find top quarks in list of input particles
Definition: TopDecaySubset.cc:99
edm::EDGetTokenT< reco::GenParticleCollection >
reco::GenParticleCollection
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
Definition: GenParticleFwd.h:13
reco::candidate::const_iterator
Definition: const_iterator.h:14
TopDecaySubset::p4
reco::Particle::LorentzVector p4(const std::vector< const reco::GenParticle * >::const_iterator top, int statusFlag)
calculate lorentz vector from input (dedicated to top reconstruction)
Definition: TopDecaySubset.cc:529
TopDecaySubset::genEventInfo_srcToken_
edm::EDGetTokenT< GenEventInfoProduct > genEventInfo_srcToken_
input tag for the genEventInfo source
Definition: TopDecaySubset.h:98
TopDecaySubset::~TopDecaySubset
~TopDecaySubset() override
default destructor
Definition: TopDecaySubset.cc:41
TopDecaySubset::addDaughters
void addDaughters(int &idx, const reco::GenParticle::const_iterator part, reco::GenParticleCollection &target, bool recursive=true)
recursively fill vector for all further decay particles of a given particle
Definition: TopDecaySubset.cc:636
TopDecaySubset::findPrimalW
const reco::GenParticle * findPrimalW(const reco::GenParticle *top)
Definition: TopDecaySubset.cc:154
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
reco::Particle::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Particle.h:21
TopDecaySubset::kRun1
Definition: TopDecaySubset.h:36
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
GenParticle.h
TopDecaySubset::showerModel_
ShowerModel showerModel_
parton shower mode (filled in checkShowerModel)
Definition: TopDecaySubset.h:105
TopDecaySubset::kNone
Definition: TopDecaySubset.h:34
TopDecaySubset::findPrimalTops
std::vector< const reco::GenParticle * > findPrimalTops(const reco::GenParticleCollection &parts)
Definition: TopDecaySubset.cc:110
contentValuesFiles.parts
parts
Definition: contentValuesFiles.py:58
TopDecaySubset::kPythia
Definition: TopDecaySubset.h:34
part
part
Definition: HCALResponse.h:20
TopDecaySubset::srcToken_
edm::EDGetTokenT< reco::GenParticleCollection > srcToken_
input tag for the genParticle source
Definition: TopDecaySubset.h:96
TopDecaySubset::RunMode
RunMode
supported modes to run the code
Definition: TopDecaySubset.h:36
TopDecaySubset
Module to produce the subset of generator particles directly contained in top decay chains.
Definition: TopDecaySubset.h:28
TopDecaySubset::kME
Definition: TopDecaySubset.h:32
TopDecaySubset::ShowerModel
ShowerModel
classification of potential shower types
Definition: TopDecaySubset.h:34
TopDecaySubset::checkShowerModel
ShowerModel checkShowerModel(const std::vector< const reco::GenParticle * > &tops) const
check the decay chain for the used shower model
Definition: TopDecaySubset.cc:202
TopDecaySubset::clearReferences
void clearReferences()
clear references
Definition: TopDecaySubset.cc:659
edm::ParameterSet
Definition: ParameterSet.h:47
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
GenEventInfoProduct.h
Event.h
TopDecaySubset::kStart
Definition: TopDecaySubset.h:34
TopDecaySubset::findDecayingTops
std::vector< const reco::GenParticle * > findDecayingTops(const reco::GenParticleCollection &parts)
Definition: TopDecaySubset.cc:132
edm::EventSetup
Definition: EventSetup.h:58
TopDecaySubset::addRadiation_
bool addRadiation_
add radiation or not?
Definition: TopDecaySubset.h:100
TopDecaySubset::fillReferences
void fillReferences(const reco::GenParticleRefProd &refProd, reco::GenParticleCollection &target)
fill references for output vector
Definition: TopDecaySubset.cc:668
InputTag.h
looper.cfg
cfg
Definition: looper.py:296
TopDecaySubset::produce
void produce(edm::Event &event, const edm::EventSetup &setup) override
write output into the event
Definition: TopDecaySubset.cc:44
TopDecaySubset::refs_
std::map< int, std::vector< int > > refs_
management of daughter indices for fillRefs
Definition: TopDecaySubset.h:114
Frameworkfwd.h
TopDecaySubset::TopDecaySubset
TopDecaySubset(const edm::ParameterSet &cfg)
default constructor
Definition: TopDecaySubset.cc:10
TopDecaySubset::FillMode
FillMode
Definition: TopDecaySubset.h:32
TopDecaySubset::runMode_
RunMode runMode_
run mode (Run1 || Run2)
Definition: TopDecaySubset.h:107
TopDecaySubset::kHerwig
Definition: TopDecaySubset.h:34
edm::EDProducer
Definition: EDProducer.h:35
filterCSVwithJSON.target
target
Definition: filterCSVwithJSON.py:32
postprocess-scan-build.recursive
recursive
Definition: postprocess-scan-build.py:11
TopDecaySubset::kPythia8
Definition: TopDecaySubset.h:34
TopDecaySubset::kRun2
Definition: TopDecaySubset.h:36
TopDecaySubset::checkWBosons
void checkWBosons(std::vector< const reco::GenParticle * > &tops) const
check whether W bosons are contained in the original gen particle listing
Definition: TopDecaySubset.cc:274
ParameterSet.h
TopDecaySubset::kSherpa
Definition: TopDecaySubset.h:34
event
Definition: event.py:1
edm::Event
Definition: Event.h:73
TopDecaySubset::motherPartIdx_
int motherPartIdx_
Definition: TopDecaySubset.h:112
TopDecaySubset::addRadiation
void addRadiation(int &idx, const reco::GenParticle::const_iterator part, reco::GenParticleCollection &target)
fill vector including all radiations from quarks originating from W/top
Definition: TopDecaySubset.cc:596
TopDecaySubset::fillListing
void fillListing(const std::vector< const reco::GenParticle * > &tops, reco::GenParticleCollection &target)
fill output vector for full decay chain
Definition: TopDecaySubset.cc:313