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::EDAnalyzer< edm::RunCache< HGCalValidatorHistograms >, Args... > edm::global::EDAnalyzerBase edm::EDConsumerBase

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::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- 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 edm::global::EDAnalyzer< edm::RunCache< HGCalValidatorHistograms >, Args... >
 EDAnalyzer ()=default
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~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
 
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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
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 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::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- 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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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

Class that produces histograms to validate HGCal Reconstruction performances

Author
HGCal

Definition at line 37 of file HGCalValidator.h.

Member Typedef Documentation

Definition at line 39 of file HGCalValidator.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 9 of file HGCalValidator.cc.

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

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

Destructor.

Definition at line 74 of file HGCalValidator.cc.

74 {}

Member Function Documentation

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

Method called to book the DQM histograms.

Implements DQMGlobalEDAnalyzer< HGCalValidatorHistograms >.

Definition at line 76 of file HGCalValidator.cc.

References ecalcalib_dqm_sourceclient-live_cfg::algo, dqm::dqmstoreimpl::DQMStore::IBooker::cd(), cummatbudinxo_, TrackerOfflineValidation_Dqm_cff::dirName, dirName_, doCaloParticlePlots_, dolayerclustersPlots_, domulticlustersPlots_, edm::FileInPath::fullPath(), HGCalValidatorHistograms::histoProducerAlgo, histoProducerAlgo_, edm::InputTag::instance(), edm::InputTag::label(), label_mcl, LogDebug, particles_to_monitor_, edm::InputTag::process(), SaveGeneralInfo_, dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder(), thicknesses_to_monitor_, and totallayers_to_monitor_.

79  {
80  if (SaveGeneralInfo_) {
81  ibook.cd();
82  ibook.setCurrentFolder(dirName_ + "GeneralInfo");
83  histoProducerAlgo_->bookInfo(ibook, histograms.histoProducerAlgo);
84  }
85 
87  ibook.cd();
88 
89  for (auto const particle : particles_to_monitor_) {
90  ibook.setCurrentFolder(dirName_ + "SelectedCaloParticles/" + std::to_string(particle));
91  histoProducerAlgo_->bookCaloParticleHistos(ibook, histograms.histoProducerAlgo, particle);
92  }
93  ibook.cd();
94  ibook.setCurrentFolder(dirName_);
95  }
96 
97  //Booking histograms concerning with hgcal layer clusters
99  ibook.cd();
100  ibook.setCurrentFolder(dirName_ + "hgcalLayerClusters");
101  histoProducerAlgo_->bookClusterHistos(ibook,
102  histograms.histoProducerAlgo,
106  }
107 
108  //Booking histograms for multiclusters
109  for (unsigned int www = 0; www < label_mcl.size(); www++) {
110  ibook.cd();
111  InputTag algo = label_mcl[www];
112  string dirName = dirName_;
113  if (!algo.process().empty())
114  dirName += algo.process() + "_";
115  LogDebug("HGCalValidator") << dirName << "\n";
116  if (!algo.label().empty())
117  dirName += algo.label() + "_";
118  LogDebug("HGCalValidator") << dirName << "\n";
119  if (!algo.instance().empty())
120  dirName += algo.instance() + "_";
121  LogDebug("HGCalValidator") << dirName << "\n";
122 
123  if (!dirName.empty()) {
124  dirName.resize(dirName.size() - 1);
125  }
126 
127  LogDebug("HGCalValidator") << dirName << "\n";
128 
129  ibook.setCurrentFolder(dirName);
130 
131  //Booking histograms concerning for hgcal multi clusters
132  if (domulticlustersPlots_) {
133  histoProducerAlgo_->bookMultiClusterHistos(ibook, histograms.histoProducerAlgo, totallayers_to_monitor_);
134  }
135  } //end of booking multiclusters loop
136 }
#define LogDebug(id)
std::unique_ptr< HGVHistoProducerAlgo > histoProducerAlgo_
const bool doCaloParticlePlots_
unsigned totallayers_to_monitor_
std::vector< int > thicknesses_to_monitor_
const bool domulticlustersPlots_
const bool SaveGeneralInfo_
std::string dirName_
const edm::FileInPath cummatbudinxo_
const bool dolayerclustersPlots_
std::vector< edm::InputTag > label_mcl
std::string const & label() const
Definition: InputTag.h:36
std::string const & process() const
Definition: InputTag.h:40
std::vector< int > particles_to_monitor_
std::string fullPath() const
Definition: FileInPath.cc:163
std::string const & instance() const
Definition: InputTag.h:37
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 138 of file HGCalValidator.cc.

References cpSelector, doCaloParticlePlots_, HGCalValidatorHistograms::histoProducerAlgo, histoProducerAlgo_, and dqmiolumiharvest::j.

Referenced by dqmAnalyze().

141  {
142  selected_cPeff.reserve(cPeff.size());
143 
144  size_t j = 0;
145  for (auto const caloParticle : cPeff) {
146  int id = caloParticle.pdgId();
147 
148  if (cpSelector(caloParticle, simVertices)) {
149  selected_cPeff.push_back(j);
150  if (doCaloParticlePlots_) {
151  histoProducerAlgo_->fill_caloparticle_histos(histograms.histoProducerAlgo, id, caloParticle, simVertices);
152  }
153  }
154  ++j;
155  } //end of loop over caloparticles
156 }
std::unique_ptr< HGVHistoProducerAlgo > histoProducerAlgo_
CaloParticleSelector cpSelector
const bool doCaloParticlePlots_
void HGCalValidator::dqmAnalyze ( const edm::Event event,
const edm::EventSetup setup,
const Histograms histograms 
) const
override

Method called once per event.

Definition at line 158 of file HGCalValidator.cc.

References caloTruthCellsProducer_cfi::caloParticles, bsc_activity_cfg::clusters, cpParametersAndSelection(), cummatbudg, density_, dolayerclustersPlots_, domulticlustersPlots_, event(), fillHitMap(), HGCalValidatorHistograms::histoProducerAlgo, 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_, HGCalValidator_cfi::simVertices, simVertices_, thicknesses_to_monitor_, tools_, totallayers_to_monitor_, and w.

160  {
161  using namespace reco;
162 
163  LogDebug("HGCalValidator") << "\n===================================================="
164  << "\n"
165  << "Analyzing new event"
166  << "\n"
167  << "====================================================\n"
168  << "\n";
169 
170  edm::Handle<std::vector<SimVertex>> simVerticesHandle;
171  event.getByToken(simVertices_, simVerticesHandle);
172  std::vector<SimVertex> const& simVertices = *simVerticesHandle;
173 
174  edm::Handle<std::vector<CaloParticle>> caloParticleHandle;
175  event.getByToken(label_cp_effic, caloParticleHandle);
176  std::vector<CaloParticle> const& caloParticles = *caloParticleHandle;
177 
178  tools_->getEventSetup(setup);
179  histoProducerAlgo_->setRecHitTools(tools_);
180 
181  edm::Handle<HGCRecHitCollection> recHitHandleEE;
182  event.getByToken(recHitsEE_, recHitHandleEE);
183  edm::Handle<HGCRecHitCollection> recHitHandleFH;
184  event.getByToken(recHitsFH_, recHitHandleFH);
185  edm::Handle<HGCRecHitCollection> recHitHandleBH;
186  event.getByToken(recHitsBH_, recHitHandleBH);
187 
188  std::map<DetId, const HGCRecHit*> hitMap;
189  fillHitMap(hitMap, *recHitHandleEE, *recHitHandleFH, *recHitHandleBH);
190 
191  //Some general info on layers etc.
192  if (SaveGeneralInfo_) {
193  histoProducerAlgo_->fill_info_histos(histograms.histoProducerAlgo, totallayers_to_monitor_);
194  }
195 
196  auto nCaloParticles = caloParticles.size();
197  std::vector<size_t> cPIndices;
198  //Consider CaloParticles coming from the hard scatterer
199  //excluding the PU contribution and save the indices.
200  for (unsigned int cpId = 0; cpId < nCaloParticles; ++cpId) {
201  if (caloParticles[cpId].g4Tracks()[0].eventId().event() != 0 or
202  caloParticles[cpId].g4Tracks()[0].eventId().bunchCrossing() != 0) {
203  LogDebug("HGCalValidator") << "Excluding CaloParticles from event: "
204  << caloParticles[cpId].g4Tracks()[0].eventId().event()
205  << " with BX: " << caloParticles[cpId].g4Tracks()[0].eventId().bunchCrossing()
206  << std::endl;
207  continue;
208  }
209  cPIndices.emplace_back(cpId);
210  }
211 
212  // ##############################################
213  // fill caloparticles histograms
214  // ##############################################
215  LogTrace("HGCalValidator") << "\n# of CaloParticles: " << caloParticles.size() << "\n";
216  std::vector<size_t> selected_cPeff;
217  cpParametersAndSelection(histograms, caloParticles, simVertices, selected_cPeff);
218 
219  //get collections from the event
220  //Layer clusters
222  event.getByToken(layerclusters_, clusterHandle);
223  const reco::CaloClusterCollection& clusters = *clusterHandle;
224 
225  //Density
226  edm::Handle<Density> densityHandle;
227  event.getByToken(density_, densityHandle);
228  const Density& densities = *densityHandle;
229 
230  // ##############################################
231  // fill layercluster histograms
232  // ##############################################
233  int w = 0; //counter counting the number of sets of histograms
234  if (dolayerclustersPlots_) {
235  histoProducerAlgo_->fill_generic_cluster_histos(histograms.histoProducerAlgo,
236  w,
237  clusters,
238  densities,
239  caloParticles,
240  cPIndices,
241  hitMap,
242  cummatbudg,
245 
246  for (unsigned int layerclusterIndex = 0; layerclusterIndex < clusters.size(); layerclusterIndex++) {
247  histoProducerAlgo_->fill_cluster_histos(histograms.histoProducerAlgo, w, clusters[layerclusterIndex]);
248  }
249 
250  //General Info on hgcalLayerClusters
251  LogTrace("HGCalValidator") << "\n# of layer clusters with " << label_lcl.process() << ":" << label_lcl.label()
252  << ":" << label_lcl.instance() << ": " << clusters.size() << "\n";
253  }
254 
255  // ##############################################
256  // fill multicluster histograms
257  // ##############################################
258  for (unsigned int wml = 0; wml < label_mclTokens.size(); wml++) {
259  if (domulticlustersPlots_) {
261  event.getByToken(label_mclTokens[wml], multiClusterHandle);
262  const std::vector<reco::HGCalMultiCluster>& multiClusters = *multiClusterHandle;
263 
264  histoProducerAlgo_->fill_multi_cluster_histos(
265  histograms.histoProducerAlgo, wml, multiClusters, caloParticles, cPIndices, hitMap, totallayers_to_monitor_);
266 
267  //General Info on multiclusters
268  LogTrace("HGCalValidator") << "\n# of multi clusters with " << label_mcl[wml].process() << ":"
269  << label_mcl[wml].label() << ":" << label_mcl[wml].instance() << ": "
270  << multiClusters.size() << "\n";
271  }
272  } //end of loop over multicluster input labels
273 }
#define LogDebug(id)
std::map< double, double > cummatbudg
const double w
Definition: UKUtility.cc:23
edm::EDGetTokenT< HGCRecHitCollection > recHitsBH_
std::unique_ptr< HGVHistoProducerAlgo > histoProducerAlgo_
unsigned totallayers_to_monitor_
std::vector< int > thicknesses_to_monitor_
const bool domulticlustersPlots_
const bool SaveGeneralInfo_
edm::EDGetTokenT< Density > density_
hgcal_clustering::Density Density
Definition: HGCalCLUEAlgo.h:27
edm::EDGetTokenT< std::vector< SimVertex > > simVertices_
edm::EDGetTokenT< std::vector< CaloParticle > > label_cp_effic
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
std::shared_ptr< hgcal::RecHitTools > tools_
std::vector< CaloCluster > CaloClusterCollection
collection of CaloCluster objects
void cpParametersAndSelection(const Histograms &histograms, std::vector< CaloParticle > const &cPeff, std::vector< SimVertex > const &simVertices, std::vector< size_t > &selected_cPeff) const
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
#define LogTrace(id)
edm::EDGetTokenT< reco::CaloClusterCollection > layerclusters_
std::vector< edm::EDGetTokenT< std::vector< reco::HGCalMultiCluster > > > label_mclTokens
const bool dolayerclustersPlots_
std::vector< edm::InputTag > label_mcl
std::string const & label() const
Definition: InputTag.h:36
std::string const & process() const
Definition: InputTag.h:40
fixed size matrix
edm::EDGetTokenT< HGCRecHitCollection > recHitsEE_
edm::EDGetTokenT< HGCRecHitCollection > recHitsFH_
void fillHitMap(std::map< DetId, const HGCRecHit * > &, const HGCRecHitCollection &, const HGCRecHitCollection &, const HGCRecHitCollection &) const
edm::InputTag label_lcl
std::string const & instance() const
Definition: InputTag.h:37
void HGCalValidator::fillHitMap ( std::map< DetId, const HGCRecHit * > &  hitMap,
const HGCRecHitCollection rechitsEE,
const HGCRecHitCollection rechitsFH,
const HGCRecHitCollection rechitsBH 
) const
private

Definition at line 275 of file HGCalValidator.cc.

Referenced by dqmAnalyze().

278  {
279  hitMap.clear();
280  for (const auto& hit : rechitsEE) {
281  hitMap.emplace(hit.detid(), &hit);
282  }
283 
284  for (const auto& hit : rechitsFH) {
285  hitMap.emplace(hit.detid(), &hit);
286  }
287 
288  for (const auto& hit : rechitsBH) {
289  hitMap.emplace(hit.detid(), &hit);
290  }
291 }

Member Data Documentation

CaloParticleSelector HGCalValidator::cpSelector
private

Definition at line 83 of file HGCalValidator.h.

Referenced by cpParametersAndSelection(), and HGCalValidator().

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

Definition at line 85 of file HGCalValidator.h.

Referenced by dqmAnalyze(), and HGCalValidator().

const edm::FileInPath HGCalValidator::cummatbudinxo_
protected

Definition at line 64 of file HGCalValidator.h.

Referenced by bookHistograms(), and HGCalValidator().

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

Definition at line 75 of file HGCalValidator.h.

Referenced by dqmAnalyze(), and HGCalValidator().

std::string HGCalValidator::dirName_
private

Definition at line 89 of file HGCalValidator.h.

Referenced by bookHistograms(), and HGCalValidator().

const bool HGCalValidator::doCaloParticlePlots_
protected

Definition at line 61 of file HGCalValidator.h.

Referenced by bookHistograms(), and cpParametersAndSelection().

const bool HGCalValidator::dolayerclustersPlots_
protected

Definition at line 62 of file HGCalValidator.h.

Referenced by bookHistograms(), and dqmAnalyze().

const bool HGCalValidator::domulticlustersPlots_
protected

Definition at line 63 of file HGCalValidator.h.

Referenced by bookHistograms(), and dqmAnalyze().

std::unique_ptr<HGVHistoProducerAlgo> HGCalValidator::histoProducerAlgo_
protected
edm::EDGetTokenT<std::vector<CaloParticle> > HGCalValidator::label_cp_effic
protected

Definition at line 69 of file HGCalValidator.h.

Referenced by dqmAnalyze(), and HGCalValidator().

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

Definition at line 70 of file HGCalValidator.h.

Referenced by HGCalValidator().

edm::InputTag HGCalValidator::label_lcl
protected

Definition at line 58 of file HGCalValidator.h.

Referenced by dqmAnalyze(), and HGCalValidator().

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

Definition at line 59 of file HGCalValidator.h.

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

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

Definition at line 68 of file HGCalValidator.h.

Referenced by dqmAnalyze(), and HGCalValidator().

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

Definition at line 66 of file HGCalValidator.h.

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

Definition at line 67 of file HGCalValidator.h.

Referenced by dqmAnalyze(), and HGCalValidator().

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

Definition at line 86 of file HGCalValidator.h.

Referenced by bookHistograms(), and HGCalValidator().

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

Definition at line 74 of file HGCalValidator.h.

Referenced by dqmAnalyze(), and HGCalValidator().

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

Definition at line 72 of file HGCalValidator.h.

Referenced by dqmAnalyze(), and HGCalValidator().

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

Definition at line 73 of file HGCalValidator.h.

Referenced by dqmAnalyze(), and HGCalValidator().

const bool HGCalValidator::SaveGeneralInfo_
protected

Definition at line 60 of file HGCalValidator.h.

Referenced by bookHistograms(), and dqmAnalyze().

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

Definition at line 71 of file HGCalValidator.h.

Referenced by dqmAnalyze(), and HGCalValidator().

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

Definition at line 88 of file HGCalValidator.h.

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

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

Definition at line 84 of file HGCalValidator.h.

Referenced by dqmAnalyze(), and HGCalValidator().

unsigned HGCalValidator::totallayers_to_monitor_
private

Definition at line 87 of file HGCalValidator.h.

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