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 <<
"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 !!!";
220 <<
" with " << ntot <<
" total and " 221 << nused <<
" used recHits";
224 template<
class T1,
class T2>
226 const T1*
geom, T2 it) {
228 const GlobalPoint& global = geom->getPosition(detId);
229 double energy = it->energy();
231 float globalx = global.
x();
232 float globaly = global.
y();
233 float globalz = global.
z();
246 << globalx <<
" gy = " << globaly
247 <<
" gz = " << globalz <<
" phi = " 248 << hinfo.
phi <<
" eta = " << hinfo.
eta 249 <<
" lay = " << hinfo.
layer;
260 if (OccupancyMap.find(layer) != OccupancyMap.end()) OccupancyMap[layer]++;
261 else OccupancyMap[layer] = 1;
267 int layer = itr.first;
268 int occupancy = itr.second;
273 int layer = itr.first;
274 int occupancy = itr.second;
282 unsigned int ilayer = hits.
layer;
312 std::ostringstream histoname;
313 for (
unsigned int il=0; il<
layers_; ++il) {
315 histoname.str(
""); histoname <<
"HitOccupancy_Plus_layer_" << ilayer;
317 histoname.str(
""); histoname <<
"HitOccupancy_Minus_layer_" << ilayer;
320 histoname.str(
""); histoname <<
"EtaPhi_Plus_" <<
"layer_" << ilayer;
322 histoname.str(
""); histoname <<
"EtaPhi_Minus_" <<
"layer_" << ilayer;
325 histoname.str(
""); histoname <<
"energy_layer_" << ilayer;
326 energy_.push_back(iB.
book1D(histoname.str().c_str(),
"energy_",100,0,0.002));
329 histoname.str(
""); histoname <<
"SUMOfRecHitOccupancy_Plus";
331 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
#define DEFINE_FWK_MODULE(type)
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
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 #