BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnFHCalPoint.h
Go to the documentation of this file.
1#ifndef BMNFHCALPOINT_H
2#define BMNFHCALPOINT_H
3
4#include "BmnFHCalAddress.h"
5#include "FairMCPoint.h"
6#include "TVector3.h"
7
8#include <iostream>
9
11{
12 public:
13 //! Default constructor
15 : FairMCPoint()
16 {
17 SetDetectorID(kFHCAL);
18 }
19
20 /*! Constructor with arguments
21 * @param trackID Index of MCTrack
22 * @param address Unique address (see BmnFHCalAddress)
23 * @param pos Coordinates [cm]
24 * @param mom Momentum of track [GeV]
25 * @param tof Time of flight [ns]
26 * @param length Track length since creation [cm]
27 * @param eLoss Energy deposit [GeV]
28 * @param EventId Event ID (default 0)
29 */
31 uint32_t address,
32 const TVector3& pos,
33 const TVector3& mom,
34 Double_t tof,
35 Double_t length,
36 Double_t eLoss,
37 UInt_t EventId = 0)
38 : FairMCPoint(trackID, address, pos, mom, tof, length, eLoss, EventId)
39 {}
40
41 //! Copy constructor
42 BmnFHCalPoint(const BmnFHCalPoint& point) = default;
43
44 //! Move constructor
45 BmnFHCalPoint(BmnFHCalPoint&& point) noexcept = default;
46
47 //! Copy assignment operator
48 BmnFHCalPoint& operator=(const BmnFHCalPoint& point) = default;
49
50 //! Move assignment operator
51 BmnFHCalPoint& operator=(BmnFHCalPoint&& point) noexcept = default;
52
53 //! Destructor
54 virtual ~BmnFHCalPoint() = default;
55
56 //! Address manipulation
57 void SetAddress(uint32_t address) { SetDetectorID(address); }
58 uint32_t GetAddress() const { return GetDetectorID(); }
59 uint32_t GetSystemId() const { return BmnFHCalAddress::GetSystemId(GetAddress()); }
61 uint32_t GetModuleId() const { return BmnFHCalAddress::GetModuleId(GetAddress()); }
64
65 //! Output to screen
66 virtual const char* GetClassName() const { return "BmnFHCalPoint"; }
67 virtual void Print(const Option_t* opt = "") const override
68 {
69 printf("%s:\n", GetClassName());
70 printf(" %s\n", BmnFHCalAddress::GetInfoString(GetAddress()).c_str());
71 FairMCPoint::Print(opt); // Call base class print
72 }
73
74 private:
76};
77
78#endif /* BMNFHCALPOINT_H */
int Int_t
unsigned int UInt_t
double Double_t
const char Option_t
#define ClassDefOverride(name, id)
@ kFHCAL
static uint32_t GetModuleId(uint32_t address)
Return Module id from address.
static uint32_t GetModuleType(uint32_t address)
Return Module id from address.
static std::string GetInfoString(uint32_t address)
Return a formatted string with all address components.
static uint32_t GetSectionId(uint32_t address)
Return Section id from address.
static uint32_t GetSystemId(uint32_t address)
Return System identifier from address.
static uint32_t GetScintillatorId(uint32_t address)
Return Scintillator id from address.
BmnFHCalPoint & operator=(const BmnFHCalPoint &point)=default
Copy assignment operator.
virtual const char * GetClassName() const
Output to screen.
uint32_t GetScintillatorId() const
virtual void Print(const Option_t *opt="") const override
BmnFHCalPoint()
Default constructor.
virtual ~BmnFHCalPoint()=default
Destructor.
BmnFHCalPoint(BmnFHCalPoint &&point) noexcept=default
Move constructor.
BmnFHCalPoint(const BmnFHCalPoint &point)=default
Copy constructor.
uint32_t GetSectionId() const
uint32_t GetModuleId() const
uint32_t GetAddress() const
uint32_t GetModuleType() const
uint32_t GetSystemId() const
void SetAddress(uint32_t address)
Address manipulation.
BmnFHCalPoint & operator=(BmnFHCalPoint &&point) noexcept=default
Move assignment operator.
BmnFHCalPoint(Int_t trackID, uint32_t address, const TVector3 &pos, const TVector3 &mom, Double_t tof, Double_t length, Double_t eLoss, UInt_t EventId=0)
Constructor with arguments.