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")),
22 label_cp_effic = consumes<std::vector<CaloParticle>>(label_cp_effic_tag);
23 label_cp_fake = consumes<std::vector<CaloParticle>>(label_cp_fake_tag);
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"));
65 cummatbudg.insert(std::pair<double, double>(thelay, mbg));
111 for (
unsigned int www = 0; www <
label_mcl.size(); www++) {
115 if (!
algo.process().empty())
118 if (!
algo.label().empty())
121 if (!
algo.instance().empty())
141 std::vector<CaloParticle>
const& cPeff,
143 std::vector<size_t>& selected_cPeff)
const {
144 selected_cPeff.reserve(cPeff.size());
147 for (
auto const& caloParticle : cPeff) {
148 int id = caloParticle.pdgId();
151 selected_cPeff.push_back(
j);
163 using namespace reco;
165 LogDebug(
"HGCalValidator") <<
"\n===================================================="
167 <<
"Analyzing new event"
169 <<
"====================================================\n"
174 std::vector<SimVertex>
const&
simVertices = *simVerticesHandle;
178 std::vector<CaloParticle>
const&
caloParticles = *caloParticleHandle;
190 std::map<DetId, const HGCRecHit*> hitMap;
191 fillHitMap(hitMap, *recHitHandleEE, *recHitHandleFH, *recHitHandleBH);
199 std::vector<size_t> cPIndices;
202 for (
unsigned int cpId = 0; cpId < nCaloParticles; ++cpId) {
204 caloParticles[cpId].g4Tracks()[0].eventId().bunchCrossing() != 0) {
205 LogDebug(
"HGCalValidator") <<
"Excluding CaloParticles from event: "
207 <<
" with BX: " <<
caloParticles[cpId].g4Tracks()[0].eventId().bunchCrossing()
211 cPIndices.emplace_back(cpId);
218 std::vector<size_t> selected_cPeff;
229 event.getByToken(
density_, densityHandle);
230 const Density& densities = *densityHandle;
249 for (
unsigned int layerclusterIndex = 0; layerclusterIndex <
clusters.size(); layerclusterIndex++) {
265 const std::vector<reco::HGCalMultiCluster>& multiClusters = *multiClusterHandle;
277 LogTrace(
"HGCalValidator") <<
"\n# of multi clusters with " <<
label_mcl[wml].process() <<
":"
279 << multiClusters.size() <<
"\n";
289 for (
const auto&
hit : rechitsEE) {
290 hitMap.emplace(
hit.detid(), &
hit);
293 for (
const auto&
hit : rechitsFH) {
294 hitMap.emplace(
hit.detid(), &
hit);
297 for (
const auto&
hit : rechitsBH) {
298 hitMap.emplace(
hit.detid(), &
hit);