BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnScWall.h
Go to the documentation of this file.
1/******************************************************************************
2 *
3 * Class BmnScWall
4 *
5 * Created by: Sergei Merts
6 * e-mail: merts@jinr.ru
7 * Version: 28-03-2021
8 *
9 * Modified by M.Golubeva April 2021
10 *
11 *****************************************************************************/
12
13#ifndef BMNSCWALL_H
14#define BMNSCWALL_H
15
16#include "BmnScWallGeoPar.h"
17#include "BmnScWallPoint.h"
18#include "FairDetector.h"
19#include "TClonesArray.h"
20#include "TLorentzVector.h"
21#include "TParticle.h"
22#include "TVector3.h"
23#include "TVirtualMC.h"
24
25class BmnScWall : public FairDetector
26{
27 public:
28 /** Default constructor **/
29 BmnScWall();
30
31 /** Standard constructor.
32 *@param name detetcor name
33 *@param active sensitivity flag
34 **/
35 BmnScWall(const char* name, Bool_t active);
36
37 /** Destructor **/
38 virtual ~BmnScWall();
39
40 /** Virtual method Initialize
41 ** Initialises detector. Stores volume IDs for MUO detector and mirror.
42 **/
43 virtual void Initialize();
44
45 /** Virtual method ProcessHits
46 **
47 ** Defines the action to be taken when a step is inside the
48 ** active volume. Creates BmnBdPoints and BmnBdMirrorPoints and adds
49 ** them to the collections.
50 *@param vol Pointer to the active volume
51 **/
52 virtual Bool_t ProcessHits(FairVolume* vol = 0);
53
54 /** Virtual method EndOfEvent
55 **
56 ** If verbosity level is set, print hit collection at the
57 ** end of the event and resets it afterwards.
58 **/
59 virtual void EndOfEvent();
60
61 // virtual void SetSpecialPhysicsCuts() { ; }
62 virtual void BeginEvent() { ; }
63 virtual void FinishPrimary() { ; }
64 virtual void FinishRun() { ; }
65 virtual void BeginPrimary() { ; }
66 virtual void PostTrack() { ; }
67 virtual void PreTrack() { ; }
68
69 /** Virtual method Register
70 **
71 ** Registers the hit collection in the ROOT manager.
72 **/
73 virtual void Register();
74
75 /** Accessor to the hit collection **/
76 virtual TClonesArray* GetCollection(Int_t iColl) const;
77
78 /** Virtual method Print
79 **
80 ** Screen output of hit collection.
81 **/
82 virtual void Print(Option_t*) const;
83
84 /** Virtual method Reset
85 **
86 ** Clears the hit collection
87 **/
88 virtual void Reset();
89
90 /** Virtual method Construct geometry
91 **
92 **/
93 virtual void ConstructGeometry();
94 virtual Bool_t CheckIfSensitive(std::string name);
95
97 BmnScWallPoint* GetHit(Int_t slice, Int_t cell) const;
106
107 BmnScWallPoint* AddHit(Int_t trackID,
108 Int_t detID,
109 Int_t copyNo,
110 Int_t copyNoMother,
111 TVector3 pos,
112 TVector3 mom,
113 Double_t tof,
114 Double_t length,
115 Double_t eLoss);
116
117 private:
118 Int_t fTrackID; //! track index
119 Int_t fVolumeID; //! volume id
120 Int_t fEventID; //! event id
129 TVector3 fPos; //! position (in)
130 TVector3 fMom; //! momentum (in)
132 Double32_t fLength; //! length
133 Double32_t fELoss; //! energy loss
134 Int_t volDetector; //! MC volume ID of MUO
135
136 TClonesArray* fScWallCollection; //! Hit collection
137
138 // reset all parameters
139 void ResetParameters();
140 BmnScWall(const BmnScWall&) = delete;
141 BmnScWall operator=(const BmnScWall&) = delete;
142
144};
145
146//-----------------------------------------------------------------------------
148{
149 fTrackID = fVolumeID = 0;
150 fPos.SetXYZ(0.0, 0.0, 0.0);
151 fMom.SetXYZ(0.0, 0.0, 0.0);
152 fTime = fLength = fELoss = 0;
153};
154//-----------------------------------------------------------------------------
155
156#endif
int i
Definition P4_F32vec4.h:22
bool Bool_t
int Int_t
double Double32_t
double Double_t
const char Option_t
#define ClassDef(name, id)
BmnScWall()
Default constructor.
Definition BmnScWall.cxx:31
BmnScWallPoint * AddHit(Int_t trackID, Int_t detID, Int_t copyNo, Int_t copyNoMother, TVector3 pos, TVector3 mom, Double_t tof, Double_t length, Double_t eLoss)
Int_t fVolumeID
track index
Definition BmnScWall.h:119
virtual void BeginEvent()
Definition BmnScWall.h:62
Int_t fCellLargeCutVolId
Definition BmnScWall.h:127
Int_t GetCellSmallTrapVolId_20mm()
Definition BmnScWall.h:103
virtual void FinishRun()
Definition BmnScWall.h:64
BmnScWall(const BmnScWall &)=delete
virtual Bool_t ProcessHits(FairVolume *vol=0)
Virtual method ProcessHits.
Int_t GetCellLargeTrapVolId()
Definition BmnScWall.h:105
Int_t GetCellSmallCutVolId_20mm()
Definition BmnScWall.h:100
void ResetParameters()
Hit collection.
Definition BmnScWall.h:147
virtual Bool_t CheckIfSensitive(std::string name)
virtual void Reset()
Virtual method Reset.
Int_t fCellSmallTrapVolId_10mm
Definition BmnScWall.h:125
Int_t fCellSmallCutVolId_20mm
Definition BmnScWall.h:123
BmnScWallPoint * GetHit(Int_t i) const
Definition BmnScWall.cxx:98
virtual void ConstructGeometry()
Virtual method Construct geometry.
Double32_t fTime
momentum (in)
Definition BmnScWall.h:131
virtual void BeginPrimary()
Definition BmnScWall.h:65
Int_t fTrackID
Definition BmnScWall.h:118
TVector3 fPos
Definition BmnScWall.h:129
Int_t fCellSmallCutVolId_10mm
Definition BmnScWall.h:122
virtual void PostTrack()
Definition BmnScWall.h:66
Int_t volDetector
energy loss
Definition BmnScWall.h:134
Int_t GetCellSmallCutVolId()
Definition BmnScWall.h:98
virtual void FinishPrimary()
Definition BmnScWall.h:63
Int_t GetCellLargeCutVolId()
Definition BmnScWall.h:104
TVector3 fMom
position (in)
Definition BmnScWall.h:130
virtual TClonesArray * GetCollection(Int_t iColl) const
Accessor to the hit collection.
virtual void EndOfEvent()
Virtual method EndOfEvent.
Int_t fCellSmallTrapVolId
Definition BmnScWall.h:124
Int_t fCellSmallTrapVolId_20mm
Definition BmnScWall.h:126
Int_t GetCellSmallTrapVolId()
Definition BmnScWall.h:101
Int_t fEventID
volume id
Definition BmnScWall.h:120
Int_t fCellSmallCutVolId
event id
Definition BmnScWall.h:121
Int_t GetCellSmallCutVolId_10mm()
Definition BmnScWall.h:99
virtual void Print(Option_t *) const
Virtual method Print.
Int_t GetCellSmallTrapVolId_10mm()
Definition BmnScWall.h:102
Double32_t fLength
time
Definition BmnScWall.h:132
Double32_t fELoss
length
Definition BmnScWall.h:133
BmnScWall operator=(const BmnScWall &)=delete
virtual void Register()
Virtual method Register.
virtual ~BmnScWall()
Destructor.
Definition BmnScWall.cxx:68
TClonesArray * fScWallCollection
MC volume ID of MUO.
Definition BmnScWall.h:136
virtual void PreTrack()
Definition BmnScWall.h:67
Int_t fCellLargeTrapVolId
Definition BmnScWall.h:128
virtual void Initialize()
Virtual method Initialize Initialises detector.
Definition BmnScWall.cxx:77