ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/CmsHi/JetAnalysis/interface/HiInclusiveJetAnalyzer.h
Revision: 1.15
Committed: Fri May 25 10:06:59 2012 UTC (12 years, 11 months ago) by yilmaz
Content type: text/plain
Branch: MAIN
CVS Tags: 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
Changes since 1.14: +1 -0 lines
Log Message:
jet mass added, thresholds reduced

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     #include "FWCore/Framework/interface/Event.h"
14     #include "FWCore/Framework/interface/MakerMacros.h"
15    
16     #include "TFile.h"
17     #include "TTree.h"
18     #include "TH1.h"
19     #include "CommonTools/UtilAlgos/interface/TFileService.h"
20     #include "FWCore/ServiceRegistry/interface/Service.h"
21    
22     #include "DataFormats/HeavyIonEvent/interface/CentralityProvider.h"
23    
24 mnguyen 1.3 #include "DataFormats/PatCandidates/interface/Jet.h"
25     #include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h"
26 yilmaz 1.1 //
27    
28     /**\class HiInclusiveJetAnalyzer
29    
30     \author Matt Nguyen
31     \date November 2010
32     */
33    
34    
35    
36    
37     class HiInclusiveJetAnalyzer : public edm::EDAnalyzer {
38     public:
39    
40     explicit HiInclusiveJetAnalyzer(const edm::ParameterSet&);
41    
42     ~HiInclusiveJetAnalyzer();
43    
44     virtual void analyze(const edm::Event&, const edm::EventSetup&);
45    
46     virtual void beginRun(const edm::Run & r, const edm::EventSetup & c);
47    
48     virtual void beginJob();
49    
50     void fillL1Bits(const edm::Event &iEvent);
51    
52     void fillHLTBits(const edm::Event &iEvent);
53    
54     template <typename TYPE>
55     void getProduct(const std::string name, edm::Handle<TYPE> &prod,
56     const edm::Event &event) const;
57     template <typename TYPE>
58     bool getProductSafe(const std::string name, edm::Handle<TYPE> &prod,
59     const edm::Event &event) const;
60    
61    
62     private:
63    
64 mnguyen 1.3 int getPFJetMuon(const pat::Jet& pfJet, const reco::PFCandidateCollection *pfCandidateColl);
65 yilmaz 1.1
66 mnguyen 1.3 double getPtRel(const reco::PFCandidate lep, const pat::Jet& jet );
67 yilmaz 1.1
68 mnguyen 1.6 void saveDaughters( const reco::GenParticle & gen);
69     void saveDaughters( const reco::Candidate & gen);
70    
71 yilmaz 1.12 edm::InputTag jetTag_, vtxTag_, genjetTag_, eventInfoTag_, L1gtReadout_, pfCandidateLabel_, trackTag_, matchTag_;
72 yilmaz 1.1
73 mnguyen 1.6 std::vector<float> usedStringPts;
74 yilmaz 1.1
75     /// verbose ?
76     bool verbose_;
77    
78     bool useCentrality_;
79     bool useVtx_;
80     bool useJEC_;
81 yilmaz 1.2 bool usePat_;
82 yilmaz 1.1 bool isMC_;
83 yilmaz 1.14 bool fillGenJets_;
84 yilmaz 1.9 bool doTrigger_;
85 yilmaz 1.11 bool useQuality_;
86     std::string trackQuality_;
87 yilmaz 1.1
88 yilmaz 1.8 bool doSubEvent_;
89 yilmaz 1.4 double genPtMin_;
90 mnguyen 1.3 bool doLifeTimeTagging_;
91 mnguyen 1.5 bool doLifeTimeTaggingExtras_;
92 mnguyen 1.7 bool saveBfragments_;
93 yilmaz 1.1
94 yilmaz 1.11 double rParam;
95 yilmaz 1.13 double hardPtMin_;
96 yilmaz 1.11
97 yilmaz 1.1 TTree *t;
98     edm::Service<TFileService> fs1;
99    
100     CentralityProvider * centrality_;
101    
102    
103    
104     std::string hltResName_; //HLT trigger results name
105     std::vector<std::string> hltProcNames_; //HLT process name(s)
106     std::vector<std::string> hltTrgNames_; //HLT trigger name(s)
107    
108     std::vector<int> hltTrgBits_; //HLT trigger bit(s)
109     std::vector<bool> hltTrgDeci_; //HLT trigger descision(s)
110     std::vector<std::string> hltTrgUsedNames_; //HLT used trigger name(s)
111     std::string hltUsedResName_; //used HLT trigger results name
112    
113    
114    
115 mnguyen 1.5 static const int MAXJETS = 500;
116     static const int MAXTRACKS = 5000;
117     static const int MAXHLTBITS = 5000;
118 mnguyen 1.6 static const int MAXBFRAG = 500;
119 yilmaz 1.1
120     struct JRA{
121    
122     int nref;
123     int run;
124     int evt;
125     int lumi;
126     int bin;
127     float vx, vy, vz;
128     float b;
129     float hf;
130    
131     float rawpt[MAXJETS];
132     float jtpt[MAXJETS];
133     float jteta[MAXJETS];
134     float jtphi[MAXJETS];
135     float jty[MAXJETS];
136 yilmaz 1.2 float jtpu[MAXJETS];
137 yilmaz 1.15 float jtm[MAXJETS];
138 yilmaz 1.2
139 yilmaz 1.11 float trackMax[MAXJETS];
140     float trackSum[MAXJETS];
141     int trackN[MAXJETS];
142    
143     float chargedMax[MAXJETS];
144     float chargedSum[MAXJETS];
145     int chargedN[MAXJETS];
146    
147     float photonMax[MAXJETS];
148     float photonSum[MAXJETS];
149     int photonN[MAXJETS];
150    
151 yilmaz 1.13 float trackHardSum[MAXJETS];
152     float chargedHardSum[MAXJETS];
153     float photonHardSum[MAXJETS];
154    
155     int trackHardN[MAXJETS];
156     int chargedHardN[MAXJETS];
157     int photonHardN[MAXJETS];
158    
159 yilmaz 1.11 float neutralMax[MAXJETS];
160     float neutralSum[MAXJETS];
161     int neutralN[MAXJETS];
162    
163     float eMax[MAXJETS];
164     float eSum[MAXJETS];
165     int eN[MAXJETS];
166    
167     float muMax[MAXJETS];
168     float muSum[MAXJETS];
169     int muN[MAXJETS];
170    
171 yilmaz 1.12 float matchedPt[MAXJETS];
172     float matchedR[MAXJETS];
173    
174 mnguyen 1.3 float discr_csvMva[MAXJETS];
175     float discr_csvSimple[MAXJETS];
176     float discr_muByIp3[MAXJETS];
177     float discr_muByPt[MAXJETS];
178     float discr_prob[MAXJETS];
179     float discr_probb[MAXJETS];
180     float discr_tcHighEff[MAXJETS];
181     float discr_tcHighPur[MAXJETS];
182    
183 mnguyen 1.5 int nsvtx[MAXJETS];
184     int svtxntrk[MAXJETS];
185 mnguyen 1.3 float svtxdl[MAXJETS];
186     float svtxdls[MAXJETS];
187     float svtxm[MAXJETS];
188     float svtxpt[MAXJETS];
189    
190 mnguyen 1.5 int nIPtrk[MAXJETS];
191     int nselIPtrk[MAXJETS];
192    
193 mnguyen 1.6 int nIP;
194 mnguyen 1.5 int ipJetIndex[MAXTRACKS];
195     float ipPt[MAXTRACKS];
196     float ipProb0[MAXTRACKS];
197     float ipProb1[MAXTRACKS];
198     float ip2d[MAXTRACKS];
199     float ip2dSig[MAXTRACKS];
200     float ip3d[MAXTRACKS];
201     float ip3dSig[MAXTRACKS];
202     float ipDist2Jet[MAXTRACKS];
203     float ipDist2JetSig[MAXTRACKS];
204     float ipClosest2Jet[MAXTRACKS];
205 mnguyen 1.3
206     float mue[MAXJETS];
207     float mupt[MAXJETS];
208     float mueta[MAXJETS];
209     float muphi[MAXJETS];
210     float mudr[MAXJETS];
211     float muptrel[MAXJETS];
212     int muchg[MAXJETS];
213    
214 ylai 1.10 float discr_fr01[MAXJETS];
215    
216 yilmaz 1.1 float refpt[MAXJETS];
217     float refeta[MAXJETS];
218     float refphi[MAXJETS];
219     float refy[MAXJETS];
220     float refdphijt[MAXJETS];
221     float refdrjt[MAXJETS];
222     float refparton_pt[MAXJETS];
223 mnguyen 1.3 int refparton_flavor[MAXJETS];
224     int refparton_flavorForB[MAXJETS];
225 yilmaz 1.1
226     float pthat;
227 mnguyen 1.5 int beamId1, beamId2;
228 yilmaz 1.1 int ngen;
229     int genmatchindex[MAXJETS];
230     float genpt[MAXJETS];
231     float geneta[MAXJETS];
232     float genphi[MAXJETS];
233     float geny[MAXJETS];
234     float gendphijt[MAXJETS];
235     float gendrjt[MAXJETS];
236 yilmaz 1.8 int gensubid[MAXJETS];
237 yilmaz 1.1
238     // hlt
239     int nHLTBit;
240     bool hltBit[MAXHLTBITS];
241    
242     // l1
243     int nL1TBit;
244     bool l1TBit[MAXHLTBITS];
245     int nL1ABit;
246     bool l1ABit[MAXHLTBITS];
247    
248 mnguyen 1.6 int bMult;
249     int bJetIndex[MAXBFRAG];
250     int bStatus[MAXBFRAG];
251     int bPdg[MAXBFRAG];
252     int bChg[MAXBFRAG];
253     float bVx[MAXBFRAG];
254     float bVy[MAXBFRAG];
255     float bVz[MAXBFRAG];
256     float bPt[MAXBFRAG];
257     float bEta[MAXBFRAG];
258     float bPhi[MAXBFRAG];
259    
260 mnguyen 1.3
261 yilmaz 1.1 };
262    
263     JRA jets_;
264    
265     };
266    
267     #endif