|
|
Go to the documentation of this file.
38 #include "CLHEP/Units/GlobalSystemOfUnits.h"
66 template <
class T1,
class T2>
92 : nameDetector_(iConfig.getParameter<
std::
string>(
"DetectorName")),
93 ifHCAL_(iConfig.getParameter<
bool>(
"ifHCAL")),
94 verbosity_(iConfig.getUntrackedParameter<
int>(
"Verbosity", 0)),
107 <<
"\"HGCalHESiliconSensitive\", \"HGCalHESiliconSensitive\", "
108 <<
"\"HGCalHEScintillatorSensitive\", or \"HCal\"!";
116 desc.
add<
bool>(
"ifHCAL",
false);
118 descriptions.
add(
"hgcalRecHitValidationEE", desc);
126 unsigned int ntot(0), nused(0);
130 if (!
geom.isValid()) {
141 for (
const auto& it : *(hbhecoll.
product())) {
142 DetId detId = it.id();
153 <<
"Handle does not exist !!!";
161 for (
const auto& it : *(hbhecoll.
product())) {
162 DetId detId = it.id();
171 <<
"Handle does not exist !!!";
178 if (!
geom.isValid()) {
190 if (theRecHitContainers.
isValid()) {
194 for (
const auto& it : *(theRecHitContainers.
product())) {
197 DetId detId = it.id();
198 int layer = ((geomType == 0)
206 <<
"does not exist !!!";
213 edm::LogVerbatim(
"HGCalValidation") <<
"Event " <<
iEvent.id().event() <<
" with " << ntot <<
" total and " << nused
217 template <
class T1,
class T2>
220 double energy = it->energy();
222 float globalx = global.
x();
223 float globaly = global.
y();
224 float globalz = global.
z();
236 edm::LogVerbatim(
"HGCalValidation") <<
"-------------------------- gx = " << globalx <<
" gy = " << globaly
237 <<
" gz = " << globalz <<
" phi = " <<
hinfo.phi <<
" eta = " <<
hinfo.eta
238 <<
" lay = " <<
hinfo.layer;
249 if (OccupancyMap.find(layer) != OccupancyMap.end())
250 OccupancyMap[layer]++;
252 OccupancyMap[layer] = 1;
257 int layer =
itr.first;
258 int occupancy =
itr.second;
263 int layer =
itr.first;
264 int occupancy =
itr.second;
270 unsigned int ilayer =
hits.layer;
294 std::ostringstream histoname;
295 for (
unsigned int il = 0; il <
layers_; ++il) {
297 auto istr1 = std::to_string(ilayer);
298 while (istr1.size() < 2) {
299 istr1.insert(0,
"0");
302 histoname <<
"HitOccupancy_Plus_layer_" << istr1;
305 histoname <<
"HitOccupancy_Minus_layer_" << istr1;
309 histoname <<
"EtaPhi_Plus_"
310 <<
"layer_" << istr1;
313 histoname <<
"EtaPhi_Minus_"
314 <<
"layer_" << istr1;
319 histoname <<
"energy_layer_" << istr1;
320 energy_.push_back(iB.
book1D(histoname.str().c_str(),
"energy_", 500, 0, 1));
324 histoname <<
"SUMOfRecHitOccupancy_Plus";
328 histoname <<
"SUMOfRecHitOccupancy_Minus";
ParameterDescriptionBase * add(U const &iLabel, T const &value)
~HGCalRecHitValidation() override
std::string nameDetector_
T const * product() const
MonitorElement * MeanHitOccupancy_Minus_
void fillOccupancyMap(std::map< int, int > &OccupancyMap, int layer)
std::vector< MonitorElement * > EtaPhi_Minus_
virtual void setCurrentFolder(std::string const &fullpath)
edm::EDGetToken recHitSource_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
constexpr int depth() const
get the tower depth
std::map< int, int > OccupancyMap_plus
int layer() const
get the layer #
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
int layer() const
get the layer #
dqm::implementation::IBooker IBooker
void analyze(const edm::Event &, const edm::EventSetup &) override
#define DEFINE_FWK_MODULE(type)
std::vector< MonitorElement * > HitOccupancy_Plus_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
HGCalRecHitValidation(const edm::ParameterSet &)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
void recHitValidation(DetId &detId, int layer, const T1 *geom, T2 it)
std::vector< MonitorElement * > EtaPhi_Plus_
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
std::vector< MonitorElement * > HitOccupancy_Minus_
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
unsigned int layers(bool reco) const
std::vector< std::pair< float, float > >::iterator itr
std::vector< MonitorElement * > energy_
T getParameter(std::string const &) const
MonitorElement * MeanHitOccupancy_Plus_
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
std::map< int, int > OccupancyMap_minus
int getMaxDepth(const int &type) const
Geom::Phi< T > phi() const
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
int layer() const
get the layer #