BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnFHCal Class Reference

#include <BmnFHCal.h>

Inheritance diagram for BmnFHCal:
Collaboration diagram for BmnFHCal:

Public Member Functions

 BmnFHCal ()
 Default constructor.
 BmnFHCal (const char *name, Bool_t active)
 Standard constructor.
virtual ~BmnFHCal ()
 Destructor.
virtual void Initialize () override
 Initializes detector and FairRun.
virtual Bool_t ProcessHits (FairVolume *vol=nullptr) override
 Processes hits and creates BmnFHCalPoints.
virtual void EndOfEvent () override
 Called at the end of each event.
virtual void BeginEvent () override
 Called at the beginning of each event.
virtual void Register () override
 Registers the hit collection in the ROOT manager.
virtual TClonesArray * GetCollection (Int_t iColl) const override
 Accessor to the hit collection.
virtual void Print (Option_t *) const override
 Screen output of hit collection.
virtual void Reset () override
 Clears the hit collection.
virtual void ConstructGeometry () override
 Constructs geometry from files.
virtual Bool_t CheckIfSensitive (std::string name) override
 Checks whether a volume is sensitive based on its name.
BmnFHCalPoint * AddHit (BmnFHCalPoint *point)
 Adds the hit to hits collection.
void UpdateHit (BmnFHCalPoint &existing, const BmnFHCalPoint &update)
 Updates an existing hit by merging information from a new hit, weighting position, momentum, time, and length according to their energy loss.
BmnFHCalPoint * GetHit (uint32_t address)
 Retrieves a hit from the collection based on the detector address.
int GetSurfaceMCTrack (int start_track_id)
 Determines the surface-level Monte Carlo track ID associated with the given starting track ID.
 BmnFHCal ()
 Default constructor.
 BmnFHCal (const char *name, Bool_t active)
 Standard constructor.
virtual ~BmnFHCal ()
 Destructor.
virtual void Initialize () override
 Initializes detector and FairRun.
virtual Bool_t ProcessHits (FairVolume *vol=nullptr) override
 Processes hits and creates BmnFHCalPoints.
virtual void EndOfEvent () override
 Called at the end of each event.
virtual void BeginEvent () override
 Called at the beginning of each event.
virtual void Register () override
 Registers the hit collection in the ROOT manager.
virtual TClonesArray * GetCollection (Int_t iColl) const override
 Accessor to the hit collection.
virtual void Print (Option_t *) const override
 Screen output of hit collection.
virtual void Reset () override
 Clears the hit collection.
virtual void ConstructGeometry () override
 Constructs geometry from files.
virtual Bool_t CheckIfSensitive (std::string name) override
 Checks whether a volume is sensitive based on its name.
BmnFHCalPoint * AddHit (BmnFHCalPoint *point)
 Adds the hit to hits collection.
void UpdateHit (BmnFHCalPoint &existing, const BmnFHCalPoint &update)
 Updates an existing hit by merging information from a new hit, weighting position, momentum, time, and length according to their energy loss.
BmnFHCalPoint * GetHit (uint32_t address)
 Retrieves a hit from the collection based on the detector address.
int GetSurfaceMCTrack (int start_track_id)
 Determines the surface-level Monte Carlo track ID associated with the given starting track ID.

Private Attributes

TClonesArray * fCollection
std::unique_ptr< BmnFHCalGeo > fGeoHandler
std::unique_ptr< BmnFHCalPoint > fPoint
std::map< uint32_t, FairMultiLinkedData > fMultiLinkMap

Detailed Description

Definition at line 16 of file BmnFHCal.h.

Constructor & Destructor Documentation

◆ BmnFHCal() [1/4]

BmnFHCal::BmnFHCal ( )

Definition at line 17 of file BmnFHCal.cxx.

References fCollection, fGeoHandler, and fPoint.

Referenced by GetSurfaceMCTrack().

Here is the caller graph for this function:

◆ BmnFHCal() [2/4]

BmnFHCal::BmnFHCal ( const char * name,
Bool_t active )
Parameters
nameDetector name
activeSensitivity flag

Definition at line 26 of file BmnFHCal.cxx.

References fCollection, fGeoHandler, and fPoint.

◆ ~BmnFHCal() [1/2]

BmnFHCal::~BmnFHCal ( )
virtual

Definition at line 35 of file BmnFHCal.cxx.

References fCollection, fGeoHandler, fMultiLinkMap, and fPoint.

◆ BmnFHCal() [3/4]

BmnFHCal::BmnFHCal ( )

◆ BmnFHCal() [4/4]

BmnFHCal::BmnFHCal ( const char * name,
Bool_t active )
Parameters
nameDetector name
activeSensitivity flag

◆ ~BmnFHCal() [2/2]

virtual BmnFHCal::~BmnFHCal ( )
virtual

Member Function Documentation

◆ AddHit() [1/2]

BmnFHCalPoint * BmnFHCal::AddHit ( BmnFHCalPoint * point)
Parameters
pointBmnFHCalPoint
Returns
Pointer to the hit

Definition at line 237 of file BmnFHCal.cxx.

References fCollection, and TObjArray::GetEntriesFast().

Referenced by ProcessHits().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddHit() [2/2]

BmnFHCalPoint * BmnFHCal::AddHit ( BmnFHCalPoint * point)
Parameters
pointBmnFHCalPoint
Returns
Pointer to the hit

◆ BeginEvent() [1/2]

void BmnFHCal::BeginEvent ( )
overridevirtual

Definition at line 55 of file BmnFHCal.cxx.

References fMultiLinkMap.

◆ BeginEvent() [2/2]

virtual void BmnFHCal::BeginEvent ( )
overridevirtual

◆ CheckIfSensitive() [1/2]

Bool_t BmnFHCal::CheckIfSensitive ( std::string name)
overridevirtual
Parameters
nameVolume name
Returns
kTRUE if the volume is sensitive, otherwise kFALSE

Definition at line 230 of file BmnFHCal.cxx.

References TString::Contains(), and BmnFHCalGeoPar::SensitiveVolume_name.

Referenced by ProcessHits().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckIfSensitive() [2/2]

virtual Bool_t BmnFHCal::CheckIfSensitive ( std::string name)
overridevirtual
Parameters
nameVolume name
Returns
kTRUE if the volume is sensitive, otherwise kFALSE

◆ ConstructGeometry() [1/2]

void BmnFHCal::ConstructGeometry ( )
overridevirtual

Definition at line 188 of file BmnFHCal.cxx.

References TObjArray::AddLast(), TString::Data(), TString::EndsWith(), fGeoHandler, BmnFHCalGeoPar::GetGeoPassiveNodes(), BmnFHCalGeoPar::GetGeoSensitiveNodes(), and TListIter::Next().

Here is the call graph for this function:

◆ ConstructGeometry() [2/2]

virtual void BmnFHCal::ConstructGeometry ( )
overridevirtual

◆ EndOfEvent() [1/2]

void BmnFHCal::EndOfEvent ( )
overridevirtual

Definition at line 136 of file BmnFHCal.cxx.

References Print(), and Reset().

Here is the call graph for this function:

◆ EndOfEvent() [2/2]

virtual void BmnFHCal::EndOfEvent ( )
overridevirtual

◆ GetCollection() [1/2]

TClonesArray * BmnFHCal::GetCollection ( Int_t iColl) const
overridevirtual
Parameters
iCollIndex of the collection
Returns
Pointer to the hit collection

Definition at line 149 of file BmnFHCal.cxx.

References fCollection, fMultiLinkMap, BmnFHCalPoint::GetAddress(), and i.

Here is the call graph for this function:

◆ GetCollection() [2/2]

virtual TClonesArray * BmnFHCal::GetCollection ( Int_t iColl) const
overridevirtual
Parameters
iCollIndex of the collection
Returns
Pointer to the hit collection

◆ GetHit() [1/2]

BmnFHCalPoint * BmnFHCal::GetHit ( uint32_t address)
Parameters
addressDetector address of the hit
Returns
Pointer to the retrieved hit, or nullptr if not found

Definition at line 61 of file BmnFHCal.cxx.

References fCollection, and i.

Referenced by ProcessHits().

Here is the caller graph for this function:

◆ GetHit() [2/2]

BmnFHCalPoint * BmnFHCal::GetHit ( uint32_t address)
Parameters
addressDetector address of the hit
Returns
Pointer to the retrieved hit, or nullptr if not found

◆ GetSurfaceMCTrack() [1/2]

int BmnFHCal::GetSurfaceMCTrack ( int start_track_id)
Parameters
start_track_idInitial track ID to trace back to the surface MC track
Returns
Surface-level MC track ID

Definition at line 277 of file BmnFHCal.cxx.

References fGeoHandler, TParticle::GetFirstMother(), TParticle::IsPrimary(), TParticle::Vx(), TParticle::Vy(), TParticle::Vz(), TVector3::X(), TVector3::Y(), and TVector3::Z().

Referenced by ProcessHits().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetSurfaceMCTrack() [2/2]

int BmnFHCal::GetSurfaceMCTrack ( int start_track_id)
Parameters
start_track_idInitial track ID to trace back to the surface MC track
Returns
Surface-level MC track ID

References BmnFHCal(), fCollection, fGeoHandler, fMultiLinkMap, and fPoint.

Here is the call graph for this function:

◆ Initialize() [1/2]

void BmnFHCal::Initialize ( )
overridevirtual

Definition at line 49 of file BmnFHCal.cxx.

◆ Initialize() [2/2]

virtual void BmnFHCal::Initialize ( )
overridevirtual

◆ Print() [1/2]

void BmnFHCal::Print ( Option_t * ) const
overridevirtual

Definition at line 168 of file BmnFHCal.cxx.

References fCollection, i, and BmnFHCalPoint::Print().

Referenced by EndOfEvent().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Print() [2/2]

virtual void BmnFHCal::Print ( Option_t * ) const
overridevirtual

◆ ProcessHits() [1/2]

Bool_t BmnFHCal::ProcessHits ( FairVolume * vol = nullptr)
overridevirtual
Parameters
volPointer to the active volume
Returns
kTRUE if the volume is sensitive and a hit is processed, otherwise kFALSE

Definition at line 80 of file BmnFHCal.cxx.

References AddHit(), CalculateEnergyLoss(), CheckIfSensitive(), fGeoHandler, fMultiLinkMap, fPoint, GetHit(), BmnFHCalAddress::GetInfoString(), GetSurfaceMCTrack(), kFHCAL, UpdateHit(), and TLorentzVector::Vect().

Here is the call graph for this function:

◆ ProcessHits() [2/2]

virtual Bool_t BmnFHCal::ProcessHits ( FairVolume * vol = nullptr)
overridevirtual
Parameters
volPointer to the active volume
Returns
kTRUE if the volume is sensitive and a hit is processed, otherwise kFALSE

◆ Register() [1/2]

void BmnFHCal::Register ( )
overridevirtual

Definition at line 143 of file BmnFHCal.cxx.

References fCollection.

◆ Register() [2/2]

virtual void BmnFHCal::Register ( )
overridevirtual

◆ Reset() [1/2]

void BmnFHCal::Reset ( )
overridevirtual

Definition at line 182 of file BmnFHCal.cxx.

References fCollection.

Referenced by EndOfEvent().

Here is the caller graph for this function:

◆ Reset() [2/2]

virtual void BmnFHCal::Reset ( )
overridevirtual

◆ UpdateHit() [1/2]

void BmnFHCal::UpdateHit ( BmnFHCalPoint & existing,
const BmnFHCalPoint & update )
Parameters
existingReference to the existing BmnFHCalPoint hit, which will be updated
updateReference to the new BmnFHCalPoint hit, providing additional information

Definition at line 244 of file BmnFHCal.cxx.

References BmnFHCalPoint::GetAddress().

Referenced by ProcessHits().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdateHit() [2/2]

void BmnFHCal::UpdateHit ( BmnFHCalPoint & existing,
const BmnFHCalPoint & update )
Parameters
existingReference to the existing BmnFHCalPoint hit, which will be updated
updateReference to the new BmnFHCalPoint hit, providing additional information

Member Data Documentation

◆ fCollection

TClonesArray * BmnFHCal::fCollection
private

◆ fGeoHandler

std::unique_ptr< BmnFHCalGeo > BmnFHCal::fGeoHandler
private

◆ fMultiLinkMap

std::map< uint32_t, FairMultiLinkedData > BmnFHCal::fMultiLinkMap
private

Definition at line 100 of file BmnFHCal.h.

Referenced by ~BmnFHCal(), BeginEvent(), GetCollection(), GetSurfaceMCTrack(), and ProcessHits().

◆ fPoint

std::unique_ptr< BmnFHCalPoint > BmnFHCal::fPoint
private

Definition at line 99 of file BmnFHCal.h.

Referenced by BmnFHCal(), BmnFHCal(), ~BmnFHCal(), GetSurfaceMCTrack(), and ProcessHits().


The documentation for this class was generated from the following files: