Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-11-17 20:24:55

0001 /**\class Phase2OTMonitorVectorHits Phase2OTMonitorVectorHits.cc 
0002  Description:  DQM module to monitor Phase2 VectorHit
0003 */
0004 //
0005 // Author: Gourab Saha, Suvankar Roy Chowdhury
0006 //
0007 // system include files
0008 #include <memory>
0009 #include <map>
0010 #include "FWCore/Framework/interface/Frameworkfwd.h"
0011 #include "FWCore/Framework/interface/Event.h"
0012 #include "FWCore/Framework/interface/ESHandle.h"
0013 #include "FWCore/Framework/interface/MakerMacros.h"
0014 #include "FWCore/Framework/interface/ESWatcher.h"
0015 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0016 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0017 #include "FWCore/ServiceRegistry/interface/Service.h"
0018 #include "FWCore/Utilities/interface/InputTag.h"
0019 
0020 #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
0021 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
0022 #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
0023 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
0024 
0025 #include "DataFormats/Common/interface/Handle.h"
0026 #include "DataFormats/Common/interface/DetSetVector.h"
0027 #include "DataFormats/Common/interface/DetSetVectorNew.h"
0028 #include "DataFormats/DetId/interface/DetId.h"
0029 #include "DataFormats/GeometrySurface/interface/LocalError.h"
0030 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
0031 #include "DataFormats/TrackerCommon/interface/TrackerTopology.h"
0032 #include "DataFormats/TrackerCommon/interface/TrackerTopology.h"
0033 #include "DataFormats/TrackerRecHit2D/interface/VectorHit.h"
0034 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
0035 #include "MagneticField/Engine/interface/MagneticField.h"
0036 
0037 // DQM Histograming
0038 #include "DQMServices/Core/interface/MonitorElement.h"
0039 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0040 #include "DQMServices/Core/interface/DQMStore.h"
0041 
0042 #include "DQM/SiTrackerPhase2/interface/TrackerPhase2DQMUtil.h"
0043 
0044 class Phase2OTMonitorVectorHits : public DQMEDAnalyzer {
0045 public:
0046   explicit Phase2OTMonitorVectorHits(const edm::ParameterSet&);
0047   ~Phase2OTMonitorVectorHits() override;
0048   void bookHistograms(DQMStore::IBooker& ibooker, edm::Run const& iRun, edm::EventSetup const& iSetup) override;
0049   void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) override;
0050   void dqmBeginRun(const edm::Run& iRun, const edm::EventSetup& iSetup) override;
0051   static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0052 
0053 private:
0054   void bookLayerHistos(DQMStore::IBooker& ibooker, unsigned int det_id, std::string& subdir);
0055 
0056   edm::ParameterSet config_;
0057   const edm::EDGetTokenT<VectorHitCollection> tokenVecHitsOT_;
0058 
0059   const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> geomToken_;
0060   const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> topoToken_;
0061   const edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> magFieldToken_;
0062 
0063   const TrackerGeometry* tkGeom_ = nullptr;
0064   const TrackerTopology* tTopo_ = nullptr;
0065   const MagneticField* magField_ = nullptr;
0066 
0067   MonitorElement* numberVecHits_ = nullptr;
0068   MonitorElement* globalXY_P_ = nullptr;
0069   MonitorElement* globalRZ_P_ = nullptr;
0070   MonitorElement* globalXY_S_ = nullptr;
0071   MonitorElement* globalRZ_S_ = nullptr;
0072   struct VecHitME {
0073     MonitorElement* numberVecHits_P = nullptr;
0074     MonitorElement* numberVecHits_S = nullptr;
0075     MonitorElement* localPosXY_P = nullptr;
0076     MonitorElement* localPosXY_S = nullptr;
0077     MonitorElement* curvature_P = nullptr;
0078     MonitorElement* curvature_S = nullptr;
0079     MonitorElement* curvErr_P = nullptr;
0080     MonitorElement* curvErr_S = nullptr;
0081     MonitorElement* curvatureVsEta_P = nullptr;
0082     MonitorElement* curvatureVsEta_S = nullptr;
0083     MonitorElement* phi_P = nullptr;
0084     MonitorElement* phi_S = nullptr;
0085     MonitorElement* eta_P = nullptr;
0086     MonitorElement* eta_S = nullptr;
0087     MonitorElement* pt_P = nullptr;
0088     MonitorElement* pt_S = nullptr;
0089     MonitorElement* chi2_P = nullptr;
0090     MonitorElement* chi2_S = nullptr;
0091   };
0092   std::map<std::string, VecHitME> layerMEs_;
0093 };
0094 
0095 //
0096 // constructors
0097 //
0098 Phase2OTMonitorVectorHits::Phase2OTMonitorVectorHits(const edm::ParameterSet& iConfig)
0099     : config_(iConfig),
0100       tokenVecHitsOT_(consumes<VectorHitCollection>(config_.getParameter<edm::InputTag>("vechitsSrc"))),
0101       geomToken_(esConsumes<TrackerGeometry, TrackerDigiGeometryRecord, edm::Transition::BeginRun>()),
0102       topoToken_(esConsumes<TrackerTopology, TrackerTopologyRcd, edm::Transition::BeginRun>()),
0103       magFieldToken_(esConsumes<MagneticField, IdealMagneticFieldRecord, edm::Transition::BeginRun>()) {
0104   edm::LogInfo("Phase2OTMonitorVectorHits") << ">>> Construct Phase2OTMonitorVectorHits ";
0105 }
0106 
0107 //
0108 // destructor
0109 //
0110 Phase2OTMonitorVectorHits::~Phase2OTMonitorVectorHits() {
0111   // do anything here that needs to be done at desctruction time
0112   // (e.g. close files, deallocate resources etc.)
0113   edm::LogInfo("Phase2OTMonitorVectorHits") << ">>> Destroy Phase2OTMonitorVectorHits ";
0114 }
0115 //
0116 // -- DQM Begin Run
0117 void Phase2OTMonitorVectorHits::dqmBeginRun(const edm::Run& iRun, const edm::EventSetup& iSetup) {
0118   tkGeom_ = &iSetup.getData(geomToken_);
0119   tTopo_ = &iSetup.getData(topoToken_);
0120   magField_ = &iSetup.getData(magFieldToken_);
0121 }
0122 
0123 //
0124 // -- Analyze
0125 //
0126 void Phase2OTMonitorVectorHits::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) {
0127   // Get the VecHits
0128   const auto& vechits = iEvent.getHandle(tokenVecHitsOT_);
0129   if (!vechits.isValid())
0130     return;
0131   std::map<std::string, unsigned int> nvechitLayerMapP;
0132   std::map<std::string, unsigned int> nvechitLayerMapS;
0133   unsigned long int nTotvechitsinevt = 0;
0134   // Loop over modules
0135   VectorHitCollection::const_iterator DSViter;
0136   for (DSViter = vechits->begin(); DSViter != vechits->end(); ++DSViter) {
0137     // Get the detector unit's id
0138     unsigned int rawid(DSViter->detId());
0139     DetId detId(rawid);
0140     TrackerGeometry::ModuleType mType = tkGeom_->getDetectorType(detId);
0141     if (mType != TrackerGeometry::ModuleType::Ph2PSP && mType != TrackerGeometry::ModuleType::Ph2SS)
0142       continue;
0143     std::string key = phase2tkutil::getOTHistoId(detId, tTopo_);
0144     nTotvechitsinevt += DSViter->size();
0145     if (mType == TrackerGeometry::ModuleType::Ph2PSP) {
0146       if (nvechitLayerMapP.find(key) == nvechitLayerMapP.end()) {
0147         nvechitLayerMapP.insert(std::make_pair(key, DSViter->size()));
0148       } else {
0149         nvechitLayerMapP[key] += DSViter->size();
0150       }
0151     } else if (mType == TrackerGeometry::ModuleType::Ph2SS) {
0152       if (nvechitLayerMapS.find(key) == nvechitLayerMapS.end()) {
0153         nvechitLayerMapS.insert(std::make_pair(key, DSViter->size()));
0154       } else {
0155         nvechitLayerMapS[key] += DSViter->size();
0156       }
0157     }
0158 
0159     edmNew::DetSet<VectorHit>::const_iterator vechitIt;
0160     for (vechitIt = DSViter->begin(); vechitIt != DSViter->end(); ++vechitIt) {
0161       const Global3DPoint globalPos = vechitIt->lowerGlobalPos();
0162       const LocalPoint lp = vechitIt->localPosition();
0163       const double gx = globalPos.x() * 10.;
0164       const double gy = globalPos.y() * 10.;
0165       const double gz = globalPos.z() * 10.;
0166       const double gr = globalPos.perp() * 10.;
0167       const Global3DVector globalVec = vechitIt->globalDirection();
0168       const float curvature = vechitIt->curvature();
0169       const float curverr = vechitIt->curvatureError();
0170       const float eta = globalVec.eta();
0171       const float phi = globalVec.phi();
0172       float QOverPT = vechitIt->transverseMomentum(magField_->inTesla(GlobalPoint(0., 0., 0.)).z());
0173       const int sign = QOverPT > 0. ? 1. : -1.;
0174       if (mType == TrackerGeometry::ModuleType::Ph2PSP) {
0175         globalXY_P_->Fill(gx, gy);
0176         globalRZ_P_->Fill(gz, gr);
0177         //layer wise histo
0178         layerMEs_[key].localPosXY_P->Fill(lp.x(), lp.y());
0179         layerMEs_[key].curvature_P->Fill(curvature);
0180         if (curvature != 0.f)
0181           layerMEs_[key].curvErr_P->Fill(curverr / curvature);
0182         else
0183           edm::LogError("Phase2OTMonitorVectorHits") << "VectorHit with curvature zero found";
0184         layerMEs_[key].phi_P->Fill(phi);
0185         layerMEs_[key].eta_P->Fill(eta);
0186         layerMEs_[key].pt_P->Fill(sign * QOverPT);
0187         layerMEs_[key].chi2_P->Fill(vechitIt->chi2());
0188         layerMEs_[key].curvatureVsEta_P->Fill(eta, curvature);
0189       } else if (mType == TrackerGeometry::ModuleType::Ph2SS) {
0190         globalXY_S_->Fill(gx, gy);
0191         globalRZ_S_->Fill(gz, gr);
0192         //layer wise histo
0193         layerMEs_[key].localPosXY_S->Fill(lp.x(), lp.y());
0194         layerMEs_[key].curvature_S->Fill(curvature);
0195         if (curvature != 0.f)
0196           layerMEs_[key].curvErr_S->Fill(curverr / curvature);
0197         else
0198           edm::LogError("Phase2OTMonitorVectorHits") << "VectorHit with curvature zero found";
0199         layerMEs_[key].phi_S->Fill(phi);
0200         layerMEs_[key].eta_S->Fill(eta);
0201         layerMEs_[key].pt_S->Fill(sign * QOverPT);
0202         layerMEs_[key].chi2_S->Fill(vechitIt->chi2());
0203         layerMEs_[key].curvatureVsEta_S->Fill(eta, curvature);
0204       }
0205     }
0206   }
0207   //fill nVecHits per event
0208   numberVecHits_->Fill(nTotvechitsinevt);
0209   //fill nVecHit counter per layer
0210   for (auto& lme : nvechitLayerMapP) {
0211     layerMEs_[lme.first].numberVecHits_P->Fill(lme.second);
0212   }
0213   for (auto& lme : nvechitLayerMapS) {
0214     layerMEs_[lme.first].numberVecHits_S->Fill(lme.second);
0215   }
0216 }
0217 //
0218 // -- Book Histograms
0219 //
0220 void Phase2OTMonitorVectorHits::bookHistograms(DQMStore::IBooker& ibooker,
0221                                                edm::Run const& iRun,
0222                                                edm::EventSetup const& iSetup) {
0223   std::string top_folder = config_.getParameter<std::string>("TopFolderName");
0224   //std::stringstream folder_name;
0225 
0226   ibooker.cd();
0227   edm::LogInfo("Phase2OTMonitorVectorHits") << " Booking Histograms in : " << top_folder;
0228   ibooker.setCurrentFolder(top_folder);
0229 
0230   //Global histos for OT
0231   numberVecHits_ = phase2tkutil::book1DFromPSet(config_.getParameter<edm::ParameterSet>("GlobalNVecHits"), ibooker);
0232 
0233   globalXY_P_ = phase2tkutil::book2DFromPSet(config_.getParameter<edm::ParameterSet>("GlobalPositionXY_P"), ibooker);
0234 
0235   globalRZ_P_ = phase2tkutil::book2DFromPSet(config_.getParameter<edm::ParameterSet>("GlobalPositionRZ_P"), ibooker);
0236 
0237   globalXY_S_ = phase2tkutil::book2DFromPSet(config_.getParameter<edm::ParameterSet>("GlobalPositionXY_S"), ibooker);
0238 
0239   globalRZ_S_ = phase2tkutil::book2DFromPSet(config_.getParameter<edm::ParameterSet>("GlobalPositionRZ_S"), ibooker);
0240 
0241   //Now book layer wise histos
0242   edm::ESWatcher<TrackerDigiGeometryRecord> theTkDigiGeomWatcher;
0243   if (theTkDigiGeomWatcher.check(iSetup)) {
0244     for (auto const& det_u : tkGeom_->detUnits()) {
0245       unsigned int detId_raw = det_u->geographicalId().rawId();
0246       //we only need the layerwise histos for the lower layer (?)
0247       if (tkGeom_->getDetectorType(detId_raw) != TrackerGeometry::ModuleType::Ph2PSP &&
0248           tkGeom_->getDetectorType(detId_raw) != TrackerGeometry::ModuleType::Ph2SS)
0249         continue;
0250       bookLayerHistos(ibooker, detId_raw, top_folder);
0251     }
0252   }
0253 }
0254 
0255 //
0256 // -- Book Layer Histograms
0257 //
0258 void Phase2OTMonitorVectorHits::bookLayerHistos(DQMStore::IBooker& ibooker, unsigned int det_id, std::string& subdir) {
0259   std::string key = phase2tkutil::getOTHistoId(det_id, tTopo_);
0260   if (layerMEs_.find(key) == layerMEs_.end()) {
0261     ibooker.cd();
0262     VecHitME local_histos;
0263     ibooker.setCurrentFolder(subdir + "/" + key);
0264     edm::LogInfo("Phase2OTMonitorVectorHits") << " Booking Histograms in : " << key;
0265     //either PSP or SS - ensured by the call from bookHisto
0266     if (tkGeom_->getDetectorType(det_id) == TrackerGeometry::ModuleType::Ph2PSP) {
0267       local_histos.numberVecHits_P =
0268           phase2tkutil::book1DFromPSet(config_.getParameter<edm::ParameterSet>("NVecHitsLayer_P"), ibooker);
0269       local_histos.localPosXY_P =
0270           phase2tkutil::book2DFromPSet(config_.getParameter<edm::ParameterSet>("LocalPositionXY_P"), ibooker);
0271       local_histos.curvature_P =
0272           phase2tkutil::book1DFromPSet(config_.getParameter<edm::ParameterSet>("Curvature"), ibooker);
0273       local_histos.curvErr_P =
0274           phase2tkutil::book1DFromPSet(config_.getParameter<edm::ParameterSet>("CurvErr"), ibooker);
0275       local_histos.phi_P = phase2tkutil::book1DFromPSet(config_.getParameter<edm::ParameterSet>("Phi"), ibooker);
0276       local_histos.eta_P = phase2tkutil::book1DFromPSet(config_.getParameter<edm::ParameterSet>("Eta"), ibooker);
0277       local_histos.pt_P = phase2tkutil::book1DFromPSet(config_.getParameter<edm::ParameterSet>("Pt"), ibooker);
0278       local_histos.chi2_P = phase2tkutil::book1DFromPSet(config_.getParameter<edm::ParameterSet>("Chi2"), ibooker);
0279       local_histos.curvatureVsEta_P =
0280           phase2tkutil::bookProfile1DFromPSet(config_.getParameter<edm::ParameterSet>("CurvatureVsEta_P"), ibooker);
0281     } else {
0282       ibooker.setCurrentFolder(subdir + "/" + key);
0283       local_histos.numberVecHits_S =
0284           phase2tkutil::book1DFromPSet(config_.getParameter<edm::ParameterSet>("NVecHitsLayer_P"), ibooker);
0285       local_histos.localPosXY_S =
0286           phase2tkutil::book2DFromPSet(config_.getParameter<edm::ParameterSet>("LocalPositionXY_S"), ibooker);
0287       local_histos.curvature_S =
0288           phase2tkutil::book1DFromPSet(config_.getParameter<edm::ParameterSet>("Curvature"), ibooker);
0289       local_histos.curvErr_S =
0290           phase2tkutil::book1DFromPSet(config_.getParameter<edm::ParameterSet>("CurvErr"), ibooker);
0291       local_histos.phi_S = phase2tkutil::book1DFromPSet(config_.getParameter<edm::ParameterSet>("Phi"), ibooker);
0292       local_histos.eta_S = phase2tkutil::book1DFromPSet(config_.getParameter<edm::ParameterSet>("Eta"), ibooker);
0293       local_histos.pt_S = phase2tkutil::book1DFromPSet(config_.getParameter<edm::ParameterSet>("Pt"), ibooker);
0294       local_histos.chi2_S = phase2tkutil::book1DFromPSet(config_.getParameter<edm::ParameterSet>("Chi2"), ibooker);
0295       local_histos.curvatureVsEta_S =
0296           phase2tkutil::bookProfile1DFromPSet(config_.getParameter<edm::ParameterSet>("CurvatureVsEta_S"), ibooker);
0297     }
0298     layerMEs_.insert(std::make_pair(key, local_histos));
0299   }
0300 }
0301 
0302 #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
0303 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
0304 void Phase2OTMonitorVectorHits::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
0305   // vechitMonitorOT
0306   edm::ParameterSetDescription desc;
0307   {
0308     edm::ParameterSetDescription psd0;
0309     psd0.add<std::string>("name", "NumberOfVecHits");
0310     psd0.add<std::string>("title", ";Number of vechits per event;");
0311     psd0.add<double>("xmin", 0.0);
0312     psd0.add<bool>("switch", true);
0313     psd0.add<double>("xmax", 15000.0);
0314     psd0.add<int>("NxBins", 150);
0315     desc.add<edm::ParameterSetDescription>("GlobalNVecHits", psd0);
0316   }
0317   {
0318     edm::ParameterSetDescription psd0;
0319     psd0.add<std::string>("name", "Global_VecHitPosition_XY_P");
0320     psd0.add<std::string>("title", "Global_VecHitPosition_XY_P;x [mm];y [mm];");
0321     psd0.add<int>("NxBins", 1250);
0322     psd0.add<double>("xmin", -1250.0);
0323     psd0.add<double>("xmax", 1250.0);
0324     psd0.add<int>("NyBins", 1250);
0325     psd0.add<double>("ymin", -1250.0);
0326     psd0.add<double>("ymax", 1250.0);
0327     psd0.add<bool>("switch", true);
0328     desc.add<edm::ParameterSetDescription>("GlobalPositionXY_P", psd0);
0329   }
0330   {
0331     edm::ParameterSetDescription psd0;
0332     psd0.add<std::string>("name", "Global_VecHitPosition_XY_S");
0333     psd0.add<std::string>("title", "Global_VecHitPosition_XY_S;x [mm];y [mm];");
0334     psd0.add<int>("NxBins", 1250);
0335     psd0.add<double>("xmin", -1250.0);
0336     psd0.add<double>("xmax", 1250.0);
0337     psd0.add<int>("NyBins", 1250);
0338     psd0.add<double>("ymin", -1250.0);
0339     psd0.add<double>("ymax", 1250.0);
0340     psd0.add<bool>("switch", true);
0341     desc.add<edm::ParameterSetDescription>("GlobalPositionXY_S", psd0);
0342   }
0343   {
0344     edm::ParameterSetDescription psd0;
0345     psd0.add<std::string>("name", "Global_VecHitPosition_RZ_P");
0346     psd0.add<std::string>("title", "Global_VecHitPosition_RZ_P;z [mm];r [mm]");
0347     psd0.add<int>("NxBins", 1500);
0348     psd0.add<double>("xmin", -3000.0);
0349     psd0.add<double>("xmax", 3000.0);
0350     psd0.add<int>("NyBins", 1250);
0351     psd0.add<double>("ymin", 0.0);
0352     psd0.add<double>("ymax", 1250.0);
0353     psd0.add<bool>("switch", true);
0354     desc.add<edm::ParameterSetDescription>("GlobalPositionRZ_P", psd0);
0355   }
0356   {
0357     edm::ParameterSetDescription psd0;
0358     psd0.add<std::string>("name", "Global_VecHitPosition_RZ_S");
0359     psd0.add<std::string>("title", "Global_VecHitPosition_RZ_S;z [mm];r [mm]");
0360 
0361     psd0.add<int>("NxBins", 1500);
0362     psd0.add<double>("xmin", -3000.0);
0363     psd0.add<double>("xmax", 3000.0);
0364     psd0.add<int>("NyBins", 1250);
0365     psd0.add<double>("ymin", 0.0);
0366     psd0.add<double>("ymax", 1250.0);
0367     psd0.add<bool>("switch", true);
0368     desc.add<edm::ParameterSetDescription>("GlobalPositionRZ_S", psd0);
0369   }
0370   //Layer wise parameter
0371   {
0372     edm::ParameterSetDescription psd0;
0373     psd0.add<std::string>("name", "NumberOfVecHitsLayerP");
0374     psd0.add<std::string>("title", ";Number of vector hits per event(macro pixel sensor);");
0375     psd0.add<double>("xmin", 0.0);
0376     psd0.add<double>("xmax", 5000.0);
0377     psd0.add<int>("NxBins", 100);
0378     psd0.add<bool>("switch", true);
0379     desc.add<edm::ParameterSetDescription>("NVecHitsLayer_P", psd0);
0380   }
0381 
0382   {
0383     edm::ParameterSetDescription psd0;
0384     psd0.add<std::string>("name", "NumberOfVecHitsLayerS");
0385     psd0.add<std::string>("title", ";Number of vector hits per event(strip sensor);");
0386     psd0.add<double>("xmin", 0.0);
0387     psd0.add<double>("xmax", 5000.0);
0388     psd0.add<int>("NxBins", 100);
0389     psd0.add<bool>("switch", true);
0390     desc.add<edm::ParameterSetDescription>("NVecHitsLayer_S", psd0);
0391   }
0392   {
0393     edm::ParameterSetDescription psd0;
0394     psd0.add<std::string>("name", "LocalPositionXY_P");
0395     psd0.add<std::string>("title", "LocalPositionXY_P;x ;y ;");
0396     psd0.add<int>("NxBins", 50);
0397     psd0.add<double>("xmin", -10.0);
0398     psd0.add<double>("xmax", 10.0);
0399     psd0.add<int>("NyBins", 50);
0400     psd0.add<double>("ymin", -10.0);
0401     psd0.add<double>("ymax", 10.0);
0402     psd0.add<bool>("switch", true);
0403     desc.add<edm::ParameterSetDescription>("LocalPositionXY_P", psd0);
0404   }
0405   {
0406     edm::ParameterSetDescription psd0;
0407     psd0.add<std::string>("name", "LocalPositionXY_S");
0408     psd0.add<std::string>("title", "LocalPositionXY_S;x ;y ;");
0409     psd0.add<int>("NxBins", 50);
0410     psd0.add<double>("xmin", -10.0);
0411     psd0.add<double>("xmax", 10.0);
0412     psd0.add<int>("NyBins", 50);
0413     psd0.add<double>("ymin", -10.0);
0414     psd0.add<double>("ymax", 10.0);
0415     psd0.add<bool>("switch", true);
0416     desc.add<edm::ParameterSetDescription>("LocalPositionXY_S", psd0);
0417   }
0418 
0419   {
0420     edm::ParameterSetDescription psd0;
0421     psd0.add<std::string>("name", "CurvatureOfVecHits");
0422     psd0.add<std::string>("title", ";VectorHit curvature;");
0423     psd0.add<double>("xmin", -0.05);
0424     psd0.add<bool>("switch", true);
0425     psd0.add<double>("xmax", 0.05);
0426     psd0.add<int>("NxBins", 200);
0427     desc.add<edm::ParameterSetDescription>("Curvature", psd0);
0428   }
0429   {
0430     edm::ParameterSetDescription psd0;
0431     psd0.add<std::string>("name", "CurvatureErrOCurvature");
0432     psd0.add<std::string>("title", ";VectorHit #delta#rho/#rho;");
0433     psd0.add<double>("xmin", -0.05);
0434     psd0.add<bool>("switch", true);
0435     psd0.add<double>("xmax", 0.05);
0436     psd0.add<int>("NxBins", 500);
0437     desc.add<edm::ParameterSetDescription>("CurvErr", psd0);
0438   }
0439   {
0440     edm::ParameterSetDescription psd0;
0441     psd0.add<std::string>("name", "PhiOfVecHits");
0442     psd0.add<std::string>("title", ";VectorHit #phi;");
0443     psd0.add<double>("xmin", -M_PI);
0444     psd0.add<bool>("switch", true);
0445     psd0.add<double>("xmax", M_PI);
0446     psd0.add<int>("NxBins", 30);
0447     desc.add<edm::ParameterSetDescription>("Phi", psd0);
0448   }
0449   {
0450     edm::ParameterSetDescription psd0;
0451     psd0.add<std::string>("name", "EtaOfVecHits");
0452     psd0.add<std::string>("title", ";VectorHit #eta;");
0453     psd0.add<double>("xmin", -5.);
0454     psd0.add<bool>("switch", true);
0455     psd0.add<double>("xmax", 5.);
0456     psd0.add<int>("NxBins", 50);
0457     desc.add<edm::ParameterSetDescription>("Eta", psd0);
0458   }
0459   {
0460     edm::ParameterSetDescription psd0;
0461     psd0.add<std::string>("name", "PtOfVecHits");
0462     psd0.add<std::string>("title", "VectorHit p_T;p_T ;");
0463     psd0.add<int>("NxBins", 100);
0464     psd0.add<double>("xmin", 0.);
0465     psd0.add<double>("xmax", 200.0);
0466     psd0.add<bool>("switch", true);
0467     desc.add<edm::ParameterSetDescription>("Pt", psd0);
0468   }
0469   {
0470     edm::ParameterSetDescription psd0;
0471     psd0.add<std::string>("name", "Chi2OfVecHits");
0472     psd0.add<std::string>("title", "VectorHit chi squared; #chi^2;");
0473     psd0.add<int>("NxBins", 100);
0474     psd0.add<double>("xmin", 0.);
0475     psd0.add<double>("xmax", 0.000001);
0476     psd0.add<bool>("switch", true);
0477     desc.add<edm::ParameterSetDescription>("Chi2", psd0);
0478   }
0479   {
0480     edm::ParameterSetDescription psd0;
0481     psd0.add<std::string>("name", "CurvatureVsEtaProf_P");
0482     psd0.add<std::string>("title", "Curvature vs #eta (macro-pixel);#eta ;curvature ;");
0483     psd0.add<int>("NxBins", 50);
0484     psd0.add<double>("xmin", -5.0);
0485     psd0.add<double>("xmax", 5.0);
0486     psd0.add<double>("ymin", -0.05);
0487     psd0.add<double>("ymax", 0.05);
0488     psd0.add<bool>("switch", true);
0489     desc.add<edm::ParameterSetDescription>("CurvatureVsEta_P", psd0);
0490   }
0491   {
0492     edm::ParameterSetDescription psd0;
0493     psd0.add<std::string>("name", "CurvatureVsEtaProf_S");
0494     psd0.add<std::string>("title", "Curvature vs #eta (strip);#eta ;curvature ;");
0495     psd0.add<int>("NxBins", 25);
0496     psd0.add<double>("xmin", -5.0);
0497     psd0.add<double>("xmax", 5.0);
0498     psd0.add<double>("ymin", -0.05);
0499     psd0.add<double>("ymax", 0.05);
0500     psd0.add<bool>("switch", true);
0501     desc.add<edm::ParameterSetDescription>("CurvatureVsEta_S", psd0);
0502   }
0503   desc.add<std::string>("TopFolderName", "TrackerPhase2OTVectorHits/Accepted");
0504   desc.add<bool>("Verbosity", false);
0505   desc.add<edm::InputTag>("vechitsSrc", edm::InputTag("siPhase2VectorHits", "accepted"));
0506   descriptions.add("Phase2OTMonitorVectorHits", desc);
0507 }
0508 
0509 //define this as a plug-in
0510 DEFINE_FWK_MODULE(Phase2OTMonitorVectorHits);