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;
192 std::map<DetId, const HGCRecHit*> hitMap;
193 fillHitMap(hitMap, *recHitHandleEE, *recHitHandleFH, *recHitHandleBH);
201 std::vector<size_t> cPIndices;
204 for (
unsigned int cpId = 0; cpId < nCaloParticles; ++cpId) {
206 caloParticles[cpId].g4Tracks()[0].eventId().bunchCrossing() != 0) {
207 LogDebug(
"HGCalValidator") <<
"Excluding CaloParticles from event: "
209 <<
" with BX: " <<
caloParticles[cpId].g4Tracks()[0].eventId().bunchCrossing()
213 cPIndices.emplace_back(cpId);
220 std::vector<size_t> selected_cPeff;
231 event.getByToken(
density_, densityHandle);
232 const Density& densities = *densityHandle;
251 for (
unsigned int layerclusterIndex = 0; layerclusterIndex <
clusters.size(); layerclusterIndex++) {
267 const std::vector<reco::HGCalMultiCluster>& multiClusters = *multiClusterHandle;
279 LogTrace(
"HGCalValidator") <<
"\n# of multi clusters with " <<
label_mcl[wml].process() <<
":"
281 << multiClusters.size() <<
"\n";
291 for (
const auto&
hit : rechitsEE) {
292 hitMap.emplace(
hit.detid(), &
hit);
295 for (
const auto&
hit : rechitsFH) {
296 hitMap.emplace(
hit.detid(), &
hit);
299 for (
const auto&
hit : rechitsBH) {
300 hitMap.emplace(
hit.detid(), &
hit);