CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
RecAnalyzerMinbias Class Reference

#include <Calibration/HcalCalibAlgos/test/RecAnalyzerMinbias.cc>

Inheritance diagram for RecAnalyzerMinbias:
edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Classes

struct  myInfo
 

Public Member Functions

 RecAnalyzerMinbias (const edm::ParameterSet &)
 
 ~RecAnalyzerMinbias () override=default
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::SharedResources >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const noexcept final
 
bool wantsGlobalRuns () const noexcept final
 
bool wantsInputProcessBlocks () const noexcept final
 
bool wantsProcessBlocks () const noexcept final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const noexcept
 
bool wantsStreamRuns () const noexcept
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

void analyze (edm::Event const &, edm::EventSetup const &) override
 
void analyzeHcal (const HBHERecHitCollection &, const HFRecHitCollection &, int, bool, double)
 
void beginJob () override
 
void beginRun (edm::Run const &, edm::EventSetup const &) override
 
void endJob () override
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 

Private Attributes

int cells
 
const std::string cfile_
 
std::map< DetId, double > corrFactor_
 
int depth
 
const double eHighHB_
 
const double eHighHE_
 
const double eHighHF_
 
const double eLowHB_
 
const double eLowHE_
 
const double eLowHF_
 
const double eMin_
 
const bool extraHist_
 
const bool fillHist_
 
TH1D * h_ [4]
 
TH1D * h_AmplitudeHB_
 
TH1D * h_AmplitudeHBtest_
 
TH1D * h_AmplitudeHE_
 
TH1D * h_AmplitudeHEtest_
 
TH1D * h_AmplitudeHF_
 
TH1D * h_AmplitudeHFtest_
 
TH2D * hb_
 
TH2D * hbhe_
 
TProfile * hbherun_
 
int HBHEsize
 
TProfile * hbrun_
 
std::vector< unsigned int > hcalID_
 
TH2D * he_
 
TProfile * herun_
 
TH2D * hf_
 
TProfile * hfrun_
 
int HFsize
 
std::map< HcalDetId, TH1D * > histHC_
 
std::vector< TH1D * > histo_
 
int ieta
 
const bool ignoreL1_
 
bool init_
 
int iphi
 
float mom0_MB
 
float mom1_MB
 
float mom2_MB
 
float mom3_MB
 
float mom4_MB
 
std::map< std::pair< int, HcalDetId >, myInfomyMap_
 
int mysubd
 
TTree * myTree1_
 
TTree * myTree_
 
const bool Noise_
 
double rnnum_
 
double rnnumber
 
const int runMax_
 
const int runMin_
 
const bool runNZS_
 
bool theRecalib_
 
const edm::EDGetTokenT< GenEventInfoProducttok_ew_
 
const edm::EDGetTokenT< L1GlobalTriggerReadoutRecordtok_gtRec_
 
const edm::EDGetTokenT< HBHEDigiCollectiontok_hbhedigi_
 
const edm::EDGetTokenT< HBHERecHitCollectiontok_hbherecoMB_
 
const edm::EDGetTokenT< HFDigiCollectiontok_hfdigi_
 
const edm::EDGetTokenT< HFRecHitCollectiontok_hfrecoMB_
 
const edm::EDGetTokenT< L1GlobalTriggerObjectMapRecordtok_hltL1GtMap_
 
const edm::EDGetTokenT< HODigiCollectiontok_hodigi_
 
const edm::ESGetToken< HcalTopology, HcalRecNumberingRecordtok_htopo_
 
const edm::EDGetTokenT< QIE10DigiCollectiontok_qie10digi_
 
const edm::EDGetTokenT< QIE11DigiCollectiontok_qie11digi_
 
int trigbit
 
const std::vector< int > trigbit_
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Description: Performs phi-symmetry studies of HB/HE/HF channels

Implementation: <Notes on="" implementation>="">

Definition at line 67 of file RecAnalyzerMinbias.cc.

Constructor & Destructor Documentation

◆ RecAnalyzerMinbias()

RecAnalyzerMinbias::RecAnalyzerMinbias ( const edm::ParameterSet iConfig)
explicit

Definition at line 129 of file RecAnalyzerMinbias.cc.

References funct::abs(), cfile_, corrFactor_, depth, hcalRecHitTable_cff::detId, eHighHB_, eHighHE_, eHighHF_, eLowHB_, eLowHE_, eLowHF_, edm::ParameterSet::getUntrackedParameter(), HcalBarrel, HcalEndcap, HcalForward, hcalID_, HcalOuter, EcalPhiSymFlatTableProducers_cfi::id, ieta, ignoreL1_, timingPdfMaker::infile, iphi, isotrackApplyRegressor::k, nano_mu_digi_cff::rawId, runNZS_, theRecalib_, and trigbit_.

130  : runNZS_(iConfig.getParameter<bool>("runNZS")),
131  Noise_(iConfig.getParameter<bool>("noise")),
132  ignoreL1_(iConfig.getUntrackedParameter<bool>("ignoreL1", false)),
133  fillHist_(iConfig.getUntrackedParameter<bool>("fillHisto", false)),
134  extraHist_(iConfig.getUntrackedParameter<bool>("extraHisto", false)),
135  eLowHB_(iConfig.getParameter<double>("eLowHB")),
136  eHighHB_(iConfig.getParameter<double>("eHighHB")),
137  eLowHE_(iConfig.getParameter<double>("eLowHE")),
138  eHighHE_(iConfig.getParameter<double>("eHighHE")),
139  eLowHF_(iConfig.getParameter<double>("eLowHF")),
140  eHighHF_(iConfig.getParameter<double>("eHighHF")),
141  eMin_(iConfig.getUntrackedParameter<double>("eMin", 2.0)),
142  runMin_(iConfig.getUntrackedParameter<int>("RunMin", 308327)),
143  runMax_(iConfig.getUntrackedParameter<int>("RunMax", 315250)),
144  trigbit_(iConfig.getUntrackedParameter<std::vector<int>>("triggerBits")),
145  cfile_(iConfig.getUntrackedParameter<std::string>("corrFile")),
146  init_(false),
147  tok_hbherecoMB_(consumes<HBHERecHitCollection>(iConfig.getParameter<edm::InputTag>("hbheInputMB"))),
148  tok_hfrecoMB_(consumes<HFRecHitCollection>(iConfig.getParameter<edm::InputTag>("hfInputMB"))),
149  tok_hltL1GtMap_(consumes<L1GlobalTriggerObjectMapRecord>(edm::InputTag("hltL1GtObjectMap"))),
150  tok_ew_(consumes<GenEventInfoProduct>(edm::InputTag("generator"))),
151  tok_hbhedigi_(consumes<HBHEDigiCollection>(iConfig.getParameter<edm::InputTag>("hcalDigiCollectionTag"))),
152  tok_qie11digi_(consumes<QIE11DigiCollection>(iConfig.getParameter<edm::InputTag>("hcalDigiCollectionTag"))),
153  tok_hodigi_(consumes<HODigiCollection>(iConfig.getParameter<edm::InputTag>("hcalDigiCollectionTag"))),
154  tok_hfdigi_(consumes<HFDigiCollection>(iConfig.getParameter<edm::InputTag>("hcalDigiCollectionTag"))),
155  tok_qie10digi_(consumes<QIE10DigiCollection>(iConfig.getParameter<edm::InputTag>("hcalDigiCollectionTag"))),
156  tok_gtRec_(consumes<L1GlobalTriggerReadoutRecord>(edm::InputTag("gtDigisAlCaMB"))),
157  tok_htopo_(esConsumes<HcalTopology, HcalRecNumberingRecord, edm::Transition::BeginRun>()) {
158  usesResource("TFileService");
159 
160  // get constants for DetID's
161  std::vector<int> ieta = iConfig.getUntrackedParameter<std::vector<int>>("hcalIeta");
162  std::vector<int> iphi = iConfig.getUntrackedParameter<std::vector<int>>("hcalIphi");
163  std::vector<int> depth = iConfig.getUntrackedParameter<std::vector<int>>("hcalDepth");
164 
165  // Read correction factors
166  std::ifstream infile(cfile_.c_str());
167  if (!infile.is_open()) {
168  theRecalib_ = false;
169  edm::LogWarning("RecAnalyzerMinbias") << "Cannot open '" << cfile_ << "' for the correction file";
170  } else {
171  unsigned int ndets(0), nrec(0);
172  while (true) {
173  unsigned int id;
174  double cfac;
175  infile >> id >> cfac;
176  if (!infile.good())
177  break;
178  HcalDetId detId(id);
179  nrec++;
180  std::map<DetId, double>::iterator itr = corrFactor_.find(detId);
181  if (itr == corrFactor_.end()) {
182  corrFactor_[detId] = cfac;
183  ndets++;
184  }
185  }
186  infile.close();
187  edm::LogVerbatim("RecAnalyzerMinbias") << "Reads " << nrec << " correction factors for " << ndets << " detIds";
188  theRecalib_ = (ndets > 0);
189  }
190 
191  edm::LogVerbatim("RecAnalyzerMinbias") << " Flags (ReCalib): " << theRecalib_ << " (IgnoreL1): " << ignoreL1_
192  << " (NZS) " << runNZS_ << " and with " << ieta.size()
193  << " detId for full histogram";
194  edm::LogVerbatim("RecAnalyzerMinbias") << "Thresholds for HB " << eLowHB_ << ":" << eHighHB_ << " for HE " << eLowHE_
195  << ":" << eHighHE_ << " for HF " << eLowHF_ << ":" << eHighHF_;
196  for (unsigned int k = 0; k < ieta.size(); ++k) {
197  HcalSubdetector subd = ((std::abs(ieta[k]) > 29) ? HcalForward
198  : (std::abs(ieta[k]) > 16) ? HcalEndcap
199  : ((std::abs(ieta[k]) == 16) && (depth[k] == 3)) ? HcalEndcap
200  : (depth[k] == 4) ? HcalOuter
201  : HcalBarrel);
202  unsigned int id = (HcalDetId(subd, ieta[k], iphi[k], depth[k])).rawId();
203  hcalID_.push_back(id);
204  edm::LogVerbatim("RecAnalyzerMinbias") << "DetId[" << k << "] " << HcalDetId(id);
205  }
206  edm::LogVerbatim("RecAnalyzerMinbias") << "Select on " << trigbit_.size() << " L1 Trigger selection";
207  for (unsigned int k = 0; k < trigbit_.size(); ++k)
208  edm::LogVerbatim("RecAnalyzerMinbias") << "Bit[" << k << "] " << trigbit_[k];
209 }
Log< level::Info, true > LogVerbatim
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
const edm::EDGetTokenT< HFDigiCollection > tok_hfdigi_
const edm::EDGetTokenT< GenEventInfoProduct > tok_ew_
const edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > tok_htopo_
const edm::EDGetTokenT< QIE11DigiCollection > tok_qie11digi_
T getUntrackedParameter(std::string const &, T const &) const
const std::string cfile_
const edm::EDGetTokenT< HFRecHitCollection > tok_hfrecoMB_
const edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > tok_gtRec_
HcalSubdetector
Definition: HcalAssistant.h:31
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const edm::EDGetTokenT< HBHERecHitCollection > tok_hbherecoMB_
std::vector< unsigned int > hcalID_
const edm::EDGetTokenT< QIE10DigiCollection > tok_qie10digi_
const edm::EDGetTokenT< L1GlobalTriggerObjectMapRecord > tok_hltL1GtMap_
const std::vector< int > trigbit_
const edm::EDGetTokenT< HODigiCollection > tok_hodigi_
const edm::EDGetTokenT< HBHEDigiCollection > tok_hbhedigi_
Log< level::Warning, false > LogWarning
std::map< DetId, double > corrFactor_

◆ ~RecAnalyzerMinbias()

RecAnalyzerMinbias::~RecAnalyzerMinbias ( )
overridedefault

Member Function Documentation

◆ analyze()

void RecAnalyzerMinbias::analyze ( edm::Event const &  iEvent,
edm::EventSetup const &  iSetup 
)
overrideprivatevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 418 of file RecAnalyzerMinbias.cc.

References gpuClustering::adc, analyzeHcal(), extraHist_, spr::find(), genParticles2HepMC_cfi::genEventInfo, L1GlobalTriggerObjectMapRecord::gtObjectMap(), h_AmplitudeHB_, h_AmplitudeHBtest_, h_AmplitudeHE_, h_AmplitudeHEtest_, h_AmplitudeHF_, h_AmplitudeHFtest_, HBHEsize, HcalBarrel, HcalEndcap, HcalForward, HFsize, mps_fire::i, iEvent, ignoreL1_, edm::HandleBase::isValid(), myTree1_, convertSQLiteXML::ok, edm::Handle< T >::product(), rnnum_, runNZS_, singleTopDQM_cfi::select, edm::SortedCollection< T, SORT >::size(), tok_ew_, tok_hbhedigi_, tok_hbherecoMB_, tok_hfdigi_, tok_hfrecoMB_, tok_hltL1GtMap_, tok_qie10digi_, tok_qie11digi_, and trigbit_.

418  {
419  rnnum_ = (double)iEvent.run();
420 
421  if (extraHist_) {
422  double amplitudefullHB(0), amplitudefullHE(0), amplitudefullHF(0);
423  const edm::Handle<HBHEDigiCollection>& hbhedigi = iEvent.getHandle(tok_hbhedigi_);
424  if (hbhedigi.isValid()) {
425  for (auto const& digi : *(hbhedigi.product())) {
426  int nTS = digi.size();
427  double amplitudefullTSs = 0.;
428  if (digi.id().subdet() == HcalBarrel) {
429  if (nTS <= 10) {
430  for (int i = 0; i < nTS; i++)
431  amplitudefullTSs += digi.sample(i).adc();
432  h_AmplitudeHBtest_->Fill(amplitudefullTSs);
433  amplitudefullHB += amplitudefullTSs;
434  }
435  }
436  if (digi.id().subdet() == HcalEndcap) {
437  if (nTS <= 10) {
438  for (int i = 0; i < nTS; i++)
439  amplitudefullTSs += digi.sample(i).adc();
440  h_AmplitudeHEtest_->Fill(amplitudefullTSs);
441  amplitudefullHE += amplitudefullTSs;
442  }
443  }
444  }
445  }
446 
447  const edm::Handle<QIE11DigiCollection>& qie11digi = iEvent.getHandle(tok_qie11digi_);
448  if (qie11digi.isValid()) {
449  for (QIE11DataFrame const digi : *(qie11digi.product())) {
450  double amplitudefullTSs = 0.;
451  if (HcalDetId(digi.id()).subdet() == HcalBarrel) {
452  for (int i = 0; i < digi.samples(); i++)
453  amplitudefullTSs += digi[i].adc();
454  h_AmplitudeHBtest_->Fill(amplitudefullTSs);
455  amplitudefullHB += amplitudefullTSs;
456  }
457  if (HcalDetId(digi.id()).subdet() == HcalEndcap) {
458  for (int i = 0; i < digi.samples(); i++)
459  amplitudefullTSs += digi[i].adc();
460  h_AmplitudeHEtest_->Fill(amplitudefullTSs);
461  amplitudefullHE += amplitudefullTSs;
462  }
463  }
464  }
465 
466  const edm::Handle<HFDigiCollection>& hfdigi = iEvent.getHandle(tok_hfdigi_);
467  if (hfdigi.isValid()) {
468  for (auto const& digi : *(hfdigi.product())) {
469  int nTS = digi.size();
470  double amplitudefullTSs = 0.;
471  if (digi.id().subdet() == HcalForward) {
472  if (nTS <= 10) {
473  for (int i = 0; i < nTS; i++)
474  amplitudefullTSs += digi.sample(i).adc();
475  h_AmplitudeHFtest_->Fill(amplitudefullTSs);
476  amplitudefullHF += amplitudefullTSs;
477  }
478  }
479  }
480  }
481 
482  const edm::Handle<QIE10DigiCollection>& qie10digi = iEvent.getHandle(tok_qie10digi_);
483  if (qie10digi.isValid()) {
484  for (QIE10DataFrame const digi : *(qie10digi.product())) {
485  double amplitudefullTSs = 0.;
486  if (HcalDetId(digi.id()).subdet() == HcalForward) {
487  for (int i = 0; i < digi.samples(); i++)
488  amplitudefullTSs += digi[i].adc();
489  h_AmplitudeHFtest_->Fill(amplitudefullTSs);
490  amplitudefullHF += amplitudefullTSs;
491  }
492  }
493  }
494 
495  h_AmplitudeHB_->Fill(amplitudefullHB);
496  h_AmplitudeHE_->Fill(amplitudefullHE);
497  h_AmplitudeHF_->Fill(amplitudefullHF);
498  }
499 
500  const edm::Handle<HBHERecHitCollection>& hbheMB = iEvent.getHandle(tok_hbherecoMB_);
501  if (!hbheMB.isValid()) {
502  edm::LogWarning("RecAnalyzerMinbias") << "HcalCalibAlgos: Error! can't get hbhe product!";
503  return;
504  }
505  const HBHERecHitCollection HithbheMB = *(hbheMB.product());
506  HBHEsize = HithbheMB.size();
507  edm::LogVerbatim("RecAnalyzerMinbias") << "HBHE MB size of collection " << HithbheMB.size();
508  if (HithbheMB.size() < 5100 && runNZS_) {
509  edm::LogWarning("RecAnalyzerMinbias") << "HBHE problem " << rnnum_ << " size " << HBHEsize;
510  }
511 
512  const edm::Handle<HFRecHitCollection> hfMB = iEvent.getHandle(tok_hfrecoMB_);
513  if (!hfMB.isValid()) {
514  edm::LogWarning("RecAnalyzerMinbias") << "HcalCalibAlgos: Error! can't get hf product!";
515  return;
516  }
517  const HFRecHitCollection HithfMB = *(hfMB.product());
518  edm::LogVerbatim("RecAnalyzerMinbias") << "HF MB size of collection " << HithfMB.size();
519  HFsize = HithfMB.size();
520  if (HithfMB.size() < 1700 && runNZS_) {
521  edm::LogWarning("RecAnalyzerMinbias") << "HF problem " << rnnum_ << " size " << HFsize;
522  }
523 
524  bool select(false);
525  if (!trigbit_.empty()) {
526  const edm::Handle<L1GlobalTriggerObjectMapRecord>& gtObjectMapRecord = iEvent.getHandle(tok_hltL1GtMap_);
527  if (gtObjectMapRecord.isValid()) {
528  const std::vector<L1GlobalTriggerObjectMap>& objMapVec = gtObjectMapRecord->gtObjectMap();
529  for (std::vector<L1GlobalTriggerObjectMap>::const_iterator itMap = objMapVec.begin(); itMap != objMapVec.end();
530  ++itMap) {
531  bool resultGt = (*itMap).algoGtlResult();
532  if (resultGt) {
533  int algoBit = (*itMap).algoBitNumber();
534  if (std::find(trigbit_.begin(), trigbit_.end(), algoBit) != trigbit_.end()) {
535  select = true;
536  break;
537  }
538  }
539  }
540  }
541  }
542 
543  if (!trigbit_.empty() || select)
544  myTree1_->Fill();
545 
546  //event weight for FLAT sample and PU information
547  double eventWeight = 1.0;
549  if (genEventInfo.isValid())
550  eventWeight = genEventInfo->weight();
551 #ifdef EDM_ML_DEBUG
552  edm::LogVerbatim("RecAnalyzerMinbias") << "Test HB " << HBHEsize << " HF " << HFsize << " Trigger " << trigbit_.size()
553  << ":" << select << ":" << ignoreL1_ << " Wt " << eventWeight;
554 #endif
555  if (ignoreL1_ || (!trigbit_.empty() && select)) {
556  analyzeHcal(HithbheMB, HithfMB, 1, true, eventWeight);
557  } else if ((!ignoreL1_) && (trigbit_.empty())) {
558  const edm::Handle<L1GlobalTriggerObjectMapRecord>& gtObjectMapRecord = iEvent.getHandle(tok_hltL1GtMap_);
559  if (gtObjectMapRecord.isValid()) {
560  const std::vector<L1GlobalTriggerObjectMap>& objMapVec = gtObjectMapRecord->gtObjectMap();
561  bool ok(false);
562  for (std::vector<L1GlobalTriggerObjectMap>::const_iterator itMap = objMapVec.begin(); itMap != objMapVec.end();
563  ++itMap) {
564  bool resultGt = (*itMap).algoGtlResult();
565  if (resultGt) {
566  int algoBit = (*itMap).algoBitNumber();
567  analyzeHcal(HithbheMB, HithfMB, algoBit, (!ok), eventWeight);
568  ok = true;
569  }
570  }
571  if (!ok) {
572  edm::LogVerbatim("RecAnalyzerMinbias") << "No passed L1 Trigger found";
573  }
574  }
575  }
576 }
Log< level::Info, true > LogVerbatim
const edm::EDGetTokenT< HFDigiCollection > tok_hfdigi_
size_type size() const
const edm::EDGetTokenT< GenEventInfoProduct > tok_ew_
T const * product() const
Definition: Handle.h:70
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
const edm::EDGetTokenT< QIE11DigiCollection > tok_qie11digi_
const std::vector< L1GlobalTriggerObjectMap > & gtObjectMap() const
get / set the vector of object maps
int iEvent
Definition: GenABIO.cc:224
const edm::EDGetTokenT< HFRecHitCollection > tok_hfrecoMB_
const edm::EDGetTokenT< HBHERecHitCollection > tok_hbherecoMB_
void analyzeHcal(const HBHERecHitCollection &, const HFRecHitCollection &, int, bool, double)
const edm::EDGetTokenT< QIE10DigiCollection > tok_qie10digi_
const edm::EDGetTokenT< L1GlobalTriggerObjectMapRecord > tok_hltL1GtMap_
bool isValid() const
Definition: HandleBase.h:70
const std::vector< int > trigbit_
const edm::EDGetTokenT< HBHEDigiCollection > tok_hbhedigi_
Log< level::Warning, false > LogWarning
uint16_t *__restrict__ uint16_t const *__restrict__ adc

◆ analyzeHcal()

void RecAnalyzerMinbias::analyzeHcal ( const HBHERecHitCollection HithbheMB,
const HFRecHitCollection HithfMB,
int  algoBit,
bool  fill,
double  weight 
)
private

Definition at line 578 of file RecAnalyzerMinbias.cc.

References edm::SortedCollection< T, SORT >::begin(), corrFactor_, submitPVResolutionJobs::count, eHighHB_, eHighHE_, eHighHF_, eLowHB_, eLowHE_, eLowHF_, eMin_, edm::SortedCollection< T, SORT >::end(), CaloRecHit::energy(), EcalPhiSymFlatTableProducers_cfi::fill, fillHist_, h_, hb_, hbhe_, hbherun_, hbrun_, HcalBarrel, HcalEndcap, hcalID_, he_, herun_, hf_, hfrun_, histHC_, histo_, mps_fire::i, HcalDetId::ieta(), info(), HcalDetId::iphi(), myMap_, Noise_, DetId::rawId(), nano_mu_digi_cff::rawId, rnnum_, runNZS_, HcalDetId::subdet(), theRecalib_, and mps_merge::weight.

Referenced by analyze().

579  {
580  // Signal part for HB HE
581  int count(0), countHB(0), countHE(0), count2(0), count2HB(0), count2HE(0);
582  for (HBHERecHitCollection::const_iterator hbheItr = HithbheMB.begin(); hbheItr != HithbheMB.end(); hbheItr++) {
583  // Recalibration of energy
584  DetId mydetid = hbheItr->id().rawId();
585  double icalconst(1.);
586  if (theRecalib_) {
587  std::map<DetId, double>::iterator itr = corrFactor_.find(mydetid);
588  if (itr != corrFactor_.end())
589  icalconst = itr->second;
590  }
591  HBHERecHit aHit(hbheItr->id(), hbheItr->energy() * icalconst, hbheItr->time());
592  double energyhit = aHit.energy();
593  DetId id = (*hbheItr).detid();
594  HcalDetId hid = HcalDetId(id);
595  double eLow = (hid.subdet() == HcalEndcap) ? eLowHE_ : eLowHB_;
596  double eHigh = (hid.subdet() == HcalEndcap) ? eHighHE_ : eHighHB_;
597  ++count;
598  if (id.subdetId() == HcalBarrel)
599  ++countHB;
600  else
601  ++countHE;
602  if (fill) {
603  for (unsigned int i = 0; i < hcalID_.size(); i++) {
604  if (hcalID_[i] == id.rawId()) {
605  histo_[i]->Fill(energyhit);
606  break;
607  }
608  }
609  if (fillHist_) {
610  std::map<HcalDetId, TH1D*>::iterator itr1 = histHC_.find(hid);
611  if (itr1 != histHC_.end())
612  itr1->second->Fill(energyhit);
613  }
614  h_[hid.subdet() - 1]->Fill(energyhit);
615  if (energyhit > eMin_) {
616  hbhe_->Fill(hid.ieta(), hid.iphi());
617  ++count2;
618  if (id.subdetId() == HcalBarrel) {
619  ++count2HB;
620  hb_->Fill(hid.ieta(), hid.iphi());
621  } else {
622  ++count2HE;
623  he_->Fill(hid.ieta(), hid.iphi());
624  }
625  }
626  }
627  if (!fillHist_) {
628  if (Noise_ || runNZS_ || (energyhit >= eLow && energyhit <= eHigh)) {
629  std::map<std::pair<int, HcalDetId>, myInfo>::iterator itr1 =
630  myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
631  if (itr1 == myMap_.end()) {
632  myInfo info;
633  myMap_[std::pair<int, HcalDetId>(algoBit, hid)] = info;
634  itr1 = myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
635  }
636  itr1->second.theMB0 += weight;
637  itr1->second.theMB1 += (weight * energyhit);
638  itr1->second.theMB2 += (weight * energyhit * energyhit);
639  itr1->second.theMB3 += (weight * energyhit * energyhit * energyhit);
640  itr1->second.theMB4 += (weight * energyhit * energyhit * energyhit * energyhit);
641  itr1->second.runcheck = rnnum_;
642  }
643  }
644  } // HBHE_MB
645  if (fill) {
646  if (count > 0)
647  hbherun_->Fill(rnnum_, (double)(count2) / count);
648  if (countHB > 0)
649  hbrun_->Fill(rnnum_, (double)(count2HB) / countHB);
650  if (countHE > 0)
651  herun_->Fill(rnnum_, (double)(count2HE) / countHE);
652  }
653 #ifdef EDM_ML_DEBUG
654  edm::LogVerbatim("RecAnalyzerMinbias") << "HBHE " << count2 << ":" << count << ":" << (double)(count2) / count
655  << "\t HB " << count2HB << ":" << countHB << ":"
656  << (double)(count2HB) / countHB << "\t HE " << count2HE << ":" << countHE
657  << ":" << (double)(count2HE) / countHE;
658 #endif
659  int countHF(0), count2HF(0);
660  // Signal part for HF
661  for (HFRecHitCollection::const_iterator hfItr = HithfMB.begin(); hfItr != HithfMB.end(); hfItr++) {
662  // Recalibration of energy
663  DetId mydetid = hfItr->id().rawId();
664  double icalconst(1.);
665  if (theRecalib_) {
666  std::map<DetId, double>::iterator itr = corrFactor_.find(mydetid);
667  if (itr != corrFactor_.end())
668  icalconst = itr->second;
669  }
670  HFRecHit aHit(hfItr->id(), hfItr->energy() * icalconst, hfItr->time());
671 
672  double energyhit = aHit.energy();
673  DetId id = (*hfItr).detid();
674  HcalDetId hid = HcalDetId(id);
675  ++countHF;
676  if (fill) {
677  for (unsigned int i = 0; i < hcalID_.size(); i++) {
678  if (hcalID_[i] == id.rawId()) {
679  histo_[i]->Fill(energyhit);
680  break;
681  }
682  }
683  if (fillHist_) {
684  std::map<HcalDetId, TH1D*>::iterator itr1 = histHC_.find(hid);
685  if (itr1 != histHC_.end())
686  itr1->second->Fill(energyhit);
687  }
688  h_[hid.subdet() - 1]->Fill(energyhit);
689  if (energyhit > eMin_) {
690  hf_->Fill(hid.ieta(), hid.iphi());
691  ++count2HF;
692  }
693  }
694 
695  //
696  // Remove PMT hits
697  //
698  if (!fillHist_) {
699  if (((Noise_ || runNZS_) && fabs(energyhit) <= 40.) || (energyhit >= eLowHF_ && energyhit <= eHighHF_)) {
700  std::map<std::pair<int, HcalDetId>, myInfo>::iterator itr1 =
701  myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
702  if (itr1 == myMap_.end()) {
703  myInfo info;
704  myMap_[std::pair<int, HcalDetId>(algoBit, hid)] = info;
705  itr1 = myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
706  }
707  itr1->second.theMB0 += weight;
708  itr1->second.theMB1 += (weight * energyhit);
709  itr1->second.theMB2 += (weight * energyhit * energyhit);
710  itr1->second.theMB3 += (weight * energyhit * energyhit * energyhit);
711  itr1->second.theMB4 += (weight * energyhit * energyhit * energyhit * energyhit);
712  itr1->second.runcheck = rnnum_;
713  }
714  }
715  }
716  if (fill && countHF > 0)
717  hfrun_->Fill(rnnum_, (double)(count2HF) / countHF);
718 #ifdef EDM_ML_DEBUG
719  if (count)
720  edm::LogVerbatim("RecAnalyzerMinbias")
721  << "HF " << count2HF << ":" << countHF << ":" << (double)(count2HF) / countHF;
722 #endif
723 }
Log< level::Info, true > LogVerbatim
static const TGPicture * info(bool iBackgroundIsBlack)
std::vector< T >::const_iterator const_iterator
Definition: weight.py:1
std::map< HcalDetId, TH1D * > histHC_
constexpr float energy() const
Definition: CaloRecHit.h:29
std::vector< TH1D * > histo_
constexpr HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:138
constexpr int ieta() const
get the cell ieta
Definition: HcalDetId.h:155
const_iterator begin() const
const_iterator end() const
Definition: DetId.h:17
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
std::vector< unsigned int > hcalID_
std::map< std::pair< int, HcalDetId >, myInfo > myMap_
constexpr int iphi() const
get the cell iphi
Definition: HcalDetId.h:157
std::map< DetId, double > corrFactor_

◆ beginJob()

void RecAnalyzerMinbias::beginJob ( )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 242 of file RecAnalyzerMinbias.cc.

References cells, depth, eMin_, extraHist_, fillHist_, make_classfiles::fs, h_, h_AmplitudeHB_, h_AmplitudeHBtest_, h_AmplitudeHE_, h_AmplitudeHEtest_, h_AmplitudeHF_, h_AmplitudeHFtest_, hb_, hbhe_, hbherun_, HBHEsize, hbrun_, hcalID_, he_, herun_, hf_, hfrun_, HFsize, ALPAKA_ACCELERATOR_NAMESPACE::caPixelDoublets::hh, histo_, ieta, iphi, mom0_MB, mom1_MB, mom2_MB, mom3_MB, mom4_MB, myMap_, mysubd, myTree1_, myTree_, mergeVDriftHistosByStation::name, rnnum_, rnnumber, runMax_, runMin_, AlCaHLTBitMon_QueryRunRegistry::string, runGCPTkAlMap::title, trigbit, TrackerOfflineValidation_Dqm_cff::xmax, and TrackerOfflineValidation_Dqm_cff::xmin.

242  {
244  std::string hc[5] = {"Empty", "HB", "HE", "HO", "HF"};
245  char name[700], title[700];
246  hbhe_ = fs->make<TH2D>("hbhe", "Noise in HB/HE", 61, -30.5, 30.5, 72, 0.5, 72.5);
247  hb_ = fs->make<TH2D>("hb", "Noise in HB", 61, -16.5, 16.5, 72, 0.5, 72.5);
248  he_ = fs->make<TH2D>("he", "Noise in HE", 61, -30.5, 30.5, 72, 0.5, 72.5);
249  hf_ = fs->make<TH2D>("hf", "Noise in HF", 82, -41.5, 41.5, 72, 0.5, 72.5);
250  int nbin = (runMax_ - runMin_ + 1);
251  sprintf(title, "Fraction of channels in HB/HE with E > %4.1f GeV vs Run number", eMin_);
252  hbherun_ = fs->make<TProfile>("hbherun", title, nbin, runMin_ - 0.5, runMax_ + 0.5, 0.0, 1.0);
253  sprintf(title, "Fraction of channels in HB with E > %4.1f GeV vs Run number", eMin_);
254  hbrun_ = fs->make<TProfile>("hbrun", title, nbin, runMin_ - 0.5, runMax_ + 0.5, 0.0, 1.0);
255  sprintf(title, "Fraction of channels in HE with E > %4.1f GeV vs Run number", eMin_);
256  herun_ = fs->make<TProfile>("herun", title, nbin, runMin_ - 0.5, runMax_ + 0.5, 0.0, 1.0);
257  sprintf(title, "Fraction of channels in HF with E > %4.1f GeV vs Run number", eMin_);
258  hfrun_ = fs->make<TProfile>("hfrun", title, nbin, runMin_ - 0.5, runMax_ + 0.5, 0.0, 1.0);
259  for (int idet = 1; idet <= 4; idet++) {
260  sprintf(name, "%s", hc[idet].c_str());
261  sprintf(title, "Noise distribution for %s", hc[idet].c_str());
262  h_[idet - 1] = fs->make<TH1D>(name, title, 48, -6., 6.);
263  }
264 
265  for (const auto& hcalid : hcalID_) {
266  HcalDetId id = HcalDetId(hcalid);
267  int subdet = id.subdetId();
268  sprintf(name, "%s%d_%d_%d", hc[subdet].c_str(), id.ieta(), id.iphi(), id.depth());
269  sprintf(title,
270  "Energy Distribution for %s ieta %d iphi %d depth %d",
271  hc[subdet].c_str(),
272  id.ieta(),
273  id.iphi(),
274  id.depth());
275  double xmin = (subdet == 4) ? -10 : -1;
276  double xmax = (subdet == 4) ? 90 : 9;
277  TH1D* hh = fs->make<TH1D>(name, title, 50, xmin, xmax);
278  histo_.push_back(hh);
279  };
280 
281  if (extraHist_) {
282  h_AmplitudeHBtest_ = fs->make<TH1D>("h_AmplitudeHBtest", "", 5000, 0., 5000.);
283  h_AmplitudeHEtest_ = fs->make<TH1D>("h_AmplitudeHEtest", "", 3000, 0., 3000.);
284  h_AmplitudeHFtest_ = fs->make<TH1D>("h_AmplitudeHFtest", "", 10000, 0., 10000.);
285  h_AmplitudeHB_ = fs->make<TH1D>("h_AmplitudeHB", "", 100000, 0., 100000.);
286  h_AmplitudeHE_ = fs->make<TH1D>("h_AmplitudeHE", "", 300000, 0., 300000.);
287  h_AmplitudeHF_ = fs->make<TH1D>("h_AmplitudeHF", "", 100000, 0., 1000000.);
288  }
289 
290  if (!fillHist_) {
291  myTree_ = fs->make<TTree>("RecJet", "RecJet Tree");
292  myTree_->Branch("cells", &cells, "cells/I");
293  myTree_->Branch("mysubd", &mysubd, "mysubd/I");
294  myTree_->Branch("depth", &depth, "depth/I");
295  myTree_->Branch("ieta", &ieta, "ieta/I");
296  myTree_->Branch("iphi", &iphi, "iphi/I");
297  myTree_->Branch("mom0_MB", &mom0_MB, "mom0_MB/F");
298  myTree_->Branch("mom1_MB", &mom1_MB, "mom1_MB/F");
299  myTree_->Branch("mom2_MB", &mom2_MB, "mom2_MB/F");
300  myTree_->Branch("mom3_MB", &mom3_MB, "mom3_MB/F");
301  myTree_->Branch("mom4_MB", &mom4_MB, "mom4_MB/F");
302  myTree_->Branch("trigbit", &trigbit, "trigbit/I");
303  myTree_->Branch("rnnumber", &rnnumber, "rnnumber/D");
304  }
305  myTree1_ = fs->make<TTree>("RecJet1", "RecJet1 Tree");
306  myTree1_->Branch("rnnum_", &rnnum_, "rnnum_/D");
307  myTree1_->Branch("HBHEsize", &HBHEsize, "HBHEsize/I");
308  myTree1_->Branch("HFsize", &HFsize, "HFsize/I");
309 
310  myMap_.clear();
311 }
std::vector< TH1D * > histo_
ALPAKA_FN_ACC ALPAKA_FN_INLINE void uint32_t const uint32_t CACellT< TrackerTraits > uint32_t CellNeighborsVector< TrackerTraits > CellTracksVector< TrackerTraits > HitsConstView< TrackerTraits > hh
std::vector< unsigned int > hcalID_
std::map< std::pair< int, HcalDetId >, myInfo > myMap_

◆ beginRun()

void RecAnalyzerMinbias::beginRun ( edm::Run const &  ,
edm::EventSetup const &  iS 
)
overrideprivate

Definition at line 347 of file RecAnalyzerMinbias.cc.

References depth, eHighHB_, eHighHE_, eHighHF_, PVValHelper::eta, fillHist_, make_classfiles::fs, edm::EventSetup::getData(), h, HcalBarrel, HcalEndcap, HcalForward, histHC_, init_, hcalSLHCTopologyConstants_cfi::maxDepthHB, HcalTopology::maxDepthHB(), hcalSLHCTopologyConstants_cfi::maxDepthHE, HcalTopology::maxDepthHE(), mergeVDriftHistosByStation::name, Noise_, phi, runGCPTkAlMap::title, tok_htopo_, HcalTopology::valid(), ppsFastLocalSimulation_cfi::x_max, and ppsFastLocalSimulation_cfi::x_min.

347  {
348  if (!init_) {
349  init_ = true;
350  if (fillHist_) {
352  const HcalTopology* hcaltopology = &iS.getData(tok_htopo_);
353 
354  char name[700], title[700];
355  // For HB
356  int maxDepthHB = hcaltopology->maxDepthHB();
357  int nbinHB = (Noise_) ? 18 : int(2000 * eHighHB_);
358  double x_min = (Noise_) ? -3. : 0.;
359  double x_max = (Noise_) ? 3. : 2. * eHighHB_;
360  for (int eta = -50; eta < 50; eta++) {
361  for (int phi = 0; phi < 100; phi++) {
362  for (int depth = 1; depth <= maxDepthHB; depth++) {
363  HcalDetId cell(HcalBarrel, eta, phi, depth);
364  if (hcaltopology->valid(cell)) {
365  sprintf(name, "HBeta%dphi%ddep%d", eta, phi, depth);
366  sprintf(title, "HB #eta %d #phi %d depth %d", eta, phi, depth);
367  TH1D* h = fs->make<TH1D>(name, title, nbinHB, x_min, x_max);
368  histHC_[cell] = h;
369  }
370  }
371  }
372  }
373  // For HE
374  int maxDepthHE = hcaltopology->maxDepthHE();
375  int nbinHE = (Noise_) ? 18 : int(2000 * eHighHE_);
376  x_min = (Noise_) ? -3. : 0.;
377  x_max = (Noise_) ? 3. : 2. * eHighHE_;
378  for (int eta = -50; eta < 50; eta++) {
379  for (int phi = 0; phi < 100; phi++) {
380  for (int depth = 1; depth <= maxDepthHE; depth++) {
381  HcalDetId cell(HcalEndcap, eta, phi, depth);
382  if (hcaltopology->valid(cell)) {
383  sprintf(name, "HEeta%dphi%ddep%d", eta, phi, depth);
384  sprintf(title, "HE #eta %d #phi %d depth %d", eta, phi, depth);
385  TH1D* h = fs->make<TH1D>(name, title, nbinHE, x_min, x_max);
386  histHC_[cell] = h;
387  }
388  }
389  }
390  }
391  // For HF
392  int maxDepthHF = 4;
393  int nbinHF = (Noise_) ? 200 : int(2000 * eHighHF_);
394  x_min = (Noise_) ? -10. : 0.;
395  x_max = (Noise_) ? 10. : 2. * eHighHF_;
396  for (int eta = -50; eta < 50; eta++) {
397  for (int phi = 0; phi < 100; phi++) {
398  for (int depth = 1; depth <= maxDepthHF; depth++) {
399  HcalDetId cell(HcalForward, eta, phi, depth);
400  if (hcaltopology->valid(cell)) {
401  sprintf(name, "HFeta%dphi%ddep%d", eta, phi, depth);
402  sprintf(title, "Energy (HF #eta %d #phi %d depth %d)", eta, phi, depth);
403  TH1D* h = fs->make<TH1D>(name, title, nbinHF, x_min, x_max);
404  histHC_[cell] = h;
405  }
406  }
407  }
408  }
409  }
410  }
411 }
bool valid(const DetId &id) const override
int maxDepthHE() const
Definition: HcalTopology.h:137
const edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > tok_htopo_
int maxDepthHB() const
Definition: HcalTopology.h:136
std::map< HcalDetId, TH1D * > histHC_
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4

◆ endJob()

void RecAnalyzerMinbias::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 315 of file RecAnalyzerMinbias.cc.

References cells, depth, fillHist_, ieta, info(), iphi, mom0_MB, mom1_MB, mom2_MB, mom3_MB, mom4_MB, myMap_, mysubd, myTree_, rnnumber, and trigbit.

Referenced by o2olib.O2ORunMgr::executeJob().

315  {
316  if (!fillHist_) {
317  cells = 0;
318  for (const auto& itr : myMap_) {
319  edm::LogVerbatim("RecAnalyzerMinbias") << "Fired trigger bit number " << itr.first.first;
320  myInfo info = itr.second;
321  if (info.theMB0 > 0) {
322  mom0_MB = info.theMB0;
323  mom1_MB = info.theMB1;
324  mom2_MB = info.theMB2;
325  mom3_MB = info.theMB3;
326  mom4_MB = info.theMB4;
327  rnnumber = info.runcheck;
328  trigbit = itr.first.first;
329  mysubd = itr.first.second.subdet();
330  depth = itr.first.second.depth();
331  iphi = itr.first.second.iphi();
332  ieta = itr.first.second.ieta();
333  edm::LogVerbatim("RecAnalyzerMinbias")
334  << " Result= " << trigbit << " " << mysubd << " " << ieta << " " << iphi << " mom0 " << mom0_MB
335  << " mom1 " << mom1_MB << " mom2 " << mom2_MB << " mom3 " << mom3_MB << " mom4 " << mom4_MB;
336  myTree_->Fill();
337  cells++;
338  }
339  }
340  edm::LogVerbatim("RecAnalyzerMinbias") << "cells " << cells;
341  }
342 #ifdef EDM_ML_DEBUG
343  edm::LogVerbatim("RecAnalyzerMinbias") << "Exiting from RecAnalyzerMinbias::endjob";
344 #endif
345 }
Log< level::Info, true > LogVerbatim
static const TGPicture * info(bool iBackgroundIsBlack)
std::map< std::pair< int, HcalDetId >, myInfo > myMap_

◆ endRun()

void RecAnalyzerMinbias::endRun ( edm::Run const &  ,
edm::EventSetup const &   
)
inlineoverrideprivate

Definition at line 79 of file RecAnalyzerMinbias.cc.

79 {}

◆ fillDescriptions()

void RecAnalyzerMinbias::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 211 of file RecAnalyzerMinbias.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, ProducerED_cfi::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

211  {
212  std::vector<int> iarray;
214  desc.add<bool>("runNZS", true);
215  desc.add<bool>("noise", false);
216  desc.add<double>("eLowHB", 4);
217  desc.add<double>("eHighHB", 100);
218  desc.add<double>("eLowHE", 4);
219  desc.add<double>("eHighHE", 150);
220  desc.add<double>("eLowHF", 10);
221  desc.add<double>("eHighHF", 150);
222  // Suitable cutoff to remove fluctuation of pedestal
223  desc.addUntracked<double>("eMin", 2.0);
224  // The following run range is suited to study 2017 commissioning period
225  desc.addUntracked<int>("runMin", 308327);
226  desc.addUntracked<int>("runMax", 308347);
227  desc.addUntracked<std::vector<int>>("triggerBits", iarray);
228  desc.addUntracked<bool>("ignoreL1", false);
229  desc.addUntracked<std::string>("corrFile", "CorFactor.txt");
230  desc.addUntracked<bool>("fillHisto", false);
231  desc.addUntracked<bool>("extraHisto", false);
232  desc.addUntracked<std::vector<int>>("hcalIeta", iarray);
233  desc.addUntracked<std::vector<int>>("hcalIphi", iarray);
234  desc.addUntracked<std::vector<int>>("hcalDepth", iarray);
235  desc.add<edm::InputTag>("hbheInputMB", edm::InputTag("hbherecoMB"));
236  desc.add<edm::InputTag>("hfInputMB", edm::InputTag("hfrecoMB"));
237  desc.add<edm::InputTag>("gtDigisAlCaMB", edm::InputTag("gtDigisAlCaMB"));
238  desc.add<edm::InputTag>("hcalDigiCollectionTag", edm::InputTag("hcalDigis"));
239  descriptions.add("recAnalyzerMinbias", desc);
240 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

Member Data Documentation

◆ cells

int RecAnalyzerMinbias::cells
private

Definition at line 111 of file RecAnalyzerMinbias.cc.

Referenced by beginJob(), and endJob().

◆ cfile_

const std::string RecAnalyzerMinbias::cfile_
private

Definition at line 91 of file RecAnalyzerMinbias.cc.

Referenced by RecAnalyzerMinbias().

◆ corrFactor_

std::map<DetId, double> RecAnalyzerMinbias::corrFactor_
private

Definition at line 93 of file RecAnalyzerMinbias.cc.

Referenced by analyzeHcal(), and RecAnalyzerMinbias().

◆ depth

int RecAnalyzerMinbias::depth
private

◆ eHighHB_

const double RecAnalyzerMinbias::eHighHB_
private

Definition at line 87 of file RecAnalyzerMinbias.cc.

Referenced by analyzeHcal(), beginRun(), and RecAnalyzerMinbias().

◆ eHighHE_

const double RecAnalyzerMinbias::eHighHE_
private

Definition at line 87 of file RecAnalyzerMinbias.cc.

Referenced by analyzeHcal(), beginRun(), and RecAnalyzerMinbias().

◆ eHighHF_

const double RecAnalyzerMinbias::eHighHF_
private

Definition at line 88 of file RecAnalyzerMinbias.cc.

Referenced by analyzeHcal(), beginRun(), and RecAnalyzerMinbias().

◆ eLowHB_

const double RecAnalyzerMinbias::eLowHB_
private

Definition at line 87 of file RecAnalyzerMinbias.cc.

Referenced by analyzeHcal(), and RecAnalyzerMinbias().

◆ eLowHE_

const double RecAnalyzerMinbias::eLowHE_
private

Definition at line 87 of file RecAnalyzerMinbias.cc.

Referenced by analyzeHcal(), and RecAnalyzerMinbias().

◆ eLowHF_

const double RecAnalyzerMinbias::eLowHF_
private

Definition at line 88 of file RecAnalyzerMinbias.cc.

Referenced by analyzeHcal(), and RecAnalyzerMinbias().

◆ eMin_

const double RecAnalyzerMinbias::eMin_
private

Definition at line 88 of file RecAnalyzerMinbias.cc.

Referenced by analyzeHcal(), and beginJob().

◆ extraHist_

const bool RecAnalyzerMinbias::extraHist_
private

Definition at line 86 of file RecAnalyzerMinbias.cc.

Referenced by analyze(), and beginJob().

◆ fillHist_

const bool RecAnalyzerMinbias::fillHist_
private

Definition at line 86 of file RecAnalyzerMinbias.cc.

Referenced by analyzeHcal(), beginJob(), beginRun(), and endJob().

◆ h_

TH1D* RecAnalyzerMinbias::h_[4]
private

Definition at line 96 of file RecAnalyzerMinbias.cc.

Referenced by analyzeHcal(), and beginJob().

◆ h_AmplitudeHB_

TH1D* RecAnalyzerMinbias::h_AmplitudeHB_
private

Definition at line 100 of file RecAnalyzerMinbias.cc.

Referenced by analyze(), and beginJob().

◆ h_AmplitudeHBtest_

TH1D* RecAnalyzerMinbias::h_AmplitudeHBtest_
private

Definition at line 98 of file RecAnalyzerMinbias.cc.

Referenced by analyze(), and beginJob().

◆ h_AmplitudeHE_

TH1D * RecAnalyzerMinbias::h_AmplitudeHE_
private

Definition at line 100 of file RecAnalyzerMinbias.cc.

Referenced by analyze(), and beginJob().

◆ h_AmplitudeHEtest_

TH1D * RecAnalyzerMinbias::h_AmplitudeHEtest_
private

Definition at line 98 of file RecAnalyzerMinbias.cc.

Referenced by analyze(), and beginJob().

◆ h_AmplitudeHF_

TH1D * RecAnalyzerMinbias::h_AmplitudeHF_
private

Definition at line 100 of file RecAnalyzerMinbias.cc.

Referenced by analyze(), and beginJob().

◆ h_AmplitudeHFtest_

TH1D* RecAnalyzerMinbias::h_AmplitudeHFtest_
private

Definition at line 99 of file RecAnalyzerMinbias.cc.

Referenced by analyze(), and beginJob().

◆ hb_

TH2D * RecAnalyzerMinbias::hb_
private

Definition at line 97 of file RecAnalyzerMinbias.cc.

Referenced by analyzeHcal(), and beginJob().

◆ hbhe_

TH2D* RecAnalyzerMinbias::hbhe_
private

Definition at line 97 of file RecAnalyzerMinbias.cc.

Referenced by analyzeHcal(), and beginJob().

◆ hbherun_

TProfile* RecAnalyzerMinbias::hbherun_
private

Definition at line 101 of file RecAnalyzerMinbias.cc.

Referenced by analyzeHcal(), and beginJob().

◆ HBHEsize

int RecAnalyzerMinbias::HBHEsize
private

Definition at line 113 of file RecAnalyzerMinbias.cc.

Referenced by analyze(), and beginJob().

◆ hbrun_

TProfile * RecAnalyzerMinbias::hbrun_
private

Definition at line 101 of file RecAnalyzerMinbias.cc.

Referenced by analyzeHcal(), and beginJob().

◆ hcalID_

std::vector<unsigned int> RecAnalyzerMinbias::hcalID_
private

Definition at line 94 of file RecAnalyzerMinbias.cc.

Referenced by analyzeHcal(), beginJob(), and RecAnalyzerMinbias().

◆ he_

TH2D * RecAnalyzerMinbias::he_
private

Definition at line 97 of file RecAnalyzerMinbias.cc.

Referenced by analyzeHcal(), and beginJob().

◆ herun_

TProfile * RecAnalyzerMinbias::herun_
private

Definition at line 101 of file RecAnalyzerMinbias.cc.

Referenced by analyzeHcal(), and beginJob().

◆ hf_

TH2D * RecAnalyzerMinbias::hf_
private

Definition at line 97 of file RecAnalyzerMinbias.cc.

Referenced by analyzeHcal(), and beginJob().

◆ hfrun_

TProfile * RecAnalyzerMinbias::hfrun_
private

Definition at line 101 of file RecAnalyzerMinbias.cc.

Referenced by analyzeHcal(), and beginJob().

◆ HFsize

int RecAnalyzerMinbias::HFsize
private

Definition at line 113 of file RecAnalyzerMinbias.cc.

Referenced by analyze(), and beginJob().

◆ histHC_

std::map<HcalDetId, TH1D*> RecAnalyzerMinbias::histHC_
private

Definition at line 103 of file RecAnalyzerMinbias.cc.

Referenced by analyzeHcal(), and beginRun().

◆ histo_

std::vector<TH1D*> RecAnalyzerMinbias::histo_
private

Definition at line 102 of file RecAnalyzerMinbias.cc.

Referenced by analyzeHcal(), and beginJob().

◆ ieta

int RecAnalyzerMinbias::ieta
private

Definition at line 111 of file RecAnalyzerMinbias.cc.

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

◆ ignoreL1_

const bool RecAnalyzerMinbias::ignoreL1_
private

Definition at line 85 of file RecAnalyzerMinbias.cc.

Referenced by analyze(), and RecAnalyzerMinbias().

◆ init_

bool RecAnalyzerMinbias::init_
private

Definition at line 92 of file RecAnalyzerMinbias.cc.

Referenced by beginRun().

◆ iphi

int RecAnalyzerMinbias::iphi
private

Definition at line 111 of file RecAnalyzerMinbias.cc.

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

◆ mom0_MB

float RecAnalyzerMinbias::mom0_MB
private

Definition at line 112 of file RecAnalyzerMinbias.cc.

Referenced by beginJob(), and endJob().

◆ mom1_MB

float RecAnalyzerMinbias::mom1_MB
private

Definition at line 112 of file RecAnalyzerMinbias.cc.

Referenced by beginJob(), and endJob().

◆ mom2_MB

float RecAnalyzerMinbias::mom2_MB
private

Definition at line 112 of file RecAnalyzerMinbias.cc.

Referenced by beginJob(), and endJob().

◆ mom3_MB

float RecAnalyzerMinbias::mom3_MB
private

Definition at line 112 of file RecAnalyzerMinbias.cc.

Referenced by beginJob(), and endJob().

◆ mom4_MB

float RecAnalyzerMinbias::mom4_MB
private

Definition at line 112 of file RecAnalyzerMinbias.cc.

Referenced by beginJob(), and endJob().

◆ myMap_

std::map<std::pair<int, HcalDetId>, myInfo> RecAnalyzerMinbias::myMap_
private

Definition at line 114 of file RecAnalyzerMinbias.cc.

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

◆ mysubd

int RecAnalyzerMinbias::mysubd
private

Definition at line 111 of file RecAnalyzerMinbias.cc.

Referenced by beginJob(), and endJob().

◆ myTree1_

TTree * RecAnalyzerMinbias::myTree1_
private

Definition at line 95 of file RecAnalyzerMinbias.cc.

Referenced by analyze(), and beginJob().

◆ myTree_

TTree* RecAnalyzerMinbias::myTree_
private

Definition at line 95 of file RecAnalyzerMinbias.cc.

Referenced by beginJob(), and endJob().

◆ Noise_

const bool RecAnalyzerMinbias::Noise_
private

Definition at line 85 of file RecAnalyzerMinbias.cc.

Referenced by analyzeHcal(), and beginRun().

◆ rnnum_

double RecAnalyzerMinbias::rnnum_
private

Definition at line 104 of file RecAnalyzerMinbias.cc.

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

◆ rnnumber

double RecAnalyzerMinbias::rnnumber
private

Definition at line 110 of file RecAnalyzerMinbias.cc.

Referenced by beginJob(), and endJob().

◆ runMax_

const int RecAnalyzerMinbias::runMax_
private

Definition at line 89 of file RecAnalyzerMinbias.cc.

Referenced by beginJob().

◆ runMin_

const int RecAnalyzerMinbias::runMin_
private

Definition at line 89 of file RecAnalyzerMinbias.cc.

Referenced by beginJob().

◆ runNZS_

const bool RecAnalyzerMinbias::runNZS_
private

Definition at line 85 of file RecAnalyzerMinbias.cc.

Referenced by analyze(), analyzeHcal(), and RecAnalyzerMinbias().

◆ theRecalib_

bool RecAnalyzerMinbias::theRecalib_
private

Definition at line 92 of file RecAnalyzerMinbias.cc.

Referenced by analyzeHcal(), and RecAnalyzerMinbias().

◆ tok_ew_

const edm::EDGetTokenT<GenEventInfoProduct> RecAnalyzerMinbias::tok_ew_
private

Definition at line 118 of file RecAnalyzerMinbias.cc.

Referenced by analyze().

◆ tok_gtRec_

const edm::EDGetTokenT<L1GlobalTriggerReadoutRecord> RecAnalyzerMinbias::tok_gtRec_
private

Definition at line 124 of file RecAnalyzerMinbias.cc.

◆ tok_hbhedigi_

const edm::EDGetTokenT<HBHEDigiCollection> RecAnalyzerMinbias::tok_hbhedigi_
private

Definition at line 119 of file RecAnalyzerMinbias.cc.

Referenced by analyze().

◆ tok_hbherecoMB_

const edm::EDGetTokenT<HBHERecHitCollection> RecAnalyzerMinbias::tok_hbherecoMB_
private

Definition at line 115 of file RecAnalyzerMinbias.cc.

Referenced by analyze().

◆ tok_hfdigi_

const edm::EDGetTokenT<HFDigiCollection> RecAnalyzerMinbias::tok_hfdigi_
private

Definition at line 122 of file RecAnalyzerMinbias.cc.

Referenced by analyze().

◆ tok_hfrecoMB_

const edm::EDGetTokenT<HFRecHitCollection> RecAnalyzerMinbias::tok_hfrecoMB_
private

Definition at line 116 of file RecAnalyzerMinbias.cc.

Referenced by analyze().

◆ tok_hltL1GtMap_

const edm::EDGetTokenT<L1GlobalTriggerObjectMapRecord> RecAnalyzerMinbias::tok_hltL1GtMap_
private

Definition at line 117 of file RecAnalyzerMinbias.cc.

Referenced by analyze().

◆ tok_hodigi_

const edm::EDGetTokenT<HODigiCollection> RecAnalyzerMinbias::tok_hodigi_
private

Definition at line 121 of file RecAnalyzerMinbias.cc.

◆ tok_htopo_

const edm::ESGetToken<HcalTopology, HcalRecNumberingRecord> RecAnalyzerMinbias::tok_htopo_
private

Definition at line 125 of file RecAnalyzerMinbias.cc.

Referenced by beginRun().

◆ tok_qie10digi_

const edm::EDGetTokenT<QIE10DigiCollection> RecAnalyzerMinbias::tok_qie10digi_
private

Definition at line 123 of file RecAnalyzerMinbias.cc.

Referenced by analyze().

◆ tok_qie11digi_

const edm::EDGetTokenT<QIE11DigiCollection> RecAnalyzerMinbias::tok_qie11digi_
private

Definition at line 120 of file RecAnalyzerMinbias.cc.

Referenced by analyze().

◆ trigbit

int RecAnalyzerMinbias::trigbit
private

Definition at line 111 of file RecAnalyzerMinbias.cc.

Referenced by beginJob(), and endJob().

◆ trigbit_

const std::vector<int> RecAnalyzerMinbias::trigbit_
private

Definition at line 90 of file RecAnalyzerMinbias.cc.

Referenced by analyze(), and RecAnalyzerMinbias().