test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
30 
31  public:
34  enum FillMode {kStable, kME};
38  enum RunMode {kRun1, kRun2};
39 
41  explicit TopDecaySubset(const edm::ParameterSet& cfg);
45  virtual void produce(edm::Event& event, const edm::EventSetup& setup);
46 
47  private:
49  std::vector<const reco::GenParticle*> findTops(const reco::GenParticleCollection& parts);
52  std::vector<const reco::GenParticle*> findPrimalTops(const reco::GenParticleCollection& parts);
55  std::vector<const reco::GenParticle*> findDecayingTops(const reco::GenParticleCollection& parts);
61 // const reco::GenParticle* findDecayingW(const reco::GenParticle* top);
68  ShowerModel checkShowerModel(const std::vector<const reco::GenParticle*>& tops) const;
71  void checkWBosons(std::vector<const reco::GenParticle*>& tops) const;
73  void fillListing(const std::vector<const reco::GenParticle*>& tops, reco::GenParticleCollection& target);
75  void fillListing(const std::vector<const reco::GenParticle*>& primalTops,
76  const std::vector<const reco::GenParticle*>& decayingTops,
78 
80  void clearReferences();
84  reco::Particle::LorentzVector p4(const std::vector<const reco::GenParticle*>::const_iterator top, int statusFlag);
92 
93  private:
107 
113  std::map<int,std::vector<int> > refs_;
114 };
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
tuple cfg
Definition: looper.py:293
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
ShowerModel checkShowerModel(const std::vector< const reco::GenParticle * > &tops) const
check the decay chain for the used shower model
ShowerModel showerModel_
parton shower mode (filled in checkShowerModel)
virtual void produce(edm::Event &event, const edm::EventSetup &setup)
write output into the event
void addRadiation(int &idx, const reco::GenParticle::const_iterator part, reco::GenParticleCollection &target)
fill vector including all radiations from quarks originating from W/top
RunMode
supported modes to run the code
std::vector< const reco::GenParticle * > findTops(const reco::GenParticleCollection &parts)
find top quarks in list of input particles
void clearReferences()
clear references
edm::EDGetTokenT< GenEventInfoProduct > genEventInfo_srcToken_
input tag for the genEventInfo source
reco::Particle::LorentzVector p4(const std::vector< const reco::GenParticle * >::const_iterator top, int statusFlag)
calculate lorentz vector from input (dedicated to top reconstruction)
void checkWBosons(std::vector< const reco::GenParticle * > &tops) const
check whether W bosons are contained in the original gen particle listing
bool addRadiation_
add radiation or not?
ShowerModel
classification of potential shower types
std::vector< const reco::GenParticle * > findDecayingTops(const reco::GenParticleCollection &parts)
edm::EDGetTokenT< reco::GenParticleCollection > srcToken_
input tag for the genParticle source
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
void fillReferences(const reco::GenParticleRefProd &refProd, reco::GenParticleCollection &target)
fill references for output vector
std::vector< const reco::GenParticle * > findPrimalTops(const reco::GenParticleCollection &parts)
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
part
Definition: HCALResponse.h:20
TopDecaySubset(const edm::ParameterSet &cfg)
default constructor
RunMode runMode_
run mode (Run1 || Run2)
std::map< int, std::vector< int > > refs_
management of daughter indices for fillRefs
void fillListing(const std::vector< const reco::GenParticle * > &tops, reco::GenParticleCollection &target)
fill output vector for full decay chain
FillMode fillMode_
Module to produce the subset of generator particles directly contained in top decay chains...
~TopDecaySubset()
default destructor
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Particle.h:21
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
const reco::GenParticle * findPrimalW(const reco::GenParticle *top)
const reco::GenParticle * findLastParticleInChain(const reco::GenParticle *p)