|
|
Go to the documentation of this file.
30 #include "CLHEP/Units/GlobalSystemOfUnits.h"
58 template <
class T1,
class T2>
85 : nameDetector_(iConfig.getParameter<
std::
string>(
"DetectorName")),
89 verbosity_(iConfig.getUntrackedParameter<
int>(
"Verbosity", 0)),
97 <<
"\"HGCalHESiliconSensitive\", \"HGCalHESiliconSensitive\", or "
98 <<
"\"HGCalHEScintillatorSensitive\"!";
106 desc.addUntracked<
int>(
"Verbosity", 0);
107 descriptions.
add(
"hgcalRecHitValidationEE",
desc);
115 unsigned int ntot(0), nused(0);
122 int geomType = ((
geom0->topology().waferHexagon8()) ? 1 : ((
geom0->topology().tileTrapezoid()) ? 2 : 0));
126 if (theRecHitContainers.
isValid()) {
130 for (
const auto& it : *(theRecHitContainers.
product())) {
133 DetId detId = it.id();
134 int layer = ((geomType == 0)
142 <<
"does not exist !!!";
152 template <
class T1,
class T2>
155 double energy = it->energy();
157 float globalx = global.
x();
158 float globaly = global.
y();
159 float globalz = global.
z();
171 edm::LogVerbatim(
"HGCalValidation") <<
"-------------------------- gx = " << globalx <<
" gy = " << globaly
172 <<
" gz = " << globalz <<
" phi = " <<
hinfo.phi <<
" eta = " <<
hinfo.eta
173 <<
" lay = " <<
hinfo.layer;
184 if (OccupancyMap.find(
layer) != OccupancyMap.end())
185 OccupancyMap[
layer]++;
187 OccupancyMap[
layer] = 1;
192 int layer = itr.first;
193 int occupancy = itr.second;
198 int layer = itr.first;
199 int occupancy = itr.second;
205 unsigned int ilayer =
hits.layer;
227 std::ostringstream histoname;
228 for (
unsigned int il = 0; il <
layers_; ++il) {
230 auto istr1 = std::to_string(ilayer);
231 while (istr1.size() < 2) {
232 istr1.insert(0,
"0");
235 histoname <<
"HitOccupancy_Plus_layer_" << istr1;
238 histoname <<
"HitOccupancy_Minus_layer_" << istr1;
242 histoname <<
"EtaPhi_Plus_"
243 <<
"layer_" << istr1;
246 histoname <<
"EtaPhi_Minus_"
247 <<
"layer_" << istr1;
252 histoname <<
"energy_layer_" << istr1;
253 energy_.push_back(iB.
book1D(histoname.str().c_str(),
"energy_", 500, 0, 1));
257 histoname <<
"SUMOfRecHitOccupancy_Plus";
261 histoname <<
"SUMOfRecHitOccupancy_Minus";
T const * product() const
~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
edm::ESGetToken< HGCalGeometry, IdealGeometryRecord > geometry_token_
std::map< int, int > OccupancyMap_plus
int layer() const
get the layer #
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
int layer() const
get the layer #
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 &)
void recHitValidation(DetId &detId, int layer, const T1 *geom, T2 it)
constexpr std::array< uint8_t, layerIndexSize > layer
std::vector< MonitorElement * > EtaPhi_Plus_
std::vector< MonitorElement * > HitOccupancy_Minus_
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
unsigned int layers(bool reco) const
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
std::vector< MonitorElement * > energy_
MonitorElement * MeanHitOccupancy_Plus_
Log< level::Info, true > LogVerbatim
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
T getParameter(std::string const &) const
edm::ESGetToken< HGCalGeometry, IdealGeometryRecord > geometry_beginRun_token_
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 #