]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/MUONmapping/AliMpTrigger.h
Updated macros for PHOS alignment calculation
[u/mrichter/AliRoot.git] / MUON / MUONmapping / 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: AliMpTrigger.h,v 1.5 2006/05/24 13:58:27 ivana Exp $
6
7 /// \ingroup mptrigger
8 /// \class AliMpTrigger
9 /// \brief A trigger slat
10 ///
11 //  Author: Laurent Aphecetche
12
13 #ifndef ALI_MP_TRIGGER_H
14 #define ALI_MP_TRIGGER_H
15
16 #ifndef ROOT_TObject
17 #  include "TObject.h"
18 #endif
19
20 #ifndef ROOT_TString
21 #  include "TString.h"
22 #endif
23
24 #ifndef ROOT_TObjArray
25 #  include "TObjArray.h"
26 #endif
27
28 #ifndef ALI_MP_PLANE_TYPE
29 #  include "AliMpPlaneType.h"
30 #endif
31
32 class AliMpPCB;
33 class AliMpSlat;
34 class AliMpVSegmentation;
35 class TArrayI;
36
37 class AliMpTrigger : public TObject
38 {
39 public:
40   AliMpTrigger();
41   AliMpTrigger(const char* slatType, AliMp::PlaneType bendingOrNonBending);
42   virtual ~AliMpTrigger();
43   
44   Bool_t AdoptLayer(AliMpSlat* slat);
45     
46   void GetAllLocalBoardNumbers(TArrayI& lbn) const;
47   
48   const char* GetID() const;
49   
50   const char* GetName() const;
51
52   Double_t DX() const;
53   Double_t DY() const;
54   
55   /// Return x position
56   Double_t  GetPositionX() const { return DX(); }
57   /// Return y position
58   Double_t  GetPositionY() const { return DY(); }
59   
60   AliMpSlat* GetLayer(int layer) const;
61   AliMpVSegmentation* GetLayerSegmentation(int layer) const;
62   
63   Int_t GetNofPadsX() const;
64   
65   Int_t GetMaxNofPadsY() const;
66   
67   /// Returns the number of layers.
68   Int_t GetSize() const;
69   
70   void Print(Option_t* option="") const;
71
72   AliMp::PlaneType PlaneType() const;
73   
74   /// Return the x dimension (half-sizes) of that slat (cm)
75   Double_t  GetDimensionX() const { return DX(); }
76   /// Return the y dimension (half-sizes) of that slat (cm)
77   Double_t  GetDimensionY() const { return DY(); }
78   
79 private:
80     
81   Bool_t IsLayerValid(int layer) const;
82   
83   TString fId; ///< name of that slat
84   AliMp::PlaneType fPlaneType; ///< bending or non-bending
85   TObjArray fSlats; ///< virtual slat composing this trigger slat
86   TObjArray fSlatSegmentations; ///< segmentations for virtual slats
87   Int_t fMaxNofPadsY; ///< max number of pads in y direction
88   Double_t fDX; ///< half-size in x (cm)
89   Double_t fDY; ///< half-size in y (cm)
90   
91   ClassDef(AliMpTrigger,4) // Slat for trigger
92 };
93
94 #endif