//____________________________________________________________
// Class for trigger analysis.
-// Digits are grouped in TRU's (16x28 crystals). The algorithm searches
-// all possible 4x4 crystal combinations and per each TRU, adding the
-// digits amplitude and finding the maximum. Maximums are compared to
-// triggers threshold and they are set.
-// FIRST ATTEMPT TO MAKE A TRIGGER CLASS. IT WILL CHANGE WHEN CENTRAL TRIGGER CLASS FIXES
-// THINGS
+// Class for trigger analysis.
+// Digits are grouped in TRU's (16x28 ordered fNTRUPhi x fNTRUEta).
+// The algorithm searches all possible 4x4 cell combinations per each TRU,
+// adding the digits amplitude and finding the maximum. Maximums are compared
+// to triggers threshold and they are set. Thresholds need to be fixed.
+// Usage:
+//
+// //Inside the event loop
+// AliEMCALTrigger *tr = new AliEMCALTrigger();//Init Trigger
+// tr->SetL0MBPbPbThreshold(500);
+// tr->SetL0MBppThreshold(100);
+// tr->SetL1JetLowPtThreshold(1000);
+// tr->SetL1JetMediumPtThreshold(10000);
+// tr->SetL1JetHighPtThreshold(20000);
+// tr->Trigger(); //Execute Trigger
+// tr->Print(""); //Print result, with "deb" option all data members
+// //are printed
+//
//*-- Author: Gustavo Conesa & Yves Schutz (IFIC, SUBATECH, CERN)
// --- ROOT system ---
-#include "TTask.h"
-#include "TClonesArray.h"
-#include "TMatrixD.h"
-class AliPHOSGeometry ;
+class TClonesArray ;
// --- AliRoot header files ---
+#include "AliTriggerDetector.h"
+
+class AliPHOSGeometry ;
-class AliPHOSTrigger : public TObject {
+class AliPHOSTrigger : public AliTriggerDetector {
public:
AliPHOSTrigger() ; // ctor
AliPHOSTrigger(const AliPHOSTrigger & trig) ; // cpy ctor
virtual ~AliPHOSTrigger() {}; //virtual dtor
+ virtual void CreateInputs();
+ virtual void Trigger(); //Make PHOS trigger
- void MakeTrigger() ; //Make PHOS trigger
-
- const Bool_t IsL0Set() const {return fL0 ;} // Is L0 trigger set?
- const Bool_t IsL1LowSet() const {return fL1Low ;} // Is L1 trigger set?
- const Bool_t IsL1MediumSet() const {return fL1Medium ;}
- const Bool_t IsL1HighSet() const {return fL1High ;}
-
- const Int_t GetL0Threshold() const {return fL0Threshold ; }
- const Int_t GetL1LowThreshold() const {return fL1LowThreshold ; }
- const Int_t GetL1MediumThreshold() const {return fL1MediumThreshold ; }
- const Int_t GetL1HighThreshold() const {return fL1HighThreshold ; }
+ Int_t GetNTRU() const {return fNTRU ; }
+ Int_t GetNTRUZ() const {return fNTRUZ ; }
+ Int_t GetNTRUPhi() const {return fNTRUPhi ; }
+ Int_t GetL0MBPbPbThreshold() const {return fL0MBPbPbThreshold ; }
+ Int_t GetL0MBppThreshold() const {return fL0MBppThreshold ; }
+ Int_t GetL1JetLowPtThreshold() const {return fL1JetLowPtThreshold ; }
+ Int_t GetL1JetHighPtThreshold() const {return fL1JetHighPtThreshold ; }
void Print(const Option_t * opt ="") const ;
- void SetL0Threshold(Int_t amp) {fL0Threshold = amp; }
- void SetL1LowThreshold(Int_t amp) {fL1LowThreshold = amp; }
- void SetL1MediumThreshold(Int_t amp){fL1MediumThreshold = amp; }
- void SetL1HighThreshold(Int_t amp) {fL1HighThreshold = amp; }
+ void SetNTRU(Int_t ntru) {fNTRU = ntru; }
+ void SetNTRUZ(Int_t ntru) {fNTRUZ = ntru; }
+ void SetNTRUPhi(Int_t ntru) {fNTRUPhi = ntru; }
+ void SetL0MBPbPbThreshold(Int_t amp) {fL0MBPbPbThreshold = amp; }
+ void SetL0MBppThreshold(Int_t amp) {fL0MBppThreshold = amp; }
+ void SetL1JetLowPtThreshold(Int_t amp)
+ {fL1JetLowPtThreshold = amp; }
+ void SetL1JetHighPtThreshold(Int_t amp)
+ {fL1JetHighPtThreshold = amp; }
private:
- TClonesArray * FillTRU(const TClonesArray * digits) ;
- void MakeSlidingCell(const TClonesArray * trus, const Int_t mod,
+ TClonesArray * FillTRU(const TClonesArray * digits,
+ const AliPHOSGeometry * geom, const Int_t nModules,
+ const Int_t nCrystalsPhi, const Int_t nCrystalsZ) const ;
+ void MakeSlidingCell(const TClonesArray * trus, const Int_t mod,
+ const Int_t nCrystalsPhi, const Int_t nCrystalsZ,
Float_t *ampmax) ;
void SetTriggers(const Float_t * ampmax) ;
- void InitTriggers() ;
-
- void SetL0() { fL0 = kTRUE ; }
- void SetL1Low() { fL1Low = kTRUE ; }
- void SetL1Medium() { fL1Medium = kTRUE ; }
- void SetL1High() { fL1High = kTRUE ; }
private:
-
- Bool_t fL0 ; //! Minimum Bias Trigger
- Bool_t fL1Low ; //! High pT triggers
- Bool_t fL1Medium ; //!
- Bool_t fL1High ; //!
- Int_t fL0Threshold ; //! L0 trigger energy threshold
- Int_t fL1LowThreshold ; //! High pT trigger energy threshold
- Int_t fL1MediumThreshold ; //!
- Int_t fL1HighThreshold ; //!
+ Int_t fNTRU ; //! Number of TRUs per module
+ Int_t fNTRUZ ; //! Number of crystal rows per Z in one TRU
+ Int_t fNTRUPhi ; //! Number of crystal rows per Phi in one TRU
+ Int_t fL0MBPbPbThreshold ; //! L0 PbPb trigger energy threshold
+ Int_t fL0MBppThreshold ; //! L0 pp trigger energy threshold
+ Int_t fL1JetLowPtThreshold ; //! Low and High pT trigger energy threshold
+ Int_t fL1JetHighPtThreshold ; //!
- ClassDef(AliPHOSTrigger,0)
+ ClassDef(AliPHOSTrigger,3)
} ;