12 std::lock_guard<std::mutex> locker(
glock_);
13 gROOT->ProcessLine(
"#include <vector>");
22 TDirectory::TContext contextEraser;
23 f_ = std::unique_ptr<TFile>(TFile::Open(
fileName.c_str(),
"recreate"));
43 efftree_ = std::make_unique<TTree>(
"efftree",
"efftree");
202 frtree_ = std::make_unique<TTree>(
"frtree",
"frtree");
375 configtree_ = std::make_unique<TTree>(
"configtree",
"configtree");
416 cmsswefftree_ = std::make_unique<TTree>(
"cmsswefftree",
"cmsswefftree");
535 cmsswfrtree_ = std::make_unique<TTree>(
"cmsswfrtree",
"cmsswfrtree");
654 fittree_ = std::make_unique<TTree>(
"fittree",
"fittree");
692 std::lock_guard<std::mutex> locker(
glock_);
699 for (
int itrack = 0; itrack < (
int)evt_tracks.size(); itrack++) {
700 trackExtra_tmp[itrack] = evt_extras[evt_tracks[itrack].label()];
704 evt_extras = trackExtra_tmp;
708 for (
int itrack = 0; itrack < (
int)evt_tracks.size(); itrack++) {
709 evt_tracks[itrack].setLabel(itrack);
714 std::lock_guard<std::mutex> locker(
glock_);
720 std::lock_guard<std::mutex> locker(
glock_);
754 std::lock_guard<std::mutex> locker(
glock_);
756 const auto& layerhits =
ev.layerHits_;
760 const auto& simtracks =
ev.simTracks_;
761 const auto& seedtracks =
ev.seedTracks_;
762 auto& seedextras =
ev.seedTracksExtra_;
763 const auto& buildtracks =
ev.candidateTracks_;
764 auto& buildextras =
ev.candidateTracksExtra_;
765 const auto& fittracks =
ev.fitTracks_;
766 auto& fitextras =
ev.fitTracksExtra_;
769 for (
int itrack = 0; itrack < (
int)seedtracks.size(); itrack++) {
770 const auto&
track = seedtracks[itrack];
771 auto& extra = seedextras[itrack];
773 extra.findMatchingSeedHits(
track,
track, layerhits);
774 extra.setMCTrackIDInfo(
784 for (
int itrack = 0; itrack < (
int)buildtracks.size(); itrack++) {
785 const auto&
track = buildtracks[itrack];
786 auto& extra = buildextras[itrack];
789 extra.findMatchingSeedHits(
track, seedtracks[
track.label()], layerhits);
798 for (
int itrack = 0; itrack < (
int)fittracks.size(); itrack++) {
799 const auto&
track = fittracks[itrack];
800 auto& extra = fitextras[itrack];
803 extra.findMatchingSeedHits(
track, seedtracks[
track.label()], layerhits);
816 const auto& cmsswtracks =
ev.cmsswTracks_;
817 const auto& cmsswextras =
ev.cmsswTracksExtra_;
818 const auto& seedtracks =
ev.seedTracks_;
819 const auto& buildtracks =
ev.candidateTracks_;
820 auto& buildextras =
ev.candidateTracksExtra_;
821 const auto& fittracks =
ev.fitTracks_;
822 auto& fitextras =
ev.fitTracksExtra_;
830 for (
int itrack = 0; itrack < (
int)buildtracks.size(); itrack++) {
831 const auto&
track = buildtracks[itrack];
832 auto& extra = buildextras[itrack];
835 extra.findMatchingSeedHits(
track,
836 seedtracks[
track.label()],
840 extra.setCMSSWTrackIDInfoByTrkParams(
track, layerhits, cmsswtracks, reducedCMSSW,
true);
842 extra.setCMSSWTrackIDInfoByHits(
track,
850 extra.setCMSSWTrackIDInfoByHits(
track,
857 std::cerr <<
"Specified CMSSW validation, but using an incorrect matching option! Exiting..." << std::endl;
863 for (
int itrack = 0; itrack < (
int)fittracks.size(); itrack++) {
864 const auto&
track = fittracks[itrack];
865 auto& extra = fitextras[itrack];
868 extra.findMatchingSeedHits(
track,
869 seedtracks[
track.label()],
873 extra.setCMSSWTrackIDInfoByTrkParams(
track, layerhits, cmsswtracks, reducedCMSSW,
true);
875 extra.setCMSSWTrackIDInfoByHits(
track,
883 extra.setCMSSWTrackIDInfoByHits(
891 std::cerr <<
"Specified CMSSW validation, but using an incorrect matching option! Exiting..." << std::endl;
899 std::lock_guard<std::mutex> locker(
glock_);
909 for (
auto itrack = 0; itrack < (
int)evt_tracks.size(); ++itrack) {
910 auto&&
track(evt_tracks[itrack]);
911 auto&& extra(evt_extras[itrack]);
913 if (extra.mcTrackID() >= 0)
915 refTkMap[extra.mcTrackID()].push_back(
920 if (extra.cmsswTrackID() >= 0)
922 refTkMap[extra.cmsswTrackID()].push_back(
928 for (
auto&& refTkMatches : refTkMap) {
929 if (refTkMatches.second.size() < 2)
931 auto& extra(evt_extras[refTkMatches.second[0]]);
932 extra.setDuplicateInfo(0,
bool(
false));
941 tmpMatches.emplace_back(evt_tracks[
label]);
945 for (
auto itrack = 0; itrack < (
int)tmpMatches.size();
948 refTkMatches.second[itrack] = tmpMatches[itrack].label();
952 for (
auto&&
label : refTkMatches.second)
954 auto& extra(evt_extras[
label]);
955 extra.setDuplicateInfo(duplicateID,
bool(
true));
963 std::lock_guard<std::mutex> locker(
glock_);
972 for (
auto&&
track : evt_tracks) {
973 seedTkMap[evt_extras[
track.label()].seedID()] =
track.label();
978 std::lock_guard<std::mutex> locker(
glock_);
992 for (
auto&& reftrack : reftracks) {
993 const auto& refextra = refextras[reftrack.label()];
994 for (
auto&& pairtrack : pairtracks) {
995 const auto& pairextra = pairextras[pairtrack.label()];
996 if (refextra.seedID() == pairextra.seedID()) {
997 refToPairMap[reftrack.label()] = pairtrack.label();
1005 std::lock_guard<std::mutex> locker(
glock_);
1012 const auto& seedtracks =
ev.seedTracks_;
1013 const auto& cmsswtracks =
ev.cmsswTracks_;
1014 for (
int itrack = 0; itrack < (
int)seedtracks.size(); itrack++) {
1015 for (
auto&& cmsswtrack : cmsswtracks) {
1016 if (cmsswtrack.label() == itrack) {
1025 const auto& seedtracks =
ev.seedTracks_;
1028 const auto seedlabel =
1031 const auto cmsswlabel = seedToCmsswPair.second;
1033 for (
int itrack = 0; itrack < (
int)seedtracks.size(); itrack++) {
1034 const auto& seedtrack = seedtracks[itrack];
1035 if (seedtrack.label() == seedlabel) {
1044 std::lock_guard<std::mutex> locker(
glock_);
1054 for (
int itrack = 0; itrack < (
int)recoextras.size(); itrack++) {
1055 const auto reco_seedID = recoextras[itrack].seedID();
1056 for (
int jtrack = 0; jtrack < (
int)seedextras.size(); jtrack++) {
1057 const auto seed_seedID = seedextras[jtrack].seedID();
1058 if (reco_seedID == seed_seedID) {
1059 recoToSeedMap[itrack] = jtrack;
1067 auto& seedtracks =
ev.seedTracks_;
1068 auto& candtracks =
ev.candidateTracks_;
1069 auto& fittracks =
ev.fitTracks_;
1073 for (
auto& seedtrack : seedtracks) {
1074 seedtrack.setScore(
getScoreCand(score_calc, seedtrack));
1079 auto& candtrack = candtracks[candToSeedPair.first];
1081 candtrack.setScore(
getScoreCand(score_calc, candtrack));
1084 auto& fittrack = fittracks[fitToSeedPair.first];
1091 const auto& buildtracks =
ev.candidateTracks_;
1092 auto& buildextras =
ev.candidateTracksExtra_;
1094 const auto& fittracks =
ev.fitTracks_;
1095 auto& fitextras =
ev.fitTracksExtra_;
1097 const auto& cmsswtracks =
ev.cmsswTracks_;
1098 auto& cmsswextras =
ev.cmsswTracksExtra_;
1102 for (
int itrack = 0; itrack < (
int)buildtracks.size(); itrack++) {
1103 auto& extra = buildextras[itrack];
1104 const int seedID = extra.seedID();
1106 extra.setmcTrackID(seedID);
1111 for (
int ctrack = 0; ctrack < (
int)cmsswextras.size(); ctrack++) {
1112 if (cmsswextras[ctrack].seedID() == extra.seedID()) {
1119 extra.setseedID(--newlabel);
1124 for (
int itrack = 0; itrack < (
int)fittracks.size(); itrack++) {
1125 auto& extra = fitextras[itrack];
1127 extra.setmcTrackID(buildextras[
fitToBuildMap_[itrack]].mcTrackID());
1136 const auto& layerhits =
ev.layerHits_;
1137 const auto& cmsswtracks =
ev.cmsswTracks_;
1138 auto& cmsswextras =
ev.cmsswTracksExtra_;
1139 const auto& seedtracks =
ev.seedTracks_;
1142 reducedCMSSW.resize(cmsswtracks.size());
1144 for (
int itrack = 0; itrack < (
int)cmsswtracks.size(); itrack++) {
1146 auto& cmsswextra = cmsswextras[itrack];
1147 const auto& cmsswtrack = cmsswtracks[itrack];
1148 const auto& seedtrack = seedtracks[
cmsswToSeedMap_[cmsswtrack.label()]];
1151 cmsswextra.findMatchingSeedHits(cmsswtrack, seedtrack, layerhits);
1154 const auto seedID = cmsswextra.seedID();
1155 const auto&
params = cmsswtrack.parameters();
1159 for (
int ihit = 0; ihit < cmsswtrack.nTotalHits(); ihit++) {
1160 const int lyr = cmsswtrack.getHitLyr(ihit);
1161 const int idx = cmsswtrack.getHitIdx(ihit);
1164 if (cmsswextra.isSeedHit(lyr,
idx))
1167 if (lyr >= 0 &&
idx >= 0) {
1168 tmpmap[lyr].push_back(
idx);
1169 cmsswHitIDMap[lyr][
idx].push_back(cmsswtrack.label());
1174 reducedCMSSW[itrack] =
ReducedTrack(cmsswtrack.label(), seedID, tmpv, cmsswtrack.momPhi(), tmpmap);
1180 if (
ev.simHitsInfo_[trackMCHitID].mcTrackID() == mcTrackID) {
1181 mcHitID = trackMCHitID;
1183 mcHitID =
ev.simTracks_[mcTrackID].getMCHitIDFromLayer(
ev.layerHits_,
ev.simHitsInfo_[trackMCHitID].layer());
1195 }
else if (refID == -10) {
1200 if (refID == -1 || refID == -5 || refID == -8 || refID == -9) {
1202 }
else if (refID == -2) {
1210 if (refID == -1 || refID == -9) {
1258 std::lock_guard<std::mutex> locker(
glock_);
1261 const auto& simtracks =
ev.simTracks_;
1262 const auto& layerhits =
ev.layerHits_;
1263 const auto& simtrackstates =
ev.simTrackStates_;
1270 const auto& simtrack = simtracks[
tkid_fit_];
1271 const auto& fitvalmap = fitvalmapmap.second;
1273 if (fitvalmap.count(ilayer)) {
1274 const auto&
hit = layerhits[ilayer][simtrack.getHitIdx(ilayer)];
1275 const auto& initTS = simtrackstates.at(
hit.mcHitID());
1276 const auto& fitval = fitvalmap.at(ilayer);
1314 std::vector<int>& lyrs,
1315 std::vector<int>& idxs,
1316 std::vector<int>& mcTkIDs,
1317 std::vector<float>& xs,
1318 std::vector<float>& ys,
1319 std::vector<float>& zs) {
1321 const auto& layerHits =
ev.layerHits_;
1322 const auto& simHitsInfo =
ev.simHitsInfo_;
1325 const auto nTotalHits =
track.nTotalHits();
1326 lyrs.resize(nTotalHits);
1327 idxs.resize(nTotalHits);
1328 mcTkIDs.resize(nTotalHits, -99);
1329 xs.resize(nTotalHits, -9999.
f);
1330 ys.resize(nTotalHits, -9999.
f);
1331 zs.resize(nTotalHits, -9999.
f);
1334 for (
auto ihit = 0; ihit < nTotalHits; ihit++) {
1335 const auto lyr =
track.getHitLyr(ihit);
1336 const auto idx =
track.getHitIdx(ihit);
1346 const auto&
hit = layerHits[lyr][
idx];
1347 mcTkIDs[ihit] =
hit.mcTrackID(simHitsInfo);
1355 for (
int ihit = 0; ihit <
track.nTotalHits(); ihit++) {
1356 lyrs.emplace_back(
track.getHitLyr(ihit));
1357 idxs.emplace_back(
track.getHitIdx(ihit));
1362 std::lock_guard<std::mutex> locker(
glock_);
1364 const auto ievt =
ev.evtID();
1365 const auto& evt_sim_tracks =
ev.simTracks_;
1366 const auto& evt_seed_tracks =
ev.seedTracks_;
1367 const auto& evt_seed_extras =
ev.seedTracksExtra_;
1368 const auto& evt_build_tracks =
ev.candidateTracks_;
1369 const auto& evt_build_extras =
ev.candidateTracksExtra_;
1370 const auto& evt_fit_tracks =
ev.fitTracks_;
1371 const auto& evt_fit_extras =
ev.fitTracksExtra_;
1372 const auto& evt_layer_hits =
ev.layerHits_;
1373 const auto& evt_sim_trackstates =
ev.simTrackStates_;
1375 unsigned int count = 0;
1376 for (
const auto& simtrack : evt_sim_tracks) {
1434 for (
auto aa :
ev.simTracksExtra_[
count].seedAlgos()) {
1462 const auto& seedtrack =
1464 const auto& seedextra = evt_seed_extras[seedtrack.label()];
1473 const TrackState& initLayTS = evt_sim_trackstates[mcHitID];
1500 const Hit& lasthit = evt_layer_hits[seedtrack.getLastFoundHitLyr()][seedtrack.getLastFoundHitIdx()];
1589 const auto& buildtrack =
1591 const auto& buildextra =
1592 evt_build_extras[buildtrack.label()];
1601 const TrackState& initLayTS = evt_sim_trackstates[mcHitID];
1628 const Hit& lasthit = evt_layer_hits[buildtrack.getLastFoundHitLyr()][buildtrack.getLastFoundHitIdx()];
1716 const auto& fittrack =
1718 const auto& fitextra = evt_fit_extras[fittrack.label()];
1727 const TrackState& initLayTS = evt_sim_trackstates[mcHitID];
1754 const Hit& lasthit = evt_layer_hits[fittrack.getLastFoundHitLyr()][fittrack.getLastFoundHitIdx()];
1837 std::lock_guard<std::mutex> locker(
glock_);
1839 const auto ievt =
ev.evtID();
1840 const auto& evt_sim_tracks =
1842 const auto& evt_seed_tracks =
ev.seedTracks_;
1843 const auto& evt_seed_extras =
ev.seedTracksExtra_;
1844 const auto& evt_build_tracks =
ev.candidateTracks_;
1845 const auto& evt_build_extras =
ev.candidateTracksExtra_;
1846 const auto& evt_fit_tracks =
ev.fitTracks_;
1847 const auto& evt_fit_extras =
ev.fitTracksExtra_;
1848 const auto& evt_layer_hits =
ev.layerHits_;
1849 const auto& evt_sim_trackstates =
ev.simTrackStates_;
1851 for (
const auto& seedtrack : evt_seed_tracks) {
1899 const auto& seedextra = evt_seed_extras[seedtrack.label()];
1953 const TrackState& initLayTS = evt_sim_trackstates[mcHitID];
2018 const auto& buildextra = evt_build_extras[buildtrack.label()];
2021 const Hit& lasthit = evt_layer_hits[buildtrack.getLastFoundHitLyr()][buildtrack.getLastFoundHitIdx()];
2067 const TrackState& initLayTS = evt_sim_trackstates[mcHitID];
2179 const auto& fitextra = evt_fit_extras[fittrack.label()];
2182 const Hit& lasthit = evt_layer_hits[fittrack.getLastFoundHitLyr()][fittrack.getLastFoundHitIdx()];
2228 const TrackState& initLayTS = evt_sim_trackstates[mcHitID];
2340 std::lock_guard<std::mutex> locker(
glock_);
2380 std::lock_guard<std::mutex> locker(
glock_);
2382 const auto ievt =
ev.evtID();
2383 const auto& evt_sim_tracks =
ev.simTracks_;
2384 const auto& evt_cmssw_tracks =
ev.cmsswTracks_;
2385 const auto& evt_cmssw_extras =
ev.cmsswTracksExtra_;
2386 const auto& evt_build_tracks =
ev.candidateTracks_;
2387 const auto& evt_build_extras =
ev.candidateTracksExtra_;
2388 const auto& evt_fit_tracks =
ev.fitTracks_;
2389 const auto& evt_fit_extras =
ev.fitTracksExtra_;
2390 const auto& evt_layer_hits =
ev.layerHits_;
2392 for (
const auto& cmsswtrack : evt_cmssw_tracks) {
2408 const auto& cmsswextra = evt_cmssw_extras[cmsswtrack.label()];
2433 for (
auto aa : cmsswextra.seedAlgos())
2451 const auto& buildtrack =
2453 const auto& buildextra =
2454 evt_build_extras[buildtrack.label()];
2497 const Hit& lasthit = evt_layer_hits[buildtrack.getLastFoundHitLyr()][buildtrack.getLastFoundHitIdx()];
2569 const auto& fittrack =
2571 const auto& fitextra = evt_fit_extras[fittrack.label()];
2614 const Hit& lasthit = evt_layer_hits[fittrack.getLastFoundHitLyr()][fittrack.getLastFoundHitIdx()];
2679 std::lock_guard<std::mutex> locker(
glock_);
2681 auto ievt =
ev.evtID();
2682 const auto& evt_sim_tracks =
ev.simTracks_;
2683 const auto& evt_cmssw_tracks =
ev.cmsswTracks_;
2684 const auto& evt_cmssw_extras =
ev.cmsswTracksExtra_;
2685 const auto& evt_build_tracks =
ev.candidateTracks_;
2686 const auto& evt_build_extras =
ev.candidateTracksExtra_;
2687 const auto& evt_fit_tracks =
ev.fitTracks_;
2688 const auto& evt_fit_extras =
ev.fitTracksExtra_;
2689 const auto& evt_layer_hits =
ev.layerHits_;
2691 for (
const auto& buildtrack : evt_build_tracks) {
2708 const auto& buildextra = evt_build_extras[buildtrack.label()];
2752 const Hit& lasthit = evt_layer_hits[buildtrack.getLastFoundHitLyr()][buildtrack.getLastFoundHitIdx()];
2775 const auto& cmsswextra = evt_cmssw_extras[cmsswtrack.label()];
2819 const auto& fittrack = evt_fit_tracks[
buildToFitMap_[buildtrack.label()]];
2820 const auto& fitextra = evt_fit_extras[fittrack.label()];
2838 const Hit& lasthit = evt_layer_hits[fittrack.getLastFoundHitLyr()][fittrack.getLastFoundHitIdx()];
2861 const auto& cmsswextra = evt_cmssw_extras[cmsswtrack.label()];
2952 std::lock_guard<std::mutex> locker(
glock_);
std::vector< int > hitlyrs_mc_seed_FR_
std::vector< int > hitidxs_build_ceff_
std::unique_ptr< TFile > f_
std::unique_ptr< TTree > cmsswfrtree_
std::vector< int > hitmcTkIDs_fit_FR_
float getScoreCand(const track_score_func &score_func, const Track &cand1, bool penalizeTailMissHits=false, bool inFindCandidates=false)
TkIDToTkIDMap fitToSeedMapDumbCMSSW_
std::vector< float > & emeta_up_fit_
void setTrackExtras(Event &ev) override
void fillFitTree(const Event &ev) override
int nHitsMatched_build_FR_
std::vector< TrackExtra > TrackExtraVec
int nHits_cmssw_build_cFR_
std::vector< int > hitidxs_mc_build_ceff_
void initializeCMSSWFakeRateTree()
TkIDToTkIDVecMap simToBuildMap_
std::vector< float > hitzs_mc_seed_FR_
std::vector< float > & ez_hit_fit_
float computeHelixChi2(const Vector &simV, const Vector &recoV, const Matrix &recoM, const bool diagOnly=false)
int iTkMatches_build_cFR_
void makeRecoTkToSeedTkMapsDumbCMSSW(Event &ev) override
std::vector< int > hitlyrs_build_cFR_
std::vector< int > hitmcTkIDs_mc_fit_FR_
TkIDToTkIDVecMap simToFitMap_
void makeCMSSWTkToSeedTkMap(Event &ev) override
void fillCMSSWFakeRateTree(const Event &ev) override
void makeSeedTkToCMSSWTkMap(Event &ev) override
int lastlyr_cmssw_build_cFR_
std::vector< int > hitlyrs_fit_FR_
std::vector< float > hitzs_seed_eff_
std::vector< int > hitidxs_fit_cFR_
float hitchi2_build_ceff_
std::vector< int > hitmcTkIDs_mc_seed_FR_
constexpr float hitposerrXY
std::vector< int > hitidxs_cmssw_fit_cFR_
std::vector< int > hitidxs_build_FR_
int getMaskAssignment(const int refID)
int nHitsMatched_fit_ceff_
std::vector< float > hitxs_mc_fit_FR_
int seedID_cmssw_fit_cFR_
std::vector< float > & ez_prop_fit_
TkIDToTkIDMap buildToCmsswMap_
std::vector< float > hitxs_fit_eff_
float eta_cmssw_build_cFR_
ROOT::Math::SVector< float, 2 > SVector2
void setTrackScoresDumbCMSSW(Event &) override
std::vector< float > & mphi_up_fit_
void mapSeedTkToRecoTk(const TrackVec &evt_tracks, const TrackExtraVec &evt_extras, TkIDToTkIDMap &seedTkMap)
float nLayers_cmssw_ceff_
std::vector< int > hitlyrs_mc_cFR_
TkIDToTkIDVecMap cmsswToBuildMap_
std::vector< int > hitlyrs_build_eff_
void saveTTrees() override
std::vector< float > & mphi_sim_fit_
float fracHitsMatched_build_FR_
TkIDToTkIDMap seedToCmsswMap_
int seedID_cmssw_build_cFR_
TkIDToTkIDMap fitToBuildMap_
std::map< int, std::vector< int > > HitLayerMap
void makeRecoTkToSeedTkMapDumbCMSSW(const TrackExtraVec &recoextras, const TrackExtraVec &seedextras, TkIDToTkIDMap &recoToSeedMap)
std::vector< int > hitmcTkIDs_mc_build_FR_
std::vector< int > hitidxs_mc_build_FR_
std::vector< float > & pphi_prop_fit_
std::vector< float > & meta_up_fit_
std::unordered_map< int, std::vector< int > > TkIDToTkIDVecMap
constexpr float phierr012
std::vector< int > hitlyrs_seed_eff_
std::vector< int > hitidxs_fit_ceff_
std::vector< float > & ept_up_fit_
void fillConfigTree() override
float fracHitsMatched_fit_eff_
int cmsswmask_build_ceff_
float fracHitsMatched_build_eff_
constexpr float thetaerr049
std::vector< float > hitys_build_eff_
std::vector< int > hitlyrs_cmssw_build_cFR_
float fracHitsMatched_build_cFR_
ULong64_t itermask_fit_eff_
std::vector< float > & emphi_sim_fit_
std::vector< int > hitlyrs_fit_cFR_
std::vector< int > hitidxs_seed_FR_
int nTkMatches_build_ceff_
TkIDToTkIDMap seedToFitMap_
float phi_cmssw_build_cFR_
int nHitsMatched_fit_eff_
std::vector< int > hitidxs_fit_FR_
matchOpts cmsswMatchingFW
std::vector< float > & pphi_hit_fit_
std::vector< float > & pt_up_fit_
std::vector< float > & pphi_sim_fit_
std::vector< int > hitidxs_mc_eff_
std::vector< int > hitmcTkIDs_mc_eff_
std::unique_ptr< TTree > cmsswefftree_
matchOpts cmsswMatchingBK
void fillFakeRateTree(const Event &ev) override
std::vector< float > hitys_mc_fit_FR_
std::vector< int > hitidxs_mc_cFR_
void setupCMSSWMatching(const Event &ev, RedTrackVec &reducedCMSSW, LayIdxIDVecMapMap &cmsswHitIDMap)
std::vector< int > hitlyrs_build_ceff_
float helixchi2_build_ceff_
float fracHitsMatched_fit_cFR_
std::vector< int > hitlyrs_build_FR_
std::vector< float > hitxs_build_eff_
std::vector< int > hitlyrs_fit_eff_
std::unordered_map< int, int > TkIDToTkIDMap
std::unique_ptr< TTree > fittree_
std::vector< float > & ez_sim_fit_
std::unique_ptr< TTree > efftree_
std::vector< int > hitidxs_mc_fit_FR_
std::vector< int > hitidxs_cmssw_build_cFR_
ULong64_t iterduplmask_build_ceff_
std::vector< ReducedTrack > RedTrackVec
std::vector< float > & z_sim_fit_
int lastlyr_cmssw_fit_cFR_
float pt_cmssw_build_cFR_
float helixchi2_seed_eff_
std::vector< float > hitzs_mc_build_FR_
std::vector< float > & emeta_sim_fit_
std::vector< int > hitmcTkIDs_fit_eff_
bool sortByScoreCand(const Track &cand1, const Track &cand2)
void makeRecoTkToRecoTkMap(TkIDToTkIDMap &refToPairMap, const TrackVec &reftracks, const TrackExtraVec &refextras, const TrackVec &pairtracks, const TrackExtraVec &pairextras)
float nLayers_mc_build_FR_
std::vector< float > hitxs_seed_FR_
constexpr float ptinverr049
constexpr float beamspotX
void fillCMSSWEfficiencyTree(const Event &ev) override
int nHitsMatched_build_eff_
constexpr float hitposerrR
TkIDToTkIDMap candToSeedMapDumbCMSSW_
std::vector< int > hitidxs_cmssw_ceff_
std::vector< float > hitys_mc_eff_
void makeCMSSWTkToRecoTksMaps(Event &ev) override
TkIDtoFitValLayMapMap fitValTkMapMap_
float nLayers_cmssw_build_cFR_
std::vector< int > hitlyrs_cmssw_fit_cFR_
constexpr float hitposerrZ
void initializeConfigTree()
void mapRefTkToRecoTks(const TrackVec &evt_tracks, TrackExtraVec &evt_extras, TkIDToTkIDVecMap &refTkMap)
ULong64_t algo_seed_ceff_
std::vector< float > hitxs_build_FR_
TTreeValidation(std::string fileName, const TrackerInfo *trk_info)
ULong64_t itermask_build_eff_
int nHitsMatched_seed_eff_
std::vector< float > hitzs_seed_FR_
constexpr float thetaerr012
float fracHitsMatched_seed_FR_
int getLastFoundHit(const int trackMCHitID, const int mcTrackID, const Event &ev)
std::vector< int > hitidxs_build_cFR_
std::vector< float > & meta_sim_fit_
ULong64_t iterduplmask_fit_ceff_
std::vector< float > hitxs_fit_FR_
std::vector< float > hitxs_mc_build_FR_
std::vector< float > & epphi_hit_fit_
std::vector< Track > TrackVec
std::vector< float > hitxs_seed_eff_
constexpr float beamspotY
static track_score_func get_track_scorer(const std::string &name)
std::vector< float > hitys_build_FR_
std::vector< float > & emphi_up_fit_
std::vector< float > hitys_seed_FR_
std::vector< float > hitzs_mc_eff_
TkIDToTkIDMap seedToBuildMap_
TkIDToTkIDVecMap simToSeedMap_
float helixchi2_build_eff_
float fracHitsMatched_fit_FR_
std::vector< float > hitzs_build_eff_
void fillEfficiencyTree(const Event &ev) override
int nHitsMatched_build_ceff_
float nLayers_cmssw_fit_cFR_
ULong64_t iterduplmask_seed_eff_
std::vector< int > hitmcTkIDs_seed_FR_
std::vector< float > & ept_sim_fit_
std::vector< float > fvs_[nfvs_]
float helixchi2_build_FR_
float fracHitsMatched_seed_eff_
std::vector< float > hitzs_fit_eff_
std::vector< float > hitzs_build_FR_
std::vector< float > hitzs_mc_fit_FR_
void fillFullHitInfo(const Event &ev, const Track &track, std::vector< int > &lyrs, std::vector< int > &idxs, std::vector< int > &mcTkIDs, std::vector< float > &xs, std::vector< float > &ys, std::vector< float > &zs)
ULong64_t iterduplmask_fit_eff_
ULong64_t itermask_build_ceff_
std::vector< float > hitxs_mc_seed_FR_
void alignTracks(TrackVec &evt_tracks, TrackExtraVec &evt_extra, bool alignExtra) override
std::vector< float > & z_hit_fit_
std::vector< float > & epphi_prop_fit_
ULong64_t itermask_seed_eff_
std::vector< int > hitidxs_build_eff_
float nLayers_build_ceff_
std::vector< float > hitys_mc_build_FR_
float nLayers_mc_seed_FR_
std::vector< int > hitlyrs_mc_eff_
std::vector< int > hitlyrs_mc_fit_FR_
float fracHitsMatched_fit_ceff_
std::vector< int > hitmcTkIDs_build_eff_
constexpr float phierr049
std::vector< float > hitys_fit_eff_
std::vector< float > hitzs_fit_FR_
std::vector< float > hitxs_mc_eff_
void storeSeedAndMCID(Event &ev)
void makeRecoTkToRecoTkMaps(Event &ev) override
std::vector< int > hitlyrs_seed_FR_
std::vector< int > hitlyrs_cmssw_ceff_
int nTkMatches_build_eff_
std::vector< float > hitys_mc_seed_FR_
std::vector< int > hitlyrs_fit_ceff_
int mcTrackID_build_ceff_
void initializeFakeRateTree()
constexpr float beamspotZ
std::vector< int > hitlyrs_mc_fit_ceff_
std::vector< int > hitidxs_mc_fit_ceff_
float helixchi2_build_cFR_
TkIDToTkIDVecMap cmsswToFitMap_
constexpr float ptinverr012
void initializeEfficiencyTree()
std::vector< int > hitmcTkIDs_build_FR_
TkIDToTkIDMap cmsswToSeedMap_
int nHitsMatched_seed_FR_
std::vector< float > hitys_fit_FR_
int nHitsMatched_fit_cFR_
std::map< int, std::map< int, std::vector< int > > > LayIdxIDVecMapMap
std::vector< int > hitmcTkIDs_seed_eff_
std::vector< int > hitlyrs_mc_build_ceff_
std::vector< float > hitys_seed_eff_
void makeSimTkToRecoTksMaps(Event &ev) override
std::unique_ptr< TTree > frtree_
std::vector< int > hitidxs_mc_seed_FR_
std::vector< float > & pt_sim_fit_
std::vector< float > & z_prop_fit_
void makeSeedTkToRecoTkMaps(Event &ev) override
void resetValidationMaps() override
ULong64_t iterduplmask_build_eff_
void initializeCMSSWEfficiencyTree()
void collectFitInfo(const FitVal &tmpfitval, int tkid, int layer) override
TkIDToTkIDMap buildToFitMap_
int nHitsMatched_build_cFR_
std::vector< int > hitidxs_seed_eff_
void fillMinHitInfo(const Track &track, std::vector< int > &lyrs, std::vector< int > &idxs)
std::unique_ptr< TTree > configtree_
std::vector< float > & epphi_sim_fit_
ULong64_t itermask_fit_ceff_
float helixchi2_fit_ceff_
float fracHitsMatched_build_ceff_
std::vector< int > hitidxs_fit_eff_
std::vector< int > hitlyrs_mc_build_FR_