BmnRoot 26.10.0-233-gb9bbe585
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.

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/2]

BmnFHCal::BmnFHCal ( )

Definition at line 17 of file BmnFHCal.cxx.

References fCollection, fGeoHandler, and fPoint.

◆ BmnFHCal() [2/2]

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()

BmnFHCal::~BmnFHCal ( )
virtual

Definition at line 35 of file BmnFHCal.cxx.

References fCollection, fGeoHandler, fMultiLinkMap, and fPoint.

Member Function Documentation

◆ AddHit()

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:

◆ BeginEvent()

void BmnFHCal::BeginEvent ( )
overridevirtual

Definition at line 55 of file BmnFHCal.cxx.

References fMultiLinkMap.

◆ CheckIfSensitive()

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:

◆ ConstructGeometry()

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:

◆ EndOfEvent()

void BmnFHCal::EndOfEvent ( )
overridevirtual

Definition at line 136 of file BmnFHCal.cxx.

References Print(), and Reset().

Here is the call graph for this function:

◆ GetCollection()

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:

◆ GetHit()

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:

◆ GetSurfaceMCTrack()

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:

◆ Initialize()

void BmnFHCal::Initialize ( )
overridevirtual

Definition at line 49 of file BmnFHCal.cxx.

◆ Print()

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:

◆ ProcessHits()

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:

◆ Register()

void BmnFHCal::Register ( )
overridevirtual

Definition at line 143 of file BmnFHCal.cxx.

References fCollection.

◆ Reset()

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:

◆ UpdateHit()

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:

Member Data Documentation

◆ fCollection

TClonesArray* BmnFHCal::fCollection
private

Definition at line 97 of file BmnFHCal.h.

Referenced by BmnFHCal(), BmnFHCal(), ~BmnFHCal(), AddHit(), GetCollection(), GetHit(), Print(), Register(), and Reset().

◆ 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(), and ProcessHits().

◆ fPoint

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

Definition at line 99 of file BmnFHCal.h.

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


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