CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
EtlLocalRecoValidation Class Reference

#include <Validation/MtdValidation/plugins/EtlLocalRecoValidation.cc>

Inheritance diagram for EtlLocalRecoValidation:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Member Functions

 EtlLocalRecoValidation (const edm::ParameterSet &)
 
 ~EtlLocalRecoValidation () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
bool isSameCluster (const FTLCluster &, const FTLCluster &)
 

Private Attributes

const edm::ESGetToken< MTDClusterParameterEstimator, MTDCPERecordcpeToken_
 
edm::EDGetTokenT< FTLClusterCollectionetlRecCluToken_
 
edm::EDGetTokenT< FTLRecHitCollectionetlRecHitsToken_
 
edm::EDGetTokenT< CrossingFrame< PSimHit > > etlSimHitsToken_
 
edm::EDGetTokenT< FTLUncalibratedRecHitCollectionetlUncalibRecHitsToken_
 
const std::string folder_
 
const double hitMinAmplitude_
 
const float hitMinEnergy2Dis_
 
MonitorElementmeCluEta_ [4]
 
MonitorElementmeCluHits_ [4]
 
MonitorElementmeCluOccupancy_ [4]
 
MonitorElementmeCluPhi_ [4]
 
MonitorElementmeCluTime_ [4]
 
MonitorElementmeCluTimeError_ [4]
 
MonitorElementmeCluTimeRes_ [2]
 
MonitorElementmeCluTimeRes_simLC_ [2]
 
MonitorElementmeCluTPullvsE_ [2]
 
MonitorElementmeCluTPullvsE_simLC_ [2]
 
MonitorElementmeCluTPullvsEta_ [2]
 
MonitorElementmeCluTPullvsEta_simLC_ [2]
 
MonitorElementmeCluXLocalErr_ [2]
 
MonitorElementmeCluXPull_ [2]
 
MonitorElementmeCluXPull_simLC_ [2]
 
MonitorElementmeCluXRes_ [2]
 
MonitorElementmeCluXRes_simLC_ [2]
 
MonitorElementmeCluYLocalErr_ [2]
 
MonitorElementmeCluYPull_ [2]
 
MonitorElementmeCluYPull_simLC_ [2]
 
MonitorElementmeCluYRes_ [2]
 
MonitorElementmeCluYRes_simLC_ [2]
 
MonitorElementmeCluYXLocal_ [2]
 
MonitorElementmeCluYXLocalSim_ [2]
 
MonitorElementmeCluYXLocalSim_simLC_ [2]
 
MonitorElementmeCluZRes_ [2]
 
MonitorElementmeCluZRes_simLC_ [2]
 
MonitorElementmeEnergyRes_
 
MonitorElementmeHitEta_ [4]
 
MonitorElementmeHitPhi_ [4]
 
MonitorElementmeHitTime_ [4]
 
MonitorElementmeHitTimeError_ [4]
 
MonitorElementmeHitTvsEta_ [4]
 
MonitorElementmeHitTvsPhi_ [4]
 
MonitorElementmeHitX_ [4]
 
MonitorElementmeHitXlocal_ [2]
 
MonitorElementmeHitY_ [4]
 
MonitorElementmeHitYlocal_ [2]
 
MonitorElementmeHitZ_ [4]
 
MonitorElementmeLocalOccupancy_ [2]
 
MonitorElementmeNhits_ [4]
 
MonitorElementmeOccupancy_ [4]
 
MonitorElementmeTimeRes_
 
MonitorElementmeTimeResEta_ [2][nBinsEta_]
 
MonitorElementmeTimeResTot_ [2][nBinsTot_]
 
MonitorElementmeTPullvsE_
 
MonitorElementmeTPullvsEta_
 
const edm::ESGetToken< MTDGeometry, MTDDigiGeometryRecordmtdgeoToken_
 
const edm::ESGetToken< MTDTopology, MTDTopologyRcdmtdtopoToken_
 
edm::EDGetTokenT< MTDTrackingDetSetVectormtdTrackingHitToken_
 
const bool optionalPlots_
 
edm::EDGetTokenT< MtdRecoClusterToSimLayerClusterAssociationMapr2sAssociationMapToken_
 
const bool uncalibRecHitsPlots_
 

Static Private Attributes

static constexpr float binWidthEta_ = 0.05
 
static constexpr float binWidthTot_ = 1.3
 
static constexpr float etaMin_ = 1.65
 
static constexpr int nBinsEta_ = 26
 
static constexpr int nBinsTot_ = 20
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Description: ETL RECO hits and clusters validation

Implementation: [Notes on implementation]

Definition at line 52 of file EtlLocalRecoValidation.cc.

Constructor & Destructor Documentation

◆ EtlLocalRecoValidation()

EtlLocalRecoValidation::EtlLocalRecoValidation ( const edm::ParameterSet iConfig)
explicit

Definition at line 162 of file EtlLocalRecoValidation.cc.

References etlRecCluToken_, etlRecHitsToken_, etlSimHitsToken_, etlUncalibRecHitsToken_, edm::ParameterSet::getParameter(), mtdTrackingHitToken_, r2sAssociationMapToken_, and uncalibRecHitsPlots_.

163  : folder_(iConfig.getParameter<std::string>("folder")),
164  hitMinEnergy2Dis_(iConfig.getParameter<double>("hitMinimumEnergy2Dis")),
165  optionalPlots_(iConfig.getParameter<bool>("optionalPlots")),
166  uncalibRecHitsPlots_(iConfig.getParameter<bool>("UncalibRecHitsPlots")),
167  hitMinAmplitude_(iConfig.getParameter<double>("HitMinimumAmplitude")),
168  mtdgeoToken_(esConsumes<MTDGeometry, MTDDigiGeometryRecord>()),
169  mtdtopoToken_(esConsumes<MTDTopology, MTDTopologyRcd>()),
170  cpeToken_(esConsumes<MTDClusterParameterEstimator, MTDCPERecord>(edm::ESInputTag("", "MTDCPEBase"))) {
171  etlRecHitsToken_ = consumes<FTLRecHitCollection>(iConfig.getParameter<edm::InputTag>("recHitsTag"));
174  consumes<FTLUncalibratedRecHitCollection>(iConfig.getParameter<edm::InputTag>("uncalibRecHitsTag"));
175  etlSimHitsToken_ = consumes<CrossingFrame<PSimHit>>(iConfig.getParameter<edm::InputTag>("simHitsTag"));
176  etlRecCluToken_ = consumes<FTLClusterCollection>(iConfig.getParameter<edm::InputTag>("recCluTag"));
177  mtdTrackingHitToken_ = consumes<MTDTrackingDetSetVector>(iConfig.getParameter<edm::InputTag>("trkHitTag"));
178  r2sAssociationMapToken_ = consumes<MtdRecoClusterToSimLayerClusterAssociationMap>(
179  iConfig.getParameter<edm::InputTag>("r2sAssociationMapTag"));
180 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::EDGetTokenT< FTLUncalibratedRecHitCollection > etlUncalibRecHitsToken_
edm::EDGetTokenT< CrossingFrame< PSimHit > > etlSimHitsToken_
const edm::ESGetToken< MTDClusterParameterEstimator, MTDCPERecord > cpeToken_
edm::EDGetTokenT< FTLRecHitCollection > etlRecHitsToken_
edm::EDGetTokenT< MTDTrackingDetSetVector > mtdTrackingHitToken_
const edm::ESGetToken< MTDGeometry, MTDDigiGeometryRecord > mtdgeoToken_
const edm::ESGetToken< MTDTopology, MTDTopologyRcd > mtdtopoToken_
edm::EDGetTokenT< MtdRecoClusterToSimLayerClusterAssociationMap > r2sAssociationMapToken_
edm::EDGetTokenT< FTLClusterCollection > etlRecCluToken_

◆ ~EtlLocalRecoValidation()

EtlLocalRecoValidation::~EtlLocalRecoValidation ( )
override

Definition at line 182 of file EtlLocalRecoValidation.cc.

182 {}

Member Function Documentation

◆ analyze()

void EtlLocalRecoValidation::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 185 of file EtlLocalRecoValidation.cc.

References funct::abs(), binWidthEta_, binWidthTot_, AlCaHLTBitMon_QueryRunRegistry::comp, angle_units::operators::convertMmToCm(), geant_units::operators::convertUnitsTo(), submitPVResolutionJobs::count, cpeToken_, TauDecayModes::dec, hcalRecHitTable_cff::detId, ETLDetId::discSide(), hcalRecHitTable_cff::energy, muonRecoAnalyzer_cfi::etaBin, etaMin_, etlRecCluToken_, etlRecHitsToken_, etlSimHitsToken_, etlUncalibRecHitsToken_, Exception, dqm::impl::MonitorElement::Fill(), relativeConstraints::geom, edm::EventSetup::getData(), edm::EventSetup::getTransientHandle(), hitMinAmplitude_, hitMinEnergy2Dis_, hfClusterShapes_cfi::hits, mps_fire::i, l1ctLayer2EG_cff::id, iEvent, createfilelist::int, isSameCluster(), RectangularMTDTopology::localX(), RectangularMTDTopology::localY(), LogDebug, edmNew::makeRefTo(), edm::makeValid(), meCluEta_, meCluHits_, meCluOccupancy_, meCluPhi_, meCluTime_, meCluTimeError_, meCluTimeRes_, meCluTimeRes_simLC_, meCluTPullvsE_, meCluTPullvsE_simLC_, meCluTPullvsEta_, meCluTPullvsEta_simLC_, meCluXLocalErr_, meCluXPull_, meCluXPull_simLC_, meCluXRes_, meCluXRes_simLC_, meCluYLocalErr_, meCluYPull_, meCluYPull_simLC_, meCluYRes_, meCluYRes_simLC_, meCluYXLocal_, meCluYXLocalSim_, meCluYXLocalSim_simLC_, meCluZRes_, meCluZRes_simLC_, meHitEta_, meHitPhi_, meHitTime_, meHitTimeError_, meHitTvsEta_, meHitTvsPhi_, meHitX_, meHitXlocal_, meHitY_, meHitYlocal_, meHitZ_, meLocalOccupancy_, meNhits_, meOccupancy_, meTimeRes_, meTimeResEta_, meTimeResTot_, meTPullvsE_, meTPullvsEta_, ETLDetId::module(), mtdgeoToken_, MTDDetId::mtdRR(), mtdTrackingHitToken_, nBinsEta_, nBinsTot_, ETLDetId::nDisc(), optionalPlots_, muonClassificationByHits_cfi::pixel, mtd::MTDGeomUtil::pixelInModule(), position, r2sAssociationMapToken_, nano_mu_digi_cff::rawId, DetId::rawId(), rpcPointValidation_cfi::recHit, edm::second(), mtd::MTDGeomUtil::setGeometry(), rpcPointValidation_cfi::simHit, ProxyMTDTopology::specificTopology(), mathSSE::sqrt(), hcalRecHitTable_cff::time, GeomDet::toGlobal(), GeomDet::topology(), mkLumiAveragedPlots::tuple, uncalibRecHitsPlots_, mps_merge::weight, x, PV3DBase< T, PVType, FrameType >::x(), hit::x, y, PV3DBase< T, PVType, FrameType >::y(), hit::y, z, PV3DBase< T, PVType, FrameType >::z(), MTDDetId::zside(), and ecaldqm::zside().

185  {
186  using namespace edm;
187  using namespace std;
188  using namespace geant_units::operators;
189  using namespace mtd;
190 
191  auto geometryHandle = iSetup.getTransientHandle(mtdgeoToken_);
192  const MTDGeometry* geom = geometryHandle.product();
193 
194  MTDGeomUtil geomUtil;
195  geomUtil.setGeometry(geom);
196 
197  auto const& cpe = iSetup.getData(cpeToken_);
198 
199  auto etlRecHitsHandle = makeValid(iEvent.getHandle(etlRecHitsToken_));
200  auto etlSimHitsHandle = makeValid(iEvent.getHandle(etlSimHitsToken_));
201  auto etlRecCluHandle = makeValid(iEvent.getHandle(etlRecCluToken_));
202  auto mtdTrkHitHandle = makeValid(iEvent.getHandle(mtdTrackingHitToken_));
203  const auto& r2sAssociationMap = iEvent.get(r2sAssociationMapToken_);
204  MixCollection<PSimHit> etlSimHits(etlSimHitsHandle.product());
205 
206 #ifdef EDM_ML_DEBUG
207  for (const auto& hits : *mtdTrkHitHandle) {
208  if (MTDDetId(hits.id()).mtdSubDetector() == MTDDetId::MTDType::ETL) {
209  LogDebug("EtlLocalRecoValidation") << "MTD cluster DetId " << hits.id() << " # cluster " << hits.size();
210  for (const auto& hit : hits) {
211  LogDebug("EtlLocalRecoValidation")
212  << "MTD_TRH: " << hit.localPosition().x() << "," << hit.localPosition().y() << " : "
213  << hit.localPositionError().xx() << "," << hit.localPositionError().yy() << " : " << hit.time() << " : "
214  << hit.timeError();
215  }
216  }
217  }
218 #endif
219 
220  // --- Loop over the ETL SIM hits
221  std::unordered_map<mtd_digitizer::MTDCellId, MTDHit> m_etlSimHits[4];
222  for (auto const& simHit : etlSimHits) {
223  // --- Use only hits compatible with the in-time bunch-crossing
224  if (simHit.tof() < 0 || simHit.tof() > 25.)
225  continue;
226 
227  ETLDetId id = simHit.detUnitId();
228 
229  int idet = -1;
230 
231  if ((id.zside() == -1) && (id.nDisc() == 1)) {
232  idet = 0;
233  } else if ((id.zside() == -1) && (id.nDisc() == 2)) {
234  idet = 1;
235  } else if ((id.zside() == 1) && (id.nDisc() == 1)) {
236  idet = 2;
237  } else if ((id.zside() == 1) && (id.nDisc() == 2)) {
238  idet = 3;
239  } else {
240  edm::LogWarning("EtlLocalRecoValidation") << "Unknown ETL DetId configuration: " << id;
241  continue;
242  }
243 
244  const auto& position = simHit.localPosition();
245 
247  std::pair<uint8_t, uint8_t> pixel = geomUtil.pixelInModule(id, simscaled);
248 
249  mtd_digitizer::MTDCellId pixelId(id.rawId(), pixel.first, pixel.second);
250  auto simHitIt = m_etlSimHits[idet].emplace(pixelId, MTDHit()).first;
251 
252  // --- Accumulate the energy (in MeV) of SIM hits in the same detector cell
253  (simHitIt->second).energy += convertUnitsTo(0.001_MeV, simHit.energyLoss());
254 
255  // --- Get the time of the first SIM hit in the cell
256  if ((simHitIt->second).time == 0 || simHit.tof() < (simHitIt->second).time) {
257  (simHitIt->second).time = simHit.tof();
258 
259  auto hit_pos = simHit.localPosition();
260  (simHitIt->second).x = hit_pos.x();
261  (simHitIt->second).y = hit_pos.y();
262  (simHitIt->second).z = hit_pos.z();
263  }
264 
265  } // simHit loop
266 
267  // --- Loop over the ELT RECO hits
268  unsigned int n_reco_etl[4] = {0, 0, 0, 0};
269  for (const auto& recHit : *etlRecHitsHandle) {
270  double weight = 1.0;
271  ETLDetId detId = recHit.id();
272  DetId geoId = detId.geographicalId();
273  const MTDGeomDet* thedet = geom->idToDet(geoId);
274  if (thedet == nullptr)
275  throw cms::Exception("EtlLocalRecoValidation") << "GeographicalID: " << std::hex << geoId.rawId() << " ("
276  << detId.rawId() << ") is invalid!" << std::dec << std::endl;
277  const ProxyMTDTopology& topoproxy = static_cast<const ProxyMTDTopology&>(thedet->topology());
278  const RectangularMTDTopology& topo = static_cast<const RectangularMTDTopology&>(topoproxy.specificTopology());
279 
280  Local3DPoint local_point(topo.localX(recHit.row()), topo.localY(recHit.column()), 0.);
281  const auto& global_point = thedet->toGlobal(local_point);
282 
283  int idet = 999;
284 
285  if (detId.discSide() == 1) {
286  weight = -weight;
287  }
288  if ((detId.zside() == -1) && (detId.nDisc() == 1)) {
289  idet = 0;
290  } else if ((detId.zside() == -1) && (detId.nDisc() == 2)) {
291  idet = 1;
292  } else if ((detId.zside() == 1) && (detId.nDisc() == 1)) {
293  idet = 2;
294  } else if ((detId.zside() == 1) && (detId.nDisc() == 2)) {
295  idet = 3;
296  } else {
297  edm::LogWarning("EtlLocalRecoValidation") << "Unknown ETL DetId configuration: " << detId;
298  continue;
299  }
300 
301  // --- Fill the histograms
302 
303  meHitTime_[idet]->Fill(recHit.time());
304  meHitTimeError_[idet]->Fill(recHit.timeError());
305 
306  if ((idet == 0) || (idet == 1)) {
307  meHitXlocal_[0]->Fill(local_point.x());
308  meHitYlocal_[0]->Fill(local_point.y());
309  }
310  if ((idet == 2) || (idet == 3)) {
311  meHitXlocal_[1]->Fill(local_point.x());
312  meHitYlocal_[1]->Fill(local_point.y());
313  }
314 
315  if (optionalPlots_) {
316  meOccupancy_[idet]->Fill(global_point.x(), global_point.y(), weight);
317  if ((idet == 0) || (idet == 1)) {
318  meLocalOccupancy_[0]->Fill(local_point.x(), local_point.y());
319  }
320  if ((idet == 2) || (idet == 3)) {
321  meLocalOccupancy_[1]->Fill(local_point.x(), local_point.y());
322  }
323  }
324  meHitX_[idet]->Fill(global_point.x());
325  meHitY_[idet]->Fill(global_point.y());
326  meHitZ_[idet]->Fill(global_point.z());
327  meHitPhi_[idet]->Fill(global_point.phi());
328  meHitEta_[idet]->Fill(global_point.eta());
329  meHitTvsPhi_[idet]->Fill(global_point.phi(), recHit.time());
330  meHitTvsEta_[idet]->Fill(global_point.eta(), recHit.time());
331 
332  // Resolution histograms
333  std::pair<uint8_t, uint8_t> pixel = geomUtil.pixelInModule(detId, local_point);
334  mtd_digitizer::MTDCellId pixelId(detId.rawId(), pixel.first, pixel.second);
335 
336  if (m_etlSimHits[idet].count(pixelId) == 1) {
337  if (m_etlSimHits[idet][pixelId].energy > hitMinEnergy2Dis_) {
338  float time_res = recHit.time() - m_etlSimHits[idet][pixelId].time;
339 
340  meTimeRes_->Fill(time_res);
341 
342  meTPullvsEta_->Fill(std::abs(global_point.eta()), time_res / recHit.timeError());
343  meTPullvsE_->Fill(m_etlSimHits[idet][pixelId].energy, time_res / recHit.timeError());
344  }
345  }
346 
347  n_reco_etl[idet]++;
348  } // recHit loop
349 
350  for (int i = 0; i < 4; i++) {
351  meNhits_[i]->Fill(std::log10(n_reco_etl[i]));
352  }
353 
354  size_t index(0);
355 
356  // --- Loop over the ETL RECO clusters ---
357  for (const auto& DetSetClu : *etlRecCluHandle) {
358  for (const auto& cluster : DetSetClu) {
359  double weight = 1.0;
360  ETLDetId cluId = cluster.id();
361  DetId detIdObject(cluId);
362  const auto& genericDet = geom->idToDetUnit(detIdObject);
363  if (genericDet == nullptr) {
364  throw cms::Exception("EtlLocalRecoValidation")
365  << "GeographicalID: " << std::hex << cluId << " is invalid!" << std::dec << std::endl;
366  }
367 
368  MTDClusterParameterEstimator::ReturnType tuple = cpe.getParameters(cluster, *genericDet);
369 
370  // --- Cluster position in the module reference frame
371  LocalPoint local_point(std::get<0>(tuple));
372  const auto& global_point = genericDet->toGlobal(local_point);
373 
374  int idet = 999;
375 
376  if (cluId.discSide() == 1) {
377  weight = -weight;
378  }
379  if ((cluId.zside() == -1) && (cluId.nDisc() == 1)) {
380  idet = 0;
381  } else if ((cluId.zside() == -1) && (cluId.nDisc() == 2)) {
382  idet = 1;
383  } else if ((cluId.zside() == 1) && (cluId.nDisc() == 1)) {
384  idet = 2;
385  } else if ((cluId.zside() == 1) && (cluId.nDisc() == 2)) {
386  idet = 3;
387  } else {
388  edm::LogWarning("EtlLocalRecoValidation") << "Unknown ETL DetId configuration: " << cluId;
389  continue;
390  }
391 
392  index++;
393  LogDebug("EtlLocalRecoValidation") << "Cluster # " << index << " DetId " << cluId.rawId() << " idet " << idet;
394 
395  meCluTime_[idet]->Fill(cluster.time());
396  meCluTimeError_[idet]->Fill(cluster.timeError());
397  meCluPhi_[idet]->Fill(global_point.phi());
398  meCluEta_[idet]->Fill(global_point.eta());
399  meCluHits_[idet]->Fill(cluster.size());
400  if (optionalPlots_) {
401  meCluOccupancy_[idet]->Fill(global_point.x(), global_point.y(), weight);
402  }
403 
404  // --- Get the SIM hits associated to the cluster and calculate
405  // the cluster SIM energy, time and position
406 
407  double cluEneSIM = 0.;
408  double cluTimeSIM = 0.;
409  double cluLocXSIM = 0.;
410  double cluLocYSIM = 0.;
411  double cluLocZSIM = 0.;
412 
413  for (int ihit = 0; ihit < cluster.size(); ++ihit) {
414  int hit_row = cluster.minHitRow() + cluster.hitOffset()[ihit * 2];
415  int hit_col = cluster.minHitCol() + cluster.hitOffset()[ihit * 2 + 1];
416 
417  // Match the RECO hit to the corresponding SIM hit
418  for (const auto& recHit : *etlRecHitsHandle) {
419  ETLDetId detId(recHit.id().rawId());
420 
421  DetId geoId = detId.geographicalId();
422  const MTDGeomDet* thedet = geom->idToDet(geoId);
423  const ProxyMTDTopology& topoproxy = static_cast<const ProxyMTDTopology&>(thedet->topology());
424  const RectangularMTDTopology& topo = static_cast<const RectangularMTDTopology&>(topoproxy.specificTopology());
425 
426  Local3DPoint local_point(topo.localX(recHit.row()), topo.localY(recHit.column()), 0.);
427 
428  std::pair<uint8_t, uint8_t> pixel = geomUtil.pixelInModule(detId, local_point);
429  mtd_digitizer::MTDCellId pixelId(detId.rawId(), pixel.first, pixel.second);
430 
431  if (m_etlSimHits[idet].count(pixelId) == 0)
432  continue;
433 
434  // Check the hit position
435  if (detId.zside() != cluId.zside() || detId.mtdRR() != cluId.mtdRR() || detId.module() != cluId.module() ||
436  recHit.row() != hit_row || recHit.column() != hit_col)
437  continue;
438 
439  // Check the hit time
440  if (recHit.time() != cluster.hitTIME()[ihit])
441  continue;
442 
443  // SIM hit's position in the module reference frame
444  Local3DPoint local_point_sim(convertMmToCm(m_etlSimHits[idet][pixelId].x),
445  convertMmToCm(m_etlSimHits[idet][pixelId].y),
446  convertMmToCm(m_etlSimHits[idet][pixelId].z));
447 
448  // Calculate the SIM cluster's position in the module reference frame
449  cluLocXSIM += local_point_sim.x() * m_etlSimHits[idet][pixelId].energy;
450  cluLocYSIM += local_point_sim.y() * m_etlSimHits[idet][pixelId].energy;
451  cluLocZSIM += local_point_sim.z() * m_etlSimHits[idet][pixelId].energy;
452 
453  // Calculate the SIM cluster energy and time
454  cluEneSIM += m_etlSimHits[idet][pixelId].energy;
455  cluTimeSIM += m_etlSimHits[idet][pixelId].time * m_etlSimHits[idet][pixelId].energy;
456 
457  break;
458 
459  } // recHit loop
460 
461  } // ihit loop
462 
463  // Find the MTDTrackingRecHit corresponding to the cluster
464  MTDTrackingRecHit* comp(nullptr);
465  bool matchClu = false;
466  const auto& trkHits = (*mtdTrkHitHandle)[detIdObject];
467  for (const auto& trkHit : trkHits) {
468  if (isSameCluster(trkHit.mtdCluster(), cluster)) {
469  comp = trkHit.clone();
470  matchClu = true;
471  break;
472  }
473  }
474  if (!matchClu) {
475  edm::LogWarning("BtlLocalRecoValidation")
476  << "No valid TrackingRecHit corresponding to cluster, detId = " << detIdObject.rawId();
477  }
478 
479  // --- Fill the cluster resolution histograms
480  int iside = (cluId.zside() == -1 ? 0 : 1);
481  if (cluTimeSIM > 0. && cluEneSIM > 0.) {
482  cluTimeSIM /= cluEneSIM;
483 
484  Local3DPoint cluLocalPosSIM(cluLocXSIM / cluEneSIM, cluLocYSIM / cluEneSIM, cluLocZSIM / cluEneSIM);
485  const auto& cluGlobalPosSIM = genericDet->toGlobal(cluLocalPosSIM);
486 
487  float time_res = cluster.time() - cluTimeSIM;
488  float x_res = global_point.x() - cluGlobalPosSIM.x();
489  float y_res = global_point.y() - cluGlobalPosSIM.y();
490  float z_res = global_point.z() - cluGlobalPosSIM.z();
491 
492  meCluTimeRes_[iside]->Fill(time_res);
493  meCluXRes_[iside]->Fill(x_res);
494  meCluYRes_[iside]->Fill(y_res);
495  meCluZRes_[iside]->Fill(z_res);
496 
497  meCluTPullvsEta_[iside]->Fill(cluGlobalPosSIM.eta(), time_res / cluster.timeError());
498  meCluTPullvsE_[iside]->Fill(cluEneSIM, time_res / cluster.timeError());
499 
500  if (matchClu && comp != nullptr) {
501  meCluXPull_[iside]->Fill(x_res / std::sqrt(comp->globalPositionError().cxx()));
502  meCluYPull_[iside]->Fill(y_res / std::sqrt(comp->globalPositionError().cyy()));
503  meCluXLocalErr_[iside]->Fill(std::sqrt(comp->localPositionError().xx()));
504  meCluYLocalErr_[iside]->Fill(std::sqrt(comp->localPositionError().yy()));
505  }
506  if (optionalPlots_) {
507  meCluYXLocal_[iside]->Fill(local_point.x(), local_point.y());
508  meCluYXLocalSim_[iside]->Fill(cluLocalPosSIM.x(), cluLocalPosSIM.y());
509  }
510 
511  } // if ( cluTimeSIM > 0. && cluEneSIM > 0. )
512 
513  // --- Fill the cluster resolution histograms using MtdSimLayerClusters as mtd truth
514  edm::Ref<edmNew::DetSetVector<FTLCluster>, FTLCluster> clusterRef = edmNew::makeRefTo(etlRecCluHandle, &cluster);
515  auto itp = r2sAssociationMap.equal_range(clusterRef);
516  if (itp.first != itp.second) {
517  std::vector<MtdSimLayerClusterRef> simClustersRefs =
518  (*itp.first).second; // the range of itp.first, itp.second should be always 1
519  for (unsigned int i = 0; i < simClustersRefs.size(); i++) {
520  auto simClusterRef = simClustersRefs[i];
521 
522  float simClusEnergy = convertUnitsTo(0.001_MeV, (*simClusterRef).simLCEnergy()); // GeV --> MeV
523  float simClusTime = (*simClusterRef).simLCTime();
524  LocalPoint simClusLocalPos = (*simClusterRef).simLCPos();
525  const auto& simClusGlobalPos = genericDet->toGlobal(simClusLocalPos);
526 
527  float time_res = cluster.time() - simClusTime;
528  float x_res = global_point.x() - simClusGlobalPos.x();
529  float y_res = global_point.y() - simClusGlobalPos.y();
530  float z_res = global_point.z() - simClusGlobalPos.z();
531 
532  meCluTimeRes_simLC_[iside]->Fill(time_res);
533  meCluXRes_simLC_[iside]->Fill(x_res);
534  meCluYRes_simLC_[iside]->Fill(y_res);
535  meCluZRes_simLC_[iside]->Fill(z_res);
536 
537  meCluTPullvsEta_simLC_[iside]->Fill(simClusGlobalPos.eta(), time_res / cluster.timeError());
538  meCluTPullvsE_simLC_[iside]->Fill(simClusEnergy, time_res / cluster.timeError());
539 
540  if (matchClu && comp != nullptr) {
541  meCluXPull_simLC_[iside]->Fill(x_res / std::sqrt(comp->globalPositionError().cxx()));
542  meCluYPull_simLC_[iside]->Fill(y_res / std::sqrt(comp->globalPositionError().cyy()));
543  }
544  if (optionalPlots_) {
545  meCluYXLocalSim_simLC_[iside]->Fill(simClusLocalPos.x(), simClusLocalPos.y());
546  }
547 
548  } // loop over MtdSimLayerClusters
549  }
550 
551  } // cluster loop
552 
553  } // DetSetClu loop
554 
555  // --- Loop over the ETL Uncalibrated RECO hits
556  if (uncalibRecHitsPlots_) {
557  auto etlUncalibRecHitsHandle = makeValid(iEvent.getHandle(etlUncalibRecHitsToken_));
558 
559  for (const auto& uRecHit : *etlUncalibRecHitsHandle) {
560  ETLDetId detId = uRecHit.id();
561  int idet = detId.zside() + detId.nDisc();
562 
563  DetId geoId = detId.geographicalId();
564  const MTDGeomDet* thedet = geom->idToDet(geoId);
565  const ProxyMTDTopology& topoproxy = static_cast<const ProxyMTDTopology&>(thedet->topology());
566  const RectangularMTDTopology& topo = static_cast<const RectangularMTDTopology&>(topoproxy.specificTopology());
567 
568  Local3DPoint local_point(topo.localX(uRecHit.row()), topo.localY(uRecHit.column()), 0.);
569  const auto& global_point = thedet->toGlobal(local_point);
570 
571  std::pair<uint8_t, uint8_t> pixel = geomUtil.pixelInModule(detId, local_point);
572  mtd_digitizer::MTDCellId pixelId(detId.rawId(), pixel.first, pixel.second);
573 
574  // --- Skip UncalibratedRecHits not matched to SimHits
575  if (m_etlSimHits[idet].count(pixelId) == 0)
576  continue;
577 
578  if (thedet == nullptr)
579  throw cms::Exception("EtlLocalRecoValidation") << "GeographicalID: " << std::hex << geoId.rawId() << " ("
580  << detId.rawId() << ") is invalid!" << std::dec << std::endl;
581 
582  // --- Fill the histograms
583 
584  if (uRecHit.amplitude().first < hitMinAmplitude_)
585  continue;
586 
587  float time_res = uRecHit.time().first - m_etlSimHits[idet][pixelId].time;
588 
589  int iside = (detId.zside() == -1 ? 0 : 1);
590 
591  // amplitude histograms
592 
593  int totBin = (int)(uRecHit.amplitude().first / binWidthTot_);
594  if (totBin > nBinsTot_ - 1)
595  totBin = nBinsTot_ - 1;
596 
597  meTimeResTot_[iside][totBin]->Fill(time_res);
598 
599  // eta histograms
600 
601  int etaBin = (int)((fabs(global_point.eta()) - etaMin_) / binWidthEta_);
602  if (etaBin < 0)
603  etaBin = 0;
604  else if (etaBin > nBinsEta_ - 1)
605  etaBin = nBinsEta_ - 1;
606 
607  meTimeResEta_[iside][etaBin]->Fill(time_res);
608 
609  } // uRecHit loop
610  }
611 }
edm::Ref< typename HandleT::element_type, typename HandleT::element_type::value_type::value_type > makeRefTo(const HandleT &iHandle, typename HandleT::element_type::value_type::const_iterator itIter)
MonitorElement * meCluTimeRes_simLC_[2]
MonitorElement * meCluXRes_simLC_[2]
edm::EDGetTokenT< FTLUncalibratedRecHitCollection > etlUncalibRecHitsToken_
edm::EDGetTokenT< CrossingFrame< PSimHit > > etlSimHitsToken_
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
MonitorElement * meCluXRes_[2]
bool isSameCluster(const FTLCluster &, const FTLCluster &)
MonitorElement * meHitTime_[4]
std::pair< float, float > pixelInModule(const DetId &id, const int row, const int column) const
Definition: MTDGeomUtil.cc:111
const edm::ESGetToken< MTDClusterParameterEstimator, MTDCPERecord > cpeToken_
virtual const Topology & topology() const
Definition: GeomDet.cc:67
MonitorElement * meOccupancy_[4]
MonitorElement * meCluYLocalErr_[2]
MonitorElement * meCluTPullvsEta_[2]
virtual const PixelTopology & specificTopology() const
MonitorElement * meCluTimeError_[4]
MonitorElement * meTimeResTot_[2][nBinsTot_]
static constexpr float etaMin_
MonitorElement * meCluOccupancy_[4]
MonitorElement * meCluTime_[4]
static constexpr int nBinsTot_
MonitorElement * meNhits_[4]
Definition: MTDHit.h:4
Definition: weight.py:1
MonitorElement * meCluTPullvsEta_simLC_[2]
MonitorElement * meTimeResEta_[2][nBinsEta_]
int zside(DetId const &)
MonitorElement * meCluTPullvsE_simLC_[2]
Detector identifier base class for the MIP Timing Layer.
Definition: MTDDetId.h:21
constexpr NumType convertUnitsTo(double desiredUnits, NumType val)
Definition: GeantUnits.h:73
void Fill(long long x)
U second(std::pair< T, U > const &p)
static constexpr float binWidthTot_
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
MonitorElement * meHitTvsEta_[4]
MonitorElement * meCluTimeRes_[2]
int iEvent
Definition: GenABIO.cc:224
MonitorElement * meCluHits_[4]
MonitorElement * meCluZRes_simLC_[2]
float localX(const float mpX) const override
edm::EDGetTokenT< FTLRecHitCollection > etlRecHitsToken_
edm::EDGetTokenT< MTDTrackingDetSetVector > mtdTrackingHitToken_
T sqrt(T t)
Definition: SSEVec.h:23
MonitorElement * meCluYPull_simLC_[2]
MonitorElement * meCluXPull_[2]
const edm::ESGetToken< MTDGeometry, MTDDigiGeometryRecord > mtdgeoToken_
int module() const
Definition: ETLDetId.h:142
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
MonitorElement * meHitTimeError_[4]
static constexpr int nBinsEta_
int mtdRR() const
Definition: MTDDetId.h:64
void setGeometry(MTDGeometry const *geom)
Definition: MTDGeomUtil.cc:10
float localY(const float mpY) const override
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
MonitorElement * meCluYXLocalSim_simLC_[2]
MonitorElement * meHitYlocal_[2]
Definition: DetId.h:17
MonitorElement * meCluZRes_[2]
constexpr NumType convertMmToCm(NumType millimeters)
Definition: angle_units.h:44
MonitorElement * meLocalOccupancy_[2]
int discSide() const
Definition: ETLDetId.h:159
MonitorElement * meCluYXLocal_[2]
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
MonitorElement * meCluYXLocalSim_[2]
A 2D TrackerRecHit with time and time error information.
int zside() const
Definition: MTDDetId.h:61
edm::EDGetTokenT< MtdRecoClusterToSimLayerClusterAssociationMap > r2sAssociationMapToken_
static constexpr float binWidthEta_
Detector identifier class for the Endcap Timing Layer.
Definition: ETLDetId.h:16
HLT enums.
int nDisc() const
Definition: ETLDetId.h:164
static int position[264][3]
Definition: ReadPGInfo.cc:289
edm::EDGetTokenT< FTLClusterCollection > etlRecCluToken_
MonitorElement * meHitTvsPhi_[4]
MonitorElement * meCluXLocalErr_[2]
MonitorElement * meCluYPull_[2]
ESTransientHandle< T > getTransientHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:141
MonitorElement * meCluYRes_simLC_[2]
MonitorElement * meCluTPullvsE_[2]
MonitorElement * meHitXlocal_[2]
Log< level::Warning, false > LogWarning
MonitorElement * meCluYRes_[2]
auto makeValid(const U &iOtherHandleType) noexcept(false)
Definition: ValidHandle.h:52
std::tuple< LocalPoint, LocalError, TimeValue, TimeValueError > ReturnType
MonitorElement * meCluXPull_simLC_[2]
#define LogDebug(id)

◆ bookHistograms()

void EtlLocalRecoValidation::bookHistograms ( DQMStore::IBooker ibook,
edm::Run const &  run,
edm::EventSetup const &  iSetup 
)
overrideprivatevirtual

Implements DQMEDAnalyzer.

Definition at line 614 of file EtlLocalRecoValidation.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), dqm::implementation::IBooker::bookProfile(), data, folder_, meCluEta_, meCluHits_, meCluOccupancy_, meCluPhi_, meCluTime_, meCluTimeError_, meCluTimeRes_, meCluTimeRes_simLC_, meCluTPullvsE_, meCluTPullvsE_simLC_, meCluTPullvsEta_, meCluTPullvsEta_simLC_, meCluXLocalErr_, meCluXPull_, meCluXPull_simLC_, meCluXRes_, meCluXRes_simLC_, meCluYLocalErr_, meCluYPull_, meCluYPull_simLC_, meCluYRes_, meCluYRes_simLC_, meCluYXLocal_, meCluYXLocalSim_, meCluYXLocalSim_simLC_, meCluZRes_, meCluZRes_simLC_, meHitEta_, meHitPhi_, meHitTime_, meHitTimeError_, meHitTvsEta_, meHitTvsPhi_, meHitX_, meHitXlocal_, meHitY_, meHitYlocal_, meHitZ_, meLocalOccupancy_, meNhits_, meOccupancy_, meTimeRes_, meTimeResEta_, meTimeResTot_, meTPullvsE_, meTPullvsEta_, nBinsEta_, nBinsTot_, optionalPlots_, dqm::implementation::NavigatorBase::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and uncalibRecHitsPlots_.

616  {
617  ibook.setCurrentFolder(folder_);
618 
619  // --- histograms booking
620 
621  meNhits_[0] = ibook.book1D("EtlNhitsZnegD1",
622  "Number of ETL RECO hits (-Z, Single(topo1D)/First(topo2D) disk);log_10(N_{RECO})",
623  100,
624  0.,
625  5.25);
626  meNhits_[1] =
627  ibook.book1D("EtlNhitsZnegD2", "Number of ETL RECO hits (-Z, Second disk);log_10(N_{RECO})", 100, 0., 5.25);
628  meNhits_[2] = ibook.book1D("EtlNhitsZposD1",
629  "Number of ETL RECO hits (+Z, Single(topo1D)/First(topo2D) disk);log_10(N_{RECO})",
630  100,
631  0.,
632  5.25);
633  meNhits_[3] =
634  ibook.book1D("EtlNhitsZposD2", "Number of ETL RECO hits (+Z, Second disk);log_10(N_{RECO})", 100, 0., 5.25);
635  meHitTime_[0] = ibook.book1D(
636  "EtlHitTimeZnegD1", "ETL RECO hits ToA (-Z, Single(topo1D)/First(topo2D) disk);ToA_{RECO} [ns]", 100, 0., 25.);
637  meHitTime_[1] = ibook.book1D("EtlHitTimeZnegD2", "ETL RECO hits ToA (-Z, Second disk);ToA_{RECO} [ns]", 100, 0., 25.);
638  meHitTime_[2] = ibook.book1D(
639  "EtlHitTimeZposD1", "ETL RECO hits ToA (+Z, Single(topo1D)/First(topo2D) disk);ToA_{RECO} [ns]", 100, 0., 25.);
640  meHitTime_[3] = ibook.book1D("EtlHitTimeZposD2", "ETL RECO hits ToA (+Z, Second disk);ToA_{RECO} [ns]", 100, 0., 25.);
641  meHitTimeError_[0] =
642  ibook.book1D("EtlHitTimeErrorZnegD1",
643  "ETL RECO hits ToA error (-Z, Single(topo1D)/First(topo2D) disk);#sigma^{ToA}_{RECO} [ns]",
644  50,
645  0.,
646  0.1);
647  meHitTimeError_[1] = ibook.book1D(
648  "EtlHitTimeErrorZnegD2", "ETL RECO hits ToA error(-Z, Second disk);#sigma^{ToA}_{RECO} [ns]", 50, 0., 0.1);
649  meHitTimeError_[2] =
650  ibook.book1D("EtlHitTimeErrorZposD1",
651  "ETL RECO hits ToA error (+Z, Single(topo1D)/First(topo2D) disk);#sigma^{ToA}_{RECO} [ns]",
652  50,
653  0.,
654  0.1);
655  meHitTimeError_[3] = ibook.book1D(
656  "EtlHitTimeErrorZposD2", "ETL RECO hits ToA error(+Z, Second disk);#sigma^{ToA}_{RECO} [ns]", 50, 0., 0.1);
657 
658  if (optionalPlots_) {
659  meOccupancy_[0] =
660  ibook.book2D("EtlOccupancyZnegD1",
661  "ETL RECO hits occupancy (-Z, Single(topo1D)/First(topo2D) disk);X_{RECO} [cm];Y_{RECO} [cm]",
662  135,
663  -135.,
664  135.,
665  135,
666  -135.,
667  135.);
668  meOccupancy_[1] = ibook.book2D("EtlOccupancyZnegD2",
669  "ETL RECO hits occupancy (-Z, Second disk);X_{RECO} [cm];Y_{RECO} [cm]",
670  135,
671  -135.,
672  135.,
673  135,
674  -135.,
675  135.);
676  meOccupancy_[2] =
677  ibook.book2D("EtlOccupancyZposD1",
678  "ETL RECO hits occupancy (+Z, Single(topo1D)/First(topo2D) disk);X_{RECO} [cm];Y_{RECO} [cm]",
679  135,
680  -135.,
681  135.,
682  135,
683  -135.,
684  135.);
685  meOccupancy_[3] = ibook.book2D("EtlOccupancyZposD2",
686  "ETL RECO hits occupancy (+Z, Second disk);X_{RECO} [cm];Y_{RECO} [cm]",
687  135,
688  -135.,
689  135.,
690  135,
691  -135.,
692  135.);
693  meLocalOccupancy_[0] = ibook.book2D("EtlLocalOccupancyZneg",
694  "ETL RECO hits local occupancy (-Z);X_{RECO} [cm];Y_{RECO} [cm]",
695  100,
696  -2.2,
697  2.2,
698  50,
699  -1.1,
700  1.1);
701  meLocalOccupancy_[1] = ibook.book2D("EtlLocalOccupancyZpos",
702  "ETL RECO hits local occupancy (+Z);X_{RECO} [cm];Y_{RECO} [cm]",
703  100,
704  -2.2,
705  2.2,
706  50,
707  -1.1,
708  1.1);
709  }
710  meHitXlocal_[0] = ibook.book1D("EtlHitXlocalZneg", "ETL RECO local X (-Z);X_{RECO}^{LOC} [cm]", 100, -2.2, 2.2);
711  meHitXlocal_[1] = ibook.book1D("EtlHitXlocalZpos", "ETL RECO local X (+Z);X_{RECO}^{LOC} [cm]", 100, -2.2, 2.2);
712  meHitYlocal_[0] = ibook.book1D("EtlHitYlocalZneg", "ETL RECO local Y (-Z);Y_{RECO}^{LOC} [cm]", 50, -1.1, 1.1);
713  meHitYlocal_[1] = ibook.book1D("EtlHitYlocalZpos", "ETL RECO local Y (-Z);Y_{RECO}^{LOC} [cm]", 50, -1.1, 1.1);
714  meHitX_[0] = ibook.book1D(
715  "EtlHitXZnegD1", "ETL RECO hits X (-Z, Single(topo1D)/First(topo2D) Disk);X_{RECO} [cm]", 100, -130., 130.);
716  meHitX_[1] = ibook.book1D("EtlHitXZnegD2", "ETL RECO hits X (-Z, Second Disk);X_{RECO} [cm]", 100, -130., 130.);
717  meHitX_[2] = ibook.book1D(
718  "EtlHitXZposD1", "ETL RECO hits X (+Z, Single(topo1D)/First(topo2D) Disk);X_{RECO} [cm]", 100, -130., 130.);
719  meHitX_[3] = ibook.book1D("EtlHitXZposD2", "ETL RECO hits X (+Z, Second Disk);X_{RECO} [cm]", 100, -130., 130.);
720  meHitY_[0] = ibook.book1D(
721  "EtlHitYZnegD1", "ETL RECO hits Y (-Z, Single(topo1D)/First(topo2D) Disk);Y_{RECO} [cm]", 100, -130., 130.);
722  meHitY_[1] = ibook.book1D("EtlHitYZnegD2", "ETL RECO hits Y (-Z, Second Disk);Y_{RECO} [cm]", 100, -130., 130.);
723  meHitY_[2] = ibook.book1D(
724  "EtlHitYZposD1", "ETL RECO hits Y (+Z, Single(topo1D)/First(topo2D) Disk);Y_{RECO} [cm]", 100, -130., 130.);
725  meHitY_[3] = ibook.book1D("EtlHitYZposD2", "ETL RECO hits Y (+Z, Second Disk);Y_{RECO} [cm]", 100, -130., 130.);
726  meHitZ_[0] = ibook.book1D(
727  "EtlHitZZnegD1", "ETL RECO hits Z (-Z, Single(topo1D)/First(topo2D) Disk);Z_{RECO} [cm]", 100, -302., -298.);
728  meHitZ_[1] = ibook.book1D("EtlHitZZnegD2", "ETL RECO hits Z (-Z, Second Disk);Z_{RECO} [cm]", 100, -304., -300.);
729  meHitZ_[2] = ibook.book1D(
730  "EtlHitZZposD1", "ETL RECO hits Z (+Z, Single(topo1D)/First(topo2D) Disk);Z_{RECO} [cm]", 100, 298., 302.);
731  meHitZ_[3] = ibook.book1D("EtlHitZZposD2", "ETL RECO hits Z (+Z, Second Disk);Z_{RECO} [cm]", 100, 300., 304.);
732  meHitPhi_[0] = ibook.book1D(
733  "EtlHitPhiZnegD1", "ETL RECO hits #phi (-Z, Single(topo1D)/First(topo2D) Disk);#phi_{RECO} [rad]", 100, -3.2, 3.2);
734  meHitPhi_[1] =
735  ibook.book1D("EtlHitPhiZnegD2", "ETL RECO hits #phi (-Z, Second Disk);#phi_{RECO} [rad]", 100, -3.2, 3.2);
736  meHitPhi_[2] = ibook.book1D(
737  "EtlHitPhiZposD1", "ETL RECO hits #phi (+Z, Single(topo1D)/First(topo2D) Disk);#phi_{RECO} [rad]", 100, -3.2, 3.2);
738  meHitPhi_[3] =
739  ibook.book1D("EtlHitPhiZposD2", "ETL RECO hits #phi (+Z, Second Disk);#phi_{RECO} [rad]", 100, -3.2, 3.2);
740  meHitEta_[0] = ibook.book1D(
741  "EtlHitEtaZnegD1", "ETL RECO hits #eta (-Z, Single(topo1D)/First(topo2D) Disk);#eta_{RECO}", 100, -3.2, -1.56);
742  meHitEta_[1] = ibook.book1D("EtlHitEtaZnegD2", "ETL RECO hits #eta (-Z, Second Disk);#eta_{RECO}", 100, -3.2, -1.56);
743  meHitEta_[2] = ibook.book1D(
744  "EtlHitEtaZposD1", "ETL RECO hits #eta (+Z, Single(topo1D)/First(topo2D) Disk);#eta_{RECO}", 100, 1.56, 3.2);
745  meHitEta_[3] = ibook.book1D("EtlHitEtaZposD2", "ETL RECO hits #eta (+Z, Second Disk);#eta_{RECO}", 100, 1.56, 3.2);
746  meTimeRes_ = ibook.book1D("EtlTimeRes", "ETL time resolution;T_{RECO}-T_{SIM}", 100, -0.5, 0.5);
747  meHitTvsPhi_[0] = ibook.bookProfile(
748  "EtlHitTvsPhiZnegD1",
749  "ETL RECO time vs #phi (-Z, Single(topo1D)/First(topo2D) Disk);#phi_{RECO} [rad];ToA_{RECO} [ns]",
750  50,
751  -3.2,
752  3.2,
753  0.,
754  100.);
755  meHitTvsPhi_[1] = ibook.bookProfile("EtlHitTvsPhiZnegD2",
756  "ETL RECO time vs #phi (-Z, Second Disk);#phi_{RECO} [rad];ToA_{RECO} [ns]",
757  50,
758  -3.2,
759  3.2,
760  0.,
761  100.);
762  meHitTvsPhi_[2] = ibook.bookProfile(
763  "EtlHitTvsPhiZposD1",
764  "ETL RECO time vs #phi (+Z, Single(topo1D)/First(topo2D) Disk);#phi_{RECO} [rad];ToA_{RECO} [ns]",
765  50,
766  -3.2,
767  3.2,
768  0.,
769  100.);
770  meHitTvsPhi_[3] = ibook.bookProfile("EtlHitTvsPhiZposD2",
771  "ETL RECO time vs #phi (+Z, Second Disk);#phi_{RECO} [rad];ToA_{RECO} [ns]",
772  50,
773  -3.2,
774  3.2,
775  0.,
776  100.);
777  meHitTvsEta_[0] =
778  ibook.bookProfile("EtlHitTvsEtaZnegD1",
779  "ETL RECO time vs #eta (-Z, Single(topo1D)/First(topo2D) Disk);#eta_{RECO};ToA_{RECO} [ns]",
780  50,
781  -3.2,
782  -1.56,
783  0.,
784  100.);
785  meHitTvsEta_[1] = ibook.bookProfile("EtlHitTvsEtaZnegD2",
786  "ETL RECO time vs #eta (-Z, Second Disk);#eta_{RECO};ToA_{RECO} [ns]",
787  50,
788  -3.2,
789  -1.56,
790  0.,
791  100.);
792  meHitTvsEta_[2] =
793  ibook.bookProfile("EtlHitTvsEtaZposD1",
794  "ETL RECO time vs #eta (+Z, Single(topo1D)/First(topo2D) Disk);#eta_{RECO};ToA_{RECO} [ns]",
795  50,
796  1.56,
797  3.2,
798  0.,
799  100.);
800  meHitTvsEta_[3] = ibook.bookProfile("EtlHitTvsEtaZposD2",
801  "ETL RECO time vs #eta (+Z, Second Disk);#eta_{RECO};ToA_{RECO} [ns]",
802  50,
803  1.56,
804  3.2,
805  0.,
806  100.);
807  meTPullvsE_ = ibook.bookProfile(
808  "EtlTPullvsE", "ETL time pull vs E;E_{SIM} [MeV];(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}", 20, 0., 2., -5., 5., "S");
809  meTPullvsEta_ = ibook.bookProfile("EtlTPullvsEta",
810  "ETL time pull vs #eta;|#eta_{RECO}|;(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}",
811  26,
812  1.65,
813  3.0,
814  -5.,
815  5.,
816  "S");
817  meCluTime_[0] =
818  ibook.book1D("EtlCluTimeZnegD1", "ETL cluster ToA (-Z, Single(topo1D)/First(topo2D) Disk);ToA [ns]", 250, 0, 25);
819  meCluTime_[1] = ibook.book1D("EtlCluTimeZnegD2", "ETL cluster ToA (-Z, Second Disk);ToA [ns]", 250, 0, 25);
820  meCluTime_[2] =
821  ibook.book1D("EtlCluTimeZposD1", "ETL cluster ToA (+Z, Single(topo1D)/First(topo2D) Disk);ToA [ns]", 250, 0, 25);
822  meCluTime_[3] = ibook.book1D("EtlCluTimeZposD2", "ETL cluster ToA (+Z, Second Disk);ToA [ns]", 250, 0, 25);
823  meCluTimeError_[0] = ibook.book1D("EtlCluTimeErrosZnegD1",
824  "ETL cluster time error (-Z, Single(topo1D)/First(topo2D) Disk);#sigma_{t} [ns]",
825  100,
826  0,
827  0.1);
828  meCluTimeError_[1] =
829  ibook.book1D("EtlCluTimeErrorZnegD2", "ETL cluster time error (-Z, Second Disk);#sigma_{t} [ns]", 100, 0, 0.1);
830  meCluTimeError_[2] = ibook.book1D("EtlCluTimeErrorZposD1",
831  "ETL cluster time error (+Z, Single(topo1D)/First(topo2D) Disk);#sigma_{t} [ns]",
832  100,
833  0,
834  0.1);
835  meCluTimeError_[3] =
836  ibook.book1D("EtlCluTimeErrorZposD2", "ETL cluster time error (+Z, Second Disk);#sigma_{t} [ns]", 100, 0, 0.1);
837  meCluPhi_[0] = ibook.book1D(
838  "EtlCluPhiZnegD1", "ETL cluster #phi (-Z, Single(topo1D)/First(topo2D) Disk);#phi_{RECO} [rad]", 126, -3.2, 3.2);
839  meCluPhi_[1] =
840  ibook.book1D("EtlCluPhiZnegD2", "ETL cluster #phi (-Z, Second Disk);#phi_{RECO} [rad]", 126, -3.2, 3.2);
841  meCluPhi_[2] = ibook.book1D(
842  "EtlCluPhiZposD1", "ETL cluster #phi (+Z, Single(topo1D)/First(topo2D) Disk);#phi_{RECO} [rad]", 126, -3.2, 3.2);
843  meCluPhi_[3] =
844  ibook.book1D("EtlCluPhiZposD2", "ETL cluster #phi (+Z, Second Disk);#phi_{RECO} [rad]", 126, -3.2, 3.2);
845  meCluEta_[0] = ibook.book1D(
846  "EtlCluEtaZnegD1", "ETL cluster #eta (-Z, Single(topo1D)/First(topo2D) Disk);#eta_{RECO}", 100, -3.2, -1.4);
847  meCluEta_[1] = ibook.book1D("EtlCluEtaZnegD2", "ETL cluster #eta (-Z, Second Disk);#eta_{RECO}", 100, -3.2, -1.4);
848  meCluEta_[2] = ibook.book1D(
849  "EtlCluEtaZposD1", "ETL cluster #eta (+Z, Single(topo1D)/First(topo2D) Disk);#eta_{RECO}", 100, 1.4, 3.2);
850  meCluEta_[3] = ibook.book1D("EtlCluEtaZposD2", "ETL cluster #eta (+Z, Second Disk);#eta_{RECO}", 100, 1.4, 3.2);
851  meCluHits_[0] = ibook.book1D(
852  "EtlCluHitNumberZnegD1", "ETL hits per cluster (-Z, Single(topo1D)/First(topo2D) Disk);Cluster size", 5, 0, 5);
853  meCluHits_[1] = ibook.book1D("EtlCluHitNumberZnegD2", "ETL hits per cluster (-Z, Second Disk);Cluster size", 5, 0, 5);
854  meCluHits_[2] = ibook.book1D(
855  "EtlCluHitNumberZposD1", "ETL hits per cluster (+Z, Single(topo1D)/First(topo2D) Disk);Cluster size", 5, 0, 5);
856  meCluHits_[3] = ibook.book1D("EtlCluHitNumberZposD2", "ETL hits per cluster (+Z, Second Disk);Cluster size", 5, 0, 5);
857 
858  meCluTimeRes_[0] =
859  ibook.book1D("EtlCluTimeResZneg", "ETL cluster time resolution (-Z);T_{RECO}-T_{SIM} [ns]", 100, -0.5, 0.5);
860  meCluTimeRes_[1] =
861  ibook.book1D("EtlCluTimeResZpos", "ETL cluster time resolution (+Z);T_{RECO}-T_{SIM} [MeV]", 100, -0.5, 0.5);
862 
863  meCluTPullvsE_[0] =
864  ibook.bookProfile("EtlCluTPullvsEZneg",
865  "ETL cluster time pull vs E (-Z);E_{SIM} [MeV];(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}",
866  25,
867  0.,
868  0.5,
869  -5.,
870  5.,
871  "S");
872  meCluTPullvsE_[1] =
873  ibook.bookProfile("EtlCluTPullvsEZpos",
874  "ETL cluster time pull vs E (+Z);E_{SIM} [MeV];(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}",
875  25,
876  0.,
877  0.5,
878  -5.,
879  5.,
880  "S");
881  meCluTPullvsEta_[0] =
882  ibook.bookProfile("EtlCluTPullvsEtaZneg",
883  "ETL cluster time pull vs #eta (-Z);|#eta_{RECO}|;(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}",
884  30,
885  -3.,
886  -1.65,
887  -5.,
888  5.,
889  "S");
890  meCluTPullvsEta_[1] =
891  ibook.bookProfile("EtlCluTPullvsEtaZpos",
892  "ETL cluster time pull vs #eta (+Z);|#eta_{RECO}|;(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}",
893  30,
894  1.65,
895  3.,
896  -5.,
897  5.,
898  "S");
899  meCluXRes_[0] = ibook.book1D("EtlCluXResZneg", "ETL cluster X resolution (-Z);X_{RECO}-X_{SIM} [cm]", 100, -0.1, 0.1);
900  meCluXRes_[1] = ibook.book1D("EtlCluXResZpos", "ETL cluster X resolution (+Z);X_{RECO}-X_{SIM} [cm]", 100, -0.1, 0.1);
901  meCluYRes_[0] = ibook.book1D("EtlCluYResZneg", "ETL cluster Y resolution (-Z);Y_{RECO}-Y_{SIM} [cm]", 100, -0.1, 0.1);
902  meCluYRes_[1] = ibook.book1D("EtlCluYResZpos", "ETL cluster Y resolution (+Z);Y_{RECO}-Y_{SIM} [cm]", 100, -0.1, 0.1);
903  meCluZRes_[0] =
904  ibook.book1D("EtlCluZResZneg", "ETL cluster Z resolution (-Z);Z_{RECO}-Z_{SIM} [cm]", 100, -0.003, 0.003);
905  meCluZRes_[1] =
906  ibook.book1D("EtlCluZResZpos", "ETL cluster Z resolution (+Z);Z_{RECO}-Z_{SIM} [cm]", 100, -0.003, 0.003);
907  meCluXPull_[0] =
908  ibook.book1D("EtlCluXPullZneg", "ETL cluster X pull (-Z);X_{RECO}-X_{SIM}/sigmaX_[RECO] [cm]", 100, -5., 5.);
909  meCluXPull_[1] =
910  ibook.book1D("EtlCluXPullZpos", "ETL cluster X pull (+Z);X_{RECO}-X_{SIM}/sigmaX_[RECO] [cm]", 100, -5., 5.);
911  meCluYPull_[0] =
912  ibook.book1D("EtlCluYPullZneg", "ETL cluster Y pull (-Z);Y_{RECO}-Y_{SIM}/sigmaY_[RECO] [cm]", 100, -5., 5.);
913  meCluYPull_[1] =
914  ibook.book1D("EtlCluYPullZpos", "ETL cluster Y pull (+Z);Y_{RECO}-Y_{SIM}/sigmaY_[RECO] [cm]", 100, -5., 5.);
915  meCluXLocalErr_[0] =
916  ibook.book1D("EtlCluXLocalErrNeg", "ETL cluster X local error (-Z);sigmaX_{RECO,loc} [cm]", 50, 0., 0.2);
917  meCluXLocalErr_[1] =
918  ibook.book1D("EtlCluXLocalErrPos", "ETL cluster X local error (+Z);sigmaX_{RECO,loc} [cm]", 50, 0., 0.2);
919  meCluYLocalErr_[0] =
920  ibook.book1D("EtlCluYLocalErrNeg", "ETL cluster Y local error (-Z);sigmaY_{RECO,loc} [cm]", 50., 0., 0.2);
921  meCluYLocalErr_[1] =
922  ibook.book1D("EtlCluYLocalErrPos", "ETL cluster Y local error (+Z);sigmaY_{RECO,loc} [cm]", 50, 0., 0.2);
923  if (optionalPlots_) {
924  meCluOccupancy_[0] =
925  ibook.book2D("EtlCluOccupancyZnegD1",
926  "ETL cluster X vs Y (-Z, Single(topo1D)/First(topo2D) Disk);X_{RECO} [cm]; Y_{RECO} [cm]",
927  100,
928  -150.,
929  150.,
930  100,
931  -150,
932  150);
933  meCluOccupancy_[1] = ibook.book2D("EtlCluOccupancyZnegD2",
934  "ETL cluster X vs Y (-Z, Second Disk);X_{RECO} [cm]; Y_{RECO} [cm]",
935  100,
936  -150.,
937  150.,
938  100,
939  -150,
940  150);
941  meCluOccupancy_[2] =
942  ibook.book2D("EtlCluOccupancyZposD1",
943  "ETL cluster X vs Y (+Z, Single(topo1D)/First(topo2D) Disk);X_{RECO} [cm]; Y_{RECO} [cm]",
944  100,
945  -150.,
946  150.,
947  100,
948  -150,
949  150);
950  meCluOccupancy_[3] = ibook.book2D("EtlCluOccupancyZposD2",
951  "ETL cluster X vs Y (+Z, Second Disk);X_{RECO} [cm]; Y_{RECO} [cm]",
952  100,
953  -150.,
954  150.,
955  100,
956  -150,
957  150);
958  meCluYXLocal_[0] = ibook.book2D("EtlCluYXLocalZneg",
959  "ETL cluster local Y vs X (-Z);X^{local}_{RECO} [cm];Y^{local}_{RECO} [cm]",
960  100,
961  -2.2,
962  2.2,
963  100,
964  -1.1,
965  1.1);
966  meCluYXLocal_[1] = ibook.book2D("EtlCluYXLocalZpos",
967  "ETL cluster local Y vs X (+Z);X^{local}_{RECO} [cm];Y^{local}_{RECO} [cm]",
968  100,
969  -2.2,
970  2.2,
971  100,
972  -1.1,
973  1.1);
974  meCluYXLocalSim_[0] = ibook.book2D("EtlCluYXLocalSimZneg",
975  "ETL cluster local Y vs X (-Z);X^{local}_{SIM} [cm];Y^{local}_{SIM} [cm]",
976  200,
977  -2.2,
978  2.2,
979  200,
980  -1.1,
981  1.1);
982  meCluYXLocalSim_[1] = ibook.book2D("EtlCluYXLocalSimZpos",
983  "ETL cluster local Y vs X (+Z);X^{local}_{SIM} [cm];Y^{local}_{SIM} [cm]",
984  200,
985  -2.2,
986  2.2,
987  200,
988  -1.1,
989  1.1);
991  ibook.book2D("EtlCluYXLocalSimZneg_simLC",
992  "ETL cluster local Y vs X (-Z, MtdSimLayerClusters);X^{local}_{SIM} [cm];Y^{local}_{SIM} [cm]",
993  200,
994  -2.2,
995  2.2,
996  200,
997  -1.1,
998  1.1);
1000  ibook.book2D("EtlCluYXLocalSimZpos_simLC",
1001  "ETL cluster local Y vs X (+Z, MtdSimLayerClusters);X^{local}_{SIM} [cm];Y^{local}_{SIM} [cm]",
1002  200,
1003  -2.2,
1004  2.2,
1005  200,
1006  -1.1,
1007  1.1);
1008  }
1009 
1010  // resolution plots using MtdSimLayerClusters as truth
1011  meCluTimeRes_simLC_[0] = ibook.book1D("EtlCluTimeResZneg_simLC",
1012  "ETL cluster time resolution (MtdSimLayerClusters, -Z);T_{RECO}-T_{SIM} [ns]",
1013  100,
1014  -0.5,
1015  0.5);
1016  meCluTimeRes_simLC_[1] = ibook.book1D("EtlCluTimeResZpos_simLC",
1017  "ETL cluster time resolution (MtdSimLayerClusters, +Z);T_{RECO}-T_{SIM} [MeV]",
1018  100,
1019  -0.5,
1020  0.5);
1021 
1022  meCluTPullvsE_simLC_[0] = ibook.bookProfile(
1023  "EtlCluTPullvsEZneg_simLC",
1024  "ETL cluster time pull vs E (MtdSimLayerClusters, -Z);E_{SIM} [MeV];(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}",
1025  25,
1026  0.,
1027  0.5,
1028  -5.,
1029  5.,
1030  "S");
1031  meCluTPullvsE_simLC_[1] = ibook.bookProfile(
1032  "EtlCluTPullvsEZpos_simLC",
1033  "ETL cluster time pull vs E (MtdSimLayerClusters, +Z);E_{SIM} [MeV];(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}",
1034  25,
1035  0.,
1036  0.5,
1037  -5.,
1038  5.,
1039  "S");
1041  "EtlCluTPullvsEtaZneg_simLC",
1042  "ETL cluster time pull vs #eta (MtdSimLayerClusters, -Z);|#eta_{RECO}|;(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}",
1043  30,
1044  -3.,
1045  -1.65,
1046  -5.,
1047  5.,
1048  "S");
1050  "EtlCluTPullvsEtaZpos_simLC",
1051  "ETL cluster time pull vs #eta (MtdSimLayerClusters, +Z);|#eta_{RECO}|;(T_{RECO}-T_{SIM})/#sigma_{T_{RECO}}",
1052  30,
1053  1.65,
1054  3.,
1055  -5.,
1056  5.,
1057  "S");
1058  meCluXRes_simLC_[0] = ibook.book1D("EtlCluXResZneg_simLC",
1059  "ETL cluster X resolution (MtdSimLayerClusters, -Z);X_{RECO}-X_{SIM} [cm]",
1060  100,
1061  -0.1,
1062  0.1);
1063  meCluXRes_simLC_[1] = ibook.book1D("EtlCluXResZpos_simLC",
1064  "ETL cluster X resolution (MtdSimLayerClusters, +Z);X_{RECO}-X_{SIM} [cm]",
1065  100,
1066  -0.1,
1067  0.1);
1068  meCluYRes_simLC_[0] = ibook.book1D("EtlCluYResZneg_simLC",
1069  "ETL cluster Y resolution (MtdSimLayerClusters, -Z);Y_{RECO}-Y_{SIM} [cm]",
1070  100,
1071  -0.1,
1072  0.1);
1073  meCluYRes_simLC_[1] = ibook.book1D("EtlCluYResZpos_simLC",
1074  "ETL cluster Y resolution (MtdSimLayerClusters, +Z);Y_{RECO}-Y_{SIM} [cm]",
1075  100,
1076  -0.1,
1077  0.1);
1078  meCluZRes_simLC_[0] = ibook.book1D("EtlCluZResZneg_simLC",
1079  "ETL cluster Z resolution (MtdSimLayerClusters, -Z);Z_{RECO}-Z_{SIM} [cm]",
1080  100,
1081  -0.003,
1082  0.003);
1083  meCluZRes_simLC_[1] = ibook.book1D("EtlCluZResZpos_simLC",
1084  "ETL cluster Z resolution (MtdSimLayerClusters, +Z);Z_{RECO}-Z_{SIM} [cm]",
1085  100,
1086  -0.003,
1087  0.003);
1088  meCluXPull_simLC_[0] =
1089  ibook.book1D("EtlCluXPullZneg_simLC",
1090  "ETL cluster X pull (MtdSimLayerClusters, -Z);X_{RECO}-X_{SIM}/sigmaX_[RECO] [cm]",
1091  100,
1092  -5.,
1093  5.);
1094  meCluXPull_simLC_[1] =
1095  ibook.book1D("EtlCluXPullZpos_simLC",
1096  "ETL cluster X pull (MtdSimLayerClusters, +Z);X_{RECO}-X_{SIM}/sigmaX_[RECO] [cm]",
1097  100,
1098  -5.,
1099  5.);
1100  meCluYPull_simLC_[0] =
1101  ibook.book1D("EtlCluYPullZneg_simLC",
1102  "ETL cluster Y pull (MtdSimLayerClusters, -Z);Y_{RECO}-Y_{SIM}/sigmaY_[RECO] [cm]",
1103  100,
1104  -5.,
1105  5.);
1106  meCluYPull_simLC_[1] =
1107  ibook.book1D("EtlCluYPullZpos_simLC",
1108  "ETL cluster Y pull (MtdSimLayerClusters, +Z);Y_{RECO}-Y_{SIM}/sigmaY_[RECO] [cm]",
1109  100,
1110  -5.,
1111  5.);
1112 
1113  // --- UncalibratedRecHits histograms
1114 
1115  if (uncalibRecHitsPlots_) {
1116  const std::string det_name[2] = {"ETL-", "ETL+"};
1117  for (unsigned int iside = 0; iside < 2; ++iside) {
1118  for (unsigned int ihistoTot = 0; ihistoTot < nBinsTot_; ++ihistoTot) {
1119  std::string hname = Form("TimeResTot_%d_%d", iside, ihistoTot);
1120  std::string htitle =
1121  Form("%s time resolution (Tot bin = %d);T_{RECO} - T_{SIM} [ns]", det_name[iside].data(), ihistoTot);
1122  meTimeResTot_[iside][ihistoTot] = ibook.book1D(hname, htitle, 200, -0.5, 0.5);
1123 
1124  } // ihistoTot loop
1125 
1126  for (unsigned int ihistoEta = 0; ihistoEta < nBinsEta_; ++ihistoEta) {
1127  std::string hname = Form("TimeResEta_%d_%d", iside, ihistoEta);
1128  std::string htitle =
1129  Form("%s time resolution (|#eta| bin = %d);T_{RECO} - T_{SIM} [ns]", det_name[iside].data(), ihistoEta);
1130  meTimeResEta_[iside][ihistoEta] = ibook.book1D(hname, htitle, 200, -0.5, 0.5);
1131 
1132  } // ihistoEta loop
1133  }
1134  }
1135 }
MonitorElement * meCluTimeRes_simLC_[2]
MonitorElement * meCluXRes_simLC_[2]
MonitorElement * meCluXRes_[2]
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
MonitorElement * meHitTime_[4]
MonitorElement * meOccupancy_[4]
MonitorElement * meCluYLocalErr_[2]
MonitorElement * meCluTPullvsEta_[2]
MonitorElement * meCluTimeError_[4]
MonitorElement * meTimeResTot_[2][nBinsTot_]
MonitorElement * meCluOccupancy_[4]
MonitorElement * meCluTime_[4]
static constexpr int nBinsTot_
MonitorElement * meNhits_[4]
MonitorElement * meCluTPullvsEta_simLC_[2]
MonitorElement * meTimeResEta_[2][nBinsEta_]
MonitorElement * meCluTPullvsE_simLC_[2]
MonitorElement * meHitTvsEta_[4]
MonitorElement * meCluTimeRes_[2]
MonitorElement * meCluHits_[4]
MonitorElement * meCluZRes_simLC_[2]
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:408
MonitorElement * meCluYPull_simLC_[2]
MonitorElement * meCluXPull_[2]
MonitorElement * meHitTimeError_[4]
static constexpr int nBinsEta_
MonitorElement * meCluYXLocalSim_simLC_[2]
MonitorElement * meHitYlocal_[2]
MonitorElement * meCluZRes_[2]
MonitorElement * meLocalOccupancy_[2]
MonitorElement * meCluYXLocal_[2]
MonitorElement * meCluYXLocalSim_[2]
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:221
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
MonitorElement * meHitTvsPhi_[4]
MonitorElement * meCluXLocalErr_[2]
MonitorElement * meCluYPull_[2]
MonitorElement * meCluYRes_simLC_[2]
MonitorElement * meCluTPullvsE_[2]
MonitorElement * meHitXlocal_[2]
MonitorElement * meCluYRes_[2]
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
MonitorElement * meCluXPull_simLC_[2]

◆ fillDescriptions()

void EtlLocalRecoValidation::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 1138 of file EtlLocalRecoValidation.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, ProducerED_cfi::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

1138  {
1140 
1141  desc.add<std::string>("folder", "MTD/ETL/LocalReco");
1142  desc.add<edm::InputTag>("recHitsTag", edm::InputTag("mtdRecHits", "FTLEndcap"));
1143  desc.add<edm::InputTag>("uncalibRecHitsTag", edm::InputTag("mtdUncalibratedRecHits", "FTLEndcap"));
1144  desc.add<edm::InputTag>("simHitsTag", edm::InputTag("mix", "g4SimHitsFastTimerHitsEndcap"));
1145  desc.add<edm::InputTag>("recCluTag", edm::InputTag("mtdClusters", "FTLEndcap"));
1146  desc.add<edm::InputTag>("trkHitTag", edm::InputTag("mtdTrackingRecHits"));
1147  desc.add<edm::InputTag>("r2sAssociationMapTag", edm::InputTag("mtdRecoClusterToSimLayerClusterAssociation"));
1148  desc.add<double>("hitMinimumEnergy2Dis", 0.001); // [MeV]
1149  desc.add<bool>("optionalPlots", false);
1150  desc.add<bool>("UncalibRecHitsPlots", false);
1151  desc.add<double>("HitMinimumAmplitude", 0.33); // [MIP] old, now amplitude for recHit is time_over_threshold in ETL
1152 
1153  descriptions.add("etlLocalRecoValid", desc);
1154 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ isSameCluster()

bool EtlLocalRecoValidation::isSameCluster ( const FTLCluster clu1,
const FTLCluster clu2 
)
private

Definition at line 156 of file EtlLocalRecoValidation.cc.

References FTLCluster::id(), FTLCluster::size(), FTLCluster::time(), FTLCluster::x(), and FTLCluster::y().

Referenced by analyze().

156  {
157  return clu1.id() == clu2.id() && clu1.size() == clu2.size() && clu1.x() == clu2.x() && clu1.y() == clu2.y() &&
158  clu1.time() == clu2.time();
159 }
float x() const
Definition: FTLCluster.h:120
int size() const
Definition: FTLCluster.h:153
float y() const
Definition: FTLCluster.h:125
const DetId & id() const
Definition: FTLCluster.h:190
float time() const
Definition: FTLCluster.h:142

Member Data Documentation

◆ binWidthEta_

constexpr float EtlLocalRecoValidation::binWidthEta_ = 0.05
staticprivate

Definition at line 150 of file EtlLocalRecoValidation.cc.

Referenced by analyze().

◆ binWidthTot_

constexpr float EtlLocalRecoValidation::binWidthTot_ = 1.3
staticprivate

Definition at line 145 of file EtlLocalRecoValidation.cc.

Referenced by analyze().

◆ cpeToken_

const edm::ESGetToken<MTDClusterParameterEstimator, MTDCPERecord> EtlLocalRecoValidation::cpeToken_
private

Definition at line 83 of file EtlLocalRecoValidation.cc.

Referenced by analyze().

◆ etaMin_

constexpr float EtlLocalRecoValidation::etaMin_ = 1.65
staticprivate

Definition at line 151 of file EtlLocalRecoValidation.cc.

Referenced by analyze().

◆ etlRecCluToken_

edm::EDGetTokenT<FTLClusterCollection> EtlLocalRecoValidation::etlRecCluToken_
private

Definition at line 77 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and EtlLocalRecoValidation().

◆ etlRecHitsToken_

edm::EDGetTokenT<FTLRecHitCollection> EtlLocalRecoValidation::etlRecHitsToken_
private

Definition at line 74 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and EtlLocalRecoValidation().

◆ etlSimHitsToken_

edm::EDGetTokenT<CrossingFrame<PSimHit> > EtlLocalRecoValidation::etlSimHitsToken_
private

Definition at line 76 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and EtlLocalRecoValidation().

◆ etlUncalibRecHitsToken_

edm::EDGetTokenT<FTLUncalibratedRecHitCollection> EtlLocalRecoValidation::etlUncalibRecHitsToken_
private

Definition at line 75 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and EtlLocalRecoValidation().

◆ folder_

const std::string EtlLocalRecoValidation::folder_
private

Definition at line 68 of file EtlLocalRecoValidation.cc.

Referenced by bookHistograms().

◆ hitMinAmplitude_

const double EtlLocalRecoValidation::hitMinAmplitude_
private

Definition at line 72 of file EtlLocalRecoValidation.cc.

Referenced by analyze().

◆ hitMinEnergy2Dis_

const float EtlLocalRecoValidation::hitMinEnergy2Dis_
private

Definition at line 69 of file EtlLocalRecoValidation.cc.

Referenced by analyze().

◆ meCluEta_

MonitorElement* EtlLocalRecoValidation::meCluEta_[4]
private

Definition at line 109 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meCluHits_

MonitorElement* EtlLocalRecoValidation::meCluHits_[4]
private

Definition at line 110 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meCluOccupancy_

MonitorElement* EtlLocalRecoValidation::meCluOccupancy_[4]
private

Definition at line 111 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meCluPhi_

MonitorElement* EtlLocalRecoValidation::meCluPhi_[4]
private

Definition at line 108 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meCluTime_

MonitorElement* EtlLocalRecoValidation::meCluTime_[4]
private

Definition at line 106 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meCluTimeError_

MonitorElement* EtlLocalRecoValidation::meCluTimeError_[4]
private

Definition at line 107 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meCluTimeRes_

MonitorElement* EtlLocalRecoValidation::meCluTimeRes_[2]
private

Definition at line 118 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meCluTimeRes_simLC_

MonitorElement* EtlLocalRecoValidation::meCluTimeRes_simLC_[2]
private

Definition at line 132 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meCluTPullvsE_

MonitorElement* EtlLocalRecoValidation::meCluTPullvsE_[2]
private

Definition at line 119 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meCluTPullvsE_simLC_

MonitorElement* EtlLocalRecoValidation::meCluTPullvsE_simLC_[2]
private

Definition at line 133 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meCluTPullvsEta_

MonitorElement* EtlLocalRecoValidation::meCluTPullvsEta_[2]
private

Definition at line 120 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meCluTPullvsEta_simLC_

MonitorElement* EtlLocalRecoValidation::meCluTPullvsEta_simLC_[2]
private

Definition at line 134 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meCluXLocalErr_

MonitorElement* EtlLocalRecoValidation::meCluXLocalErr_[2]
private

Definition at line 128 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meCluXPull_

MonitorElement* EtlLocalRecoValidation::meCluXPull_[2]
private

Definition at line 124 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meCluXPull_simLC_

MonitorElement* EtlLocalRecoValidation::meCluXPull_simLC_[2]
private

Definition at line 138 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meCluXRes_

MonitorElement* EtlLocalRecoValidation::meCluXRes_[2]
private

Definition at line 121 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meCluXRes_simLC_

MonitorElement* EtlLocalRecoValidation::meCluXRes_simLC_[2]
private

Definition at line 135 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meCluYLocalErr_

MonitorElement* EtlLocalRecoValidation::meCluYLocalErr_[2]
private

Definition at line 129 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meCluYPull_

MonitorElement* EtlLocalRecoValidation::meCluYPull_[2]
private

Definition at line 125 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meCluYPull_simLC_

MonitorElement* EtlLocalRecoValidation::meCluYPull_simLC_[2]
private

Definition at line 139 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meCluYRes_

MonitorElement* EtlLocalRecoValidation::meCluYRes_[2]
private

Definition at line 122 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meCluYRes_simLC_

MonitorElement* EtlLocalRecoValidation::meCluYRes_simLC_[2]
private

Definition at line 136 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meCluYXLocal_

MonitorElement* EtlLocalRecoValidation::meCluYXLocal_[2]
private

Definition at line 126 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meCluYXLocalSim_

MonitorElement* EtlLocalRecoValidation::meCluYXLocalSim_[2]
private

Definition at line 127 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meCluYXLocalSim_simLC_

MonitorElement* EtlLocalRecoValidation::meCluYXLocalSim_simLC_[2]
private

Definition at line 140 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meCluZRes_

MonitorElement* EtlLocalRecoValidation::meCluZRes_[2]
private

Definition at line 123 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meCluZRes_simLC_

MonitorElement* EtlLocalRecoValidation::meCluZRes_simLC_[2]
private

Definition at line 137 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meEnergyRes_

MonitorElement* EtlLocalRecoValidation::meEnergyRes_
private

Definition at line 114 of file EtlLocalRecoValidation.cc.

◆ meHitEta_

MonitorElement* EtlLocalRecoValidation::meHitEta_[4]
private

Definition at line 101 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitPhi_

MonitorElement* EtlLocalRecoValidation::meHitPhi_[4]
private

Definition at line 100 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitTime_

MonitorElement* EtlLocalRecoValidation::meHitTime_[4]
private

Definition at line 88 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitTimeError_

MonitorElement* EtlLocalRecoValidation::meHitTimeError_[4]
private

Definition at line 89 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitTvsEta_

MonitorElement* EtlLocalRecoValidation::meHitTvsEta_[4]
private

Definition at line 104 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitTvsPhi_

MonitorElement* EtlLocalRecoValidation::meHitTvsPhi_[4]
private

Definition at line 103 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitX_

MonitorElement* EtlLocalRecoValidation::meHitX_[4]
private

Definition at line 97 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitXlocal_

MonitorElement* EtlLocalRecoValidation::meHitXlocal_[2]
private

Definition at line 94 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitY_

MonitorElement* EtlLocalRecoValidation::meHitY_[4]
private

Definition at line 98 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitYlocal_

MonitorElement* EtlLocalRecoValidation::meHitYlocal_[2]
private

Definition at line 95 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meHitZ_

MonitorElement* EtlLocalRecoValidation::meHitZ_[4]
private

Definition at line 99 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meLocalOccupancy_

MonitorElement* EtlLocalRecoValidation::meLocalOccupancy_[2]
private

Definition at line 93 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meNhits_

MonitorElement* EtlLocalRecoValidation::meNhits_[4]
private

Definition at line 87 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meOccupancy_

MonitorElement* EtlLocalRecoValidation::meOccupancy_[4]
private

Definition at line 91 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTimeRes_

MonitorElement* EtlLocalRecoValidation::meTimeRes_
private

Definition at line 113 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTimeResEta_

MonitorElement* EtlLocalRecoValidation::meTimeResEta_[2][nBinsEta_]
private

Definition at line 153 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTimeResTot_

MonitorElement* EtlLocalRecoValidation::meTimeResTot_[2][nBinsTot_]
private

Definition at line 147 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTPullvsE_

MonitorElement* EtlLocalRecoValidation::meTPullvsE_
private

Definition at line 115 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ meTPullvsEta_

MonitorElement* EtlLocalRecoValidation::meTPullvsEta_
private

Definition at line 116 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ mtdgeoToken_

const edm::ESGetToken<MTDGeometry, MTDDigiGeometryRecord> EtlLocalRecoValidation::mtdgeoToken_
private

Definition at line 81 of file EtlLocalRecoValidation.cc.

Referenced by analyze().

◆ mtdtopoToken_

const edm::ESGetToken<MTDTopology, MTDTopologyRcd> EtlLocalRecoValidation::mtdtopoToken_
private

Definition at line 82 of file EtlLocalRecoValidation.cc.

◆ mtdTrackingHitToken_

edm::EDGetTokenT<MTDTrackingDetSetVector> EtlLocalRecoValidation::mtdTrackingHitToken_
private

Definition at line 78 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and EtlLocalRecoValidation().

◆ nBinsEta_

constexpr int EtlLocalRecoValidation::nBinsEta_ = 26
staticprivate

Definition at line 149 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ nBinsTot_

constexpr int EtlLocalRecoValidation::nBinsTot_ = 20
staticprivate

Definition at line 144 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ optionalPlots_

const bool EtlLocalRecoValidation::optionalPlots_
private

Definition at line 70 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ r2sAssociationMapToken_

edm::EDGetTokenT<MtdRecoClusterToSimLayerClusterAssociationMap> EtlLocalRecoValidation::r2sAssociationMapToken_
private

Definition at line 79 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), and EtlLocalRecoValidation().

◆ uncalibRecHitsPlots_

const bool EtlLocalRecoValidation::uncalibRecHitsPlots_
private

Definition at line 71 of file EtlLocalRecoValidation.cc.

Referenced by analyze(), bookHistograms(), and EtlLocalRecoValidation().