test
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 Attributes
cms::Analyzer_minbias Class Reference

#include <Analyzer_minbias.h>

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

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 (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &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 depth
 
float eta
 
std::string fOutputFileName
 
TH1F * hbheNoiseE
 
TH1F * hbheSignalE
 
std::string hcalfile_
 
TH1F * hCalo1 [73][43]
 
TH1F * hCalo1mom2 [73][43]
 
TH1F * hCalo2 [73][43]
 
TH1F * hCalo2mom2 [73][43]
 
TH1F * hfNoiseE
 
TH1F * hfSignalE
 
TH2F * hHBHEsize_vs_run
 
TH2F * hHFsize_vs_run
 
TFile * hOutputFile
 
int ieta
 
int iphi
 
double meannoise_min [73][43]
 
double meannoise_pl [73][43]
 
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::ofstream * myout_hcal
 
int mysubd
 
TTree * myTree
 
double nevent
 
int nevent_run
 
double noise_min [73][43]
 
double noise_pl [73][43]
 
float occup
 
float phi
 
double theDFFillDetMapMin0 [5][5][73][43]
 
double theDFFillDetMapMin1 [5][5][73][43]
 
double theDFFillDetMapMin2 [5][5][73][43]
 
double theDFFillDetMapPl0 [5][5][73][43]
 
double theDFFillDetMapPl1 [5][5][73][43]
 
double theDFFillDetMapPl2 [5][5][73][43]
 
double theMBFillDetMapMin0 [5][5][73][43]
 
double theMBFillDetMapMin1 [5][5][73][43]
 
double theMBFillDetMapMin2 [5][5][73][43]
 
double theMBFillDetMapMin4 [5][5][73][43]
 
double theMBFillDetMapPl0 [5][5][73][43]
 
double theMBFillDetMapPl1 [5][5][73][43]
 
double theMBFillDetMapPl2 [5][5][73][43]
 
double theMBFillDetMapPl4 [5][5][73][43]
 
double theNSFillDetMapMin0 [5][5][73][43]
 
double theNSFillDetMapMin1 [5][5][73][43]
 
double theNSFillDetMapMin2 [5][5][73][43]
 
double theNSFillDetMapMin4 [5][5][73][43]
 
double theNSFillDetMapPl0 [5][5][73][43]
 
double theNSFillDetMapPl1 [5][5][73][43]
 
double theNSFillDetMapPl2 [5][5][73][43]
 
double theNSFillDetMapPl4 [5][5][73][43]
 
bool theRecalib
 
edm::EDGetTokenT
< FEDRawDataCollection
tok_data_
 
edm::EDGetTokenT
< L1GlobalTriggerReadoutRecord
tok_gtRec_
 
edm::EDGetTokenT
< HBHERecHitCollection
tok_hbhe_
 
edm::EDGetTokenT
< HBHERecHitCollection
tok_hbheNoise_
 
edm::EDGetTokenT
< HBHERecHitCollection
tok_hbheNorm_
 
edm::EDGetTokenT
< HFRecHitCollection
tok_hf_
 
edm::EDGetTokenT
< HFRecHitCollection
tok_hfNoise_
 
edm::EDGetTokenT
< HORecHitCollection
tok_ho_
 
edm::EDGetTokenT
< HORecHitCollection
tok_hoNoise_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- 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 55 of file Analyzer_minbias.h.

Constructor & Destructor Documentation

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

Definition at line 43 of file Analyzer_minbias.cc.

References fOutputFileName, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), i, HLT_25ns10e33_v2_cff::InputTag, j, noise_min, noise_pl, AlCaHLTBitMon_QueryRunRegistry::string, theRecalib, tok_data_, tok_gtRec_, tok_hbhe_, tok_hbheNoise_, tok_hbheNorm_, tok_hf_, tok_hfNoise_, tok_ho_, and tok_hoNoise_.

43  {
44  // get name of output file with histogramms
45  fOutputFileName = iConfig.getUntrackedParameter<std::string>("HistOutFile");
46  // get names of modules, producing object collections
47 
48  tok_hbhe_ = consumes<HBHERecHitCollection>(iConfig.getParameter<edm::InputTag>("hbheInputMB"));
49  tok_ho_ = consumes<HORecHitCollection>(iConfig.getParameter<edm::InputTag>("hoInputMB"));
50  tok_hf_ = consumes<HFRecHitCollection>(iConfig.getParameter<edm::InputTag>("hfInputMB"));
51  tok_data_ = consumes<FEDRawDataCollection>(edm::InputTag(iConfig.getParameter<std::string>("InputLabel") ));
52 
53  tok_hbheNoise_ = consumes<HBHERecHitCollection>(iConfig.getParameter<edm::InputTag>("hbheInputNoise"));
54  tok_hoNoise_ = consumes<HORecHitCollection>(iConfig.getParameter<edm::InputTag>("hoInputNoise"));
55  tok_hfNoise_ = consumes<HFRecHitCollection>(iConfig.getParameter<edm::InputTag>("hfInputNoise"));
56 
57  // this was hardcodded..
58  tok_gtRec_ = consumes<L1GlobalTriggerReadoutRecord>(edm::InputTag("gtDigisAlCaMB"));
59  tok_hbheNorm_ = consumes<HBHERecHitCollection>(edm::InputTag("hbhereco"));
60 
61  theRecalib = iConfig.getParameter<bool>("Recalib");
62 
63  //
64  //
65  for(int i=0; i<73; i++) {
66  for(int j=0; j<43; j++) {
67  noise_min[i][j] = 0.;
68  noise_pl[i][j] = 0.;
69  }
70  }
71  //
72  //
73 
74  }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
edm::EDGetTokenT< HORecHitCollection > tok_hoNoise_
edm::EDGetTokenT< HFRecHitCollection > tok_hf_
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > tok_gtRec_
edm::EDGetTokenT< HBHERecHitCollection > tok_hbheNoise_
double noise_min[73][43]
edm::EDGetTokenT< HFRecHitCollection > tok_hfNoise_
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
int j
Definition: DBlmapReader.cc:9
edm::EDGetTokenT< HBHERecHitCollection > tok_hbheNorm_
edm::EDGetTokenT< FEDRawDataCollection > tok_data_
edm::EDGetTokenT< HORecHitCollection > tok_ho_
cms::Analyzer_minbias::~Analyzer_minbias ( )

Definition at line 76 of file Analyzer_minbias.cc.

76  {
77 
78  // do anything here that needs to be done at desctruction time
79  // (e.g. close files, deallocate resources etc.)
80 
81  }

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 336 of file Analyzer_minbias.cc.

References funct::abs(), HcalDetId::depth(), CaloRecHit::energy(), HcalObjRepresent::Fill(), edm::EventSetup::get(), edm::Event::getAllProvenance(), edm::Event::getByToken(), hbheNoiseE, hbheSignalE, hCalo1, hCalo1mom2, hCalo2, hCalo2mom2, hfNoiseE, hfSignalE, hHBHEsize_vs_run, hHFsize_vs_run, i, HcalDetId::ieta(), HcalDetId::iphi(), j, relval_2017::k, cmsLHEtoEOSManager::l, nevent, nevent_run, funct::pow(), edm::ESHandle< class >::product(), DetId::rawId(), reco::return(), edm::Event::run(), theDFFillDetMapMin1, theDFFillDetMapMin2, theDFFillDetMapPl1, theDFFillDetMapPl2, theMBFillDetMapMin0, theMBFillDetMapMin1, theMBFillDetMapMin2, theMBFillDetMapMin4, theMBFillDetMapPl0, theMBFillDetMapPl1, theMBFillDetMapPl2, theMBFillDetMapPl4, theNSFillDetMapMin0, theNSFillDetMapMin1, theNSFillDetMapMin2, theNSFillDetMapMin4, theNSFillDetMapPl0, theNSFillDetMapPl1, theNSFillDetMapPl2, theNSFillDetMapPl4, theRecalib, tok_hbhe_, tok_hbheNoise_, tok_hbheNorm_, tok_hf_, and tok_hfNoise_.

336  {
337 
338  edm::LogInfo("AnalyzerMB")<<" Start Analyzer_minbias::analyze "<<nevent;
339  nevent++;
340  nevent_run++;
341  using namespace edm;
342 
343  float rnnum = (float)iEvent.run();
344 
345  std::vector<Provenance const*> theProvenance;
346  iEvent.getAllProvenance(theProvenance);
347 
348  for( std::vector<Provenance const*>::const_iterator ip = theProvenance.begin();
349  ip != theProvenance.end(); ip++) {
350  edm::LogInfo("AnalyzerMB")<<" Print all process/modulelabel/product names "
351  <<(**ip).processName()<<" , "<<(**ip).moduleLabel()<<" , "
352  <<(**ip).productInstanceName();
353  }
354  /*
355  edm::Handle<FEDRawDataCollection> rawdata;
356  iEvent.getByToken(tok_data_,rawdata);
357 
358  if (!rawdata.isValid()) {
359  edm::LogInfo("AnalyzerMB")<<" No valid collection ";
360  } else {
361  edm::LogInfo("AnalyzerMB")<<" Valid collection ";
362  int calibType = -1 ; int numEmptyFEDs = 0 ;
363  std::vector<int> calibTypeCounter(8,0) ;
364  for (int i=FEDNumbering::MINHCALFEDID;
365  i<=FEDNumbering::MAXHCALFEDID; i++) {
366  const FEDRawData& fedData = rawdata->FEDData(i) ;
367  if ( fedData.size() < 24 ) numEmptyFEDs++ ;
368  if ( fedData.size() < 24 ) continue ;
369  // int value = ((const HcalDCCHeader*)(fedData.data()))->getCalibType() ;
370  // calibTypeCounter.at(value)++ ; // increment the counter for this calib type
371  }
372  edm::LogInfo("AnalyzerMB")<<" NumFed "<<numEmptyFEDs<<" "<<calibType;
373  }
374  */
375  /*
376  std::vector<edm::Handle<FEDRawDataCollection> > rawdata1;
377  iEvent.getManyByType(rawdata1);
378 
379  for(std::vector<edm::Handle<FEDRawDataCollection> >::const_iterator it = rawdata1.begin();it != rawdata1.end(); it++) {
380 
381  edm::LogInfo("AnalyzerMB")<<" Many by Type product name "<< (*it).provenance()->processName()<<
382  " "<<(*it).provenance()->moduleLabel();
383 
384  if((*it).provenance()->moduleLabel() == "hltHcalCalibrationRaw") {
385  int calibType = -1 ; int numEmptyFEDs = 0 ;
386 
387  for (int i=FEDNumbering::MINHCALFEDID;
388  i<=FEDNumbering::MAXHCALFEDID; i++) {
389  const FEDRawData& fedData = (*it)->FEDData(i) ;
390  edm::LogInfo("AnalyzerMB")<<" FED size "<<fedData.size();
391  if ( fedData.size() < 24 ) numEmptyFEDs++ ;
392  if ( fedData.size() < 24 ) continue ;
393  int value = ((const HcalDCCHeader*)(fedData.data()))->getCalibType() ;
394  edm::LogInfo("AnalyzerMB")<<" Value "<<value;
395  }
396  edm::LogInfo("AnalyzerMB")<<" Many by Type NumFed "<<numEmptyFEDs<<" "<<calibType;
397  }
398  }
399 
400 
401  */
402 
403 
404  // Geometry
405  // edm::ESHandle<CaloGeometry> pG;
406  // iSetup.get<CaloGeometryRecord>().get(pG);
407  // ======
408 
409  /*
410  edm::ESHandle<L1GtTriggerMenu> menuRcd;
411  iSetup.get<L1GtTriggerMenuRcd>().get(menuRcd) ;
412  const L1GtTriggerMenu* menu = menuRcd.product();
413  const AlgorithmMap& bitMap = menu->gtAlgorithmMap();
414 
415  edm::Handle<L1GlobalTriggerReadoutRecord> gtRecord;
416  iEvent.getByToken(tok_gtRec_, gtRecord);
417 
418  if (!gtRecord.isValid()) {
419 
420  // LogDebug("L1GlobalTriggerRecordProducer")
421  // << "\n\n Error: no L1GlobalTriggerReadoutRecord found with input tag "
422  // << m_l1GtReadoutRecord
423  // << "\n Returning empty L1GlobalTriggerRecord.\n\n";
424  edm::LogInfo("AnalyzerMB")<<" No L1 trigger record ";
425  } else {
426 
427  const DecisionWord dWord = gtRecord->decisionWord();
428 
429  for (CItAlgo itAlgo = bitMap.begin(); itAlgo != bitMap.end(); itAlgo++) {
430  bool decision=menu->gtAlgorithmResult(itAlgo->first,dWord);
431  if(decision == 1) edm::LogInfo("AnalyzerMB")<<" Trigger "<<itAlgo->first<<" "<<decision;
432  }
433 
434  }
435  */
436 
437  const HcalRespCorrs* myRecalib=0;
438  if( theRecalib ) {
439  // Radek:
440  edm::ESHandle <HcalRespCorrs> recalibCorrs;
441  iSetup.get<HcalRespCorrsRcd>().get("recalibrate",recalibCorrs);
442  myRecalib = recalibCorrs.product();
443  // end
444  } // theRecalib
445 
446  // Noise part for HB HE
447 
448  double tmpNSFillDetMapPl1[5][5][73][43];
449  double tmpNSFillDetMapMin1[5][5][73][43];
450 
451  for (int i=0; i<5;i++) {
452  for (int j=0; j<5;j++) {
453  for (int k=0; k<73;k++) {
454  for (int l=0; l<43;l++) {
455  tmpNSFillDetMapPl1[i][j][k][l] = 0.;
456  tmpNSFillDetMapMin1[i][j][k][l] = 0.;
457  }
458  }
459  }
460  }
461 
463  iEvent.getByToken(tok_hbheNorm_, hbheNormal);
464  if(!hbheNormal.isValid()){
465  edm::LogWarning("AnalyzerMB")<<" hbheNormal failed ";
466  } else {
467  edm::LogInfo("AnalyzerMB")<<" The size of the normal collection "<<hbheNormal->size();
468  }
469 
470 
472  iEvent.getByToken(tok_hbheNoise_, hbheNS);
473 
474 
475  if(!hbheNS.isValid()){
476  edm::LogWarning("AnalyzerMB") << "HcalCalibAlgos: Error! can't get hbhe"
477  << " product! No HBHE MS ";
478  return ;
479  }
480 
481 
482  const HBHERecHitCollection HithbheNS = *(hbheNS.product());
483  edm::LogInfo("AnalyzerMB")<<" HBHE NS size of collection "<<HithbheNS.size();
484  hHBHEsize_vs_run->Fill(rnnum,(float)HithbheNS.size());
485 
486  if(HithbheNS.size()!= 5184) {
487  edm::LogWarning("AnalyzerMB")<<" HBHE problem "<<rnnum<<" "<<HithbheNS.size();
488  // return;
489  }
491  iEvent.getByToken(tok_hbhe_, hbheMB);
492 
493  if(!hbheMB.isValid()){
494  edm::LogWarning("AnalyzerMB")<< "HcalCalibAlgos: Error! can't get hbhe"
495  << " product! No HBHE MB";
496  // return ;
497  }
498 
499  const HBHERecHitCollection HithbheMB = *(hbheMB.product());
500  edm::LogInfo("AnalyzerMB")<<" HBHE MB size of collection "<<HithbheMB.size();
501  if(HithbheMB.size()!= 5184) {
502  edm::LogWarning("AnalyzerMB")<<" HBHE problem "<<rnnum<<" "<<HithbheMB.size();
503  // return;
504  }
505 
507  iEvent.getByToken(tok_hfNoise_, hfNS);
508 
509  if(!hfNS.isValid()){
510  edm::LogWarning("AnalyzerMB") << "HcalCalibAlgos: Error! can't get hf"
511  << " product! No HF NS ";
512  // return ;
513  }
514 
515  const HFRecHitCollection HithfNS = *(hfNS.product());
516  edm::LogInfo("AnalyzerMB")<<" HFE NS size of collection "<<HithfNS.size();
517  hHFsize_vs_run->Fill(rnnum,(float)HithfNS.size());
518  if(HithfNS.size()!= 1728) {
519  edm::LogWarning("AnalyzerMB")<<" HF problem "<<rnnum<<" "<<HithfNS.size();
520  // return;
521  }
522 
524  iEvent.getByToken(tok_hf_, hfMB);
525 
526  if(!hfMB.isValid()){
527  edm::LogWarning("AnalyzerMB") << "HcalCalibAlgos: Error! can't get hf"
528  << " product! No HF MB";
529  // return ;
530  }
531 
532  const HFRecHitCollection HithfMB = *(hfMB.product());
533  edm::LogInfo("AnalyzerMB")<<" HF MB size of collection "<<HithfMB.size();
534  if(HithfMB.size()!= 1728) {
535  edm::LogWarning("AnalyzerMB")<<" HF problem "<<rnnum<<" "<<HithfMB.size();
536  // return;
537  }
538 
539 
540 
541  for(HBHERecHitCollection::const_iterator hbheItr=HithbheNS.begin(); hbheItr!=HithbheNS.end(); hbheItr++) {
542  // Recalibration of energy
543  float icalconst=1.;
544  DetId mydetid = hbheItr->id().rawId();
545  if( theRecalib ) icalconst=myRecalib->getValues(mydetid)->getValue();
546 
547  HBHERecHit aHit(hbheItr->id(),hbheItr->energy()*icalconst,hbheItr->time());
548 
549  double energyhit = aHit.energy();
550 
551  DetId id = (*hbheItr).detid();
552  HcalDetId hid=HcalDetId(id);
553 
554 
555 
556  int mysu = ((hid).rawId()>>25)&0x7;
557  if( hid.ieta() > 0 ) {
558  theNSFillDetMapPl0[mysu][hid.depth()][hid.iphi()][hid.ieta()] = theNSFillDetMapPl0[mysu][hid.depth()][hid.iphi()][hid.ieta()]+ 1.;
559  theNSFillDetMapPl1[mysu][hid.depth()][hid.iphi()][hid.ieta()] = theNSFillDetMapPl1[mysu][hid.depth()][hid.iphi()][hid.ieta()]+energyhit;
560  theNSFillDetMapPl2[mysu][hid.depth()][hid.iphi()][hid.ieta()] = theNSFillDetMapPl2[mysu][hid.depth()][hid.iphi()][hid.ieta()]+pow(energyhit,2);
561  theNSFillDetMapPl4[mysu][hid.depth()][hid.iphi()][hid.ieta()] = theNSFillDetMapPl4[mysu][hid.depth()][hid.iphi()][hid.ieta()]+pow(energyhit,4);
562 
563  tmpNSFillDetMapPl1[mysu][hid.depth()][hid.iphi()][hid.ieta()] = energyhit;
564 
565 
566  } else {
567  theNSFillDetMapMin0[mysu][hid.depth()][hid.iphi()][abs(hid.ieta())] = theNSFillDetMapMin0[mysu][hid.depth()][hid.iphi()][abs(hid.ieta())]+ 1.;
568  theNSFillDetMapMin1[mysu][hid.depth()][hid.iphi()][abs(hid.ieta())] = theNSFillDetMapMin1[mysu][hid.depth()][hid.iphi()][abs(hid.ieta())]+energyhit;
569  theNSFillDetMapMin2[mysu][hid.depth()][hid.iphi()][abs(hid.ieta())] = theNSFillDetMapMin2[mysu][hid.depth()][hid.iphi()][abs(hid.ieta())]+pow(energyhit,2);
570  theNSFillDetMapMin4[mysu][hid.depth()][hid.iphi()][abs(hid.ieta())] = theNSFillDetMapMin4[mysu][hid.depth()][hid.iphi()][abs(hid.ieta())]+pow(energyhit,4);
571 
572 
573  tmpNSFillDetMapMin1[mysu][hid.depth()][hid.iphi()][hid.ieta()] = energyhit;
574 
575  }
576 
577  if(hid.depth() == 1) {
578  hbheNoiseE->Fill(energyhit);
579 
580  if(energyhit<-2.) edm::LogInfo("AnalyzerMB")<<" Run "<<rnnum<<" ieta,iphi "<<hid.ieta()<<" "<<hid.iphi()<<energyhit;
581 
582  // if( hid.ieta() > 0 ) {
583  // hCalo1[hid.iphi()][hid.ieta()]->Fill(energyhit-noise_pl[hid.iphi()][hid.ieta()]);
584  // hCalo1mom2[hid.iphi()][hid.ieta()]->Fill(pow(energyhit,2));
585  // } else {
586  // hCalo2[hid.iphi()][abs(hid.ieta())]->Fill(energyhit-noise_min[hid.iphi()][abs(hid.ieta())]);
587  // hCalo2mom2[hid.iphi()][abs(hid.ieta())]->Fill(pow(energyhit,2));
588  // } // eta><0
589 
590  } // depth=1
591 
592 
593  } // HBHE_NS
594 
595 
596  // Signal part for HB HE
597 
598 
599  for(HBHERecHitCollection::const_iterator hbheItr=HithbheMB.begin(); hbheItr!=HithbheMB.end(); hbheItr++) {
600  // Recalibration of energy
601  float icalconst=1.;
602  DetId mydetid = hbheItr->id().rawId();
603  if( theRecalib ) icalconst=myRecalib->getValues(mydetid)->getValue();
604 
605  HBHERecHit aHit(hbheItr->id(),hbheItr->energy()*icalconst,hbheItr->time());
606 
607  double energyhit = aHit.energy();
608 
609  DetId id = (*hbheItr).detid();
610  HcalDetId hid=HcalDetId(id);
611 
612  int mysu = ((hid).rawId()>>25)&0x7;
613  if( hid.ieta() > 0 ) {
614  theMBFillDetMapPl0[mysu][hid.depth()][hid.iphi()][hid.ieta()] += 1.;
615  theMBFillDetMapPl1[mysu][hid.depth()][hid.iphi()][hid.ieta()] += energyhit;
616  theMBFillDetMapPl2[mysu][hid.depth()][hid.iphi()][hid.ieta()] += pow(energyhit,2);
617  theMBFillDetMapPl4[mysu][hid.depth()][hid.iphi()][hid.ieta()] += pow(energyhit,4);
618  float mydiff = energyhit - tmpNSFillDetMapPl1[mysu][hid.depth()][hid.iphi()][hid.ieta()];
619 
620 
621  theDFFillDetMapPl1[mysu][hid.depth()][hid.iphi()][hid.ieta()] = theDFFillDetMapPl1[mysu][hid.depth()][hid.iphi()][hid.ieta()]+mydiff;
622  theDFFillDetMapPl2[mysu][hid.depth()][hid.iphi()][hid.ieta()] = theDFFillDetMapPl2[mysu][hid.depth()][hid.iphi()][hid.ieta()]+pow(mydiff,2);
623  } else {
624  theMBFillDetMapMin0[mysu][hid.depth()][hid.iphi()][abs(hid.ieta())] = theMBFillDetMapMin0[mysu][hid.depth()][hid.iphi()][abs(hid.ieta())]+ 1.;
625  theMBFillDetMapMin1[mysu][hid.depth()][hid.iphi()][abs(hid.ieta())] = theMBFillDetMapMin1[mysu][hid.depth()][hid.iphi()][abs(hid.ieta())]+energyhit;
626  theMBFillDetMapMin2[mysu][hid.depth()][hid.iphi()][abs(hid.ieta())] = theMBFillDetMapMin2[mysu][hid.depth()][hid.iphi()][abs(hid.ieta())]+pow(energyhit,2);
627  theMBFillDetMapMin4[mysu][hid.depth()][hid.iphi()][abs(hid.ieta())] = theMBFillDetMapMin4[mysu][hid.depth()][hid.iphi()][abs(hid.ieta())]+pow(energyhit,4);
628 
629 
630  float mydiff = energyhit - tmpNSFillDetMapMin1[mysu][hid.depth()][hid.iphi()][hid.ieta()];
631  theDFFillDetMapMin1[mysu][hid.depth()][hid.iphi()][hid.ieta()] = theDFFillDetMapMin1[mysu][hid.depth()][hid.iphi()][hid.ieta()]+mydiff;
632  theDFFillDetMapMin2[mysu][hid.depth()][hid.iphi()][hid.ieta()] = theDFFillDetMapMin2[mysu][hid.depth()][hid.iphi()][hid.ieta()]+pow(mydiff,2);
633  }
634 
635 
636  if(hid.depth() == 1) {
637 
638  hbheSignalE->Fill(energyhit);
639 
640  if( hid.ieta() > 0 ) {
641  hCalo1[hid.iphi()][hid.ieta()]->Fill(energyhit);
642  hCalo1mom2[hid.iphi()][hid.ieta()]->Fill(pow(energyhit,2));
643  } else {
644  hCalo2[hid.iphi()][abs(hid.ieta())]->Fill(energyhit);
645  hCalo2mom2[hid.iphi()][abs(hid.ieta())]->Fill(pow(energyhit,2));
646  } // eta><0
647 
648  } // depth=1
649 
650 
651  } // HBHE_MB
652 
653  // HF
654 
655  for(HFRecHitCollection::const_iterator hbheItr=HithfNS.begin(); hbheItr!=HithfNS.end(); hbheItr++) {
656  // Recalibration of energy
657  float icalconst=1.;
658  DetId mydetid = hbheItr->id().rawId();
659  if( theRecalib ) icalconst=myRecalib->getValues(mydetid)->getValue();
660 
661  HFRecHit aHit(hbheItr->id(),hbheItr->energy()*icalconst,hbheItr->time());
662 
663  double energyhit = aHit.energy();
664  //
665  // Remove PMT hits
666  //
667  DetId id = (*hbheItr).detid();
668  HcalDetId hid=HcalDetId(id);
669  // theGeometry->getGeometry(detId)->getPosition()).eta()
670 
671  // edm::LogInfo("AnalyzerMB")<<hid.ieta()<<" "<<hid.iphi()<<" "<<hid.depth()<<" "<<(pG->getGeometry(id)->getPosition()).eta()<<" "<<(pG->getGeometry(id)->getPosition()).phi()
672  // <<" "<<(pG->getGeometry(id)->getPosition()).perp()<<" "<<(pG->getGeometry(id)->getPosition()).z();
673 
674  if(fabs(energyhit) > 40. ) continue;
675 
676  int mysu = ((hid).rawId()>>25)&0x7;
677  if( hid.ieta() > 0 ) {
678  theNSFillDetMapPl0[mysu][hid.depth()][hid.iphi()][hid.ieta()] = theNSFillDetMapPl0[mysu][hid.depth()][hid.iphi()][hid.ieta()]+ 1.;
679  theNSFillDetMapPl1[mysu][hid.depth()][hid.iphi()][hid.ieta()] = theNSFillDetMapPl1[mysu][hid.depth()][hid.iphi()][hid.ieta()]+energyhit;
680  theNSFillDetMapPl2[mysu][hid.depth()][hid.iphi()][hid.ieta()] = theNSFillDetMapPl2[mysu][hid.depth()][hid.iphi()][hid.ieta()]+pow(energyhit,2);
681  theNSFillDetMapPl4[mysu][hid.depth()][hid.iphi()][hid.ieta()] = theNSFillDetMapPl4[mysu][hid.depth()][hid.iphi()][hid.ieta()]+pow(energyhit,4);
682 
683  tmpNSFillDetMapPl1[mysu][hid.depth()][hid.iphi()][hid.ieta()] = energyhit;
684 
685 
686  } else {
687  theNSFillDetMapMin0[mysu][hid.depth()][hid.iphi()][abs(hid.ieta())] = theNSFillDetMapMin0[mysu][hid.depth()][hid.iphi()][abs(hid.ieta())]+ 1.;
688  theNSFillDetMapMin1[mysu][hid.depth()][hid.iphi()][abs(hid.ieta())] = theNSFillDetMapMin1[mysu][hid.depth()][hid.iphi()][abs(hid.ieta())]+energyhit;
689  theNSFillDetMapMin2[mysu][hid.depth()][hid.iphi()][abs(hid.ieta())] = theNSFillDetMapMin2[mysu][hid.depth()][hid.iphi()][abs(hid.ieta())]+pow(energyhit,2);
690  theNSFillDetMapMin4[mysu][hid.depth()][hid.iphi()][abs(hid.ieta())] = theNSFillDetMapMin4[mysu][hid.depth()][hid.iphi()][abs(hid.ieta())]+pow(energyhit,4);
691 
692 
693  tmpNSFillDetMapMin1[mysu][hid.depth()][hid.iphi()][hid.ieta()] = energyhit;
694 
695  }
696 
697  if(hid.depth() == 1) {
698  hfNoiseE->Fill(energyhit);
699 
700  //if( hid.ieta() > 0 ) {
701  // hCalo1[hid.iphi()][hid.ieta()]->Fill(energyhit-noise_pl[hid.iphi()][hid.ieta()]);
702  // hCalo1mom2[hid.iphi()][hid.ieta()]->Fill(pow(energyhit,2));
703  //} else {
704  // hCalo2[hid.iphi()][abs(hid.ieta())]->Fill(energyhit-noise_min[hid.iphi()][abs(hid.ieta())]);
705  // hCalo2mom2[hid.iphi()][abs(hid.ieta())]->Fill(pow(energyhit,2));
706  //} // eta><0
707 
708  } // depth=1
709 
710  } // HBHE_NS
711 
712 
713  // Signal part for HB HE
714 
715  for(HFRecHitCollection::const_iterator hbheItr=HithfMB.begin(); hbheItr!=HithfMB.end(); hbheItr++) {
716  // Recalibration of energy
717  float icalconst=1.;
718  DetId mydetid = hbheItr->id().rawId();
719  if( theRecalib ) icalconst=myRecalib->getValues(mydetid)->getValue();
720 
721  HFRecHit aHit(hbheItr->id(),hbheItr->energy()*icalconst,hbheItr->time());
722 
723  double energyhit = aHit.energy();
724  //
725  // Remove PMT hits
726  //
727  if(fabs(energyhit) > 40. ) continue;
728 
729  DetId id = (*hbheItr).detid();
730  HcalDetId hid=HcalDetId(id);
731 
732  int mysu = ((hid).rawId()>>25)&0x7;
733  if( hid.ieta() > 0 ) {
734  theMBFillDetMapPl0[mysu][hid.depth()][hid.iphi()][hid.ieta()] = theMBFillDetMapPl0[mysu][hid.depth()][hid.iphi()][hid.ieta()]+ 1.;
735  theMBFillDetMapPl1[mysu][hid.depth()][hid.iphi()][hid.ieta()] = theMBFillDetMapPl1[mysu][hid.depth()][hid.iphi()][hid.ieta()]+energyhit;
736  theMBFillDetMapPl2[mysu][hid.depth()][hid.iphi()][hid.ieta()] = theMBFillDetMapPl2[mysu][hid.depth()][hid.iphi()][hid.ieta()]+pow(energyhit,2);
737  theMBFillDetMapPl4[mysu][hid.depth()][hid.iphi()][hid.ieta()] = theMBFillDetMapPl4[mysu][hid.depth()][hid.iphi()][hid.ieta()]+pow(energyhit,4);
738 
739 
740  theDFFillDetMapPl1[mysu][hid.depth()][hid.iphi()][hid.ieta()] = theDFFillDetMapPl1[mysu][hid.depth()][hid.iphi()][hid.ieta()]+energyhit-tmpNSFillDetMapPl1[mysu][hid.depth()][hid.iphi()][hid.ieta()];
741  theDFFillDetMapPl2[mysu][hid.depth()][hid.iphi()][hid.ieta()] =
742  theDFFillDetMapPl2[mysu][hid.depth()][hid.iphi()][hid.ieta()]+pow((energyhit-tmpNSFillDetMapPl1[mysu][hid.depth()][hid.iphi()][hid.ieta()]),2);
743  } else {
744  theMBFillDetMapMin0[mysu][hid.depth()][hid.iphi()][abs(hid.ieta())] = theMBFillDetMapMin0[mysu][hid.depth()][hid.iphi()][abs(hid.ieta())]+ 1.;
745  theMBFillDetMapMin1[mysu][hid.depth()][hid.iphi()][abs(hid.ieta())] = theMBFillDetMapMin1[mysu][hid.depth()][hid.iphi()][abs(hid.ieta())]+energyhit;
746  theMBFillDetMapMin2[mysu][hid.depth()][hid.iphi()][abs(hid.ieta())] = theMBFillDetMapMin2[mysu][hid.depth()][hid.iphi()][abs(hid.ieta())]+pow(energyhit,2);
747  theMBFillDetMapMin4[mysu][hid.depth()][hid.iphi()][abs(hid.ieta())] = theMBFillDetMapMin4[mysu][hid.depth()][hid.iphi()][abs(hid.ieta())]+pow(energyhit,4);
748 
749  theDFFillDetMapMin1[mysu][hid.depth()][hid.iphi()][hid.ieta()] = theDFFillDetMapMin1[mysu][hid.depth()][hid.iphi()][hid.ieta()]+energyhit-tmpNSFillDetMapMin1[mysu][hid.depth()][hid.iphi()][hid.ieta()];
750  theDFFillDetMapMin2[mysu][hid.depth()][hid.iphi()][hid.ieta()] =
751  theDFFillDetMapMin2[mysu][hid.depth()][hid.iphi()][hid.ieta()]+pow((energyhit-tmpNSFillDetMapMin1[mysu][hid.depth()][hid.iphi()][hid.ieta()]),2);
752  }
753 
754 
755  if(hid.depth() == 1) {
756  hfSignalE->Fill(energyhit);
757 
758  if( hid.ieta() > 0 ) {
759  hCalo1[hid.iphi()][hid.ieta()]->Fill(energyhit);
760  hCalo1mom2[hid.iphi()][hid.ieta()]->Fill(pow(energyhit,2));
761  } else {
762  hCalo2[hid.iphi()][abs(hid.ieta())]->Fill(energyhit);
763  hCalo2mom2[hid.iphi()][abs(hid.ieta())]->Fill(pow(energyhit,2));
764  } // eta><0
765 
766  } // depth=1
767 
768  } // HF_MB
769 
770  edm::LogInfo("AnalyzerMB")<<" Event is finished ";
771  }
double theMBFillDetMapMin0[5][5][73][43]
double theMBFillDetMapMin2[5][5][73][43]
void getAllProvenance(std::vector< Provenance const * > &provenances) const
Definition: Event.cc:90
int i
Definition: DBlmapReader.cc:9
double theDFFillDetMapPl2[5][5][73][43]
double theMBFillDetMapMin1[5][5][73][43]
double theNSFillDetMapPl4[5][5][73][43]
double theNSFillDetMapPl0[5][5][73][43]
double theNSFillDetMapMin0[5][5][73][43]
double theMBFillDetMapPl0[5][5][73][43]
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
TH1F * hCalo2mom2[73][43]
std::vector< HBHERecHit >::const_iterator const_iterator
double theDFFillDetMapPl1[5][5][73][43]
edm::EDGetTokenT< HFRecHitCollection > tok_hf_
edm::EDGetTokenT< HBHERecHitCollection > tok_hbheNoise_
double theNSFillDetMapPl2[5][5][73][43]
double theDFFillDetMapMin2[5][5][73][43]
TH1F * hCalo1mom2[73][43]
edm::EDGetTokenT< HFRecHitCollection > tok_hfNoise_
double theNSFillDetMapPl1[5][5][73][43]
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
double theMBFillDetMapPl1[5][5][73][43]
int depth() const
get the tower depth
Definition: HcalDetId.cc:106
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
float energy() const
Definition: CaloRecHit.h:17
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
int ieta() const
get the cell ieta
Definition: HcalDetId.h:56
RunNumber_t run() const
Definition: Event.h:93
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int j
Definition: DBlmapReader.cc:9
double theMBFillDetMapPl4[5][5][73][43]
double theNSFillDetMapMin1[5][5][73][43]
double theNSFillDetMapMin4[5][5][73][43]
double theMBFillDetMapPl2[5][5][73][43]
edm::EDGetTokenT< HBHERecHitCollection > tok_hbheNorm_
int iphi() const
get the cell iphi
Definition: HcalDetId.cc:101
Definition: DetId.h:18
const T & get() const
Definition: EventSetup.h:56
T const * product() const
Definition: ESHandle.h:86
double theMBFillDetMapMin4[5][5][73][43]
return(e1-e2)*(e1-e2)+dp *dp
double theNSFillDetMapMin2[5][5][73][43]
double theDFFillDetMapMin1[5][5][73][43]
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
void cms::Analyzer_minbias::beginJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 90 of file Analyzer_minbias.cc.

References depth, eta, fOutputFileName, hbheNoiseE, hbheSignalE, hCalo1, hCalo1mom2, hCalo2, hCalo2mom2, hfNoiseE, hfSignalE, hHBHEsize_vs_run, hHFsize_vs_run, hOutputFile, i, ieta, iphi, j, relval_2017::k, cmsLHEtoEOSManager::l, meannoise_min, meannoise_pl, mom0_Diff, mom0_MB, mom0_Noise, mom1_Diff, mom1_MB, mom1_Noise, mom2_Diff, mom2_MB, mom2_Noise, mom4_MB, mom4_Noise, mydet, myout_hcal, mysubd, myTree, nevent, occup, phi, reco::return(), AlCaHLTBitMon_QueryRunRegistry::string, theDFFillDetMapMin0, theDFFillDetMapMin1, theDFFillDetMapMin2, theDFFillDetMapPl0, theDFFillDetMapPl1, theDFFillDetMapPl2, theMBFillDetMapMin0, theMBFillDetMapMin1, theMBFillDetMapMin2, theMBFillDetMapMin4, theMBFillDetMapPl0, theMBFillDetMapPl1, theMBFillDetMapPl2, theMBFillDetMapPl4, theNSFillDetMapMin0, theNSFillDetMapMin1, theNSFillDetMapMin2, theNSFillDetMapMin4, theNSFillDetMapPl0, theNSFillDetMapPl1, theNSFillDetMapPl2, and theNSFillDetMapPl4.

90  {
91 
92  hOutputFile = new TFile( fOutputFileName.c_str(), "RECREATE" ) ;
93 
94  myTree = new TTree("RecJet","RecJet Tree");
95  myTree->Branch("mydet", &mydet, "mydet/I");
96  myTree->Branch("mysubd", &mysubd, "mysubd/I");
97  myTree->Branch("depth", &depth, "depth/I");
98  myTree->Branch("ieta", &ieta, "ieta/I");
99  myTree->Branch("iphi", &iphi, "iphi/I");
100  myTree->Branch("eta", &eta, "eta/F");
101  myTree->Branch("phi", &phi, "phi/F");
102 
103  myTree->Branch("mom0_MB", &mom0_MB, "mom0_MB/F");
104  myTree->Branch("mom1_MB", &mom1_MB, "mom1_MB/F");
105  myTree->Branch("mom2_MB", &mom2_MB, "mom2_MB/F");
106  myTree->Branch("mom4_MB", &mom4_MB, "mom4_MB/F");
107 
108  myTree->Branch("mom0_Noise", &mom0_Noise, "mom0_Noise/F");
109  myTree->Branch("mom1_Noise", &mom1_Noise, "mom1_Noise/F");
110  myTree->Branch("mom2_Noise", &mom2_Noise, "mom2_Noise/F");
111  myTree->Branch("mom4_Noise", &mom4_Noise, "mom4_Noise/F");
112 
113  myTree->Branch("mom0_Diff", &mom0_Diff, "mom0_Diff/F");
114  myTree->Branch("mom1_Diff", &mom1_Diff, "mom1_Diff/F");
115  myTree->Branch("mom2_Diff", &mom2_Diff, "mom2_Diff/F");
116 
117  myTree->Branch("occup", &occup, "occup/F");
118 
119  edm::LogInfo("AnalyzerMB")<<" Before ordering Histos ";
120 
121  char str0[15];
122  char str1[15];
123 
124  char str10[15];
125  char str11[15];
126 
127  int k=0;
128  nevent = 0;
129  // Size of collections
130 
131  hHBHEsize_vs_run = new TH2F("hHBHEsize_vs_run","hHBHEsize_vs_run",500,111500.,112000.,6101,-100.5,6000.5);
132  hHFsize_vs_run = new TH2F("hHFsize_vs_run","hHFsize_vs_run",500,111500.,112000.,6101,-100.5,6000.5);
133 
134  for(int i=1;i<73;i++){
135  for(int j=1;j<43;j++){
136 
137  meannoise_pl[i][j] = 0.;
138  meannoise_min[i][j] = 0.;
139 
140  // for(int l=1;l<5;l++){
141  k = i*1000+j;
142  sprintf(str0,"mpl%d",k);
143  sprintf(str1,"mmin%d",k);
144 
145  sprintf(str10,"vpl%d",k);
146  sprintf(str11,"vmin%d",k);
147  // edm::LogInfo("AnalyzerMB")<<" "<<i<<" "<<j;
148  if( j < 30 ) {
149  // first order moment
150  hCalo1[i][j] = new TH1F(str0, "h0", 320, -10., 10.);
151  hCalo2[i][j] = new TH1F(str1, "h1", 320, -10., 10.);
152 
153  // second order moment
154  hCalo1mom2[i][j] = new TH1F(str10, "h10", 320, 0., 20.);
155  hCalo2mom2[i][j] = new TH1F(str11, "h11", 320, 0., 20.);
156  } else {
157  // HF
158  // first order moment
159  // edm::LogInfo("AnalyzerMB")<<" "<<i<<" "<<j<<" "<<k;
160  if(j < 40) {
161  hCalo1[i][j] = new TH1F(str0, "h0", 320, -10., 10.);
162  hCalo2[i][j] = new TH1F(str1, "h1", 320, -10., 10.);
163  //
164  // second order moment
165  hCalo1mom2[i][j] = new TH1F(str10, "h10", 320, 0., 40.);
166  hCalo2mom2[i][j] = new TH1F(str11, "h11", 320, 0., 40.);
167  } else {
168  hCalo1[i][j] = new TH1F(str0,"h0" , 320, -10., 10.);
169  hCalo2[i][j] = new TH1F(str1, "h1", 320, -10., 10.);
170 
171  // second order moment
172  hCalo1mom2[i][j] = new TH1F(str10, "h10", 320, 0., 120.);
173  hCalo2mom2[i][j] = new TH1F(str11, "h11", 320, 0., 120.);
174 
175  }
176  } // HE/HF boundary
177  // } // l
178  } // j
179  } // i
180 
181 
182  hbheNoiseE = new TH1F("hbheNoiseE","hbheNoiseE", 320, -10., 10.);
183  hfNoiseE = new TH1F("hfNoiseE","hfNoiseE", 320, -10., 10.);
184  hbheSignalE = new TH1F("hbheSignalE","hbheSignalE", 320, -10., 10.);
185  hfSignalE = new TH1F("hfSignalE","hfSignalE", 320, -10., 10.);
186 
187 
188  edm::LogInfo("AnalyzerMB")<<" After ordering Histos ";
189 
190  std::string ccc = "noise_0.dat";
191 
192  myout_hcal = new std::ofstream(ccc.c_str());
193  if(!myout_hcal) edm::LogInfo("AnalyzerMB") << " Output file not open!!! ";
194 
195  //
196  for (int i=0; i<5;i++) {
197  for (int j=0; j<5;j++) {
198  for (int k=0; k<73;k++) {
199  for (int l=0; l<43;l++) {
200  theMBFillDetMapPl0[i][j][k][l] = 0.;
201  theMBFillDetMapPl1[i][j][k][l] = 0.;
202  theMBFillDetMapPl2[i][j][k][l] = 0.;
203  theMBFillDetMapPl4[i][j][k][l] = 0.;
204 
205  theMBFillDetMapMin0[i][j][k][l] = 0.;
206  theMBFillDetMapMin1[i][j][k][l] = 0.;
207  theMBFillDetMapMin2[i][j][k][l] = 0.;
208  theMBFillDetMapMin4[i][j][k][l] = 0.;
209 
210 
211  theNSFillDetMapPl0[i][j][k][l] = 0.;
212  theNSFillDetMapPl1[i][j][k][l] = 0.;
213  theNSFillDetMapPl2[i][j][k][l] = 0.;
214  theNSFillDetMapPl4[i][j][k][l] = 0.;
215 
216  theNSFillDetMapMin0[i][j][k][l] = 0.;
217  theNSFillDetMapMin1[i][j][k][l] = 0.;
218  theNSFillDetMapMin2[i][j][k][l] = 0.;
219  theNSFillDetMapMin4[i][j][k][l] = 0.;
220 
221  theDFFillDetMapPl0[i][j][k][l] = 0.;
222  theDFFillDetMapPl1[i][j][k][l] = 0.;
223  theDFFillDetMapPl2[i][j][k][l] = 0.;
224  theDFFillDetMapMin0[i][j][k][l] = 0.;
225  theDFFillDetMapMin1[i][j][k][l] = 0.;
226  theDFFillDetMapMin2[i][j][k][l] = 0.;
227  }
228  }
229  }
230  }
231 
232  return ;
233  }
double theMBFillDetMapMin0[5][5][73][43]
double theMBFillDetMapMin2[5][5][73][43]
int i
Definition: DBlmapReader.cc:9
double theDFFillDetMapPl2[5][5][73][43]
double theMBFillDetMapMin1[5][5][73][43]
double theNSFillDetMapPl4[5][5][73][43]
double theNSFillDetMapPl0[5][5][73][43]
double theNSFillDetMapMin0[5][5][73][43]
double theMBFillDetMapPl0[5][5][73][43]
TH1F * hCalo2mom2[73][43]
double theDFFillDetMapPl1[5][5][73][43]
std::ofstream * myout_hcal
double meannoise_pl[73][43]
double theNSFillDetMapPl2[5][5][73][43]
double theDFFillDetMapMin2[5][5][73][43]
TH1F * hCalo1mom2[73][43]
double theNSFillDetMapPl1[5][5][73][43]
double theMBFillDetMapPl1[5][5][73][43]
double theDFFillDetMapPl0[5][5][73][43]
int j
Definition: DBlmapReader.cc:9
double theMBFillDetMapPl4[5][5][73][43]
double theNSFillDetMapMin1[5][5][73][43]
double theNSFillDetMapMin4[5][5][73][43]
double theDFFillDetMapMin0[5][5][73][43]
double theMBFillDetMapPl2[5][5][73][43]
double theMBFillDetMapMin4[5][5][73][43]
return(e1-e2)*(e1-e2)+dp *dp
double meannoise_min[73][43]
double theNSFillDetMapMin2[5][5][73][43]
double theDFFillDetMapMin1[5][5][73][43]
void cms::Analyzer_minbias::beginRun ( const edm::Run r,
const edm::EventSetup iSetup 
)
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 83 of file Analyzer_minbias.cc.

References nevent_run.

83  {
84  nevent_run = 0;
85  }
void cms::Analyzer_minbias::endJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 237 of file Analyzer_minbias.cc.

References depth, hbheNoiseE, hbheSignalE, hCalo1, hCalo1mom2, hCalo2, hCalo2mom2, hfNoiseE, hfSignalE, hHBHEsize_vs_run, hHFsize_vs_run, hOutputFile, i, ieta, cuy::ii, iphi, j, relval_2017::k, cmsLHEtoEOSManager::l, mom0_Diff, mom0_MB, mom0_Noise, mom1_Diff, mom1_MB, mom1_Noise, mom2_Diff, mom2_MB, mom2_Noise, mom4_MB, mom4_Noise, mysubd, myTree, reco::return(), theDFFillDetMapMin0, theDFFillDetMapMin1, theDFFillDetMapMin2, theDFFillDetMapPl0, theDFFillDetMapPl1, theDFFillDetMapPl2, theMBFillDetMapMin0, theMBFillDetMapMin1, theMBFillDetMapMin2, theMBFillDetMapMin4, theMBFillDetMapPl0, theMBFillDetMapPl1, theMBFillDetMapPl2, theMBFillDetMapPl4, theNSFillDetMapMin0, theNSFillDetMapMin1, theNSFillDetMapMin2, theNSFillDetMapMin4, theNSFillDetMapPl0, theNSFillDetMapPl1, theNSFillDetMapPl2, and theNSFillDetMapPl4.

Referenced by o2o.O2ORunMgr::executeJob().

237  {
238  int ii=0;
239 
240  for (int i=1; i<5;i++) {
241  for (int j=1; j<5;j++) {
242  for (int k=1; k<73;k++) {
243  for (int l=1; l<43;l++) {
244  if(theMBFillDetMapPl0[i][j][k][l] > 0) {
256 
257  mysubd = i;
258  depth = j;
259  ieta = l;
260  iphi = k;
261  edm::LogInfo("AnalyzerMB")<<" Result Plus= "<<mysubd<<" "<<ieta<<" "<<iphi<<" mom0 "<<mom0_MB<<" mom1 "<<mom1_MB<<" mom2 "<<mom2_MB;
262  myTree->Fill();
263  ii++;
264  } // Pl > 0
265 
266 
267  if(theMBFillDetMapMin0[i][j][k][l] > 0) {
270  mom2_MB = theMBFillDetMapMin2[i][j][k][l];
279 
280 
281  mysubd = i;
282  depth = j;
283  ieta = -1*l;
284  iphi = k;
285  edm::LogInfo("AnalyzerMB")<<" Result Minus= "<<mysubd<<" "<<ieta<<" "<<iphi<<" mom0 "<<mom0_MB<<" mom1 "<<mom1_MB<<" mom2 "<<mom2_MB;
286  myTree->Fill();
287  ii++;
288 
289  } // Min>0
290  } // ieta
291  } // iphi
292  } // depth
293  } //subd
294 
295 
296 
297  edm::LogInfo("AnalyzerMB")<<" Number of cells "<<ii;
298 
299  hOutputFile->Write();
300 
301  hOutputFile->cd();
302 
303  myTree->Write();
304 
305  hHBHEsize_vs_run->Write() ;
306  hHFsize_vs_run->Write() ;
307 
308  for(int i=1;i<73;i++){
309  for(int j=1;j<43;j++){
310  hCalo1[i][j]->Write();
311  hCalo2[i][j]->Write();
312  hCalo1mom2[i][j]->Write();
313  hCalo2mom2[i][j]->Write();
314  }
315  }
316 
317  hbheNoiseE->Write() ;
318  hfNoiseE->Write() ;
319  hbheSignalE->Write() ;
320  hfSignalE->Write() ;
321 
322 
323  hOutputFile->Close() ;
324 
325  edm::LogInfo("AnalyzerMB")<<" File is closed ";
326 
327  return ;
328  }
double theMBFillDetMapMin0[5][5][73][43]
double theMBFillDetMapMin2[5][5][73][43]
int i
Definition: DBlmapReader.cc:9
double theDFFillDetMapPl2[5][5][73][43]
double theMBFillDetMapMin1[5][5][73][43]
double theNSFillDetMapPl4[5][5][73][43]
double theNSFillDetMapPl0[5][5][73][43]
double theNSFillDetMapMin0[5][5][73][43]
double theMBFillDetMapPl0[5][5][73][43]
TH1F * hCalo2mom2[73][43]
double theDFFillDetMapPl1[5][5][73][43]
int ii
Definition: cuy.py:588
double theNSFillDetMapPl2[5][5][73][43]
double theDFFillDetMapMin2[5][5][73][43]
TH1F * hCalo1mom2[73][43]
double theNSFillDetMapPl1[5][5][73][43]
double theMBFillDetMapPl1[5][5][73][43]
double theDFFillDetMapPl0[5][5][73][43]
int j
Definition: DBlmapReader.cc:9
double theMBFillDetMapPl4[5][5][73][43]
double theNSFillDetMapMin1[5][5][73][43]
double theNSFillDetMapMin4[5][5][73][43]
double theDFFillDetMapMin0[5][5][73][43]
double theMBFillDetMapPl2[5][5][73][43]
double theMBFillDetMapMin4[5][5][73][43]
return(e1-e2)*(e1-e2)+dp *dp
double theNSFillDetMapMin2[5][5][73][43]
double theDFFillDetMapMin1[5][5][73][43]
void cms::Analyzer_minbias::endRun ( const edm::Run r,
const edm::EventSetup iSetup 
)
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 86 of file Analyzer_minbias.cc.

References nevent_run, and edm::RunBase::run().

86  {
87  edm::LogInfo("AnalyzerMB")<<" Runnumber "<<r.run()<<" Nevents "<<nevent_run;
88  }
RunNumber_t run() const
Definition: RunBase.h:40

Member Data Documentation

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

Definition at line 68 of file Analyzer_minbias.h.

Referenced by Analyzer_minbias(), and beginJob().

TH1F* cms::Analyzer_minbias::hbheNoiseE
private

Definition at line 82 of file Analyzer_minbias.h.

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

TH1F* cms::Analyzer_minbias::hbheSignalE
private

Definition at line 83 of file Analyzer_minbias.h.

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

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

Definition at line 69 of file Analyzer_minbias.h.

TH1F* cms::Analyzer_minbias::hCalo1[73][43]
private

Definition at line 78 of file Analyzer_minbias.h.

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

TH1F* cms::Analyzer_minbias::hCalo1mom2[73][43]
private

Definition at line 80 of file Analyzer_minbias.h.

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

TH1F* cms::Analyzer_minbias::hCalo2[73][43]
private

Definition at line 79 of file Analyzer_minbias.h.

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

TH1F* cms::Analyzer_minbias::hCalo2mom2[73][43]
private

Definition at line 81 of file Analyzer_minbias.h.

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

TH1F* cms::Analyzer_minbias::hfNoiseE
private

Definition at line 84 of file Analyzer_minbias.h.

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

TH1F* cms::Analyzer_minbias::hfSignalE
private

Definition at line 85 of file Analyzer_minbias.h.

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

TH2F* cms::Analyzer_minbias::hHBHEsize_vs_run
private

Definition at line 87 of file Analyzer_minbias.h.

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

TH2F* cms::Analyzer_minbias::hHFsize_vs_run
private

Definition at line 88 of file Analyzer_minbias.h.

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

TFile* cms::Analyzer_minbias::hOutputFile
private

Definition at line 76 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

int cms::Analyzer_minbias::ieta
private

Definition at line 91 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

int cms::Analyzer_minbias::iphi
private

Definition at line 91 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

double cms::Analyzer_minbias::meannoise_min[73][43]
private

Definition at line 99 of file Analyzer_minbias.h.

Referenced by beginJob().

double cms::Analyzer_minbias::meannoise_pl[73][43]
private

Definition at line 99 of file Analyzer_minbias.h.

Referenced by beginJob().

float cms::Analyzer_minbias::mom0_Diff
private

Definition at line 95 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

float cms::Analyzer_minbias::mom0_MB
private

Definition at line 93 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

float cms::Analyzer_minbias::mom0_Noise
private

Definition at line 94 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

float cms::Analyzer_minbias::mom1_Diff
private

Definition at line 95 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

float cms::Analyzer_minbias::mom1_MB
private

Definition at line 93 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

float cms::Analyzer_minbias::mom1_Noise
private

Definition at line 94 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

float cms::Analyzer_minbias::mom2_Diff
private

Definition at line 95 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

float cms::Analyzer_minbias::mom2_MB
private

Definition at line 93 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

float cms::Analyzer_minbias::mom2_Noise
private

Definition at line 94 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

float cms::Analyzer_minbias::mom3_Diff
private

Definition at line 95 of file Analyzer_minbias.h.

float cms::Analyzer_minbias::mom3_MB
private

Definition at line 93 of file Analyzer_minbias.h.

float cms::Analyzer_minbias::mom3_Noise
private

Definition at line 94 of file Analyzer_minbias.h.

float cms::Analyzer_minbias::mom4_Diff
private

Definition at line 95 of file Analyzer_minbias.h.

float cms::Analyzer_minbias::mom4_MB
private

Definition at line 93 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

float cms::Analyzer_minbias::mom4_Noise
private

Definition at line 94 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

int cms::Analyzer_minbias::mydet
private

Definition at line 91 of file Analyzer_minbias.h.

Referenced by beginJob().

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

Definition at line 70 of file Analyzer_minbias.h.

Referenced by beginJob().

int cms::Analyzer_minbias::mysubd
private

Definition at line 91 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

TTree* cms::Analyzer_minbias::myTree
private

Definition at line 77 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

double cms::Analyzer_minbias::nevent
private

Definition at line 104 of file Analyzer_minbias.h.

Referenced by analyze(), and beginJob().

int cms::Analyzer_minbias::nevent_run
private

Definition at line 90 of file Analyzer_minbias.h.

Referenced by analyze(), beginRun(), and endRun().

double cms::Analyzer_minbias::noise_min[73][43]
private

Definition at line 100 of file Analyzer_minbias.h.

Referenced by Analyzer_minbias().

double cms::Analyzer_minbias::noise_pl[73][43]
private

Definition at line 100 of file Analyzer_minbias.h.

Referenced by Analyzer_minbias().

float cms::Analyzer_minbias::occup
private

Definition at line 93 of file Analyzer_minbias.h.

Referenced by beginJob().

float cms::Analyzer_minbias::phi
private

Definition at line 92 of file Analyzer_minbias.h.

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

double cms::Analyzer_minbias::theDFFillDetMapMin0[5][5][73][43]
private

Definition at line 128 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

double cms::Analyzer_minbias::theDFFillDetMapMin1[5][5][73][43]
private

Definition at line 129 of file Analyzer_minbias.h.

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

double cms::Analyzer_minbias::theDFFillDetMapMin2[5][5][73][43]
private

Definition at line 130 of file Analyzer_minbias.h.

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

double cms::Analyzer_minbias::theDFFillDetMapPl0[5][5][73][43]
private

Definition at line 125 of file Analyzer_minbias.h.

Referenced by beginJob(), and endJob().

double cms::Analyzer_minbias::theDFFillDetMapPl1[5][5][73][43]
private

Definition at line 126 of file Analyzer_minbias.h.

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

double cms::Analyzer_minbias::theDFFillDetMapPl2[5][5][73][43]
private

Definition at line 127 of file Analyzer_minbias.h.

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

double cms::Analyzer_minbias::theMBFillDetMapMin0[5][5][73][43]
private

Definition at line 110 of file Analyzer_minbias.h.

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

double cms::Analyzer_minbias::theMBFillDetMapMin1[5][5][73][43]
private

Definition at line 111 of file Analyzer_minbias.h.

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

double cms::Analyzer_minbias::theMBFillDetMapMin2[5][5][73][43]
private

Definition at line 112 of file Analyzer_minbias.h.

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

double cms::Analyzer_minbias::theMBFillDetMapMin4[5][5][73][43]
private

Definition at line 113 of file Analyzer_minbias.h.

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

double cms::Analyzer_minbias::theMBFillDetMapPl0[5][5][73][43]
private

Definition at line 105 of file Analyzer_minbias.h.

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

double cms::Analyzer_minbias::theMBFillDetMapPl1[5][5][73][43]
private

Definition at line 106 of file Analyzer_minbias.h.

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

double cms::Analyzer_minbias::theMBFillDetMapPl2[5][5][73][43]
private

Definition at line 107 of file Analyzer_minbias.h.

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

double cms::Analyzer_minbias::theMBFillDetMapPl4[5][5][73][43]
private

Definition at line 108 of file Analyzer_minbias.h.

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

double cms::Analyzer_minbias::theNSFillDetMapMin0[5][5][73][43]
private

Definition at line 120 of file Analyzer_minbias.h.

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

double cms::Analyzer_minbias::theNSFillDetMapMin1[5][5][73][43]
private

Definition at line 121 of file Analyzer_minbias.h.

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

double cms::Analyzer_minbias::theNSFillDetMapMin2[5][5][73][43]
private

Definition at line 122 of file Analyzer_minbias.h.

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

double cms::Analyzer_minbias::theNSFillDetMapMin4[5][5][73][43]
private

Definition at line 123 of file Analyzer_minbias.h.

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

double cms::Analyzer_minbias::theNSFillDetMapPl0[5][5][73][43]
private

Definition at line 115 of file Analyzer_minbias.h.

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

double cms::Analyzer_minbias::theNSFillDetMapPl1[5][5][73][43]
private

Definition at line 116 of file Analyzer_minbias.h.

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

double cms::Analyzer_minbias::theNSFillDetMapPl2[5][5][73][43]
private

Definition at line 117 of file Analyzer_minbias.h.

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

double cms::Analyzer_minbias::theNSFillDetMapPl4[5][5][73][43]
private

Definition at line 118 of file Analyzer_minbias.h.

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

bool cms::Analyzer_minbias::theRecalib
private

Definition at line 145 of file Analyzer_minbias.h.

Referenced by analyze(), and Analyzer_minbias().

edm::EDGetTokenT<FEDRawDataCollection> cms::Analyzer_minbias::tok_data_
private

Definition at line 72 of file Analyzer_minbias.h.

Referenced by Analyzer_minbias().

edm::EDGetTokenT<L1GlobalTriggerReadoutRecord> cms::Analyzer_minbias::tok_gtRec_
private

Definition at line 142 of file Analyzer_minbias.h.

Referenced by Analyzer_minbias().

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

Definition at line 133 of file Analyzer_minbias.h.

Referenced by analyze(), and Analyzer_minbias().

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

Definition at line 137 of file Analyzer_minbias.h.

Referenced by analyze(), and Analyzer_minbias().

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

Definition at line 143 of file Analyzer_minbias.h.

Referenced by analyze(), and Analyzer_minbias().

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

Definition at line 135 of file Analyzer_minbias.h.

Referenced by analyze(), and Analyzer_minbias().

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

Definition at line 139 of file Analyzer_minbias.h.

Referenced by analyze(), and Analyzer_minbias().

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

Definition at line 134 of file Analyzer_minbias.h.

Referenced by Analyzer_minbias().

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

Definition at line 138 of file Analyzer_minbias.h.

Referenced by Analyzer_minbias().