Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-03 08:18:18

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef G4DETECTORS_PHG4FULLPROJSPACALCELLRECO_H
0004 #define G4DETECTORS_PHG4FULLPROJSPACALCELLRECO_H
0005 
0006 #include "LightCollectionModel.h"
0007 
0008 #include <phparameter/PHParameterInterface.h>
0009 
0010 #include <fun4all/SubsysReco.h>
0011 
0012 #include <cmath>
0013 #include <map>
0014 #include <string>
0015 
0016 class LightCollectionModel;
0017 class PHCompositeNode;
0018 class PHG4Cell;
0019 class TH2;
0020 class TH1;
0021 
0022 class PHG4FullProjSpacalCellReco : public SubsysReco, public PHParameterInterface
0023 {
0024  public:
0025   PHG4FullProjSpacalCellReco(const std::string &name = "SPACALCELLRECO");
0026 
0027   ~PHG4FullProjSpacalCellReco() override {}
0028 
0029   //! module initialization
0030   int InitRun(PHCompositeNode *topNode) override;
0031 
0032   //! event processing
0033   int process_event(PHCompositeNode *topNode) override;
0034 
0035   //! reset after event processing
0036   int ResetEvent(PHCompositeNode *topNode) override;
0037 
0038   void SetDefaultParameters() override;
0039 
0040   void Detector(const std::string &d) { detector = d; }
0041 
0042   void checkenergy(const int i = 1) { chkenergyconservation = i; }
0043 
0044   void set_timing_window(const double tmin, const double tmax);
0045 
0046   LightCollectionModel &get_light_collection_model() { return light_collection_model; }
0047 
0048  protected:
0049   int CheckEnergy(PHCompositeNode *topNode);
0050 
0051   std::string detector;
0052   std::string hitnodename;
0053   std::string cellnodename;
0054   std::string geonodename;
0055   std::string seggeonodename;
0056 
0057   double sum_energy_g4hit = 0;
0058   int chkenergyconservation = 0;
0059   std::map<unsigned int, PHG4Cell *> celllist;
0060 
0061   //! timing window size in ns. This is for a simple simulation of the ADC integration window starting from 0ns to this value. Default to infinity, i.e. include all hits
0062   double tmin = NAN;
0063   double tmax = NAN;
0064   double m_DeltaT = NAN;
0065   LightCollectionModel light_collection_model;
0066 };
0067 
0068 #endif