]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSTrigger.h
Correct bug in MakeSlidingCell and define 3 new data members related to the number...
[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 TMatrixD ;
16 class TClonesArray ;
17
18
19 // --- AliRoot header files ---
20 #include "AliTriggerDetector.h"
21
22 class AliPHOSGeometry ;
23
24 class AliPHOSTrigger : public AliTriggerDetector {
25   
26  public:   
27   AliPHOSTrigger() ; //  ctor
28   AliPHOSTrigger(const AliPHOSTrigger & trig) ; // cpy ctor
29   virtual ~AliPHOSTrigger() {}; //virtual dtor
30   virtual void    CreateInputs();
31   virtual void    Trigger();  //Make PHOS trigger
32   
33   const Int_t  GetNTRU() const              {return fNTRU ; }  
34   const Int_t  GetNTRUZ() const             {return fNTRUZ ; }  
35   const Int_t  GetNTRUPhi() const           {return fNTRUPhi ; }  
36   const Int_t  GetL0Threshold() const       {return fL0Threshold ; }  
37   const Int_t  GetL1LowThreshold() const    {return fL1LowThreshold ; }
38   const Int_t  GetL1MediumThreshold() const {return fL1MediumThreshold ; }
39   const Int_t  GetL1HighThreshold() const   {return fL1HighThreshold ; }
40
41   void         Print(const Option_t * opt ="") const ;  
42
43   void         SetNTRU(Int_t ntru)            {fNTRU              = ntru; }
44   void         SetNTRUZ(Int_t ntru)           {fNTRUZ             = ntru; }
45   void         SetNTRUPhi(Int_t ntru)         {fNTRUPhi           = ntru; }
46   void         SetL0Threshold(Int_t amp)      {fL0Threshold       = amp; }
47   void         SetL1LowThreshold(Int_t amp)   {fL1LowThreshold    = amp; } 
48   void         SetL1MediumThreshold(Int_t amp){fL1MediumThreshold = amp; } 
49   void         SetL1HighThreshold(Int_t amp)  {fL1HighThreshold   = amp; }
50
51  private:
52   TClonesArray *  FillTRU(const TClonesArray * digits, 
53                           const AliPHOSGeometry * geom, const Int_t nModules, 
54                           const Int_t nCrystalsPhi, const Int_t nCrystalsZ) const ;
55   void MakeSlidingCell(const TClonesArray * trus, const Int_t mod,
56                        const Int_t nCrystalsPhi, const Int_t nCrystalsZ, 
57                        Float_t *ampmax) ;
58   void SetTriggers(const Float_t * ampmax) ;
59
60
61  private: 
62
63   Int_t    fNTRU ;              //! Number of TRUs per module
64   Int_t    fNTRUZ ;             //! Number of crystal rows per Z in one TRU
65   Int_t    fNTRUPhi ;           //! Number of crystal rows per Phi in one TRU
66   Int_t    fL0Threshold ;       //! L0 trigger energy threshold
67   Int_t    fL1LowThreshold ;    //! High pT trigger energy threshold
68   Int_t    fL1MediumThreshold ; //! 
69   Int_t    fL1HighThreshold ;   //! 
70
71   ClassDef(AliPHOSTrigger,2)
72 } ;
73
74
75 #endif //ALIPHOSTrigger_H