BmnRoot
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//--------------------------------------------------------------------------------------------------------------------------------------
10class BmnTOF1Point : public FairMCPoint
11{
12 public:
14 virtual ~BmnTOF1Point();
15
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;
64
65 ClassDef(BmnTOF1Point, 2)
66};
67
68#endif
69//--------------------------------------------------------------------------------------------------------------------------------------
Int_t GetVolumeUID() const
static Int_t GetStrip(Int_t uid)
Int_t GetModule() const
virtual ~BmnTOF1Point()
Int_t GetRegion() const
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)