Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 32 additions & 3 deletions Detectors/FOCAL/simulation/include/FOCALSimulation/Detector.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class FairVolume;
namespace o2::focal
{

class Hit;
class Geometry;

/// \struct Parent
Expand All @@ -39,6 +40,16 @@ struct Parent {
/// \ingroup FOCALsimulation
/// \author Markus Fasel <markus.fasel@cern.ch>, Oak Ridge National Laboratory
/// \since June 6, 2024
/// \author Adam Matyja <adam.tomasz.matyja@cern.ch>, Institute of Nuclear Physics, PAN, Cracov, Poland
/// \since June 24, 2024
/// class based on AliFOCALv2.h in aliroot
/// It builds the ECAL (Adam) and HCAL (Hadi) seperately
/// For the ECAL: it builds it tower by tower
/// For the HCAL:
///
/// The detector class handles the implementation of the FOCAL detector
/// within the virtual Monte-Carlo framework and the simulation of the
/// FOCAL detector up to hit generation
class Detector : public o2::base::DetImpl<Detector>
{
public:
Expand Down Expand Up @@ -139,25 +150,43 @@ class Detector : public o2::base::DetImpl<Detector>

virtual void addAlignableVolumes() const override;
void addAlignableVolumesHCAL() const;
void addAlignableVolumesECAL() const;

void ConstructGeometry() override;

virtual void CreateHCALSpaghetti();
virtual void CreateHCALSandwich();

/// \brief Generate ECAL geometry
void CreateECALGeometry();

/// \brief Add new superparent to the container
/// \param trackID Track ID of the superparent
/// \param pdg PDG code of the superparent
/// \param energy Energy of the superparent
Parent* AddSuperparent(int trackID, int pdg, double energy);

/// \brief Processing hit creation in the ECAL Pad sensitive volume
/// \param v Current sensitive volume
bool ProcessHitsEPad(FairVolume* v = nullptr);

/// \brief Processing hit creation in the ECAL Pixel sensitive volume
/// \param v Current sensitive volume
bool ProcessHitsEPix(FairVolume* v = nullptr);

/// \brief Processing hit creation in the HCAL sensitive volume
/// \param v Current sensitive volume
bool ProcessHitsHCAL(FairVolume* v = nullptr);

private:
/// \brief Copy constructor (used in MT)
Detector(const Detector& rhs);

Geometry* mGeometry; //!<! Geometry pointer

int mMedSensHCal = 0; //!<! Sensitive Medium for HCal
int mMedSensECalPad = 0; //!<! Sensitive Medium for ECal Pads
int mMedSensECalPix = 0; //!<! Sensitive Medium for ECal Pixels

std::vector<const Composition*> mGeoCompositions; //!<! list of FOCAL compositions

Expand All @@ -172,8 +201,8 @@ class Detector : public o2::base::DetImpl<Detector>
Int_t mCurrentPrimaryID; //!<! ID of the current primary
Int_t mCurrentParentID; //!<! ID of the current parent

std::vector<std::string> mSensitiveHCAL; //!<! List of sensitive volumes
int mVolumeIDScintillator = -1; //!<! Volume ID of the scintillator volume
std::vector<std::string> mSensitive; //!<! List of sensitive volumes
int mVolumeIDScintillator = -1; //!<! Volume ID of the scintillator volume

template <typename Det>
friend class o2::base::DetImpl;
Expand All @@ -194,4 +223,4 @@ struct UseShm<o2::focal::Detector> {
} // namespace o2
#endif

#endif // ALICEO2_FOCAL_DETECTOR_H_
#endif // ALICEO2_FOCAL_DETECTOR_H_
Loading