Removed all geometry & segmentation info:
[u/mrichter/AliRoot.git] / MUON / AliMUONTriggerSegmentationV2.cxx
CommitLineData
9ff9fab7 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 **************************************************************************/
15
16/* $Id$ */
17
18#include "AliMUONTriggerSegmentationV2.h"
19
20#include "AliLog.h"
21
22#include "AliMpPCB.h"
23#include "AliMpTrigger.h"
24#include "AliMpTriggerSegmentation.h"
25#include "AliMpSlat.h"
26
27#include "AliMUONSegmentationManager.h"
28
29#include "Riostream.h"
30#include "TClass.h"
31#include "TString.h"
32
33ClassImp(AliMUONTriggerSegmentationV2)
34
35namespace
36{
37// Int_t SPECIAL_SECTOR = 8;
38 Int_t fgIntOffset(1);
39 Float_t FMAX(1E9);
40 Int_t CODEMAKER(1000);
41
42 Int_t Code(Int_t ixLA, Int_t iyLA)
43 {
44 return iyLA*CODEMAKER + ixLA;
45 }
46
47 void Decode(Int_t code, Int_t& ixLA, Int_t& iyLA)
48 {
49 iyLA = code/CODEMAKER;
50 ixLA = code - iyLA*CODEMAKER;
51 }
52}
53
54//_____________________________________________________________________________
55AliMUONTriggerSegmentationV2::AliMUONTriggerSegmentationV2()
56: AliMUONVGeometryDESegmentation(),
57fDetElemId(-1),
58fPlaneType(kNonBendingPlane),
59fSlat(0),
60fSlatSegmentation(0),
61fXhit(FMAX),
62fYhit(FMAX),
63fLineNumber(-1)
64{
65 //
66 // Default ctor (empty).
67 //
68 AliDebug(1,Form("this=%p default (empty) ctor",this));
69}
70
71//_____________________________________________________________________________
72AliMUONTriggerSegmentationV2::AliMUONTriggerSegmentationV2(Int_t detElemId,
73 AliMpPlaneType bendingOrNonBending)
74: AliMUONVGeometryDESegmentation(),
75fDetElemId(detElemId),
76fPlaneType(bendingOrNonBending),
77fSlat(0),
78fSlatSegmentation(0),
79fXhit(FMAX),
80fYhit(FMAX),
81fLineNumber(-1)
82{
83 //
84 // Normal ctor.
85 //
86 ReadMappingData();
87
88 AliDebug(1,Form("this=%p detElemId=%3d %s fSlatSegmentation=%p",this,detElemId,
89 ( (bendingOrNonBending==kBendingPlane)?"Bending":"NonBending" ),
90 fSlatSegmentation));
91}
92
93//_____________________________________________________________________________
94AliMUONTriggerSegmentationV2::AliMUONTriggerSegmentationV2(const AliMUONTriggerSegmentationV2& rhs) : AliMUONVGeometryDESegmentation(rhs)
95{
96 AliFatal("Not implemented.");
97}
98
99//_____________________________________________________________________________
100AliMUONTriggerSegmentationV2::~AliMUONTriggerSegmentationV2()
101{
102 AliDebug(1,Form("this=%p",this));
103 // Destructor
104}
105
106//_____________________________________________________________________________
107AliMUONTriggerSegmentationV2& AliMUONTriggerSegmentationV2::operator=(const AliMUONTriggerSegmentationV2& rhs)
108{
109// Protected assignement operator
110 if (this == &rhs) return *this;
111 AliFatal("Not implemented.");
112 return *this;
113}
114
115//_____________________________________________________________________________
116TF1*
117AliMUONTriggerSegmentationV2::CorrFunc(Int_t) const
118{
119 AliFatal("Not implemented");
120 return 0x0;
121}
122
123//_____________________________________________________________________________
124Float_t
125AliMUONTriggerSegmentationV2::Distance2AndOffset(Int_t, Int_t,
126 Float_t, Float_t, Int_t*)
127{
128 AliFatal("Not implemented");
129 return 0;
130}
131
132//_____________________________________________________________________________
133void
134AliMUONTriggerSegmentationV2::Draw(Option_t*)
135{
136 AliFatal("Not Implemented");
137}
138
139//_____________________________________________________________________________
140Float_t
141AliMUONTriggerSegmentationV2::Dpx() const
142{
143 AliFatal("Not Implemented");
144 return 0.0;
145}
146
147//_____________________________________________________________________________
148Float_t
149AliMUONTriggerSegmentationV2::Dpy() const
150{
151 AliFatal("Not Implemented");
152 return 0.0;
153}
154
155//_____________________________________________________________________________
156Float_t
157AliMUONTriggerSegmentationV2::Dpx(int sectorCode) const
158{
159 Int_t ixLA, iyLA;
160 Decode(sectorCode,ixLA,iyLA);
161 AliMpPad pad = fSlatSegmentation->PadByIndices(AliMpIntPair(ixLA,iyLA),kFALSE);
162 if ( !pad.IsValid() ) return 0.0;
163 return pad.Dimensions().X()*2.0;
164}
165
166//_____________________________________________________________________________
167Float_t
168AliMUONTriggerSegmentationV2::Dpy(int sectorCode) const
169{
170 Int_t ixLA, iyLA;
171 Decode(sectorCode,ixLA,iyLA);
172 AliMpPad pad = fSlatSegmentation->PadByIndices(AliMpIntPair(ixLA,iyLA),kFALSE);
173 if ( !pad.IsValid() ) return 0.0;
174 return pad.Dimensions().Y()*2.0;
175}
176
177//_____________________________________________________________________________
178void
179AliMUONTriggerSegmentationV2::FirstPad(Float_t /*xhit*/, Float_t /*yhit*/,
180 Float_t /*zhit*/,
181 Float_t /*dx*/, Float_t /*dy*/)
182{
183 AliFatal("Not implemented");
184}
185
186//_____________________________________________________________________________
187Float_t
188AliMUONTriggerSegmentationV2::GetAnod(Float_t) const
189{
190 AliFatal("Not implemented");
191 return 0.0;
192}
193
194//_____________________________________________________________________________
195AliMUONGeometryDirection
196AliMUONTriggerSegmentationV2::GetDirection()
197{
198 //AliWarning("Not Implemented");
199 return kDirUndefined;
200}
201
202//_____________________________________________________________________________
203void
204AliMUONTriggerSegmentationV2::GetNParallelAndOffset(Int_t,Int_t,Int_t*,Int_t*)
205{
206 AliFatal("Not Implemented");
207}
208
209//_____________________________________________________________________________
210void
211AliMUONTriggerSegmentationV2::GetPadC(Int_t ix, Int_t iy,
212 Float_t& x, Float_t& y, Float_t& z)
213{
214 z = 0;
215 GetPadC(ix,iy,x,y);
216}
217
218//_____________________________________________________________________________
219void
220AliMUONTriggerSegmentationV2::GetPadC(Int_t ixGlo, Int_t iyGlo,
221 Float_t& x, Float_t& y)
222{
223 Int_t ixLA,iyLA;
224 IGlo2ILoc(ixGlo,iyGlo,ixLA,iyLA);
225 AliMpPad pad = fSlatSegmentation->PadByIndices(AliMpIntPair(ixLA,iyLA),kTRUE);
226 x = pad.Position().X();
227 y = pad.Position().Y();
228}
229
230//_____________________________________________________________________________
231void
232AliMUONTriggerSegmentationV2::GetPadI(Float_t x, Float_t y, Float_t,
233 Int_t& ix, Int_t& iy)
234{
235 GetPadI(x,y,ix,iy);
236}
237
238//_____________________________________________________________________________
239void
240AliMUONTriggerSegmentationV2::GetPadI(Float_t x, Float_t y,
241 Int_t& ixGlo, Int_t& iyGlo)
242{
243 AliDebug(2,Form("%s x=%e y=%e ixGlo,iyGlo=%d,%d\n",
244 fSlatSegmentation->GetName(),
245 x,y,ixGlo,iyGlo));
246
247 Double_t slatx = fSlat->DX();
248 Double_t slaty = fSlat->DY();
249 AliMpPad pad =
250 fSlatSegmentation->PadByPosition(TVector2(x+slatx,y+slaty), kTRUE);
251
252 if ( pad != AliMpPad::Invalid() )
253 {
254 Int_t ix = pad.GetIndices().GetFirst();
255 Int_t iy = pad.GetIndices().GetSecond();
256 ILoc2IGlo(ix,iy,ixGlo,iyGlo);
257 }
258 else
259 {
260 ixGlo=iyGlo=-1;
261 }
262 AliDebug(2,Form("ixGlo,iyGlo=%d,%d\n",ixGlo,iyGlo));
263}
264
265//_____________________________________________________________________________
266void
267AliMUONTriggerSegmentationV2::GetPadLoc2Glo(Int_t ix, Int_t iy,
268 Int_t& ixGlo, Int_t& iyGlo) const
269{
270 //
271 // Converts from local (in PC convention) to (ix,iy) to global (ix,iy)
272 //
273
274 ixGlo=iyGlo=-1; // starts with invalid values
275
276 if ( fPlaneType == kBendingPlane )
277 {
278 ixGlo = 10*LineNumber() + ix;
279 iyGlo = iy - fgIntOffset;
280 }
281 else if ( fPlaneType == kNonBendingPlane )
282 {
283 Int_t i = fSlat->GetLayer(0)->FindPCBIndex(ix-fgIntOffset);
284 if (i<0)
285 {
286 AliError(Form("Invalid local (ix=%d,iy=%d) ?",ix,iy));
287 return ;
288 }
289 AliMpPCB* pcb = fSlat->GetLayer(0)->FindPCB(ix-fgIntOffset);
290 iyGlo = ix - pcb->Ixmin() - fgIntOffset;
291 if ( LineNumber() == 5 ) ++i;
292 ixGlo = 10*LineNumber() + i + fgIntOffset;
293 }
294}
295
296//_____________________________________________________________________________
297void
298AliMUONTriggerSegmentationV2::GetPadGlo2Loc(Int_t ixGlo, Int_t iyGlo,
299 Int_t& ix, Int_t& iy) const
300{
301 //
302 // Converts from global (ix,iy) to local (ix,iy) (in PC convention)
303 //
304
305 ix=iy=-1; // starts with invalid values
306
307 if ( abs(ixGlo) == 51 ) return;
308
309 Int_t column = ModuleColNum(ixGlo);
310
311 if ( fPlaneType == kBendingPlane )
312 {
313 ix = column + fgIntOffset;
314 iy = iyGlo + fgIntOffset;
315 }
316 else if ( fPlaneType == kNonBendingPlane )
317 {
318 if ( LineNumber()==5 ) --column;
319 AliMpPCB* pcb = fSlat->GetLayer(0)->GetPCB(column);
320 if (!pcb)
321 {
322 AliError(Form("Invalid global (ix=%d,iy=%d)",ixGlo,iyGlo));
323 return;
324 }
325 ix = pcb->Ixmin() + iyGlo + fgIntOffset;
326 iy = fgIntOffset;
327 }
328}
329
330//_____________________________________________________________________________
331void
332AliMUONTriggerSegmentationV2::GiveTestPoints(Int_t&,Float_t*,Float_t*) const
333{
334 AliFatal("Not Implemented");
335}
336
337//_____________________________________________________________________________
338Bool_t
339AliMUONTriggerSegmentationV2::HasPad(Float_t x, Float_t y, Float_t)
340{
341 //
342 // Well, 2 implementations are possible here
343 // Either reuse HasPad(int,int), or get it from scratch using
344 // underlying fSlatSegmentation.
345 // Took second option, but w/o checking whether this is the faster.
346 // The second option is commented out below, for the record.
347
348// Int_t ix, iy;
349// GetPadI(x,y,z,ix,iy);
350// Int_t ixLA, iyLA;
351// IGlo2ILoc(ix,iy,ixLA,iyLA);
352// Int_t ixPC, iyPC;
353// LA2PC(ixLA,iyLA,ixPC,iyPC);
354// Bool_t ok1 = HasPad(ixPC,iyPC);
355
356 AliMpPad pad =
357 fSlatSegmentation->PadByPosition(TVector2(x+fSlat->DX(),y+fSlat->DY()),
358 kFALSE);
359 return pad.IsValid();
360}
361
362//_____________________________________________________________________________
363Bool_t
364AliMUONTriggerSegmentationV2::HasPad(Int_t ixGlo, Int_t iyGlo)
365{
366 Int_t ixLA, iyLA;
367 IGlo2ILoc(ixGlo,iyGlo,ixLA,iyLA);
368 return fSlatSegmentation->HasPad(AliMpIntPair(ixLA,iyLA));
369}
370
371//_____________________________________________________________________________
372void
373AliMUONTriggerSegmentationV2::IGlo2ILoc(Int_t ixGlo, Int_t iyGlo,
374 Int_t& ixLA, Int_t& iyLA)
375{
376 Int_t ixPC, iyPC;
377 GetPadGlo2Loc(ixGlo,iyGlo,ixPC,iyPC);
378 PC2LA(ixPC,iyPC,ixLA,iyLA);
379}
380
381//_____________________________________________________________________________
382void
383AliMUONTriggerSegmentationV2::ILoc2IGlo(Int_t ixLA, Int_t iyLA,
384 Int_t& ixGlo, Int_t& iyGlo)
385{
386 Int_t ixPC, iyPC;
387 LA2PC(ixLA,iyLA,ixPC,iyPC);
388 GetPadLoc2Glo(ixPC,iyPC,ixGlo,iyGlo);
389}
390
391//_____________________________________________________________________________
392void
393AliMUONTriggerSegmentationV2::Init(int)
394{
395 AliWarning("Not Implemented because not needed ;-)");
396}
397
398//_____________________________________________________________________________
399Int_t
400AliMUONTriggerSegmentationV2::ISector()
401{
402 // FIXME: remove the usage of ISector from all the code.
403 return -10;
404}
405
406//_____________________________________________________________________________
407void AliMUONTriggerSegmentationV2::IntegrationLimits(Float_t& x1,
408 Float_t& x2,
409 Float_t& x3,
410 Float_t& x4)
411{
412 // x1 : hit x(y) position
413 // x2 : x(y) coordinate of the main strip
414 // x3 : current strip real x(y) coordinate
415 // x4 : dist. between x(y) hit pos. and the closest border of the current strip
416 //
417 // Note : need to return (only) x4.
418
419 AliFatal("Check me before usage. ResponseTrigger does not use me, while"
420 "ResponseTriggerV1 does ?");
421
422 AliMpPad strip =
423 fSlatSegmentation->PadByPosition(TVector2(fXhit,fYhit),kFALSE);
424 if ( !strip.IsValid() )
425 {
426 AliWarning(Form("%s got invalid fXhit,fYhit=%e,%e\n",
427 fSlatSegmentation->GetName(),fXhit,fYhit));
428 x1=x2=x3=x4=0;
429 }
430 else
431 {
432 Double_t xstrip = strip.Position().X();
433 Double_t ystrip = strip.Position().Y();
434 AliDebug(1,Form("fXhit,Yhit=%e,%e xstrip,ystrip=%e,%e\n",
435 fXhit,fYhit,xstrip,ystrip));
436 x1 = (fPlaneType==kBendingPlane) ? fYhit : fXhit;
437 x2 = (fPlaneType==kBendingPlane) ? ystrip : xstrip;
438 x3 = (fPlaneType==kBendingPlane) ?
439 fCurrentPad.Position().Y() : fCurrentPad.Position().X();
440 Double_t xmin = 0.0;
441 Double_t xmax = 0.0;
442 if (fPlaneType==kBendingPlane)
443 {
444 xmin = x3 - fCurrentPad.Dimensions().X();
445 xmax = x3 + fCurrentPad.Dimensions().X();
446 }
447 else
448 {
449 xmin = x3 - fCurrentPad.Dimensions().Y();
450 xmax = x3 + fCurrentPad.Dimensions().Y();
451 }
452 // dist. between the hit and the closest border of the current strip
453 x4 = (TMath::Abs(xmax-x1) > TMath::Abs(xmin-x1)) ?
454 TMath::Abs(xmin-x1):TMath::Abs(xmax-x1);
455
456 AliDebug(1,Form("Bending %d x1=%e x2=%e x3=%e x4=%e xmin,max=%e,%e\n",
457 fPlaneType,x1,x2,x3,x4,xmin,xmax));
458
459 }
460}
461
462//_____________________________________________________________________________
463Int_t
464AliMUONTriggerSegmentationV2::Ix()
465{
466 if ( fCurrentPad.IsValid() )
467 {
468 Int_t ixGlo,iyGlo;
469 ILoc2IGlo(fCurrentPad.GetIndices().GetFirst(),
470 fCurrentPad.GetIndices().GetSecond(),ixGlo,iyGlo);
471 return ixGlo;
472 }
473 return -1;
474}
475
476//_____________________________________________________________________________
477Int_t
478AliMUONTriggerSegmentationV2::Iy()
479{
480 if ( fCurrentPad.IsValid() )
481 {
482 Int_t ixGlo,iyGlo;
483 ILoc2IGlo(fCurrentPad.GetIndices().GetFirst(),
484 fCurrentPad.GetIndices().GetSecond(),ixGlo,iyGlo);
485 return iyGlo;
486 }
487 return -1;
488}
489
490
491//_____________________________________________________________________________
492void
493AliMUONTriggerSegmentationV2::LA2PC(Int_t ixLA, Int_t iyLA,
494 Int_t& ixPC, Int_t& iyPC)
495{
496 //
497 // From LA to PC conventions for integers indices.
498 //
499 ixPC=iyPC=-1;
500
501 if ( ixLA<0 || iyLA<0 ) return;
502
503 ixPC = ixLA + 1;
504 iyPC = iyLA + 1;
505
506 if ( fPlaneType == kBendingPlane )
507 {
508 if ( LineNumber()==5 )
509 {
510 ++ixPC;
511 }
512 if ( LineNumber()==4 && ixLA==0 )
513 {
514 iyPC -= 16;
515 }
516 }
517
518 AliDebug(3,Form("ix,iy LA (%d,%d) -> PC (%d,%d)",ixLA,iyLA,ixPC,iyPC));
519
520}
521
522//_____________________________________________________________________________
523Int_t
524AliMUONTriggerSegmentationV2::LineNumber() const
525{
526 return 10-fLineNumber;
527}
528
529//_____________________________________________________________________________
530Int_t
531AliMUONTriggerSegmentationV2::ModuleColNum(Int_t ixGlo) const
532{
533 // returns column number (from 0 to 6) in which the (global) module
534 // ix is sitting (could return 7 if ix=isec)
535 return TMath::Abs(ixGlo)-Int_t(TMath::Abs(ixGlo)/10)*10-1;
536}
537
538//_____________________________________________________________________________
539Int_t
540AliMUONTriggerSegmentationV2::MorePads()
541{
542 AliFatal("Not implemented");
543 return 0;
544}
545
546//_____________________________________________________________________________
547void AliMUONTriggerSegmentationV2::Neighbours(Int_t /*iX*/, Int_t /*iY*/,
548 Int_t* /*Nlist*/,
549 Int_t /*Xlist*/[10],
550 Int_t /*Ylist*/[10])
551{
552 //-----------------BENDING-----------------------------------------
553 // Returns list of 10 next neighbours for given X strip (ix, iy)
554 // neighbour number 4 in the list -
555 // neighbour number 3 in the list |
556 // neighbour number 2 in the list |_ Upper part
557 // neighbour number 1 in the list |
558 // neighbour number 0 in the list -
559 // X strip (ix, iy)
560 // neighbour number 5 in the list -
561 // neighbour number 6 in the list | _ Lower part
562 // neighbour number 7 in the list |
563 // neighbour number 8 in the list |
564 // neighbour number 9 in the list -
565
566 //-----------------NON-BENDING-------------------------------------
567 // Returns list of 10 next neighbours for given Y strip (ix, iy)
568 // neighbour number 9 8 7 6 5 (Y strip (ix, iy)) 0 1 2 3 4 in the list
569 // \_______/ \_______/
570 // left right
571 AliFatal("Please implement me");
572}
573
574//_____________________________________________________________________________
575void
576AliMUONTriggerSegmentationV2::NextPad()
577{
578 AliFatal("Not implemented");
579}
580
581//_____________________________________________________________________________
582Int_t
583AliMUONTriggerSegmentationV2::Npx() const
584{
585 return 124;// FIXME: this should not have to be done, if only we'd stick
586 // to a local (ix,iy) convention !!!
587 // return fSlatSegmentation->MaxPadIndexX()+1;
588}
589
590//_____________________________________________________________________________
591Int_t
592AliMUONTriggerSegmentationV2::Npy() const
593{
594 return 64;
595// return fSlatSegmentation->MaxPadIndexY()+1;
596}
597
598//_____________________________________________________________________________
599void
600AliMUONTriggerSegmentationV2::PC2LA(Int_t ixPC, Int_t iyPC,
601 Int_t& ixLA, Int_t& iyLA)
602{
603 //
604 // From PC to LA conventions for integers indices.
605 //
606 ixLA=iyLA=-1;
607
608 if ( ixPC<0 || iyPC<0 ) return;
609
610 ixLA = ixPC - 1;
611 iyLA = iyPC - 1;
612
613 if ( fPlaneType == kBendingPlane )
614 {
615 if ( LineNumber()==5 )
616 {
617 --ixLA;
618 }
619 if ( LineNumber()==4 && ixLA==0 )
620 {
621 iyLA += 16;
622 }
623 }
624
625 AliDebug(3,Form("ix,iy PC (%d,%d) -> LA (%d,%d)",ixPC,iyPC,ixLA,iyLA));
626}
627
628//_____________________________________________________________________________
629void
630AliMUONTriggerSegmentationV2::Print(Option_t* opt) const
631{
632 TString sopt(opt);
633
634 cout << "DetElemId=" << fDetElemId << " PlaneType="
635 << fPlaneType << " Npx=" << Npx() << " Npy=" << Npy() << endl;
636 if ( ( sopt.Contains("SEG") || sopt.Contains("ALL") ) && fSlatSegmentation )
637 {
638 fSlatSegmentation->Print();
639 }
640 if ( sopt.Contains("ALL") && fSlat )
641 {
642 fSlat->Print();
643 }
644}
645
646//_____________________________________________________________________________
647void
648AliMUONTriggerSegmentationV2::ReadMappingData()
649{
650 fSlatSegmentation = dynamic_cast<AliMpTriggerSegmentation*>
651 (AliMUONSegmentationManager::Segmentation(fDetElemId,fPlaneType));
652
653 if (!fSlatSegmentation)
654 {
655 AliFatal("Wrong segmentation type encountered");
656 }
657 fSlat = fSlatSegmentation->Slat();
658 TString id(fSlat->GetID());
659 Ssiz_t pos = id.Last('L');
660 if ( pos <= 0 )
661 {
662 AliFatal(Form("Cannot infer line number for slat %s",id.Data()));
663 }
664 fLineNumber = TString(id(pos+1),1).Atoi();
665}
666
667//_____________________________________________________________________________
668Int_t
669AliMUONTriggerSegmentationV2::Sector(Int_t ix, Int_t iy)
670{
671 Int_t ixLA, iyLA;
672 IGlo2ILoc(ix,iy,ixLA,iyLA);
673 AliMpPad pad = fSlatSegmentation->PadByIndices(AliMpIntPair(ixLA,iyLA),kFALSE);
674 if ( !pad.IsValid() ) return -1;
675 return Code(ixLA,iyLA);
676
677// AliMpPCB* pcb = fSlat->GetLayer(0)->FindPCB(ixLA);
678// if (!pcb)
679// {
680// AliError(Form("Could not find a pcb at (%d,%d) for slat %s",
681// ix,iy,fSlat->GetName()));
682// return -1;
683// }
684// if ( pcb->PadSizeX()==-1.0 )
685// {
686// // special case of column 7 non-bending.
687// return SPECIAL_SECTOR;
688// }
689// return fSlat->GetLayer(0)->FindPCBIndex(ixLA);
690}
691
692//_____________________________________________________________________________
693Int_t
694AliMUONTriggerSegmentationV2::Sector(Float_t, Float_t)
695{
696 AliFatal("Not implemented");
697 return 0;
698}
699
700//_____________________________________________________________________________
701void
702AliMUONTriggerSegmentationV2::SetCorrFunc(Int_t,TF1*)
703{
704 AliFatal("Not Implemented");
705}
706
707//_____________________________________________________________________________
708void
709AliMUONTriggerSegmentationV2::SetDAnod(float)
710{
711 AliFatal("Not Implemented");
712}
713
714//_____________________________________________________________________________
715void
716AliMUONTriggerSegmentationV2::SetHit(Float_t x, Float_t y)
717{
718 fXhit = x;
719 fYhit = y;
720
721 //
722 // insure we're within the slat limits. If not, issue an error and sets
723 // the current hit to slat center.
724 // FIXME: this should probably a) not happen at all b) be a fatal error
725 //
726 if ( fXhit < -fSlat->DX() || fXhit > fSlat->DX() ||
727 fYhit < -fSlat->DY() || fYhit > fSlat->DY() )
728 {
729 AliError(Form("Hit outside slat %s limits (x,y)hit = (%e,%e)."
730 " Forcing to (0,0)",fSlat->GetID(),fXhit,fYhit));
731 fXhit = 0.0;
732 fYhit = 0.0;
733 }
734
735}
736
737//_____________________________________________________________________________
738void
739AliMUONTriggerSegmentationV2::SetHit(Float_t x, Float_t y, Float_t)
740{
741 SetHit(x,y);
742}
743
744//_____________________________________________________________________________
745void
746AliMUONTriggerSegmentationV2::SetPad(Int_t ix, Int_t iy)
747{
748 Int_t ixLA, iyLA;
749 IGlo2ILoc(ix,iy,ixLA,iyLA);
750 fCurrentPad = fSlatSegmentation->PadByIndices(AliMpIntPair(ixLA,iyLA),kTRUE);
751 if ( !fCurrentPad.IsValid() )
752 {
753 AliError(Form("Setting current pad to invalid ! (ix,iy)=(%4d,%4d)",ix,iy));
754 }
755}
756
757//_____________________________________________________________________________
758void
759AliMUONTriggerSegmentationV2::SetPadSize(float,float)
760{
761 AliFatal("Not Implemented");
762}
763
764//_____________________________________________________________________________
765Int_t
766AliMUONTriggerSegmentationV2::SigGenCond(Float_t,Float_t,Float_t)
767{
768 AliFatal("Not Implemented");
769 return 0;
770}
771
772//_____________________________________________________________________________
773void
774AliMUONTriggerSegmentationV2::SigGenInit(Float_t,Float_t,Float_t)
775{
776 AliFatal("Not Implemented");
777}
778
779//_____________________________________________________________________________
780void
781AliMUONTriggerSegmentationV2::Streamer(TBuffer &R__b)
782{
783 if (R__b.IsReading())
784 {
785 AliMUONTriggerSegmentationV2::Class()->ReadBuffer(R__b, this);
786 ReadMappingData();
787 }
788 else
789 {
790 AliMUONTriggerSegmentationV2::Class()->WriteBuffer(R__b, this);
791 }
792}
793
794
795
796
797
798
799