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")),
238 optionalPlots_(iConfig.getUntrackedParameter<
bool>(
"optionalPlots")) {
264 mtdgeoToken_ = esConsumes<MTDGeometry, MTDDigiGeometryRecord>();
266 mtdlayerToken_ = esConsumes<MTDDetLayerGeometry, MTDRecoGeometryRecord>();
267 magfieldToken_ = esConsumes<MagneticField, IdealMagneticFieldRecord>();
283 std::unordered_map<uint32_t, MTDHit> m_btlHits;
284 std::unordered_map<uint32_t, MTDHit> m_etlHits;
285 std::unordered_map<uint32_t, std::set<unsigned long int>> m_btlTrkPerCell;
286 std::unordered_map<uint32_t, std::set<unsigned long int>> m_etlTrkPerCell;
287 std::map<TrackingParticleRef, std::vector<uint32_t>> m_tp2detid;
301 const auto& primRecoVtx = *(RecVertexHandle.product()->begin());
306 double zsim =
convertMmToCm((*(
mc->vertices_begin()))->position().z());
307 double tsim = (*(
mc->vertices_begin()))->position().t() * CLHEP::mm / CLHEP::c_light;
313 s2r_ = simToRecoH.product();
316 r2s_ = recoToSimH.product();
322 for (
auto const&
simHit : btlSimHits) {
327 m_btlTrkPerCell[
id.rawId()].insert(thisHId);
328 auto simHitIt = m_btlHits.emplace(
id.
rawId(),
MTDHit()).first;
335 for (
auto const&
simHit : etlSimHits) {
341 m_etlTrkPerCell[
id.rawId()].insert(thisHId);
342 auto simHitIt = m_etlHits.emplace(
id.
rawId(),
MTDHit()).first;
352 for (
auto tp = tpColl.begin();
tp != tpColl.end();
tp++, ++tpindex) {
354 if (
tp->eventId().bunchCrossing() == 0 &&
tp->eventId().event() == 0) {
357 for (
const auto& simTrk :
tp->g4Tracks()) {
358 auto const thisTId =
uniqueId(simTrk.trackId(), simTrk.eventId());
359 for (
auto const& cell : m_btlTrkPerCell) {
363 for (
auto const& simtrack : cell.second) {
364 if (thisTId == simtrack) {
365 m_tp2detid[tpref].emplace_back(cell.first);
370 for (
auto const& cell : m_etlTrkPerCell) {
374 for (
auto const& simtrack : cell.second) {
375 if (thisTId == simtrack) {
376 m_tp2detid[tpref].emplace_back(cell.first);
385 unsigned int index = 0;
388 const bool isGoodVtx =
std::abs(primRecoVtx.z() - zsim) <
deltaZcut_ || primRecoVtx.isFake();
391 for (
const auto& trackGen : *GenRecTrackHandle) {
395 if (trackAssoc[trackref] == -1) {
396 LogInfo(
"mtdTracks") <<
"Extended track not associated";
405 bool twoETLdiscs =
false;
410 if (std::round(SigmatMtd[trackref] - Sigmat0Pid[trackref]) != 0) {
412 <<
"TimeError associated to refitted track is different from TimeError stored in tofPID " 413 "sigmat0 ValueMap: this should not happen";
434 int numMTDBtlvalidhits = 0;
435 for (
const auto hit :
track.recHits()) {
436 if (
hit->isValid() ==
false)
439 if ((
Hit.det() == 6) && (
Hit.subdetId() == 1) && (
Hit.mtdSubDetector() == 1)) {
441 numMTDBtlvalidhits++;
445 if (isBTL && Sigmat0Safe[trackref] < 0.) {
450 if (MTDBtl ==
true) {
474 bool MTDEtlZnegD1 =
false;
475 bool MTDEtlZnegD2 =
false;
476 bool MTDEtlZposD1 =
false;
477 bool MTDEtlZposD2 =
false;
478 int numMTDEtlvalidhits = 0;
479 for (
const auto hit :
track.recHits()) {
480 if (
hit->isValid() ==
false)
483 if ((
Hit.det() == 6) && (
Hit.subdetId() == 1) && (
Hit.mtdSubDetector() == 2)) {
487 if ((ETLHit.
zside() == -1) && (ETLHit.
nDisc() == 1)) {
491 numMTDEtlvalidhits++;
493 if ((ETLHit.
zside() == -1) && (ETLHit.
nDisc() == 2)) {
497 numMTDEtlvalidhits++;
499 if ((ETLHit.
zside() == 1) && (ETLHit.
nDisc() == 1)) {
503 numMTDEtlvalidhits++;
505 if ((ETLHit.
zside() == 1) && (ETLHit.
nDisc() == 2)) {
509 numMTDEtlvalidhits++;
514 if (
isETL && Sigmat0Safe[trackref] < 0.) {
520 twoETLdiscs = (MTDEtlZnegD1 ==
true) && (MTDEtlZnegD2 ==
true);
521 if ((MTDEtlZnegD1 ==
true) || (MTDEtlZnegD2 ==
true)) {
533 twoETLdiscs = (MTDEtlZposD1 ==
true) && (MTDEtlZposD2 ==
true);
534 if ((MTDEtlZposD1 ==
true) || (MTDEtlZposD2 ==
true)) {
554 if (tp_info !=
nullptr &&
mvaTPSel(**tp_info)) {
555 const bool withMTD = (m_tp2detid.find(*tp_info) != m_tp2detid.end());
566 if (isBTL ||
isETL) {
569 if (isBTL || twoETLdiscs) {
577 if (isBTL || twoETLdiscs) {
617 const bool vtxFake = primRecoVtx.isFake();
619 if (
mvaRecSel(trackGen, primRecoVtx, t0Safe[trackref], Sigmat0Safe[trackref])) {
627 double dZ = trackGen.vz() - zsim;
629 double pullT(-9999.);
630 if (Sigmat0Safe[trackref] != -1.) {
631 dT = t0Safe[trackref] - tsim;
632 pullT = dT / Sigmat0Safe[trackref];
634 for (
const auto& genP :
mc->particle_range()) {
647 if (isBTL ||
isETL) {
682 const MTDTopology* topology = topologyHandle.product();
692 auto tTrack = ttrackBuilder->build(
track);
696 std::unique_ptr<MeasurementEstimator> theEstimator =
708 const std::vector<const DetLayer*>& layersBTL = layerGeo->
allBTLLayers();
709 for (
const DetLayer* ilay : layersBTL) {
710 std::pair<bool, TrajectoryStateOnSurface>
comp = ilay->compatible(tsos, prop, *theEstimator);
715 extrho =
comp.second.globalPosition().perp();
716 exteta =
comp.second.globalPosition().eta();
717 extphi =
comp.second.globalPosition().phi();
719 <<
"Extrapolation at BTL surface, rho= " << extrho <<
" eta= " << exteta <<
" phi= " << extphi;
721 std::vector<DetLayer::DetWithState> compDets = ilay->compatibleDets(tsos, prop, *theEstimator);
722 for (
const auto& detWithState : compDets) {
723 const auto& det = detWithState.first;
728 <<
"DetId= " << det->geographicalId().rawId() <<
" gp= " << detWithState.second.globalPosition().x() <<
" " 729 << detWithState.second.globalPosition().y() <<
" " << detWithState.second.globalPosition().z()
730 <<
" rho= " << detWithState.second.globalPosition().perp()
731 <<
" eta= " << detWithState.second.globalPosition().eta()
732 <<
" phi= " << detWithState.second.globalPosition().phi();
734 for (
const auto&
recHit : *btlRecHitsHandle) {
738 if (thedet ==
nullptr)
739 throw cms::Exception(
"MtdTracksValidation") <<
"GeographicalID: " << std::hex << geoId.
rawId() <<
" (" 740 <<
detId.rawId() <<
") is invalid!" <<
std::dec << std::endl;
741 if (geoId == det->geographicalId()) {
747 const auto& global_point = thedet->
toGlobal(local_point);
749 <<
"Hit id= " <<
detId.rawId() <<
" ene= " <<
recHit.energy()
750 <<
" dr= " <<
reco::deltaR(global_point, detWithState.second.globalPosition());
752 eneSum +=
recHit.energy();
773 const std::vector<const DetLayer*>& layersETL = layerGeo->
allETLLayers();
774 for (
const DetLayer* ilay : layersETL) {
777 const double diskZ = disk.position().z();
780 std::pair<bool, TrajectoryStateOnSurface>
comp = ilay->compatible(tsos, prop, *theEstimator);
785 extrho =
comp.second.globalPosition().perp();
786 exteta =
comp.second.globalPosition().eta();
787 extphi =
comp.second.globalPosition().phi();
790 <<
"Extrapolation at ETL surface, rho= " << extrho <<
" eta= " << exteta <<
" phi= " << extphi;
791 std::vector<DetLayer::DetWithState> compDets = ilay->compatibleDets(tsos, prop, *theEstimator);
792 for (
const auto& detWithState : compDets) {
793 const auto& det = detWithState.first;
798 <<
"DetId= " << det->geographicalId().rawId() <<
" gp= " << detWithState.second.globalPosition().x() <<
" " 799 << detWithState.second.globalPosition().y() <<
" " << detWithState.second.globalPosition().z()
800 <<
" rho= " << detWithState.second.globalPosition().perp()
801 <<
" eta= " << detWithState.second.globalPosition().eta()
802 <<
" phi= " << detWithState.second.globalPosition().phi();
804 for (
const auto&
recHit : *etlRecHitsHandle) {
808 if (thedet ==
nullptr)
809 throw cms::Exception(
"MtdTracksValidation") <<
"GeographicalID: " << std::hex << geoId.
rawId() <<
" (" 810 <<
detId.rawId() <<
") is invalid!" <<
std::dec << std::endl;
811 if (geoId == det->geographicalId()) {
816 const auto& global_point = thedet->
toGlobal(local_point);
818 <<
"Hit id= " <<
detId.rawId() <<
" time= " <<
recHit.time()
819 <<
" dr= " <<
reco::deltaR(global_point, detWithState.second.globalPosition());
833 selvar = (
float)hcount;
839 if (!inBTL && !inETL) {
841 <<
"Track not extrapolating to MTD: pt= " <<
track.pt() <<
" eta= " <<
track.eta() <<
" phi= " <<
track.phi()
855 ibook.
book1D(
"TrackBTLEffPhiTot",
"Track efficiency vs phi (Tot);#phi_{RECO} [rad]", 100, -3.2, 3.2);
859 ibook.
book1D(
"TrackBTLEffPhiMtd",
"Track efficiency vs phi (Mtd);#phi_{RECO} [rad]", 100, -3.2, 3.2);
862 ibook.
book1D(
"TrackBTLPtRes",
"Track pT resolution ;pT_{Gentrack}-pT_{MTDtrack}/pT_{Gentrack} ", 100, -0.1, 0.1);
865 ibook.
book1D(
"TrackETLEffEtaTotZneg",
"Track efficiency vs eta (Tot) (-Z);#eta_{RECO}", 100, -3.2, -1.4);
867 ibook.
book1D(
"TrackETLEffEtaTotZpos",
"Track efficiency vs eta (Tot) (+Z);#eta_{RECO}", 100, 1.4, 3.2);
869 ibook.
book1D(
"TrackETLEffPhiTotZneg",
"Track efficiency vs phi (Tot) (-Z);#phi_{RECO} [rad]", 100, -3.2, 3.2);
871 ibook.
book1D(
"TrackETLEffPhiTotZpos",
"Track efficiency vs phi (Tot) (+Z);#phi_{RECO} [rad]", 100, -3.2, 3.2);
873 ibook.
book1D(
"TrackETLEffPtTotZneg",
"Track efficiency vs pt (Tot) (-Z);pt_{RECO} [GeV]", 50, 0, 10);
875 ibook.
book1D(
"TrackETLEffPtTotZpos",
"Track efficiency vs pt (Tot) (+Z);pt_{RECO} [GeV]", 50, 0, 10);
877 ibook.
book1D(
"TrackETLEffEtaMtdZneg",
"Track efficiency vs eta (Mtd) (-Z);#eta_{RECO}", 100, -3.2, -1.4);
879 ibook.
book1D(
"TrackETLEffEtaMtdZpos",
"Track efficiency vs eta (Mtd) (+Z);#eta_{RECO}", 100, 1.4, 3.2);
881 ibook.
book1D(
"TrackETLEffPhiMtdZneg",
"Track efficiency vs phi (Mtd) (-Z);#phi_{RECO} [rad]", 100, -3.2, 3.2);
883 ibook.
book1D(
"TrackETLEffPhiMtdZpos",
"Track efficiency vs phi (Mtd) (+Z);#phi_{RECO} [rad]", 100, -3.2, 3.2);
885 ibook.
book1D(
"TrackETLEffPtMtdZneg",
"Track efficiency vs pt (Mtd) (-Z);pt_{RECO} [GeV]", 50, 0, 10);
887 ibook.
book1D(
"TrackETLEffPtMtdZpos",
"Track efficiency vs pt (Mtd) (+Z);pt_{RECO} [GeV]", 50, 0, 10);
889 ibook.
book1D(
"TrackETLEffEta2MtdZneg",
"Track efficiency vs eta (Mtd 2 hit) (-Z);#eta_{RECO}", 100, -3.2, -1.4);
891 ibook.
book1D(
"TrackETLEffEta2MtdZpos",
"Track efficiency vs eta (Mtd 2 hit) (+Z);#eta_{RECO}", 100, 1.4, 3.2);
893 "TrackETLEffPhi2MtdZneg",
"Track efficiency vs phi (Mtd 2 hit) (-Z);#phi_{RECO} [rad]", 100, -3.2, 3.2);
895 "TrackETLEffPhi2MtdZpos",
"Track efficiency vs phi (Mtd 2 hit) (+Z);#phi_{RECO} [rad]", 100, -3.2, 3.2);
897 ibook.
book1D(
"TrackETLEffPt2MtdZneg",
"Track efficiency vs pt (Mtd 2 hit) (-Z);pt_{RECO} [GeV]", 50, 0, 10);
899 ibook.
book1D(
"TrackETLEffPt2MtdZpos",
"Track efficiency vs pt (Mtd 2 hit) (+Z);pt_{RECO} [GeV]", 50, 0, 10);
901 ibook.
book1D(
"TrackETLPtRes",
"Track pT resolution;pT_{Gentrack}-pT_{MTDtrack}/pT_{Gentrack} ", 100, -0.1, 0.1);
903 meTracktmtd_ = ibook.
book1D(
"Tracktmtd",
"Track time from TrackExtenderWithMTD;tmtd [ns]", 150, 1, 16);
904 meTrackt0Src_ = ibook.
book1D(
"Trackt0Src",
"Track time from TrackExtenderWithMTD;t0Src [ns]", 100, -1.5, 1.5);
906 ibook.
book1D(
"TrackSigmat0Src",
"Time Error from TrackExtenderWithMTD; #sigma_{t0Src} [ns]", 100, 0, 0.1);
908 meTrackt0Pid_ = ibook.
book1D(
"Trackt0Pid",
"Track t0 as stored in TofPid;t0 [ns]", 100, -1, 1);
912 ibook.
book1D(
"TrackSigmat0SafePID",
"Sigmat0 Safe as stored in TofPid; #sigma_{t0} [ns]", 100, 0, 0.1);
913 meTrackNumHits_ = ibook.
book1D(
"TrackNumHits",
"Number of valid MTD hits per track ; Number of hits", 10, -5, 5);
915 "TrackNumHitsNT",
"Number of valid MTD hits per track no time associated; Number of hits", 10, -5, 5);
916 meTrackMVAQual_ = ibook.
book1D(
"TrackMVAQual",
"Track MVA Quality as stored in Value Map ; MVAQual", 100, 0, 1);
918 "TrackPathLenghtvsEta",
"MTD Track pathlength vs MTD track Eta;|#eta|;Pathlength", 100, 0, 3.2, 100.0, 400.0,
"S");
922 ibook.
book1D(
"MVAMatchedEffPtTot",
"Pt of tracks associated to LV matched to GEN; track pt [GeV] ", 110, 0., 11.);
924 "MVAMatchedEffPtMtd",
"Pt of tracks associated to LV matched to GEN with time; track pt [GeV] ", 110, 0., 11.);
927 meExtraPtMtd_ = ibook.
book1D(
"ExtraPtMtd",
"Pt of tracks extrapolated to hits; track pt [GeV] ", 110, 0., 11.);
929 "ExtraPtEtl2Mtd",
"Pt of tracks extrapolated to hits, 2 ETL layers; track pt [GeV] ", 110, 0., 11.);
932 meTrackPtTot_ = ibook.
book1D(
"TrackPtTot",
"Pt of tracks ; track pt [GeV] ", 110, 0., 11.);
934 ibook.
book1D(
"MatchedTPEffPtTot",
"Pt of tracks matched to TP; track pt [GeV] ", 110, 0., 11.);
936 ibook.
book1D(
"MatchedTPEffPtMtd",
"Pt of tracks matched to TP with time; track pt [GeV] ", 110, 0., 11.);
938 "MatchedTPEffPtEtl2Mtd",
"Pt of tracks matched to TP with time, 2 ETL hits; track pt [GeV] ", 110, 0., 11.);
941 ibook.
book1D(
"MatchedTPmtdEffPtTot",
"Pt of tracks matched to TP-mtd hit; track pt [GeV] ", 110, 0., 11.);
943 "MatchedTPmtdEffPtMtd",
"Pt of tracks matched to TP-mtd hit with time; track pt [GeV] ", 110, 0., 11.);
947 ibook.
book1D(
"MVAMatchedEffEtaTot",
"Eta of tracks associated to LV matched to GEN; track eta ", 66, 0., 3.3);
949 "MVAMatchedEffEtaMtd",
"Eta of tracks associated to LV matched to GEN with time; track eta ", 66, 0., 3.3);
952 meExtraEtaMtd_ = ibook.
book1D(
"ExtraEtaMtd",
"Eta of tracks extrapolated to hits; track eta ", 66, 0., 3.3);
954 ibook.
book1D(
"ExtraEtaEtl2Mtd",
"Eta of tracks extrapolated to hits, 2 ETL layers; track eta ", 66, 0., 3.3);
959 ibook.
book1D(
"MatchedTPEffEtaTot",
"Eta of tracks matched to TP; track eta ", 66, 0., 3.3);
962 ibook.
book1D(
"MatchedTPEffEtaMtd",
"Eta of tracks matched to TP with time; track eta ", 66, 0., 3.3);
964 "MatchedTPEffEtaEtl2Mtd",
"Eta of tracks matched to TP with time, 2 ETL hits; track eta ", 66, 0., 3.3);
967 ibook.
book1D(
"MatchedTPmtdEffEtaTot",
"Eta of tracks matched to TP-mtd hit; track eta ", 66, 0., 3.3);
969 ibook.
book1D(
"MatchedTPmtdEffEtaMtd",
"Eta of tracks matched to TP-mtd hit with time; track eta ", 66, 0., 3.3);
972 "MVATrackRes",
"t_{rec} - t_{sim} for LV associated tracks; t_{rec} - t_{sim} [ns] ", 120, -0.15, 0.15);
974 ibook.
book1D(
"MVATrackPull",
"Pull for associated tracks; (t_{rec}-t_{sim})/#sigma_{t}", 50, -5., 5.);
976 "MVATrackZposResTot",
"Z_{PCA} - Z_{sim} for associated tracks;Z_{PCA} - Z_{sim} [cm] ", 100, -0.1, 0.1);
980 ibook.
book1D(
"ExtraPhiAtBTL",
"Phi at BTL surface of extrapolated tracks; phi [deg]", 720, -180., 180.);
982 ibook.
book1D(
"ExtraPhiAtBTLmatched",
983 "Phi at BTL surface of extrapolated tracksi matched with BTL hits; phi [deg]",
988 "ExtraBTLeneInCone",
"BTL reconstructed energy in cone arounnd extrapolated track; E [MeV]", 100, 0., 50.);
1013 ->setComment(
"Association between General and MTD Extended tracks");
1020 desc.add<
double>(
"trackMinimumPt", 0.7);
1021 desc.add<
double>(
"trackMaximumBtlEta", 1.5);
1022 desc.add<
double>(
"trackMinimumEtlEta", 1.6);
1023 desc.add<
double>(
"trackMaximumEtlEta", 3.);
1024 desc.addUntracked<
bool>(
"optionalPlots",
true);
1026 descriptions.
add(
"mtdTracksValid",
desc);
1031 if (
gp.status() != 1) {
1040 if (
tp.status() != 1) {
1043 auto x_pv =
tp.parentVertex()->position().x();
1044 auto y_pv =
tp.parentVertex()->position().y();
1045 auto z_pv =
tp.parentVertex()->position().z();
1047 auto r_pv =
std::sqrt(x_pv * x_pv + y_pv * y_pv);
1056 const double& st0) {
1069 const bool& vtxFake) {
1072 double genPT = genP.momentum().perp();
1086 for (
const auto&
tp :
found->val) {
1087 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_
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 * 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_