]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONTriggerCircuit.h
Managed the 234 local boards inside the class & simplified the code
[u/mrichter/AliRoot.git] / MUON / AliMUONTriggerCircuit.h
1 #ifndef ALIMUONTRIGGERCIRCUIT_H
2 #define ALIMUONTRIGGERCIRCUIT_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 // Revision of includes 07/05/2004
8 //
9 /// \ingroup trigger
10 /// \class AliMUONTriggerCircuit
11 /// \brief MUON Trigger circuit
12 ///
13 //  Author Philippe Crochet (LPCCFd)
14
15 #include <TObject.h>
16 #include <TArrayF.h>
17
18 #include "AliMpPad.h"
19 #include "AliMpVSegmentation.h"
20 #include "AliMUONGeometryTransformer.h"
21
22 class AliMpLocalBoard;
23
24 class AliMUONTriggerCircuit : public TObject 
25 {
26 public: 
27   AliMUONTriggerCircuit(const AliMUONGeometryTransformer* transformer);  
28   virtual ~AliMUONTriggerCircuit();
29      // copy constructor
30   AliMUONTriggerCircuit(const AliMUONTriggerCircuit& AliMUONTriggerCircuit); 
31   // assignment operator
32   AliMUONTriggerCircuit& operator=(const AliMUONTriggerCircuit& AliMUONTriggerCircuit); 
33
34   //--- methods which return member data related info
35   Float_t GetY11Pos(Int_t localBoardId, Int_t istrip) const;
36   Float_t GetY21Pos(Int_t localBoardId, Int_t istrip) const;
37   Float_t GetX11Pos(Int_t localBoardId, Int_t istrip) const;
38
39   //  void Print(Option_t* opt="") const;
40   //  void dump(const char* what, const Float_t* array, Int_t size);
41   //  void dump(const char* what, const Int_t* array, Int_t size);
42   
43   /// Set pointer to transformations
44   void  SetTransformer(const AliMUONGeometryTransformer* transformer) {fTransformer = transformer;}
45   /// Get pointer to transformations
46   const AliMUONGeometryTransformer* GetTransformer() const {return fTransformer;}
47
48 private:
49
50   void LoadYPos(AliMpLocalBoard* localBoard);
51   void LoadXPos(AliMpLocalBoard* localBoard);
52
53   Int_t FirstStrip(AliMpLocalBoard* localBoard);
54
55   void FillXstrips(const Int_t icol, 
56                    const Int_t iFirstStrip, const Int_t iLastStrip,
57                    Int_t liStripCircuit, TArrayF& ypos);
58   
59   void FillYstrips(const Int_t iFirstStrip,
60                    const Int_t iLastStrip, Int_t liStripCircuit,
61                    const Bool_t doubling);
62
63   void XYGlobal(const AliMpPad& pad,
64                 Double_t* xyGlobal);    
65   
66
67 private:    
68   TArrayF fXpos11[235];         ///< X position of Y strips in MC11
69   TArrayF fYpos11[235];         ///< Y position of X strips in MC11
70   TArrayF fYpos21[235];         ///< Y position of X strips in MC21
71
72   const AliMUONGeometryTransformer* fTransformer; //!< pointer to transformation
73   const AliMpVSegmentation* fCurrentSeg;          //!< current segmentation
74
75   Int_t fCurrentDetElem;                          //!< current detection elt id
76   Int_t fCurrentLocalBoard;                       //!< current local board id
77
78   ClassDef(AliMUONTriggerCircuit,1) // Trigger Circuit class
79 };
80 #endif