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