38 #include "CLHEP/Units/GlobalSystemOfUnits.h" 68 template<
class T1,
class T2>
96 verbosity_(iConfig.getUntrackedParameter<
int>(
"Verbosity",0)),
109 <<
"HGCal DetectorName given as " <<
nameDetector_ <<
" must be: " 110 <<
"\"HGCalHESiliconSensitive\", \"HGCalHESiliconSensitive\", " 111 <<
"\"HGCalHEScintillatorSensitive\", or \"HCal\"!";
120 desc.
add<
bool>(
"ifHCAL",
false);
122 descriptions.
add(
"hgcalRecHitValidationEE",desc);
131 unsigned int ntot(0), nused(0);
148 for (
const auto & it : *(hbhecoll.
product())) {
149 DetId detId = it.id();
160 <<
"Handle does not exist !!!";
170 for (
const auto & it : *(hbhecoll.
product())) {
171 DetId detId = it.id();
179 <<
"Handle does not exist !!!";
198 if (theRecHitContainers.
isValid()) {
201 << theRecHitContainers->
size()
203 for (
const auto & it : *(theRecHitContainers.
product())) {
205 DetId detId = it.id();
214 <<
"does not exist !!!";
221 <<
" with " << ntot <<
" total and " 222 << nused <<
" used recHits";
225 template<
class T1,
class T2>
227 const T1*
geom, T2 it) {
229 const GlobalPoint& global = geom->getPosition(detId);
230 double energy = it->energy();
232 float globalx = global.
x();
233 float globaly = global.
y();
234 float globalz = global.
z();
247 << globalx <<
" gy = " << globaly
248 <<
" gz = " << globalz <<
" phi = " 249 << hinfo.
phi <<
" eta = " << hinfo.
eta 250 <<
" lay = " << hinfo.
layer;
261 if (OccupancyMap.find(layer) != OccupancyMap.end()) OccupancyMap[layer]++;
262 else OccupancyMap[layer] = 1;
268 int layer = itr.first;
269 int occupancy = itr.second;
274 int layer = itr.first;
275 int occupancy = itr.second;
283 unsigned int ilayer = hits.
layer;
313 std::ostringstream histoname;
314 for (
unsigned int il=0; il<
layers_; ++il) {
316 histoname.str(
""); histoname <<
"HitOccupancy_Plus_layer_" << ilayer;
318 histoname.str(
""); histoname <<
"HitOccupancy_Minus_layer_" << ilayer;
321 histoname.str(
""); histoname <<
"EtaPhi_Plus_" <<
"layer_" << ilayer;
323 histoname.str(
""); histoname <<
"EtaPhi_Minus_" <<
"layer_" << ilayer;
326 histoname.str(
""); histoname <<
"energy_layer_" << ilayer;
327 energy_.push_back(iB.
book1D(histoname.str().c_str(),
"energy_",500,0,1));
330 histoname.str(
""); histoname <<
"SUMOfRecHitOccupancy_Plus";
332 histoname.str(
""); histoname <<
"SUMOfRecHitOccupancy_Minus";
HGCalGeometryMode::GeometryMode geomMode() const
Geometry mode.
T getParameter(std::string const &) const
EventNumber_t event() const
HGCalRecHitValidation(const edm::ParameterSet &)
std::vector< MonitorElement * > EtaPhi_Minus_
edm::EDGetToken recHitSource_
~HGCalRecHitValidation() override
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Geom::Phi< T > phi() const
std::vector< MonitorElement * > EtaPhi_Plus_
std::vector< MonitorElement * > HitOccupancy_Minus_
std::string nameDetector_
MonitorElement * MeanHitOccupancy_Plus_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
int depth() const
get the tower depth
#define DEFINE_FWK_MODULE(type)
std::map< int, int > OccupancyMap_minus
unsigned int layers(bool reco) const
void setCurrentFolder(std::string const &fullpath)
int layer() const
get the layer #
const HGCalTopology & topology() const
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
MonitorElement * book1D(Args &&...args)
MonitorElement * MeanHitOccupancy_Minus_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
void fillOccupancyMap(std::map< int, int > &OccupancyMap, int layer)
void analyze(const edm::Event &, const edm::EventSetup &) override
T const * product() const
MonitorElement * book2D(Args &&...args)
int getMaxDepth(const int &type) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
int layer() const
get the layer #
std::map< int, int > OccupancyMap_plus
std::vector< MonitorElement * > HitOccupancy_Plus_
T const * product() const
void recHitValidation(DetId &detId, int layer, const T1 *geom, T2 it)
std::vector< MonitorElement * > energy_
int layer() const
get the layer #