ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/CmsHi/JetAnalysis/interface/HiInclusiveJetAnalyzer.h
Revision: 1.4
Committed: Sun Apr 22 19:12:44 2012 UTC (13 years ago) by yilmaz
Content type: text/plain
Branch: MAIN
CVS Tags: HiForest_V02_00
Changes since 1.3: +1 -0 lines
Log Message:
up

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.3 edm::InputTag jetTag_, vtxTag_, genjetTag_, eventInfoTag_, L1gtReadout_, pfCandidateLabel_;
69 yilmaz 1.1
70    
71     /// verbose ?
72     bool verbose_;
73    
74     bool useCentrality_;
75     bool useVtx_;
76     bool useJEC_;
77 yilmaz 1.2 bool usePat_;
78 yilmaz 1.1 bool isMC_;
79    
80 yilmaz 1.4 double genPtMin_;
81 mnguyen 1.3 bool doLifeTimeTagging_;
82 yilmaz 1.1
83     TTree *t;
84     edm::Service<TFileService> fs1;
85    
86     CentralityProvider * centrality_;
87    
88    
89    
90     std::string hltResName_; //HLT trigger results name
91     std::vector<std::string> hltProcNames_; //HLT process name(s)
92     std::vector<std::string> hltTrgNames_; //HLT trigger name(s)
93    
94     std::vector<int> hltTrgBits_; //HLT trigger bit(s)
95     std::vector<bool> hltTrgDeci_; //HLT trigger descision(s)
96     std::vector<std::string> hltTrgUsedNames_; //HLT used trigger name(s)
97     std::string hltUsedResName_; //used HLT trigger results name
98    
99    
100    
101     static const int MAXJETS = 50000;
102     static const int MAXHLTBITS = 500000;
103    
104    
105     struct JRA{
106    
107     int nref;
108     int run;
109     int evt;
110     int lumi;
111     int bin;
112     float vx, vy, vz;
113     float b;
114     float hf;
115    
116     float rawpt[MAXJETS];
117     float jtpt[MAXJETS];
118     float jteta[MAXJETS];
119     float jtphi[MAXJETS];
120     float jty[MAXJETS];
121 yilmaz 1.2 float jtpu[MAXJETS];
122    
123 mnguyen 1.3 float discr_csvMva[MAXJETS];
124     float discr_csvSimple[MAXJETS];
125     float discr_muByIp3[MAXJETS];
126     float discr_muByPt[MAXJETS];
127     float discr_prob[MAXJETS];
128     float discr_probb[MAXJETS];
129     float discr_tcHighEff[MAXJETS];
130     float discr_tcHighPur[MAXJETS];
131    
132     unsigned nsvtx[MAXJETS];
133     unsigned svtxntrk[MAXJETS];
134     float svtxdl[MAXJETS];
135     float svtxdls[MAXJETS];
136     float svtxm[MAXJETS];
137     float svtxpt[MAXJETS];
138    
139     unsigned nIPtracks[MAXJETS];
140     unsigned nselIPtracks[MAXJETS];
141    
142     float mue[MAXJETS];
143     float mupt[MAXJETS];
144     float mueta[MAXJETS];
145     float muphi[MAXJETS];
146     float mudr[MAXJETS];
147     float muptrel[MAXJETS];
148     int muchg[MAXJETS];
149    
150 yilmaz 1.1 float refpt[MAXJETS];
151     float refeta[MAXJETS];
152     float refphi[MAXJETS];
153     float refy[MAXJETS];
154     float refdphijt[MAXJETS];
155     float refdrjt[MAXJETS];
156     float refparton_pt[MAXJETS];
157 mnguyen 1.3 int refparton_flavor[MAXJETS];
158     int refparton_flavorForB[MAXJETS];
159 yilmaz 1.1
160     float pthat;
161     int ngen;
162     int genmatchindex[MAXJETS];
163     float genpt[MAXJETS];
164     float geneta[MAXJETS];
165     float genphi[MAXJETS];
166     float geny[MAXJETS];
167     float gendphijt[MAXJETS];
168     float gendrjt[MAXJETS];
169    
170     // hlt
171     int nHLTBit;
172     bool hltBit[MAXHLTBITS];
173    
174     // l1
175     int nL1TBit;
176     bool l1TBit[MAXHLTBITS];
177     int nL1ABit;
178     bool l1ABit[MAXHLTBITS];
179    
180 mnguyen 1.3
181 yilmaz 1.1 };
182    
183     JRA jets_;
184    
185     };
186    
187     #endif