]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpTrigger.h
New class - the factory for building mapping segmentations
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpTrigger.h
1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice                               */
3
4 // $Id$
5 // $MpId$
6
7 /// \ingroup trigger
8 /// \class AliMpTrigger
9 /// \brief A trigger slat
10 /// 
11 /// A trigger 'slat' object. It is to be viewed as a superposition of  
12 /// virtual layers of AliMpSlat objects. The need for more than one layer  
13 /// arise from the fact that a given local board deals with strips  
14 /// located in different detelem. So a given strip (pad) can have several  
15 /// "locations".
16 /// Author: Laurent Aphecetche
17
18 #ifndef ALI_MP_TRIGGER_H
19 #define ALI_MP_TRIGGER_H
20
21 #ifndef ROOT_TObject
22 #  include "TObject.h"
23 #endif
24
25 #ifndef ROOT_TString
26 #  include "TString.h"
27 #endif
28
29 #ifndef ROOT_TObjArray
30 #  include "TObjArray.h"
31 #endif
32
33 #ifndef ROOT_TVector2
34 #  include "TVector2.h"
35 #endif
36
37 #ifndef ALI_MP_PLANE_TYPE
38 #  include "AliMpPlaneType.h"
39 #endif
40
41 class AliMpPCB;
42 class AliMpSlat;
43 class TArrayI;
44
45 class AliMpTrigger : public TObject
46 {
47 public:
48   AliMpTrigger();
49   AliMpTrigger(const char* slatType, AliMpPlaneType bendingOrNonBending);
50   virtual ~AliMpTrigger();
51   
52   Bool_t AdoptLayer(AliMpSlat* slat);
53     
54   void GetAllLocalBoardNumbers(TArrayI& lbn) const;
55   
56   const char* GetID() const;
57   
58   const char* GetName() const;
59
60   Double_t DX() const;
61   Double_t DY() const;
62   
63   TVector2 Position() const;
64   
65   AliMpSlat* GetLayer(int layer) const;
66   
67   Int_t GetNofPadsX() const;
68   
69   Int_t GetMaxNofPadsY() const;
70   
71   /// Returns the number of layers.
72   Int_t GetSize() const;
73   
74   void Print(Option_t* option="") const;
75
76 private:
77     
78   Bool_t IsLayerValid(int layer) const;
79   
80   TString fId;
81   AliMpPlaneType fPlaneType;
82   TObjArray fSlats;
83   Int_t fMaxNofPadsY;
84   Double_t fDX;
85   Double_t fDY;
86   
87   ClassDef(AliMpTrigger,1) // Slat for trigger
88 };
89
90 #endif