BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnVacWall.h
Go to the documentation of this file.
1#ifndef BMNVACWALL_H
2#define BMNVACWALL_H
3
4#include "BmnZdcGeo.h"
5#include "FairDetector.h"
6#include "FairMCPoint.h"
7#include "TClonesArray.h"
8#include "TLorentzVector.h"
9#include "TVector3.h"
10
11class BmnVacWall : public FairDetector
12{
13 public:
14 /** Default constructor **/
16
17 /** Standard constructor.
18 *@param name Detector name
19 *@param active Sensitivity flag
20 **/
21 BmnVacWall(const char* name, Bool_t active);
22
23 /** Destructor **/
24 virtual ~BmnVacWall();
25
26 /** Initialises detector and FairRun **/
27 virtual void Initialize();
28
29 /** Processes hits and creates FairMCPoints.
30 *@param vol Pointer to the active volume
31 *@return kTRUE if the volume is sensitive and a hit is processed, otherwise kFALSE
32 **/
33 virtual Bool_t ProcessHits(FairVolume* vol = nullptr);
34
35 /** Called at the end of each event **/
36 virtual void EndOfEvent();
37
38 /** Called at the beginning of each event **/
39 virtual void BeginEvent();
40
41 /** Registers the hit collection in the ROOT manager **/
42 virtual void Register();
43
44 /** Accessor to the hit collection
45 *@param iColl Index of the collection
46 *@return Pointer to the hit collection
47 **/
48 virtual TClonesArray* GetCollection(Int_t iColl) const;
49
50 /** Screen output of hit collection **/
51 virtual void Print(Option_t*) const;
52
53 /** Clears the hit collection **/
54 virtual void Reset();
55
56 /** Constructs geometry from files **/
57 virtual void ConstructGeometry();
58
59 /** Checks whether a volume is sensitive based on its name.
60 *@param name Volume name
61 *@return kTRUE if the volume is sensitive, otherwise kFALSE
62 **/
63 virtual Bool_t CheckIfSensitive(std::string name);
64
65 /** Adds the hit to hits collection.
66 *@param point FairMCPoint
67 *@return Pointer to the hit
68 **/
70
71 /** Remove hit from hits collection by index.
72 *@param index hit index
73 **/
74 void RemoveHit(Int_t index);
75
76 private:
78 TClonesArray* fCollection; // Output collection
79
81};
82
83#endif
bool Bool_t
int Int_t
const char Option_t
#define ClassDef(name, id)
virtual void Register()
Registers the hit collection in the ROOT manager.
virtual void EndOfEvent()
Called at the end of each event.
virtual void BeginEvent()
Called at the beginning of each event.
TClonesArray * fCollection
Definition BmnVacWall.h:78
virtual void ConstructGeometry()
Constructs geometry from files.
BmnZdcGeo * fGeoHandler
Definition BmnVacWall.h:77
void RemoveHit(Int_t index)
Remove hit from hits collection by index.
BmnVacWall(const char *name, Bool_t active)
Standard constructor.
FairMCPoint * AddHit(FairMCPoint *point)
Adds the hit to hits collection.
virtual void Reset()
Clears the hit collection.
virtual void Print(Option_t *) const
Screen output of hit collection.
virtual ~BmnVacWall()
Destructor.
virtual void Initialize()
Initialises detector and FairRun.
BmnVacWall()
Default constructor.
virtual Bool_t ProcessHits(FairVolume *vol=nullptr)
Processes hits and creates FairMCPoints.
virtual TClonesArray * GetCollection(Int_t iColl) const
Accessor to the hit collection.
virtual Bool_t CheckIfSensitive(std::string name)
Checks whether a volume is sensitive based on its name.