]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONTriggerSegmentationV2.h
- Added function:
[u/mrichter/AliRoot.git] / MUON / AliMUONTriggerSegmentationV2.h
1 #ifndef ALIMUONTRIGGERSEGMENTATIONV2_H
2 #define ALIMUONTRIGGERSEGMENTATIONV2_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 /// \ingroup base
9 /// \class AliMUONTriggerSegmentationV2
10 /// \brief Segmentation for trigger modules
11 ///
12 /// New implementation of AliMUONVGeometryDESegmentation, based on  
13 /// mapping package.
14
15 #ifndef ALIMUONVGEOMETRYDESEGMENTATION_H
16 #include "AliMUONVGeometryDESegmentation.h"
17 #endif
18
19 #ifndef ALI_MP_PLANE_TYPE_H
20 #include "AliMpPlaneType.h"
21 #endif
22
23 #ifndef ALI_MP_PAD_H
24 #include "AliMpPad.h"
25 #endif
26
27 class AliMpTrigger;
28 class AliMpTriggerSegmentation;
29
30 class AliMUONTriggerSegmentationV2 : public AliMUONVGeometryDESegmentation 
31 {
32  public:
33
34   AliMUONTriggerSegmentationV2();
35   AliMUONTriggerSegmentationV2(Int_t detElemId, AliMpPlaneType bendingOrNonBending);
36   virtual ~AliMUONTriggerSegmentationV2();
37       
38   /// Distance between 1 pad and a position
39   virtual Float_t Distance2AndOffset(Int_t /*iX*/, Int_t /*iY*/, 
40                                      Float_t /*X*/, Float_t /*Y*/, 
41                                      Int_t * /*dummy*/);
42   
43   virtual Float_t Dpx() const;
44   virtual Float_t Dpy() const;
45   virtual Float_t Dpx(Int_t sectorCode) const;
46   virtual Float_t Dpy(Int_t sectorCode) const;
47   
48   virtual void Draw(const char */*opt*/ = "");
49   
50   void FirstPad(Float_t xhit, Float_t yhit, Float_t zhit, 
51                 Float_t dx, Float_t dy);
52
53   virtual Bool_t HasPad(Float_t /*x*/, Float_t /*y*/, Float_t /*z*/);
54   virtual Bool_t HasPad(Int_t ix, Int_t iy);
55   
56   virtual AliMUONGeometryDirection GetDirection();
57   virtual const AliMpVSegmentation* GetMpSegmentation() const;
58
59   virtual Float_t GetAnod(Float_t /*xhit*/) const;
60
61   virtual void GetPadI(Float_t x ,Float_t y ,Int_t   &ix,Int_t &iy);
62   virtual void GetPadI(Float_t x, Float_t y , Float_t z, Int_t &ix, Int_t &iy);
63   virtual void GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y);
64   virtual void GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y, Float_t &z);
65                   
66   virtual void Init(Int_t);
67   
68   virtual void IntegrationLimits(Float_t& x1, Float_t& x2, Float_t& y1, Float_t& y2);
69   
70   virtual Int_t ISector();
71   virtual Int_t Ix();
72   virtual Int_t Iy();
73   
74   Int_t LineNumber() const;
75   
76   virtual Int_t MorePads();
77  
78   virtual void Neighbours(Int_t iX, Int_t iY, Int_t* Nlist, 
79                           Int_t Xlist[10], Int_t Ylist[10]);
80   virtual void NextPad();
81     
82   virtual Int_t Npx() const;
83   virtual Int_t Npy() const;
84
85   void Print(Option_t* opt="") const;
86   
87   virtual void SetDAnod(Float_t /*D*/);
88
89   virtual Int_t Sector(Int_t ix, Int_t iy);
90   virtual void SetHit(Float_t xhit, Float_t yhit); 
91   virtual void SetHit(Float_t xhit, Float_t yhit, Float_t zhit);
92
93   virtual void SetPad(Int_t ix, Int_t iy);
94   virtual void SetPadSize(Float_t, Float_t);
95   
96   virtual void GetNParallelAndOffset(Int_t /*iX*/, Int_t /*iY*/, 
97                                      Int_t */*Nparallel*/, Int_t */*Offset*/);
98   virtual Int_t SigGenCond(Float_t /*x*/, Float_t /*y*/, Float_t /*z*/);
99   virtual void SigGenInit(Float_t /*x*/, Float_t /*y*/, Float_t /*z*/);
100   virtual void GiveTestPoints(Int_t &/*n*/, Float_t * /*x*/, Float_t */*y*/) const;
101   virtual void SetCorrFunc(Int_t /*dum*/, TF1* /*func*/);
102   virtual TF1* CorrFunc(Int_t) const;
103   virtual Int_t Sector(Float_t /*x*/, Float_t /*y*/);
104
105  protected:
106
107     AliMUONTriggerSegmentationV2(const AliMUONTriggerSegmentationV2& rhs);
108     AliMUONTriggerSegmentationV2& operator=(const AliMUONTriggerSegmentationV2& rhs);
109
110 public:
111     
112     void GetPadLoc2Glo(Int_t ixLoc, Int_t iyLoc, Int_t& ixGlo, Int_t& iyGlo) const;
113     void GetPadGlo2Loc(Int_t ixLoc, Int_t iyLoc, Int_t& ixGlo, Int_t& iyGlo) const;
114     
115     void PC2LA(Int_t ixPC, Int_t iyPC, Int_t& ixLA, Int_t& iyLA);
116     void LA2PC(Int_t ixLA, Int_t iyLA, Int_t& ixPC, Int_t& iyPC);
117     
118     void IGlo2ILoc(Int_t ixGlo, Int_t iyGlo, Int_t& ixLA, Int_t& iyLA);
119     void ILoc2IGlo(Int_t ixLA, Int_t iyLA, Int_t& ixGlo, Int_t& iyGlo);
120     
121     Int_t ModuleColNum(Int_t ixGlo) const;
122     
123 private:    
124     void ReadMappingData();
125     
126 private:
127     Int_t fDetElemId;
128     AliMpPlaneType fPlaneType;
129     const AliMpTrigger* fSlat; //!
130     AliMpTriggerSegmentation* fSlatSegmentation; //!
131 //    AliMpVPadIterator* fPadIterator; //!
132     AliMpPad fCurrentPad; //!FIXME: should not be needed, if we externalise the SetPad, SetHit, IntegrationLimits methods which have nothing to do here anyway, together with the iteration methods FirstPad, NextPad, MorePads, which have nothing to do here either.
133     Float_t fXhit; //!
134     Float_t fYhit; //!
135     Int_t fLineNumber; // Line number of that detection element (from 1 to 9)
136     
137     ClassDef(AliMUONTriggerSegmentationV2,1) 
138 };
139 #endif
140
141
142
143
144
145