BmnRoot 26.10.0-19-g6979a6c6
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnTOF1Point.h
Go to the documentation of this file.
1//--------------------------------------------------------------------------------------------------------------------------------------
2#ifndef __BMNTOF1POINT_H
3#define __BMNTOF1POINT_H 1
4
5#include "FairMCPoint.h"
6
7#include <TVector3.h>
8
9//--------------------------------------------------------------------------------------------------------------------------------------
11{
12 public:
14 virtual ~BmnTOF1Point();
15
16 /** Constructor with arguments
17 *@param trackID Index of MCTrack
18 *@param detID Detector ID: kTOF1 for TOF400 or kTOF701 fot TOF700
19 *@param pos Ccoordinates at entrance to active volume [cm]
20 *@param mom Momentum of track at entrance [GeV]
21 *@param tof Time since event start [ns]
22 *@param length Track length since creation [cm]
23 *@param eLoss Energy deposit [GeV]
24 *@param detUID Unique Identification Number
25 **/
26 BmnTOF1Point(Int_t trackID,
27 Int_t detID,
28 TVector3 pos,
29 TVector3 mom,
30 Double_t tof,
31 Double_t length,
32 Double_t eLoss,
33 Int_t detUID);
34
35 virtual void Print(const Option_t* opt) const;
36
37 // CATION: stripID MAX_VALUE = 255, moduleID MAX_VALUE = 255, regionID MAX_VALUE = 255
38 Int_t GetStrip() const { return (fDetectorUID & 0x000000FF); };
39 Int_t GetModule() const { return (fDetectorUID & 0x0000FF00) >> 8; };
40 Int_t GetRegion() const { return (fDetectorUID & 0x00FF0000) >> 16; };
41 Int_t GetVolumeUID() const { return fDetectorUID; };
42
43 static Int_t GetStrip(Int_t uid) { return (uid & 0x000000FF); };
44 static Int_t GetModule(Int_t uid) { return (uid & 0x0000FF00) >> 8; };
45 static Int_t GetRegion(Int_t uid) { return (uid & 0x00FF0000) >> 16; };
46 static Int_t GetVolumeUID(Int_t regID, Int_t modID, Int_t stripID)
47 {
48#ifdef DEBUG
49 Int_t uid = (regID << 16) | (modID << 8) | stripID;
50 Int_t region = GetRegion(uid);
51 Int_t module = GetModule(uid);
52 Int_t strip = GetStrip(uid);
53 assert(region == regID);
54 assert(module == modID);
55 assert(strip == stripID);
56 return uid;
57#else
58 return (regID << 16) | (modID << 8) | stripID;
59#endif
60 };
61
62 private:
63 Int_t fDetectorUID; ///< Unique Identification Number.
64
66};
67
68#endif
69//--------------------------------------------------------------------------------------------------------------------------------------
int Int_t
double Double_t
const char Option_t
#define ClassDef(name, id)
Int_t GetVolumeUID() const
static Int_t GetStrip(Int_t uid)
Int_t GetModule() const
virtual ~BmnTOF1Point()
Int_t GetRegion() const
Int_t fDetectorUID
Unique Identification Number.
Int_t GetStrip() const
static Int_t GetModule(Int_t uid)
static Int_t GetRegion(Int_t uid)
virtual void Print(const Option_t *opt) const
static Int_t GetVolumeUID(Int_t regID, Int_t modID, Int_t stripID)