]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONTriggerDecision.h
Adding MUON HLT code to the repository.
[u/mrichter/AliRoot.git] / MUON / AliMUONTriggerDecision.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 // Revision of includes 07/05/2004
6
7 #ifndef ALIMUONTRIGGERDECISION_H
8 #define ALIMUONTRIGGERDECISION_H
9
10 ////////////////////////////////////////////////
11 //  MUON Trigger Decision Class               //
12 ////////////////////////////////////////////////
13
14 #include <TObject.h>
15 #include "AliMUONLocalTrigger.h"
16
17 class TClonesArray;
18
19 class AliLoader;
20 class AliMUONData;
21 class AliMUON;
22 class AliRawReader;
23
24
25 class AliMUONTriggerDecision : public TObject 
26 {
27  public:
28   AliMUONTriggerDecision(AliLoader* loader, Int_t iprint = 0, AliMUONData* data = 0); // constructor
29   AliMUONTriggerDecision(); // constructor
30   ~AliMUONTriggerDecision();                  // destructor
31   
32   AliMUONData*   GetMUONData() {return fMUONData;}
33   void Trigger();
34   void ResetBit();
35   void SetBit();
36   void SetBitUpDownY();
37
38   void TrigX(Int_t ch1q[16], Int_t ch2q[16], Int_t ch3q[32], Int_t ch4q[32], 
39              Int_t coinc44, Int_t minDevStrip[5], Int_t minDev[5]);
40   void Sort2x5(Int_t dev1[6], Int_t dev2[6],
41                Int_t minDev[6], Int_t &dev1GTdev2);
42   void TrigY(Int_t y1[16], Int_t y2[16], Int_t y3[16], Int_t y4[16],
43              Int_t y3u[16], Int_t y3d[16], Int_t y4u[16], Int_t y4d[16],
44              Int_t x2m, Int_t x2ud, Int_t orMud[2], Int_t resetMid, 
45              Int_t coinc44, Int_t coordY[5]);
46   void LocalTrigger(Int_t icirc, Int_t minDevStrip[5], 
47                     Int_t minDev[5], Int_t coordY[5], 
48                     Int_t &iTrigger);    
49   void GlobalTrigger();
50
51   void Digits2Trigger(); // main function for digitizer
52
53   void ClearDigits();
54   TClonesArray* Digits(Int_t DetectionPlane);
55
56   void AddDigit(
57                 Int_t id, Int_t* tracks, Int_t* charges, Int_t* digits,
58                 const Int_t digitindex
59         );
60
61   // print-debug
62   void PrintBitPatXInput(Int_t icirc);
63   void PrintBitPatYInput(Int_t icirc);
64   void PrintLocalOutput(Int_t minDevStrip[5], Int_t minDev[5], 
65                         Int_t coordY[5]);
66
67   // return member data information
68   Int_t GetITrigger(Int_t icirc) const;
69   Int_t GetStripX11(Int_t icirc) const;
70   Int_t GetDev(Int_t icirc) const;
71   Int_t GetStripY11(Int_t icirc) const;
72   void GetLutOutput(Int_t icirc, Int_t lpt[2], Int_t hpt[2], Int_t apt[2]) const;
73   void GetGlobalTrigger(Int_t singlePlus[3], Int_t singleMinus[3], 
74                         Int_t singleUndef[3], Int_t pairUnlike[3], 
75                         Int_t pairLike[3]) const;  
76
77
78   ClassDef(AliMUONTriggerDecision,1) // Trigger Decision class
79
80
81 protected:
82
83   AliMUONTriggerDecision(const AliMUONTriggerDecision& rhs);
84   AliMUONTriggerDecision& operator=(const AliMUONTriggerDecision& rhs);
85
86   void ClearDigitNumbers();
87
88   void DigitFiredCircuit(
89                 const Int_t circuit, const Int_t cathode,
90                 const Int_t chamber, const Int_t digit
91         );
92
93
94   Int_t fDebug;               // print option     
95
96   // Global Trigger information [0] : Low pt, [1] : High pt, [2] : All pt 
97   Int_t fGlobalSinglePlus[3];  // tot num of single plus
98   Int_t fGlobalSingleMinus[3]; // tot num of single minus
99   Int_t fGlobalSingleUndef[3]; // tot num of single undefined
100   Int_t fGlobalPairUnlike[3];  // tot num of unlike-sign pairs
101   Int_t fGlobalPairLike[3];    // tot num of like-sign pairs
102
103   // Local Trigger information
104   Int_t fTrigger[234];  // fTrigger = 0 : no trigger, 1 : trigger
105   Int_t fStripX11[234];  // X strip in MC11 which triggers
106   Int_t fDev[234];       // deviation which triggers
107   Int_t fStripY11[234];  // Y strip in MC11 which triggers
108   Int_t fLutLpt[234][2]; // Local Trigger info Low pt
109   Int_t fLutHpt[234][2]; // Local Trigger info High pt
110   Int_t fLutApt[234][2]; // Local Trigger info All pt
111
112   // bit pattern
113   Int_t fXbit11[234][16]; // bit pattern XM11
114   Int_t fXbit12[234][16]; // bit pattern XM12
115   Int_t fXbit21[234][32]; // bit pattern XM21
116   Int_t fXbit22[234][32]; // bit pattern XM22
117   Int_t fYbit11[234][16]; // bit pattern YM11
118   Int_t fYbit12[234][16]; // bit pattern YM12
119   Int_t fYbit21[234][16]; // bit pattern YM21
120   Int_t fYbit22[234][16]; // bit pattern YM22
121
122   Int_t fYbit21U[234][16]; // bit pattern YM21 Up
123   Int_t fYbit22U[234][16]; // bit pattern YM22 Up
124   Int_t fYbit21D[234][16]; // bit pattern YM21 Down
125   Int_t fYbit22D[234][16]; // bit pattern YM22 Down
126
127   TArrayI fDigitNumbers[234];  //! The digit number that fired a circuit.
128   
129   AliLoader*     fLoader;             //! alice loader
130   TObjArray*     fTriggerCircuit;     //! List of Trigger Circuit
131   TObjArray*     fDigits;             // temp array for digits (both cathodes !) for trigger
132   TArrayI*       fDigitIndices;       //! Array of digit index numbers, one for each entry in fDigits.
133
134   AliMUONData*   fMUONData;           //! Data container for MUON subsystem 
135   AliMUON*       fMUON;               //! pointer to MUON  
136
137   // ???
138   //  TClonesArray* fLocalTriggers;   // Local Triggers
139   // Int_t fNLocalTriggers;          // Number of Local Triggers
140
141 };
142 #endif
143
144
145
146
147
148
149