11 SaveGeneralInfo_(pset.getUntrackedParameter<
bool>(
"SaveGeneralInfo")),
12 doCaloParticlePlots_(pset.getUntrackedParameter<
bool>(
"doCaloParticlePlots")),
13 dolayerclustersPlots_(pset.getUntrackedParameter<
bool>(
"dolayerclustersPlots")),
14 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);
32 for (
auto& itag :
label) {
33 labelToken.push_back(consumes<reco::CaloClusterCollection>(itag));
57 double thelay = 0.;
double mbg = 0.;
60 cummatbudg.insert( std::pair<double, double>( thelay , mbg ) );
97 for (
unsigned int www=0;www<
label.size();www++){
103 LogDebug(
"HGCalValidator") << dirName <<
"\n";
104 if(!algo.
label().empty())
105 dirName+=algo.
label()+
"_";
106 LogDebug(
"HGCalValidator") << dirName <<
"\n";
109 LogDebug(
"HGCalValidator") << dirName <<
"\n";
111 if (!dirName.empty()){dirName.resize(dirName.size() - 1);}
113 LogDebug(
"HGCalValidator") << dirName <<
"\n";
126 std::vector<CaloParticle>
const & cPeff,
128 std::vector<size_t>& selected_cPeff)
const {
129 selected_cPeff.reserve(cPeff.size());
132 for (
auto const caloParticle : cPeff) {
133 int id = caloParticle.pdgId();
136 selected_cPeff.push_back(j);
147 using namespace reco;
149 LogDebug(
"HGCalValidator") <<
"\n====================================================" <<
"\n" 150 <<
"Analyzing new event" <<
"\n" 151 <<
"====================================================\n" <<
"\n";
155 std::vector<SimVertex>
const &
simVertices = *simVerticesHandle;
159 std::vector<CaloParticle>
const &
caloParticles = *caloParticleHandle;
161 tools_->getEventSetup(setup);
171 std::map<DetId, const HGCRecHit* > hitMap;
172 fillHitMap(hitMap, *recHitHandleEE,*recHitHandleFH,*recHitHandleBH);
182 LogTrace(
"HGCalValidator") <<
"\n# of CaloParticles: " << caloParticles.size() <<
"\n";
183 std::vector<size_t> selected_cPeff;
187 for (
unsigned int www=0;www<
label.size();www++, w++){
191 event.getByToken(
labelToken[www],clusterHandle);
196 event.getByToken(
density_, densityHandle);
197 const Density &densities = *densityHandle;
205 w,clusters,densities,caloParticles,
210 for (
unsigned int layerclusterIndex = 0; layerclusterIndex < clusters.size(); layerclusterIndex++) {
214 LogTrace(
"HGCalValidator") <<
"\n# of layer clusters with " 215 <<
label[www].process()<<
":" 216 <<
label[www].label()<<
":" 217 <<
label[www].instance()
218 <<
": " << clusters.size() <<
"\n";
228 for (
const auto&
hit : rechitsEE) {
229 hitMap.emplace(
hit.detid(), &
hit);
232 for (
const auto&
hit : rechitsFH) {
233 hitMap.emplace(
hit.detid(), &
hit);
236 for (
const auto&
hit : rechitsBH) {
237 hitMap.emplace(
hit.detid(), &
hit);
T getParameter(std::string const &) const
std::map< double, double > cummatbudg
edm::EDGetTokenT< HGCRecHitCollection > recHitsBH_
std::unique_ptr< HGVHistoProducerAlgo > histoProducerAlgo_
def setup(process, global_tag, zero_tesla=False)
~HGCalValidator() override
Destructor.
CaloParticleSelector cpSelector
const bool doCaloParticlePlots_
unsigned totallayers_to_monitor_
std::vector< int > thicknesses_to_monitor_
std::vector< edm::InputTag > label
const bool SaveGeneralInfo_
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
void bookHistograms(DQMStore::ConcurrentBooker &, edm::Run const &, edm::EventSetup const &, Histograms &) const override
Method called to book the DQM histograms.
HGVHistoProducerAlgoHistograms histoProducerAlgo
edm::EDGetTokenT< std::vector< SimVertex > > simVertices_
void setCurrentFolder(std::string const &fullpath)
edm::EDGetTokenT< std::vector< CaloParticle > > label_cp_fake
edm::EDGetTokenT< std::vector< CaloParticle > > label_cp_effic
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
HGCalValidator(const edm::ParameterSet &pset)
Constructor.
const edm::FileInPath cummatbudinxo_
const bool dolayerclustersPlots_
std::vector< edm::EDGetTokenT< reco::CaloClusterCollection > > labelToken
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_
std::string fullPath() const
void fillHitMap(std::map< DetId, const HGCRecHit * > &, const HGCRecHitCollection &, const HGCRecHitCollection &, const HGCRecHitCollection &) const