71 #include "HepMC/GenRanges.h" 72 #include "CLHEP/Units/PhysicalConstants.h" 101 return (
b << 32) |
a;
103 return (
a << 32) |
b;
124 static constexpr
double rBTL_ = 110.0;
125 static constexpr
double zETL_ = 290.0;
234 trackMinPt_(iConfig.getParameter<double>(
"trackMinimumPt")),
235 trackMaxBtlEta_(iConfig.getParameter<double>(
"trackMaximumBtlEta")),
236 trackMinEtlEta_(iConfig.getParameter<double>(
"trackMinimumEtlEta")),
237 trackMaxEtlEta_(iConfig.getParameter<double>(
"trackMaximumEtlEta")) {
263 mtdgeoToken_ = esConsumes<MTDGeometry, MTDDigiGeometryRecord>();
265 mtdlayerToken_ = esConsumes<MTDDetLayerGeometry, MTDRecoGeometryRecord>();
266 magfieldToken_ = esConsumes<MagneticField, IdealMagneticFieldRecord>();
282 std::unordered_map<uint32_t, MTDHit> m_btlHits;
283 std::unordered_map<uint32_t, MTDHit> m_etlHits;
284 std::unordered_map<uint32_t, std::set<unsigned long int>> m_btlTrkPerCell;
285 std::unordered_map<uint32_t, std::set<unsigned long int>> m_etlTrkPerCell;
286 std::map<TrackingParticleRef, std::vector<uint32_t>> m_tp2detid;
300 const auto& primRecoVtx = *(RecVertexHandle.product()->begin());
305 double zsim =
convertMmToCm((*(
mc->vertices_begin()))->position().z());
306 double tsim = (*(
mc->vertices_begin()))->position().t() * CLHEP::mm / CLHEP::c_light;
312 s2r_ = simToRecoH.product();
315 r2s_ = recoToSimH.product();
321 for (
auto const&
simHit : btlSimHits) {
326 m_btlTrkPerCell[
id.rawId()].insert(thisHId);
327 auto simHitIt = m_btlHits.emplace(
id.
rawId(),
MTDHit()).first;
334 for (
auto const&
simHit : etlSimHits) {
340 m_etlTrkPerCell[
id.rawId()].insert(thisHId);
341 auto simHitIt = m_etlHits.emplace(
id.
rawId(),
MTDHit()).first;
351 for (
auto tp = tpColl.begin();
tp != tpColl.end();
tp++, ++tpindex) {
353 if (
tp->eventId().bunchCrossing() == 0 &&
tp->eventId().event() == 0) {
356 for (
const auto& simTrk :
tp->g4Tracks()) {
357 auto const thisTId =
uniqueId(simTrk.trackId(), simTrk.eventId());
358 for (
auto const& cell : m_btlTrkPerCell) {
362 for (
auto const& simtrack : cell.second) {
363 if (thisTId == simtrack) {
364 m_tp2detid[tpref].emplace_back(cell.first);
369 for (
auto const& cell : m_etlTrkPerCell) {
373 for (
auto const& simtrack : cell.second) {
374 if (thisTId == simtrack) {
375 m_tp2detid[tpref].emplace_back(cell.first);
384 unsigned int index = 0;
387 const bool isGoodVtx =
std::abs(primRecoVtx.z() - zsim) <
deltaZcut_ || primRecoVtx.isFake();
390 for (
const auto& trackGen : *GenRecTrackHandle) {
394 if (trackAssoc[trackref] == -1) {
395 LogInfo(
"mtdTracks") <<
"Extended track not associated";
404 bool twoETLdiscs =
false;
409 if (std::round(SigmatMtd[trackref] - Sigmat0Pid[trackref]) != 0) {
411 <<
"TimeError associated to refitted track is different from TimeError stored in tofPID " 412 "sigmat0 ValueMap: this should not happen";
433 int numMTDBtlvalidhits = 0;
434 for (
const auto hit :
track.recHits()) {
435 if (
hit->isValid() ==
false)
438 if ((
Hit.det() == 6) && (
Hit.subdetId() == 1) && (
Hit.mtdSubDetector() == 1)) {
440 numMTDBtlvalidhits++;
446 if (MTDBtl ==
true) {
454 if (isBTL && Sigmat0Safe[trackref] < 0.) {
473 bool MTDEtlZnegD1 =
false;
474 bool MTDEtlZnegD2 =
false;
475 bool MTDEtlZposD1 =
false;
476 bool MTDEtlZposD2 =
false;
477 int numMTDEtlvalidhits = 0;
478 for (
const auto hit :
track.recHits()) {
479 if (
hit->isValid() ==
false)
482 if ((
Hit.det() == 6) && (
Hit.subdetId() == 1) && (
Hit.mtdSubDetector() == 2)) {
486 if ((ETLHit.
zside() == -1) && (ETLHit.
nDisc() == 1)) {
490 numMTDEtlvalidhits++;
492 if ((ETLHit.
zside() == -1) && (ETLHit.
nDisc() == 2)) {
496 numMTDEtlvalidhits++;
498 if ((ETLHit.
zside() == 1) && (ETLHit.
nDisc() == 1)) {
502 numMTDEtlvalidhits++;
504 if ((ETLHit.
zside() == 1) && (ETLHit.
nDisc() == 2)) {
508 numMTDEtlvalidhits++;
513 if (
isETL && Sigmat0Safe[trackref] < 0.) {
519 twoETLdiscs = (MTDEtlZnegD1 ==
true) && (MTDEtlZnegD2 ==
true);
520 if ((MTDEtlZnegD1 ==
true) || (MTDEtlZnegD2 ==
true)) {
532 twoETLdiscs = (MTDEtlZposD1 ==
true) && (MTDEtlZposD2 ==
true);
533 if ((MTDEtlZposD1 ==
true) || (MTDEtlZposD2 ==
true)) {
547 <<
" BTL " << isBTL <<
" ETL " <<
isETL <<
" 2disks " << twoETLdiscs;
556 if (tp_info !=
nullptr &&
mvaTPSel(**tp_info)) {
557 const bool withMTD = (m_tp2detid.find(*tp_info) != m_tp2detid.end());
558 LogDebug(
"MtdTracksValidation") <<
"Matched with selected TP, MTD sim hits association: " << withMTD;
569 if (isBTL ||
isETL) {
572 if (isBTL || twoETLdiscs) {
580 if (isBTL || twoETLdiscs) {
614 <<
"MtdTracksValidation: extender fail in " <<
iEvent.id().run() <<
" " <<
iEvent.id().event()
615 <<
" pt= " << trackGen.pt() <<
" eta= " << trackGen.eta();
627 const bool vtxFake = primRecoVtx.isFake();
629 if (
mvaRecSel(trackGen, primRecoVtx, t0Safe[trackref], Sigmat0Safe[trackref])) {
637 double dZ = trackGen.vz() - zsim;
639 double pullT(-9999.);
640 if (Sigmat0Safe[trackref] != -1.) {
641 dT = t0Safe[trackref] - tsim;
642 pullT = dT / Sigmat0Safe[trackref];
644 for (
const auto& genP :
mc->particle_range()) {
657 if (isBTL ||
isETL) {
692 const MTDTopology* topology = topologyHandle.product();
702 auto tTrack = ttrackBuilder->build(
track);
706 std::unique_ptr<MeasurementEstimator> theEstimator =
714 <<
"MtdTracksValidation: extrapolating track, pt= " <<
track.pt() <<
" eta= " <<
track.eta();
719 const std::vector<const DetLayer*>& layersBTL = layerGeo->
allBTLLayers();
720 for (
const DetLayer* ilay : layersBTL) {
721 std::pair<bool, TrajectoryStateOnSurface>
comp = ilay->compatible(tsos, prop, *theEstimator);
726 extrho =
comp.second.globalPosition().perp();
727 exteta =
comp.second.globalPosition().eta();
728 extphi =
comp.second.globalPosition().phi();
729 edm::LogVerbatim(
"MtdTracksValidation") <<
"MtdTracksValidation: extrapolation at BTL surface, rho= " << extrho
730 <<
" eta= " << exteta <<
" phi= " << extphi;
732 std::vector<DetLayer::DetWithState> compDets = ilay->compatibleDets(tsos, prop, *theEstimator);
733 for (
const auto& detWithState : compDets) {
734 const auto& det = detWithState.first;
739 <<
"MtdTracksValidation: DetId= " << det->geographicalId().rawId()
740 <<
" gp= " << detWithState.second.globalPosition().x() <<
" " << detWithState.second.globalPosition().y()
741 <<
" " << detWithState.second.globalPosition().z() <<
" rho= " << detWithState.second.globalPosition().perp()
742 <<
" eta= " << detWithState.second.globalPosition().eta()
743 <<
" phi= " << detWithState.second.globalPosition().phi();
745 for (
const auto&
recHit : *btlRecHitsHandle) {
749 if (thedet ==
nullptr)
750 throw cms::Exception(
"MtdTracksValidation") <<
"GeographicalID: " << std::hex << geoId.
rawId() <<
" (" 751 <<
detId.rawId() <<
") is invalid!" <<
std::dec << std::endl;
752 if (geoId == det->geographicalId()) {
758 const auto& global_point = thedet->
toGlobal(local_point);
760 <<
"MtdTracksValidation: Hit id= " <<
detId.rawId() <<
" ene= " <<
recHit.energy()
761 <<
" dr= " <<
reco::deltaR(global_point, detWithState.second.globalPosition());
763 eneSum +=
recHit.energy();
776 <<
"MtdTracksValidation: BTL matched, energy= " << eneSum <<
" #layers= " <<
nlayers;
785 const std::vector<const DetLayer*>& layersETL = layerGeo->
allETLLayers();
786 for (
const DetLayer* ilay : layersETL) {
789 const double diskZ = disk.position().z();
792 std::pair<bool, TrajectoryStateOnSurface>
comp = ilay->compatible(tsos, prop, *theEstimator);
797 extrho =
comp.second.globalPosition().perp();
798 exteta =
comp.second.globalPosition().eta();
799 extphi =
comp.second.globalPosition().phi();
801 edm::LogVerbatim(
"MtdTracksValidation") <<
"MtdTracksValidation: extrapolation at ETL surface, rho= " << extrho
802 <<
" eta= " << exteta <<
" phi= " << extphi;
803 std::vector<DetLayer::DetWithState> compDets = ilay->compatibleDets(tsos, prop, *theEstimator);
804 for (
const auto& detWithState : compDets) {
805 const auto& det = detWithState.first;
810 <<
"MtdTracksValidation: DetId= " << det->geographicalId().rawId()
811 <<
" gp= " << detWithState.second.globalPosition().x() <<
" " << detWithState.second.globalPosition().y()
812 <<
" " << detWithState.second.globalPosition().z() <<
" rho= " << detWithState.second.globalPosition().perp()
813 <<
" eta= " << detWithState.second.globalPosition().eta()
814 <<
" phi= " << detWithState.second.globalPosition().phi();
816 for (
const auto&
recHit : *etlRecHitsHandle) {
820 if (thedet ==
nullptr)
821 throw cms::Exception(
"MtdTracksValidation") <<
"GeographicalID: " << std::hex << geoId.
rawId() <<
" (" 822 <<
detId.rawId() <<
") is invalid!" <<
std::dec << std::endl;
823 if (geoId == det->geographicalId()) {
828 const auto& global_point = thedet->
toGlobal(local_point);
830 <<
"MtdTracksValidation: Hit id= " <<
detId.rawId() <<
" time= " <<
recHit.time()
831 <<
" dr= " <<
reco::deltaR(global_point, detWithState.second.globalPosition());
845 selvar = (
float)hcount;
848 <<
"MtdTracksValidation: ETL matched, counts= " << hcount <<
" #layers= " <<
nlayers;
852 if (!inBTL && !inETL) {
854 <<
"MtdTracksValidation: track not extrapolating to MTD: pt= " <<
track.pt() <<
" eta= " <<
track.eta()
855 <<
" phi= " <<
track.phi() <<
" vz= " <<
track.vz()
869 ibook.
book1D(
"TrackBTLEffPhiTot",
"Track efficiency vs phi (Tot);#phi_{RECO} [rad]", 100, -3.2, 3.2);
873 ibook.
book1D(
"TrackBTLEffPhiMtd",
"Track efficiency vs phi (Mtd);#phi_{RECO} [rad]", 100, -3.2, 3.2);
876 ibook.
book1D(
"TrackBTLPtRes",
"Track pT resolution ;pT_{Gentrack}-pT_{MTDtrack}/pT_{Gentrack} ", 100, -0.1, 0.1);
879 ibook.
book1D(
"TrackETLEffEtaTotZneg",
"Track efficiency vs eta (Tot) (-Z);#eta_{RECO}", 100, -3.2, -1.4);
881 ibook.
book1D(
"TrackETLEffEtaTotZpos",
"Track efficiency vs eta (Tot) (+Z);#eta_{RECO}", 100, 1.4, 3.2);
883 ibook.
book1D(
"TrackETLEffPhiTotZneg",
"Track efficiency vs phi (Tot) (-Z);#phi_{RECO} [rad]", 100, -3.2, 3.2);
885 ibook.
book1D(
"TrackETLEffPhiTotZpos",
"Track efficiency vs phi (Tot) (+Z);#phi_{RECO} [rad]", 100, -3.2, 3.2);
887 ibook.
book1D(
"TrackETLEffPtTotZneg",
"Track efficiency vs pt (Tot) (-Z);pt_{RECO} [GeV]", 50, 0, 10);
889 ibook.
book1D(
"TrackETLEffPtTotZpos",
"Track efficiency vs pt (Tot) (+Z);pt_{RECO} [GeV]", 50, 0, 10);
891 ibook.
book1D(
"TrackETLEffEtaMtdZneg",
"Track efficiency vs eta (Mtd) (-Z);#eta_{RECO}", 100, -3.2, -1.4);
893 ibook.
book1D(
"TrackETLEffEtaMtdZpos",
"Track efficiency vs eta (Mtd) (+Z);#eta_{RECO}", 100, 1.4, 3.2);
895 ibook.
book1D(
"TrackETLEffPhiMtdZneg",
"Track efficiency vs phi (Mtd) (-Z);#phi_{RECO} [rad]", 100, -3.2, 3.2);
897 ibook.
book1D(
"TrackETLEffPhiMtdZpos",
"Track efficiency vs phi (Mtd) (+Z);#phi_{RECO} [rad]", 100, -3.2, 3.2);
899 ibook.
book1D(
"TrackETLEffPtMtdZneg",
"Track efficiency vs pt (Mtd) (-Z);pt_{RECO} [GeV]", 50, 0, 10);
901 ibook.
book1D(
"TrackETLEffPtMtdZpos",
"Track efficiency vs pt (Mtd) (+Z);pt_{RECO} [GeV]", 50, 0, 10);
903 ibook.
book1D(
"TrackETLEffEta2MtdZneg",
"Track efficiency vs eta (Mtd 2 hit) (-Z);#eta_{RECO}", 100, -3.2, -1.4);
905 ibook.
book1D(
"TrackETLEffEta2MtdZpos",
"Track efficiency vs eta (Mtd 2 hit) (+Z);#eta_{RECO}", 100, 1.4, 3.2);
907 "TrackETLEffPhi2MtdZneg",
"Track efficiency vs phi (Mtd 2 hit) (-Z);#phi_{RECO} [rad]", 100, -3.2, 3.2);
909 "TrackETLEffPhi2MtdZpos",
"Track efficiency vs phi (Mtd 2 hit) (+Z);#phi_{RECO} [rad]", 100, -3.2, 3.2);
911 ibook.
book1D(
"TrackETLEffPt2MtdZneg",
"Track efficiency vs pt (Mtd 2 hit) (-Z);pt_{RECO} [GeV]", 50, 0, 10);
913 ibook.
book1D(
"TrackETLEffPt2MtdZpos",
"Track efficiency vs pt (Mtd 2 hit) (+Z);pt_{RECO} [GeV]", 50, 0, 10);
915 ibook.
book1D(
"TrackETLPtRes",
"Track pT resolution;pT_{Gentrack}-pT_{MTDtrack}/pT_{Gentrack} ", 100, -0.1, 0.1);
917 meTracktmtd_ = ibook.
book1D(
"Tracktmtd",
"Track time from TrackExtenderWithMTD;tmtd [ns]", 150, 1, 16);
918 meTrackt0Src_ = ibook.
book1D(
"Trackt0Src",
"Track time from TrackExtenderWithMTD;t0Src [ns]", 100, -1.5, 1.5);
920 ibook.
book1D(
"TrackSigmat0Src",
"Time Error from TrackExtenderWithMTD; #sigma_{t0Src} [ns]", 100, 0, 0.1);
922 meTrackt0Pid_ = ibook.
book1D(
"Trackt0Pid",
"Track t0 as stored in TofPid;t0 [ns]", 100, -1, 1);
926 ibook.
book1D(
"TrackSigmat0SafePID",
"Sigmat0 Safe as stored in TofPid; #sigma_{t0} [ns]", 100, 0, 0.1);
927 meTrackNumHits_ = ibook.
book1D(
"TrackNumHits",
"Number of valid MTD hits per track ; Number of hits", 10, -5, 5);
929 "TrackNumHitsNT",
"Number of valid MTD hits per track no time associated; Number of hits", 10, -5, 5);
930 meTrackMVAQual_ = ibook.
book1D(
"TrackMVAQual",
"Track MVA Quality as stored in Value Map ; MVAQual", 100, 0, 1);
932 "TrackPathLenghtvsEta",
"MTD Track pathlength vs MTD track Eta;|#eta|;Pathlength", 100, 0, 3.2, 100.0, 400.0,
"S");
936 ibook.
book1D(
"MVAMatchedEffPtTot",
"Pt of tracks associated to LV matched to GEN; track pt [GeV] ", 110, 0., 11.);
938 "MVAMatchedEffPtMtd",
"Pt of tracks associated to LV matched to GEN with time; track pt [GeV] ", 110, 0., 11.);
940 meExtraPtMtd_ = ibook.
book1D(
"ExtraPtMtd",
"Pt of tracks extrapolated to hits; track pt [GeV] ", 110, 0., 11.);
942 ibook.
book1D(
"ExtraPtEtl2Mtd",
"Pt of tracks extrapolated to hits, 2 ETL layers; track pt [GeV] ", 110, 0., 11.);
944 meTrackPtTot_ = ibook.
book1D(
"TrackPtTot",
"Pt of tracks ; track pt [GeV] ", 110, 0., 11.);
946 ibook.
book1D(
"MatchedTPEffPtTot",
"Pt of tracks matched to TP; track pt [GeV] ", 110, 0., 11.);
948 ibook.
book1D(
"MatchedTPEffPtMtd",
"Pt of tracks matched to TP with time; track pt [GeV] ", 110, 0., 11.);
950 "MatchedTPEffPtEtl2Mtd",
"Pt of tracks matched to TP with time, 2 ETL hits; track pt [GeV] ", 110, 0., 11.);
953 ibook.
book1D(
"MatchedTPmtdEffPtTot",
"Pt of tracks matched to TP-mtd hit; track pt [GeV] ", 110, 0., 11.);
955 "MatchedTPmtdEffPtMtd",
"Pt of tracks matched to TP-mtd hit with time; track pt [GeV] ", 110, 0., 11.);
959 ibook.
book1D(
"MVAMatchedEffEtaTot",
"Eta of tracks associated to LV matched to GEN; track eta ", 66, 0., 3.3);
961 "MVAMatchedEffEtaMtd",
"Eta of tracks associated to LV matched to GEN with time; track eta ", 66, 0., 3.3);
963 meExtraEtaMtd_ = ibook.
book1D(
"ExtraEtaMtd",
"Eta of tracks extrapolated to hits; track eta ", 66, 0., 3.3);
965 ibook.
book1D(
"ExtraEtaEtl2Mtd",
"Eta of tracks extrapolated to hits, 2 ETL layers; track eta ", 66, 0., 3.3);
969 ibook.
book1D(
"MatchedTPEffEtaTot",
"Eta of tracks matched to TP; track eta ", 66, 0., 3.3);
972 ibook.
book1D(
"MatchedTPEffEtaMtd",
"Eta of tracks matched to TP with time; track eta ", 66, 0., 3.3);
974 "MatchedTPEffEtaEtl2Mtd",
"Eta of tracks matched to TP with time, 2 ETL hits; track eta ", 66, 0., 3.3);
977 ibook.
book1D(
"MatchedTPmtdEffEtaTot",
"Eta of tracks matched to TP-mtd hit; track eta ", 66, 0., 3.3);
979 ibook.
book1D(
"MatchedTPmtdEffEtaMtd",
"Eta of tracks matched to TP-mtd hit with time; track eta ", 66, 0., 3.3);
982 "MVATrackRes",
"t_{rec} - t_{sim} for LV associated tracks; t_{rec} - t_{sim} [ns] ", 120, -0.15, 0.15);
984 ibook.
book1D(
"MVATrackPull",
"Pull for associated tracks; (t_{rec}-t_{sim})/#sigma_{t}", 50, -5., 5.);
986 "MVATrackZposResTot",
"Z_{PCA} - Z_{sim} for associated tracks;Z_{PCA} - Z_{sim} [cm] ", 100, -0.1, 0.1);
989 ibook.
book1D(
"ExtraPhiAtBTL",
"Phi at BTL surface of extrapolated tracks; phi [deg]", 720, -180., 180.);
991 "Phi at BTL surface of extrapolated tracksi matched with BTL hits; phi [deg]",
996 "ExtraBTLeneInCone",
"BTL reconstructed energy in cone arounnd extrapolated track; E [MeV]", 100, 0., 50.);
998 ibook.
book1D(
"ExtraMTDfailExtenderEta",
999 "Eta of tracks extrapolated to MTD with no track extender match to hits; track eta",
1005 ibook.
book1D(
"ExtraMTDfailExtenderPt",
1006 "Pt of tracks extrapolated to MTD with no track extender match to hits; track pt [GeV] ",
1033 ->setComment(
"Association between General and MTD Extended tracks");
1040 desc.add<
double>(
"trackMinimumPt", 0.7);
1041 desc.add<
double>(
"trackMaximumBtlEta", 1.5);
1042 desc.add<
double>(
"trackMinimumEtlEta", 1.6);
1043 desc.add<
double>(
"trackMaximumEtlEta", 3.);
1044 desc.addUntracked<
bool>(
"optionalPlots",
true);
1046 descriptions.
add(
"mtdTracksValid",
desc);
1051 if (
gp.status() != 1) {
1060 if (
tp.status() != 1) {
1063 auto x_pv =
tp.parentVertex()->position().x();
1064 auto y_pv =
tp.parentVertex()->position().y();
1065 auto z_pv =
tp.parentVertex()->position().z();
1067 auto r_pv =
std::sqrt(x_pv * x_pv + y_pv * y_pv);
1076 const double& st0) {
1089 const bool& vtxFake) {
1092 double genPT = genP.momentum().perp();
1106 for (
const auto&
tp :
found->val) {
1107 if (
tp.first->eventId().bunchCrossing() == 0)
MonitorElement * meETLTrackEffEtaTot_[2]
edm::EDGetTokenT< edm::ValueMap< int > > trackAssocToken_
static constexpr double etacutGEN_
Log< level::Info, true > LogVerbatim
MonitorElement * meTrackMatchedTPEffEtaMtd_
MonitorElement * meBTLTrackEffPhiMtd_
int getMTDTopologyMode() const
edm::EDGetTokenT< edm::ValueMap< float > > trackMVAQualToken_
edm::EDGetTokenT< edm::ValueMap< float > > pathLengthToken_
T getParameter(std::string const &) const
MonitorElement * meMVATrackResTot_
MonitorElement * meTrackNumHits_
MonitorElement * meTrackt0Pid_
MonitorElement * meExtraMTDfailExtenderEta_
static constexpr double pTcut_
const std::pair< bool, bool > checkAcceptance(const reco::Track &, const edm::Event &, const edm::EventSetup &, size_t &, float &, float &, float &, float &)
MonitorElement * meETLTrackRPTime_
edm::EDGetTokenT< edm::ValueMap< float > > t0SafePidToken_
edm::EDGetTokenT< edm::ValueMap< float > > t0SrcToken_
static constexpr double rBTL_
edm::ESGetToken< MTDTopology, MTDTopologyRcd > mtdtopoToken_
virtual void setCurrentFolder(std::string const &fullpath)
const std::string folder_
edm::EDGetTokenT< edm::HepMCProduct > HepMCProductToken_
HepPDT::ParticleDataTable ParticleDataTable
MonitorElement * meMVATrackMatchedEffEtaMtd_
const bool mvaRecSel(const reco::TrackBase &, const reco::Vertex &, const double &, const double &)
virtual const Topology & topology() const
edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > builderToken_
constexpr NumType convertRadToDeg(NumType radians)
virtual const PixelTopology & specificTopology() const
static constexpr double etacutREC_
static constexpr double deltaPTcut_
MonitorElement * meBTLTrackPtRes_
edm::EDGetTokenT< std::vector< reco::Vertex > > RecVertexToken_
MonitorElement * meETLTrackEffPtTot_[2]
MonitorElement * meBTLTrackEffEtaMtd_
MonitorElement * meETLTrackEffPhi2Mtd_[2]
edm::EDGetTokenT< edm::ValueMap< float > > tmtdToken_
MonitorElement * meExtraBTLeneInCone_
MonitorElement * meExtraMTDfailExtenderPt_
MonitorElement * meMVATrackMatchedEffPtTot_
MonitorElement * meMVATrackEffPtTot_
MonitorElement * meExtraEtaMtd_
MonitorElement * meMVATrackEffEtaTot_
const float trackMaxEtlEta_
const reco::SimToRecoCollection * s2r_
const float trackMaxBtlEta_
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
const unsigned long int uniqueId(const uint32_t x, const EncodedEventId &y)
LocalPoint pixelToModuleLocalPoint(const LocalPoint &plp, int row, int col) const
MonitorElement * meTrackMatchedTPmtdEffEtaTot_
static constexpr double cluDRradius_
const reco::RecoToSimCollection * r2s_
const edm::Ref< std::vector< TrackingParticle > > * getMatchedTP(const reco::TrackBaseRef &)
const_iterator find(const key_type &k) const
find element with specified reference key
const bool mvaGenSel(const HepMC::GenParticle &, const float &)
Detector identifier base class for the MIP Timing Layer.
const bool mvaTPSel(const TrackingParticle &)
constexpr NumType convertUnitsTo(double desiredUnits, NumType val)
edm::EDGetTokenT< reco::TrackCollection > GenRecTrackToken_
MonitorElement * meETLTrackEffPhiMtd_[2]
const_iterator end() const
last iterator over the map (read only)
double pt() const
track transverse momentum
edm::EDGetTokenT< reco::TrackCollection > RecTrackToken_
MonitorElement * meExtraEtaEtl2Mtd_
MonitorElement * meBTLTrackEffPhiTot_
edm::ESGetToken< MTDDetLayerGeometry, MTDRecoGeometryRecord > mtdlayerToken_
GlobalPoint globalPosition() const
MonitorElement * meTrackMatchedTPmtdEffEtaMtd_
MonitorElement * meTrackMatchedTPEffEtaTot_
float localX(const float mpX) const override
edm::EDGetTokenT< FTLRecHitCollection > etlRecHitsToken_
MonitorElement * meBTLTrackRPTime_
double vz() const
z coordinate of the reference point on track
MonitorElement * meETLTrackEffEta2Mtd_[2]
static constexpr double depositBTLthreshold_
MonitorElement * meETLTrackPtRes_
MonitorElement * meETLTrackEffPt2Mtd_[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())
MonitorElement * meTrackt0SafePid_
MonitorElement * meBTLTrackEffEtaTot_
static constexpr double deltaZcut_
Abs< T >::type abs(const T &t)
bool isETL(const double eta) const
bool isMatched(TrackingRecHit const &hit)
#define DEFINE_FWK_MODULE(type)
int nrows() const override
MonitorElement * meMVATrackMatchedEffEtaTot_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
edm::EDGetTokenT< edm::ValueMap< float > > t0PidToken_
MonitorElement * meTrackMatchedTPEffPtEtl2Mtd_
MonitorElement * meTrackMatchedTPmtdEffPtMtd_
edm::EDGetTokenT< FTLRecHitCollection > btlRecHitsToken_
MonitorElement * meTrackMVAQual_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
MonitorElement * meETLTrackEffPhiTot_[2]
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.
const std::vector< const DetLayer * > & allBTLLayers() const
return the BTL DetLayers (barrel), inside-out
edm::EDGetTokenT< edm::ValueMap< float > > SigmatmtdToken_
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
edm::EDGetTokenT< TrackingParticleCollection > trackingParticleCollectionToken_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
MonitorElement * meTrackNumHitsNT_
Log< level::Info, false > LogInfo
double eta() const
pseudorapidity of momentum vector
const float trackMinEtlEta_
constexpr NumType convertMmToCm(NumType millimeters)
edm::EDGetTokenT< reco::SimToRecoCollection > simToRecoAssociationToken_
MonitorElement * meTrackEtaTot_
static constexpr double etaMatchCut_
static constexpr double zETL_
static constexpr double depositETLthreshold_
MonitorElement * meTrackMatchedTPEffEtaEtl2Mtd_
unsigned long long uint64_t
MonitorElement * meMVATrackPullTot_
MonitorElement * meTrackMatchedTPEffPtMtd_
constexpr uint32_t rawId() const
get the raw id
void analyze(const edm::Event &, const edm::EventSetup &) override
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
edm::EDGetTokenT< CrossingFrame< PSimHit > > etlSimHitsToken_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
MonitorElement * meTrackSigmat0SafePid_
MonitorElement * meETLTrackEffEtaMtd_[2]
const Vector & momentum() const
track momentum vector
MonitorElement * meTrackSigmat0Pid_
edm::EDGetTokenT< CrossingFrame< PSimHit > > btlSimHitsToken_
MonitorElement * meTrackMatchedTPmtdEffPtTot_
MonitorElement * meBTLTrackEffPtMtd_
MonitorElement * meTrackt0Src_
edm::EDGetTokenT< edm::ValueMap< float > > Sigmat0PidToken_
static constexpr double deltaDRcut_
MonitorElement * meTracktmtd_
MonitorElement * meBTLTrackEffPtTot_
MonitorElement * meTrackPathLenghtvsEta_
MonitorElement * meTrackMatchedTPEffPtTot_
Detector identifier class for the Endcap Timing Layer.
const bool mvaGenRecMatch(const HepMC::GenParticle &, const double &, const reco::TrackBase &, const bool &)
Detector identifier class for the Barrel Timing Layer. The crystal count must start from 0...
MonitorElement * meExtraPtMtd_
ESTransientHandle< T > getTransientHandle(const ESGetToken< T, R > &iToken) const
MonitorElement * meExtraPhiAtBTLmatched_
edm::EDGetTokenT< reco::RecoToSimCollection > recoToSimAssociationToken_
Monte Carlo truth information used for tracking validation.
edm::EDGetTokenT< edm::ValueMap< float > > Sigmat0SrcToken_
MonitorElement * meETLTrackEffPtMtd_[2]
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
~MtdTracksValidation() override
MonitorElement * meExtraPtEtl2Mtd_
BTLDetId::CrysLayout crysLayoutFromTopoMode(const int &topoMode)
edm::ESGetToken< MTDGeometry, MTDDigiGeometryRecord > mtdgeoToken_
std::vector< TrackingParticle > TrackingParticleCollection
MonitorElement * meTrackPtTot_
MonitorElement * meMVATrackZposResTot_
Log< level::Warning, false > LogWarning
auto makeValid(const U &iOtherHandleType) noexcept(false)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
MonitorElement * meMVATrackMatchedEffPtMtd_
MonitorElement * meTrackSigmat0Src_
const std::vector< const DetLayer * > & allETLLayers() const
return the ETL DetLayers (endcap), -Z to +Z
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magfieldToken_
edm::EDGetTokenT< edm::ValueMap< float > > Sigmat0SafePidToken_
MtdTracksValidation(const edm::ParameterSet &)
edm::ESGetToken< HepPDT::ParticleDataTable, edm::DefaultRecord > particleTableToken_
MonitorElement * meExtraPhiAtBTL_