Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:17:55

0001 #ifndef G4EVAL_DSTTRACKINFOWRITER_H
0002 #define G4EVAL_DSTTRACKINFOWRITER_H
0003 
0004 /*!
0005  * \file DSTTrackInfoWriter.h
0006  * \author Alex Patton <aopatton@mit.edu>
0007  *
0008  */
0009 
0010 #include <fun4all/SubsysReco.h>
0011 #include <trackbase/TrkrDefs.h>
0012 #include <trackbase_historic/SvtxTrackInfo_v1.h>
0013 #include <trackbase_historic/SvtxTrack_v4.h>
0014 #include <trackbase_historic/TrackInfoContainer_v1.h>
0015 #include <trackbase_historic/TrackStateInfo_v1.h>
0016 
0017 #include <TClonesArray.h>
0018 #include <TFile.h>
0019 #include <TTree.h>
0020 
0021 #include <map>
0022 #include <set>
0023 #include <string>
0024 #include <vector>
0025 
0026 class PHG4Hit;
0027 class PHG4HitContainer;
0028 class PHG4Particle;
0029 class PHG4TruthInfoContainer;
0030 class SvtxTrack;
0031 class SvtxTrackMap;
0032 // class DSTContainerv3;
0033 // class DSTContainer;
0034 class TrkrCluster;
0035 class TrkrClusterContainer;
0036 class TrkrClusterHitAssoc;
0037 class TrkrHitSetContainer;
0038 class TrkrHitTruthAssoc;
0039 class TrackSeedContainer;
0040 
0041 class DSTTrackInfoWriter : public SubsysReco
0042 {
0043  public:
0044   //! constructor
0045   DSTTrackInfoWriter(const std::string& = "DSTTrackInfoWriter");
0046 
0047   //! global initialization
0048   int InitRun(PHCompositeNode* topNode) override;
0049 
0050   //! event processing
0051   int process_event(PHCompositeNode* topNode) override;
0052 
0053   enum Flags
0054   {
0055     WriteEvent = 1 << 0,
0056     WriteClusters = 1 << 1,
0057     WriteTracks = 1 << 2
0058   };
0059 
0060   //! set flags. Should be a bitwise or of Flags enum
0061   void set_flags(int flags)
0062   {
0063     m_flags = flags;
0064   }
0065 
0066  private:
0067   //! load nodes
0068   int load_nodes(PHCompositeNode*);
0069 
0070   //! evaluate track info
0071   void evaluate_track_info();
0072 
0073   TrackInfoContainer_v1* m_track_info_container = nullptr;
0074 
0075   //! flags
0076   int m_flags = WriteEvent | WriteClusters | WriteTracks;
0077 
0078   //! tracks
0079   SvtxTrackMap* m_track_map = nullptr;
0080 };
0081 
0082 #endif  // G4EVAL_DSTTrackInfoWRITER_H