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

#include <BmnNdet.h>

Inheritance diagram for BmnNdet:
Collaboration diagram for BmnNdet:

Public Member Functions

 BmnNdet ()
 Default constructor.
 BmnNdet (const char *name, Bool_t active)
 Standard constructor.
virtual ~BmnNdet ()
 Destructor.
virtual void Initialize ()
 Initialises detector and FairRun.
virtual Bool_t ProcessHits (FairVolume *vol=nullptr)
 Processes hits and creates BmnNdetPoints.
bool FinaliseTrackProcessing (BmnNdetPoint *point)
 Removes zero-energy hits.
virtual void EndOfEvent ()
 Called at the end of each event.
virtual void BeginEvent ()
 Called at the beginning of each event.
virtual void Register ()
 Registers the hit collection in the ROOT manager.
virtual TClonesArray * GetCollection (Int_t iColl) const
 Accessor to the hit collection.
virtual void Print (Option_t *) const
 Screen output of hit collection.
virtual void Reset ()
 Clears the hit collection.
virtual void ConstructGeometry ()
 Constructs geometry from files.
virtual Bool_t CheckIfSensitive (std::string name)
 Checks whether a volume is sensitive based on its name.
virtual Bool_t CheckIfVacuum ()
 Checks whether current volume is vacuum.
Int_t FindHitIndex (int trackID, uint32_t address)
 Retrieves the hit index corresponding to a specific address and trackID.
BmnNdetPoint * GetHit (int trackID, uint32_t address)
 Retrieves the hit corresponding to a specific address and trackID.
BmnNdetPoint * AddHit (BmnNdetPoint *point)
 Adds the hit to hits collection.
void RemoveHit (Int_t index)
 Remove hit from hits collection by index.
int GetSurfacePoint (int start_track_id)
 Returns index of surface point.
 BmnNdet ()
 Default constructor.
 BmnNdet (const char *name, Bool_t active)
 Standard constructor.
virtual ~BmnNdet ()
 Destructor.
virtual void Initialize ()
 Initialises detector and FairRun.
virtual Bool_t ProcessHits (FairVolume *vol=nullptr)
 Processes hits and creates BmnNdetPoints.
bool FinaliseTrackProcessing (BmnNdetPoint *point)
 Removes zero-energy hits.
virtual void EndOfEvent ()
 Called at the end of each event.
virtual void BeginEvent ()
 Called at the beginning of each event.
virtual void Register ()
 Registers the hit collection in the ROOT manager.
virtual TClonesArray * GetCollection (Int_t iColl) const
 Accessor to the hit collection.
virtual void Print (Option_t *) const
 Screen output of hit collection.
virtual void Reset ()
 Clears the hit collection.
virtual void ConstructGeometry ()
 Constructs geometry from files.
virtual Bool_t CheckIfSensitive (std::string name)
 Checks whether a volume is sensitive based on its name.
virtual Bool_t CheckIfVacuum ()
 Checks whether current volume is vacuum.
Int_t FindHitIndex (int trackID, uint32_t address)
 Retrieves the hit index corresponding to a specific address and trackID.
BmnNdetPoint * GetHit (int trackID, uint32_t address)
 Retrieves the hit corresponding to a specific address and trackID.
BmnNdetPoint * AddHit (BmnNdetPoint *point)
 Adds the hit to hits collection.
void RemoveHit (Int_t index)
 Remove hit from hits collection by index.
int GetSurfacePoint (int start_track_id)
 Returns index of surface point.

Private Attributes

BmnNdetGeo * fGeoHandler
TClonesArray * fCollection
TClonesArray * fSurfaceCollection

Detailed Description

Definition at line 17 of file BmnNdet.h.

Constructor & Destructor Documentation

◆ BmnNdet() [1/4]

BmnNdet::BmnNdet ( )

Definition at line 17 of file BmnNdet.cxx.

References fCollection, fGeoHandler, and fSurfaceCollection.

Referenced by GetSurfacePoint().

Here is the caller graph for this function:

◆ BmnNdet() [2/4]

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

Definition at line 26 of file BmnNdet.cxx.

References fCollection, fGeoHandler, and fSurfaceCollection.

◆ ~BmnNdet() [1/2]

BmnNdet::~BmnNdet ( )
virtual

Definition at line 35 of file BmnNdet.cxx.

References fCollection, fGeoHandler, and fSurfaceCollection.

◆ BmnNdet() [3/4]

BmnNdet::BmnNdet ( )

◆ BmnNdet() [4/4]

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

◆ ~BmnNdet() [2/2]

virtual BmnNdet::~BmnNdet ( )
virtual

Member Function Documentation

◆ AddHit() [1/2]

BmnNdetPoint * BmnNdet::AddHit ( BmnNdetPoint * point)
Parameters
pointBmnNdetPoint
Returns
Pointer to the hit

Definition at line 302 of file BmnNdet.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]

BmnNdetPoint * BmnNdet::AddHit ( BmnNdetPoint * point)
Parameters
pointBmnNdetPoint
Returns
Pointer to the hit

◆ BeginEvent() [1/2]

void BmnNdet::BeginEvent ( )
virtual

Definition at line 57 of file BmnNdet.cxx.

◆ BeginEvent() [2/2]

virtual void BmnNdet::BeginEvent ( )
virtual

◆ CheckIfSensitive() [1/2]

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

Definition at line 289 of file BmnNdet.cxx.

References TString::Contains(), BmnNdetGeoPar::fEnvelopeVolumeName, BmnNdetGeoPar::SensitiveVolume_name_NICA, and BmnNdetGeoPar::SensitiveVolume_name_VETO.

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 BmnNdet::CheckIfSensitive ( std::string name)
virtual
Parameters
nameVolume name
Returns
kTRUE if the volume is sensitive, otherwise kFALSE

◆ CheckIfVacuum() [1/2]

Bool_t BmnNdet::CheckIfVacuum ( )
virtual
Returns
kTRUE if the volume is vacuum, otherwise kFALSE

Definition at line 297 of file BmnNdet.cxx.

Referenced by ProcessHits().

Here is the caller graph for this function:

◆ CheckIfVacuum() [2/2]

virtual Bool_t BmnNdet::CheckIfVacuum ( )
virtual
Returns
kTRUE if the volume is vacuum, otherwise kFALSE

◆ ConstructGeometry() [1/2]

void BmnNdet::ConstructGeometry ( )
virtual

Definition at line 244 of file BmnNdet.cxx.

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

Here is the call graph for this function:

◆ ConstructGeometry() [2/2]

virtual void BmnNdet::ConstructGeometry ( )
virtual

◆ EndOfEvent() [1/2]

void BmnNdet::EndOfEvent ( )
virtual

Definition at line 197 of file BmnNdet.cxx.

References Print(), and Reset().

Here is the call graph for this function:

◆ EndOfEvent() [2/2]

virtual void BmnNdet::EndOfEvent ( )
virtual

◆ FinaliseTrackProcessing() [1/2]

bool BmnNdet::FinaliseTrackProcessing ( BmnNdetPoint * point)
Parameters
pointPointer to the hit
Returns
true if the track has non zero impact, otherwise removes it from collection and returns false

Definition at line 183 of file BmnNdet.cxx.

References FindHitIndex(), BmnNdetPoint::GetAddress(), BmnNdetAddress::GetInfoString(), and RemoveHit().

Referenced by ProcessHits().

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

◆ FinaliseTrackProcessing() [2/2]

bool BmnNdet::FinaliseTrackProcessing ( BmnNdetPoint * point)
Parameters
pointPointer to the hit
Returns
true if the track has non zero impact, otherwise removes it from collection and returns false

◆ FindHitIndex() [1/2]

Int_t BmnNdet::FindHitIndex ( int trackID,
uint32_t address )
Parameters
trackIDtrackID
addressBmnNdetAddress
Returns
index of the hit if found, otherwise -1

Definition at line 62 of file BmnNdet.cxx.

References fCollection, and i.

Referenced by FinaliseTrackProcessing(), and GetHit().

Here is the caller graph for this function:

◆ FindHitIndex() [2/2]

Int_t BmnNdet::FindHitIndex ( int trackID,
uint32_t address )
Parameters
trackIDtrackID
addressBmnNdetAddress
Returns
index of the hit if found, otherwise -1

◆ GetCollection() [1/2]

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

Definition at line 214 of file BmnNdet.cxx.

References fCollection, and fSurfaceCollection.

◆ GetCollection() [2/2]

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

◆ GetHit() [1/2]

BmnNdetPoint * BmnNdet::GetHit ( int trackID,
uint32_t address )
Parameters
trackIDtrackID
addressBmnNdetAddress
Returns
Pointer to the hit if found, otherwise nullptr

Definition at line 76 of file BmnNdet.cxx.

References fCollection, and FindHitIndex().

Referenced by ProcessHits().

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

◆ GetHit() [2/2]

BmnNdetPoint * BmnNdet::GetHit ( int trackID,
uint32_t address )
Parameters
trackIDtrackID
addressBmnNdetAddress
Returns
Pointer to the hit if found, otherwise nullptr

◆ GetSurfacePoint() [1/2]

int BmnNdet::GetSurfacePoint ( int start_track_id)
Parameters
start_track_idtrack index

Definition at line 319 of file BmnNdet.cxx.

References BmnNdetGeo::FromOutside, fSurfaceCollection, TParticle::GetFirstMother(), i, TParticle::IsPrimary(), and n.

Referenced by ProcessHits().

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

◆ GetSurfacePoint() [2/2]

int BmnNdet::GetSurfacePoint ( int start_track_id)
Parameters
start_track_idtrack index

References BmnNdet(), fCollection, fGeoHandler, and fSurfaceCollection.

Here is the call graph for this function:

◆ Initialize() [1/2]

void BmnNdet::Initialize ( )
virtual

Definition at line 49 of file BmnNdet.cxx.

◆ Initialize() [2/2]

virtual void BmnNdet::Initialize ( )
virtual

◆ Print() [1/2]

void BmnNdet::Print ( Option_t * ) const
virtual

Definition at line 224 of file BmnNdet.cxx.

References fCollection, and i.

Referenced by EndOfEvent().

Here is the caller graph for this function:

◆ Print() [2/2]

virtual void BmnNdet::Print ( Option_t * ) const
virtual

◆ ProcessHits() [1/2]

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

Definition at line 93 of file BmnNdet.cxx.

References AddHit(), CheckIfSensitive(), CheckIfVacuum(), fGeoHandler, FinaliseTrackProcessing(), fSurfaceCollection, GetBirkQCF(), GetHit(), BmnNdetAddress::GetInfoString(), GetSurfacePoint(), kNDET, BmnNdetPoint::SetAddress(), BmnNdetCell::SurfaceMCPoint, TLorentzVector::X(), TLorentzVector::Y(), and TLorentzVector::Z().

Here is the call graph for this function:

◆ ProcessHits() [2/2]

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

◆ Register() [1/2]

void BmnNdet::Register ( )
virtual

Definition at line 204 of file BmnNdet.cxx.

References fCollection, and fSurfaceCollection.

◆ Register() [2/2]

virtual void BmnNdet::Register ( )
virtual

◆ RemoveHit() [1/2]

void BmnNdet::RemoveHit ( Int_t index)
Parameters
indexhit index

Definition at line 309 of file BmnNdet.cxx.

References fCollection.

Referenced by FinaliseTrackProcessing().

Here is the caller graph for this function:

◆ RemoveHit() [2/2]

void BmnNdet::RemoveHit ( Int_t index)
Parameters
indexhit index

◆ Reset() [1/2]

void BmnNdet::Reset ( )
virtual

Definition at line 237 of file BmnNdet.cxx.

References fCollection, and fSurfaceCollection.

Referenced by EndOfEvent().

Here is the caller graph for this function:

◆ Reset() [2/2]

virtual void BmnNdet::Reset ( )
virtual

Member Data Documentation

◆ fCollection

TClonesArray * BmnNdet::fCollection
private

◆ fGeoHandler

BmnNdetGeo * BmnNdet::fGeoHandler
private

Definition at line 113 of file BmnNdet.h.

Referenced by BmnNdet(), BmnNdet(), ~BmnNdet(), ConstructGeometry(), GetSurfacePoint(), and ProcessHits().

◆ fSurfaceCollection

TClonesArray * BmnNdet::fSurfaceCollection
private

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