BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
BmnNdet.h
Go to the documentation of this file.
1
#ifndef BMNNDET_H
2
#define BMNNDET_H
3
4
#include "
BmnNdetGeo.h
"
5
#include "
BmnNdetGeoPar.h
"
6
#include "
BmnNdetPoint.h
"
7
#include "FairDetector.h"
8
#include "
TClonesArray.h
"
9
#include "
TLorentzVector.h
"
10
#include "
TVector3.h
"
11
12
#include <boost/functional/hash.hpp>
13
#include <map>
14
#include <string>
15
#include <unordered_map>
16
17
class
BmnNdet
:
public
FairDetector
18
{
19
public
:
20
/** Default constructor **/
21
BmnNdet
();
22
23
/** Standard constructor.
24
*@param name Detector name
25
*@param active Sensitivity flag
26
**/
27
BmnNdet
(
const
char
* name,
Bool_t
active);
28
29
/** Destructor **/
30
virtual
~BmnNdet
();
31
32
/** Initialises detector and FairRun **/
33
virtual
void
Initialize
();
34
35
/** Processes hits and creates BmnNdetPoints.
36
*@param vol Pointer to the active volume
37
*@return kTRUE if the volume is sensitive and a hit is processed, otherwise kFALSE
38
**/
39
virtual
Bool_t
ProcessHits
(FairVolume* vol =
nullptr
);
40
41
/** Removes zero-energy hits
42
*@param point Pointer to the hit
43
*@return true if the track has non zero impact, otherwise removes it from collection and returns false
44
**/
45
bool
FinaliseTrackProcessing
(
BmnNdetPoint
* point);
46
47
/** Called at the end of each event **/
48
virtual
void
EndOfEvent
();
49
50
/** Called at the beginning of each event **/
51
virtual
void
BeginEvent
();
52
53
/** Registers the hit collection in the ROOT manager **/
54
virtual
void
Register
();
55
56
/** Accessor to the hit collection
57
*@param iColl Index of the collection
58
*@return Pointer to the hit collection
59
**/
60
virtual
TClonesArray
*
GetCollection
(
Int_t
iColl)
const
;
61
62
/** Screen output of hit collection **/
63
virtual
void
Print
(
Option_t
*)
const
;
64
65
/** Clears the hit collection **/
66
virtual
void
Reset
();
67
68
/** Constructs geometry from files **/
69
virtual
void
ConstructGeometry
();
70
71
/** Checks whether a volume is sensitive based on its name.
72
*@param name Volume name
73
*@return kTRUE if the volume is sensitive, otherwise kFALSE
74
**/
75
virtual
Bool_t
CheckIfSensitive
(std::string name);
76
77
/** Checks whether current volume is vacuum
78
*@return kTRUE if the volume is vacuum, otherwise kFALSE
79
**/
80
virtual
Bool_t
CheckIfVacuum
();
81
82
/** Retrieves the hit index corresponding to a specific address and trackID.
83
*@param trackID trackID
84
*@param address BmnNdetAddress
85
*@return index of the hit if found, otherwise -1
86
**/
87
Int_t
FindHitIndex
(
int
trackID, uint32_t address);
88
89
/** Retrieves the hit corresponding to a specific address and trackID.
90
*@param trackID trackID
91
*@param address BmnNdetAddress
92
*@return Pointer to the hit if found, otherwise nullptr
93
**/
94
BmnNdetPoint
*
GetHit
(
int
trackID, uint32_t address);
95
96
/** Adds the hit to hits collection.
97
*@param point BmnNdetPoint
98
*@return Pointer to the hit
99
**/
100
BmnNdetPoint
*
AddHit
(
BmnNdetPoint
* point);
101
102
/** Remove hit from hits collection by index.
103
*@param index hit index
104
**/
105
void
RemoveHit
(
Int_t
index);
106
107
/** Returns index of surface point.
108
*@param start_track_id track index
109
**/
110
int
GetSurfacePoint
(
int
start_track_id);
111
112
private
:
113
BmnNdetGeo
*
fGeoHandler
;
// Geometry handler
114
TClonesArray
*
fCollection
;
// Output Point collection
115
TClonesArray
*
fSurfaceCollection
;
// Output Surface Point collection
116
117
ClassDef
(
BmnNdet
, 8)
118
};
119
120
#endif
Bool_t
bool Bool_t
Int_t
int Int_t
Option_t
const char Option_t
ClassDef
#define ClassDef(name, id)
TClonesArray.h
TLorentzVector.h
TVector3.h
BmnNdetGeo
Definition
BmnNdetGeo.h:17
BmnNdetPoint
Definition
BmnNdetPoint.h:15
BmnNdet::ProcessHits
virtual Bool_t ProcessHits(FairVolume *vol=nullptr)
Processes hits and creates BmnNdetPoints.
Definition
BmnNdet.cxx:93
BmnNdet::~BmnNdet
virtual ~BmnNdet()
Destructor.
Definition
BmnNdet.cxx:35
BmnNdet::fGeoHandler
BmnNdetGeo * fGeoHandler
Definition
BmnNdet.h:113
BmnNdet::FindHitIndex
Int_t FindHitIndex(int trackID, uint32_t address)
Retrieves the hit index corresponding to a specific address and trackID.
Definition
BmnNdet.cxx:62
BmnNdet::fCollection
TClonesArray * fCollection
Definition
BmnNdet.h:114
BmnNdet::EndOfEvent
virtual void EndOfEvent()
Called at the end of each event.
Definition
BmnNdet.cxx:197
BmnNdet::BmnNdet
BmnNdet()
Default constructor.
Definition
BmnNdet.cxx:17
BmnNdet::AddHit
BmnNdetPoint * AddHit(BmnNdetPoint *point)
Adds the hit to hits collection.
Definition
BmnNdet.cxx:302
BmnNdet::GetCollection
virtual TClonesArray * GetCollection(Int_t iColl) const
Accessor to the hit collection.
Definition
BmnNdet.cxx:214
BmnNdet::CheckIfVacuum
virtual Bool_t CheckIfVacuum()
Checks whether current volume is vacuum.
Definition
BmnNdet.cxx:297
BmnNdet::CheckIfSensitive
virtual Bool_t CheckIfSensitive(std::string name)
Checks whether a volume is sensitive based on its name.
Definition
BmnNdet.cxx:289
BmnNdet::FinaliseTrackProcessing
bool FinaliseTrackProcessing(BmnNdetPoint *point)
Removes zero-energy hits.
Definition
BmnNdet.cxx:183
BmnNdet::ConstructGeometry
virtual void ConstructGeometry()
Constructs geometry from files.
Definition
BmnNdet.cxx:244
BmnNdet::Reset
virtual void Reset()
Clears the hit collection.
Definition
BmnNdet.cxx:237
BmnNdet::Register
virtual void Register()
Registers the hit collection in the ROOT manager.
Definition
BmnNdet.cxx:204
BmnNdet::GetSurfacePoint
int GetSurfacePoint(int start_track_id)
Returns index of surface point.
Definition
BmnNdet.cxx:319
BmnNdet::fSurfaceCollection
TClonesArray * fSurfaceCollection
Definition
BmnNdet.h:115
BmnNdet::RemoveHit
void RemoveHit(Int_t index)
Remove hit from hits collection by index.
Definition
BmnNdet.cxx:309
BmnNdet::GetHit
BmnNdetPoint * GetHit(int trackID, uint32_t address)
Retrieves the hit corresponding to a specific address and trackID.
Definition
BmnNdet.cxx:76
BmnNdet::Initialize
virtual void Initialize()
Initialises detector and FairRun.
Definition
BmnNdet.cxx:49
BmnNdet::BeginEvent
virtual void BeginEvent()
Called at the beginning of each event.
Definition
BmnNdet.cxx:57
BmnNdet::Print
virtual void Print(Option_t *) const
Screen output of hit collection.
Definition
BmnNdet.cxx:224
FairDetector
TClonesArray
BmnNdetGeoPar.h
BmnNdetGeo.h
BmnNdetPoint.h
detectors
ndet
BmnNdet.h
Generated on
for BmnRoot by
1.17.0