ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/CmsHi/JetAnalysis/interface/HiInclusiveJetAnalyzer.h
Revision: 1.10
Committed: Fri May 11 14:39:31 2012 UTC (12 years, 11 months ago) by ylai
Content type: text/plain
Branch: MAIN
Changes since 1.9: +2 -0 lines
Log Message:
Fake rejection discriminant

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 mnguyen 1.3 edm::InputTag jetTag_, vtxTag_, genjetTag_, eventInfoTag_, L1gtReadout_, pfCandidateLabel_;
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.9 bool doTrigger_;
84 yilmaz 1.1
85 yilmaz 1.8 bool doSubEvent_;
86 yilmaz 1.4 double genPtMin_;
87 mnguyen 1.3 bool doLifeTimeTagging_;
88 mnguyen 1.5 bool doLifeTimeTaggingExtras_;
89 mnguyen 1.7 bool saveBfragments_;
90 yilmaz 1.1
91     TTree *t;
92     edm::Service<TFileService> fs1;
93    
94     CentralityProvider * centrality_;
95    
96    
97    
98     std::string hltResName_; //HLT trigger results name
99     std::vector<std::string> hltProcNames_; //HLT process name(s)
100     std::vector<std::string> hltTrgNames_; //HLT trigger name(s)
101    
102     std::vector<int> hltTrgBits_; //HLT trigger bit(s)
103     std::vector<bool> hltTrgDeci_; //HLT trigger descision(s)
104     std::vector<std::string> hltTrgUsedNames_; //HLT used trigger name(s)
105     std::string hltUsedResName_; //used HLT trigger results name
106    
107    
108    
109 mnguyen 1.5 static const int MAXJETS = 500;
110     static const int MAXTRACKS = 5000;
111     static const int MAXHLTBITS = 5000;
112 mnguyen 1.6 static const int MAXBFRAG = 500;
113 yilmaz 1.1
114     struct JRA{
115    
116     int nref;
117     int run;
118     int evt;
119     int lumi;
120     int bin;
121     float vx, vy, vz;
122     float b;
123     float hf;
124    
125     float rawpt[MAXJETS];
126     float jtpt[MAXJETS];
127     float jteta[MAXJETS];
128     float jtphi[MAXJETS];
129     float jty[MAXJETS];
130 yilmaz 1.2 float jtpu[MAXJETS];
131    
132 mnguyen 1.3 float discr_csvMva[MAXJETS];
133     float discr_csvSimple[MAXJETS];
134     float discr_muByIp3[MAXJETS];
135     float discr_muByPt[MAXJETS];
136     float discr_prob[MAXJETS];
137     float discr_probb[MAXJETS];
138     float discr_tcHighEff[MAXJETS];
139     float discr_tcHighPur[MAXJETS];
140    
141 mnguyen 1.5 int nsvtx[MAXJETS];
142     int svtxntrk[MAXJETS];
143 mnguyen 1.3 float svtxdl[MAXJETS];
144     float svtxdls[MAXJETS];
145     float svtxm[MAXJETS];
146     float svtxpt[MAXJETS];
147    
148 mnguyen 1.5 int nIPtrk[MAXJETS];
149     int nselIPtrk[MAXJETS];
150    
151 mnguyen 1.6 int nIP;
152 mnguyen 1.5 int ipJetIndex[MAXTRACKS];
153     float ipPt[MAXTRACKS];
154     float ipProb0[MAXTRACKS];
155     float ipProb1[MAXTRACKS];
156     float ip2d[MAXTRACKS];
157     float ip2dSig[MAXTRACKS];
158     float ip3d[MAXTRACKS];
159     float ip3dSig[MAXTRACKS];
160     float ipDist2Jet[MAXTRACKS];
161     float ipDist2JetSig[MAXTRACKS];
162     float ipClosest2Jet[MAXTRACKS];
163 mnguyen 1.3
164     float mue[MAXJETS];
165     float mupt[MAXJETS];
166     float mueta[MAXJETS];
167     float muphi[MAXJETS];
168     float mudr[MAXJETS];
169     float muptrel[MAXJETS];
170     int muchg[MAXJETS];
171    
172 ylai 1.10 float discr_fr01[MAXJETS];
173    
174 yilmaz 1.1 float refpt[MAXJETS];
175     float refeta[MAXJETS];
176     float refphi[MAXJETS];
177     float refy[MAXJETS];
178     float refdphijt[MAXJETS];
179     float refdrjt[MAXJETS];
180     float refparton_pt[MAXJETS];
181 mnguyen 1.3 int refparton_flavor[MAXJETS];
182     int refparton_flavorForB[MAXJETS];
183 yilmaz 1.1
184     float pthat;
185 mnguyen 1.5 int beamId1, beamId2;
186 yilmaz 1.1 int ngen;
187     int genmatchindex[MAXJETS];
188     float genpt[MAXJETS];
189     float geneta[MAXJETS];
190     float genphi[MAXJETS];
191     float geny[MAXJETS];
192     float gendphijt[MAXJETS];
193     float gendrjt[MAXJETS];
194 yilmaz 1.8 int gensubid[MAXJETS];
195 yilmaz 1.1
196     // hlt
197     int nHLTBit;
198     bool hltBit[MAXHLTBITS];
199    
200     // l1
201     int nL1TBit;
202     bool l1TBit[MAXHLTBITS];
203     int nL1ABit;
204     bool l1ABit[MAXHLTBITS];
205    
206 mnguyen 1.6 int bMult;
207     int bJetIndex[MAXBFRAG];
208     int bStatus[MAXBFRAG];
209     int bPdg[MAXBFRAG];
210     int bChg[MAXBFRAG];
211     float bVx[MAXBFRAG];
212     float bVy[MAXBFRAG];
213     float bVz[MAXBFRAG];
214     float bPt[MAXBFRAG];
215     float bEta[MAXBFRAG];
216     float bPhi[MAXBFRAG];
217    
218 mnguyen 1.3
219 yilmaz 1.1 };
220    
221     JRA jets_;
222    
223     };
224    
225     #endif