Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2026-08-31 08:14:23

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef VERTEXCOMPARE_H
0004 #define VERTEXCOMPARE_H
0005 
0006 #include <fun4all/SubsysReco.h>
0007 
0008 #include <fstream>
0009 #include <iomanip>
0010 #include <iostream>
0011 #include <math.h>
0012 #include <string>
0013 
0014 #include <TFile.h>
0015 #include <TTree.h>
0016 #include <TVector3.h>
0017 #include <TMath.h>
0018 #include <TH1.h>
0019 #include <TH2.h>
0020 #include <Math/Util.h>
0021 #include <Math/Vector4D.h>
0022 
0023 class PHCompositeNode;
0024 
0025 class TrkrClusterContainer;
0026 class TrkrClusterHitAssoc;
0027 class TrkrClusterCrossingAssoc;
0028 class ActsGeometry;
0029 class TrackSeedContainer;
0030 class SvtxVertexMap;
0031 class SvtxTrackMap;
0032 class SvtxPHG4ParticleMap;
0033 class PHG4TpcGeomContainer;
0034 class Gl1Packet;
0035 
0036 class CentralityInfo;
0037 
0038 class MbdPmtHit;
0039 class MbdOut;
0040 class MbdPmtContainer;
0041 class MinimumBiasInfo;
0042 
0043 class PHG4TruthInfoContainer;
0044 class PHG4Particle;
0045 class SvtxEvalStack;
0046 class SvtxTruthEval;
0047 class SvtxClusterEval;
0048 class SvtxHitEval;
0049 
0050 using namespace ROOT::Math;
0051 
0052 namespace VertexCompareVerbosity
0053 {
0054     inline int fillSilconSeed = 0;
0055     inline int fillCluster = 0;
0056     inline int fillTruthParticle = 0;
0057 }
0058 
0059 class VertexCompare : public SubsysReco
0060 {
0061   public:
0062     VertexCompare(const std::string &name = "VertexCompare");
0063 
0064     ~VertexCompare() override;
0065 
0066     /** Called during initialization.
0067         Typically this is where you can book histograms, and e.g.
0068         register them to Fun4AllServer (so they can be output to file
0069         using Fun4AllServer::dumpHistos() method).
0070      */
0071     int Init(PHCompositeNode *topNode) override;
0072 
0073     /** Called for first event when run number is known.
0074         Typically this is where you may want to fetch data from
0075         database, because you know the run number. A place
0076         to book histograms which have to know the run number.
0077      */
0078     int InitRun(PHCompositeNode *topNode) override;
0079 
0080     /** Called for each event.
0081         This is where you do the real work.
0082      */
0083     int process_event(PHCompositeNode *topNode) override;
0084 
0085     /// Clean up internals after each event.
0086     int ResetEvent(PHCompositeNode *topNode) override;
0087 
0088     /// Called at the end of each run.
0089     int EndRun(const int runnumber) override;
0090 
0091     /// Called at the end of all processing.
0092     int End(PHCompositeNode *topNode) override;
0093 
0094     /// Reset
0095     int Reset(PHCompositeNode * /*topNode*/) override;
0096 
0097     void Print(const std::string &what = "ALL") const override;
0098 
0099     void setOutputName(std::string name) { outFileName = name; };
0100 
0101     // set the flag for simulation
0102     void IsSimulation() { isSimulation = true; };
0103 
0104     // a setter for simulation for truth matching
0105     void doTruthMatching() { doTruthMatching_ = true; };
0106     void doTrackOutput() { writeTrackBranches_ = true; };
0107     void doTpcSeedOutput() { writeTpcSeedBranches_ = true; };
0108     void doTruthOnlyOutput() { truthOnlyOutput_ = true; IsSimulation(); };
0109     void SaveClustersOnTrack(bool saveClustersOnTrack) { _saveClustersOnTrack = saveClustersOnTrack; };
0110 
0111   private:
0112     void FillTrackTree();
0113     void FillSiliconSeedTree();
0114     void FillTpcSeedTree();
0115     void FillClusterTree();
0116     void FillTruthParticleTree();
0117     void Cleanup();
0118 
0119     // flag for simulation
0120     bool isSimulation = false;
0121     bool doTruthMatching_ = false;
0122     bool writeTrackBranches_ = false;
0123     bool writeTpcSeedBranches_ = false;
0124     bool truthOnlyOutput_ = false;
0125     bool _saveClustersOnTrack = false;
0126 
0127     TFile *outFile = nullptr;
0128     TTree *outTree = nullptr;
0129     std::string outFileName = "outputVTX.root";
0130 
0131     std::string clusterContainerName = "TRKR_CLUSTER";
0132     std::string clusterHitAssocName = "TRKR_CLUSTERHITASSOC";
0133     std::string geometryNodeName = "ActsGeometry";
0134     std::string svtxvertexmapName = "SvtxVertexMap";
0135     std::string svtxTrackMapName = "SvtxTrackMap";
0136     std::string seedContainerName = "SiliconTrackSeedContainer";
0137     std::string tpcSeedContainerName = "TpcTrackSeedContainer";
0138     std::string svtxPHG4ParticleMapName = "SvtxPHG4ParticleMap";
0139     std::string gl1NodeName = "GL1RAWHIT";
0140     std::string mbdOutNodeName = "MbdOut";
0141 
0142     TrkrClusterContainer *clustermap = nullptr;
0143     TrkrClusterHitAssoc *clusterhitassoc = nullptr;
0144     TrkrClusterCrossingAssoc *clustercrossingassoc = nullptr;
0145     ActsGeometry *geometry = nullptr;
0146     PHG4TpcGeomContainer *tpcgeom = nullptr;
0147     TrackSeedContainer *silseedmap = nullptr;
0148     TrackSeedContainer *tpcseedmap = nullptr;
0149     SvtxTrackMap *svtxTrackMap = nullptr;
0150     SvtxPHG4ParticleMap *svtxPHG4ParticleMap = nullptr;
0151     Gl1Packet *gl1PacketInfo = nullptr;
0152     MbdOut *m_mbdout = nullptr;
0153     MbdPmtContainer *m_mbdpmtcontainer = nullptr;
0154     MinimumBiasInfo *minimumbiasinfo = nullptr;
0155     CentralityInfo *m_CentInfo = nullptr;
0156 
0157     // for truth information
0158     PHG4TruthInfoContainer *m_truth_info = nullptr;
0159     SvtxEvalStack *svtx_evalstack = nullptr;
0160     SvtxTruthEval *truth_eval = nullptr;
0161     SvtxClusterEval *clustereval = nullptr;
0162     SvtxHitEval *hiteval = nullptr;
0163 
0164     // float mbdVertex{std::numeric_limits<float>::quiet_NaN()};
0165     std::vector<float> mbdVertex = std::vector<float>();
0166     std::vector<int> mbdVertexId = std::vector<int>();
0167     std::vector<short int> mbdVertexCrossing = std::vector<short int>();
0168     float MBD_charge_sum{std::numeric_limits<float>::quiet_NaN()};
0169     short int mbd_north_npmt = 0;
0170     short int mbd_south_npmt = 0;
0171     float mbd_south_charge_sum = 0;
0172     float mbd_north_charge_sum = 0;
0173     int mbd_nhitsoverths_south = 0;
0174     int mbd_nhitsoverths_north = 0;
0175     // float trackerVertexX{std::numeric_limits<float>::quiet_NaN()};
0176     // float trackerVertexY{std::numeric_limits<float>::quiet_NaN()};
0177     // float trackerVertexZ{std::numeric_limits<float>::quiet_NaN()};
0178     // float trackerVertexChisq{std::numeric_limits<float>::quiet_NaN()};
0179     // int trackerVertexNdof{std::numeric_limits<int>::quiet_NaN()};
0180     int nSvtxVertices{std::numeric_limits<int>::quiet_NaN()};
0181     int nSvtxVertices_validCrossing{std::numeric_limits<int>::quiet_NaN()};
0182     std::vector<int> trackerVertexId = std::vector<int>();
0183     std::vector<float> trackerVertexX = std::vector<float>();
0184     std::vector<float> trackerVertexY = std::vector<float>();
0185     std::vector<float> trackerVertexZ = std::vector<float>();
0186     std::vector<float> trackerVertexChisq = std::vector<float>();
0187     std::vector<int> trackerVertexNdof = std::vector<int>();
0188     std::vector<int> trackerVertexNTracks = std::vector<int>();
0189     std::vector<std::vector<int>> trackerVertexTrackIDs = std::vector<std::vector<int>>();
0190     std::vector<short int> trackerVertexCrossing = std::vector<short int>();
0191 
0192     UInt_t nTracks{std::numeric_limits<unsigned int>::quiet_NaN()};
0193     UInt_t n_MBDVertex{std::numeric_limits<unsigned int>::quiet_NaN()};
0194     UInt_t n_TRKVertex{std::numeric_limits<unsigned int>::quiet_NaN()};
0195 
0196     bool hasMBD{false};
0197     bool hasTRK{false};
0198 
0199     int counter = 1; // initialize to 1 corresponding to event number in Fun4All
0200 
0201     bool is_min_bias = false;
0202     std::vector<int> firedTriggers = std::vector<int>();
0203     uint64_t gl1bco = std::numeric_limits<uint64_t>::quiet_NaN();
0204     uint64_t gl1BunchCrossing = std::numeric_limits<uint64_t>::quiet_NaN();
0205     uint64_t bcotr = std::numeric_limits<uint64_t>::quiet_NaN();
0206     // centrality
0207     float centrality_mbd_;
0208     int ncoll_ = 0;
0209     int npart_ = 0;
0210 
0211     // HepMC generator collision information
0212     int N_HepMCGenEvent = 0;
0213     std::vector<int> HepMCGenEvent_processID = std::vector<int>();
0214     std::vector<int> HepMCGenEvent_embeddingID = std::vector<int>();
0215     std::vector<int> HepMCGenEvent_crossing = std::vector<int>();
0216 
0217     // truth vertex information
0218     int nTruthVertex = 0; // total number of primary truth vertices
0219     // coordinates for primary truth vertices with isEmbededVtx == 0 (dNdEtaINTT-style trigger vertex selection)
0220     std::vector<int> TruthVertex_isEmbeded = std::vector<int>();
0221     std::vector<float> TruthVertexX = std::vector<float>();
0222     std::vector<float> TruthVertexY = std::vector<float>();
0223     std::vector<float> TruthVertexZ = std::vector<float>();
0224     std::vector<float> TruthVertexT = std::vector<float>();
0225     std::vector<int> TruthVertex_crossing = std::vector<int>();
0226 
0227     // full reconstructed track information
0228     int nRecoTracks = 0;
0229     std::vector<float> track_deltapt = std::vector<float>();
0230     std::vector<float> track_deltaeta = std::vector<float>();
0231     std::vector<float> track_deltaphi = std::vector<float>();
0232     std::vector<int> track_nhits = std::vector<int>();
0233     std::vector<int> track_nmaps = std::vector<int>();
0234     std::vector<int> track_nintt = std::vector<int>();
0235     std::vector<int> track_ntpc = std::vector<int>();
0236     std::vector<int> track_nmms = std::vector<int>();
0237     std::vector<int> track_ntpc1 = std::vector<int>();
0238     std::vector<int> track_ntpc11 = std::vector<int>();
0239     std::vector<int> track_ntpc2 = std::vector<int>();
0240     std::vector<int> track_ntpc3 = std::vector<int>();
0241     std::vector<float> track_pidedx = std::vector<float>();
0242     std::vector<float> track_kdedx = std::vector<float>();
0243     std::vector<float> track_prdedx = std::vector<float>();
0244     std::vector<float> track_vx = std::vector<float>();
0245     std::vector<float> track_vy = std::vector<float>();
0246     std::vector<float> track_vz = std::vector<float>();
0247     std::vector<float> track_dca2d = std::vector<float>();
0248     std::vector<float> track_dca2dsigma = std::vector<float>();
0249     std::vector<float> track_dca3dxy = std::vector<float>();
0250     std::vector<float> track_dca3dxysigma = std::vector<float>();
0251     std::vector<float> track_dca3dz = std::vector<float>();
0252     std::vector<float> track_dca3dzsigma = std::vector<float>();
0253     std::vector<float> track_hlxpt = std::vector<float>();
0254     std::vector<float> track_hlxeta = std::vector<float>();
0255     std::vector<float> track_hlxphi = std::vector<float>();
0256     std::vector<float> track_hlxX0 = std::vector<float>();
0257     std::vector<float> track_hlxY0 = std::vector<float>();
0258     std::vector<float> track_hlxZ0 = std::vector<float>();
0259     std::vector<int> track_hlxcharge = std::vector<int>();
0260     std::vector<unsigned int> track_id = std::vector<unsigned int>();
0261     std::vector<float> track_x = std::vector<float>();
0262     std::vector<float> track_y = std::vector<float>();
0263     std::vector<float> track_z = std::vector<float>();
0264     std::vector<float> track_px = std::vector<float>();
0265     std::vector<float> track_py = std::vector<float>();
0266     std::vector<float> track_pz = std::vector<float>();
0267     std::vector<float> track_pt = std::vector<float>();
0268     std::vector<float> track_eta = std::vector<float>();
0269     std::vector<float> track_phi = std::vector<float>();
0270     std::vector<float> track_dedx = std::vector<float>();
0271     std::vector<int> track_charge = std::vector<int>();
0272     std::vector<int> track_crossing = std::vector<int>();
0273     std::vector<int> track_vertex_id = std::vector<int>();
0274     std::vector<float> track_chisq = std::vector<float>();
0275     std::vector<int> track_ndf = std::vector<int>();
0276     std::vector<float> track_quality = std::vector<float>();
0277     std::vector<int> track_silseed_id = std::vector<int>();
0278     std::vector<float> track_silseed_x = std::vector<float>();
0279     std::vector<float> track_silseed_y = std::vector<float>();
0280     std::vector<float> track_silseed_z = std::vector<float>();
0281     std::vector<float> track_silseed_pt = std::vector<float>();
0282     std::vector<float> track_silseed_eta = std::vector<float>();
0283     std::vector<float> track_silseed_phi = std::vector<float>();
0284     std::vector<int> track_silseed_crossing = std::vector<int>();
0285     std::vector<int> track_silseed_charge = std::vector<int>();
0286     std::vector<int> track_silseed_nMvtx = std::vector<int>();
0287     std::vector<int> track_silseed_nIntt = std::vector<int>();
0288     std::vector<std::vector<uint64_t>> track_silseed_clusterKeys = std::vector<std::vector<uint64_t>>();
0289     // branches for clusters on track
0290     std::vector<std::vector<unsigned int>> track_cluster_layer = std::vector<std::vector<unsigned int>>();
0291     std::vector<std::vector<float>> track_cluster_globalX = std::vector<std::vector<float>>();
0292     std::vector<std::vector<float>> track_cluster_globalY = std::vector<std::vector<float>>();
0293     std::vector<std::vector<float>> track_cluster_globalZ = std::vector<std::vector<float>>();
0294     std::vector<std::vector<float>> track_cluster_phi = std::vector<std::vector<float>>();
0295     std::vector<std::vector<float>> track_cluster_eta = std::vector<std::vector<float>>();
0296     std::vector<std::vector<float>> track_cluster_r = std::vector<std::vector<float>>();
0297 
0298     // silicon seed information
0299     int nTotalSilSeeds = 0;
0300     int nSilSeedsValidCrossing = 0;
0301     std::vector<unsigned int> silseed_id = std::vector<unsigned int>();
0302     std::vector<int> silseed_assocVtxId = std::vector<int>();
0303     std::vector<float> silseed_x = std::vector<float>();
0304     std::vector<float> silseed_y = std::vector<float>();
0305     std::vector<float> silseed_z = std::vector<float>();
0306     std::vector<float> silseed_pt = std::vector<float>();
0307     std::vector<float> silseed_eta = std::vector<float>();
0308     std::vector<float> silseed_phi = std::vector<float>();
0309     std::vector<float> silseed_eta_vtx = std::vector<float>(); // with respect to the matched same-crossing vertex
0310     std::vector<float> silseed_phi_vtx = std::vector<float>(); // with respect to the matched same-crossing vertex
0311     std::vector<int> silseed_crossing = std::vector<int>();
0312     std::vector<int> silseed_charge = std::vector<int>();
0313     std::vector<int> silseed_nMvtx = std::vector<int>();
0314     std::vector<int> silseed_nIntt = std::vector<int>();
0315     std::vector<std::vector<uint64_t>> silseed_clusterKeys = std::vector<std::vector<uint64_t>>();
0316     std::vector<std::vector<unsigned int>> silseed_cluster_layer = std::vector<std::vector<unsigned int>>();
0317     std::vector<std::vector<float>> silseed_cluster_globalX = std::vector<std::vector<float>>();
0318     std::vector<std::vector<float>> silseed_cluster_globalY = std::vector<std::vector<float>>();
0319     std::vector<std::vector<float>> silseed_cluster_globalZ = std::vector<std::vector<float>>();
0320     std::vector<std::vector<float>> silseed_cluster_phi = std::vector<std::vector<float>>();
0321     std::vector<std::vector<float>> silseed_cluster_eta = std::vector<std::vector<float>>();
0322     std::vector<std::vector<float>> silseed_cluster_r = std::vector<std::vector<float>>();
0323     std::vector<std::vector<int>> silseed_cluster_phiSize = std::vector<std::vector<int>>();
0324     std::vector<std::vector<int>> silseed_cluster_zSize = std::vector<std::vector<int>>();
0325     std::vector<std::vector<int>> silseed_cluster_strobeID = std::vector<std::vector<int>>();
0326     std::vector<std::vector<int>> silseed_cluster_timeBucketID = std::vector<std::vector<int>>();
0327     // seed cluster truth matching
0328     std::vector<int> silseed_ngmvtx = std::vector<int>();
0329     std::vector<int> silseed_ngintt = std::vector<int>();
0330     std::vector<std::vector<uint64_t>> silseed_cluster_gcluster_key = std::vector<std::vector<uint64_t>>();
0331     std::vector<std::vector<unsigned int>> silseed_cluster_gcluster_layer = std::vector<std::vector<unsigned int>>();
0332     std::vector<std::vector<float>> silseed_cluster_gcluster_X = std::vector<std::vector<float>>();
0333     std::vector<std::vector<float>> silseed_cluster_gcluster_Y = std::vector<std::vector<float>>();
0334     std::vector<std::vector<float>> silseed_cluster_gcluster_Z = std::vector<std::vector<float>>();
0335     std::vector<std::vector<float>> silseed_cluster_gcluster_r = std::vector<std::vector<float>>();
0336     std::vector<std::vector<float>> silseed_cluster_gcluster_phi = std::vector<std::vector<float>>();
0337     std::vector<std::vector<float>> silseed_cluster_gcluster_eta = std::vector<std::vector<float>>();
0338     std::vector<std::vector<float>> silseed_cluster_gcluster_edep = std::vector<std::vector<float>>();
0339     std::vector<std::vector<int>> silseed_cluster_gcluster_adc = std::vector<std::vector<int>>();
0340     std::vector<std::vector<float>> silseed_cluster_gcluster_phiSize = std::vector<std::vector<float>>();
0341     std::vector<std::vector<float>> silseed_cluster_gcluster_zSize = std::vector<std::vector<float>>();
0342     bool hasSvtxPHG4ParticleMap = false;
0343     bool svtxPHG4ParticleMapProcessed = false;
0344     std::vector<int> silseed_f4a_nMatched = std::vector<int>();
0345     std::vector<std::vector<int>> silseed_f4a_truthTrackID = std::vector<std::vector<int>>();
0346     std::vector<std::vector<float>> silseed_f4a_truthWeight = std::vector<std::vector<float>>();
0347     std::vector<int> silseed_f4a_bestTrackID = std::vector<int>();
0348     std::vector<float> silseed_f4a_bestWeight = std::vector<float>();
0349     std::vector<int> silseed_f4a_bestG4P_PID = std::vector<int>();
0350     std::vector<float> silseed_f4a_bestG4P_E = std::vector<float>();
0351     std::vector<float> silseed_f4a_bestG4P_pT = std::vector<float>();
0352     std::vector<float> silseed_f4a_bestG4P_eta = std::vector<float>();
0353     std::vector<float> silseed_f4a_bestG4P_phi = std::vector<float>();
0354     std::vector<std::vector<int>> silseed_f4a_bestG4P_ancestor_trackID = std::vector<std::vector<int>>();
0355     std::vector<std::vector<int>> silseed_f4a_bestG4P_ancestor_PID = std::vector<std::vector<int>>();
0356 
0357     // tpc seed information
0358     int nTotalTpcSeeds = 0;
0359     std::vector<unsigned int> tpcseed_id = std::vector<unsigned int>();
0360     std::vector<float> tpcseed_x = std::vector<float>();
0361     std::vector<float> tpcseed_y = std::vector<float>();
0362     std::vector<float> tpcseed_z = std::vector<float>();
0363     std::vector<float> tpcseed_pt = std::vector<float>();
0364     std::vector<float> tpcseed_eta = std::vector<float>();
0365     std::vector<float> tpcseed_phi = std::vector<float>();
0366     std::vector<int> tpcseed_crossing = std::vector<int>();
0367     std::vector<int> tpcseed_crossing_estimate = std::vector<int>();
0368     std::vector<int> tpcseed_charge = std::vector<int>();
0369     std::vector<int> tpcseed_nTpc = std::vector<int>();
0370     std::vector<int> tpcseed_nMms = std::vector<int>();
0371     std::vector<float> tpcseed_dedx = std::vector<float>();
0372     std::vector<std::vector<uint64_t>> tpcseed_clusterKeys = std::vector<std::vector<uint64_t>>();
0373     std::vector<std::vector<unsigned int>> tpcseed_cluster_layer = std::vector<std::vector<unsigned int>>();
0374     std::vector<std::vector<float>> tpcseed_cluster_globalX = std::vector<std::vector<float>>();
0375     std::vector<std::vector<float>> tpcseed_cluster_globalY = std::vector<std::vector<float>>();
0376     std::vector<std::vector<float>> tpcseed_cluster_globalZ = std::vector<std::vector<float>>();
0377     std::vector<std::vector<float>> tpcseed_cluster_phi = std::vector<std::vector<float>>();
0378     std::vector<std::vector<float>> tpcseed_cluster_eta = std::vector<std::vector<float>>();
0379     std::vector<std::vector<float>> tpcseed_cluster_r = std::vector<std::vector<float>>();
0380 
0381     // (intt) cluster information
0382     std::vector<uint64_t> clusterKey = std::vector<uint64_t>();
0383     std::vector<unsigned int> cluster_layer = std::vector<unsigned int>();
0384     std::vector<int> cluster_chip = std::vector<int>();        // for mvtx chip id
0385     std::vector<int> cluster_stave = std::vector<int>();       // for mvtx stave id
0386     std::vector<int> cluster_ladderZId = std::vector<int>();   // for intt ladder z id
0387     std::vector<int> cluster_ladderPhiId = std::vector<int>(); // for intt ladder phi id
0388     std::vector<float> cluster_globalX = std::vector<float>();
0389     std::vector<float> cluster_globalY = std::vector<float>();
0390     std::vector<float> cluster_globalZ = std::vector<float>();
0391     std::vector<float> cluster_phi = std::vector<float>();
0392     std::vector<float> cluster_eta = std::vector<float>();
0393     std::vector<float> cluster_r = std::vector<float>();
0394     std::vector<int> cluster_phiSize = std::vector<int>();
0395     std::vector<int> cluster_zSize = std::vector<int>();
0396     std::vector<int> cluster_adc = std::vector<int>();
0397     std::vector<int> cluster_timeBucketID = std::vector<int>();
0398     std::vector<int> cluster_crossing = std::vector<int>();
0399     std::vector<float> cluster_LocalX = std::vector<float>();
0400     std::vector<float> cluster_LocalY = std::vector<float>();
0401     // truth matching for (INTT) clusters by max_truth_particle_by_energy()
0402     std::vector<int> cluster_matchedG4P_trackID = std::vector<int>();
0403     std::vector<int> cluster_matchedG4P_PID = std::vector<int>();
0404     std::vector<float> cluster_matchedG4P_E = std::vector<float>();
0405     std::vector<float> cluster_matchedG4P_pT = std::vector<float>();
0406     std::vector<float> cluster_matchedG4P_eta = std::vector<float>();
0407     std::vector<float> cluster_matchedG4P_phi = std::vector<float>();
0408 
0409     // MVTX clusters on seeds (just flattend per event/trigger frame)
0410     std::vector<uint64_t> mvtx_seedcluster_key = std::vector<uint64_t>();
0411     std::vector<unsigned int> mvtx_seedcluster_layer = std::vector<unsigned int>();
0412     std::vector<int> mvtx_seedcluster_chip = std::vector<int>();  // mvtx chip id
0413     std::vector<int> mvtx_seedcluster_stave = std::vector<int>(); // mvtx stave id
0414     std::vector<float> mvtx_seedcluster_globalX = std::vector<float>();
0415     std::vector<float> mvtx_seedcluster_globalY = std::vector<float>();
0416     std::vector<float> mvtx_seedcluster_globalZ = std::vector<float>();
0417     std::vector<float> mvtx_seedcluster_phi = std::vector<float>();
0418     std::vector<float> mvtx_seedcluster_eta = std::vector<float>();
0419     std::vector<float> mvtx_seedcluster_r = std::vector<float>();
0420     std::vector<int> mvtx_seedcluster_phiSize = std::vector<int>();
0421     std::vector<int> mvtx_seedcluster_zSize = std::vector<int>();
0422     std::vector<int> mvtx_seedcluster_strobeID = std::vector<int>();
0423     std::vector<int> mvtx_seedcluster_matchedcrossing = std::vector<int>();
0424     std::vector<std::vector<float>> mvtx_seedcluster_hitX = std::vector<std::vector<float>>();
0425     std::vector<std::vector<float>> mvtx_seedcluster_hitY = std::vector<std::vector<float>>();
0426     std::vector<std::vector<float>> mvtx_seedcluster_hitZ = std::vector<std::vector<float>>();
0427     std::vector<std::vector<int>> mvtx_seedcluster_hitrow = std::vector<std::vector<int>>();
0428     std::vector<std::vector<int>> mvtx_seedcluster_hitcol = std::vector<std::vector<int>>();
0429     // truth info
0430     // PHG4Particle matching: 1) SvtxClusterEval::max_truth_cluster_by_energy, and 2) max_truth_particle_by_cluster_energy
0431     std::vector<int> mvtx_seedcluster_matchedG4P_trackID = std::vector<int>();
0432     std::vector<int> mvtx_seedcluster_matchedG4P_PID = std::vector<int>();
0433     std::vector<float> mvtx_seedcluster_matchedG4P_E = std::vector<float>();
0434     std::vector<float> mvtx_seedcluster_matchedG4P_pT = std::vector<float>();
0435     std::vector<float> mvtx_seedcluster_matchedG4P_eta = std::vector<float>();
0436     std::vector<float> mvtx_seedcluster_matchedG4P_phi = std::vector<float>();
0437     // particle ancestor
0438     std::vector<std::vector<int>> mvtx_seedcluster_matchedG4P_ancestor_trackID = std::vector<std::vector<int>>();
0439     std::vector<std::vector<int>> mvtx_seedcluster_matchedG4P_ancestor_PID = std::vector<std::vector<int>>();
0440 
0441     // Truth particle Tree and branches
0442     int N_PrimaryPHG4Ptcl = 0;
0443     int N_sPHENIXPrimary = 0;
0444     // primary particle
0445     std::vector<float> PrimaryPHG4Ptcl_pT = std::vector<float>();
0446     std::vector<float> PrimaryPHG4Ptcl_eta = std::vector<float>();
0447     std::vector<float> PrimaryPHG4Ptcl_phi = std::vector<float>();
0448     std::vector<float> PrimaryPHG4Ptcl_E = std::vector<float>();
0449     std::vector<int> PrimaryPHG4Ptcl_PID = std::vector<int>();
0450     std::vector<int> PrimaryPHG4Ptcl_trackID = std::vector<int>();
0451     // the original collision ancestor of this truth particle
0452     std::vector<int> PrimaryPHG4Ptcl_originTrackID = std::vector<int>();
0453     std::vector<int> PrimaryPHG4Ptcl_originVtxID = std::vector<int>();
0454     std::vector<float> PrimaryPHG4Ptcl_originVtxT = std::vector<float>();
0455     std::vector<int> PrimaryPHG4Ptcl_originCrossing = std::vector<int>();
0456     std::vector<int> PrimaryPHG4Ptcl_originIsEmbeded = std::vector<int>();
0457     std::vector<bool> PrimaryPHG4Ptcl_truthevalIsPrimary = std::vector<bool>();
0458     std::vector<int> PrimaryPHG4Ptcl_embedID = std::vector<int>();
0459     std::vector<TString> PrimaryPHG4Ptcl_ParticleClass = std::vector<TString>();
0460     std::vector<bool> PrimaryPHG4Ptcl_isStable = std::vector<bool>();
0461     std::vector<double> PrimaryPHG4Ptcl_charge = std::vector<double>();
0462     std::vector<bool> PrimaryPHG4Ptcl_isChargedHadron = std::vector<bool>();
0463     std::vector<std::vector<int>> PrimaryPHG4Ptcl_ancestor_trackID = std::vector<std::vector<int>>();
0464     std::vector<std::vector<int>> PrimaryPHG4Ptcl_ancestor_PID = std::vector<std::vector<int>>();
0465     // sPHENIX primary particle
0466     std::vector<float> sPHENIXPrimary_pT = std::vector<float>();
0467     std::vector<float> sPHENIXPrimary_eta = std::vector<float>();
0468     std::vector<float> sPHENIXPrimary_phi = std::vector<float>();
0469     std::vector<float> sPHENIXPrimary_E = std::vector<float>();
0470     std::vector<int> sPHENIXPrimary_PID = std::vector<int>();
0471     std::vector<int> sPHENIXPrimary_trackID = std::vector<int>();
0472     std::vector<int> sPHENIXPrimary_originTrackID = std::vector<int>();
0473     std::vector<int> sPHENIXPrimary_originVtxID = std::vector<int>();
0474     std::vector<float> sPHENIXPrimary_originVtxT = std::vector<float>();
0475     std::vector<int> sPHENIXPrimary_originCrossing = std::vector<int>();
0476     std::vector<int> sPHENIXPrimary_originIsEmbeded = std::vector<int>();
0477     std::vector<bool> sPHENIXPrimary_truthevalIsPrimary = std::vector<bool>();
0478     std::vector<int> sPHENIXPrimary_embedID = std::vector<int>();
0479     std::vector<TString> sPHENIXPrimary_ParticleClass = std::vector<TString>();
0480     std::vector<bool> sPHENIXPrimary_isStable = std::vector<bool>();
0481     std::vector<double> sPHENIXPrimary_charge = std::vector<double>();
0482     std::vector<bool> sPHENIXPrimary_isChargedHadron = std::vector<bool>();
0483     std::vector<std::vector<int>> sPHENIXPrimary_ancestor_trackID = std::vector<std::vector<int>>();
0484     std::vector<std::vector<int>> sPHENIXPrimary_ancestor_PID = std::vector<std::vector<int>>();
0485     std::vector<std::vector<float>> sPHENIXPrimary_truthcluster_X = std::vector<std::vector<float>>();
0486     std::vector<std::vector<float>> sPHENIXPrimary_truthcluster_Y = std::vector<std::vector<float>>();
0487     std::vector<std::vector<float>> sPHENIXPrimary_truthcluster_Z = std::vector<std::vector<float>>();
0488     std::vector<std::vector<float>> sPHENIXPrimary_truthcluster_edep = std::vector<std::vector<float>>();
0489     std::vector<std::vector<float>> sPHENIXPrimary_truthcluster_adc = std::vector<std::vector<float>>();
0490     std::vector<std::vector<float>> sPHENIXPrimary_truthcluster_r = std::vector<std::vector<float>>();
0491     std::vector<std::vector<float>> sPHENIXPrimary_truthcluster_phi = std::vector<std::vector<float>>();
0492     std::vector<std::vector<float>> sPHENIXPrimary_truthcluster_eta = std::vector<std::vector<float>>();
0493     std::vector<std::vector<float>> sPHENIXPrimary_truthcluster_phisize = std::vector<std::vector<float>>();
0494     std::vector<std::vector<float>> sPHENIXPrimary_truthcluster_zsize = std::vector<std::vector<float>>();
0495     std::vector<std::vector<float>> sPHENIXPrimary_recocluster_globalX = std::vector<std::vector<float>>();
0496     std::vector<std::vector<float>> sPHENIXPrimary_recocluster_globalY = std::vector<std::vector<float>>();
0497     std::vector<std::vector<float>> sPHENIXPrimary_recocluster_globalZ = std::vector<std::vector<float>>();
0498     std::vector<std::vector<float>> sPHENIXPrimary_recocluster_r = std::vector<std::vector<float>>();
0499     std::vector<std::vector<float>> sPHENIXPrimary_recocluster_phi = std::vector<std::vector<float>>();
0500     std::vector<std::vector<float>> sPHENIXPrimary_recocluster_eta = std::vector<std::vector<float>>();
0501     std::vector<std::vector<float>> sPHENIXPrimary_recocluster_phisize = std::vector<std::vector<float>>();
0502     std::vector<std::vector<float>> sPHENIXPrimary_recocluster_zsize = std::vector<std::vector<float>>();
0503     std::vector<std::vector<float>> sPHENIXPrimary_recocluster_adc = std::vector<std::vector<float>>();
0504     // all PHG4Particles 
0505     int N_AllPHG4Ptcl = 0;
0506     std::vector<float> AllPHG4Ptcl_pT = std::vector<float>();
0507     std::vector<float> AllPHG4Ptcl_eta = std::vector<float>();
0508     std::vector<float> AllPHG4Ptcl_phi = std::vector<float>();
0509     std::vector<float> AllPHG4Ptcl_E = std::vector<float>();
0510     std::vector<int> AllPHG4Ptcl_PID = std::vector<int>();
0511     std::vector<int> AllPHG4Ptcl_trackID = std::vector<int>();
0512     std::vector<int> AllPHG4Ptcl_originTrackID = std::vector<int>();
0513     std::vector<int> AllPHG4Ptcl_originVtxID = std::vector<int>();
0514     std::vector<float> AllPHG4Ptcl_originVtxT = std::vector<float>();
0515     std::vector<int> AllPHG4Ptcl_originCrossing = std::vector<int>();
0516     std::vector<int> AllPHG4Ptcl_originIsEmbeded = std::vector<int>();
0517     std::vector<bool> AllPHG4Ptcl_truthevalIsPrimary = std::vector<bool>();
0518     std::vector<int> AllPHG4Ptcl_embedID = std::vector<int>();
0519     std::vector<std::vector<int>> AllPHG4Ptcl_ancestor_trackID = std::vector<std::vector<int>>();
0520     std::vector<std::vector<int>> AllPHG4Ptcl_ancestor_PID = std::vector<std::vector<int>>();
0521     std::vector<std::vector<float>> AllPHG4Ptcl_truthcluster_X = std::vector<std::vector<float>>();
0522     std::vector<std::vector<float>> AllPHG4Ptcl_truthcluster_Y = std::vector<std::vector<float>>();
0523     std::vector<std::vector<float>> AllPHG4Ptcl_truthcluster_Z = std::vector<std::vector<float>>();
0524     std::vector<std::vector<float>> AllPHG4Ptcl_truthcluster_edep = std::vector<std::vector<float>>();
0525     std::vector<std::vector<float>> AllPHG4Ptcl_truthcluster_adc = std::vector<std::vector<float>>();
0526     std::vector<std::vector<float>> AllPHG4Ptcl_truthcluster_r = std::vector<std::vector<float>>();
0527     std::vector<std::vector<float>> AllPHG4Ptcl_truthcluster_phi = std::vector<std::vector<float>>();
0528     std::vector<std::vector<float>> AllPHG4Ptcl_truthcluster_eta = std::vector<std::vector<float>>();
0529     std::vector<std::vector<float>> AllPHG4Ptcl_truthcluster_phisize = std::vector<std::vector<float>>();
0530     std::vector<std::vector<float>> AllPHG4Ptcl_truthcluster_zsize = std::vector<std::vector<float>>();
0531     std::vector<std::vector<float>> AllPHG4Ptcl_recocluster_globalX = std::vector<std::vector<float>>();
0532     std::vector<std::vector<float>> AllPHG4Ptcl_recocluster_globalY = std::vector<std::vector<float>>();
0533     std::vector<std::vector<float>> AllPHG4Ptcl_recocluster_globalZ = std::vector<std::vector<float>>();
0534     std::vector<std::vector<float>> AllPHG4Ptcl_recocluster_r = std::vector<std::vector<float>>();
0535     std::vector<std::vector<float>> AllPHG4Ptcl_recocluster_phi = std::vector<std::vector<float>>();
0536     std::vector<std::vector<float>> AllPHG4Ptcl_recocluster_eta = std::vector<std::vector<float>>();
0537     std::vector<std::vector<float>> AllPHG4Ptcl_recocluster_phisize = std::vector<std::vector<float>>();
0538     std::vector<std::vector<float>> AllPHG4Ptcl_recocluster_zsize = std::vector<std::vector<float>>();
0539     std::vector<std::vector<float>> AllPHG4Ptcl_recocluster_adc = std::vector<std::vector<float>>();
0540     // Truth cluster from PHG4Particle (SvtxTruthEval) and the reco cluster matched to the truth cluster (SvtxClusterEval)
0541     std::vector<std::vector<float>> PrimaryPHG4Ptcl_truthcluster_X = std::vector<std::vector<float>>();
0542     std::vector<std::vector<float>> PrimaryPHG4Ptcl_truthcluster_Y = std::vector<std::vector<float>>();
0543     std::vector<std::vector<float>> PrimaryPHG4Ptcl_truthcluster_Z = std::vector<std::vector<float>>();
0544     std::vector<std::vector<float>> PrimaryPHG4Ptcl_truthcluster_edep = std::vector<std::vector<float>>();
0545     std::vector<std::vector<float>> PrimaryPHG4Ptcl_truthcluster_adc = std::vector<std::vector<float>>();
0546     std::vector<std::vector<float>> PrimaryPHG4Ptcl_truthcluster_r = std::vector<std::vector<float>>();
0547     std::vector<std::vector<float>> PrimaryPHG4Ptcl_truthcluster_phi = std::vector<std::vector<float>>();
0548     std::vector<std::vector<float>> PrimaryPHG4Ptcl_truthcluster_eta = std::vector<std::vector<float>>();
0549     std::vector<std::vector<float>> PrimaryPHG4Ptcl_truthcluster_phisize = std::vector<std::vector<float>>();
0550     std::vector<std::vector<float>> PrimaryPHG4Ptcl_truthcluster_zsize = std::vector<std::vector<float>>();
0551     std::vector<std::vector<float>> PrimaryPHG4Ptcl_recocluster_globalX = std::vector<std::vector<float>>();
0552     std::vector<std::vector<float>> PrimaryPHG4Ptcl_recocluster_globalY = std::vector<std::vector<float>>();
0553     std::vector<std::vector<float>> PrimaryPHG4Ptcl_recocluster_globalZ = std::vector<std::vector<float>>();
0554     std::vector<std::vector<float>> PrimaryPHG4Ptcl_recocluster_r = std::vector<std::vector<float>>();
0555     std::vector<std::vector<float>> PrimaryPHG4Ptcl_recocluster_phi = std::vector<std::vector<float>>();
0556     std::vector<std::vector<float>> PrimaryPHG4Ptcl_recocluster_eta = std::vector<std::vector<float>>();
0557     std::vector<std::vector<float>> PrimaryPHG4Ptcl_recocluster_phisize = std::vector<std::vector<float>>();
0558     std::vector<std::vector<float>> PrimaryPHG4Ptcl_recocluster_zsize = std::vector<std::vector<float>>();
0559     std::vector<std::vector<float>> PrimaryPHG4Ptcl_recocluster_adc = std::vector<std::vector<float>>();
0560 };
0561 
0562 #endif // VERTEXCOMPARE_H