EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EicDigiHitProducer.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file EicDigiHitProducer.h
1 //
2 // AYK (ayk@bnl.gov), 2013/06/13
3 //
4 // EIC digitized hit producer class; assume some basic functionality
5 // can be established, although tracking and calorimeter detectors
6 // will have their own (inherited) classes for this purpose;
7 //
8 
9 #include <TVector3.h>
10 class TClonesArray;
11 class TObjectArray;
12 
13 #include <FairTask.h>
14 #include <PndGeoHandling.h>
15 
16 #include <EicDetName.h>
17 #include <EicNamePatternHub.h>
18 #include <EicMoCaPoint.h>
19 #include <EicGeoParData.h>
20 
21 #ifndef _EIC_DIGI_HIT_PRODUCER_
22 #define _EIC_DIGI_HIT_PRODUCER_
23 
26 {
27  public:
34  EicDigiHitProducer(const char *name);
35 
37 
38  void ResetVars() {
39  mDigiHitArray = 0;
40  mGptr = 0;
41  mMoCaPointArray = 0; mDetName = 0;
42  };
43 
51 
56  InitStatus Init();
59  virtual InitStatus ExtraInit() {return kSUCCESS; };
60 
63  virtual int PreExec() { return 0; };
70  virtual void Exec(Option_t* opt);
73  virtual int PostExec() { return 0; };
74 
80  virtual int HandleHit(const EicMoCaPoint *point) = 0;
81 
85  void SetPersistence(Bool_t persistence) { mPersistence = persistence; }
86 
87  // Birk's constant should be given in [cm]/[GeV] units;
88  void DeclareDigiSensitiveVolume(const char *name, Double_t Kb = 0.0) /*const*/ {
89  /* mDigi->*/mSensitiveVolumes.AddExactMatch(name, Kb);
90  };
91  void DeclareDigiSensitiveVolumePrefix(const char *name, Double_t Kb = 0.0) /*const*/ {
92  /*mDigi->*/mSensitiveVolumes.AddPrefixMatch(name, Kb);
93  };
94 
95  protected:
98 
100  TClonesArray* mDigiHitArray;
101 
102  // Put EicGeoMap->TGeoNode mapping table creator in a separate class;
104 
105  EicNamePatternHub<double> mSensitiveVolumes;// sensitive volumes with their respective Birks' constants
106 
108  Bool_t mPersistence;
109 
110  private:
111  void SetParContainers();
112 
114  TClonesArray* mMoCaPointArray;
115 
118 
121 
123 };
124 
125 #endif