Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-10-17 22:59:09

0001 #ifndef RecoTracker_MkFitCore_standalone_TTreeValidation_h
0002 #define RecoTracker_MkFitCore_standalone_TTreeValidation_h
0003 
0004 #include "Validation.h"
0005 
0006 #ifndef WITH_ROOT
0007 namespace mkfit {
0008 
0009   class TTreeValidation : public Validation {
0010   public:
0011     TTreeValidation(std::string) {}
0012   };
0013 }  // end namespace mkfit
0014 #else
0015 
0016 #include <unordered_map>
0017 #include <mutex>
0018 #include "TFile.h"
0019 #include "TTree.h"
0020 #include "TROOT.h"
0021 
0022 namespace mkfit {
0023   // FitVal defined in Validation.h
0024   typedef std::map<int, FitVal> FitValLayMap;
0025   typedef std::unordered_map<int, FitValLayMap> TkIDtoFitValLayMapMap;
0026 
0027   class TTreeValidation : public Validation {
0028   public:
0029     TTreeValidation(std::string fileName, const TrackerInfo* trk_info);
0030     ~TTreeValidation() {}
0031 
0032     void initializeEfficiencyTree();
0033     void initializeFakeRateTree();
0034     void initializeConfigTree();
0035     void initializeCMSSWEfficiencyTree();
0036     void initializeCMSSWFakeRateTree();
0037     void initializeFitTree();
0038 
0039     void alignTracks(TrackVec& evt_tracks, TrackExtraVec& evt_extra, bool alignExtra) override;
0040 
0041     void collectFitInfo(const FitVal& tmpfitval, int tkid, int layer) override;
0042 
0043     void resetValidationMaps() override;
0044     void resetFitBranches();
0045 
0046     void setTrackExtras(Event& ev) override;
0047 
0048     void makeSimTkToRecoTksMaps(Event& ev) override;
0049     void mapRefTkToRecoTks(const TrackVec& evt_tracks, TrackExtraVec& evt_extras, TkIDToTkIDVecMap& refTkMap);
0050     void makeSeedTkToRecoTkMaps(Event& ev) override;
0051     void mapSeedTkToRecoTk(const TrackVec& evt_tracks, const TrackExtraVec& evt_extras, TkIDToTkIDMap& seedTkMap);
0052     void makeRecoTkToRecoTkMaps(Event& ev) override;
0053     void makeRecoTkToRecoTkMap(TkIDToTkIDMap& refToPairMap,
0054                                const TrackVec& reftracks,
0055                                const TrackExtraVec& refextras,
0056                                const TrackVec& pairtracks,
0057                                const TrackExtraVec& pairextras);
0058     void makeCMSSWTkToRecoTksMaps(Event& ev) override;
0059     void makeSeedTkToCMSSWTkMap(Event& ev) override;
0060     void makeCMSSWTkToSeedTkMap(Event& ev) override;
0061     void makeRecoTkToSeedTkMapsDumbCMSSW(Event& ev) override;
0062     void makeRecoTkToSeedTkMapDumbCMSSW(const TrackExtraVec& recoextras,
0063                                         const TrackExtraVec& seedextras,
0064                                         TkIDToTkIDMap& recoToSeedMap);
0065 
0066     void setTrackScoresDumbCMSSW(Event&) override;
0067 
0068     void storeSeedAndMCID(Event& ev);
0069     void setupCMSSWMatching(const Event& ev, RedTrackVec& reducedCMSSW, LayIdxIDVecMapMap& cmsswHitIDMap);
0070 
0071     int getLastFoundHit(const int trackMCHitID, const int mcTrackID, const Event& ev);
0072     int getMaskAssignment(const int refID);
0073 
0074     void fillMinHitInfo(const Track& track, std::vector<int>& lyrs, std::vector<int>& idxs);
0075     void fillFullHitInfo(const Event& ev,
0076                          const Track& track,
0077                          std::vector<int>& lyrs,
0078                          std::vector<int>& idxs,
0079                          std::vector<int>& mcTkIDs,
0080                          std::vector<float>& xs,
0081                          std::vector<float>& ys,
0082                          std::vector<float>& zs);
0083 
0084     void fillEfficiencyTree(const Event& ev) override;
0085     void fillFakeRateTree(const Event& ev) override;
0086     void fillConfigTree() override;
0087     void fillCMSSWEfficiencyTree(const Event& ev) override;
0088     void fillCMSSWFakeRateTree(const Event& ev) override;
0089     void fillFitTree(const Event& ev) override;
0090 
0091     void saveTTrees() override;
0092 
0093   private:
0094     std::unique_ptr<TFile> f_;  // output file!
0095 
0096     TkIDtoFitValLayMapMap fitValTkMapMap_;  // map used for fit validation in mplex
0097 
0098     // Sim to Reco Maps
0099     TkIDToTkIDVecMap simToSeedMap_;
0100     TkIDToTkIDVecMap simToBuildMap_;
0101     TkIDToTkIDVecMap simToFitMap_;
0102 
0103     // Reco to Reco Maps
0104     TkIDToTkIDMap seedToBuildMap_;
0105     TkIDToTkIDMap seedToFitMap_;
0106 
0107     // CMSSW to Reco Maps
0108     TkIDToTkIDVecMap cmsswToBuildMap_;
0109     TkIDToTkIDVecMap cmsswToFitMap_;
0110 
0111     // Special map for CMSSW tracks to seed track labels --> NOT used for fake rate!!
0112     TkIDToTkIDMap seedToCmsswMap_;
0113     TkIDToTkIDMap cmsswToSeedMap_;
0114 
0115     // Special map for geting exact CMSSW track that originate build track from seed track through seedIDs
0116     TkIDToTkIDMap buildToCmsswMap_;
0117 
0118     // Special map for associating candidate to fit tracks in CMSSW only
0119     TkIDToTkIDMap buildToFitMap_;
0120     TkIDToTkIDMap fitToBuildMap_;
0121 
0122     // Special map for associating reco tracks to seed tracks for sim_val_for_cmssw
0123     TkIDToTkIDMap candToSeedMapDumbCMSSW_;
0124     TkIDToTkIDMap fitToSeedMapDumbCMSSW_;
0125 
0126     // Efficiency Tree
0127     std::unique_ptr<TTree> efftree_;
0128     int evtID_eff_ = 0, mcID_eff_ = 0;
0129     int mcmask_seed_eff_ = 0, mcmask_build_eff_ = 0, mcmask_fit_eff_ = 0;
0130     int seedID_seed_eff_ = 0, seedID_build_eff_ = 0, seedID_fit_eff_ = 0;
0131     int mcTSmask_seed_eff_ = 0, mcTSmask_build_eff_ = 0, mcTSmask_fit_eff_ = 0;
0132 
0133     // for efficiency and duplicate rate plots
0134     float x_mc_gen_eff_ = 0., y_mc_gen_eff_ = 0., z_mc_gen_eff_ = 0.;
0135     float pt_mc_gen_eff_ = 0., phi_mc_gen_eff_ = 0., eta_mc_gen_eff_ = 0.;
0136     float nLayers_mc_eff_;
0137     int nHits_mc_eff_ = 0, lastlyr_mc_eff_ = 0;
0138 
0139     // for getting last hit positions track ended up on
0140     float xhit_seed_eff_ = 0., xhit_build_eff_ = 0., xhit_fit_eff_ = 0.;
0141     float yhit_seed_eff_ = 0., yhit_build_eff_ = 0., yhit_fit_eff_ = 0.;
0142     float zhit_seed_eff_ = 0., zhit_build_eff_ = 0., zhit_fit_eff_ = 0.;
0143 
0144     // for track resolutions / pulls
0145     float pt_mc_seed_eff_ = 0., pt_mc_build_eff_ = 0., pt_mc_fit_eff_ = 0.;
0146     float pt_seed_eff_ = 0., pt_build_eff_ = 0., pt_fit_eff_ = 0., ept_seed_eff_ = 0., ept_build_eff_ = 0.,
0147           ept_fit_eff_ = 0.;
0148     float phi_mc_seed_eff_ = 0., phi_mc_build_eff_ = 0., phi_mc_fit_eff_ = 0.;
0149     float phi_seed_eff_ = 0., phi_build_eff_ = 0., phi_fit_eff_ = 0., ephi_seed_eff_ = 0., ephi_build_eff_ = 0.,
0150           ephi_fit_eff_ = 0.;
0151     float eta_mc_seed_eff_ = 0., eta_mc_build_eff_ = 0., eta_mc_fit_eff_ = 0.;
0152     float eta_seed_eff_ = 0., eta_build_eff_ = 0., eta_fit_eff_ = 0., eeta_seed_eff_ = 0., eeta_build_eff_ = 0.,
0153           eeta_fit_eff_ = 0.;
0154 
0155     // for hit countings
0156     int nHits_seed_eff_ = 0, nHits_build_eff_ = 0, nHits_fit_eff_ = 0;
0157     float nLayers_seed_eff_ = 0, nLayers_build_eff_ = 0, nLayers_fit_eff_ = 0;
0158     int nHitsMatched_seed_eff_ = 0, nHitsMatched_build_eff_ = 0, nHitsMatched_fit_eff_ = 0;
0159     float fracHitsMatched_seed_eff_ = 0, fracHitsMatched_build_eff_ = 0, fracHitsMatched_fit_eff_ = 0;
0160     int lastlyr_seed_eff_ = 0, lastlyr_build_eff_ = 0, lastlyr_fit_eff_ = 0;
0161 
0162     // swim phi
0163     float dphi_seed_eff_ = 0., dphi_build_eff_ = 0., dphi_fit_eff_ = 0.;
0164 
0165     // quality info of tracks
0166     float hitchi2_seed_eff_ = 0., hitchi2_build_eff_ = 0., hitchi2_fit_eff_ = 0.;
0167     float helixchi2_seed_eff_ = 0., helixchi2_build_eff_ = 0., helixchi2_fit_eff_ = 0.;
0168     int score_seed_eff_ = 0, score_build_eff_ = 0, score_fit_eff_ = 0;
0169 
0170     // for duplicate track matches
0171     int duplmask_seed_eff_ = 0, duplmask_build_eff_ = 0, duplmask_fit_eff_ = 0;
0172     int nTkMatches_seed_eff_ = 0, nTkMatches_build_eff_ = 0, nTkMatches_fit_eff_ = 0;
0173 
0174     //iterations provenance for each match - a bit mask similar to the ones used in the hit masking
0175     ULong64_t itermask_seed_eff_ = 0, itermask_build_eff_ = 0, itermask_fit_eff_ = 0;
0176     ULong64_t iterduplmask_seed_eff_ = 0, iterduplmask_build_eff_ = 0, iterduplmask_fit_eff_ = 0;
0177     ULong64_t algo_seed_eff_ = 0;
0178 
0179     // hit info
0180     std::vector<int> hitlyrs_mc_eff_, hitlyrs_seed_eff_, hitlyrs_build_eff_, hitlyrs_fit_eff_;
0181     std::vector<int> hitidxs_mc_eff_, hitidxs_seed_eff_, hitidxs_build_eff_, hitidxs_fit_eff_;
0182     std::vector<int> hitmcTkIDs_mc_eff_, hitmcTkIDs_seed_eff_, hitmcTkIDs_build_eff_, hitmcTkIDs_fit_eff_;
0183     std::vector<float> hitxs_mc_eff_, hitxs_seed_eff_, hitxs_build_eff_, hitxs_fit_eff_;
0184     std::vector<float> hitys_mc_eff_, hitys_seed_eff_, hitys_build_eff_, hitys_fit_eff_;
0185     std::vector<float> hitzs_mc_eff_, hitzs_seed_eff_, hitzs_build_eff_, hitzs_fit_eff_;
0186 
0187     // Fake Rate tree and variables
0188     std::unique_ptr<TTree> frtree_;
0189     int evtID_FR_ = 0, seedID_FR_ = 0;
0190 
0191     int seedmask_seed_FR_ = 0, seedmask_build_FR_ = 0, seedmask_fit_FR_ = 0;
0192 
0193     // for getting last hit positions track ended up on
0194     float xhit_seed_FR_ = 0., xhit_build_FR_ = 0., xhit_fit_FR_ = 0.;
0195     float yhit_seed_FR_ = 0., yhit_build_FR_ = 0., yhit_fit_FR_ = 0.;
0196     float zhit_seed_FR_ = 0., zhit_build_FR_ = 0., zhit_fit_FR_ = 0.;
0197 
0198     // track state info
0199     float pt_mc_seed_FR_ = 0., pt_mc_build_FR_ = 0., pt_mc_fit_FR_ = 0.;
0200     float pt_seed_FR_ = 0., pt_build_FR_ = 0., pt_fit_FR_ = 0., ept_seed_FR_ = 0., ept_build_FR_ = 0., ept_fit_FR_ = 0.;
0201     float phi_mc_seed_FR_ = 0., phi_mc_build_FR_ = 0., phi_mc_fit_FR_ = 0.;
0202     float phi_seed_FR_ = 0., phi_build_FR_ = 0., phi_fit_FR_ = 0., ephi_seed_FR_ = 0., ephi_build_FR_ = 0.,
0203           ephi_fit_FR_ = 0.;
0204     float eta_mc_seed_FR_ = 0., eta_mc_build_FR_ = 0., eta_mc_fit_FR_ = 0.;
0205     float eta_seed_FR_ = 0., eta_build_FR_ = 0., eta_fit_FR_ = 0., eeta_seed_FR_ = 0., eeta_build_FR_ = 0.,
0206           eeta_fit_FR_ = 0.;
0207 
0208     int nHits_seed_FR_ = 0, nHits_build_FR_ = 0, nHits_fit_FR_ = 0;
0209     float nLayers_seed_FR_ = 0, nLayers_build_FR_ = 0, nLayers_fit_FR_ = 0;
0210     int nHitsMatched_seed_FR_ = 0, nHitsMatched_build_FR_ = 0, nHitsMatched_fit_FR_ = 0;
0211     float fracHitsMatched_seed_FR_ = 0, fracHitsMatched_build_FR_ = 0, fracHitsMatched_fit_FR_ = 0;
0212     int lastlyr_seed_FR_ = 0, lastlyr_build_FR_ = 0, lastlyr_fit_FR_ = 0;
0213     int algorithm_FR_ = 0;
0214 
0215     // swim phi
0216     float dphi_seed_FR_ = 0., dphi_build_FR_ = 0., dphi_fit_FR_ = 0.;
0217 
0218     float hitchi2_seed_FR_ = 0., hitchi2_build_FR_ = 0., hitchi2_fit_FR_ = 0.;
0219     int score_seed_FR_ = 0, score_build_FR_ = 0, score_fit_FR_ = 0;
0220 
0221     int mcID_seed_FR_ = 0, mcID_build_FR_ = 0, mcID_fit_FR_ = 0;
0222     int mcmask_seed_FR_ = 0, mcmask_build_FR_ = 0, mcmask_fit_FR_ = 0;
0223     int mcTSmask_seed_FR_ = 0, mcTSmask_build_FR_ = 0, mcTSmask_fit_FR_ = 0;
0224     int nHits_mc_seed_FR_ = 0, nHits_mc_build_FR_ = 0, nHits_mc_fit_FR_ = 0;
0225     float nLayers_mc_seed_FR_ = 0, nLayers_mc_build_FR_ = 0, nLayers_mc_fit_FR_ = 0;
0226     int lastlyr_mc_seed_FR_ = 0, lastlyr_mc_build_FR_ = 0, lastlyr_mc_fit_FR_ = 0;
0227 
0228     float helixchi2_seed_FR_ = 0., helixchi2_build_FR_ = 0., helixchi2_fit_FR_ = 0.;
0229 
0230     int duplmask_seed_FR_ = 0, duplmask_build_FR_ = 0, duplmask_fit_FR_ = 0;
0231     int iTkMatches_seed_FR_ = 0, iTkMatches_build_FR_ = 0, iTkMatches_fit_FR_ = 0;
0232 
0233     // hit info
0234     std::vector<int> hitlyrs_seed_FR_, hitlyrs_build_FR_, hitlyrs_fit_FR_, hitlyrs_mc_seed_FR_, hitlyrs_mc_build_FR_,
0235         hitlyrs_mc_fit_FR_;
0236     std::vector<int> hitidxs_seed_FR_, hitidxs_build_FR_, hitidxs_fit_FR_, hitidxs_mc_seed_FR_, hitidxs_mc_build_FR_,
0237         hitidxs_mc_fit_FR_;
0238     std::vector<int> hitmcTkIDs_seed_FR_, hitmcTkIDs_build_FR_, hitmcTkIDs_fit_FR_, hitmcTkIDs_mc_seed_FR_,
0239         hitmcTkIDs_mc_build_FR_, hitmcTkIDs_mc_fit_FR_;
0240     std::vector<float> hitxs_seed_FR_, hitxs_build_FR_, hitxs_fit_FR_, hitxs_mc_seed_FR_, hitxs_mc_build_FR_,
0241         hitxs_mc_fit_FR_;
0242     std::vector<float> hitys_seed_FR_, hitys_build_FR_, hitys_fit_FR_, hitys_mc_seed_FR_, hitys_mc_build_FR_,
0243         hitys_mc_fit_FR_;
0244     std::vector<float> hitzs_seed_FR_, hitzs_build_FR_, hitzs_fit_FR_, hitzs_mc_seed_FR_, hitzs_mc_build_FR_,
0245         hitzs_mc_fit_FR_;
0246 
0247     // Configuration tree
0248     std::unique_ptr<TTree> configtree_;
0249     int Ntracks_ = 0, Nevents_ = 0;
0250     float nLayers_ = 0;
0251     int nlayers_per_seed_ = 0, maxCand_ = 0;
0252     float chi2Cut_min_ = 0., nSigma_ = 0., minDPhi_ = 0., maxDPhi_ = 0., minDEta_ = 0., maxDEta_ = 0.;
0253     float beamspotX_ = 0., beamspotY_ = 0., beamspotZ_ = 0.;
0254     float minSimPt_ = 0., maxSimPt_ = 0.;
0255     float hitposerrXY_ = 0., hitposerrZ_ = 0., hitposerrR_ = 0.;
0256     float varXY_ = 0., varZ_ = 0.;
0257     float ptinverr049_ = 0., phierr049_ = 0., thetaerr049_ = 0., ptinverr012_ = 0., phierr012_ = 0., thetaerr012_ = 0.;
0258 
0259     // CMSSW Efficiency tree
0260     std::unique_ptr<TTree> cmsswefftree_;
0261     int evtID_ceff_ = 0, cmsswID_ceff_ = 0, seedID_cmssw_ceff_ = 0;
0262 
0263     float x_cmssw_ceff_ = 0., y_cmssw_ceff_ = 0., z_cmssw_ceff_ = 0.;
0264     float pt_cmssw_ceff_ = 0., phi_cmssw_ceff_ = 0., eta_cmssw_ceff_ = 0.;
0265     float nLayers_cmssw_ceff_ = 0;
0266     int nHits_cmssw_ceff_ = 0, lastlyr_cmssw_ceff_ = 0;
0267 
0268     // build
0269     int seedID_build_ceff_ = 0, mcTrackID_build_ceff_ = 0;
0270     int cmsswmask_build_ceff_ = 0;
0271 
0272     float pt_build_ceff_ = 0., ept_build_ceff_ = 0.;
0273     float phi_build_ceff_ = 0., ephi_build_ceff_ = 0.;
0274     float eta_build_ceff_ = 0., eeta_build_ceff_ = 0.;
0275 
0276     float x_mc_build_ceff_ = 0., y_mc_build_ceff_ = 0., z_mc_build_ceff_ = 0.;
0277     float pt_mc_build_ceff_ = 0., phi_mc_build_ceff_ = 0., eta_mc_build_ceff_ = 0.;
0278 
0279     float nLayers_build_ceff_ = 0;
0280     int nHits_build_ceff_ = 0, nHitsMatched_build_ceff_ = 0, lastlyr_build_ceff_ = 0;
0281     float fracHitsMatched_build_ceff_ = 0;
0282 
0283     float xhit_build_ceff_ = 0., yhit_build_ceff_ = 0., zhit_build_ceff_ = 0.;
0284 
0285     // chi2 of tracks + phi swim
0286     float hitchi2_build_ceff_ = 0., helixchi2_build_ceff_ = 0.;
0287     int score_build_ceff_ = 0;
0288     float dphi_build_ceff_ = 0.;
0289 
0290     int duplmask_build_ceff_ = 0, nTkMatches_build_ceff_ = 0;
0291 
0292     // fit
0293     int seedID_fit_ceff_ = 0, mcTrackID_fit_ceff_ = 0;
0294     int cmsswmask_fit_ceff_ = 0;
0295 
0296     float pt_fit_ceff_ = 0., ept_fit_ceff_ = 0.;
0297     float phi_fit_ceff_ = 0., ephi_fit_ceff_ = 0.;
0298     float eta_fit_ceff_ = 0., eeta_fit_ceff_ = 0.;
0299 
0300     float x_mc_fit_ceff_ = 0., y_mc_fit_ceff_ = 0., z_mc_fit_ceff_ = 0.;
0301     float pt_mc_fit_ceff_ = 0., phi_mc_fit_ceff_ = 0., eta_mc_fit_ceff_ = 0.;
0302 
0303     float nLayers_fit_ceff_ = 0;
0304     int nHits_fit_ceff_ = 0, nHitsMatched_fit_ceff_ = 0, lastlyr_fit_ceff_ = 0;
0305     float fracHitsMatched_fit_ceff_ = 0;
0306 
0307     float xhit_fit_ceff_ = 0., yhit_fit_ceff_ = 0., zhit_fit_ceff_ = 0.;
0308 
0309     // chi2 of tracks + phi swim
0310     float hitchi2_fit_ceff_ = 0., helixchi2_fit_ceff_ = 0.;
0311     int score_fit_ceff_ = 0;
0312     float dphi_fit_ceff_ = 0.;
0313 
0314     int duplmask_fit_ceff_ = 0, nTkMatches_fit_ceff_ = 0;
0315 
0316     ULong64_t itermask_build_ceff_ = 0, itermask_fit_ceff_ = 0;
0317     ULong64_t iterduplmask_build_ceff_ = 0, iterduplmask_fit_ceff_ = 0;
0318     ULong64_t algo_seed_ceff_ = 0;
0319 
0320     // hit info
0321     std::vector<int> hitlyrs_cmssw_ceff_, hitlyrs_build_ceff_, hitlyrs_mc_build_ceff_, hitlyrs_fit_ceff_,
0322         hitlyrs_mc_fit_ceff_;
0323     std::vector<int> hitidxs_cmssw_ceff_, hitidxs_build_ceff_, hitidxs_mc_build_ceff_, hitidxs_fit_ceff_,
0324         hitidxs_mc_fit_ceff_;
0325 
0326     // CMSSW FakeRate tree
0327     std::unique_ptr<TTree> cmsswfrtree_;
0328     int evtID_cFR_ = 0, seedID_cFR_ = 0, mcTrackID_cFR_ = 0;
0329 
0330     //seed algo
0331     int algorithm_cFR_ = 0;
0332 
0333     // build info
0334     int cmsswID_build_cFR_ = 0, cmsswmask_build_cFR_ = 0;
0335 
0336     float pt_build_cFR_ = 0., ept_build_cFR_ = 0.;
0337     float phi_build_cFR_ = 0., ephi_build_cFR_ = 0.;
0338     float eta_build_cFR_ = 0., eeta_build_cFR_ = 0.;
0339 
0340     float x_mc_cFR_ = 0., y_mc_cFR_ = 0., z_mc_cFR_ = 0.;
0341     float pt_mc_cFR_ = 0., phi_mc_cFR_ = 0., eta_mc_cFR_ = 0.;
0342 
0343     float nLayers_build_cFR_ = 0;
0344     int nHits_build_cFR_ = 0, nHitsMatched_build_cFR_ = 0, lastlyr_build_cFR_ = 0;
0345     float fracHitsMatched_build_cFR_ = 0;
0346 
0347     float xhit_build_cFR_ = 0., yhit_build_cFR_ = 0., zhit_build_cFR_ = 0.;
0348 
0349     // chi2 of tracks
0350     float hitchi2_build_cFR_ = 0., helixchi2_build_cFR_ = 0.;
0351     int score_build_cFR_ = 0;
0352     float dphi_build_cFR_ = 0.;
0353 
0354     // for duplicate track matches
0355     int duplmask_build_cFR_ = 0, iTkMatches_build_cFR_ = 0;
0356 
0357     // cmssw info
0358     int seedID_cmssw_build_cFR_ = 0;
0359     float x_cmssw_build_cFR_ = 0., y_cmssw_build_cFR_ = 0., z_cmssw_build_cFR_ = 0.;
0360     float pt_cmssw_build_cFR_ = 0., phi_cmssw_build_cFR_ = 0., eta_cmssw_build_cFR_ = 0.;
0361     float nLayers_cmssw_build_cFR_ = 0;
0362     int nHits_cmssw_build_cFR_ = 0, lastlyr_cmssw_build_cFR_ = 0;
0363 
0364     // fit info
0365     int cmsswID_fit_cFR_ = 0, cmsswmask_fit_cFR_ = 0;
0366 
0367     float pt_fit_cFR_ = 0., ept_fit_cFR_ = 0.;
0368     float phi_fit_cFR_ = 0., ephi_fit_cFR_ = 0.;
0369     float eta_fit_cFR_ = 0., eeta_fit_cFR_ = 0.;
0370 
0371     float nLayers_fit_cFR_ = 0;
0372     int nHits_fit_cFR_ = 0, nHitsMatched_fit_cFR_ = 0, lastlyr_fit_cFR_ = 0;
0373     float fracHitsMatched_fit_cFR_ = 0;
0374 
0375     float xhit_fit_cFR_ = 0., yhit_fit_cFR_ = 0., zhit_fit_cFR_ = 0.;
0376 
0377     // chi2 of tracks
0378     float hitchi2_fit_cFR_ = 0., helixchi2_fit_cFR_ = 0.;
0379     int score_fit_cFR_ = 0;
0380     float dphi_fit_cFR_ = 0.;
0381 
0382     // for duplicate track matches
0383     int duplmask_fit_cFR_ = 0, iTkMatches_fit_cFR_ = 0;
0384 
0385     // cmssw info
0386     int seedID_cmssw_fit_cFR_ = 0;
0387     float x_cmssw_fit_cFR_ = 0., y_cmssw_fit_cFR_ = 0., z_cmssw_fit_cFR_ = 0.;
0388     float pt_cmssw_fit_cFR_ = 0., phi_cmssw_fit_cFR_ = 0., eta_cmssw_fit_cFR_ = 0.;
0389     float nLayers_cmssw_fit_cFR_ = 0;
0390     int nHits_cmssw_fit_cFR_ = 0, lastlyr_cmssw_fit_cFR_ = 0;
0391 
0392     // hit info
0393     std::vector<int> hitlyrs_mc_cFR_, hitlyrs_build_cFR_, hitlyrs_cmssw_build_cFR_, hitlyrs_fit_cFR_,
0394         hitlyrs_cmssw_fit_cFR_;
0395     std::vector<int> hitidxs_mc_cFR_, hitidxs_build_cFR_, hitidxs_cmssw_build_cFR_, hitidxs_fit_cFR_,
0396         hitidxs_cmssw_fit_cFR_;
0397 
0398     // Fit tree (for fine tuning z-phi windows and such --> MPlex Only
0399     std::unique_ptr<TTree> fittree_;
0400     int ntotallayers_fit_ = 0, tkid_fit_ = 0, evtid_fit_ = 0;
0401 
0402     static const int nfvs_ = 24;
0403     std::vector<float> fvs_[nfvs_];
0404 
0405     std::vector<float>&z_prop_fit_ = fvs_[0], &ez_prop_fit_ = fvs_[1];
0406     std::vector<float>&z_hit_fit_ = fvs_[2], &ez_hit_fit_ = fvs_[3], &z_sim_fit_ = fvs_[4], &ez_sim_fit_ = fvs_[5];
0407     std::vector<float>&pphi_prop_fit_ = fvs_[6], &epphi_prop_fit_ = fvs_[7];
0408     std::vector<float>&pphi_hit_fit_ = fvs_[8], &epphi_hit_fit_ = fvs_[9], &pphi_sim_fit_ = fvs_[10],
0409     &epphi_sim_fit_ = fvs_[11];
0410     std::vector<float>&pt_up_fit_ = fvs_[12], &ept_up_fit_ = fvs_[13], &pt_sim_fit_ = fvs_[14],
0411     &ept_sim_fit_ = fvs_[15];
0412     std::vector<float>&mphi_up_fit_ = fvs_[16], &emphi_up_fit_ = fvs_[17], &mphi_sim_fit_ = fvs_[18],
0413     &emphi_sim_fit_ = fvs_[19];
0414     std::vector<float>&meta_up_fit_ = fvs_[20], &emeta_up_fit_ = fvs_[21], &meta_sim_fit_ = fvs_[22],
0415     &emeta_sim_fit_ = fvs_[23];
0416 
0417     std::mutex glock_;
0418   };
0419 }  // end namespace mkfit
0420 #endif
0421 #endif