CMS 3D CMS Logo

AnalysisRootpleProducer.h
Go to the documentation of this file.
1 #ifndef AnalysisRootpleProducer_H
2 #define AnalysisRootpleProducer_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 <TObjString.h>
24 #include <TClonesArray.h>
25 
34 
35 // access trigger results
39 
41 {
42 
43 public:
44 
45  //
46  explicit AnalysisRootpleProducer( const edm::ParameterSet& ) ;
47  ~AnalysisRootpleProducer() override {} // no need to delete ROOT stuff
48  // as it'll be deleted upon closing TFile
49 
50  void analyze( const edm::Event&, const edm::EventSetup& ) override ;
51  void beginJob() override ;
52  void endJob() override ;
53 
54  void fillEventInfo(int);
55  void fillMCParticles(float, float, float, float);
56  void fillTracks(float, float, float, float);
57  void fillInclusiveJet(float, float, float, float);
58  void fillChargedJet(float, float, float, float);
59  void fillTracksJet(float, float, float, float);
60  void fillCaloJet(float, float, float, float);
61  void store();
62 
63 private:
64 
65  bool onlyRECO;
66 
68  edm::EDGetTokenT< reco::GenJetCollection > genJetCollToken; // label of Jet made with MC particles
69  edm::EDGetTokenT< reco::GenJetCollection > chgJetCollToken; // label of Jet made with only charged MC particles
75 
84  // edm::Handle<TriggerFilterObjectWithRefs> hltFilter; // not used at the moment: can access objects that fired the trigger
85 
87 
88  float piG;
89 
90  TTree* AnalysisTree;
91 
92  static const int NMCPMAX = 10000;
93  static const int NTKMAX = 10000;
94  static const int NIJMAX = 10000;
95  static const int NCJMAX = 10000;
96  static const int NTJMAX = 10000;
97  static const int NEHJMAX = 10000;
98 
100 
107 
108  TClonesArray* MonteCarlo;
109  TClonesArray* InclusiveJet;
110  TClonesArray* ChargedJet;
111  TClonesArray* Track;
112  TClonesArray* TracksJet;
113  TClonesArray* CalorimeterJet;
114  TClonesArray* acceptedTriggers;
115 };
116 
117 #endif
edm::Handle< reco::GenJetCollection > GenJetsHandle
void fillTracks(float, float, float, float)
edm::Handle< reco::GenJetCollection > ChgGenJetsHandle
edm::EDGetTokenT< edm::HepMCProduct > mcEventToken
void fillTracksJet(float, float, float, float)
edm::EDGetTokenT< reco::CandidateCollection > tracksCollToken
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken
void fillChargedJet(float, float, float, float)
void fillInclusiveJet(float, float, float, float)
edm::Handle< edm::TriggerResults > triggerResults
edm::Service< TFileService > fs
edm::EDGetTokenT< reco::BasicJetCollection > tracksJetCollToken
edm::Handle< edm::HepMCProduct > EvtHandle
edm::EDGetTokenT< std::vector< reco::GenParticle > > chgGenPartCollToken
void analyze(const edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< reco::CaloJetCollection > recoCaloJetCollToken
void fillCaloJet(float, float, float, float)
edm::Handle< std::vector< reco::GenParticle > > CandHandleMC
edm::Handle< reco::CandidateCollection > CandHandleRECO
edm::Handle< reco::BasicJetCollection > TracksJetsHandle
AnalysisRootpleProducer(const edm::ParameterSet &)
edm::Handle< reco::CaloJetCollection > RecoCaloJetsHandle
edm::EDGetTokenT< reco::GenJetCollection > genJetCollToken
void fillMCParticles(float, float, float, float)
edm::EDGetTokenT< reco::GenJetCollection > chgJetCollToken