104 edm::LogInfo(
"Phase2OTMonitorVectorHits") <<
">>> Construct Phase2OTMonitorVectorHits ";
113 edm::LogInfo(
"Phase2OTMonitorVectorHits") <<
">>> Destroy Phase2OTMonitorVectorHits ";
129 if (!vechits.isValid())
131 std::map<std::string, unsigned int> nvechitLayerMapP;
132 std::map<std::string, unsigned int> nvechitLayerMapS;
133 unsigned long int nTotvechitsinevt = 0;
136 for (DSViter = vechits->begin(); DSViter != vechits->end(); ++DSViter) {
138 unsigned int rawid(DSViter->detId());
144 nTotvechitsinevt += DSViter->size();
146 if (nvechitLayerMapP.find(
key) == nvechitLayerMapP.end()) {
147 nvechitLayerMapP.insert(std::make_pair(
key, DSViter->size()));
149 nvechitLayerMapP[
key] += DSViter->size();
152 if (nvechitLayerMapS.find(
key) == nvechitLayerMapS.end()) {
153 nvechitLayerMapS.insert(std::make_pair(
key, DSViter->size()));
155 nvechitLayerMapS[
key] += DSViter->size();
160 for (vechitIt = DSViter->
begin(); vechitIt != DSViter->
end(); ++vechitIt) {
162 const LocalPoint lp = vechitIt->localPosition();
163 const double gx = globalPos.
x() * 10.;
164 const double gy = globalPos.
y() * 10.;
165 const double gz = globalPos.
z() * 10.;
166 const double gr = globalPos.
perp() * 10.;
168 const float curvature = vechitIt->curvature();
169 const float curverr = vechitIt->curvatureError();
170 const float eta = globalVec.
eta();
171 const float phi = globalVec.
phi();
173 const int sign = QOverPT > 0. ? 1. : -1.;
183 edm::LogError(
"Phase2OTMonitorVectorHits") <<
"VectorHit with curvature zero found";
198 edm::LogError(
"Phase2OTMonitorVectorHits") <<
"VectorHit with curvature zero found";
210 for (
auto& lme : nvechitLayerMapP) {
211 layerMEs_[lme.first].numberVecHits_P->Fill(lme.second);
213 for (
auto& lme : nvechitLayerMapS) {
214 layerMEs_[lme.first].numberVecHits_S->Fill(lme.second);
227 edm::LogInfo(
"Phase2OTMonitorVectorHits") <<
" Booking Histograms in : " << top_folder;
243 if (theTkDigiGeomWatcher.
check(iSetup)) {
245 unsigned int detId_raw = det_u->geographicalId().rawId();
264 edm::LogInfo(
"Phase2OTMonitorVectorHits") <<
" Booking Histograms in : " <<
key;
311 psd0.
add<
double>(
"xmin", 0.0);
312 psd0.
add<
bool>(
"switch",
true);
313 psd0.
add<
double>(
"xmax", 15000.0);
314 psd0.
add<
int>(
"NxBins", 150);
320 psd0.
add<
std::string>(
"title",
"Global_VecHitPosition_XY_P;x [mm];y [mm];");
321 psd0.
add<
int>(
"NxBins", 1250);
322 psd0.
add<
double>(
"xmin", -1250.0);
323 psd0.
add<
double>(
"xmax", 1250.0);
324 psd0.
add<
int>(
"NyBins", 1250);
325 psd0.
add<
double>(
"ymin", -1250.0);
326 psd0.
add<
double>(
"ymax", 1250.0);
327 psd0.
add<
bool>(
"switch",
true);
333 psd0.
add<
std::string>(
"title",
"Global_VecHitPosition_XY_S;x [mm];y [mm];");
334 psd0.
add<
int>(
"NxBins", 1250);
335 psd0.
add<
double>(
"xmin", -1250.0);
336 psd0.
add<
double>(
"xmax", 1250.0);
337 psd0.
add<
int>(
"NyBins", 1250);
338 psd0.
add<
double>(
"ymin", -1250.0);
339 psd0.
add<
double>(
"ymax", 1250.0);
340 psd0.
add<
bool>(
"switch",
true);
346 psd0.
add<
std::string>(
"title",
"Global_VecHitPosition_RZ_P;z [mm];r [mm]");
347 psd0.
add<
int>(
"NxBins", 1500);
348 psd0.
add<
double>(
"xmin", -3000.0);
349 psd0.
add<
double>(
"xmax", 3000.0);
350 psd0.
add<
int>(
"NyBins", 1250);
351 psd0.
add<
double>(
"ymin", 0.0);
352 psd0.
add<
double>(
"ymax", 1250.0);
353 psd0.
add<
bool>(
"switch",
true);
359 psd0.
add<
std::string>(
"title",
"Global_VecHitPosition_RZ_S;z [mm];r [mm]");
361 psd0.
add<
int>(
"NxBins", 1500);
362 psd0.
add<
double>(
"xmin", -3000.0);
363 psd0.
add<
double>(
"xmax", 3000.0);
364 psd0.
add<
int>(
"NyBins", 1250);
365 psd0.
add<
double>(
"ymin", 0.0);
366 psd0.
add<
double>(
"ymax", 1250.0);
367 psd0.
add<
bool>(
"switch",
true);
374 psd0.
add<
std::string>(
"title",
";Number of vector hits per event(macro pixel sensor);");
375 psd0.
add<
double>(
"xmin", 0.0);
376 psd0.
add<
double>(
"xmax", 5000.0);
377 psd0.
add<
int>(
"NxBins", 100);
378 psd0.
add<
bool>(
"switch",
true);
385 psd0.
add<
std::string>(
"title",
";Number of vector hits per event(strip sensor);");
386 psd0.
add<
double>(
"xmin", 0.0);
387 psd0.
add<
double>(
"xmax", 5000.0);
388 psd0.
add<
int>(
"NxBins", 100);
389 psd0.
add<
bool>(
"switch",
true);
396 psd0.
add<
int>(
"NxBins", 50);
397 psd0.
add<
double>(
"xmin", -10.0);
398 psd0.
add<
double>(
"xmax", 10.0);
399 psd0.
add<
int>(
"NyBins", 50);
400 psd0.
add<
double>(
"ymin", -10.0);
401 psd0.
add<
double>(
"ymax", 10.0);
402 psd0.
add<
bool>(
"switch",
true);
409 psd0.
add<
int>(
"NxBins", 50);
410 psd0.
add<
double>(
"xmin", -10.0);
411 psd0.
add<
double>(
"xmax", 10.0);
412 psd0.
add<
int>(
"NyBins", 50);
413 psd0.
add<
double>(
"ymin", -10.0);
414 psd0.
add<
double>(
"ymax", 10.0);
415 psd0.
add<
bool>(
"switch",
true);
423 psd0.
add<
double>(
"xmin", -0.05);
424 psd0.
add<
bool>(
"switch",
true);
425 psd0.
add<
double>(
"xmax", 0.05);
426 psd0.
add<
int>(
"NxBins", 200);
433 psd0.
add<
double>(
"xmin", -0.05);
434 psd0.
add<
bool>(
"switch",
true);
435 psd0.
add<
double>(
"xmax", 0.05);
436 psd0.
add<
int>(
"NxBins", 500);
443 psd0.
add<
double>(
"xmin", -
M_PI);
444 psd0.
add<
bool>(
"switch",
true);
445 psd0.
add<
double>(
"xmax",
M_PI);
446 psd0.
add<
int>(
"NxBins", 30);
453 psd0.
add<
double>(
"xmin", -5.);
454 psd0.
add<
bool>(
"switch",
true);
455 psd0.
add<
double>(
"xmax", 5.);
456 psd0.
add<
int>(
"NxBins", 50);
463 psd0.
add<
int>(
"NxBins", 100);
464 psd0.
add<
double>(
"xmin", 0.);
465 psd0.
add<
double>(
"xmax", 200.0);
466 psd0.
add<
bool>(
"switch",
true);
473 psd0.
add<
int>(
"NxBins", 100);
474 psd0.
add<
double>(
"xmin", 0.);
475 psd0.
add<
double>(
"xmax", 0.000001);
476 psd0.
add<
bool>(
"switch",
true);
482 psd0.
add<
std::string>(
"title",
"Curvature vs #eta (macro-pixel);#eta ;curvature ;");
483 psd0.
add<
int>(
"NxBins", 50);
484 psd0.
add<
double>(
"xmin", -5.0);
485 psd0.
add<
double>(
"xmax", 5.0);
486 psd0.
add<
double>(
"ymin", -0.05);
487 psd0.
add<
double>(
"ymax", 0.05);
488 psd0.
add<
bool>(
"switch",
true);
494 psd0.
add<
std::string>(
"title",
"Curvature vs #eta (strip);#eta ;curvature ;");
495 psd0.
add<
int>(
"NxBins", 25);
496 psd0.
add<
double>(
"xmin", -5.0);
497 psd0.
add<
double>(
"xmax", 5.0);
498 psd0.
add<
double>(
"ymin", -0.05);
499 psd0.
add<
double>(
"ymax", 0.05);
500 psd0.
add<
bool>(
"switch",
true);
503 desc.add<
std::string>(
"TopFolderName",
"TrackerPhase2OTVectorHits/Accepted");
504 desc.add<
bool>(
"Verbosity",
false);
506 descriptions.
add(
"Phase2OTMonitorVectorHits",
desc);
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
T getParameter(std::string const &) const
void bookLayerHistos(DQMStore::IBooker &ibooker, unsigned int det_id, std::string &subdir)
MonitorElement * book2DFromPSet(const edm::ParameterSet &hpars, DQMStore::IBooker &ibooker)
void bookHistograms(DQMStore::IBooker &ibooker, edm::Run const &iRun, edm::EventSetup const &iSetup) override
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
virtual void setCurrentFolder(std::string const &fullpath)
MonitorElement * curvature_S
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
Geom::Phi< T > phi() const
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
void dqmBeginRun(const edm::Run &iRun, const edm::EventSetup &iSetup) override
std::map< std::string, VecHitME > layerMEs_
MonitorElement * bookProfile1DFromPSet(const edm::ParameterSet &hpars, DQMStore::IBooker &ibooker)
data_type const * const_iterator
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
Log< level::Error, false > LogError
T curvature(T InversePt, const MagneticField &field)
MonitorElement * curvatureVsEta_S
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
std::string getOTHistoId(uint32_t det_id, const TrackerTopology *tTopo)
MonitorElement * curvErr_S
ModuleType getDetectorType(DetId) const
const edm::EDGetTokenT< VectorHitCollection > tokenVecHitsOT_
~Phase2OTMonitorVectorHits() override
#define DEFINE_FWK_MODULE(type)
MonitorElement * numberVecHits_P
ParameterDescriptionBase * add(U const &iLabel, T const &value)
MonitorElement * book1DFromPSet(const edm::ParameterSet &hpars, DQMStore::IBooker &ibooker)
const MagneticField * magField_
Log< level::Info, false > LogInfo
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
void add(std::string const &label, ParameterSetDescription const &psetDescription)
MonitorElement * globalXY_S_
MonitorElement * localPosXY_S
bool check(const edm::EventSetup &iSetup)
MonitorElement * numberVecHits_S
const TrackerGeometry * tkGeom_
edm::ParameterSet config_
MonitorElement * globalRZ_P_
MonitorElement * globalXY_P_
MonitorElement * curvature_P
MonitorElement * curvErr_P
MonitorElement * globalRZ_S_
Phase2OTMonitorVectorHits(const edm::ParameterSet &)
MonitorElement * localPosXY_P
MonitorElement * numberVecHits_
const TrackerTopology * tTopo_
MonitorElement * curvatureVsEta_P