ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/CmsHi/JetAnalysis/interface/HiPFJetAnalyzer.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
CVS Tags: HiForest_V02_85, HiForest_V02_84, HiForest_V02_83, HiForest_V02_82, HiForest_V02_81, HiForest_V02_80, HiForest_V02_79, HiForest_V02_78, HiForest_V02_77, HiForest_V02_76, HiForest_V02_75, HiForest_V02_74, HiForest_V02_73, HiForest_V02_72, HiForest_V02_71, HiForest_V02_70, HiForest_V02_69, HiForest_V02_68, HiForest_V02_67, HiForest_V02_66, HiForest_V02_65, HiForest_V02_64, HiForest_V02_63, HiForest_V02_62, HiForest_V02_61, HiForest_V02_60, HiForest_V02_59, HiForest_V02_58, HiForest_V02_57, HiForest_V02_56, HiForest_V02_55, HiForest_V02_54, HiForest_V02_53, HiForest_V02_52, HiForest_V02_51, HiForest_V02_50, HiForest_V02_49, HiForest_V02_48, HiForest_V02_47, HiForest_V02_46, HiForest_V02_45, HiForest_V02_44, HiForest_V02_43, HiForest_V02_42, HiForest_V02_41, HiForest_V02_40, HiForest_V02_39, HiForest_V02_38, HiForest_V02_37, HiForest_V02_36, HiForest_V02_35, HiForest_V02_34, HiForest_V02_33, HiForest_V02_32, HiForest_V02_31, HiForest_V02_30, HiForest_V02_27, HiForest_V02_26, QM_2012, HiForest_V02_25, HiForest_V02_24, HiForest_V02_23, HiForest_V02_22, HiForest_V02_21, HiForest_V02_20, HiForest_V02_19, HiForest_V02_18, HiForest_V02_17, HiForest_V02_16, HiForest_V02_15, HiForest_V02_14, HiForest_V02_13, HiForest_V02_12, HiForest_V02_11, HiForest_V02_10, HiForest_V02_09, HiForest_V02_08, HiForest_V02_07, HiForest_V02_06, HiForest_V02_05, HiForest_V02_04, HiForest_V02_03, HiForest_V02_02, HiForest_V02_01, HiForest_V02_00, hi44X_02, hi413_03, hi413_02, hi441_1, hi441_0, hi413_11, hi413_10, hi413_09, HEAD
Branch point for: branch_44x
Log Message:
combining all analyzers

File Contents

# User Rev Content
1 yilmaz 1.1 #ifndef MNguyen_InclusiveJetAnalyzer_HiPFJetAnalyzer_
2     #define MNguyen_InclusiveJetAnalyzer_HiPFJetAnalyzer_
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     #include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h"
29    
30     //
31    
32     /**\class HiPFJetAnalyzer
33    
34     \author Matt Nguyen
35     \date November 2010
36     */
37    
38    
39    
40    
41     class HiPFJetAnalyzer : public edm::EDAnalyzer {
42     public:
43    
44     explicit HiPFJetAnalyzer(const edm::ParameterSet&);
45    
46     ~HiPFJetAnalyzer();
47    
48     virtual void analyze(const edm::Event&, const edm::EventSetup&);
49    
50     virtual void beginRun(const edm::Run & r, const edm::EventSetup & c);
51    
52     virtual void beginJob();
53    
54    
55     void getPartons( const edm::Event & iEvent, const edm::EventSetup & iEs );
56    
57     void fillL1Bits(const edm::Event &iEvent);
58    
59     void fillHLTBits(const edm::Event &iEvent);
60    
61     template <typename TYPE>
62     void getProduct(const std::string name, edm::Handle<TYPE> &prod,
63     const edm::Event &event) const;
64     template <typename TYPE>
65     bool getProductSafe(const std::string name, edm::Handle<TYPE> &prod,
66     const edm::Event &event) const;
67    
68     private:
69    
70    
71    
72     edm::InputTag pfCandidatesTag_, trackTag_, vertexTag_, simTracksTag_, genParticleTag_, eventInfoTag_;
73     edm::InputTag jetTag1_, jetTag2_, jetTag3_, jetTag4_;
74     edm::InputTag recoJetTag1_, recoJetTag2_, recoJetTag3_, recoJetTag4_;
75     edm::InputTag genJetTag1_, genJetTag2_, genJetTag3_, genJetTag4_;
76     edm::InputTag L1gtReadout_;
77    
78     /// verbose ?
79     bool verbose_;
80    
81     bool useCentrality_;
82     bool isMC_;
83     double genParticleThresh_;
84    
85     bool hasSimInfo_;
86    
87    
88     std::string hltResName_; //HLT trigger results name
89     std::vector<std::string> hltProcNames_; //HLT process name(s)
90     std::vector<std::string> hltTrgNames_; //HLT trigger name(s)
91    
92     std::vector<int> hltTrgBits_; //HLT trigger bit(s)
93     std::vector<bool> hltTrgDeci_; //HLT trigger descision(s)
94     std::vector<std::string> hltTrgUsedNames_; //HLT used trigger name(s)
95     std::string hltUsedResName_; //used HLT trigger results name
96    
97    
98     TTree *t;
99     edm::Service<TFileService> fs2;
100    
101     CentralityProvider * centrality_;
102    
103     static const int MAXJETS = 25000;
104     static const int MAXUNMATCH = 25000;
105     static const int MAXPFCANDS = 25000;
106     static const int MAXTRACKS = 25000;
107     static const int MAXGENPS = 25000;
108     static const int MAXHLTBITS = 500000;
109    
110     struct JRA{
111    
112     int nj1;
113     int nj2;
114     int nj3;
115     int nj4;
116     int run;
117     int evt;
118     int lumi;
119     int bin;
120     float b;
121     float vx, vy, vz;
122     float bsx, bsy, bsz;
123     float bswx, bswy, bswz;
124    
125     float vxErr, vyErr, vzErr;
126     bool hasVtx;
127     float hf;
128    
129     float rawpt_j1[MAXJETS];
130     float jtpt_j1[MAXJETS];
131     float refpt_j1[MAXJETS];
132     float jteta_j1[MAXJETS];
133     float refeta_j1[MAXJETS];
134     float jtphi_j1[MAXJETS];
135     float refphi_j1[MAXJETS];
136     float jty_j1[MAXJETS];
137     float refy_j1[MAXJETS];
138     float refdrjt_j1[MAXJETS];
139     float preL1et_j1[MAXJETS];
140     float L2_j1[MAXJETS];
141     float L3_j1[MAXJETS];
142     float area_j1[MAXJETS];
143     float refpartonpt_j1[MAXJETS];
144     float refpartonflavor_j1[MAXJETS];
145    
146     float rawpt_j2[MAXJETS];
147     float jtpt_j2[MAXJETS];
148     float refpt_j2[MAXJETS];
149     float jteta_j2[MAXJETS];
150     float refeta_j2[MAXJETS];
151     float jtphi_j2[MAXJETS];
152     float refphi_j2[MAXJETS];
153     float jty_j2[MAXJETS];
154     float refy_j2[MAXJETS];
155     float refdrjt_j2[MAXJETS];
156     float preL1et_j2[MAXJETS];
157     float L2_j2[MAXJETS];
158     float L3_j2[MAXJETS];
159     float area_j2[MAXJETS];
160     float refpartonpt_j2[MAXJETS];
161     float refpartonflavor_j2[MAXJETS];
162    
163     float rawpt_j3[MAXJETS];
164     float jtpt_j3[MAXJETS];
165     float refpt_j3[MAXJETS];
166     float jteta_j3[MAXJETS];
167     float refeta_j3[MAXJETS];
168     float jtphi_j3[MAXJETS];
169     float refphi_j3[MAXJETS];
170     float jty_j3[MAXJETS];
171     float refy_j3[MAXJETS];
172     float refdrjt_j3[MAXJETS];
173     float preL1et_j3[MAXJETS];
174     float L2_j3[MAXJETS];
175     float L3_j3[MAXJETS];
176     float area_j3[MAXJETS];
177     float refpartonpt_j3[MAXJETS];
178     float refpartonflavor_j3[MAXJETS];
179    
180     float rawpt_j4[MAXJETS];
181     float jtpt_j4[MAXJETS];
182     float refpt_j4[MAXJETS];
183     float jteta_j4[MAXJETS];
184     float refeta_j4[MAXJETS];
185     float jtphi_j4[MAXJETS];
186     float refphi_j4[MAXJETS];
187     float jty_j4[MAXJETS];
188     float refy_j4[MAXJETS];
189     float refdrjt_j4[MAXJETS];
190     float preL1et_j4[MAXJETS];
191     float L2_j4[MAXJETS];
192     float L3_j4[MAXJETS];
193     float area_j4[MAXJETS];
194     float refpartonpt_j4[MAXJETS];
195     float refpartonflavor_j4[MAXJETS];
196    
197     int nunmatch_j1;
198     float unmatchpt_j1[MAXUNMATCH];
199     float unmatcheta_j1[MAXUNMATCH];
200     float unmatchy_j1[MAXUNMATCH];
201     float unmatchphi_j1[MAXUNMATCH];
202    
203     int nunmatch_j2;
204     float unmatchpt_j2[MAXUNMATCH];
205     float unmatcheta_j2[MAXUNMATCH];
206     float unmatchy_j2[MAXUNMATCH];
207     float unmatchphi_j2[MAXUNMATCH];
208    
209     int nunmatch_j3;
210     float unmatchpt_j3[MAXUNMATCH];
211     float unmatcheta_j3[MAXUNMATCH];
212     float unmatchy_j3[MAXUNMATCH];
213     float unmatchphi_j3[MAXUNMATCH];
214    
215     int nunmatch_j4;
216     float unmatchpt_j4[MAXUNMATCH];
217     float unmatcheta_j4[MAXUNMATCH];
218     float unmatchy_j4[MAXUNMATCH];
219     float unmatchphi_j4[MAXUNMATCH];
220    
221     int nPFcand;
222     int candId[MAXPFCANDS];
223     float candpt[MAXPFCANDS];
224     float candeta[MAXPFCANDS];
225     float candphi[MAXPFCANDS];
226     float candy[MAXPFCANDS];
227    
228     int ntrack;
229     int tracknhits[MAXTRACKS];
230     float trackpt[MAXTRACKS];
231     float tracketa[MAXTRACKS];
232     float trackphi[MAXTRACKS];
233     float tracksumecal[MAXTRACKS];
234     float tracksumhcal[MAXTRACKS];
235     int trackfake[MAXTRACKS];
236     int trackqual[MAXTRACKS];
237    
238     int trackNlayer[MAXTRACKS];
239     int trackNlayer3D[MAXTRACKS];
240    
241     float trackd0Err[MAXTRACKS];
242     float trackdzErr[MAXTRACKS];
243     float trackd0[MAXTRACKS];
244     float trackdz[MAXTRACKS];
245    
246     float trackptErr[MAXTRACKS];
247     float trackchi2[MAXTRACKS];
248     float trackchi2hit1D[MAXTRACKS];
249    
250     float trackd0ErrBS[MAXTRACKS];
251     float trackdzErrBS[MAXTRACKS];
252     float trackd0BS[MAXTRACKS];
253     float trackdzBS[MAXTRACKS];
254    
255     float trackd0ErrTrk[MAXTRACKS];
256     float trackdzErrTrk[MAXTRACKS];
257    
258     int ngenp;
259     int genppdgId[MAXGENPS];
260     float genppt[MAXGENPS];
261     float genpeta[MAXGENPS];
262     float genpphi[MAXGENPS];
263     float genpy[MAXGENPS];
264    
265     float pthat;
266    
267     int parton1_flavor, parton2_flavor;
268     float parton1_pt, parton2_pt;
269     float parton1_phi, parton2_phi;
270     float parton1_eta, parton2_eta;
271     float parton1_y, parton2_y;
272    
273     // hlt
274     int nHLTBit;
275     bool hltBit[MAXHLTBITS];
276    
277     // l1
278     int nL1TBit;
279     bool l1TBit[MAXHLTBITS];
280     int nL1ABit;
281     bool l1ABit[MAXHLTBITS];
282     };
283    
284     JRA jets_;
285     };
286    
287     #endif