CMS 3D CMS Logo

AnalysisRootpleProducerOnlyMC.h
Go to the documentation of this file.
1 #ifndef AnalysisRootpleProducerOnlyMC_H
2 #define AnalysisRootpleProducerOnlyMC_H
3 
4 #include <iostream>
5 
12 
15 
18 
19 #include <TROOT.h>
20 #include <TTree.h>
21 #include <TFile.h>
22 #include <TLorentzVector.h>
23 #include <TClonesArray.h>
24 
30 
32 public:
35 
36  void analyze(const edm::Event&, const edm::EventSetup&) override;
37  void beginJob() override;
38  void endJob() override;
39 
40  void fillEventInfo(int);
41  void fillMCParticles(float, float, float, float);
42  void fillInclusiveJet(float, float, float, float);
43  void fillChargedJet(float, float, float, float);
44  void store();
45 
46 private:
48  edm::EDGetTokenT<reco::GenJetCollection> genJetCollToken; // label of Jet made with MC particles
49  edm::EDGetTokenT<reco::GenJetCollection> chgJetCollToken; // label of Jet made with only charged MC particles
51 
56 
57  float piG;
58 
60 
61  TTree* AnalysisTree;
62 
63  static const int NMCPMAX = 10000;
64  static const int NTKMAX = 10000;
65  static const int NIJMAX = 10000;
66  static const int NCJMAX = 10000;
67  static const int NTJMAX = 10000;
68  static const int NEHJMAX = 10000;
69 
71 
78 
79  TClonesArray* MonteCarlo;
80  TClonesArray* InclusiveJet;
81  TClonesArray* ChargedJet;
82 };
83 
84 #endif
AnalysisRootpleProducerOnlyMC::NumberInclusiveJet
int NumberInclusiveJet
Definition: AnalysisRootpleProducerOnlyMC.h:70
GenJetCollection.h
AnalysisRootpleProducerOnlyMC::PhiMC
float PhiMC[NMCPMAX]
Definition: AnalysisRootpleProducerOnlyMC.h:72
Handle.h
AnalysisRootpleProducerOnlyMC::mcEventToken
edm::EDGetTokenT< edm::HepMCProduct > mcEventToken
Definition: AnalysisRootpleProducerOnlyMC.h:47
AnalysisRootpleProducerOnlyMC::GenJetsHandle
edm::Handle< reco::GenJetCollection > GenJetsHandle
Definition: AnalysisRootpleProducerOnlyMC.h:54
AnalysisRootpleProducerOnlyMC::PhiIJ
float PhiIJ[NIJMAX]
Definition: AnalysisRootpleProducerOnlyMC.h:74
AnalysisRootpleProducerOnlyMC::fs
edm::Service< TFileService > fs
Definition: AnalysisRootpleProducerOnlyMC.h:59
ESHandle.h
edm::EDGetTokenT< edm::HepMCProduct >
AnalysisRootpleProducerOnlyMC::MonteCarlo
TClonesArray * MonteCarlo
Definition: AnalysisRootpleProducerOnlyMC.h:79
AnalysisRootpleProducerOnlyMC::PhiTK
float PhiTK[NTKMAX]
Definition: AnalysisRootpleProducerOnlyMC.h:73
AnalysisRootpleProducerOnlyMC::fillMCParticles
void fillMCParticles(float, float, float, float)
Definition: AnalysisRootpleProducerOnlyMC.cc:28
AnalysisRootpleProducerOnlyMC::endJob
void endJob() override
Definition: AnalysisRootpleProducerOnlyMC.cc:179
AnalysisRootpleProducerOnlyMC::fillChargedJet
void fillChargedJet(float, float, float, float)
Definition: AnalysisRootpleProducerOnlyMC.cc:44
Jet.h
AnalysisRootpleProducerOnlyMC::MomentumIJ
float MomentumIJ[NIJMAX]
Definition: AnalysisRootpleProducerOnlyMC.h:74
EDAnalyzer.h
AnalysisRootpleProducerOnlyMC::NTKMAX
static const int NTKMAX
Definition: AnalysisRootpleProducerOnlyMC.h:64
edm::Handle< edm::HepMCProduct >
edm::EDAnalyzer
Definition: EDAnalyzer.h:28
AnalysisRootpleProducerOnlyMC::NMCPMAX
static const int NMCPMAX
Definition: AnalysisRootpleProducerOnlyMC.h:63
AnalysisRootpleProducerOnlyMC::PhiEHJ
float PhiEHJ[NEHJMAX]
Definition: AnalysisRootpleProducerOnlyMC.h:77
GenParticle.h
AnalysisRootpleProducerOnlyMC::NumberCaloJet
int NumberCaloJet
Definition: AnalysisRootpleProducerOnlyMC.h:70
AnalysisRootpleProducerOnlyMC::NumberTracksJet
int NumberTracksJet
Definition: AnalysisRootpleProducerOnlyMC.h:70
AnalysisRootpleProducerOnlyMC::EtaCJ
float EtaCJ[NCJMAX]
Definition: AnalysisRootpleProducerOnlyMC.h:75
AnalysisRootpleProducerOnlyMC::beginJob
void beginJob() override
Definition: AnalysisRootpleProducerOnlyMC.cc:67
MakerMacros.h
AnalysisRootpleProducerOnlyMC::TransverseMomentumTK
float TransverseMomentumTK[NTKMAX]
Definition: AnalysisRootpleProducerOnlyMC.h:73
AnalysisRootpleProducerOnlyMC::genJetCollToken
edm::EDGetTokenT< reco::GenJetCollection > genJetCollToken
Definition: AnalysisRootpleProducerOnlyMC.h:48
AnalysisRootpleProducerOnlyMC::TransverseMomentumEHJ
float TransverseMomentumEHJ[NEHJMAX]
Definition: AnalysisRootpleProducerOnlyMC.h:77
AnalysisRootpleProducerOnlyMC::TransverseMomentumIJ
float TransverseMomentumIJ[NIJMAX]
Definition: AnalysisRootpleProducerOnlyMC.h:74
AnalysisRootpleProducerOnlyMC::MomentumEHJ
float MomentumEHJ[NEHJMAX]
Definition: AnalysisRootpleProducerOnlyMC.h:77
AnalysisRootpleProducerOnlyMC::store
void store()
Definition: AnalysisRootpleProducerOnlyMC.cc:18
Service.h
AnalysisRootpleProducerOnlyMC::AnalysisRootpleProducerOnlyMC
AnalysisRootpleProducerOnlyMC(const edm::ParameterSet &)
Definition: AnalysisRootpleProducerOnlyMC.cc:52
AnalysisRootpleProducerOnlyMC::EtaMC
float EtaMC[NMCPMAX]
Definition: AnalysisRootpleProducerOnlyMC.h:72
AnalysisRootpleProducerOnlyMC::fillEventInfo
void fillEventInfo(int)
Definition: AnalysisRootpleProducerOnlyMC.cc:26
AnalysisRootpleProducerOnlyMC::MomentumTJ
float MomentumTJ[NTJMAX]
Definition: AnalysisRootpleProducerOnlyMC.h:76
AnalysisRootpleProducerOnlyMC::chgGenPartCollToken
edm::EDGetTokenT< std::vector< reco::GenParticle > > chgGenPartCollToken
Definition: AnalysisRootpleProducerOnlyMC.h:50
AnalysisRootpleProducerOnlyMC::MomentumTK
float MomentumTK[NTKMAX]
Definition: AnalysisRootpleProducerOnlyMC.h:73
AnalysisRootpleProducerOnlyMC::piG
float piG
Definition: AnalysisRootpleProducerOnlyMC.h:57
TFileService.h
AnalysisRootpleProducerOnlyMC::NumberMCParticles
int NumberMCParticles
Definition: AnalysisRootpleProducerOnlyMC.h:70
AnalysisRootpleProducerOnlyMC
Definition: AnalysisRootpleProducerOnlyMC.h:31
edm::ParameterSet
Definition: ParameterSet.h:47
AnalysisRootpleProducerOnlyMC::TransverseMomentumTJ
float TransverseMomentumTJ[NTJMAX]
Definition: AnalysisRootpleProducerOnlyMC.h:76
AnalysisRootpleProducerOnlyMC::chgJetCollToken
edm::EDGetTokenT< reco::GenJetCollection > chgJetCollToken
Definition: AnalysisRootpleProducerOnlyMC.h:49
Event.h
AnalysisRootpleProducerOnlyMC::EvtHandle
edm::Handle< edm::HepMCProduct > EvtHandle
Definition: AnalysisRootpleProducerOnlyMC.h:52
AnalysisRootpleProducerOnlyMC::ChargedJet
TClonesArray * ChargedJet
Definition: AnalysisRootpleProducerOnlyMC.h:81
AnalysisRootpleProducerOnlyMC::EtaEHJ
float EtaEHJ[NEHJMAX]
Definition: AnalysisRootpleProducerOnlyMC.h:77
AnalysisRootpleProducerOnlyMC::NCJMAX
static const int NCJMAX
Definition: AnalysisRootpleProducerOnlyMC.h:66
AnalysisRootpleProducerOnlyMC::EtaIJ
float EtaIJ[NIJMAX]
Definition: AnalysisRootpleProducerOnlyMC.h:74
AnalysisRootpleProducerOnlyMC::NTJMAX
static const int NTJMAX
Definition: AnalysisRootpleProducerOnlyMC.h:67
edm::Service< TFileService >
AnalysisRootpleProducerOnlyMC::AnalysisTree
TTree * AnalysisTree
Definition: AnalysisRootpleProducerOnlyMC.h:61
edm::EventSetup
Definition: EventSetup.h:57
AnalysisRootpleProducerOnlyMC::NumberTracks
int NumberTracks
Definition: AnalysisRootpleProducerOnlyMC.h:70
AnalysisRootpleProducerOnlyMC::NIJMAX
static const int NIJMAX
Definition: AnalysisRootpleProducerOnlyMC.h:65
AnalysisRootpleProducerOnlyMC::CandHandleMC
edm::Handle< std::vector< reco::GenParticle > > CandHandleMC
Definition: AnalysisRootpleProducerOnlyMC.h:53
Frameworkfwd.h
AnalysisRootpleProducerOnlyMC::TransverseMomentumMC
float TransverseMomentumMC[NMCPMAX]
Definition: AnalysisRootpleProducerOnlyMC.h:72
AnalysisRootpleProducerOnlyMC::fillInclusiveJet
void fillInclusiveJet(float, float, float, float)
Definition: AnalysisRootpleProducerOnlyMC.cc:36
AnalysisRootpleProducerOnlyMC::MomentumCJ
float MomentumCJ[NCJMAX]
Definition: AnalysisRootpleProducerOnlyMC.h:75
AnalysisRootpleProducerOnlyMC::EventKind
int EventKind
Definition: AnalysisRootpleProducerOnlyMC.h:70
AnalysisRootpleProducerOnlyMC::MomentumMC
float MomentumMC[NMCPMAX]
Definition: AnalysisRootpleProducerOnlyMC.h:72
AnalysisRootpleProducerOnlyMC::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: AnalysisRootpleProducerOnlyMC.cc:111
GenJet.h
Candidate.h
AnalysisRootpleProducerOnlyMC::~AnalysisRootpleProducerOnlyMC
~AnalysisRootpleProducerOnlyMC() override
Definition: AnalysisRootpleProducerOnlyMC.h:34
ParameterSet.h
AnalysisRootpleProducerOnlyMC::EtaTJ
float EtaTJ[NTJMAX]
Definition: AnalysisRootpleProducerOnlyMC.h:76
AnalysisRootpleProducerOnlyMC::NEHJMAX
static const int NEHJMAX
Definition: AnalysisRootpleProducerOnlyMC.h:68
HepMCProduct.h
edm::Event
Definition: Event.h:73
AnalysisRootpleProducerOnlyMC::EtaTK
float EtaTK[NTKMAX]
Definition: AnalysisRootpleProducerOnlyMC.h:73
AnalysisRootpleProducerOnlyMC::PhiCJ
float PhiCJ[NCJMAX]
Definition: AnalysisRootpleProducerOnlyMC.h:75
AnalysisRootpleProducerOnlyMC::ChgGenJetsHandle
edm::Handle< reco::GenJetCollection > ChgGenJetsHandle
Definition: AnalysisRootpleProducerOnlyMC.h:55
AnalysisRootpleProducerOnlyMC::PhiTJ
float PhiTJ[NTJMAX]
Definition: AnalysisRootpleProducerOnlyMC.h:76
AnalysisRootpleProducerOnlyMC::NumberChargedJet
int NumberChargedJet
Definition: AnalysisRootpleProducerOnlyMC.h:70
AnalysisRootpleProducerOnlyMC::TransverseMomentumCJ
float TransverseMomentumCJ[NCJMAX]
Definition: AnalysisRootpleProducerOnlyMC.h:75
AnalysisRootpleProducerOnlyMC::InclusiveJet
TClonesArray * InclusiveJet
Definition: AnalysisRootpleProducerOnlyMC.h:80