CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
QcdHighPtDQM Class Reference

#include <QcdHighPtDQM.h>

Inheritance diagram for QcdHighPtDQM:
edm::EDAnalyzer

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &)
 Get the analysis. More...
 
void beginJob ()
 Inizialize parameters for histo binning. More...
 
void endJob (void)
 
 QcdHighPtDQM (const edm::ParameterSet &)
 Constructor. More...
 
virtual ~QcdHighPtDQM ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Private Member Functions

float moverl (const reco::CaloMETCollection &metcollection, float &ljpt)
 
float movers (const reco::CaloMETCollection &metcollection)
 

Private Attributes

edm::InputTag jetLabel_
 
std::map< std::string,
MonitorElement * > 
MEcontainer_
 
edm::InputTag metLabel1_
 
edm::InputTag metLabel2_
 
edm::InputTag metLabel3_
 
edm::InputTag metLabel4_
 
DQMStoretheDbe
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Detailed Description

DQM Physics Module for High Pt QCD group

Based on DQM/SiPixel and DQM/Physics code Version 1.0, 7/7/09 By Keith Rose

Definition at line 26 of file QcdHighPtDQM.h.

Constructor & Destructor Documentation

QcdHighPtDQM::QcdHighPtDQM ( const edm::ParameterSet iConfig)

Constructor.

Definition at line 35 of file QcdHighPtDQM.cc.

35  :
36  jetLabel_(iConfig.getUntrackedParameter<edm::InputTag>("jetTag")),
37  metLabel1_(iConfig.getUntrackedParameter<edm::InputTag>("metTag1")),
38  metLabel2_(iConfig.getUntrackedParameter<edm::InputTag>("metTag2")),
39  metLabel3_(iConfig.getUntrackedParameter<edm::InputTag>("metTag3")),
41 {
42 
43 }
T getUntrackedParameter(std::string const &, T const &) const
edm::InputTag metLabel2_
Definition: QcdHighPtDQM.h:55
edm::InputTag jetLabel_
Definition: QcdHighPtDQM.h:53
edm::InputTag metLabel1_
Definition: QcdHighPtDQM.h:54
edm::InputTag metLabel3_
Definition: QcdHighPtDQM.h:56
edm::InputTag metLabel4_
Definition: QcdHighPtDQM.h:57
QcdHighPtDQM::~QcdHighPtDQM ( )
virtual

Destructor.

Definition at line 45 of file QcdHighPtDQM.cc.

45  {
46 
47 
48 }

Member Function Documentation

void QcdHighPtDQM::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

Get the analysis.

Implements edm::EDAnalyzer.

Definition at line 137 of file QcdHighPtDQM.cc.

References reco::LeafCandidate::energy(), edm::Event::getByLabel(), jetLabel_, analyzePatCleaning_cfg::jets, M_PI, MEcontainer_, CaloMET_cfi::met, CaloMET_cfi::metHO, metLabel1_, metLabel2_, metLabel3_, metLabel4_, CaloMET_cfi::metNoHF, CaloMET_cfi::metNoHFHO, movers(), reco::LeafCandidate::p4(), and reco::LeafCandidate::pt().

137  {
138 
139  //Get Jets
141  iEvent.getByLabel(jetLabel_,jetHandle);
142  const CaloJetCollection & jets = *jetHandle;
143  CaloJetCollection::const_iterator jet_iter;
144 
145  //Get MET collections
147  iEvent.getByLabel(metLabel1_, metHandle);
148  const CaloMETCollection &met = *metHandle;
149 
150  edm::Handle<CaloMETCollection> metHOHandle;
151  iEvent.getByLabel(metLabel2_, metHOHandle);
152  const CaloMETCollection &metHO = *metHOHandle;
153 
154  edm::Handle<CaloMETCollection> metNoHFHandle;
155  iEvent.getByLabel(metLabel3_, metNoHFHandle);
156  const CaloMETCollection &metNoHF = *metNoHFHandle;
157 
158  edm::Handle<CaloMETCollection> metNoHFHOHandle;
159  iEvent.getByLabel(metLabel4_, metNoHFHOHandle);
160  const CaloMETCollection &metNoHFHO = *metNoHFHOHandle;
161 
162  //initialize leading jet value and jet multiplicity counter
163  int njets = 0;
164  int njets30 = 0;
165  float leading_jetpt = 0;
166  float leading_jeteta = 0;
167 
168  //initialize variables for picking out leading 2 barrel jets
169  reco::CaloJet leadingbarreljet;
170  reco::CaloJet secondbarreljet;
171  int nbarreljets = 0;
172 
173  //get bins in eta.
174  //Bins correspond to calotower regions.
175 
176  const float etabins[83] = {-5.191, -4.889, -4.716, -4.538, -4.363, -4.191, -4.013, -3.839, -3.664, -3.489, -3.314, -3.139, -2.964, -2.853, -2.650, -2.500, -2.322, -2.172, -2.043, -1.930, -1.830, -1.740, -1.653, -1.566, -1.479, -1.392, -1.305, -1.218, -1.131, -1.044, -.957, -.879, -.783, -.696, -.609, -.522, -.435, -.348, -.261, -.174, -.087, 0, .087, .174, .261, .348, .435, .522, .609, .696, .783, .879, .957, 1.044, 1.131, 1.218, 1.305, 1.392, 1.479, 1.566, 1.653, 1.740, 1.830, 1.930, 2.043, 2.172, 2.322, 2.500, 2.650, 2.853, 2.964, 3.139, 3.314, 3.489, 3.664, 3.839, 4.013, 4.191, 4.363, 4.538, 4.889, 5.191};
177 
178  for(jet_iter = jets.begin(); jet_iter!= jets.end(); ++jet_iter){
179  njets++;
180 
181  //get Jet stats
182  float jet_pt = jet_iter->pt();
183  float jet_eta = jet_iter->eta();
184  float jet_phi = jet_iter->phi();
185 
186  //fill jet Pt and jet EMF
187  MEcontainer_["inclusive_jet_pt"]->Fill(jet_pt);
188  MEcontainer_["inclusive_jet_EMF"]->Fill(jet_iter->emEnergyFraction());
189 
190  // pick out up to the first 2 leading barrel jets
191  // for use in calculating dijet mass in barrel region
192  // also fill jet Pt histogram for barrel
193 
194  if(jet_eta <= 1.3){
195  MEcontainer_["inclusive_jet_pt_barrel"]->Fill(jet_pt);
196  if(nbarreljets == 0){
197  leadingbarreljet = jets[(njets-1)];
198  nbarreljets++;
199  }
200  else if(nbarreljets == 1){
201  secondbarreljet = jets[(njets-1)];
202  nbarreljets++;
203  }
204 
205  }
206 
207  // fill jet Pt for endcap and forward regions
208  else if(jet_eta <= 3.0 && jet_eta > 1.3){MEcontainer_["inclusive_jet_pt_endcap"]->Fill(jet_pt);}
209 
210  else if(jet_eta <= 5.0 && jet_eta > 3.0){MEcontainer_["inclusive_jet_pt_forward"]->Fill(jet_pt);}
211 
212 
213  // count jet multiplicity for jets with Pt > 30
214  if((jet_pt) > 30) njets30++;
215 
216  // check leading jet quantities
217  if(jet_pt > leading_jetpt){
218  leading_jetpt = jet_pt;
219  leading_jeteta = jet_eta;
220  }
221 
222  //fill eta-phi plot
223  for (int eit = 0; eit < 81; eit++){
224  for(int pit = 0; pit < 72; pit++){
225  float low_eta = etabins[eit];
226  float high_eta = etabins[eit+1];
227  float low_phi = (-M_PI) + pit*(M_PI/36);
228  float high_phi = low_phi + (M_PI/36);
229  if(jet_eta > low_eta && jet_eta < high_eta && jet_phi > low_phi && jet_phi < high_phi){
230  MEcontainer_["etaphi"]->Fill((eit - 41), jet_phi);}
231 
232 
233  }
234  }
235  }
236 
237  // after iterating over all jets, fill leading jet quantity histograms
238  // and jet multiplicity histograms
239 
240  MEcontainer_["leading_jet_pt"]->Fill(leading_jetpt);
241 
242  if(leading_jeteta <= 1.3){MEcontainer_["leading_jet_pt_barrel"]->Fill(leading_jetpt);}
243 
244  else if(leading_jeteta <= 3.0 && leading_jeteta > 1.3){MEcontainer_["leading_jet_pt_endcap"]->Fill(leading_jetpt);}
245 
246  else if(leading_jeteta <= 5.0 && leading_jeteta > 3.0){MEcontainer_["leading_jet_pt_forward"]->Fill(leading_jetpt);}
247 
248  MEcontainer_["njets"]->Fill(njets);
249 
250  MEcontainer_["njets30"]->Fill(njets30);
251 
252  // fill MET over Sum ET and Leading jet PT for all MET flavors
253  MEcontainer_["movers_met"]->Fill(movers(met));
254  MEcontainer_["moverl_met"]->Fill(movers(met), leading_jetpt);
255  MEcontainer_["movers_metho"]->Fill(movers(metHO));
256  MEcontainer_["moverl_metho"]->Fill(movers(metHO), leading_jetpt);
257  MEcontainer_["movers_metnohf"]->Fill(movers(metNoHF));
258  MEcontainer_["moverl_metnohf"]->Fill(movers(metNoHF), leading_jetpt);
259  MEcontainer_["movers_metnohfho"]->Fill(movers(metNoHFHO));
260  MEcontainer_["moverl_metnohfho"]->Fill(movers(metNoHFHO), leading_jetpt);
261 
262 
263  // fetch first 3 jet EMF
264 
265  if(jets.size() >= 1){
266  MEcontainer_["leading_jet_EMF"]->Fill(jets[0].emEnergyFraction());
267  if(jets.size() >=2){
268  MEcontainer_["second_jet_EMF"]->Fill(jets[1].emEnergyFraction());
269  if(jets.size() >= 3){
270  MEcontainer_["third_jet_EMF"]->Fill(jets[2].emEnergyFraction());
271  }
272  }
273  }
274 
275  // if 2 nontrivial barrel jets, reconstruct dijet mass
276 
277  if(nbarreljets == 2){
278  if(leadingbarreljet.energy() > 0 && secondbarreljet.energy() > 0){
279  math::XYZTLorentzVector DiJet = leadingbarreljet.p4() + secondbarreljet.p4();
280  float dijet_mass = DiJet.mass();
281  MEcontainer_["dijet_mass"]->Fill(dijet_mass);
282  }
283  }
284 
285 
286 }
edm::InputTag metLabel2_
Definition: QcdHighPtDQM.h:55
Jets made from CaloTowers.
Definition: CaloJet.h:30
edm::InputTag jetLabel_
Definition: QcdHighPtDQM.h:53
edm::InputTag metLabel1_
Definition: QcdHighPtDQM.h:54
tuple metNoHF
Definition: CaloMET_cfi.py:50
std::map< std::string, MonitorElement * > MEcontainer_
Definition: QcdHighPtDQM.h:60
Collection of Calo MET.
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:30
virtual double energy() const
energy
tuple metNoHFHO
Definition: CaloMET_cfi.py:62
edm::InputTag metLabel3_
Definition: QcdHighPtDQM.h:56
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:355
float movers(const reco::CaloMETCollection &metcollection)
#define M_PI
Definition: BFit3D.cc:3
edm::InputTag metLabel4_
Definition: QcdHighPtDQM.h:57
virtual double pt() const
transverse momentum
tuple metHO
Definition: CaloMET_cfi.py:30
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects
void QcdHighPtDQM::beginJob ( void  )
virtual

Inizialize parameters for histo binning.

Reimplemented from edm::EDAnalyzer.

Definition at line 51 of file QcdHighPtDQM.cc.

References DQMStore::book1D(), DQMStore::book2D(), M_PI, MEcontainer_, cmsCodeRules.cppFunctionSkipper::operator, DQMStore::setCurrentFolder(), and theDbe.

51  {
52 
54 
55  //Book MEs
56 
57  theDbe->setCurrentFolder("Physics/QcdHighPt");
58 
59  MEcontainer_["dijet_mass"] = theDbe->book1D("dijet_mass", "dijet resonance invariant mass, barrel region", 100, 0, 1000);
60  MEcontainer_["njets"] = theDbe->book1D("njets", "jet multiplicity", 10, 0, 10);
61  MEcontainer_["etaphi"] = theDbe->book2D("etaphi", "eta/phi distribution", 83, -42, 42, 72, -M_PI, M_PI);
62  MEcontainer_["njets30"] = theDbe->book1D("njets30", "jet multiplicity, pt > 30 GeV", 10, 0, 10);
63 
64  //book histograms for inclusive jet quantities
65  MEcontainer_["inclusive_jet_pt"] = theDbe->book1D("inclusive_jet_pt", "inclusive jet Pt spectrum", 100, 0, 1000);
66  MEcontainer_["inclusive_jet_pt_barrel"] = theDbe->book1D("inclusive_jet_pt_barrel", "inclusive jet Pt, eta < 1.3", 100, 0, 1000);
67  MEcontainer_["inclusive_jet_pt_forward"] = theDbe->book1D("inclusive_jet_pt_forward", "inclusive jet Pt, 3.0 < eta < 5.0", 100, 0, 1000);
68  MEcontainer_["inclusive_jet_pt_endcap"] = theDbe->book1D("inclusive_jet_pt_endcap", "inclusive jet Pt, 1.3 < eta < 3.0", 100, 0, 1000);
69 
70  //book histograms for leading jet quantities
71  MEcontainer_["leading_jet_pt"] = theDbe->book1D("leading_jet_pt", "leading jet Pt", 100, 0, 1000);
72  MEcontainer_["leading_jet_pt_barrel"] = theDbe->book1D("leading_jet_pt_barrel", "leading jet Pt, eta < 1.3", 100, 0, 1000);
73  MEcontainer_["leading_jet_pt_forward"] = theDbe->book1D("leading_jet_pt_forward", "leading jet Pt, 3.0 < eta < 5.0", 100, 0, 1000);
74  MEcontainer_["leading_jet_pt_endcap"] = theDbe->book1D("leading_jet_pt_endcap", "leading jet Pt, 1.3 < eta < 3.0", 100, 0, 1000);
75 
76  //book histograms for met over sum et and met over leading jet pt for various
77  //flavors of MET
78  MEcontainer_["movers_met"] = theDbe->book1D("movers_met", "MET over Sum ET for basic MET collection", 50, 0, 1);
79  MEcontainer_["moverl_met"] = theDbe->book1D("moverl_met", "MET over leading jet Pt for basic MET collection", 50, 0, 2);
80 
81  MEcontainer_["movers_metho"] = theDbe->book1D("movers_metho", "MET over Sum ET for MET HO collection", 50, 0, 1);
82  MEcontainer_["moverl_metho"] = theDbe->book1D("moverl_metho", "MET over leading jet Pt for MET HO collection", 50, 0, 2);
83 
84  MEcontainer_["movers_metnohf"] = theDbe->book1D("movers_metnohf", "MET over Sum ET for MET no HF collection", 50, 0, 1);
85  MEcontainer_["moverl_metnohf"] = theDbe->book1D("moverl_metnohf", "MET over leading jet Pt for MET no HF collection", 50, 0, 2);
86 
87  MEcontainer_["movers_metnohfho"] = theDbe->book1D("movers_metnohfho", "MET over Sum ET for MET no HF HO collection", 50, 0, 1);
88  MEcontainer_["moverl_metnohfho"] = theDbe->book1D("moverl_metnohfho", "MET over leading jet Pt for MET no HF HO collection", 50, 0, 2);
89 
90  //book histograms for EMF fraction for all jets and first 3 jets
91  MEcontainer_["inclusive_jet_EMF"] = theDbe->book1D("inclusive_jet_EMF", "inclusive jet EMF", 50, -1, 1);
92  MEcontainer_["leading_jet_EMF"] = theDbe->book1D("leading_jet_EMF", "leading jet EMF", 50, -1, 1);
93  MEcontainer_["second_jet_EMF"] = theDbe->book1D("second_jet_EMF", "second jet EMF", 50, -1, 1);
94  MEcontainer_["third_jet_EMF"] = theDbe->book1D("third_jet_EMF", "third jet EMF", 50, -1, 1);
95 
96 
97 
98 
99 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:514
DQMStore * theDbe
Definition: QcdHighPtDQM.h:50
std::map< std::string, MonitorElement * > MEcontainer_
Definition: QcdHighPtDQM.h:60
#define M_PI
Definition: BFit3D.cc:3
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:642
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:232
void QcdHighPtDQM::endJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 101 of file QcdHighPtDQM.cc.

101  {
102 
103 }
float QcdHighPtDQM::moverl ( const reco::CaloMETCollection metcollection,
float &  ljpt 
)
private

Definition at line 123 of file QcdHighPtDQM.cc.

References CaloMET_cfi::met, and mathSSE::sqrt().

123  {
124  float metoverl = 0;
125  CaloMETCollection::const_iterator met_iter;
126  for(met_iter = metcollection.begin(); met_iter!= metcollection.end(); ++met_iter)
127  {
128  float mex = met_iter->momentum().x();
129  float mey = met_iter->momentum().y();
130  float met = sqrt(mex*mex+mey*mey);
131  metoverl = (met / ljpt);
132  }
133  return metoverl;
134 }
T sqrt(T t)
Definition: SSEVec.h:28
float QcdHighPtDQM::movers ( const reco::CaloMETCollection metcollection)
private

Definition at line 106 of file QcdHighPtDQM.cc.

References CaloMET_cfi::met, and mathSSE::sqrt().

Referenced by analyze().

106  {
107 
108  float metovers = 0;
109  CaloMETCollection::const_iterator met_iter;
110  for(met_iter = metcollection.begin(); met_iter!= metcollection.end(); ++met_iter)
111  {
112  float mex = met_iter->momentum().x();
113  float mey = met_iter->momentum().y();
114  float met = sqrt(mex*mex+mey*mey);
115  float sumet = met_iter->sumEt();
116  metovers = (met / sumet);
117  }
118  return metovers;
119 }
T sqrt(T t)
Definition: SSEVec.h:28

Member Data Documentation

edm::InputTag QcdHighPtDQM::jetLabel_
private

Definition at line 53 of file QcdHighPtDQM.h.

Referenced by analyze().

std::map<std::string, MonitorElement*> QcdHighPtDQM::MEcontainer_
private

Definition at line 60 of file QcdHighPtDQM.h.

Referenced by analyze(), and beginJob().

edm::InputTag QcdHighPtDQM::metLabel1_
private

Definition at line 54 of file QcdHighPtDQM.h.

Referenced by analyze().

edm::InputTag QcdHighPtDQM::metLabel2_
private

Definition at line 55 of file QcdHighPtDQM.h.

Referenced by analyze().

edm::InputTag QcdHighPtDQM::metLabel3_
private

Definition at line 56 of file QcdHighPtDQM.h.

Referenced by analyze().

edm::InputTag QcdHighPtDQM::metLabel4_
private

Definition at line 57 of file QcdHighPtDQM.h.

Referenced by analyze().

DQMStore* QcdHighPtDQM::theDbe
private

Definition at line 50 of file QcdHighPtDQM.h.

Referenced by beginJob().