CMS 3D CMS Logo

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

#include <Analyzer_minbias.h>

Inheritance diagram for cms::Analyzer_minbias:
edm::EDAnalyzer edm::EDConsumerBase

Classes

struct  myInfo
 

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
 Analyzer_minbias (const edm::ParameterSet &)
 
virtual void beginJob ()
 
virtual void beginRun (const edm::Run &r, const edm::EventSetup &iSetup)
 
virtual void endJob ()
 
virtual void endRun (const edm::Run &r, const edm::EventSetup &iSetup)
 
 ~Analyzer_minbias ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

int cells
 
int depth
 
float eta
 
std::string fOutputFileName
 
std::string hcalfile_
 
TFile * hOutputFile
 
int ieta
 
int iphi
 
float mom0_Diff
 
float mom0_MB
 
float mom0_Noise
 
float mom1_Diff
 
float mom1_MB
 
float mom1_Noise
 
float mom2_Diff
 
float mom2_MB
 
float mom2_Noise
 
float mom3_Diff
 
float mom3_MB
 
float mom3_Noise
 
float mom4_Diff
 
float mom4_MB
 
float mom4_Noise
 
int mydet
 
std::map< std::pair< int,
HcalDetId >, myInfo
myMap
 
std::ofstream * myout_hcal
 
int mysubd
 
TTree * myTree
 
float occup
 
float phi
 
double rnnum
 
double rnnumber
 
bool theRecalib
 
edm::EDGetTokenT
< HBHERecHitCollection
tok_hbheNormal_
 
edm::EDGetTokenT
< HBHERecHitCollection
tok_hbherecoMB_
 
edm::EDGetTokenT
< HBHERecHitCollection
tok_hbherecoNoise_
 
edm::EDGetTokenT
< HFRecHitCollection
tok_hfrecoMB_
 
edm::EDGetTokenT
< HFRecHitCollection
tok_hfrecoNoise_
 
edm::EDGetTokenT
< L1GlobalTriggerObjectMapRecord
tok_hltL1GtMap_
 
edm::EDGetTokenT
< HORecHitCollection
tok_horecoMB_
 
edm::EDGetTokenT
< HORecHitCollection
tok_horecoNoise_
 
int trigbit
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 51 of file Analyzer_minbias.h.

Constructor & Destructor Documentation

cms::Analyzer_minbias::Analyzer_minbias ( const edm::ParameterSet iConfig)
explicit

Definition at line 38 of file Analyzer_minbias.cc.

References fOutputFileName, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), HLT_25ns14e33_v1_cff::InputTag, AlCaHLTBitMon_QueryRunRegistry::string, theRecalib, tok_hbheNormal_, tok_hbherecoMB_, tok_hbherecoNoise_, tok_hfrecoMB_, tok_hfrecoNoise_, tok_hltL1GtMap_, tok_horecoMB_, and tok_horecoNoise_.

38  {
39  // get name of output file with histogramms
40 
41  fOutputFileName = iConfig.getUntrackedParameter<std::string>("HistOutFile");
42 
43  // get token names of modules, producing object collections
44  tok_hbherecoMB_ = consumes<HBHERecHitCollection>(iConfig.getParameter<edm::InputTag>("hbheInputMB"));
45  tok_horecoMB_ = consumes<HORecHitCollection>(iConfig.getParameter<edm::InputTag>("hoInputMB"));
46  tok_hfrecoMB_ = consumes<HFRecHitCollection>(iConfig.getParameter<edm::InputTag>("hfInputMB"));
47 
48  tok_hbherecoNoise_= consumes<HBHERecHitCollection>(iConfig.getParameter<edm::InputTag>("hbheInputNoise"));
49  tok_horecoNoise_ = consumes<HORecHitCollection>(iConfig.getParameter<edm::InputTag>("hoInputNoise"));
50  tok_hfrecoNoise_ = consumes<HFRecHitCollection>(iConfig.getParameter<edm::InputTag>("hfInputNoise"));
51 
52  theRecalib = iConfig.getParameter<bool>("Recalib");
53 
54  tok_hbheNormal_ = consumes<HBHERecHitCollection>(edm::InputTag("hbhereco"));
55  tok_hltL1GtMap_ = consumes<L1GlobalTriggerObjectMapRecord>(edm::InputTag("hltL1GtObjectMap"));
56  }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< HORecHitCollection > tok_horecoNoise_
edm::EDGetTokenT< HORecHitCollection > tok_horecoMB_
edm::EDGetTokenT< HFRecHitCollection > tok_hfrecoNoise_
edm::EDGetTokenT< HBHERecHitCollection > tok_hbheNormal_
edm::EDGetTokenT< L1GlobalTriggerObjectMapRecord > tok_hltL1GtMap_
edm::EDGetTokenT< HFRecHitCollection > tok_hfrecoMB_
edm::EDGetTokenT< HBHERecHitCollection > tok_hbherecoMB_
edm::EDGetTokenT< HBHERecHitCollection > tok_hbherecoNoise_
cms::Analyzer_minbias::~Analyzer_minbias ( )

Definition at line 58 of file Analyzer_minbias.cc.

58 { }

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 160 of file Analyzer_minbias.cc.

References edm::SortedCollection< T, SORT >::begin(), edm::SortedCollection< T, SORT >::end(), CaloRecHit::energy(), edm::EventSetup::get(), edm::Event::getByToken(), HcalRespCorr::getValue(), HcalCondObjectContainer< Item >::getValues(), cuy::ii, info(), edm::HandleBase::isValid(), LogDebug, myMap, convertSQLiteXML::ok, edm::Handle< T >::product(), edm::ESHandle< class >::product(), DetId::rawId(), mathSSE::return(), rnnum, edm::Event::run(), edm::SortedCollection< T, SORT >::size(), AlCaHLTBitMon_QueryRunRegistry::string, cms::Analyzer_minbias::myInfo::theNS0, theRecalib, tok_hbheNormal_, tok_hbherecoMB_, tok_hbherecoNoise_, tok_hfrecoMB_, tok_hfrecoNoise_, and tok_hltL1GtMap_.

160  {
161 
162  rnnum = (float)iEvent.run();
163  const HcalRespCorrs* myRecalib=0;
164  if (theRecalib ) {
165  edm::ESHandle <HcalRespCorrs> recalibCorrs;
166  iSetup.get<HcalRespCorrsRcd>().get("recalibrate",recalibCorrs);
167  myRecalib = recalibCorrs.product();
168  } // theRecalib
169 
170  // Noise part for HB HE
171 
172  std::map<std::pair<int,HcalDetId>,myInfo> tmpMap;
173  tmpMap.clear();
174 
176  iEvent.getByToken(tok_hbheNormal_, hbheNormal);
177  if (!hbheNormal.isValid()) {
178  edm::LogInfo("AnalyzerMB") << " hbheNormal failed";
179  } else {
180  LogDebug("AnalyzerMB") << " The size of the normal collection "
181  << hbheNormal->size();
182  }
184  iEvent.getByToken(tok_hbherecoNoise_, hbheNS);
185  if (!hbheNS.isValid()) {
186  edm::LogInfo("AnalyzerMB") << "HcalCalibAlgos: Error! can't get hbhe product!";
187  return ;
188  }
189 
190  const HBHERecHitCollection HithbheNS = *(hbheNS.product());
191  LogDebug("AnalyzerMB") << "HBHE NS size of collection " << HithbheNS.size();
192  if (HithbheNS.size() < 5100) {
193  edm::LogInfo("AnalyzerMB") << "HBHE problem " << rnnum << " size "
194  << HithbheNS.size();
195  return;
196  }
197 
199  iEvent.getByToken(tok_hbherecoMB_, hbheMB);
200 
201  if (!hbheMB.isValid()) {
202  edm::LogInfo("AnalyzerMB") << "HcalCalibAlgos: Error! can't get hbhe product!";
203  return ;
204  }
205 
206  const HBHERecHitCollection HithbheMB = *(hbheMB.product());
207  LogDebug("AnalyzerMB") << "HBHE MB size of collection " << HithbheMB.size();
208  if(HithbheMB.size() < 5100) {
209  edm::LogInfo("AnalyzerMB") << "HBHE problem " << rnnum << " size "
210  << HithbheMB.size();
211  return;
212  }
213 
215  iEvent.getByToken(tok_hfrecoNoise_, hfNS);
216 
217  if (!hfNS.isValid()) {
218  edm::LogInfo("AnalyzerMB") << "HcalCalibAlgos: Error! can't get hbhe product!";
219  return ;
220  }
221 
222  const HFRecHitCollection HithfNS = *(hfNS.product());
223  LogDebug("AnalyzerMB") << "HF NS size of collection "<< HithfNS.size();
224  if (HithfNS.size() < 1700) {
225  edm::LogInfo("AnalyzerMB") << "HF problem " << rnnum << " size "
226  << HithfNS.size();
227  return;
228  }
229 
231  iEvent.getByToken(tok_hfrecoMB_, hfMB);
232 
233  if (!hfMB.isValid()) {
234  edm::LogInfo("AnalyzerMB") << "HcalCalibAlgos: Error! can't get hbhe product!";
235  return ;
236  }
237 
238  const HFRecHitCollection HithfMB = *(hfMB.product());
239  LogDebug("AnalyzerMB") << "HF MB size of collection " << HithfMB.size();
240  if(HithfMB.size() < 1700) {
241  edm::LogInfo("AnalyzerMB") << "HF problem " << rnnum << " size "
242  <<HithfMB.size();
243  return;
244  }
245 
247  iEvent.getByToken(tok_hltL1GtMap_, gtObjectMapRecord);
248 
249  if (gtObjectMapRecord.isValid()) {
250  const std::vector<L1GlobalTriggerObjectMap>& objMapVec = gtObjectMapRecord->gtObjectMap();
251  int ii(0);
252  bool ok(false);
253  for (std::vector<L1GlobalTriggerObjectMap>::const_iterator itMap = objMapVec.begin();
254  itMap != objMapVec.end(); ++itMap, ++ii) {
255  float algoBit = (*itMap).algoBitNumber();
256  bool resultGt = (*itMap).algoGtlResult();
257  std::string algoNameStr = (*itMap).algoName();
258 
259  if (resultGt == 1) {
260  ok = true;
261  for(HBHERecHitCollection::const_iterator hbheItr=HithbheNS.begin(); hbheItr!=HithbheNS.end(); hbheItr++) {
262 
263  // Recalibration of energy
264  float icalconst=1.;
265  DetId mydetid = hbheItr->id().rawId();
266  if( theRecalib ) icalconst=myRecalib->getValues(mydetid)->getValue();
267 
268  HBHERecHit aHit(hbheItr->id(),hbheItr->energy()*icalconst,hbheItr->time());
269 
270  double energyhit = aHit.energy();
271 
272  DetId id = (*hbheItr).detid();
273  HcalDetId hid=HcalDetId(id);
274  std::map<std::pair<int,HcalDetId>,myInfo>::iterator itr1 = myMap.find(std::pair<int,HcalDetId>(algoBit,hid));
275  if (itr1 == myMap.end()) {
276  myInfo info;
277  myMap[std::pair<int,HcalDetId>(algoBit,hid)] = info;
278  itr1 = myMap.find(std::pair<int,HcalDetId>(algoBit,hid));
279  }
280  itr1->second.theNS0++;
281  itr1->second.theNS1 += energyhit;
282  itr1->second.theNS2 += (energyhit*energyhit);
283  itr1->second.theNS4 += (energyhit*energyhit*energyhit*energyhit);
284  itr1->second.runcheck = rnnum;
285 
286  std::map<std::pair<int,HcalDetId>,myInfo>::iterator itr2 = tmpMap.find(std::pair<int,HcalDetId>(algoBit,hid));
287  if (itr2 == tmpMap.end()) {
288  myInfo info;
289  tmpMap[std::pair<int,HcalDetId>(algoBit,hid)] = info;
290  itr2 = tmpMap.find(std::pair<int,HcalDetId>(algoBit,hid));
291  }
292  itr2->second.theNS0++;
293  itr2->second.theNS1 += energyhit;
294  itr2->second.theNS2 += (energyhit*energyhit);
295  itr2->second.theNS4 += (energyhit*energyhit*energyhit*energyhit);
296  itr2->second.runcheck = rnnum;
297 
298  } // HBHE_NS
299 
300  // Signal part for HB HE
301 
302  for (HBHERecHitCollection::const_iterator hbheItr=HithbheMB.begin(); hbheItr!=HithbheMB.end(); hbheItr++) {
303  // Recalibration of energy
304  float icalconst=1.;
305  DetId mydetid = hbheItr->id().rawId();
306  if( theRecalib ) icalconst=myRecalib->getValues(mydetid)->getValue();
307 
308  HBHERecHit aHit(hbheItr->id(),hbheItr->energy()*icalconst,hbheItr->time());
309  double energyhit = aHit.energy();
310 
311  DetId id = (*hbheItr).detid();
312  HcalDetId hid=HcalDetId(id);
313 
314  std::map<std::pair<int,HcalDetId>,myInfo>::iterator itr1 = myMap.find(std::pair<int,HcalDetId>(algoBit,hid));
315  std::map<std::pair<int,HcalDetId>,myInfo>::iterator itr2 = tmpMap.find(std::pair<int,HcalDetId>(algoBit,hid));
316 
317  if (itr1 == myMap.end()) {
318  myInfo info;
319  myMap[std::pair<int,HcalDetId>(algoBit,hid)] = info;
320  itr1 = myMap.find(std::pair<int,HcalDetId>(algoBit,hid));
321  }
322  itr1->second.theMB0++;
323  itr1->second.theDif0 = 0;
324  itr1->second.theMB1 += energyhit;
325  itr1->second.theMB2 += (energyhit*energyhit);
326  itr1->second.theMB3 += (energyhit*energyhit*energyhit);
327  itr1->second.theMB4 += (energyhit*energyhit*energyhit*energyhit);
328  itr1->second.runcheck = rnnum;
329  float mydiff = 0.0;
330  if (itr2 !=tmpMap.end()) {
331  mydiff = energyhit - (itr2->second.theNS1);
332  itr1->second.theDif0++;
333  itr1->second.theDif1 += mydiff;
334  itr1->second.theDif2 += (mydiff*mydiff);
335  }
336  } // HBHE_MB
337 
338  // HF
339 
340  for (HFRecHitCollection::const_iterator hbheItr=HithfNS.begin(); hbheItr!=HithfNS.end(); hbheItr++) {
341  // Recalibration of energy
342  float icalconst=1.;
343  DetId mydetid = hbheItr->id().rawId();
344  if( theRecalib ) icalconst=myRecalib->getValues(mydetid)->getValue();
345 
346  HFRecHit aHit(hbheItr->id(),hbheItr->energy()*icalconst,hbheItr->time());
347  double energyhit = aHit.energy();
348  // Remove PMT hits
349  if(fabs(energyhit) > 40. ) continue;
350 
351  DetId id = (*hbheItr).detid();
352  HcalDetId hid=HcalDetId(id);
353 
354  std::map<std::pair<int,HcalDetId>,myInfo>::iterator itr1 = myMap.find(std::pair<int,HcalDetId>(algoBit,hid));
355 
356  if (itr1 == myMap.end()) {
357  myInfo info;
358  myMap[std::pair<int,HcalDetId>(algoBit,hid)] = info;
359  itr1 = myMap.find(std::pair<int,HcalDetId>(algoBit,hid));
360  }
361  itr1->second.theNS0++;
362  itr1->second.theNS1 += energyhit;
363  itr1->second.theNS2 += (energyhit*energyhit);
364  itr1->second.theNS4 += (energyhit*energyhit*energyhit*energyhit);
365  itr1->second.runcheck = rnnum;
366 
367  std::map<std::pair<int,HcalDetId>,myInfo>::iterator itr2 = tmpMap.find(std::pair<int,HcalDetId>(algoBit,hid));
368  if (itr2 == tmpMap.end()) {
369  myInfo info;
370  tmpMap[std::pair<int,HcalDetId>(algoBit,hid)] = info;
371  itr2 = tmpMap.find(std::pair<int,HcalDetId>(algoBit,hid));
372  }
373  itr2->second.theNS0++;
374  itr2->second.theNS1 += energyhit;
375  itr2->second.theNS2 += (energyhit*energyhit);
376  itr2->second.theNS4 += (energyhit*energyhit*energyhit*energyhit);
377  itr2->second.runcheck = rnnum;
378 
379  } // HF_NS
380 
381 
382  // Signal part for HF
383 
384  for (HFRecHitCollection::const_iterator hbheItr=HithfMB.begin(); hbheItr!=HithfMB.end(); hbheItr++) {
385  // Recalibration of energy
386  float icalconst=1.;
387  DetId mydetid = hbheItr->id().rawId();
388  if( theRecalib ) icalconst=myRecalib->getValues(mydetid)->getValue();
389  HFRecHit aHit(hbheItr->id(),hbheItr->energy()*icalconst,hbheItr->time());
390 
391  double energyhit = aHit.energy();
392  // Remove PMT hits
393  if(fabs(energyhit) > 40. ) continue;
394 
395  DetId id = (*hbheItr).detid();
396  HcalDetId hid=HcalDetId(id);
397 
398  std::map<std::pair<int,HcalDetId>,myInfo>::iterator itr1 = myMap.find(std::pair<int,HcalDetId>(algoBit,hid));
399  std::map<std::pair<int,HcalDetId>,myInfo>::iterator itr2 = tmpMap.find(std::pair<int,HcalDetId>(algoBit,hid));
400 
401  if (itr1 == myMap.end()) {
402  myInfo info;
403  myMap[std::pair<int,HcalDetId>(algoBit,hid)] = info;
404  itr1 = myMap.find(std::pair<int,HcalDetId>(algoBit,hid));
405  }
406  itr1->second.theMB0++;
407  itr1->second.theDif0 = 0;
408  itr1->second.theMB1 += energyhit;
409  itr1->second.theMB2 += (energyhit*energyhit);
410  itr1->second.theMB3 += (energyhit*energyhit*energyhit);
411  itr1->second.theMB4 += (energyhit*energyhit*energyhit*energyhit);
412  itr1->second.runcheck = rnnum;
413  float mydiff = 0.0;
414  if (itr2 !=tmpMap.end()) {
415  mydiff = energyhit - (itr2->second.theNS1);
416  itr1->second.theDif0++;
417  itr1->second.theDif1 += mydiff;
418  itr1->second.theDif2 += (mydiff*mydiff);
419  }
420  }
421  }
422  }
423  if (!ok) LogDebug("AnalyzerMB") << "No passed L1 Triggers";
424  }
425  }
#define LogDebug(id)
static const TGPicture * info(bool iBackgroundIsBlack)
std::map< std::pair< int, HcalDetId >, myInfo > myMap
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:449
std::vector< HBHERecHit >::const_iterator const_iterator
const Item * getValues(DetId fId, bool throwOnFail=true) const
int ii
Definition: cuy.py:588
return((rh^lh)&mask)
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
float energy() const
Definition: CaloRecHit.h:17
RunNumber_t run() const
Definition: Event.h:85
bool isValid() const
Definition: HandleBase.h:75
const_iterator end() const
Definition: DetId.h:18
T const * product() const
Definition: Handle.h:81
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:86
edm::EDGetTokenT< HFRecHitCollection > tok_hfrecoNoise_
float getValue() const
Definition: HcalRespCorr.h:20
size_type size() const
edm::EDGetTokenT< HBHERecHitCollection > tok_hbheNormal_
edm::EDGetTokenT< L1GlobalTriggerObjectMapRecord > tok_hltL1GtMap_
edm::EDGetTokenT< HFRecHitCollection > tok_hfrecoMB_
edm::EDGetTokenT< HBHERecHitCollection > tok_hbherecoMB_
const_iterator begin() const
edm::EDGetTokenT< HBHERecHitCollection > tok_hbherecoNoise_
void cms::Analyzer_minbias::beginJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 64 of file Analyzer_minbias.cc.

References cells, depth, eta, fOutputFileName, hOutputFile, ieta, iphi, mom0_Diff, mom0_MB, mom0_Noise, mom1_Diff, mom1_MB, mom1_Noise, mom2_Diff, mom2_MB, mom2_Noise, mom3_MB, mom4_MB, mom4_Noise, mydet, myMap, mysubd, myTree, occup, phi, mathSSE::return(), rnnumber, and trigbit.

64  {
65 
66  hOutputFile = new TFile( fOutputFileName.c_str(), "RECREATE" ) ;
67 
68  myTree = new TTree("RecJet","RecJet Tree");
69  myTree->Branch("mydet", &mydet, "mydet/I");
70  myTree->Branch("mysubd", &mysubd, "mysubd/I");
71  myTree->Branch("cells", &cells, "cells");
72  myTree->Branch("depth", &depth, "depth/I");
73  myTree->Branch("ieta", &ieta, "ieta/I");
74  myTree->Branch("iphi", &iphi, "iphi/I");
75  myTree->Branch("eta", &eta, "eta/F");
76  myTree->Branch("phi", &phi, "phi/F");
77  myTree->Branch("mom0_MB", &mom0_MB, "mom0_MB/F");
78  myTree->Branch("mom1_MB", &mom1_MB, "mom1_MB/F");
79  myTree->Branch("mom2_MB", &mom2_MB, "mom2_MB/F");
80  myTree->Branch("mom3_MB", &mom3_MB, "mom3_MB/F");
81  myTree->Branch("mom4_MB", &mom4_MB, "mom4_MB/F");
82  myTree->Branch("mom0_Noise", &mom0_Noise, "mom0_Noise/F");
83  myTree->Branch("mom1_Noise", &mom1_Noise, "mom1_Noise/F");
84  myTree->Branch("mom2_Noise", &mom2_Noise, "mom2_Noise/F");
85  myTree->Branch("mom3_Noise", &mom2_Noise, "mom3_Noise/F");
86  myTree->Branch("mom4_Noise", &mom4_Noise, "mom4_Noise/F");
87  myTree->Branch("mom0_Diff", &mom0_Diff, "mom0_Diff/F");
88  myTree->Branch("mom1_Diff", &mom1_Diff, "mom1_Diff/F");
89  myTree->Branch("mom2_Diff", &mom2_Diff, "mom2_Diff/F");
90  myTree->Branch("occup", &occup, "occup/F");
91  myTree->Branch("trigbit", &trigbit, "trigbit/I");
92  myTree->Branch("rnnumber", &rnnumber, "rnnumber/D");
93 
94  myMap.clear();
95  return ;
96  }
std::map< std::pair< int, HcalDetId >, myInfo > myMap
return((rh^lh)&mask)
void cms::Analyzer_minbias::beginRun ( const edm::Run r,
const edm::EventSetup iSetup 
)
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 60 of file Analyzer_minbias.cc.

60 { }
void cms::Analyzer_minbias::endJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 100 of file Analyzer_minbias.cc.

References cells, depth, h, hOutputFile, i, ieta, cuy::ii, info(), iphi, j, relval_steps::k, prof2calltree::l, LogDebug, python.multivaluedict::map(), mom0_Diff, mom0_MB, mom0_Noise, mom1_Diff, mom1_MB, mom1_Noise, mom2_Diff, mom2_MB, mom2_Noise, mom3_MB, mom3_Noise, mom4_MB, mom4_Noise, myMap, mysubd, myTree, mathSSE::return(), rnnumber, cms::Analyzer_minbias::myInfo::runcheck, cms::Analyzer_minbias::myInfo::theDif0, cms::Analyzer_minbias::myInfo::theDif1, cms::Analyzer_minbias::myInfo::theDif2, cms::Analyzer_minbias::myInfo::theMB0, cms::Analyzer_minbias::myInfo::theMB1, cms::Analyzer_minbias::myInfo::theMB2, cms::Analyzer_minbias::myInfo::theMB3, cms::Analyzer_minbias::myInfo::theMB4, cms::Analyzer_minbias::myInfo::theNS0, cms::Analyzer_minbias::myInfo::theNS1, cms::Analyzer_minbias::myInfo::theNS2, cms::Analyzer_minbias::myInfo::theNS3, cms::Analyzer_minbias::myInfo::theNS4, and trigbit.

100  {
101 
102  int ii=0;
103  for (std::map<std::pair<int,HcalDetId>,myInfo>::const_iterator itr=myMap.begin(); itr != myMap.end(); ++itr) {
104  int h = itr->first.first;
105  LogDebug("AnalyzerMB") << "Fired trigger bit number " << h;
106  int i = itr->first.second.subdet();
107  int j = itr->first.second.depth();
108  int k = itr->first.second.iphi();
109  int l = itr->first.second.ieta();
110  myInfo info = itr->second;
111  if (info.theMB0 > 0) {
112  mom0_MB = info.theMB0;
113  mom1_MB = info.theMB1;
114  mom2_MB = info.theMB2;
115  mom3_MB = info.theMB3;
116  mom4_MB = info.theMB4;
117  mom0_Noise = info.theNS0;
118  mom1_Noise = info.theNS1;
119  mom2_Noise = info.theNS2;
120  mom3_Noise = info.theNS3;
121  mom4_Noise = info.theNS4;
122  mom0_Diff = info.theDif0;
123  mom1_Diff = info.theDif1;
124  mom2_Diff = info.theDif2;
125  rnnumber = info.runcheck;
126  trigbit= h;
127  mysubd = i;
128  depth = j;
129  ieta = l;
130  iphi = k;
131 
132  LogDebug("AnalyzerMB") << " Result= " << trigbit << " " << mysubd
133  << " " << ieta << " " << iphi << " mom0 "
134  << mom0_MB << " mom1 " << mom1_MB << " mom2 "
135  << mom2_MB << " mom3 " << mom3_MB << " mom4 "
136  << mom4_MB << " mom0_Noise " << mom0_Noise
137  << " mom1_Noise " << mom1_Noise << " mom2_Noise "
138  << mom2_Noise << " mom3_Noise " << mom3_Noise
139  << " mom4_Noise " << mom4_Noise << " mom0_Diff "
140  << mom0_Diff << " mom1_Diff " << mom1_Diff
141  << " mom2_Diff " << mom2_Diff;
142  myTree->Fill();
143  ii++;
144  }
145  }
146  cells=ii;
147  LogDebug("AnalyzerMB") << "cells" << " " << cells;
148  hOutputFile->Write();
149  hOutputFile->cd();
150  myTree->Write();
151  hOutputFile->Close() ;
152  return ;
153  }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
static const TGPicture * info(bool iBackgroundIsBlack)
std::map< std::pair< int, HcalDetId >, myInfo > myMap
int ii
Definition: cuy.py:588
return((rh^lh)&mask)
int j
Definition: DBlmapReader.cc:9
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
void cms::Analyzer_minbias::endRun ( const edm::Run r,
const edm::EventSetup iSetup 
)
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 62 of file Analyzer_minbias.cc.

62 { }

Member Data Documentation

int cms::Analyzer_minbias::cells
private

Definition at line 72 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

int cms::Analyzer_minbias::depth
private
float cms::Analyzer_minbias::eta
private
std::string cms::Analyzer_minbias::fOutputFileName
private

Definition at line 64 of file Analyzer_minbias.h.

Referenced by Analyzer_minbias(), and beginJob().

std::string cms::Analyzer_minbias::hcalfile_
private

Definition at line 65 of file Analyzer_minbias.h.

TFile* cms::Analyzer_minbias::hOutputFile
private

Definition at line 67 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

int cms::Analyzer_minbias::ieta
private

Definition at line 72 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

int cms::Analyzer_minbias::iphi
private

Definition at line 72 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

float cms::Analyzer_minbias::mom0_Diff
private

Definition at line 76 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

float cms::Analyzer_minbias::mom0_MB
private

Definition at line 74 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

float cms::Analyzer_minbias::mom0_Noise
private

Definition at line 75 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

float cms::Analyzer_minbias::mom1_Diff
private

Definition at line 76 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

float cms::Analyzer_minbias::mom1_MB
private

Definition at line 74 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

float cms::Analyzer_minbias::mom1_Noise
private

Definition at line 75 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

float cms::Analyzer_minbias::mom2_Diff
private

Definition at line 76 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

float cms::Analyzer_minbias::mom2_MB
private

Definition at line 74 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

float cms::Analyzer_minbias::mom2_Noise
private

Definition at line 75 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

float cms::Analyzer_minbias::mom3_Diff
private

Definition at line 76 of file Analyzer_minbias.h.

float cms::Analyzer_minbias::mom3_MB
private

Definition at line 74 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

float cms::Analyzer_minbias::mom3_Noise
private

Definition at line 75 of file Analyzer_minbias.h.

Referenced by endJob().

float cms::Analyzer_minbias::mom4_Diff
private

Definition at line 76 of file Analyzer_minbias.h.

float cms::Analyzer_minbias::mom4_MB
private

Definition at line 74 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

float cms::Analyzer_minbias::mom4_Noise
private

Definition at line 75 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

int cms::Analyzer_minbias::mydet
private

Definition at line 72 of file Analyzer_minbias.h.

Referenced by beginJob().

std::map<std::pair<int,HcalDetId>,myInfo> cms::Analyzer_minbias::myMap
private

Definition at line 87 of file Analyzer_minbias.h.

Referenced by analyze(), beginJob(), and endJob().

std::ofstream* cms::Analyzer_minbias::myout_hcal
private

Definition at line 66 of file Analyzer_minbias.h.

int cms::Analyzer_minbias::mysubd
private

Definition at line 72 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

TTree* cms::Analyzer_minbias::myTree
private

Definition at line 68 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

float cms::Analyzer_minbias::occup
private

Definition at line 74 of file Analyzer_minbias.h.

Referenced by beginJob().

float cms::Analyzer_minbias::phi
private

Definition at line 73 of file Analyzer_minbias.h.

Referenced by Particle.Particle::__str__(), and beginJob().

double cms::Analyzer_minbias::rnnum
private

Definition at line 71 of file Analyzer_minbias.h.

Referenced by analyze().

double cms::Analyzer_minbias::rnnumber
private

Definition at line 71 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

bool cms::Analyzer_minbias::theRecalib
private

Definition at line 91 of file Analyzer_minbias.h.

Referenced by analyze(), and Analyzer_minbias().

edm::EDGetTokenT<HBHERecHitCollection> cms::Analyzer_minbias::tok_hbheNormal_
private

Definition at line 92 of file Analyzer_minbias.h.

Referenced by analyze(), and Analyzer_minbias().

edm::EDGetTokenT<HBHERecHitCollection> cms::Analyzer_minbias::tok_hbherecoMB_
private

Definition at line 88 of file Analyzer_minbias.h.

Referenced by analyze(), and Analyzer_minbias().

edm::EDGetTokenT<HBHERecHitCollection> cms::Analyzer_minbias::tok_hbherecoNoise_
private

Definition at line 88 of file Analyzer_minbias.h.

Referenced by analyze(), and Analyzer_minbias().

edm::EDGetTokenT<HFRecHitCollection> cms::Analyzer_minbias::tok_hfrecoMB_
private

Definition at line 89 of file Analyzer_minbias.h.

Referenced by analyze(), and Analyzer_minbias().

edm::EDGetTokenT<HFRecHitCollection> cms::Analyzer_minbias::tok_hfrecoNoise_
private

Definition at line 89 of file Analyzer_minbias.h.

Referenced by analyze(), and Analyzer_minbias().

edm::EDGetTokenT<L1GlobalTriggerObjectMapRecord> cms::Analyzer_minbias::tok_hltL1GtMap_
private

Definition at line 93 of file Analyzer_minbias.h.

Referenced by analyze(), and Analyzer_minbias().

edm::EDGetTokenT<HORecHitCollection> cms::Analyzer_minbias::tok_horecoMB_
private

Definition at line 90 of file Analyzer_minbias.h.

Referenced by Analyzer_minbias().

edm::EDGetTokenT<HORecHitCollection> cms::Analyzer_minbias::tok_horecoNoise_
private

Definition at line 90 of file Analyzer_minbias.h.

Referenced by Analyzer_minbias().

int cms::Analyzer_minbias::trigbit
private

Definition at line 72 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().