@@ -23,6 +23,7 @@ class FairVolume;
2323namespace o2 ::focal
2424{
2525
26+ class Hit ;
2627class Geometry ;
2728
2829// / \struct Parent
@@ -39,6 +40,16 @@ struct Parent {
3940// / \ingroup FOCALsimulation
4041// / \author Markus Fasel <markus.fasel@cern.ch>, Oak Ridge National Laboratory
4142// / \since June 6, 2024
43+ // / \author Adam Matyja <adam.tomasz.matyja@cern.ch>, Institute of Nuclear Physics, PAN, Cracov, Poland
44+ // / \since June 24, 2024
45+ // / class based on AliFOCALv2.h in aliroot
46+ // / It builds the ECAL (Adam) and HCAL (Hadi) seperately
47+ // / For the ECAL: it builds it tower by tower
48+ // / For the HCAL:
49+ // /
50+ // / The detector class handles the implementation of the FOCAL detector
51+ // / within the virtual Monte-Carlo framework and the simulation of the
52+ // / FOCAL detector up to hit generation
4253class Detector : public o2 ::base::DetImpl<Detector>
4354{
4455 public:
@@ -139,25 +150,43 @@ class Detector : public o2::base::DetImpl<Detector>
139150
140151 virtual void addAlignableVolumes () const override ;
141152 void addAlignableVolumesHCAL () const ;
153+ void addAlignableVolumesECAL () const ;
142154
143155 void ConstructGeometry () override ;
144156
145157 virtual void CreateHCALSpaghetti ();
146158 virtual void CreateHCALSandwich ();
147159
160+ // / \brief Generate ECAL geometry
161+ void CreateECALGeometry ();
162+
148163 // / \brief Add new superparent to the container
149164 // / \param trackID Track ID of the superparent
150165 // / \param pdg PDG code of the superparent
151166 // / \param energy Energy of the superparent
152167 Parent* AddSuperparent (int trackID, int pdg, double energy);
153168
169+ // / \brief Processing hit creation in the ECAL Pad sensitive volume
170+ // / \param v Current sensitive volume
171+ bool ProcessHitsEPad (FairVolume* v = nullptr );
172+
173+ // / \brief Processing hit creation in the ECAL Pixel sensitive volume
174+ // / \param v Current sensitive volume
175+ bool ProcessHitsEPix (FairVolume* v = nullptr );
176+
177+ // / \brief Processing hit creation in the HCAL sensitive volume
178+ // / \param v Current sensitive volume
179+ bool ProcessHitsHCAL (FairVolume* v = nullptr );
180+
154181 private:
155182 // / \brief Copy constructor (used in MT)
156183 Detector (const Detector& rhs);
157184
158185 Geometry* mGeometry ; // !<! Geometry pointer
159186
160187 int mMedSensHCal = 0 ; // !<! Sensitive Medium for HCal
188+ int mMedSensECalPad = 0 ; // !<! Sensitive Medium for ECal Pads
189+ int mMedSensECalPix = 0 ; // !<! Sensitive Medium for ECal Pixels
161190
162191 std::vector<const Composition*> mGeoCompositions ; // !<! list of FOCAL compositions
163192
@@ -172,8 +201,8 @@ class Detector : public o2::base::DetImpl<Detector>
172201 Int_t mCurrentPrimaryID ; // !<! ID of the current primary
173202 Int_t mCurrentParentID ; // !<! ID of the current parent
174203
175- std::vector<std::string> mSensitiveHCAL ; // !<! List of sensitive volumes
176- int mVolumeIDScintillator = -1 ; // !<! Volume ID of the scintillator volume
204+ std::vector<std::string> mSensitive ; // !<! List of sensitive volumes
205+ int mVolumeIDScintillator = -1 ; // !<! Volume ID of the scintillator volume
177206
178207 template <typename Det>
179208 friend class o2 ::base::DetImpl;
@@ -194,4 +223,4 @@ struct UseShm<o2::focal::Detector> {
194223} // namespace o2
195224#endif
196225
197- #endif // ALICEO2_FOCAL_DETECTOR_H_
226+ #endif // ALICEO2_FOCAL_DETECTOR_H_
0 commit comments