ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/CmsHi/JetAnalysis/interface/HiInclusiveJetAnalyzer.h
Revision: 1.1
Committed: Tue Sep 20 19:45:05 2011 UTC (13 years, 7 months ago) by yilmaz
Content type: text/plain
Branch: MAIN
Log Message:
combining all analyzers

File Contents

# User Rev Content
1 yilmaz 1.1 #ifndef MNguyen_HiInclusiveJetAnalyzer_inclusiveJetAnalyzer_
2     #define MNguyen_HiInclusiveJetAnalyzer_inclusiveJetAnalyzer_
3    
4     // system include files
5     #include <memory>
6     #include <string>
7     #include <iostream>
8    
9     // user include files
10     #include "FWCore/Framework/interface/Frameworkfwd.h"
11     #include "FWCore/Framework/interface/EDAnalyzer.h"
12     #include "FWCore/ParameterSet/interface/ParameterSet.h"
13    
14     #include "FWCore/Framework/interface/Event.h"
15     #include "FWCore/Framework/interface/MakerMacros.h"
16    
17    
18    
19     #include "TFile.h"
20     #include "TTree.h"
21     #include "TH1.h"
22     #include "CommonTools/UtilAlgos/interface/TFileService.h"
23     #include "FWCore/ServiceRegistry/interface/Service.h"
24    
25     #include "DataFormats/HeavyIonEvent/interface/CentralityProvider.h"
26    
27     //
28    
29     /**\class HiInclusiveJetAnalyzer
30    
31     \author Matt Nguyen
32     \date November 2010
33     */
34    
35    
36    
37    
38     class HiInclusiveJetAnalyzer : public edm::EDAnalyzer {
39     public:
40    
41     explicit HiInclusiveJetAnalyzer(const edm::ParameterSet&);
42    
43     ~HiInclusiveJetAnalyzer();
44    
45     virtual void analyze(const edm::Event&, const edm::EventSetup&);
46    
47     virtual void beginRun(const edm::Run & r, const edm::EventSetup & c);
48    
49     virtual void beginJob();
50    
51     void fillL1Bits(const edm::Event &iEvent);
52    
53     void fillHLTBits(const edm::Event &iEvent);
54    
55     template <typename TYPE>
56     void getProduct(const std::string name, edm::Handle<TYPE> &prod,
57     const edm::Event &event) const;
58     template <typename TYPE>
59     bool getProductSafe(const std::string name, edm::Handle<TYPE> &prod,
60     const edm::Event &event) const;
61    
62    
63     private:
64    
65    
66    
67     edm::InputTag jetTag_, vtxTag_, genjetTag_, eventInfoTag_, L1gtReadout_;
68    
69    
70     /// verbose ?
71     bool verbose_;
72    
73     bool useCentrality_;
74     bool useVtx_;
75     bool useJEC_;
76     bool isMC_;
77    
78    
79     TTree *t;
80     edm::Service<TFileService> fs1;
81    
82     CentralityProvider * centrality_;
83    
84    
85    
86     std::string hltResName_; //HLT trigger results name
87     std::vector<std::string> hltProcNames_; //HLT process name(s)
88     std::vector<std::string> hltTrgNames_; //HLT trigger name(s)
89    
90     std::vector<int> hltTrgBits_; //HLT trigger bit(s)
91     std::vector<bool> hltTrgDeci_; //HLT trigger descision(s)
92     std::vector<std::string> hltTrgUsedNames_; //HLT used trigger name(s)
93     std::string hltUsedResName_; //used HLT trigger results name
94    
95    
96    
97     static const int MAXJETS = 50000;
98     static const int MAXHLTBITS = 500000;
99    
100    
101     struct JRA{
102    
103     int nref;
104     int run;
105     int evt;
106     int lumi;
107     int bin;
108     float vx, vy, vz;
109     float b;
110     float hf;
111    
112     float rawpt[MAXJETS];
113     float jtpt[MAXJETS];
114     float jteta[MAXJETS];
115     float jtphi[MAXJETS];
116     float jty[MAXJETS];
117     float refpt[MAXJETS];
118     float refeta[MAXJETS];
119     float refphi[MAXJETS];
120     float refy[MAXJETS];
121     float refdphijt[MAXJETS];
122     float refdrjt[MAXJETS];
123     float refparton_pt[MAXJETS];
124     float refparton_flavor[MAXJETS];
125    
126     float pthat;
127     int ngen;
128     int genmatchindex[MAXJETS];
129     float genpt[MAXJETS];
130     float geneta[MAXJETS];
131     float genphi[MAXJETS];
132     float geny[MAXJETS];
133     float gendphijt[MAXJETS];
134     float gendrjt[MAXJETS];
135    
136     // hlt
137     int nHLTBit;
138     bool hltBit[MAXHLTBITS];
139    
140     // l1
141     int nL1TBit;
142     bool l1TBit[MAXHLTBITS];
143     int nL1ABit;
144     bool l1ABit[MAXHLTBITS];
145    
146     };
147    
148     JRA jets_;
149    
150     };
151    
152     #endif