EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EicCalorimeterReconstruction.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file EicCalorimeterReconstruction.h
1 //
2 // AYK (ayk@bnl.gov), 2013/06/13
3 //
4 // Calorimeter reconstruction code classes;
5 //
6 
7 #include <TClonesArray.h>
8 
9 #include <FairTask.h>
10 
11 #include <EicDetName.h>
13 
14 #ifndef _EIC_CALORIMETER_RECO_CODE_
15 #define _EIC_CALORIMETER_RECO_CODE_
16 
18 {
19 public:
22 
23  // FIXME: may want to optimize ROOT streamer interface; now it's duplicating
24  // cell pointers I guess;
25  std::vector<const CalorimeterCell*> mCells; // calorimeter cell pointers
26 
27  Double_t mEnergy; // full estimated energy of this cell group; [GeV]
28  std::map<std::pair<UInt_t, UInt_t>, Double_t> mEnergyPerParent; // same, split over contributing parent particles
29 
31 };
32 
34 {
35  // Yes, avoid complications; this "class" is a data placeholder;
37 
38  public:
42 
43  private:
44  // All thresholds are 0.0 per default; units are "estimated [GeV] based on light yield
45  // provided during digitization; NB: it may be dangerous to set 'mCellAccountingThreshold' to
46  // a value lower than the one matching 'digi->mCleanupThreshold' since part of cells could
47  // have been rejected
48  // during digitization phase already (so one should better re-run digitization with lower
49  // value of 'digi->mCleanupThreshold'); also, it is more or less clear, that only
50  // "mClusterSeedThreshold > mNeighbourSearchThreshold > mCellAccountingThreshold" make sense;
51  // code will work with any input though, just produce a warning;
52  Double_t mClusterSeedThreshold; // cells above this [GeV] threshold can initiate new clusters
53  Double_t mNeighbourSearchThreshold; // cells above this [GeV] threshold can add more neighbors to cluster
54  Double_t mCellAccountingThreshold; // cells below this [GeV] threshold will simply be ignored
55 
56  Double_t mPhotonToEnergyConversionFactor; // photon-to-energy scaling factor
57 
59 };
60 
61 #define _DEFAULT_LIGHT_YIELD_PLOT_MAX_ 10000
62 #define _DEFAULT_LIGHT_YIELD_PLOT_NBINS_ 100
63 
65 public:
68 
70 
71  void ResetVars() {
72  mDigi = 0; mGptr = 0; mReco = 0;
73 
74  mLightYieldPlot = 0;
77 
79  };
80 
81  InitStatus Init();
82  void Exec(Option_t * option);
83 
84  void AddNeighbors(CalorimeterCellGroup &group, std::multimap<UInt_t,EicCalorimeterDigiHit*>::reverse_iterator it);
86 
87  void SetClusterAlgorithmThresholds(Double_t clusterSeedThreshold, Double_t neighbourSearchThreshold,
88  Double_t cellAccountingThreshold) {
89  mReco->mClusterSeedThreshold = clusterSeedThreshold;
90  mReco->mNeighbourSearchThreshold = neighbourSearchThreshold;
91  mReco->mCellAccountingThreshold = cellAccountingThreshold;
92  };
93 
94  void SetPhotonToEnergyConversionFactor(double factor) {
96  };
97 
99  unsigned nBins = _DEFAULT_LIGHT_YIELD_PLOT_NBINS_) {
100  mLightYieldPlotMax = nMax;
101  mLightYieldPlotNbins = nBins;
102 
104  };
105 
106  virtual void Finish();
107 
108  protected:
110 
113 
114  TClonesArray *mDigiHits;
115 
116  // Output array of detector-specific cluster groups;
117  TClonesArray* mClusterGroupArray;
118 
119  // Yes, multimap, because photon counts can of course be the same for some cells;
120  std::multimap<UInt_t,EicCalorimeterDigiHit*> hmap;
121 
122  std::vector<CalorimeterCellGroup> mCellGroups;
123 
126 
127  // Want to dump this information into the output file;
129 
131 
133 };
134 
135 #endif