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")) {
21 label_cp_effic = consumes<std::vector<CaloParticle>>(label_cp_effic_tag);
22 label_cp_fake = consumes<std::vector<CaloParticle>>(label_cp_fake_tag);
63 cummatbudg.insert(std::pair<double, double>(thelay, mbg));
109 for (
unsigned int www = 0; www <
label_mcl.size(); www++) {
114 dirName += algo.
process() +
"_";
115 LogDebug(
"HGCalValidator") << dirName <<
"\n";
116 if (!algo.
label().empty())
117 dirName += algo.
label() +
"_";
118 LogDebug(
"HGCalValidator") << dirName <<
"\n";
121 LogDebug(
"HGCalValidator") << dirName <<
"\n";
123 if (!dirName.empty()) {
124 dirName.resize(dirName.size() - 1);
127 LogDebug(
"HGCalValidator") << dirName <<
"\n";
139 std::vector<CaloParticle>
const& cPeff,
141 std::vector<size_t>& selected_cPeff)
const {
142 selected_cPeff.reserve(cPeff.size());
145 for (
auto const caloParticle : cPeff) {
146 int id = caloParticle.pdgId();
149 selected_cPeff.push_back(j);
161 using namespace reco;
163 LogDebug(
"HGCalValidator") <<
"\n====================================================" 165 <<
"Analyzing new event" 167 <<
"====================================================\n" 172 std::vector<SimVertex>
const&
simVertices = *simVerticesHandle;
176 std::vector<CaloParticle>
const&
caloParticles = *caloParticleHandle;
178 tools_->getEventSetup(setup);
188 std::map<DetId, const HGCRecHit*> hitMap;
189 fillHitMap(hitMap, *recHitHandleEE, *recHitHandleFH, *recHitHandleBH);
196 auto nCaloParticles = caloParticles.size();
197 std::vector<size_t> cPIndices;
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()
209 cPIndices.emplace_back(cpId);
215 LogTrace(
"HGCalValidator") <<
"\n# of CaloParticles: " << caloParticles.size() <<
"\n";
216 std::vector<size_t> selected_cPeff;
227 event.getByToken(
density_, densityHandle);
228 const Density& densities = *densityHandle;
246 for (
unsigned int layerclusterIndex = 0; layerclusterIndex < clusters.size(); layerclusterIndex++) {
262 const std::vector<reco::HGCalMultiCluster>& multiClusters = *multiClusterHandle;
268 LogTrace(
"HGCalValidator") <<
"\n# of multi clusters with " <<
label_mcl[wml].process() <<
":" 270 << multiClusters.size() <<
"\n";
280 for (
const auto&
hit : rechitsEE) {
281 hitMap.emplace(
hit.detid(), &
hit);
284 for (
const auto&
hit : rechitsFH) {
285 hitMap.emplace(
hit.detid(), &
hit);
288 for (
const auto&
hit : rechitsBH) {
289 hitMap.emplace(
hit.detid(), &
hit);
label_lcl
general settings ### selection of CP for evaluation of efficiency #
T getParameter(std::string const &) const
std::map< double, double > cummatbudg
void setCurrentFolder(std::string const &fullpath)
edm::EDGetTokenT< HGCRecHitCollection > recHitsBH_
std::unique_ptr< HGVHistoProducerAlgo > histoProducerAlgo_
~HGCalValidator() override
Destructor.
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
hgcal_clustering::Density Density
HGVHistoProducerAlgoHistograms histoProducerAlgo
edm::EDGetTokenT< std::vector< SimVertex > > simVertices_
edm::EDGetTokenT< std::vector< CaloParticle > > label_cp_fake
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
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
edm::EDGetTokenT< reco::CaloClusterCollection > layerclusters_
HGCalValidator(const edm::ParameterSet &pset)
Constructor.
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_
void dqmAnalyze(const edm::Event &, const edm::EventSetup &, const Histograms &) const override
Method called once per event.
edm::EDGetTokenT< HGCRecHitCollection > recHitsEE_
edm::EDGetTokenT< HGCRecHitCollection > recHitsFH_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &, Histograms &) const override
Method called to book the DQM histograms.
std::string fullPath() const
void fillHitMap(std::map< DetId, const HGCRecHit * > &, const HGCRecHitCollection &, const HGCRecHitCollection &, const HGCRecHitCollection &) const