File indexing completed on 2025-08-06 08:18:03
0001 #ifndef TPC_TPCRAWWRITER_H
0002 #define TPC_TPCRAWWRITER_H
0003
0004 #include <fun4all/SubsysReco.h>
0005 #include <trackbase/ActsGeometry.h>
0006 #include <trackbase/ActsSurfaceMaps.h>
0007 #include <trackbase/TrkrCluster.h>
0008
0009 #include <map>
0010 #include <string>
0011 #include <vector>
0012
0013 class PHCompositeNode;
0014 class TrkrHitSet;
0015 class TrkrHitSetContainer;
0016 class RawHitSetContainerv1;
0017 class TrkrClusterContainer;
0018 class TrkrClusterHitAssoc;
0019 class PHG4CylinderCellGeom;
0020 class PHG4TpcCylinderGeomContainer;
0021
0022
0023 class TpcRawWriter : public SubsysReco
0024 {
0025 public:
0026 typedef std::pair<unsigned short, unsigned short> iphiz;
0027 typedef std::pair<unsigned short, iphiz> ihit;
0028
0029 TpcRawWriter(const std::string &name = "TpcRawWriter");
0030 ~TpcRawWriter() override = default;
0031
0032 int InitRun(PHCompositeNode *topNode) override;
0033 int process_event(PHCompositeNode *topNode) override;
0034 int End(PHCompositeNode *topNode) override;
0035
0036 void set_sector_fiducial_cut(const double cut) { SectorFiducialCut = cut; }
0037 void set_do_hit_association(bool do_assoc) { do_hit_assoc = do_assoc; }
0038 void set_do_wedge_emulation(bool do_wedge) { do_wedge_emulation = do_wedge; }
0039 void set_do_sequential(bool do_seq) { do_sequential = do_seq; }
0040 void set_max_cluster_half_size_phi(unsigned short size) { MaxClusterHalfSizePhi = size; }
0041 void set_max_cluster_half_size_z(unsigned short size) { MaxClusterHalfSizeZ = size; }
0042 void set_drift_velocity_scale(double value) { m_drift_velocity_scale = value; }
0043
0044 private:
0045 TrkrHitSetContainer *m_hits = nullptr;
0046 RawHitSetContainerv1 *m_rawhits = nullptr;
0047 TrkrClusterContainer *m_clusterlist = nullptr;
0048 TrkrClusterHitAssoc *m_clusterhitassoc = nullptr;
0049
0050 ActsGeometry *m_tGeometry = nullptr;
0051 bool do_hit_assoc = true;
0052 bool do_wedge_emulation = true;
0053 bool do_sequential = false;
0054 double pedestal = 74.4;
0055 double SectorFiducialCut = 0.5;
0056 unsigned short MaxClusterHalfSizePhi = 3;
0057 unsigned short MaxClusterHalfSizeZ = 5;
0058
0059
0060
0061 double m_drift_velocity_scale = 1.0;
0062
0063
0064
0065
0066
0067 };
0068
0069 #endif