1 |
nikolas |
1.1 |
#ifndef PAMVMCTRKID_H |
2 |
|
|
#define PAMVMCTRKID_H |
3 |
|
|
#include <iostream> |
4 |
|
|
#include "TVirtualMC.h" |
5 |
|
|
#include "pGeoID.h" |
6 |
|
|
|
7 |
|
|
#define TRKOF 2 |
8 |
|
|
|
9 |
|
|
using std::cout; |
10 |
|
|
using std::endl; |
11 |
|
|
|
12 |
|
|
struct pTrkID: public pGeoID { |
13 |
|
|
Int_t plNo; |
14 |
|
|
Int_t padNo; |
15 |
|
|
|
16 |
|
|
|
17 |
|
|
pTrkID(): plNo(-1), padNo(-1) {}; |
18 |
|
|
pTrkID(Int_t offset): pGeoID(offset), plNo(-1), padNo(-1) {}; |
19 |
|
|
pTrkID & operator = (const pTrkID &pid) { |
20 |
|
|
plNo=pid.plNo; |
21 |
|
|
padNo=pid.padNo; |
22 |
|
|
return *this; |
23 |
|
|
} |
24 |
|
|
|
25 |
|
|
Bool_t FillVolID(){ |
26 |
|
|
Bool_t t=kFALSE; |
27 |
|
|
if(gMC) { |
28 |
|
|
Int_t TRPB; |
29 |
|
|
gMC->CurrentVolOffID(3,TRPB); |
30 |
|
|
TRPB==2 ? plNo=6 : gMC->CurrentVolOffID(4,plNo); |
31 |
|
|
gMC->CurrentVolOffID(1,padNo); |
32 |
|
|
t= kTRUE; |
33 |
|
|
} |
34 |
|
|
return t; |
35 |
|
|
} |
36 |
|
|
|
37 |
|
|
Int_t GetID() const { return (plNo-1)*6+padNo; } |
38 |
|
|
|
39 |
|
|
void Print(const Option_t* ="") const { |
40 |
|
|
cout << " pTrkID : plNo " << plNo <<endl; |
41 |
pam-rm2 |
1.5 |
cout << " pTrkID : padNo " << padNo <<endl; |
42 |
nikolas |
1.1 |
} |
43 |
|
|
|
44 |
|
|
}; |
45 |
pam-rm2 |
1.5 |
#endif //PAMVMCTrkID_H |
46 |
nikolas |
1.1 |
|
47 |
|
|
|
48 |
pam-rm2 |
1.5 |
|
49 |
|
|
|
50 |
|
|
#ifndef PAMVMCTPANID_H |
51 |
|
|
#define PAMVMCTPANID_H |
52 |
|
|
struct pTrkTPAN_ID: public pGeoID { |
53 |
|
|
Int_t plNo; |
54 |
|
|
|
55 |
|
|
pTrkTPAN_ID(): plNo(-1) {}; |
56 |
|
|
pTrkTPAN_ID(Int_t offset): pGeoID(offset), plNo(-1){}; |
57 |
|
|
pTrkTPAN_ID & operator = (const pTrkTPAN_ID &pid) { |
58 |
|
|
plNo=pid.plNo; |
59 |
|
|
return *this; |
60 |
|
|
} |
61 |
|
|
|
62 |
|
|
Bool_t FillVolID(){ |
63 |
|
|
Bool_t t=kFALSE; |
64 |
|
|
if(gMC) { |
65 |
|
|
Int_t TRPB; |
66 |
|
|
gMC->CurrentVolOffID(2,TRPB); |
67 |
|
|
TRPB==2 ? plNo=6 : gMC->CurrentVolOffID(3,plNo); |
68 |
|
|
t= kTRUE; |
69 |
|
|
} |
70 |
|
|
return t; |
71 |
|
|
} |
72 |
|
|
|
73 |
|
|
Int_t GetID() const { return (plNo-1); } |
74 |
|
|
|
75 |
|
|
void Print(const Option_t* ="") const { |
76 |
|
|
cout << " pTrkTPAN_ID : plNo " << plNo <<endl; |
77 |
|
|
} |
78 |
|
|
|
79 |
|
|
}; |
80 |
|
|
#endif //PAMVMCTPANID_H |
81 |
|
|
|
82 |
|
|
#ifndef PAMVMCTRCNID_H |
83 |
|
|
#define PAMVMCTRCNID_H |
84 |
|
|
struct pTrkTRCN_ID: public pGeoID { |
85 |
|
|
Int_t plNo; |
86 |
|
|
Int_t padNo; |
87 |
|
|
|
88 |
|
|
pTrkTRCN_ID(): plNo(-1), padNo(-1) {}; |
89 |
|
|
pTrkTRCN_ID(Int_t offset): pGeoID(offset), plNo(-1), padNo(-1) {}; |
90 |
|
|
pTrkTRCN_ID & operator = (const pTrkTRCN_ID &pid) { |
91 |
|
|
plNo=pid.plNo; |
92 |
|
|
padNo=pid.padNo; |
93 |
|
|
return *this; |
94 |
|
|
} |
95 |
|
|
|
96 |
|
|
Bool_t FillVolID(){ |
97 |
|
|
Bool_t t=kFALSE; |
98 |
|
|
if(gMC) { |
99 |
|
|
Int_t TRPB; |
100 |
|
|
gMC->CurrentVolOffID(3,TRPB); |
101 |
|
|
TRPB==2 ? plNo=6 : gMC->CurrentVolOffID(4,plNo); |
102 |
|
|
gMC->CurrentVolOffID(1,padNo); |
103 |
|
|
t= kTRUE; |
104 |
|
|
} |
105 |
|
|
return t; |
106 |
|
|
} |
107 |
|
|
|
108 |
|
|
Int_t GetID() const { return (plNo-1)*4+padNo; } // 1- 2- 3- 4 first plane |
109 |
|
|
//21-22-23-24 last plane |
110 |
|
|
|
111 |
|
|
void Print(const Option_t* ="") const { |
112 |
|
|
cout << " pTrkTRCN_ID : plNo " << plNo <<endl; |
113 |
|
|
cout << " pTrkTRCN_ID : padNo " << padNo <<endl; |
114 |
|
|
} |
115 |
|
|
}; |
116 |
|
|
#endif //PAMVMCTrkTRCN_ID_H |
117 |
|
|
|
118 |
|
|
#ifndef PAMVMCTRSLID_H |
119 |
|
|
#define PAMVMCTRSLID_H |
120 |
|
|
struct pTrkTRSL_ID: public pGeoID { |
121 |
|
|
Int_t plNo; |
122 |
|
|
Int_t padNo; |
123 |
|
|
|
124 |
|
|
pTrkTRSL_ID(): plNo(-1), padNo(-1) {}; |
125 |
|
|
pTrkTRSL_ID(Int_t offset): pGeoID(offset), plNo(-1), padNo(-1) {}; |
126 |
|
|
pTrkTRSL_ID & operator = (const pTrkTRSL_ID &pid) { |
127 |
|
|
plNo=pid.plNo; |
128 |
|
|
padNo=pid.padNo; |
129 |
|
|
return *this; |
130 |
|
|
} |
131 |
|
|
|
132 |
|
|
Bool_t FillVolID(){ |
133 |
|
|
Bool_t t=kFALSE; |
134 |
|
|
if(gMC) { |
135 |
|
|
Int_t TRPB; |
136 |
|
|
gMC->CurrentVolOffID(2,TRPB); |
137 |
|
|
TRPB==2 ? plNo=6 : gMC->CurrentVolOffID(3,plNo); |
138 |
|
|
gMC->CurrentVolID(padNo); |
139 |
|
|
t= kTRUE; |
140 |
|
|
} |
141 |
|
|
return t; |
142 |
|
|
} |
143 |
|
|
|
144 |
|
|
Int_t GetID() const { return (plNo-1)*6+padNo; } |
145 |
|
|
|
146 |
|
|
void Print(const Option_t* ="") const { |
147 |
|
|
cout << " pTrkTRSL_ID : plNo " << plNo <<endl; |
148 |
|
|
cout << " pTrkTRSL_ID : padNo " << padNo <<endl; |
149 |
|
|
} |
150 |
|
|
}; |
151 |
|
|
#endif //PAMVMCTrkID_H |