]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSTrigger.h
Using the recommended way of forward declarations for TVector and TMatrix (see v5...
[u/mrichter/AliRoot.git] / PHOS / AliPHOSTrigger.h
1 #ifndef ALIPHOSTrigger_H
2 #define ALIPHOSTrigger_H
3
4 //____________________________________________________________
5 //  Class for trigger analysis.
6 //  Digits are grouped in TRU's (16x28 crystals). The algorithm searches 
7 //  all possible 4x4 crystal combinations and per each TRU, adding the 
8 //  digits amplitude and finding the maximum. Maximums are compared to 
9 //  triggers threshold and they are set.
10
11 //*-- Author: Gustavo Conesa & Yves Schutz (IFIC, SUBATECH, CERN)
12      
13 // --- ROOT system ---
14
15 class TClonesArray ;
16
17
18 // --- AliRoot header files ---
19 #include "AliTriggerDetector.h"
20
21 class AliPHOSGeometry ;
22
23 class AliPHOSTrigger : public AliTriggerDetector {
24   
25  public:   
26   AliPHOSTrigger() ; //  ctor
27   AliPHOSTrigger(const AliPHOSTrigger & trig) ; // cpy ctor
28   virtual ~AliPHOSTrigger() {}; //virtual dtor
29   virtual void    CreateInputs();
30   virtual void    Trigger();  //Make PHOS trigger
31   
32   Int_t  GetNTRU() const              {return fNTRU ; }  
33   Int_t  GetNTRUZ() const             {return fNTRUZ ; }  
34   Int_t  GetNTRUPhi() const           {return fNTRUPhi ; }  
35   Int_t  GetL0Threshold() const       {return fL0Threshold ; }  
36   Int_t  GetL1LowThreshold() const    {return fL1LowThreshold ; }
37   Int_t  GetL1MediumThreshold() const {return fL1MediumThreshold ; }
38   Int_t  GetL1HighThreshold() const   {return fL1HighThreshold ; }
39
40   void         Print(const Option_t * opt ="") const ;  
41
42   void         SetNTRU(Int_t ntru)            {fNTRU              = ntru; }
43   void         SetNTRUZ(Int_t ntru)           {fNTRUZ             = ntru; }
44   void         SetNTRUPhi(Int_t ntru)         {fNTRUPhi           = ntru; }
45   void         SetL0Threshold(Int_t amp)      {fL0Threshold       = amp; }
46   void         SetL1LowThreshold(Int_t amp)   {fL1LowThreshold    = amp; } 
47   void         SetL1MediumThreshold(Int_t amp){fL1MediumThreshold = amp; } 
48   void         SetL1HighThreshold(Int_t amp)  {fL1HighThreshold   = amp; }
49
50  private:
51   TClonesArray *  FillTRU(const TClonesArray * digits, 
52                           const AliPHOSGeometry * geom, const Int_t nModules, 
53                           const Int_t nCrystalsPhi, const Int_t nCrystalsZ) const ;
54   void MakeSlidingCell(const TClonesArray * trus, const Int_t mod,
55                        const Int_t nCrystalsPhi, const Int_t nCrystalsZ, 
56                        Float_t *ampmax) ;
57   void SetTriggers(const Float_t * ampmax) ;
58
59
60  private: 
61
62   Int_t    fNTRU ;              //! Number of TRUs per module
63   Int_t    fNTRUZ ;             //! Number of crystal rows per Z in one TRU
64   Int_t    fNTRUPhi ;           //! Number of crystal rows per Phi in one TRU
65   Int_t    fL0Threshold ;       //! L0 trigger energy threshold
66   Int_t    fL1LowThreshold ;    //! High pT trigger energy threshold
67   Int_t    fL1MediumThreshold ; //! 
68   Int_t    fL1HighThreshold ;   //! 
69
70   ClassDef(AliPHOSTrigger,2)
71 } ;
72
73
74 #endif //ALIPHOSTrigger_H