]>
Commit | Line | Data |
---|---|---|
a9e2aefa | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
cbc57deb | 15 | |
88cb7938 | 16 | /* $Id$ */ |
aac5be80 | 17 | |
30178c30 | 18 | #include <TMath.h> |
19 | ||
20 | #include "AliMUONTriggerCircuit.h" | |
a9e2aefa | 21 | #include "AliRun.h" |
22 | #include "AliMUON.h" | |
aac5be80 | 23 | #include "AliMUONTriggerConstants.h" |
331dcacd | 24 | #include "AliMUONGeometrySegmentation.h" |
a9e2aefa | 25 | #include "AliMUONChamber.h" |
3f434b6f | 26 | #include "AliMUONConstants.h" |
8c343c7c | 27 | #include "AliLog.h" |
a9e2aefa | 28 | |
29 | ClassImp(AliMUONTriggerCircuit) | |
30 | ||
a9e2aefa | 31 | //---------------------------------------------------------------------- |
30178c30 | 32 | AliMUONTriggerCircuit::AliMUONTriggerCircuit() |
331dcacd | 33 | : TObject(), |
34 | fIdCircuit(0), | |
35 | fX2m(0), | |
36 | fX2ud(0) | |
37 | // fSegmentationType(1) | |
a9e2aefa | 38 | { |
39 | // Constructor | |
331dcacd | 40 | |
a9e2aefa | 41 | fOrMud[0]=fOrMud[1]=0; |
aac5be80 | 42 | Int_t i; |
43 | for (i=0; i<4; i++) { | |
a9e2aefa | 44 | for (Int_t j=0; j<32; j++) { |
45 | fXcode[i][j]=0; | |
46 | fYcode[i][j]=0; | |
47 | } | |
48 | } | |
aac5be80 | 49 | for (i=0; i<16; i++) { fXpos11[i]=0.; } |
50 | for (i=0; i<31; i++) { fYpos11[i]=0.; } | |
51 | for (i=0; i<63; i++) { fYpos21[i]=0.; } | |
a9e2aefa | 52 | } |
53 | ||
54 | //---------------------------------------------------------------------- | |
30178c30 | 55 | AliMUONTriggerCircuit::AliMUONTriggerCircuit(const AliMUONTriggerCircuit& theMUONTriggerCircuit) |
56 | : TObject(theMUONTriggerCircuit) | |
a9e2aefa | 57 | { |
30178c30 | 58 | // Protected copy constructor |
59 | ||
8c343c7c | 60 | AliFatal("Not implemented."); |
a9e2aefa | 61 | } |
62 | ||
63 | //---------------------------------------------------------------------- | |
30178c30 | 64 | AliMUONTriggerCircuit & |
65 | AliMUONTriggerCircuit::operator=(const AliMUONTriggerCircuit& rhs) | |
a9e2aefa | 66 | { |
30178c30 | 67 | // Protected assignement operator |
68 | ||
69 | if (this == &rhs) return *this; | |
70 | ||
8c343c7c | 71 | AliFatal("Not implemented."); |
30178c30 | 72 | |
73 | return *this; | |
a9e2aefa | 74 | } |
75 | ||
76 | //---------------------------------------------------------------------- | |
77 | void AliMUONTriggerCircuit::Init(Int_t iCircuit) { | |
78 | // initialize circuit characteristics | |
ecfa008b | 79 | fIdCircuit=AliMUONTriggerConstants::CircuitId(iCircuit); |
331dcacd | 80 | AliMUON *pMUON = (AliMUON*)gAlice->GetModule("MUON"); |
81 | ||
a9e2aefa | 82 | LoadX2(); |
83 | LoadXCode(); | |
84 | LoadYCode(); | |
331dcacd | 85 | |
002920d1 | 86 | if (pMUON->WhichSegmentation() == 1) |
87 | AliFatal("Old Segmentation no more supported."); | |
88 | ||
89 | LoadXPos2(); | |
90 | LoadYPos2(); | |
91 | ||
a9e2aefa | 92 | } |
93 | ||
94 | //---------------------------------------------------------------------- | |
30178c30 | 95 | Int_t AliMUONTriggerCircuit::CircuitNumber(Int_t idCircuit) const { |
a9e2aefa | 96 | // returns circuit number iCircuit (0-234) corresponding to circuit idCircuit |
97 | Int_t iCircuit=0; | |
98 | for (Int_t i=0; i<234; i++) { | |
aac5be80 | 99 | if (AliMUONTriggerConstants::CircuitId(i)==idCircuit) { |
a9e2aefa | 100 | iCircuit=i; |
101 | break; | |
102 | } | |
103 | } | |
104 | return iCircuit; | |
105 | } | |
106 | //---------------------------------------------------------------------- | |
30178c30 | 107 | Int_t AliMUONTriggerCircuit::ModuleNumber(Int_t idModule) const { |
a9e2aefa | 108 | // returns module number imod (from 0 to 63) corresponding to module idmodule |
109 | Int_t absidModule=TMath::Abs(idModule); | |
110 | Int_t iModule=0; | |
111 | for (Int_t i=0; i<63; i++) { | |
aac5be80 | 112 | if (AliMUONTriggerConstants::ModuleId(i)==absidModule) { |
a9e2aefa | 113 | iModule=i; |
114 | break; | |
115 | } | |
116 | } | |
117 | return iModule; | |
118 | } | |
119 | ||
120 | //---------------------------------------------------------------------- | |
30178c30 | 121 | Int_t AliMUONTriggerCircuit::Module(Int_t idCircuit) const { |
a9e2aefa | 122 | // returns ModuleId where Circuit idCircuit is sitting |
123 | return Int_t(idCircuit/10); | |
124 | } | |
125 | //---------------------------------------------------------------------- | |
30178c30 | 126 | Int_t AliMUONTriggerCircuit::Position(Int_t idCircuit) const { |
a9e2aefa | 127 | // returns position of idCircuit in correcponding Module |
128 | return TMath::Abs(idCircuit)-TMath::Abs(Module(idCircuit))*10; | |
129 | } | |
130 | ||
131 | //---------------------------------------------------------------------- | |
132 | void AliMUONTriggerCircuit::LoadX2() { | |
ecfa008b | 133 | // initialize fX2m, fX2ud and fOrMud |
a9e2aefa | 134 | |
ecfa008b | 135 | Int_t idModule=Module(fIdCircuit); // corresponding module Id. |
aac5be80 | 136 | // and its number of X strips |
137 | Int_t nStrX=AliMUONTriggerConstants::NstripX(ModuleNumber(idModule)); | |
138 | // and its number of Y strips | |
139 | Int_t nStrY=AliMUONTriggerConstants::NstripY(ModuleNumber(idModule)); | |
ecfa008b | 140 | Int_t iPosCircuit=Position(fIdCircuit); // position of circuit in module |
a9e2aefa | 141 | |
142 | // first step : look at lower part | |
143 | if (iPosCircuit==1) { // need to scan lower module | |
144 | if(idModule<91&&TMath::Abs(idModule)!=41&&idModule>-91) { | |
145 | fOrMud[0]=1; | |
146 | Int_t idModuleD=(TMath::Abs(idModule)+10)*(TMath::Abs(idModule)/idModule); | |
aac5be80 | 147 | Int_t nStrD=AliMUONTriggerConstants::NstripY(ModuleNumber(idModuleD)); |
a9e2aefa | 148 | |
149 | if (nStrY!=nStrD | |
150 | &&TMath::Abs(idModule)!=42&&TMath::Abs(idModule)!=52) { | |
ecfa008b | 151 | if (nStrY==8) fX2m=1; |
152 | if (nStrD==8) fX2ud=1; | |
a9e2aefa | 153 | } |
154 | } | |
155 | ||
156 | } else { // lower strips within same module | |
157 | fOrMud[0]=0; | |
158 | } | |
159 | ||
160 | // second step : look at upper part | |
161 | if ((iPosCircuit==1&&nStrX==16)||(iPosCircuit==2&&nStrX==32)|| | |
162 | (iPosCircuit==3&&nStrX==48)||(iPosCircuit==4&&nStrX==64)) { | |
163 | if ((idModule>17||idModule<-17)&&TMath::Abs(idModule)!=61) { | |
164 | fOrMud[1]=1; | |
165 | Int_t idModuleU=(TMath::Abs(idModule)-10)*(TMath::Abs(idModule)/idModule); | |
aac5be80 | 166 | Int_t nStrU=AliMUONTriggerConstants::NstripY(ModuleNumber(idModuleU)); |
a9e2aefa | 167 | |
168 | if (nStrY!=nStrU | |
169 | &&TMath::Abs(idModule)!=62&&TMath::Abs(idModule)!=52) { | |
ecfa008b | 170 | if (nStrY==8) fX2m=1; |
171 | if (nStrU==8) fX2ud=1; | |
a9e2aefa | 172 | } |
173 | } | |
174 | ||
175 | } else { // upper strips within same module | |
176 | fOrMud[1]=0; | |
177 | } | |
178 | } | |
179 | ||
180 | //---------------------------------------------------------------------- | |
181 | void AliMUONTriggerCircuit::LoadXCode(){ | |
182 | // assign a Id. number to each X strip of current circuit | |
183 | // Id.=(corresponding module Id.)*100+(Id. strip of module) | |
184 | ||
185 | // first part : fill XMC11 XMC12 and strips 8 to 24 (middle) XMC21 XMC22 | |
186 | Int_t iStripCircMT1=0, iStripCircMT2=8; | |
ecfa008b | 187 | Int_t idModule=Module(fIdCircuit); // corresponding module Id. |
aac5be80 | 188 | // and its number of strips |
189 | Int_t nStrX=AliMUONTriggerConstants::NstripX(ModuleNumber(idModule)); | |
ecfa008b | 190 | Int_t iPosCircuit=Position(fIdCircuit); // position of circuit in module |
a9e2aefa | 191 | Int_t sign=TMath::Abs(idModule)/idModule; // left or right |
aac5be80 | 192 | Int_t istrip; |
a9e2aefa | 193 | |
aac5be80 | 194 | for (istrip=(iPosCircuit-1)*16; |
a9e2aefa | 195 | istrip<(iPosCircuit-1)*16+16; istrip++) { |
196 | ||
197 | fXcode[0][iStripCircMT1]=sign*(TMath::Abs(idModule)*100+istrip); | |
198 | fXcode[1][iStripCircMT1]=sign*(TMath::Abs(idModule)*100+istrip); | |
199 | fXcode[2][iStripCircMT2]=sign*(TMath::Abs(idModule)*100+istrip); | |
200 | fXcode[3][iStripCircMT2]=sign*(TMath::Abs(idModule)*100+istrip); | |
201 | iStripCircMT1++; | |
202 | iStripCircMT2++; | |
203 | } | |
204 | ||
205 | // second part | |
206 | // XMC21 XMC22 strips 0 to 7 and 24 to 31 | |
207 | Int_t idModuleD, idModuleU; | |
208 | Int_t nStrD, nStrU; | |
209 | ||
ecfa008b | 210 | idModule=Module(fIdCircuit); // corresponding module Id. |
aac5be80 | 211 | // number of X strips |
212 | nStrX=AliMUONTriggerConstants::NstripX(ModuleNumber(idModule)); | |
a9e2aefa | 213 | sign=TMath::Abs(idModule)/idModule; |
214 | ||
215 | // fill lower part (0 to 7) | |
216 | if (iPosCircuit==1) { // need to scan lower module | |
217 | if(idModule<91&&TMath::Abs(idModule)!=41&&idModule>-91) { // non-existing | |
218 | idModuleD=sign*(TMath::Abs(idModule)+10); // lower module Id | |
aac5be80 | 219 | // and its number of strips |
220 | nStrD=AliMUONTriggerConstants::NstripX(ModuleNumber(idModuleD)); | |
a9e2aefa | 221 | |
222 | iStripCircMT2=0; | |
aac5be80 | 223 | for (istrip=nStrD-8; istrip<nStrD; istrip++) { |
a9e2aefa | 224 | fXcode[2][iStripCircMT2]=sign*(TMath::Abs(idModuleD)*100+istrip); |
225 | fXcode[3][iStripCircMT2]=sign*(TMath::Abs(idModuleD)*100+istrip); | |
226 | iStripCircMT2++; | |
227 | } | |
228 | } | |
229 | ||
230 | } else { // lower strips within same module | |
231 | ||
232 | iStripCircMT2=0; | |
aac5be80 | 233 | for (istrip=(iPosCircuit-1)*16-8; |
a9e2aefa | 234 | istrip<(iPosCircuit-1)*16; istrip++) { |
235 | fXcode[2][iStripCircMT2]=sign*(TMath::Abs(idModule)*100+istrip); | |
236 | fXcode[3][iStripCircMT2]=sign*(TMath::Abs(idModule)*100+istrip); | |
237 | iStripCircMT2++; | |
238 | } | |
239 | } | |
240 | ||
241 | // fill upper part (24 to 31) | |
242 | if ((iPosCircuit==1&&nStrX==16)||(iPosCircuit==2&&nStrX==32)|| | |
243 | (iPosCircuit==3&&nStrX==48)||(iPosCircuit==4&&nStrX==64)) { | |
244 | if ((idModule>17||idModule<-17)&&TMath::Abs(idModule)!=61) { | |
245 | idModuleU=sign*(TMath::Abs(idModule)-10); // upper module Id | |
aac5be80 | 246 | // and its number of strips |
247 | nStrU=AliMUONTriggerConstants::NstripX(ModuleNumber(idModuleU)); | |
a9e2aefa | 248 | |
249 | iStripCircMT2=24; | |
aac5be80 | 250 | for (istrip=0; istrip<8; istrip++) { |
a9e2aefa | 251 | fXcode[2][iStripCircMT2]=sign*(TMath::Abs(idModuleU)*100+istrip); |
252 | fXcode[3][iStripCircMT2]=sign*(TMath::Abs(idModuleU)*100+istrip); | |
253 | iStripCircMT2++; | |
254 | } | |
255 | } | |
256 | ||
257 | } else if ((iPosCircuit==1&&nStrX>16)||(iPosCircuit==2&&nStrX>32)|| | |
258 | (iPosCircuit==3&&nStrX>48)) { // upper strips within same mod. | |
259 | ||
260 | iStripCircMT2=24; | |
aac5be80 | 261 | for (istrip=(iPosCircuit-1)*16+16; |
a9e2aefa | 262 | istrip<(iPosCircuit-1)*16+24; istrip++) { |
263 | fXcode[2][iStripCircMT2]=sign*(TMath::Abs(idModule)*100+istrip); | |
264 | fXcode[3][iStripCircMT2]=sign*(TMath::Abs(idModule)*100+istrip); | |
265 | iStripCircMT2++; | |
266 | } | |
267 | } | |
268 | } | |
269 | ||
270 | //---------------------------------------------------------------------- | |
271 | void AliMUONTriggerCircuit::LoadYCode(){ | |
272 | // assign a Id. number to each Y strip of current circuit | |
273 | // Id.=(corresponding module Id.)*100+(Id. strip of module) | |
274 | // note : for Y plane fill only "central part" of circuit | |
275 | // (upper and lower parts are filled in PreHandlingY of AliMUONTriggerDecision) | |
276 | ||
ecfa008b | 277 | Int_t idModule=Module(fIdCircuit); // corresponding module Id. |
aac5be80 | 278 | // and its number of Y strips |
279 | Int_t nStrY=AliMUONTriggerConstants::NstripY(ModuleNumber(idModule)); | |
a9e2aefa | 280 | Int_t sign=TMath::Abs(idModule)/idModule; // left or right |
281 | ||
282 | for (Int_t istrip=0; istrip<nStrY; istrip++) { | |
283 | fYcode[0][istrip]=sign*(TMath::Abs(idModule)*100+istrip); | |
284 | fYcode[1][istrip]=sign*(TMath::Abs(idModule)*100+istrip); | |
285 | fYcode[2][istrip]=sign*(TMath::Abs(idModule)*100+istrip); | |
286 | fYcode[3][istrip]=sign*(TMath::Abs(idModule)*100+istrip); | |
287 | } | |
288 | } | |
289 | ||
a9e2aefa | 290 | //---------------------------------------------------------------------- |
291 | Float_t AliMUONTriggerCircuit::PtCal(Int_t istripX, Int_t idev, Int_t istripY){ | |
292 | // returns calculated pt for circuit/istripX/idev/istripY according | |
293 | // to the formula of the TRD. Note : idev (input) is in [0+30] | |
294 | ||
295 | // Int_t jdev = idev - 15; // jdev in [-15+15] | |
296 | Int_t istripX2=istripX+idev+1; // find istripX2 using istripX and idev | |
297 | ||
298 | Float_t yPosX1=fYpos11[istripX]; | |
299 | Float_t yPosX2=fYpos21[istripX2]; | |
300 | Float_t xPosY1=fXpos11[istripY]; | |
301 | ||
3f434b6f | 302 | Float_t zf=975.; |
303 | Float_t z1=AliMUONConstants::DefaultChamberZ(10); | |
304 | Float_t z2=AliMUONConstants::DefaultChamberZ(12); | |
a9e2aefa | 305 | Float_t thetaDev=(1./zf)*(yPosX1*z2-yPosX2*z1)/(z2-z1); |
306 | Float_t xf=xPosY1*zf/z1; | |
307 | Float_t yf=yPosX2-((yPosX2-yPosX1)*(z2-zf))/(z2-z1); | |
308 | return (3.*0.3/TMath::Abs(thetaDev)) * TMath::Sqrt(xf*xf+yf*yf)/zf; | |
309 | } | |
331dcacd | 310 | //--------------------------------------------------------------------- |
311 | //----------------------- New Segmentation ---------------------------- | |
312 | //--------------------------------------------------------------------- | |
313 | ||
314 | //--------------------------------------------------------------------- | |
315 | void AliMUONTriggerCircuit::LoadYPos2(){ | |
316 | // fill fYpos11 and fYpos21 -> y position of X declusterized strips | |
317 | ||
318 | Int_t chamber, cathode; | |
319 | Int_t code, idModule, idStrip, idSector; | |
320 | Float_t x, y, z, width; | |
321 | Int_t istrip, idDE; | |
322 | ||
323 | AliMUON *pMUON = (AliMUON*)gAlice->GetModule("MUON"); | |
324 | AliMUONChamber* iChamber; | |
325 | AliMUONGeometrySegmentation* segmentation; | |
3bf95daf | 326 | |
331dcacd | 327 | // first plane (11) |
328 | chamber=11; | |
329 | cathode=1; | |
330 | iChamber = &(pMUON->Chamber(chamber-1)); | |
331 | segmentation=iChamber->SegmentationModel2(cathode); | |
332 | ||
3bf95daf | 333 | if (!segmentation) { |
334 | AliWarning("Segmentation not defined."); | |
335 | return; | |
336 | } | |
337 | ||
331dcacd | 338 | for (istrip=0; istrip<16; istrip++) { |
339 | code=fXcode[0][istrip]; // decode current strip | |
340 | idModule=Int_t(code/100); // corresponding module Id. | |
341 | idDE = DetElemId(chamber, idModule); | |
342 | idStrip=TMath::Abs(code-idModule*100); // corresp. strip number in module | |
343 | idSector=segmentation->Sector(idDE, idModule, idStrip); // corresponding sector | |
344 | width=segmentation->Dpy(idDE, idSector); // corresponding strip width | |
345 | segmentation->GetPadC(idDE, idModule,idStrip,x,y,z); // get strip real position | |
346 | ||
347 | fYpos11[2*istrip]=y; | |
348 | if (istrip!=15) fYpos11[2*istrip+1]=y+width/2.; | |
349 | } | |
350 | ||
351 | // second plane (21) | |
352 | chamber=13; | |
353 | cathode=1; | |
354 | iChamber = &(pMUON->Chamber(chamber-1)); | |
355 | segmentation=iChamber->SegmentationModel2(cathode); | |
356 | ||
357 | for (istrip=0; istrip<32; istrip++) { | |
358 | code=fXcode[2][istrip]; // decode current strip | |
359 | idModule=Int_t(code/100); // corresponding module Id. | |
360 | idDE = DetElemId(chamber, idModule); | |
361 | if (idModule == 0) continue; | |
362 | idStrip=TMath::Abs(code-idModule*100); // corresp. strip number in module | |
363 | idSector=segmentation->Sector(idDE, idModule, idStrip); // corresponding sector | |
364 | width=segmentation->Dpy(idDE, idSector); // corresponding strip width | |
365 | segmentation->GetPadC(idDE, idModule,idStrip,x,y,z); // get strip real position | |
366 | ||
367 | // using idModule!=0 prevents to fill garbage in case of circuits | |
368 | // in the first and last rows | |
369 | if (idModule!=0) { | |
370 | fYpos21[2*istrip]=y; | |
371 | if (istrip!=31) fYpos21[2*istrip+1]=y+width/2.; | |
372 | } | |
373 | } | |
374 | } | |
375 | ||
376 | //---------------------------------------------------------------------- | |
377 | void AliMUONTriggerCircuit::LoadXPos2(){ | |
378 | // fill fXpos11 -> x position of Y strips for the first plane only | |
379 | // fXpos11 contains the x position of Y strip for the current circuit | |
380 | // taking into account whether or nor not part(s) of the circuit | |
381 | // (middle, up or down) has(have) 16 strips | |
382 | ||
383 | Float_t x, y, z; | |
384 | Int_t istrip, idDE; | |
385 | ||
386 | Int_t chamber=11; | |
387 | Int_t cathode=2; | |
388 | AliMUON *pMUON = (AliMUON*)gAlice->GetModule("MUON"); | |
389 | AliMUONChamber* iChamber; | |
390 | AliMUONGeometrySegmentation* segmentation; | |
391 | iChamber = &(pMUON->Chamber(chamber-1)); | |
392 | segmentation=iChamber->SegmentationModel2(cathode); | |
393 | ||
3bf95daf | 394 | if (!segmentation) { |
395 | AliWarning("Segmentation not defined."); | |
396 | return; | |
397 | } | |
398 | ||
331dcacd | 399 | Int_t idModule=Module(fIdCircuit); // corresponding module Id. |
400 | // number of Y strips | |
401 | idDE = DetElemId(chamber, idModule); | |
402 | Int_t nStrY=AliMUONTriggerConstants::NstripY(ModuleNumber(idModule)); | |
403 | Int_t idSector=segmentation->Sector(idDE, idModule,0); // corresp. sector | |
404 | Float_t width=segmentation->Dpx(idDE, idSector); // corresponding strip width | |
405 | ||
406 | // first case : up middle and down parts have all 8 or 16 strip | |
407 | if ((nStrY==16)||(nStrY==8&&fX2m==0&&fX2ud==0)) { | |
408 | for (istrip=0; istrip<nStrY; istrip++) { | |
409 | segmentation->GetPadC(idDE, idModule,istrip,x,y,z); | |
410 | fXpos11[istrip]=x; | |
411 | } | |
412 | // second case : mixing 8 and 16 strips within same circuit | |
413 | } else { | |
414 | for (istrip=0; istrip<nStrY; istrip++) { | |
415 | if (nStrY!=8) { printf(" bug in LoadXpos \n");} | |
416 | segmentation->GetPadC(idDE, idModule, istrip, x, y, z); | |
417 | fXpos11[2*istrip]=x-width/4.; | |
418 | fXpos11[2*istrip+1]=fXpos11[2*istrip]+width/2.; | |
419 | } | |
420 | } | |
421 | } | |
a9e2aefa | 422 | |
423 | //---------------------------------------------------------------------- | |
424 | //--- methods which return member data related info | |
425 | //---------------------------------------------------------------------- | |
30178c30 | 426 | Int_t AliMUONTriggerCircuit::GetIdCircuit() const { |
a9e2aefa | 427 | // returns circuit Id |
ecfa008b | 428 | return fIdCircuit; |
a9e2aefa | 429 | } |
430 | //---------------------------------------------------------------------- | |
30178c30 | 431 | Int_t AliMUONTriggerCircuit::GetIdModule() const { |
a9e2aefa | 432 | // returns module Id |
ecfa008b | 433 | return Module(fIdCircuit); |
a9e2aefa | 434 | } |
435 | //---------------------------------------------------------------------- | |
30178c30 | 436 | Int_t AliMUONTriggerCircuit::GetNstripX() const { |
a9e2aefa | 437 | // returns the number of X strips in the module where the circuit is sitting |
ecfa008b | 438 | return AliMUONTriggerConstants::NstripX(ModuleNumber(Module(fIdCircuit))); |
a9e2aefa | 439 | } |
440 | //---------------------------------------------------------------------- | |
30178c30 | 441 | Int_t AliMUONTriggerCircuit::GetNstripY() const { |
a9e2aefa | 442 | // returns the number of Y strips in the module where the circuit is sitting |
ecfa008b | 443 | return AliMUONTriggerConstants::NstripY(ModuleNumber(Module(fIdCircuit))); |
a9e2aefa | 444 | } |
445 | //---------------------------------------------------------------------- | |
30178c30 | 446 | Int_t AliMUONTriggerCircuit::GetPosCircuit() const { |
a9e2aefa | 447 | // returns the position of the circuit in its module |
ecfa008b | 448 | return Position(fIdCircuit); |
a9e2aefa | 449 | } |
450 | //---------------------------------------------------------------------- | |
30178c30 | 451 | Int_t AliMUONTriggerCircuit::GetIdCircuitD() const { |
a9e2aefa | 452 | // returns the Id of the circuit down |
ecfa008b | 453 | Int_t idModule=Module(fIdCircuit); |
a9e2aefa | 454 | Int_t idModuleD=(TMath::Abs(idModule)+10)*(TMath::Abs(idModule)/idModule); |
455 | return (TMath::Abs(idModuleD)*10+1)*(TMath::Abs(idModule)/idModule); | |
456 | } | |
457 | //---------------------------------------------------------------------- | |
30178c30 | 458 | Int_t AliMUONTriggerCircuit::GetICircuitD() const { |
a9e2aefa | 459 | // returns the number of the circuit down |
ecfa008b | 460 | Int_t idModule=Module(fIdCircuit); |
a9e2aefa | 461 | Int_t idModuleD=(TMath::Abs(idModule)+10)*(TMath::Abs(idModule)/idModule); |
462 | Int_t idCircuitD= | |
463 | (TMath::Abs(idModuleD)*10+1)*(TMath::Abs(idModule)/idModule); | |
464 | return CircuitNumber(idCircuitD); | |
465 | } | |
466 | //---------------------------------------------------------------------- | |
30178c30 | 467 | Int_t AliMUONTriggerCircuit::GetIdCircuitU() const { |
a9e2aefa | 468 | // returns the Id of the circuit up |
ecfa008b | 469 | Int_t idModule=Module(fIdCircuit); |
a9e2aefa | 470 | Int_t idModuleU=(TMath::Abs(idModule)-10)*(TMath::Abs(idModule)/idModule); |
471 | return (TMath::Abs(idModuleU)*10+1)*(TMath::Abs(idModule)/idModule); | |
472 | } | |
473 | //---------------------------------------------------------------------- | |
30178c30 | 474 | Int_t AliMUONTriggerCircuit::GetICircuitU() const { |
a9e2aefa | 475 | // returns the number of the circuit up |
ecfa008b | 476 | Int_t idModule=Module(fIdCircuit); |
a9e2aefa | 477 | Int_t idModuleU=(TMath::Abs(idModule)-10)*(TMath::Abs(idModule)/idModule); |
478 | Int_t idCircuitU= | |
479 | (TMath::Abs(idModuleU)*10+1)*(TMath::Abs(idModule)/idModule); | |
480 | return CircuitNumber(idCircuitU); | |
481 | } | |
482 | //---------------------------------------------------------------------- | |
30178c30 | 483 | Int_t AliMUONTriggerCircuit::GetX2m() const { |
ecfa008b | 484 | // returns fX2m |
485 | return fX2m; | |
a9e2aefa | 486 | } |
487 | //---------------------------------------------------------------------- | |
30178c30 | 488 | Int_t AliMUONTriggerCircuit::GetX2ud() const { |
ecfa008b | 489 | // returns fX2ud |
490 | return fX2ud; | |
a9e2aefa | 491 | } |
492 | //---------------------------------------------------------------------- | |
30178c30 | 493 | void AliMUONTriggerCircuit::GetOrMud(Int_t orMud[2]) const { |
a9e2aefa | 494 | // returns fOrMud |
495 | orMud[0]=fOrMud[0]; | |
496 | orMud[1]=fOrMud[1]; | |
497 | } | |
498 | //---------------------------------------------------------------------- | |
30178c30 | 499 | Int_t AliMUONTriggerCircuit::GetXcode(Int_t chamber, Int_t istrip) const { |
a9e2aefa | 500 | // returns X code of circuit/chamber/istrip (warning : chamber in [0,3]) |
501 | return fXcode[chamber][istrip]; | |
502 | } | |
503 | //---------------------------------------------------------------------- | |
30178c30 | 504 | Int_t AliMUONTriggerCircuit::GetYcode(Int_t chamber, Int_t istrip) const { |
a9e2aefa | 505 | // returns Y code of circuit/chamber/istrip (warning : chamber in [0,3]) |
506 | return fYcode[chamber][istrip]; | |
507 | } | |
508 | //---------------------------------------------------------------------- | |
30178c30 | 509 | Float_t AliMUONTriggerCircuit::GetY11Pos(Int_t istrip) const { |
a9e2aefa | 510 | // returns Y position of X strip istrip in MC11 |
511 | return fYpos11[istrip]; | |
512 | } | |
513 | //---------------------------------------------------------------------- | |
30178c30 | 514 | Float_t AliMUONTriggerCircuit::GetY21Pos(Int_t istrip) const { |
a9e2aefa | 515 | // returns Y position of X strip istrip in MC21 |
516 | return fYpos21[istrip]; | |
517 | } | |
518 | //---------------------------------------------------------------------- | |
30178c30 | 519 | Float_t AliMUONTriggerCircuit::GetX11Pos(Int_t istrip) const { |
a9e2aefa | 520 | // returns X position of Y strip istrip in MC11 |
521 | return fXpos11[istrip]; | |
522 | } | |
523 | //---------------------------------------------------------------------- | |
524 | //--- end of methods which return member data related info | |
525 | //---------------------------------------------------------------------- | |
526 | ||
527 | ||
331dcacd | 528 | Int_t AliMUONTriggerCircuit::DetElemId(Int_t ichamber, Int_t idModule) |
529 | { | |
530 | // returns the detection element Id for given chamber and module | |
531 | // ichamber (from 11 to 14), idModule (from 11 to 97) | |
532 | Int_t itmp = (idModule > 0) ? 0 : 50; // right=0, left=50 | |
533 | return (ichamber*100)+itmp+(9-Int_t(TMath::Abs(idModule)/10)); | |
534 | } | |
a9e2aefa | 535 | |
536 | ||
537 | ||
538 |