CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes
HGCalValidator Class Reference

#include <HGCalValidator.h>

Inheritance diagram for HGCalValidator:
DQMGlobalEDAnalyzer< HGCalValidatorHistograms > edm::global::EDProducer< edm::RunCache< HGCalValidatorHistograms >, edm::EndRunProducer, edm::Accumulator, Args... > edm::global::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Types

using Histograms = HGCalValidatorHistograms
 
- Public Types inherited from DQMGlobalEDAnalyzer< HGCalValidatorHistograms >
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::global::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &, Histograms &) const override
 Method called to book the DQM histograms. More...
 
void cpParametersAndSelection (const Histograms &histograms, std::vector< CaloParticle > const &cPeff, std::vector< SimVertex > const &simVertices, std::vector< size_t > &selected_cPeff) const
 
void dqmAnalyze (const edm::Event &, const edm::EventSetup &, const Histograms &) const override
 Method called once per event. More...
 
 HGCalValidator (const edm::ParameterSet &pset)
 Constructor. More...
 
 ~HGCalValidator () override
 Destructor. More...
 
- Public Member Functions inherited from DQMGlobalEDAnalyzer< HGCalValidatorHistograms >
void accumulate (edm::StreamID id, edm::Event const &event, edm::EventSetup const &setup) const final
 
virtual void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &, HGCalValidatorHistograms &) const=0
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &, HGCalValidatorHistograms &) const
 
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &, HGCalValidatorHistograms const &) const
 
 DQMGlobalEDAnalyzer ()
 
std::shared_ptr< HGCalValidatorHistogramsglobalBeginRun (edm::Run const &run, edm::EventSetup const &setup) const final
 
void globalEndRun (edm::Run const &, edm::EventSetup const &) const final
 
void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup) const final
 
- Public Member Functions inherited from edm::global::EDProducer< edm::RunCache< HGCalValidatorHistograms >, edm::EndRunProducer, edm::Accumulator, Args... >
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) 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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (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::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Attributes

const edm::FileInPath cummatbudinxo_
 
edm::EDGetTokenT< Densitydensity_
 
const bool doCaloParticlePlots_
 
const bool doCaloParticleSelection_
 
const bool dolayerclustersPlots_
 
const bool domulticlustersPlots_
 
std::unique_ptr< HGVHistoProducerAlgohistoProducerAlgo_
 
edm::EDGetTokenT< std::vector< CaloParticle > > label_cp_effic
 
edm::EDGetTokenT< std::vector< CaloParticle > > label_cp_fake
 
edm::InputTag label_lcl
 
std::vector< edm::InputTaglabel_mcl
 
std::vector< edm::EDGetTokenT< std::vector< reco::HGCalMultiCluster > > > label_mclTokens
 
std::vector< edm::EDGetTokenT< reco::CaloClusterCollection > > labelToken
 
edm::EDGetTokenT< reco::CaloClusterCollectionlayerclusters_
 
edm::EDGetTokenT< HGCRecHitCollectionrecHitsBH_
 
edm::EDGetTokenT< HGCRecHitCollectionrecHitsEE_
 
edm::EDGetTokenT< HGCRecHitCollectionrecHitsFH_
 
const bool SaveGeneralInfo_
 
edm::EDGetTokenT< std::vector< SimVertex > > simVertices_
 

Private Member Functions

void fillHitMap (std::map< DetId, const HGCRecHit * > &, const HGCRecHitCollection &, const HGCRecHitCollection &, const HGCRecHitCollection &) const
 

Private Attributes

CaloParticleSelector cpSelector
 
std::map< double, double > cummatbudg
 
std::string dirName_
 
std::vector< int > particles_to_monitor_
 
std::vector< int > thicknesses_to_monitor_
 
std::shared_ptr< hgcal::RecHitToolstools_
 
unsigned totallayers_to_monitor_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::global::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Class that produces histograms to validate HGCal Reconstruction performances

Author
HGCal

Definition at line 37 of file HGCalValidator.h.

Member Typedef Documentation

◆ Histograms

Definition at line 39 of file HGCalValidator.h.

Constructor & Destructor Documentation

◆ HGCalValidator()

HGCalValidator::HGCalValidator ( const edm::ParameterSet pset)

Constructor.

Definition at line 9 of file HGCalValidator.cc.

10  : label_lcl(pset.getParameter<edm::InputTag>("label_lcl")),
11  label_mcl(pset.getParameter<std::vector<edm::InputTag>>("label_mcl")),
12  SaveGeneralInfo_(pset.getUntrackedParameter<bool>("SaveGeneralInfo")),
13  doCaloParticlePlots_(pset.getUntrackedParameter<bool>("doCaloParticlePlots")),
14  doCaloParticleSelection_(pset.getUntrackedParameter<bool>("doCaloParticleSelection")),
15  dolayerclustersPlots_(pset.getUntrackedParameter<bool>("dolayerclustersPlots")),
16  domulticlustersPlots_(pset.getUntrackedParameter<bool>("domulticlustersPlots")),
17  cummatbudinxo_(pset.getParameter<edm::FileInPath>("cummatbudinxo")) {
18  //In this way we can easily generalize to associations between other objects also.
19  const edm::InputTag& label_cp_effic_tag = pset.getParameter<edm::InputTag>("label_cp_effic");
20  const edm::InputTag& label_cp_fake_tag = pset.getParameter<edm::InputTag>("label_cp_fake");
21 
22  label_cp_effic = consumes<std::vector<CaloParticle>>(label_cp_effic_tag);
23  label_cp_fake = consumes<std::vector<CaloParticle>>(label_cp_fake_tag);
24 
25  simVertices_ = consumes<std::vector<SimVertex>>(pset.getParameter<edm::InputTag>("simVertices"));
26 
27  recHitsEE_ = consumes<HGCRecHitCollection>(edm::InputTag("HGCalRecHit", "HGCEERecHits"));
28  recHitsFH_ = consumes<HGCRecHitCollection>(edm::InputTag("HGCalRecHit", "HGCHEFRecHits"));
29  recHitsBH_ = consumes<HGCRecHitCollection>(edm::InputTag("HGCalRecHit", "HGCHEBRecHits"));
30 
31  density_ = consumes<Density>(edm::InputTag("hgcalLayerClusters"));
32 
33  layerclusters_ = consumes<reco::CaloClusterCollection>(label_lcl);
34 
35  for (auto& itag : label_mcl) {
36  label_mclTokens.push_back(consumes<std::vector<reco::HGCalMultiCluster>>(itag));
37  }
38 
39  cpSelector = CaloParticleSelector(pset.getParameter<double>("ptMinCP"),
40  pset.getParameter<double>("ptMaxCP"),
41  pset.getParameter<double>("minRapidityCP"),
42  pset.getParameter<double>("maxRapidityCP"),
43  pset.getParameter<int>("minHitCP"),
44  pset.getParameter<int>("maxSimClustersCP"),
45  pset.getParameter<double>("tipCP"),
46  pset.getParameter<double>("lipCP"),
47  pset.getParameter<bool>("signalOnlyCP"),
48  pset.getParameter<bool>("intimeOnlyCP"),
49  pset.getParameter<bool>("chargedOnlyCP"),
50  pset.getParameter<bool>("stableOnlyCP"),
51  pset.getParameter<std::vector<int>>("pdgIdCP"));
52 
53  tools_.reset(new hgcal::RecHitTools());
54 
55  particles_to_monitor_ = pset.getParameter<std::vector<int>>("pdgIdCP");
56  totallayers_to_monitor_ = pset.getParameter<int>("totallayers_to_monitor");
57  thicknesses_to_monitor_ = pset.getParameter<std::vector<int>>("thicknesses_to_monitor");
58 
59  //For the material budget file here
60  std::ifstream fmb(cummatbudinxo_.fullPath().c_str());
61  double thelay = 0.;
62  double mbg = 0.;
63  for (unsigned ilayer = 1; ilayer <= totallayers_to_monitor_; ++ilayer) {
64  fmb >> thelay >> mbg;
65  cummatbudg.insert(std::pair<double, double>(thelay, mbg));
66  }
67 
68  fmb.close();
69 
70  ParameterSet psetForHistoProducerAlgo = pset.getParameter<ParameterSet>("histoProducerAlgoBlock");
71  histoProducerAlgo_ = std::make_unique<HGVHistoProducerAlgo>(psetForHistoProducerAlgo);
72 
73  dirName_ = pset.getParameter<std::string>("dirName");
74 }

References edm::EDConsumerBase::consumes(), cpSelector, cummatbudg, cummatbudinxo_, density_, dirName_, fmb, edm::FileInPath::fullPath(), histoProducerAlgo_, label_cp_effic, label_cp_fake, label_lcl, label_mcl, label_mclTokens, layerclusters_, particles_to_monitor_, muonDTDigis_cfi::pset, recHitsBH_, recHitsEE_, recHitsFH_, simVertices_, AlCaHLTBitMon_QueryRunRegistry::string, thicknesses_to_monitor_, tools_, and totallayers_to_monitor_.

◆ ~HGCalValidator()

HGCalValidator::~HGCalValidator ( )
override

Destructor.

Definition at line 76 of file HGCalValidator.cc.

76 {}

Member Function Documentation

◆ bookHistograms()

void HGCalValidator::bookHistograms ( DQMStore::IBooker ibook,
edm::Run const &  ,
edm::EventSetup const &  setup,
Histograms histograms 
) const
override

Method called to book the DQM histograms.

Definition at line 78 of file HGCalValidator.cc.

81  {
82  if (SaveGeneralInfo_) {
83  ibook.cd();
84  ibook.setCurrentFolder(dirName_ + "GeneralInfo");
85  histoProducerAlgo_->bookInfo(ibook, histograms.histoProducerAlgo);
86  }
87 
89  ibook.cd();
90 
91  for (auto const particle : particles_to_monitor_) {
92  ibook.setCurrentFolder(dirName_ + "SelectedCaloParticles/" + std::to_string(particle));
93  histoProducerAlgo_->bookCaloParticleHistos(ibook, histograms.histoProducerAlgo, particle);
94  }
95  ibook.cd();
96  ibook.setCurrentFolder(dirName_);
97  }
98 
99  //Booking histograms concerning with hgcal layer clusters
100  if (dolayerclustersPlots_) {
101  ibook.cd();
102  ibook.setCurrentFolder(dirName_ + "hgcalLayerClusters");
103  histoProducerAlgo_->bookClusterHistos(ibook,
104  histograms.histoProducerAlgo,
108  }
109 
110  //Booking histograms for multiclusters
111  for (unsigned int www = 0; www < label_mcl.size(); www++) {
112  ibook.cd();
113  InputTag algo = label_mcl[www];
114  string dirName = dirName_;
115  if (!algo.process().empty())
116  dirName += algo.process() + "_";
117  LogDebug("HGCalValidator") << dirName << "\n";
118  if (!algo.label().empty())
119  dirName += algo.label() + "_";
120  LogDebug("HGCalValidator") << dirName << "\n";
121  if (!algo.instance().empty())
122  dirName += algo.instance() + "_";
123  LogDebug("HGCalValidator") << dirName << "\n";
124 
125  if (!dirName.empty()) {
126  dirName.resize(dirName.size() - 1);
127  }
128 
129  LogDebug("HGCalValidator") << dirName << "\n";
130 
131  ibook.setCurrentFolder(dirName);
132 
133  //Booking histograms concerning for hgcal multi clusters
134  if (domulticlustersPlots_) {
135  histoProducerAlgo_->bookMultiClusterHistos(ibook, histograms.histoProducerAlgo, totallayers_to_monitor_);
136  }
137  } //end of booking multiclusters loop
138 }

References dqm::implementation::NavigatorBase::cd(), cummatbudinxo_, TrackerOfflineValidation_Dqm_cff::dirName, dirName_, doCaloParticlePlots_, dolayerclustersPlots_, domulticlustersPlots_, edm::FileInPath::fullPath(), histoProducerAlgo_, label_mcl, LogDebug, particles_to_monitor_, SaveGeneralInfo_, dqm::implementation::NavigatorBase::setCurrentFolder(), thicknesses_to_monitor_, and totallayers_to_monitor_.

◆ cpParametersAndSelection()

void HGCalValidator::cpParametersAndSelection ( const Histograms histograms,
std::vector< CaloParticle > const &  cPeff,
std::vector< SimVertex > const &  simVertices,
std::vector< size_t > &  selected_cPeff 
) const

Definition at line 140 of file HGCalValidator.cc.

143  {
144  selected_cPeff.reserve(cPeff.size());
145 
146  size_t j = 0;
147  for (auto const& caloParticle : cPeff) {
148  int id = caloParticle.pdgId();
149 
151  selected_cPeff.push_back(j);
152  if (doCaloParticlePlots_) {
153  histoProducerAlgo_->fill_caloparticle_histos(histograms.histoProducerAlgo, id, caloParticle, simVertices);
154  }
155  }
156  ++j;
157  } //end of loop over caloparticles
158 }

References cpSelector, doCaloParticlePlots_, doCaloParticleSelection_, histoProducerAlgo_, dqmiolumiharvest::j, and HGCalValidator_cfi::simVertices.

Referenced by dqmAnalyze().

◆ dqmAnalyze()

void HGCalValidator::dqmAnalyze ( const edm::Event event,
const edm::EventSetup setup,
const Histograms histograms 
) const
overridevirtual

Method called once per event.

Implements DQMGlobalEDAnalyzer< HGCalValidatorHistograms >.

Definition at line 160 of file HGCalValidator.cc.

162  {
163  using namespace reco;
164 
165  LogDebug("HGCalValidator") << "\n===================================================="
166  << "\n"
167  << "Analyzing new event"
168  << "\n"
169  << "====================================================\n"
170  << "\n";
171 
172  edm::Handle<std::vector<SimVertex>> simVerticesHandle;
173  event.getByToken(simVertices_, simVerticesHandle);
174  std::vector<SimVertex> const& simVertices = *simVerticesHandle;
175 
176  edm::Handle<std::vector<CaloParticle>> caloParticleHandle;
177  event.getByToken(label_cp_effic, caloParticleHandle);
178  std::vector<CaloParticle> const& caloParticles = *caloParticleHandle;
179 
182  tools_->setGeometry(*geom);
183  histoProducerAlgo_->setRecHitTools(tools_);
184 
185  edm::Handle<HGCRecHitCollection> recHitHandleEE;
186  event.getByToken(recHitsEE_, recHitHandleEE);
187  edm::Handle<HGCRecHitCollection> recHitHandleFH;
188  event.getByToken(recHitsFH_, recHitHandleFH);
189  edm::Handle<HGCRecHitCollection> recHitHandleBH;
190  event.getByToken(recHitsBH_, recHitHandleBH);
191 
192  std::map<DetId, const HGCRecHit*> hitMap;
193  fillHitMap(hitMap, *recHitHandleEE, *recHitHandleFH, *recHitHandleBH);
194 
195  //Some general info on layers etc.
196  if (SaveGeneralInfo_) {
197  histoProducerAlgo_->fill_info_histos(histograms.histoProducerAlgo, totallayers_to_monitor_);
198  }
199 
200  auto nCaloParticles = caloParticles.size();
201  std::vector<size_t> cPIndices;
202  //Consider CaloParticles coming from the hard scatterer
203  //excluding the PU contribution and save the indices.
204  for (unsigned int cpId = 0; cpId < nCaloParticles; ++cpId) {
205  if (caloParticles[cpId].g4Tracks()[0].eventId().event() != 0 or
206  caloParticles[cpId].g4Tracks()[0].eventId().bunchCrossing() != 0) {
207  LogDebug("HGCalValidator") << "Excluding CaloParticles from event: "
208  << caloParticles[cpId].g4Tracks()[0].eventId().event()
209  << " with BX: " << caloParticles[cpId].g4Tracks()[0].eventId().bunchCrossing()
210  << std::endl;
211  continue;
212  }
213  cPIndices.emplace_back(cpId);
214  }
215 
216  // ##############################################
217  // fill caloparticles histograms
218  // ##############################################
219  LogTrace("HGCalValidator") << "\n# of CaloParticles: " << caloParticles.size() << "\n";
220  std::vector<size_t> selected_cPeff;
222 
223  //get collections from the event
224  //Layer clusters
226  event.getByToken(layerclusters_, clusterHandle);
227  const reco::CaloClusterCollection& clusters = *clusterHandle;
228 
229  //Density
230  edm::Handle<Density> densityHandle;
231  event.getByToken(density_, densityHandle);
232  const Density& densities = *densityHandle;
233 
234  // ##############################################
235  // fill layercluster histograms
236  // ##############################################
237  int w = 0; //counter counting the number of sets of histograms
238  if (dolayerclustersPlots_) {
239  histoProducerAlgo_->fill_generic_cluster_histos(histograms.histoProducerAlgo,
240  w,
241  clusters,
242  densities,
244  cPIndices,
245  selected_cPeff,
246  hitMap,
247  cummatbudg,
250 
251  for (unsigned int layerclusterIndex = 0; layerclusterIndex < clusters.size(); layerclusterIndex++) {
252  histoProducerAlgo_->fill_cluster_histos(histograms.histoProducerAlgo, w, clusters[layerclusterIndex]);
253  }
254 
255  //General Info on hgcalLayerClusters
256  LogTrace("HGCalValidator") << "\n# of layer clusters with " << label_lcl.process() << ":" << label_lcl.label()
257  << ":" << label_lcl.instance() << ": " << clusters.size() << "\n";
258  }
259 
260  // ##############################################
261  // fill multicluster histograms
262  // ##############################################
263  for (unsigned int wml = 0; wml < label_mclTokens.size(); wml++) {
264  if (domulticlustersPlots_) {
266  event.getByToken(label_mclTokens[wml], multiClusterHandle);
267  const std::vector<reco::HGCalMultiCluster>& multiClusters = *multiClusterHandle;
268 
269  histoProducerAlgo_->fill_multi_cluster_histos(histograms.histoProducerAlgo,
270  wml,
271  multiClusters,
273  cPIndices,
274  selected_cPeff,
275  hitMap,
277 
278  //General Info on multiclusters
279  LogTrace("HGCalValidator") << "\n# of multi clusters with " << label_mcl[wml].process() << ":"
280  << label_mcl[wml].label() << ":" << label_mcl[wml].instance() << ": "
281  << multiClusters.size() << "\n";
282  }
283  } //end of loop over multicluster input labels
284 }

References caloTruthCellsProducer_cfi::caloParticles, bsc_activity_cfg::clusters, cpParametersAndSelection(), cummatbudg, density_, dolayerclustersPlots_, domulticlustersPlots_, event(), fillHitMap(), relativeConstraints::geom, get, histoProducerAlgo_, edm::InputTag::instance(), edm::InputTag::label(), label_cp_effic, label_lcl, label_mcl, label_mclTokens, layerclusters_, LogDebug, LogTrace, or, edm::InputTag::process(), recHitsBH_, recHitsEE_, recHitsFH_, SaveGeneralInfo_, singleTopDQM_cfi::setup, HGCalValidator_cfi::simVertices, simVertices_, thicknesses_to_monitor_, tools_, totallayers_to_monitor_, and w.

◆ fillHitMap()

void HGCalValidator::fillHitMap ( std::map< DetId, const HGCRecHit * > &  hitMap,
const HGCRecHitCollection rechitsEE,
const HGCRecHitCollection rechitsFH,
const HGCRecHitCollection rechitsBH 
) const
private

Definition at line 286 of file HGCalValidator.cc.

289  {
290  hitMap.clear();
291  for (const auto& hit : rechitsEE) {
292  hitMap.emplace(hit.detid(), &hit);
293  }
294 
295  for (const auto& hit : rechitsFH) {
296  hitMap.emplace(hit.detid(), &hit);
297  }
298 
299  for (const auto& hit : rechitsBH) {
300  hitMap.emplace(hit.detid(), &hit);
301  }
302 }

Referenced by dqmAnalyze().

Member Data Documentation

◆ cpSelector

CaloParticleSelector HGCalValidator::cpSelector
private

Definition at line 84 of file HGCalValidator.h.

Referenced by cpParametersAndSelection(), and HGCalValidator().

◆ cummatbudg

std::map<double, double> HGCalValidator::cummatbudg
private

Definition at line 86 of file HGCalValidator.h.

Referenced by dqmAnalyze(), and HGCalValidator().

◆ cummatbudinxo_

const edm::FileInPath HGCalValidator::cummatbudinxo_
protected

Definition at line 65 of file HGCalValidator.h.

Referenced by bookHistograms(), and HGCalValidator().

◆ density_

edm::EDGetTokenT<Density> HGCalValidator::density_
protected

Definition at line 76 of file HGCalValidator.h.

Referenced by dqmAnalyze(), and HGCalValidator().

◆ dirName_

std::string HGCalValidator::dirName_
private

Definition at line 90 of file HGCalValidator.h.

Referenced by bookHistograms(), and HGCalValidator().

◆ doCaloParticlePlots_

const bool HGCalValidator::doCaloParticlePlots_
protected

Definition at line 61 of file HGCalValidator.h.

Referenced by bookHistograms(), and cpParametersAndSelection().

◆ doCaloParticleSelection_

const bool HGCalValidator::doCaloParticleSelection_
protected

Definition at line 62 of file HGCalValidator.h.

Referenced by cpParametersAndSelection().

◆ dolayerclustersPlots_

const bool HGCalValidator::dolayerclustersPlots_
protected

Definition at line 63 of file HGCalValidator.h.

Referenced by bookHistograms(), and dqmAnalyze().

◆ domulticlustersPlots_

const bool HGCalValidator::domulticlustersPlots_
protected

Definition at line 64 of file HGCalValidator.h.

Referenced by bookHistograms(), and dqmAnalyze().

◆ histoProducerAlgo_

std::unique_ptr<HGVHistoProducerAlgo> HGCalValidator::histoProducerAlgo_
protected

◆ label_cp_effic

edm::EDGetTokenT<std::vector<CaloParticle> > HGCalValidator::label_cp_effic
protected

Definition at line 70 of file HGCalValidator.h.

Referenced by dqmAnalyze(), and HGCalValidator().

◆ label_cp_fake

edm::EDGetTokenT<std::vector<CaloParticle> > HGCalValidator::label_cp_fake
protected

Definition at line 71 of file HGCalValidator.h.

Referenced by HGCalValidator().

◆ label_lcl

edm::InputTag HGCalValidator::label_lcl
protected

Definition at line 58 of file HGCalValidator.h.

Referenced by dqmAnalyze(), and HGCalValidator().

◆ label_mcl

std::vector<edm::InputTag> HGCalValidator::label_mcl
protected

Definition at line 59 of file HGCalValidator.h.

Referenced by bookHistograms(), dqmAnalyze(), and HGCalValidator().

◆ label_mclTokens

std::vector<edm::EDGetTokenT<std::vector<reco::HGCalMultiCluster> > > HGCalValidator::label_mclTokens
protected

Definition at line 69 of file HGCalValidator.h.

Referenced by dqmAnalyze(), and HGCalValidator().

◆ labelToken

std::vector<edm::EDGetTokenT<reco::CaloClusterCollection> > HGCalValidator::labelToken
protected

Definition at line 67 of file HGCalValidator.h.

◆ layerclusters_

edm::EDGetTokenT<reco::CaloClusterCollection> HGCalValidator::layerclusters_
protected

Definition at line 68 of file HGCalValidator.h.

Referenced by dqmAnalyze(), and HGCalValidator().

◆ particles_to_monitor_

std::vector<int> HGCalValidator::particles_to_monitor_
private

Definition at line 87 of file HGCalValidator.h.

Referenced by bookHistograms(), and HGCalValidator().

◆ recHitsBH_

edm::EDGetTokenT<HGCRecHitCollection> HGCalValidator::recHitsBH_
protected

Definition at line 75 of file HGCalValidator.h.

Referenced by dqmAnalyze(), and HGCalValidator().

◆ recHitsEE_

edm::EDGetTokenT<HGCRecHitCollection> HGCalValidator::recHitsEE_
protected

Definition at line 73 of file HGCalValidator.h.

Referenced by dqmAnalyze(), and HGCalValidator().

◆ recHitsFH_

edm::EDGetTokenT<HGCRecHitCollection> HGCalValidator::recHitsFH_
protected

Definition at line 74 of file HGCalValidator.h.

Referenced by dqmAnalyze(), and HGCalValidator().

◆ SaveGeneralInfo_

const bool HGCalValidator::SaveGeneralInfo_
protected

Definition at line 60 of file HGCalValidator.h.

Referenced by bookHistograms(), and dqmAnalyze().

◆ simVertices_

edm::EDGetTokenT<std::vector<SimVertex> > HGCalValidator::simVertices_
protected

Definition at line 72 of file HGCalValidator.h.

Referenced by dqmAnalyze(), and HGCalValidator().

◆ thicknesses_to_monitor_

std::vector<int> HGCalValidator::thicknesses_to_monitor_
private

Definition at line 89 of file HGCalValidator.h.

Referenced by bookHistograms(), dqmAnalyze(), and HGCalValidator().

◆ tools_

std::shared_ptr<hgcal::RecHitTools> HGCalValidator::tools_
private

Definition at line 85 of file HGCalValidator.h.

Referenced by dqmAnalyze(), and HGCalValidator().

◆ totallayers_to_monitor_

unsigned HGCalValidator::totallayers_to_monitor_
private

Definition at line 88 of file HGCalValidator.h.

Referenced by bookHistograms(), dqmAnalyze(), and HGCalValidator().

HGCalValidator::fillHitMap
void fillHitMap(std::map< DetId, const HGCRecHit * > &, const HGCRecHitCollection &, const HGCRecHitCollection &, const HGCRecHitCollection &) const
Definition: HGCalValidator.cc:286
HGCalValidator::label_cp_effic
edm::EDGetTokenT< std::vector< CaloParticle > > label_cp_effic
Definition: HGCalValidator.h:70
HGCalValidator::cummatbudinxo_
const edm::FileInPath cummatbudinxo_
Definition: HGCalValidator.h:65
hgcal::RecHitTools
Definition: RecHitTools.h:23
HGCalValidator::recHitsFH_
edm::EDGetTokenT< HGCRecHitCollection > recHitsFH_
Definition: HGCalValidator.h:74
HGCalValidator::cpParametersAndSelection
void cpParametersAndSelection(const Histograms &histograms, std::vector< CaloParticle > const &cPeff, std::vector< SimVertex > const &simVertices, std::vector< size_t > &selected_cPeff) const
Definition: HGCalValidator.cc:140
edm::InputTag::instance
std::string const & instance() const
Definition: InputTag.h:37
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
edm::InputTag::process
std::string const & process() const
Definition: InputTag.h:40
HGCalValidator::dolayerclustersPlots_
const bool dolayerclustersPlots_
Definition: HGCalValidator.h:63
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
edm::Handle
Definition: AssociativeIterator.h:50
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
edm::InputTag::label
std::string const & label() const
Definition: InputTag.h:36
cmsdt::algo
algo
Definition: constants.h:164
edm::FileInPath
Definition: FileInPath.h:64
HGCalValidator::cpSelector
CaloParticleSelector cpSelector
Definition: HGCalValidator.h:84
CaloParticleSelector
Definition: CaloParticleSelector.h:10
HGCalValidator::tools_
std::shared_ptr< hgcal::RecHitTools > tools_
Definition: HGCalValidator.h:85
w
const double w
Definition: UKUtility.cc:23
caloTruthCellsProducer_cfi.caloParticles
caloParticles
Definition: caloTruthCellsProducer_cfi.py:6
reco::CaloClusterCollection
std::vector< CaloCluster > CaloClusterCollection
collection of CaloCluster objects
Definition: CaloClusterFwd.h:19
HGCalValidator::label_cp_fake
edm::EDGetTokenT< std::vector< CaloParticle > > label_cp_fake
Definition: HGCalValidator.h:71
edm::ESHandle< CaloGeometry >
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
HGCalValidator::label_mclTokens
std::vector< edm::EDGetTokenT< std::vector< reco::HGCalMultiCluster > > > label_mclTokens
Definition: HGCalValidator.h:69
HGCalValidator::recHitsBH_
edm::EDGetTokenT< HGCRecHitCollection > recHitsBH_
Definition: HGCalValidator.h:75
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
bsc_activity_cfg.clusters
clusters
Definition: bsc_activity_cfg.py:36
HGCalValidator::recHitsEE_
edm::EDGetTokenT< HGCRecHitCollection > recHitsEE_
Definition: HGCalValidator.h:73
HGCalValidator::totallayers_to_monitor_
unsigned totallayers_to_monitor_
Definition: HGCalValidator.h:88
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
edm::ParameterSet
Definition: ParameterSet.h:36
HGCalValidator::simVertices_
edm::EDGetTokenT< std::vector< SimVertex > > simVertices_
Definition: HGCalValidator.h:72
HGCalValidator::thicknesses_to_monitor_
std::vector< int > thicknesses_to_monitor_
Definition: HGCalValidator.h:89
HGCalValidator::histoProducerAlgo_
std::unique_ptr< HGVHistoProducerAlgo > histoProducerAlgo_
Definition: HGCalValidator.h:77
HGCalValidator::doCaloParticleSelection_
const bool doCaloParticleSelection_
Definition: HGCalValidator.h:62
HGCalValidator::label_lcl
edm::InputTag label_lcl
Definition: HGCalValidator.h:58
histograms
Definition: histograms.py:1
HGCalValidator::particles_to_monitor_
std::vector< int > particles_to_monitor_
Definition: HGCalValidator.h:87
get
#define get
HGCalValidator::label_mcl
std::vector< edm::InputTag > label_mcl
Definition: HGCalValidator.h:59
HGCalValidator::domulticlustersPlots_
const bool domulticlustersPlots_
Definition: HGCalValidator.h:64
HGCalValidator::cummatbudg
std::map< double, double > cummatbudg
Definition: HGCalValidator.h:86
HGCalValidator::SaveGeneralInfo_
const bool SaveGeneralInfo_
Definition: HGCalValidator.h:60
fmb
cc *****************************************************cc the common blocks pinput and cwdidth are for input parameters cc these parameters needed to be interfaced to other program common pinput fmb
Definition: inclcon.h:4
HGCalValidator::density_
edm::EDGetTokenT< Density > density_
Definition: HGCalValidator.h:76
TrackerOfflineValidation_Dqm_cff.dirName
dirName
Definition: TrackerOfflineValidation_Dqm_cff.py:55
or
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
HGCalValidator::dirName_
std::string dirName_
Definition: HGCalValidator.h:90
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:671
HGCalValidator_cfi.simVertices
simVertices
Definition: HGCalValidator_cfi.py:43
edm::EDConsumerBase::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: EDConsumerBase.h:126
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
HGCalValidator::layerclusters_
edm::EDGetTokenT< reco::CaloClusterCollection > layerclusters_
Definition: HGCalValidator.h:68
event
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of "!*" before the partial wildcard feature was incorporated). The per-event "cost" of each negative criterion with multiple relevant triggers is about the same as ! *was in the past
edm::InputTag
Definition: InputTag.h:15
edm::FileInPath::fullPath
std::string fullPath() const
Definition: FileInPath.cc:163
hit
Definition: SiStripHitEffFromCalibTree.cc:88
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
Density
hgcal_clustering::Density Density
Definition: HGCalImagingAlgo.h:29
HGCalValidator::doCaloParticlePlots_
const bool doCaloParticlePlots_
Definition: HGCalValidator.h:61