HerdSoftware  0.1.1
SiliconDetectorBondingDigitizerAlgo.h
Go to the documentation of this file.
1 /*
2  * SiliconDetectorBondingDigitizerAlgo.h
3  *
4  * Created on: 22 Sep 2020
5  * Author: Nicola Mori
6  */
7 
8 #ifndef HERD_SILICONDETECTORBONDINGDIGITIZERALGO_H_
9 #define HERD_SILICONDETECTORBONDINGDIGITIZERALGO_H_
10 
11 // HerdSoftware headers
14 
15 // EventAnalysis headers
16 #include "algorithm/Algorithm.h"
17 
18 using namespace EA;
19 
20 namespace Herd {
21 
22 // clang-format off
33 // clang-format on
34 class SiliconDetectorBondingDigitizerAlgo : public Algorithm {
35 public:
40  SiliconDetectorBondingDigitizerAlgo(const std::string &name);
41 
46  bool Initialize() override;
47 
52  bool Process() override;
53 
62  std::vector<std::string> FreeObjects(const std::vector<std::string> &objs, Memory::Status memStatus) override;
63 
64 protected:
65  // Parameters
68  int _nWafersPerLadderSideOdd;
70  std::string _detName;
72 
73 private:
75  std::shared_ptr<SiliconDetectorGeoParamsColl> _bondedGeoParamsColl;
76  observer_ptr<SiliconDetectorGeoParamsColl> _origGeoParamsColl;
77  StorePtr _evStore, _globStore;
78 
79  // Helper functions
80 
89  SiliconDetectorHitsColl _Bond(const SiliconDetectorHitsColl &hitsColl);
90 
100  SiliconDetectorGeoParams _CreateGeoParams(const SiliconDetectorGeoParams &origGeoParams, int nWafersPerLadder);
101 
102  int _NWafersPerLadder(RefFrame::Side side, int iLayer) {
103  return (side == RefFrame::Side::TOP ? _nWafersPerLadderTop
104  : (iLayer % 2 == 0 ? _nWafersPerLadderSideEven : _nWafersPerLadderSideOdd));
105  }
106 };
107 
108 } // namespace Herd
109 
110 #endif /* HERD_SILICONDETECTORBONDINGDIGITIZERALGO_H_ */
CssGeoParams.h CssGeoParams class declaration.
Definition: CaloPDCalibrationAlgo.h:24
int _nWafersPerLadderTop
Number of wafers in each ladder, i.e. wafers to be bonded together, on top face.
Definition: SiliconDetectorBondingDigitizerAlgo.h:66
int _nWafersPerLadderSideEven
Definition: SiliconDetectorBondingDigitizerAlgo.h:67
StorePtr _globStore
Definition: SiliconDetectorBondingDigitizerAlgo.h:77
Side
Aliases for the five sides. RefFrame.h common/RefFrame.h.
Definition: RefFrame.h:104
observer_ptr< SiliconDetectorGeoParamsColl > _origGeoParamsColl
Definition: SiliconDetectorBondingDigitizerAlgo.h:76
int _NWafersPerLadder(RefFrame::Side side, int iLayer)
Definition: SiliconDetectorBondingDigitizerAlgo.h:102
std::shared_ptr< SiliconDetectorGeoParamsColl > _bondedGeoParamsColl
Definition: SiliconDetectorBondingDigitizerAlgo.h:75
Base algorithm for bonding digitizers of the Monte Carlo hits of silicon detectors.
Definition: SiliconDetectorBondingDigitizerAlgo.h:34
Data structure for single silicon layer geometry parameters.
Definition: SiliconDetectorGeoParams.h:32
SiliconDetectorHitsColl _bondedHitsColl
Definition: SiliconDetectorBondingDigitizerAlgo.h:74