]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpTrigger.h
Using Min and Max from TMath
[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: AliMpTrigger.h,v 1.5 2006/05/24 13:58:27 ivana Exp $
6
7 /// \ingroup trigger
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 ROOT_TVector2
29 #  include "TVector2.h"
30 #endif
31
32 #ifndef ALI_MP_PLANE_TYPE
33 #  include "AliMpPlaneType.h"
34 #endif
35
36 class AliMpPCB;
37 class AliMpSlat;
38 class AliMpVSegmentation;
39 class TArrayI;
40
41 class AliMpTrigger : public TObject
42 {
43 public:
44   AliMpTrigger();
45   AliMpTrigger(const char* slatType, AliMp::PlaneType bendingOrNonBending);
46   virtual ~AliMpTrigger();
47   
48   Bool_t AdoptLayer(AliMpSlat* slat);
49     
50   void GetAllLocalBoardNumbers(TArrayI& lbn) const;
51   
52   const char* GetID() const;
53   
54   const char* GetName() const;
55
56   Double_t DX() const;
57   Double_t DY() const;
58   
59   TVector2 Position() const;
60   
61   AliMpSlat* GetLayer(int layer) const;
62   AliMpVSegmentation* GetLayerSegmentation(int layer) const;
63   
64   Int_t GetNofPadsX() const;
65   
66   Int_t GetMaxNofPadsY() const;
67   
68   /// Returns the number of layers.
69   Int_t GetSize() const;
70   
71   void Print(Option_t* option="") const;
72
73   AliMp::PlaneType PlaneType() const;
74   
75   TVector2 Dimensions() const;
76   
77 private:
78     
79   Bool_t IsLayerValid(int layer) const;
80   
81   TString fId; ///< name of that slat
82   AliMp::PlaneType fPlaneType; ///< bending or non-bending
83   TObjArray fSlats; ///< virtual slat composing this trigger slat
84   TObjArray fSlatSegmentations; ///< segmentations for virtual slats
85   Int_t fMaxNofPadsY; ///< max number of pads in y direction
86   Double_t fDX; ///< half-size in x (cm)
87   Double_t fDY; ///< half-size in y (cm)
88   
89   ClassDef(AliMpTrigger,4) // Slat for trigger
90 };
91
92 #endif