ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/CmsHi/JetAnalysis/interface/HiInclusiveJetAnalyzer.h
Revision: 1.2
Committed: Tue Sep 20 20:06:06 2011 UTC (13 years, 7 months ago) by yilmaz
Content type: text/plain
Branch: MAIN
CVS Tags: hi44X_02, hi413_03, hi413_02, hi441_1, hi441_0, hi413_11, hi413_10, hi413_09
Changes since 1.1: +3 -0 lines
Log Message:
made independent of jet format

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 yilmaz 1.2 bool usePat_;
77 yilmaz 1.1 bool isMC_;
78    
79    
80     TTree *t;
81     edm::Service<TFileService> fs1;
82    
83     CentralityProvider * centrality_;
84    
85    
86    
87     std::string hltResName_; //HLT trigger results name
88     std::vector<std::string> hltProcNames_; //HLT process name(s)
89     std::vector<std::string> hltTrgNames_; //HLT trigger name(s)
90    
91     std::vector<int> hltTrgBits_; //HLT trigger bit(s)
92     std::vector<bool> hltTrgDeci_; //HLT trigger descision(s)
93     std::vector<std::string> hltTrgUsedNames_; //HLT used trigger name(s)
94     std::string hltUsedResName_; //used HLT trigger results name
95    
96    
97    
98     static const int MAXJETS = 50000;
99     static const int MAXHLTBITS = 500000;
100    
101    
102     struct JRA{
103    
104     int nref;
105     int run;
106     int evt;
107     int lumi;
108     int bin;
109     float vx, vy, vz;
110     float b;
111     float hf;
112    
113     float rawpt[MAXJETS];
114     float jtpt[MAXJETS];
115     float jteta[MAXJETS];
116     float jtphi[MAXJETS];
117     float jty[MAXJETS];
118 yilmaz 1.2 float jtpu[MAXJETS];
119    
120 yilmaz 1.1 float refpt[MAXJETS];
121     float refeta[MAXJETS];
122     float refphi[MAXJETS];
123     float refy[MAXJETS];
124     float refdphijt[MAXJETS];
125     float refdrjt[MAXJETS];
126     float refparton_pt[MAXJETS];
127     float refparton_flavor[MAXJETS];
128    
129     float pthat;
130     int ngen;
131     int genmatchindex[MAXJETS];
132     float genpt[MAXJETS];
133     float geneta[MAXJETS];
134     float genphi[MAXJETS];
135     float geny[MAXJETS];
136     float gendphijt[MAXJETS];
137     float gendrjt[MAXJETS];
138    
139     // hlt
140     int nHLTBit;
141     bool hltBit[MAXHLTBITS];
142    
143     // l1
144     int nL1TBit;
145     bool l1TBit[MAXHLTBITS];
146     int nL1ABit;
147     bool l1ABit[MAXHLTBITS];
148    
149     };
150    
151     JRA jets_;
152    
153     };
154    
155     #endif