Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-08-30 04:06:16

0001 // -*- C++ -*-
0002 //
0003 // Package:    Validation/MtdValidation
0004 // Class:      EtlSimHitsValidation
0005 //
0006 /**\class EtlSimHitsValidation EtlSimHitsValidation.cc Validation/MtdValidation/plugins/EtlSimHitsValidation.cc
0007 
0008  Description: ETL SIM hits validation
0009 
0010  Implementation:
0011      [Notes on implementation]
0012 */
0013 
0014 #include <string>
0015 
0016 #include "FWCore/Framework/interface/Frameworkfwd.h"
0017 #include "FWCore/Framework/interface/Event.h"
0018 #include "FWCore/Framework/interface/MakerMacros.h"
0019 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0020 
0021 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0022 #include "DQMServices/Core/interface/DQMStore.h"
0023 
0024 #include "DataFormats/Common/interface/ValidHandle.h"
0025 #include "DataFormats/Math/interface/GeantUnits.h"
0026 #include "DataFormats/ForwardDetId/interface/ETLDetId.h"
0027 
0028 #include "SimDataFormats/CrossingFrame/interface/CrossingFrame.h"
0029 #include "SimDataFormats/CrossingFrame/interface/MixCollection.h"
0030 #include "SimDataFormats/TrackingHit/interface/PSimHit.h"
0031 
0032 #include "Geometry/Records/interface/MTDDigiGeometryRecord.h"
0033 #include "Geometry/MTDGeometryBuilder/interface/MTDGeometry.h"
0034 #include "Geometry/MTDNumberingBuilder/interface/MTDTopology.h"
0035 #include "Geometry/MTDCommonData/interface/MTDTopologyMode.h"
0036 
0037 #include "MTDHit.h"
0038 
0039 class EtlSimHitsValidation : public DQMEDAnalyzer {
0040 public:
0041   explicit EtlSimHitsValidation(const edm::ParameterSet&);
0042   ~EtlSimHitsValidation() override;
0043 
0044   static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0045 
0046 private:
0047   void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
0048 
0049   void analyze(const edm::Event&, const edm::EventSetup&) override;
0050 
0051   // ------------ member data ------------
0052 
0053   const std::string folder_;
0054   const float hitMinEnergy1Dis_;
0055   const float hitMinEnergy2Dis_;
0056 
0057   edm::EDGetTokenT<CrossingFrame<PSimHit> > etlSimHitsToken_;
0058 
0059   edm::ESGetToken<MTDGeometry, MTDDigiGeometryRecord> mtdgeoToken_;
0060   edm::ESGetToken<MTDTopology, MTDTopologyRcd> mtdtopoToken_;
0061 
0062   // --- histograms declaration
0063 
0064   MonitorElement* meNhits_[4];
0065   MonitorElement* meNtrkPerCell_[4];
0066 
0067   MonitorElement* meHitEnergy_[4];
0068   MonitorElement* meHitTime_[4];
0069 
0070   MonitorElement* meHitXlocal_[4];
0071   MonitorElement* meHitYlocal_[4];
0072   MonitorElement* meHitZlocal_[4];
0073 
0074   MonitorElement* meOccupancy_[4];
0075 
0076   MonitorElement* meHitX_[4];
0077   MonitorElement* meHitY_[4];
0078   MonitorElement* meHitZ_[4];
0079   MonitorElement* meHitPhi_[4];
0080   MonitorElement* meHitEta_[4];
0081 
0082   MonitorElement* meHitTvsE_[4];
0083   MonitorElement* meHitEvsPhi_[4];
0084   MonitorElement* meHitEvsEta_[4];
0085   MonitorElement* meHitTvsPhi_[4];
0086   MonitorElement* meHitTvsEta_[4];
0087 };
0088 
0089 // ------------ constructor and destructor --------------
0090 EtlSimHitsValidation::EtlSimHitsValidation(const edm::ParameterSet& iConfig)
0091     : folder_(iConfig.getParameter<std::string>("folder")),
0092       hitMinEnergy1Dis_(iConfig.getParameter<double>("hitMinimumEnergy1Dis")),
0093       hitMinEnergy2Dis_(iConfig.getParameter<double>("hitMinimumEnergy2Dis")) {
0094   etlSimHitsToken_ = consumes<CrossingFrame<PSimHit> >(iConfig.getParameter<edm::InputTag>("inputTag"));
0095   mtdgeoToken_ = esConsumes<MTDGeometry, MTDDigiGeometryRecord>();
0096   mtdtopoToken_ = esConsumes<MTDTopology, MTDTopologyRcd>();
0097 }
0098 
0099 EtlSimHitsValidation::~EtlSimHitsValidation() {}
0100 
0101 // ------------ method called for each event  ------------
0102 void EtlSimHitsValidation::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) {
0103   using namespace edm;
0104   using namespace geant_units::operators;
0105 
0106   auto geometryHandle = iSetup.getTransientHandle(mtdgeoToken_);
0107   const MTDGeometry* geom = geometryHandle.product();
0108 
0109   auto topologyHandle = iSetup.getTransientHandle(mtdtopoToken_);
0110   const MTDTopology* topology = topologyHandle.product();
0111 
0112   bool topo1Dis = false;
0113   bool topo2Dis = false;
0114   if (MTDTopologyMode::etlLayoutFromTopoMode(topology->getMTDTopologyMode()) == ETLDetId::EtlLayout::tp) {
0115     topo1Dis = true;
0116   } else {
0117     topo2Dis = true;
0118   }
0119 
0120   auto etlSimHitsHandle = makeValid(iEvent.getHandle(etlSimHitsToken_));
0121   MixCollection<PSimHit> etlSimHits(etlSimHitsHandle.product());
0122 
0123   std::unordered_map<uint32_t, MTDHit> m_etlHits[4];
0124   std::unordered_map<uint32_t, std::set<int> > m_etlTrkPerCell[4];
0125 
0126   // --- Loop over the ETL SIM hits
0127 
0128   int idet = 999;
0129 
0130   for (auto const& simHit : etlSimHits) {
0131     // --- Use only hits compatible with the in-time bunch-crossing
0132     if (simHit.tof() < 0 || simHit.tof() > 25.)
0133       continue;
0134 
0135     ETLDetId id = simHit.detUnitId();
0136     if (topo1Dis) {
0137       if (id.zside() == -1) {
0138         idet = 0;
0139       } else if (id.zside() == 1) {
0140         idet = 2;
0141       } else {
0142         continue;
0143       }
0144     }
0145 
0146     if (topo2Dis) {
0147       if ((id.zside() == -1) && (id.nDisc() == 1)) {
0148         idet = 0;
0149       } else if ((id.zside() == -1) && (id.nDisc() == 2)) {
0150         idet = 1;
0151       } else if ((id.zside() == 1) && (id.nDisc() == 1)) {
0152         idet = 2;
0153       } else if ((id.zside() == 1) && (id.nDisc() == 2)) {
0154         idet = 3;
0155       } else {
0156         continue;
0157       }
0158     }
0159 
0160     m_etlTrkPerCell[idet][id.rawId()].insert(simHit.trackId());
0161 
0162     auto simHitIt = m_etlHits[idet].emplace(id.rawId(), MTDHit()).first;
0163 
0164     // --- Accumulate the energy (in MeV) of SIM hits in the same detector cell
0165     (simHitIt->second).energy += convertUnitsTo(0.001_MeV, simHit.energyLoss());
0166 
0167     // --- Get the time of the first SIM hit in the cell
0168     if ((simHitIt->second).time == 0 || simHit.tof() < (simHitIt->second).time) {
0169       (simHitIt->second).time = simHit.tof();
0170 
0171       auto hit_pos = simHit.entryPoint();
0172       (simHitIt->second).x = hit_pos.x();
0173       (simHitIt->second).y = hit_pos.y();
0174       (simHitIt->second).z = hit_pos.z();
0175     }
0176 
0177   }  // simHit loop
0178 
0179   // ==============================================================================
0180   //  Histogram filling
0181   // ==============================================================================
0182 
0183   for (int idet = 0; idet < 4; ++idet) {  //two disks per side
0184     if (((idet == 1) || (idet == 3)) && (topo1Dis == true))
0185       continue;
0186     meNhits_[idet]->Fill(m_etlHits[idet].size());
0187 
0188     for (auto const& hit : m_etlTrkPerCell[idet]) {
0189       meNtrkPerCell_[idet]->Fill((hit.second).size());
0190     }
0191 
0192     for (auto const& hit : m_etlHits[idet]) {
0193       double weight = 1.0;
0194       if (topo1Dis) {
0195         if ((hit.second).energy < hitMinEnergy1Dis_)
0196           continue;
0197       }
0198       if (topo2Dis) {
0199         if ((hit.second).energy < hitMinEnergy2Dis_)
0200           continue;
0201       }
0202       // --- Get the SIM hit global position
0203       ETLDetId detId(hit.first);
0204       DetId geoId = detId.geographicalId();
0205       const MTDGeomDet* thedet = geom->idToDet(geoId);
0206       if (thedet == nullptr)
0207         throw cms::Exception("EtlSimHitsValidation") << "GeographicalID: " << std::hex << geoId.rawId() << " ("
0208                                                      << detId.rawId() << ") is invalid!" << std::dec << std::endl;
0209 
0210       Local3DPoint local_point(
0211           convertMmToCm((hit.second).x), convertMmToCm((hit.second).y), convertMmToCm((hit.second).z));
0212       const auto& global_point = thedet->toGlobal(local_point);
0213 
0214       if (topo2Dis && (detId.discSide() == 1)) {
0215         weight = -weight;
0216       }
0217 
0218       // --- Fill the histograms
0219 
0220       meHitEnergy_[idet]->Fill((hit.second).energy);
0221       meHitTime_[idet]->Fill((hit.second).time);
0222       meHitXlocal_[idet]->Fill((hit.second).x);
0223       meHitYlocal_[idet]->Fill((hit.second).y);
0224       meHitZlocal_[idet]->Fill((hit.second).z);
0225       meOccupancy_[idet]->Fill(global_point.x(), global_point.y(), weight);
0226       meHitX_[idet]->Fill(global_point.x());
0227       meHitY_[idet]->Fill(global_point.y());
0228       meHitZ_[idet]->Fill(global_point.z());
0229       meHitPhi_[idet]->Fill(global_point.phi());
0230       meHitEta_[idet]->Fill(global_point.eta());
0231       meHitTvsE_[idet]->Fill((hit.second).energy, (hit.second).time);
0232       meHitEvsPhi_[idet]->Fill(global_point.phi(), (hit.second).energy);
0233       meHitEvsEta_[idet]->Fill(global_point.eta(), (hit.second).energy);
0234       meHitTvsPhi_[idet]->Fill(global_point.phi(), (hit.second).time);
0235       meHitTvsEta_[idet]->Fill(global_point.eta(), (hit.second).time);
0236 
0237     }  // hit loop
0238 
0239   }  // idet loop
0240 }
0241 
0242 // ------------ method for histogram booking ------------
0243 void EtlSimHitsValidation::bookHistograms(DQMStore::IBooker& ibook,
0244                                           edm::Run const& run,
0245                                           edm::EventSetup const& iSetup) {
0246   ibook.setCurrentFolder(folder_);
0247 
0248   // --- histograms booking
0249 
0250   meNhits_[0] = ibook.book1D("EtlNhitsZnegD1",
0251                              "Number of ETL cells with SIM hits (-Z, Single(topo1D)/First(topo2D) disk);N_{ETL cells}",
0252                              100,
0253                              0.,
0254                              5000.);
0255   meNhits_[1] = ibook.book1D(
0256       "EtlNhitsZnegD2", "Number of ETL cells with SIM hits (-Z, Second disk);N_{ETL cells}", 100, 0., 5000.);
0257   meNhits_[2] = ibook.book1D("EtlNhitsZposD1",
0258                              "Number of ETL cells with SIM hits (+Z, Single(topo1D)/First(topo2D) disk);N_{ETL cells}",
0259                              100,
0260                              0.,
0261                              5000.);
0262   meNhits_[3] = ibook.book1D(
0263       "EtlNhitsZposD2", "Number of ETL cells with SIM hits (+Z, Second Disk);N_{ETL cells}", 100, 0., 5000.);
0264   meNtrkPerCell_[0] = ibook.book1D("EtlNtrkPerCellZnegD1",
0265                                    "Number of tracks per ETL sensor (-Z, Single(topo1D)/First(topo2D) disk);N_{trk}",
0266                                    10,
0267                                    0.,
0268                                    10.);
0269   meNtrkPerCell_[1] =
0270       ibook.book1D("EtlNtrkPerCellZnegD2", "Number of tracks per ETL sensor (-Z, Second disk);N_{trk}", 10, 0., 10.);
0271   meNtrkPerCell_[2] = ibook.book1D("EtlNtrkPerCellZposD1",
0272                                    "Number of tracks per ETL sensor (+Z, Single(topo1D)/First(topo2D) disk);N_{trk}",
0273                                    10,
0274                                    0.,
0275                                    10.);
0276   meNtrkPerCell_[3] =
0277       ibook.book1D("EtlNtrkPerCellZposD2", "Number of tracks per ETL sensor (+Z, Second disk);N_{trk}", 10, 0., 10.);
0278   meHitEnergy_[0] = ibook.book1D(
0279       "EtlHitEnergyZnegD1", "ETL SIM hits energy (-Z, Single(topo1D)/First(topo2D) disk);E_{SIM} [MeV]", 100, 0., 3.);
0280   meHitEnergy_[1] =
0281       ibook.book1D("EtlHitEnergyZnegD2", "ETL SIM hits energy (-Z, Second disk);E_{SIM} [MeV]", 100, 0., 3.);
0282   meHitEnergy_[2] = ibook.book1D(
0283       "EtlHitEnergyZposD1", "ETL SIM hits energy (+Z, Single(topo1D)/First(topo2D) disk);E_{SIM} [MeV]", 100, 0., 3.);
0284   meHitEnergy_[3] =
0285       ibook.book1D("EtlHitEnergyZposD2", "ETL SIM hits energy (+Z, Second disk);E_{SIM} [MeV]", 100, 0., 3.);
0286   meHitTime_[0] = ibook.book1D(
0287       "EtlHitTimeZnegD1", "ETL SIM hits ToA (-Z, Single(topo1D)/First(topo2D) disk);ToA_{SIM} [ns]", 100, 0., 25.);
0288   meHitTime_[1] = ibook.book1D("EtlHitTimeZnegD2", "ETL SIM hits ToA (-Z, Second disk);ToA_{SIM} [ns]", 100, 0., 25.);
0289   meHitTime_[2] = ibook.book1D(
0290       "EtlHitTimeZposD1", "ETL SIM hits ToA (+Z, Single(topo1D)/First(topo2D) disk);ToA_{SIM} [ns]", 100, 0., 25.);
0291   meHitTime_[3] = ibook.book1D("EtlHitTimeZposD2", "ETL SIM hits ToA (+Z, Second disk);ToA_{SIM} [ns]", 100, 0., 25.);
0292 
0293   meHitXlocal_[0] = ibook.book1D("EtlHitXlocalZnegD1",
0294                                  "ETL SIM local X (-Z, Single(topo1D)/First(topo2D) disk);X_{SIM}^{LOC} [mm]",
0295                                  100,
0296                                  -25.,
0297                                  25.);
0298   meHitXlocal_[1] =
0299       ibook.book1D("EtlHitXlocalZnegD2", "ETL SIM local X (-Z, Second disk);X_{SIM}^{LOC} [mm]", 100, -25., 25.);
0300   meHitXlocal_[2] = ibook.book1D("EtlHitXlocalZposD1",
0301                                  "ETL SIM local X (+Z, Single(topo1D)/First(topo2D) disk);X_{SIM}^{LOC} [mm]",
0302                                  100,
0303                                  -25.,
0304                                  25.);
0305   meHitXlocal_[3] =
0306       ibook.book1D("EtlHitXlocalZposD2", "ETL SIM local X (+Z, Second disk);X_{SIM}^{LOC} [mm]", 100, -25., 25.);
0307 
0308   meHitYlocal_[0] = ibook.book1D("EtlHitYlocalZnegD1",
0309                                  "ETL SIM local Y (-Z, Single(topo1D)/First(topo2D) disk);Y_{SIM}^{LOC} [mm]",
0310                                  100,
0311                                  -48.,
0312                                  48.);
0313   meHitYlocal_[1] =
0314       ibook.book1D("EtlHitYlocalZnegD2", "ETL SIM local Y (-Z, Second Disk);Y_{SIM}^{LOC} [mm]", 100, -48., 48.);
0315   meHitYlocal_[2] = ibook.book1D("EtlHitYlocalZposD1",
0316                                  "ETL SIM local Y (+Z, Single(topo1D)/First(topo2D) disk);Y_{SIM}^{LOC} [mm]",
0317                                  100,
0318                                  -48.,
0319                                  48.);
0320   meHitYlocal_[3] =
0321       ibook.book1D("EtlHitYlocalZposD2", "ETL SIM local Y (+Z, Second disk);Y_{SIM}^{LOC} [mm]", 100, -48., 48.);
0322   meHitZlocal_[0] = ibook.book1D("EtlHitZlocalZnegD1",
0323                                  "ETL SIM local Z (-Z, Single(topo1D)/First(topo2D) disk);Z_{SIM}^{LOC} [mm]",
0324                                  80,
0325                                  -0.16,
0326                                  0.16);
0327   meHitZlocal_[1] =
0328       ibook.book1D("EtlHitZlocalZnegD2", "ETL SIM local Z (-Z, Second disk);Z_{SIM}^{LOC} [mm]", 80, -0.16, 0.16);
0329   meHitZlocal_[2] = ibook.book1D("EtlHitZlocalZposD1",
0330                                  "ETL SIM local Z (+Z, Single(topo1D)/First(topo2D) disk);Z_{SIM}^{LOC} [mm]",
0331                                  80,
0332                                  -0.16,
0333                                  0.16);
0334   meHitZlocal_[3] =
0335       ibook.book1D("EtlHitZlocalZposD2", "ETL SIM local Z (+Z, Second disk);Z_{SIM}^{LOC} [mm]", 80, -0.16, 0.16);
0336 
0337   meOccupancy_[0] =
0338       ibook.book2D("EtlOccupancyZnegD1",
0339                    "ETL SIM hits occupancy (-Z, Single(topo1D)/First(topo2D) disk);X_{SIM} [cm];Y_{SIM} [cm]",
0340                    135,
0341                    -135.,
0342                    135.,
0343                    135,
0344                    -135.,
0345                    135.);
0346   meOccupancy_[1] = ibook.book2D("EtlOccupancyZnegD2",
0347                                  "ETL SIM hits occupancy (-Z, Second disk);X_{SIM} [cm];Y_{SIM} [cm]",
0348                                  135,
0349                                  -135.,
0350                                  135.,
0351                                  135,
0352                                  -135.,
0353                                  135.);
0354   meOccupancy_[2] =
0355       ibook.book2D("EtlOccupancyZposD1",
0356                    "ETL SIM hits occupancy (+Z, Single(topo1D)/First(topo2D) disk);X_{SIM} [cm];Y_{SIM} [cm]",
0357                    135,
0358                    -135.,
0359                    135.,
0360                    135,
0361                    -135.,
0362                    135.);
0363   meOccupancy_[3] = ibook.book2D("EtlOccupancyZposD2",
0364                                  "ETL SIM hits occupancy (+Z, Second disk);X_{SIM} [cm];Y_{SIM} [cm]",
0365                                  135,
0366                                  -135.,
0367                                  135.,
0368                                  135,
0369                                  -135.,
0370                                  135.);
0371 
0372   meHitX_[0] = ibook.book1D(
0373       "EtlHitXZnegD1", "ETL SIM hits X (+Z, Single(topo1D)/First(topo2D) disk);X_{SIM} [cm]", 100, -130., 130.);
0374   meHitX_[1] = ibook.book1D("EtlHitXZnegD2", "ETL SIM hits X (-Z, Second disk);X_{SIM} [cm]", 100, -130., 130.);
0375   meHitX_[2] = ibook.book1D(
0376       "EtlHitXZposD1", "ETL SIM hits X (+Z, Single(topo1D)/First(topo2D) disk);X_{SIM} [cm]", 100, -130., 130.);
0377   meHitX_[3] = ibook.book1D("EtlHitXZposD2", "ETL SIM hits X (+Z, Second disk);X_{SIM} [cm]", 100, -130., 130.);
0378   meHitY_[0] = ibook.book1D(
0379       "EtlHitYZnegD1", "ETL SIM hits Y (-Z, Single(topo1D)/First(topo2D) disk);Y_{SIM} [cm]", 100, -130., 130.);
0380   meHitY_[1] = ibook.book1D("EtlHitYZnegD2", "ETL SIM hits Y (-Z, Second disk);Y_{SIM} [cm]", 100, -130., 130.);
0381   meHitY_[2] = ibook.book1D(
0382       "EtlHitYZposD1", "ETL SIM hits Y (+Z, Single(topo1D)/First(topo2D) disk);Y_{SIM} [cm]", 100, -130., 130.);
0383   meHitY_[3] = ibook.book1D("EtlHitYZposD2", "ETL SIM hits Y (+Z, Second disk);Y_{SIM} [cm]", 100, -130., 130.);
0384   meHitZ_[0] = ibook.book1D(
0385       "EtlHitZZnegD1", "ETL SIM hits Z (-Z, Single(topo1D)/First(topo2D) disk);Z_{SIM} [cm]", 100, -302., -298.);
0386   meHitZ_[1] = ibook.book1D("EtlHitZZnegD2", "ETL SIM hits Z (-Z, Second disk);Z_{SIM} [cm]", 100, -304., -300.);
0387   meHitZ_[2] = ibook.book1D(
0388       "EtlHitZZposD1", "ETL SIM hits Z (+Z, Single(topo1D)/First(topo2D) disk);Z_{SIM} [cm]", 100, 298., 302.);
0389   meHitZ_[3] = ibook.book1D("EtlHitZZposD2", "ETL SIM hits Z (+Z, Second disk);Z_{SIM} [cm]", 100, 300., 304.);
0390 
0391   meHitPhi_[0] = ibook.book1D(
0392       "EtlHitPhiZnegD1", "ETL SIM hits #phi (-Z, Single(topo1D)/First(topo2D) disk);#phi_{SIM} [rad]", 100, -3.15, 3.15);
0393   meHitPhi_[1] =
0394       ibook.book1D("EtlHitPhiZnegD2", "ETL SIM hits #phi (-Z, Second disk);#phi_{SIM} [rad]", 100, -3.15, 3.15);
0395   meHitPhi_[2] = ibook.book1D(
0396       "EtlHitPhiZposD1", "ETL SIM hits #phi (+Z, Single(topo1D)/First(topo2D) disk);#phi_{SIM} [rad]", 100, -3.15, 3.15);
0397   meHitPhi_[3] =
0398       ibook.book1D("EtlHitPhiZposD2", "ETL SIM hits #phi (+Z, Second disk);#phi_{SIM} [rad]", 100, -3.15, 3.15);
0399   meHitEta_[0] = ibook.book1D(
0400       "EtlHitEtaZnegD1", "ETL SIM hits #eta (-Z, Single(topo1D)/First(topo2D) disk);#eta_{SIM}", 100, -3.2, -1.56);
0401   meHitEta_[1] = ibook.book1D("EtlHitEtaZnegD2", "ETL SIM hits #eta (-Z, Second disk);#eta_{SIM}", 100, -3.2, -1.56);
0402   meHitEta_[2] = ibook.book1D(
0403       "EtlHitEtaZposD1", "ETL SIM hits #eta (+Z, Single(topo1D)/First(topo2D) disk);#eta_{SIM}", 100, 1.56, 3.2);
0404   meHitEta_[3] = ibook.book1D("EtlHitEtaZposD2", "ETL SIM hits #eta (+Z, Second disk);#eta_{SIM}", 100, 1.56, 3.2);
0405 
0406   meHitTvsE_[0] =
0407       ibook.bookProfile("EtlHitTvsEZnegD1",
0408                         "ETL SIM time vs energy (-Z, Single(topo1D)/First(topo2D) disk);E_{SIM} [MeV];T_{SIM} [ns]",
0409                         50,
0410                         0.,
0411                         2.,
0412                         0.,
0413                         100.);
0414   meHitTvsE_[1] = ibook.bookProfile(
0415       "EtlHitTvsEZnegD2", "ETL SIM time vs energy (-Z, Second disk);E_{SIM} [MeV];T_{SIM} [ns]", 50, 0., 2., 0., 100.);
0416   meHitTvsE_[2] =
0417       ibook.bookProfile("EtlHitTvsEZposD1",
0418                         "ETL SIM time vs energy (+Z, Single(topo1D)/First(topo2D) disk);E_{SIM} [MeV];T_{SIM} [ns]",
0419                         50,
0420                         0.,
0421                         2.,
0422                         0.,
0423                         100.);
0424   meHitTvsE_[3] = ibook.bookProfile(
0425       "EtlHitTvsEZposD2", "ETL SIM time vs energy (+Z, Second disk);E_{SIM} [MeV];T_{SIM} [ns]", 50, 0., 2., 0., 100.);
0426   meHitEvsPhi_[0] =
0427       ibook.bookProfile("EtlHitEvsPhiZnegD1",
0428                         "ETL SIM energy vs #phi (-Z, Single(topo1D)/First(topo2D) disk);#phi_{SIM} [rad];E_{SIM} [MeV]",
0429                         50,
0430                         -3.15,
0431                         3.15,
0432                         0.,
0433                         100.);
0434   meHitEvsPhi_[1] = ibook.bookProfile("EtlHitEvsPhiZnegD2",
0435                                       "ETL SIM energy vs #phi (-Z, Second disk);#phi_{SIM} [rad];E_{SIM} [MeV]",
0436                                       50,
0437                                       -3.15,
0438                                       3.15,
0439                                       0.,
0440                                       100.);
0441   meHitEvsPhi_[2] =
0442       ibook.bookProfile("EtlHitEvsPhiZposD1",
0443                         "ETL SIM energy vs #phi (+Z, Single(topo1D)/First(topo2D) disk);#phi_{SIM} [rad];E_{SIM} [MeV]",
0444                         50,
0445                         -3.15,
0446                         3.15,
0447                         0.,
0448                         100.);
0449   meHitEvsPhi_[3] = ibook.bookProfile("EtlHitEvsPhiZposD2",
0450                                       "ETL SIM energy vs #phi (+Z, Second disk);#phi_{SIM} [rad];E_{SIM} [MeV]",
0451                                       50,
0452                                       -3.15,
0453                                       3.15,
0454                                       0.,
0455                                       100.);
0456   meHitEvsEta_[0] =
0457       ibook.bookProfile("EtlHitEvsEtaZnegD1",
0458                         "ETL SIM energy vs #eta (-Z, Single(topo1D)/First(topo2D) disk);#eta_{SIM};E_{SIM} [MeV]",
0459                         50,
0460                         -3.2,
0461                         -1.56,
0462                         0.,
0463                         100.);
0464   meHitEvsEta_[1] = ibook.bookProfile("EtlHitEvsEtaZnegD2",
0465                                       "ETL SIM energy vs #eta (-Z, Second disk);#eta_{SIM};E_{SIM} [MeV]",
0466                                       50,
0467                                       -3.2,
0468                                       -1.56,
0469                                       0.,
0470                                       100.);
0471   meHitEvsEta_[2] =
0472       ibook.bookProfile("EtlHitEvsEtaZposD1",
0473                         "ETL SIM energy vs #eta (+Z, Single(topo1D)/First(topo2D) disk);#eta_{SIM};E_{SIM} [MeV]",
0474                         50,
0475                         1.56,
0476                         3.2,
0477                         0.,
0478                         100.);
0479   meHitEvsEta_[3] = ibook.bookProfile("EtlHitEvsEtaZposD2",
0480                                       "ETL SIM energy vs #eta (+Z, Second disk);#eta_{SIM};E_{SIM} [MeV]",
0481                                       50,
0482                                       1.56,
0483                                       3.2,
0484                                       0.,
0485                                       100.);
0486   meHitTvsPhi_[0] =
0487       ibook.bookProfile("EtlHitTvsPhiZnegD1",
0488                         "ETL SIM time vs #phi (-Z, Single(topo1D)/First(topo2D) disk);#phi_{SIM} [rad];T_{SIM} [ns]",
0489                         50,
0490                         -3.15,
0491                         3.15,
0492                         0.,
0493                         100.);
0494   meHitTvsPhi_[1] = ibook.bookProfile("EtlHitTvsPhiZnegD2",
0495                                       "ETL SIM time vs #phi (-Z, Second disk);#phi_{SIM} [rad];T_{SIM} [ns]",
0496                                       50,
0497                                       -3.15,
0498                                       3.15,
0499                                       0.,
0500                                       100.);
0501   meHitTvsPhi_[2] =
0502       ibook.bookProfile("EtlHitTvsPhiZposD1",
0503                         "ETL SIM time vs #phi (+Z, Single(topo1D)/First(topo2D) disk);#phi_{SIM} [rad];T_{SIM} [ns]",
0504                         50,
0505                         -3.15,
0506                         3.15,
0507                         0.,
0508                         100.);
0509   meHitTvsPhi_[3] = ibook.bookProfile("EtlHitTvsPhiZposD2",
0510                                       "ETL SIM time vs #phi (+Z, Second disk);#phi_{SIM} [rad];T_{SIM} [ns]",
0511                                       50,
0512                                       -3.15,
0513                                       3.15,
0514                                       0.,
0515                                       100.);
0516   meHitTvsEta_[0] =
0517       ibook.bookProfile("EtlHitTvsEtaZnegD1",
0518                         "ETL SIM time vs #eta (-Z, Single(topo1D)/First(topo2D) disk);#eta_{SIM};T_{SIM} [ns]",
0519                         50,
0520                         -3.2,
0521                         -1.56,
0522                         0.,
0523                         100.);
0524   meHitTvsEta_[1] = ibook.bookProfile(
0525       "EtlHitTvsEtaZnegD2", "ETL SIM time vs #eta (-Z, Second disk);#eta_{SIM};T_{SIM} [ns]", 50, -3.2, -1.56, 0., 100.);
0526   meHitTvsEta_[2] =
0527       ibook.bookProfile("EtlHitTvsEtaZposD1",
0528                         "ETL SIM time vs #eta (+Z, Single(topo1D)/First(topo2D) disk);#eta_{SIM};T_{SIM} [ns]",
0529                         50,
0530                         1.56,
0531                         3.2,
0532                         0.,
0533                         100.);
0534   meHitTvsEta_[3] = ibook.bookProfile(
0535       "EtlHitTvsEtaZposD2", "ETL SIM time vs #eta (+Z, Second disk);#eta_{SIM};T_{SIM} [ns]", 50, 1.56, 3.2, 0., 100.);
0536 }
0537 
0538 // ------------ method fills 'descriptions' with the allowed parameters for the module  ------------
0539 void EtlSimHitsValidation::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
0540   edm::ParameterSetDescription desc;
0541 
0542   desc.add<std::string>("folder", "MTD/ETL/SimHits");
0543   desc.add<edm::InputTag>("inputTag", edm::InputTag("mix", "g4SimHitsFastTimerHitsEndcap"));
0544   desc.add<double>("hitMinimumEnergy1Dis", 0.1);    // [MeV]
0545   desc.add<double>("hitMinimumEnergy2Dis", 0.001);  // [MeV]
0546 
0547   descriptions.add("etlSimHitsValid", desc);
0548 }
0549 
0550 DEFINE_FWK_MODULE(EtlSimHitsValidation);