CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  virtual ~AnalysisRootpleProducer() {} // no need to delete ROOT stuff
48  // as it'll be deleted upon closing TFile
49 
50  virtual void analyze( const edm::Event&, const edm::EventSetup& ) ;
51  virtual void beginJob() ;
52  virtual void endJob() ;
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 
67  edm::InputTag mcEvent; // label of MC event
68  edm::InputTag genJetCollName; // label of Jet made with MC particles
69  edm::InputTag chgJetCollName; // label of Jet made with only charged MC particles
70  edm::InputTag chgGenPartCollName; // label of 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
void fillTracksJet(float, float, float, float)
void fillChargedJet(float, float, float, float)
void fillInclusiveJet(float, float, float, float)
edm::Handle< edm::TriggerResults > triggerResults
virtual void analyze(const edm::Event &, const edm::EventSetup &)
edm::Service< TFileService > fs
edm::Handle< edm::HepMCProduct > EvtHandle
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
void fillMCParticles(float, float, float, float)