Medium Jet pT L1 trigger input added
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALTrigger.h
CommitLineData
f0377b23 1#ifndef ALIEMCALTrigger_H
2#define ALIEMCALTrigger_H
59264fa6 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
f0377b23 5
59264fa6 6/* $Id $ */
7/* $Log $ */
f0377b23 8//___________________________________________________________
9// Class for trigger analysis.
59264fa6 10// Digits are grouped in TRU's (Trigger Units). A TRU consist of 384 cells
0b2ec9f7 11// ordered fNTRUPhi x fNTRUZ. The algorithm searches all possible 2x2 and
12// nxn (n multiple of 4) crystal combinations per each TRU, adding the digits
13// amplitude and finding the maximum. Maximums are transformed in adc time
14// samples. Each time bin is compared to the trigger threshold until it is larger
59264fa6 15// and then, triggers are set. Thresholds need to be fixed.
16// Last 2 modules are half size in Phi, I considered that the number
17// of TRU is maintained for the last modules but final decision has not
18// been taken. If different, then this must to be changed.
f0377b23 19// Usage:
20//
21// //Inside the event loop
22// AliEMCALTrigger *tr = new AliEMCALTrigger();//Init Trigger
59264fa6 23// tr->SetL0Threshold(100);
f0377b23 24// tr->SetL1JetLowPtThreshold(1000);
25// tr->SetL1JetMediumPtThreshold(10000);
26// tr->SetL1JetHighPtThreshold(20000);
27// tr->Trigger(); //Execute Trigger
28// tr->Print(""); //Print results
f0377b23 29//
30//*-- Author: Gustavo Conesa & Yves Schutz (IFIC, SUBATECH, CERN)
31
32// --- ROOT system ---
33
34class TClonesArray ;
59264fa6 35#include "TMatrixD.h"
f0377b23 36
37// --- AliRoot header files ---
38#include "AliTriggerDetector.h"
39
40class AliEMCALGeometry ;
41
42class AliEMCALTrigger : public AliTriggerDetector {
43
44 public:
59264fa6 45
f0377b23 46 AliEMCALTrigger() ; // ctor
47 AliEMCALTrigger(const AliEMCALTrigger & trig) ; // cpy ctor
48 virtual ~AliEMCALTrigger() {}; //virtual dtor
59264fa6 49 virtual void CreateInputs(); //Define trigger inputs for Central Trigger Processor
50 void Print(const Option_t * opt ="") const ;
f0377b23 51 virtual void Trigger(); //Make EMCAL trigger
59264fa6 52
14ce0a6e 53 //assignment operator for coding convention
54 const AliEMCALTrigger & operator = (const AliEMCALTrigger & ) {return *this;}
55
59264fa6 56 //Getters
57 Float_t Get2x2MaxAmplitude() const {return f2x2MaxAmp ; }
0b2ec9f7 58 Float_t GetnxnMaxAmplitude() const {return fnxnMaxAmp ; }
59264fa6 59 Int_t Get2x2CellPhi() const {return f2x2CellPhi ; }
0b2ec9f7 60 Int_t GetnxnCellPhi() const {return fnxnCellPhi ; }
59264fa6 61 Int_t Get2x2CellEta() const {return f2x2CellEta ; }
0b2ec9f7 62 Int_t GetnxnCellEta() const {return fnxnCellEta ; }
59264fa6 63 Int_t Get2x2SuperModule() const {return f2x2SM ; }
0b2ec9f7 64 Int_t GetnxnSuperModule() const {return fnxnSM ; }
59264fa6 65
66 Int_t * GetADCValuesLowGainMax2x2Sum() {return fADCValuesLow2x2; }
67 Int_t * GetADCValuesHighGainMax2x2Sum() {return fADCValuesHigh2x2; }
0b2ec9f7 68 Int_t * GetADCValuesLowGainMaxnxnSum() {return fADCValuesLownxn; }
69 Int_t * GetADCValuesHighGainMaxnxnSum() {return fADCValuesHighnxn; }
59264fa6 70
71 Float_t GetL0Threshold() const {return fL0Threshold ; }
72 Float_t GetL1JetLowPtThreshold() const {return fL1JetLowPtThreshold ; }
73 Float_t GetL1JetMediumPtThreshold()const {return fL1JetMediumPtThreshold ; }
74 Float_t GetL1JetHighPtThreshold() const {return fL1JetHighPtThreshold ; }
0b2ec9f7 75
76 Float_t GetPatchSize() const {return fPatchSize ; }
59264fa6 77 Bool_t IsSimulation() const {return fSimulation ; }
78
79 //Setters
80 void SetDigitsList(TClonesArray * digits)
81 {fDigitsList = digits ; }
82
83 void SetL0Threshold(Int_t amp)
84 {fL0Threshold = amp; }
85 void SetL1JetLowPtThreshold(Int_t amp)
86 {fL1JetLowPtThreshold = amp; }
87 void SetL1JetMediumPtThreshold(Int_t amp)
88 {fL1JetMediumPtThreshold = amp; }
89 void SetL1JetHighPtThreshold(Int_t amp)
90 {fL1JetHighPtThreshold = amp; }
91
0b2ec9f7 92 void SetPatchSize(Int_t ps) {fPatchSize = ps ; }
59264fa6 93 void SetSimulation(Bool_t sim ) {fSimulation = sim ; }
94
f0377b23 95 private:
96
0b2ec9f7 97 void MakeSlidingCell(const TClonesArray * amptrus, const TClonesArray * timeRtrus,const Int_t supermod, TMatrixD *ampmax2, TMatrixD *ampmaxn, AliEMCALGeometry * geom) ;
f0377b23 98
99
0b2ec9f7 100 void SetTriggers(const Int_t iSM, const TMatrixD *ampmax2, const TMatrixD *ampmaxn, AliEMCALGeometry *geom) ;
59264fa6 101
f0377b23 102 private:
f0377b23 103
59264fa6 104 Float_t f2x2MaxAmp ; //! Maximum 2x2 added amplitude (not overlapped)
105 Int_t f2x2CellPhi ; //! upper right cell, row(phi)
106 Int_t f2x2CellEta ; //! and column(eta)
107 Int_t f2x2SM ; //! Super Module where maximum is found
0b2ec9f7 108 Float_t fnxnMaxAmp ; //! Maximum nxn added amplitude (overlapped)
109 Int_t fnxnCellPhi ; //! upper right cell, row(phi)
110 Int_t fnxnCellEta ; //! and column(eta)
111 Int_t fnxnSM ; //! Super Module where maximum is found
f0377b23 112
0b2ec9f7 113 Int_t* fADCValuesHighnxn ; //! Sampled ADC high gain values for the nxn crystals amplitude sum
114 Int_t* fADCValuesLownxn ; //! " low gain "
59264fa6 115 Int_t* fADCValuesHigh2x2 ; //! " high gain " 2x2 "
116 Int_t* fADCValuesLow2x2 ; //! " low gaing " "
f0377b23 117
59264fa6 118 TClonesArray* fDigitsList ; //Array of digits
119
120 Float_t fL0Threshold ; //! L0 trigger energy threshold
121 Float_t fL1JetLowPtThreshold ; //! L1 Low pT trigger energy threshold
122 Float_t fL1JetMediumPtThreshold ; //! L1 Medium pT trigger energy threshold
123 Float_t fL1JetHighPtThreshold ; //! L1 High pT trigger energy threshold
124
0b2ec9f7 125 Int_t fPatchSize; //! Trigger patch factor, to be multiplied to 2x2 cells
126 // 0 means 2x2, 1 means nxn, 2 means 8x8 ...
59264fa6 127 Bool_t fSimulation ; //! Flag to do the trigger during simulation or reconstruction
128
129 ClassDef(AliEMCALTrigger,1)
130} ;
131
132
f0377b23 133#endif //ALIEMCALTrigger_H
59264fa6 134