Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-09-11 04:32:42

0001 // -*- C++ -*-
0002 //
0003 // Package:    SiOuterTracker
0004 // Class:      SiOuterTracker
0005 //
0006 /**\class SiOuterTracker Phase2OTMonitorTTCluster.cc
0007  DQM/SiOuterTracker/plugins/Phase2OTMonitorTTCluster.cc
0008 
0009  Description: [one line class summary]
0010 
0011  Implementation:
0012  [Notes on implementation]
0013  */
0014 //
0015 // Original Author:  Isabelle Helena J De Bruyn
0016 //         Created:  Mon, 10 Feb 2014 13:57:08 GMT
0017 //
0018 
0019 // system include files
0020 #include <memory>
0021 #include <numeric>
0022 #include <vector>
0023 
0024 // user include files
0025 #include "FWCore/Framework/interface/ESHandle.h"
0026 #include "FWCore/Framework/interface/Event.h"
0027 #include "FWCore/Framework/interface/Frameworkfwd.h"
0028 #include "FWCore/Framework/interface/MakerMacros.h"
0029 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0030 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0031 #include "FWCore/ServiceRegistry/interface/Service.h"
0032 #include "FWCore/Utilities/interface/EDGetToken.h"
0033 
0034 #include "DataFormats/Common/interface/DetSetVectorNew.h"
0035 #include "DataFormats/L1TrackTrigger/interface/TTCluster.h"
0036 #include "DataFormats/L1TrackTrigger/interface/TTTypes.h"
0037 #include "DataFormats/SiStripDetId/interface/StripSubdetector.h"
0038 #include "DataFormats/TrackerCommon/interface/TrackerTopology.h"
0039 
0040 #include "Geometry/CommonDetUnit/interface/GeomDet.h"
0041 #include "Geometry/Records/interface/TrackerTopologyRcd.h"
0042 #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
0043 #include "Geometry/TrackerGeometryBuilder/interface/StripGeomDetUnit.h"
0044 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
0045 
0046 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0047 #include "DQMServices/Core/interface/DQMStore.h"
0048 
0049 class Phase2OTMonitorTTCluster : public DQMEDAnalyzer {
0050 public:
0051   explicit Phase2OTMonitorTTCluster(const edm::ParameterSet &);
0052   ~Phase2OTMonitorTTCluster() override;
0053   void analyze(const edm::Event &, const edm::EventSetup &) override;
0054   void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
0055   void dqmBeginRun(const edm::Run &iRun, const edm::EventSetup &iSetup) override;
0056   static void fillDescriptions(edm::ConfigurationDescriptions &descriptions);
0057   // TTCluster stacks
0058   MonitorElement *Cluster_IMem_Barrel = nullptr;
0059   MonitorElement *Cluster_IMem_Endcap_Disc = nullptr;
0060   MonitorElement *Cluster_IMem_Endcap_Ring = nullptr;
0061   MonitorElement *Cluster_IMem_Endcap_Ring_Fw[5] = {nullptr, nullptr, nullptr, nullptr, nullptr};
0062   MonitorElement *Cluster_IMem_Endcap_Ring_Bw[5] = {nullptr, nullptr, nullptr, nullptr, nullptr};
0063   MonitorElement *Cluster_OMem_Barrel = nullptr;
0064   MonitorElement *Cluster_OMem_Endcap_Disc = nullptr;
0065   MonitorElement *Cluster_OMem_Endcap_Ring = nullptr;
0066   MonitorElement *Cluster_OMem_Endcap_Ring_Fw[5] = {nullptr, nullptr, nullptr, nullptr, nullptr};
0067   MonitorElement *Cluster_OMem_Endcap_Ring_Bw[5] = {nullptr, nullptr, nullptr, nullptr, nullptr};
0068   MonitorElement *Cluster_W = nullptr;
0069   MonitorElement *Cluster_Phi = nullptr;
0070   MonitorElement *Cluster_R = nullptr;
0071   MonitorElement *Cluster_Eta = nullptr;
0072 
0073   MonitorElement *Cluster_Barrel_XY = nullptr;
0074   MonitorElement *Cluster_Endcap_Fw_XY = nullptr;
0075   MonitorElement *Cluster_Endcap_Bw_XY = nullptr;
0076   MonitorElement *Cluster_RZ = nullptr;
0077 
0078 private:
0079   edm::ParameterSet conf_;
0080   edm::EDGetTokenT<edmNew::DetSetVector<TTCluster<Ref_Phase2TrackerDigi_>>> tagTTClustersToken_;
0081   std::string topFolderName_;
0082   const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> geomToken_;
0083   const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> topoToken_;
0084   const TrackerGeometry *tkGeom_ = nullptr;
0085   const TrackerTopology *tTopo_ = nullptr;
0086 };
0087 
0088 //
0089 // constructors and destructor
0090 //
0091 Phase2OTMonitorTTCluster::Phase2OTMonitorTTCluster(const edm::ParameterSet &iConfig)
0092     : conf_(iConfig),
0093       geomToken_(esConsumes<TrackerGeometry, TrackerDigiGeometryRecord, edm::Transition::BeginRun>()),
0094       topoToken_(esConsumes<TrackerTopology, TrackerTopologyRcd, edm::Transition::BeginRun>()) {
0095   topFolderName_ = conf_.getParameter<std::string>("TopFolderName");
0096   tagTTClustersToken_ = consumes<edmNew::DetSetVector<TTCluster<Ref_Phase2TrackerDigi_>>>(
0097       conf_.getParameter<edm::InputTag>("TTClusters"));
0098 }
0099 
0100 Phase2OTMonitorTTCluster::~Phase2OTMonitorTTCluster() {
0101   // do anything here that needs to be done at desctruction time
0102   // (e.g. close files, deallocate resources etc.)
0103 }
0104 
0105 //
0106 // member functions
0107 //
0108 void Phase2OTMonitorTTCluster::dqmBeginRun(const edm::Run &iRun, const edm::EventSetup &iSetup) {
0109   tkGeom_ = &(iSetup.getData(geomToken_));
0110   tTopo_ = &(iSetup.getData(topoToken_));
0111 }
0112 
0113 // ------------ method called for each event  ------------
0114 void Phase2OTMonitorTTCluster::analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) {
0115   /// Track Trigger Clusters
0116   edm::Handle<edmNew::DetSetVector<TTCluster<Ref_Phase2TrackerDigi_>>> Phase2TrackerDigiTTClusterHandle;
0117   iEvent.getByToken(tagTTClustersToken_, Phase2TrackerDigiTTClusterHandle);
0118 
0119   /// Loop over the input Clusters
0120   typename edmNew::DetSetVector<TTCluster<Ref_Phase2TrackerDigi_>>::const_iterator inputIter;
0121   typename edmNew::DetSet<TTCluster<Ref_Phase2TrackerDigi_>>::const_iterator contentIter;
0122 
0123   // Adding protection
0124   if (!Phase2TrackerDigiTTClusterHandle.isValid())
0125     return;
0126 
0127   for (inputIter = Phase2TrackerDigiTTClusterHandle->begin(); inputIter != Phase2TrackerDigiTTClusterHandle->end();
0128        ++inputIter) {
0129     for (contentIter = inputIter->begin(); contentIter != inputIter->end(); ++contentIter) {
0130       // Make reference cluster
0131       edm::Ref<edmNew::DetSetVector<TTCluster<Ref_Phase2TrackerDigi_>>, TTCluster<Ref_Phase2TrackerDigi_>> tempCluRef =
0132           edmNew::makeRefTo(Phase2TrackerDigiTTClusterHandle, contentIter);
0133 
0134       DetId detIdClu = tkGeom_->idToDet(tempCluRef->getDetId())->geographicalId();
0135       unsigned int memberClu = tempCluRef->getStackMember();
0136       unsigned int widClu = tempCluRef->findWidth();
0137 
0138       MeasurementPoint mp = tempCluRef->findAverageLocalCoordinates();
0139       const GeomDet *theGeomDet = tkGeom_->idToDet(detIdClu);
0140       Global3DPoint posClu = theGeomDet->surface().toGlobal(theGeomDet->topology().localPosition(mp));
0141 
0142       double r = posClu.perp();
0143       double z = posClu.z();
0144 
0145       Cluster_W->Fill(widClu, memberClu);
0146       Cluster_Eta->Fill(posClu.eta());
0147       Cluster_Phi->Fill(posClu.phi());
0148       Cluster_R->Fill(r);
0149       Cluster_RZ->Fill(z, r);
0150 
0151       if (detIdClu.subdetId() == static_cast<int>(StripSubdetector::TOB))  // Phase 2 Outer Tracker Barrel
0152       {
0153         if (memberClu == 0)
0154           Cluster_IMem_Barrel->Fill(tTopo_->layer(detIdClu));
0155         else
0156           Cluster_OMem_Barrel->Fill(tTopo_->layer(detIdClu));
0157 
0158         Cluster_Barrel_XY->Fill(posClu.x(), posClu.y());
0159 
0160       }  // end if isBarrel
0161       else if (detIdClu.subdetId() == static_cast<int>(StripSubdetector::TID))  // Phase 2 Outer Tracker Endcap
0162       {
0163         if (memberClu == 0) {
0164           Cluster_IMem_Endcap_Disc->Fill(tTopo_->layer(detIdClu));  // returns wheel
0165           Cluster_IMem_Endcap_Ring->Fill(tTopo_->tidRing(detIdClu));
0166         } else {
0167           Cluster_OMem_Endcap_Disc->Fill(tTopo_->layer(detIdClu));  // returns wheel
0168           Cluster_OMem_Endcap_Ring->Fill(tTopo_->tidRing(detIdClu));
0169         }
0170 
0171         if (posClu.z() > 0) {
0172           Cluster_Endcap_Fw_XY->Fill(posClu.x(), posClu.y());
0173           if (memberClu == 0)
0174             Cluster_IMem_Endcap_Ring_Fw[tTopo_->layer(detIdClu) - 1]->Fill(tTopo_->tidRing(detIdClu));
0175           else
0176             Cluster_OMem_Endcap_Ring_Fw[tTopo_->layer(detIdClu) - 1]->Fill(tTopo_->tidRing(detIdClu));
0177         } else {
0178           Cluster_Endcap_Bw_XY->Fill(posClu.x(), posClu.y());
0179           if (memberClu == 0)
0180             Cluster_IMem_Endcap_Ring_Bw[tTopo_->layer(detIdClu) - 1]->Fill(tTopo_->tidRing(detIdClu));
0181           else
0182             Cluster_OMem_Endcap_Ring_Bw[tTopo_->layer(detIdClu) - 1]->Fill(tTopo_->tidRing(detIdClu));
0183         }
0184 
0185       }  // end if isEndcap
0186     }  // end loop contentIter
0187   }  // end loop inputIter
0188 }  // end of method
0189 
0190 // ------------ method called once each job just before starting event loop
0191 // ------------
0192 void Phase2OTMonitorTTCluster::bookHistograms(DQMStore::IBooker &iBooker,
0193                                               edm::Run const &run,
0194                                               edm::EventSetup const &es) {
0195   std::string HistoName;
0196   const int numDiscs = 5;
0197 
0198   iBooker.setCurrentFolder(topFolderName_ + "/Clusters/NClusters");
0199 
0200   // NClusters
0201   edm::ParameterSet psTTCluster_Barrel = conf_.getParameter<edm::ParameterSet>("TH1TTCluster_Barrel");
0202   HistoName = "NClusters_IMem_Barrel";
0203   Cluster_IMem_Barrel = iBooker.book1D(HistoName,
0204                                        HistoName,
0205                                        psTTCluster_Barrel.getParameter<int32_t>("Nbinsx"),
0206                                        psTTCluster_Barrel.getParameter<double>("xmin"),
0207                                        psTTCluster_Barrel.getParameter<double>("xmax"));
0208   Cluster_IMem_Barrel->setAxisTitle("Barrel Layer", 1);
0209   Cluster_IMem_Barrel->setAxisTitle("# L1 Clusters", 2);
0210 
0211   HistoName = "NClusters_OMem_Barrel";
0212   Cluster_OMem_Barrel = iBooker.book1D(HistoName,
0213                                        HistoName,
0214                                        psTTCluster_Barrel.getParameter<int32_t>("Nbinsx"),
0215                                        psTTCluster_Barrel.getParameter<double>("xmin"),
0216                                        psTTCluster_Barrel.getParameter<double>("xmax"));
0217   Cluster_OMem_Barrel->setAxisTitle("Barrel Layer", 1);
0218   Cluster_OMem_Barrel->setAxisTitle("# L1 Clusters", 2);
0219 
0220   edm::ParameterSet psTTCluster_ECDisc = conf_.getParameter<edm::ParameterSet>("TH1TTCluster_ECDiscs");
0221   HistoName = "NClusters_IMem_Endcap_Disc";
0222   Cluster_IMem_Endcap_Disc = iBooker.book1D(HistoName,
0223                                             HistoName,
0224                                             psTTCluster_ECDisc.getParameter<int32_t>("Nbinsx"),
0225                                             psTTCluster_ECDisc.getParameter<double>("xmin"),
0226                                             psTTCluster_ECDisc.getParameter<double>("xmax"));
0227   Cluster_IMem_Endcap_Disc->setAxisTitle("Endcap Disc", 1);
0228   Cluster_IMem_Endcap_Disc->setAxisTitle("# L1 Clusters", 2);
0229 
0230   HistoName = "NClusters_OMem_Endcap_Disc";
0231   Cluster_OMem_Endcap_Disc = iBooker.book1D(HistoName,
0232                                             HistoName,
0233                                             psTTCluster_ECDisc.getParameter<int32_t>("Nbinsx"),
0234                                             psTTCluster_ECDisc.getParameter<double>("xmin"),
0235                                             psTTCluster_ECDisc.getParameter<double>("xmax"));
0236   Cluster_OMem_Endcap_Disc->setAxisTitle("Endcap Disc", 1);
0237   Cluster_OMem_Endcap_Disc->setAxisTitle("# L1 Clusters", 2);
0238 
0239   edm::ParameterSet psTTCluster_ECRing = conf_.getParameter<edm::ParameterSet>("TH1TTCluster_ECRings");
0240   HistoName = "NClusters_IMem_Endcap_Ring";
0241   Cluster_IMem_Endcap_Ring = iBooker.book1D(HistoName,
0242                                             HistoName,
0243                                             psTTCluster_ECRing.getParameter<int32_t>("Nbinsx"),
0244                                             psTTCluster_ECRing.getParameter<double>("xmin"),
0245                                             psTTCluster_ECRing.getParameter<double>("xmax"));
0246   Cluster_IMem_Endcap_Ring->setAxisTitle("Endcap Ring", 1);
0247   Cluster_IMem_Endcap_Ring->setAxisTitle("# L1 Clusters", 2);
0248 
0249   HistoName = "NClusters_OMem_Endcap_Ring";
0250   Cluster_OMem_Endcap_Ring = iBooker.book1D(HistoName,
0251                                             HistoName,
0252                                             psTTCluster_ECRing.getParameter<int32_t>("Nbinsx"),
0253                                             psTTCluster_ECRing.getParameter<double>("xmin"),
0254                                             psTTCluster_ECRing.getParameter<double>("xmax"));
0255   Cluster_OMem_Endcap_Ring->setAxisTitle("Endcap Ring", 1);
0256   Cluster_OMem_Endcap_Ring->setAxisTitle("# L1 Clusters", 2);
0257 
0258   for (int i = 0; i < numDiscs; i++) {
0259     HistoName = "NClusters_IMem_Disc+" + std::to_string(i + 1);
0260     Cluster_IMem_Endcap_Ring_Fw[i] = iBooker.book1D(HistoName,
0261                                                     HistoName,
0262                                                     psTTCluster_ECRing.getParameter<int32_t>("Nbinsx"),
0263                                                     psTTCluster_ECRing.getParameter<double>("xmin"),
0264                                                     psTTCluster_ECRing.getParameter<double>("xmax"));
0265     Cluster_IMem_Endcap_Ring_Fw[i]->setAxisTitle("Endcap Ring", 1);
0266     Cluster_IMem_Endcap_Ring_Fw[i]->setAxisTitle("# L1 Clusters ", 2);
0267   }
0268 
0269   for (int i = 0; i < numDiscs; i++) {
0270     HistoName = "NClusters_IMem_Disc-" + std::to_string(i + 1);
0271     Cluster_IMem_Endcap_Ring_Bw[i] = iBooker.book1D(HistoName,
0272                                                     HistoName,
0273                                                     psTTCluster_ECRing.getParameter<int32_t>("Nbinsx"),
0274                                                     psTTCluster_ECRing.getParameter<double>("xmin"),
0275                                                     psTTCluster_ECRing.getParameter<double>("xmax"));
0276     Cluster_IMem_Endcap_Ring_Bw[i]->setAxisTitle("Endcap Ring", 1);
0277     Cluster_IMem_Endcap_Ring_Bw[i]->setAxisTitle("# L1 Clusters ", 2);
0278   }
0279 
0280   for (int i = 0; i < numDiscs; i++) {
0281     HistoName = "NClusters_OMem_Disc+" + std::to_string(i + 1);
0282     Cluster_OMem_Endcap_Ring_Fw[i] = iBooker.book1D(HistoName,
0283                                                     HistoName,
0284                                                     psTTCluster_ECRing.getParameter<int32_t>("Nbinsx"),
0285                                                     psTTCluster_ECRing.getParameter<double>("xmin"),
0286                                                     psTTCluster_ECRing.getParameter<double>("xmax"));
0287     Cluster_OMem_Endcap_Ring_Fw[i]->setAxisTitle("Endcap Ring", 1);
0288     Cluster_OMem_Endcap_Ring_Fw[i]->setAxisTitle("# L1 Clusters ", 2);
0289   }
0290 
0291   for (int i = 0; i < numDiscs; i++) {
0292     HistoName = "NClusters_OMem_Disc-" + std::to_string(i + 1);
0293     Cluster_OMem_Endcap_Ring_Bw[i] = iBooker.book1D(HistoName,
0294                                                     HistoName,
0295                                                     psTTCluster_ECRing.getParameter<int32_t>("Nbinsx"),
0296                                                     psTTCluster_ECRing.getParameter<double>("xmin"),
0297                                                     psTTCluster_ECRing.getParameter<double>("xmax"));
0298     Cluster_OMem_Endcap_Ring_Bw[i]->setAxisTitle("Endcap Ring", 1);
0299     Cluster_OMem_Endcap_Ring_Bw[i]->setAxisTitle("# L1 Clusters ", 2);
0300   }
0301 
0302   iBooker.setCurrentFolder(topFolderName_ + "/Clusters");
0303 
0304   // Cluster Width
0305   edm::ParameterSet psTTClusterWidth = conf_.getParameter<edm::ParameterSet>("TH2TTCluster_Width");
0306   HistoName = "Cluster_W";
0307   Cluster_W = iBooker.book2D(HistoName,
0308                              HistoName,
0309                              psTTClusterWidth.getParameter<int32_t>("Nbinsx"),
0310                              psTTClusterWidth.getParameter<double>("xmin"),
0311                              psTTClusterWidth.getParameter<double>("xmax"),
0312                              psTTClusterWidth.getParameter<int32_t>("Nbinsy"),
0313                              psTTClusterWidth.getParameter<double>("ymin"),
0314                              psTTClusterWidth.getParameter<double>("ymax"));
0315   Cluster_W->setAxisTitle("L1 Cluster Width", 1);
0316   Cluster_W->setAxisTitle("Stack Member", 2);
0317 
0318   // Cluster eta distribution
0319   edm::ParameterSet psTTClusterEta = conf_.getParameter<edm::ParameterSet>("TH1TTCluster_Eta");
0320   HistoName = "Cluster_Eta";
0321   Cluster_Eta = iBooker.book1D(HistoName,
0322                                HistoName,
0323                                psTTClusterEta.getParameter<int32_t>("Nbinsx"),
0324                                psTTClusterEta.getParameter<double>("xmin"),
0325                                psTTClusterEta.getParameter<double>("xmax"));
0326   Cluster_Eta->setAxisTitle("#eta", 1);
0327   Cluster_Eta->setAxisTitle("# L1 Clusters ", 2);
0328 
0329   // Cluster phi distribution
0330   edm::ParameterSet psTTClusterPhi = conf_.getParameter<edm::ParameterSet>("TH1TTCluster_Phi");
0331   HistoName = "Cluster_Phi";
0332   Cluster_Phi = iBooker.book1D(HistoName,
0333                                HistoName,
0334                                psTTClusterPhi.getParameter<int32_t>("Nbinsx"),
0335                                psTTClusterPhi.getParameter<double>("xmin"),
0336                                psTTClusterPhi.getParameter<double>("xmax"));
0337   Cluster_Phi->setAxisTitle("#phi", 1);
0338   Cluster_Phi->setAxisTitle("# L1 Clusters", 2);
0339 
0340   // Cluster R distribution
0341   edm::ParameterSet psTTClusterR = conf_.getParameter<edm::ParameterSet>("TH1TTCluster_R");
0342   HistoName = "Cluster_R";
0343   Cluster_R = iBooker.book1D(HistoName,
0344                              HistoName,
0345                              psTTClusterR.getParameter<int32_t>("Nbinsx"),
0346                              psTTClusterR.getParameter<double>("xmin"),
0347                              psTTClusterR.getParameter<double>("xmax"));
0348   Cluster_R->setAxisTitle("R [cm]", 1);
0349   Cluster_R->setAxisTitle("# L1 Clusters", 2);
0350 
0351   iBooker.setCurrentFolder(topFolderName_ + "/Clusters/Position");
0352 
0353   // Position plots
0354   edm::ParameterSet psTTCluster_Barrel_XY = conf_.getParameter<edm::ParameterSet>("TH2TTCluster_Position");
0355   HistoName = "Cluster_Barrel_XY";
0356   Cluster_Barrel_XY = iBooker.book2D(HistoName,
0357                                      HistoName,
0358                                      psTTCluster_Barrel_XY.getParameter<int32_t>("Nbinsx"),
0359                                      psTTCluster_Barrel_XY.getParameter<double>("xmin"),
0360                                      psTTCluster_Barrel_XY.getParameter<double>("xmax"),
0361                                      psTTCluster_Barrel_XY.getParameter<int32_t>("Nbinsy"),
0362                                      psTTCluster_Barrel_XY.getParameter<double>("ymin"),
0363                                      psTTCluster_Barrel_XY.getParameter<double>("ymax"));
0364   Cluster_Barrel_XY->setAxisTitle("L1 Cluster Barrel position x [cm]", 1);
0365   Cluster_Barrel_XY->setAxisTitle("L1 Cluster Barrel position y [cm]", 2);
0366 
0367   edm::ParameterSet psTTCluster_Endcap_Fw_XY = conf_.getParameter<edm::ParameterSet>("TH2TTCluster_Position");
0368   HistoName = "Cluster_Endcap_Fw_XY";
0369   Cluster_Endcap_Fw_XY = iBooker.book2D(HistoName,
0370                                         HistoName,
0371                                         psTTCluster_Endcap_Fw_XY.getParameter<int32_t>("Nbinsx"),
0372                                         psTTCluster_Endcap_Fw_XY.getParameter<double>("xmin"),
0373                                         psTTCluster_Endcap_Fw_XY.getParameter<double>("xmax"),
0374                                         psTTCluster_Endcap_Fw_XY.getParameter<int32_t>("Nbinsy"),
0375                                         psTTCluster_Endcap_Fw_XY.getParameter<double>("ymin"),
0376                                         psTTCluster_Endcap_Fw_XY.getParameter<double>("ymax"));
0377   Cluster_Endcap_Fw_XY->setAxisTitle("L1 Cluster Forward Endcap position x [cm]", 1);
0378   Cluster_Endcap_Fw_XY->setAxisTitle("L1 Cluster Forward Endcap position y [cm]", 2);
0379 
0380   edm::ParameterSet psTTCluster_Endcap_Bw_XY = conf_.getParameter<edm::ParameterSet>("TH2TTCluster_Position");
0381   HistoName = "Cluster_Endcap_Bw_XY";
0382   Cluster_Endcap_Bw_XY = iBooker.book2D(HistoName,
0383                                         HistoName,
0384                                         psTTCluster_Endcap_Bw_XY.getParameter<int32_t>("Nbinsx"),
0385                                         psTTCluster_Endcap_Bw_XY.getParameter<double>("xmin"),
0386                                         psTTCluster_Endcap_Bw_XY.getParameter<double>("xmax"),
0387                                         psTTCluster_Endcap_Bw_XY.getParameter<int32_t>("Nbinsy"),
0388                                         psTTCluster_Endcap_Bw_XY.getParameter<double>("ymin"),
0389                                         psTTCluster_Endcap_Bw_XY.getParameter<double>("ymax"));
0390   Cluster_Endcap_Bw_XY->setAxisTitle("L1 Cluster Backward Endcap position x [cm]", 1);
0391   Cluster_Endcap_Bw_XY->setAxisTitle("L1 Cluster Backward Endcap position y [cm]", 2);
0392 
0393   // TTCluster #rho vs. z
0394   edm::ParameterSet psTTCluster_RZ = conf_.getParameter<edm::ParameterSet>("TH2TTCluster_RZ");
0395   HistoName = "Cluster_RZ";
0396   Cluster_RZ = iBooker.book2D(HistoName,
0397                               HistoName,
0398                               psTTCluster_RZ.getParameter<int32_t>("Nbinsx"),
0399                               psTTCluster_RZ.getParameter<double>("xmin"),
0400                               psTTCluster_RZ.getParameter<double>("xmax"),
0401                               psTTCluster_RZ.getParameter<int32_t>("Nbinsy"),
0402                               psTTCluster_RZ.getParameter<double>("ymin"),
0403                               psTTCluster_RZ.getParameter<double>("ymax"));
0404   Cluster_RZ->setAxisTitle("L1 Cluster position z [cm]", 1);
0405   Cluster_RZ->setAxisTitle("L1 Cluster position #rho [cm]", 2);
0406 
0407 }  // end of method
0408 void Phase2OTMonitorTTCluster::fillDescriptions(edm::ConfigurationDescriptions &descriptions) {
0409   // OuterTrackerMonitorTTCluster
0410   edm::ParameterSetDescription desc;
0411   {
0412     edm::ParameterSetDescription psd0;
0413     psd0.add<int>("Nbinsx", 7);
0414     psd0.add<double>("xmax", 7.5);
0415     psd0.add<double>("xmin", 0.5);
0416     desc.add<edm::ParameterSetDescription>("TH1TTCluster_Barrel", psd0);
0417   }
0418   {
0419     edm::ParameterSetDescription psd0;
0420     psd0.add<int>("Nbinsx", 6);
0421     psd0.add<double>("xmax", 6.5);
0422     psd0.add<double>("xmin", 0.5);
0423     desc.add<edm::ParameterSetDescription>("TH1TTCluster_ECDiscs", psd0);
0424   }
0425   {
0426     edm::ParameterSetDescription psd0;
0427     psd0.add<int>("Nbinsx", 16);
0428     psd0.add<double>("xmin", 0.5);
0429     psd0.add<double>("xmax", 16.5);
0430     desc.add<edm::ParameterSetDescription>("TH1TTCluster_ECRings", psd0);
0431   }
0432   {
0433     edm::ParameterSetDescription psd0;
0434     psd0.add<int>("Nbinsx", 45);
0435     psd0.add<double>("xmax", 5.0);
0436     psd0.add<double>("xmin", -5.0);
0437     desc.add<edm::ParameterSetDescription>("TH1TTCluster_Eta", psd0);
0438   }
0439   {
0440     edm::ParameterSetDescription psd0;
0441     psd0.add<int>("Nbinsx", 60);
0442     psd0.add<double>("xmax", 3.5);
0443     psd0.add<double>("xmin", -3.5);
0444     desc.add<edm::ParameterSetDescription>("TH1TTCluster_Phi", psd0);
0445   }
0446   {
0447     edm::ParameterSetDescription psd0;
0448     psd0.add<int>("Nbinsx", 45);
0449     psd0.add<double>("xmax", 120);
0450     psd0.add<double>("xmin", 0);
0451     desc.add<edm::ParameterSetDescription>("TH1TTCluster_R", psd0);
0452   }
0453   {
0454     edm::ParameterSetDescription psd0;
0455     psd0.add<int>("Nbinsx", 7);
0456     psd0.add<double>("xmax", 6.5);
0457     psd0.add<double>("xmin", -0.5);
0458     psd0.add<int>("Nbinsy", 2);
0459     psd0.add<double>("ymax", 1.5);
0460     psd0.add<double>("ymin", -0.5);
0461     desc.add<edm::ParameterSetDescription>("TH2TTCluster_Width", psd0);
0462   }
0463   {
0464     edm::ParameterSetDescription psd0;
0465     psd0.add<int>("Nbinsx", 960);
0466     psd0.add<double>("xmax", 120);
0467     psd0.add<double>("xmin", -120);
0468     psd0.add<int>("Nbinsy", 960);
0469     psd0.add<double>("ymax", 120);
0470     psd0.add<double>("ymin", -120);
0471     desc.add<edm::ParameterSetDescription>("TH2TTCluster_Position", psd0);
0472   }
0473   {
0474     edm::ParameterSetDescription psd0;
0475     psd0.add<int>("Nbinsx", 900);
0476     psd0.add<double>("xmax", 300);
0477     psd0.add<double>("xmin", -300);
0478     psd0.add<int>("Nbinsy", 900);
0479     psd0.add<double>("ymax", 120);
0480     psd0.add<double>("ymin", 0);
0481     desc.add<edm::ParameterSetDescription>("TH2TTCluster_RZ", psd0);
0482   }
0483   desc.add<std::string>("TopFolderName", "TrackerPhase2TTCluster");
0484   desc.add<edm::InputTag>("TTClusters", edm::InputTag("TTClustersFromPhase2TrackerDigis", "ClusterInclusive"));
0485   descriptions.add("Phase2OTMonitorTTCluster", desc);
0486   // or use the following to generate the label from the module's C++ type
0487   //descriptions.addWithDefaultLabel(desc);
0488 }
0489 DEFINE_FWK_MODULE(Phase2OTMonitorTTCluster);