X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=EMCAL%2FAliEMCALTrigger.h;h=c256036e13e1d2167dd1c493c6c5148672e98cf5;hb=c093846b425d50dfffc197029926e6d76224f682;hp=4ca9dbf69c35fb559804a8eb672dd8410f7bb83f;hpb=8cbfe66438e676777d5a2ed5fdb36e853ab07793;p=u%2Fmrichter%2FAliRoot.git diff --git a/EMCAL/AliEMCALTrigger.h b/EMCAL/AliEMCALTrigger.h index 4ca9dbf69c3..c256036e13e 100644 --- a/EMCAL/AliEMCALTrigger.h +++ b/EMCAL/AliEMCALTrigger.h @@ -4,10 +4,6 @@ * See cxx source for full Copyright notice */ /* $Id$ */ -/* $Log$ */ -/* Revision 1.5 2007/03/04 14:23:50 gustavo */ -/* Trigger maximum amplitude patch value and postion stored in ESDs, possibility to isolate patch in SuperModule or TRU acceptance implemented */ -/* */ //___________________________________________________________ // Class for trigger analysis. @@ -28,24 +24,35 @@ // //Inside the event loop // AliEMCALTrigger *tr = new AliEMCALTrigger();//Init Trigger // tr->SetL0Threshold(100); -// tr->SetL1JetLowPtThreshold(1000); -// tr->SetL1JetMediumPtThreshold(10000); -// tr->SetL1JetHighPtThreshold(20000); +// tr->SetL1GammaLowPtThreshold(1000); +// tr->SetL1GammaMediumPtThreshold(10000); +// tr->SetL1GammaHighPtThreshold(20000); // .... -// tr->Trigger(); //Execute Trigger +// tr->Trigger(); //Execute Trigger // tr->Print(""); //Print data members after calculation. // //*-- Author: Gustavo Conesa & Yves Schutz (IFIC, SUBATECH, CERN) - +//* -- Author: Aleksei Pavlinov, WSU, Detroit, USA +// Nov 2, 2007 +// One TRU card receives 96 analogue sums from 12 FEE cards. +// One sum is correcponding output from on module. +// This patch has size 12x8 modules (24x16 modules). +// Each SM has 3 TRU cards. + // --- ROOT system --- class TClonesArray ; -#include "TMatrixD.h" +class TTree; + +#include +#include // --- AliRoot header files --- #include "AliTriggerDetector.h" +class TBrowser; class AliEMCALGeometry ; +class TH2F; class AliEMCALTrigger : public AliTriggerDetector { @@ -53,23 +60,22 @@ class AliEMCALTrigger : public AliTriggerDetector { AliEMCALTrigger() ; // ctor AliEMCALTrigger(const AliEMCALTrigger & trig) ; // cpy ctor - virtual ~AliEMCALTrigger() {}; //virtual dtor + virtual ~AliEMCALTrigger(); //virtual dtor virtual void CreateInputs(); //Define trigger inputs for Central Trigger Processor void Print(const Option_t * opt ="") const ; virtual void Trigger(); //Make EMCAL trigger - //assignment operator for coding convention const AliEMCALTrigger & operator = (const AliEMCALTrigger & ) {return *this;} //Getters Float_t Get2x2MaxAmplitude() const { return f2x2MaxAmp ; } Float_t GetnxnMaxAmplitude() const { return fnxnMaxAmp ; } - Int_t Get2x2CellPhi() const { return f2x2CellPhi ; } - Int_t GetnxnCellPhi() const { return fnxnCellPhi ; } - Int_t Get2x2CellEta() const { return f2x2CellEta ; } - Int_t GetnxnCellEta() const { return fnxnCellEta ; } + Int_t Get2x2ModulePhi() const { return f2x2ModulePhi ; } + Int_t GetnxnModulePhi() const { return fnxnModulePhi ; } + Int_t Get2x2ModuleEta() const { return f2x2ModuleEta ; } + Int_t GetnxnModuleEta() const { return fnxnModuleEta ; } Int_t Get2x2SuperModule() const { return f2x2SM ; } Int_t GetnxnSuperModule() const { return fnxnSM ; } @@ -79,9 +85,9 @@ class AliEMCALTrigger : public AliTriggerDetector { Int_t * GetADCValuesHighGainMaxnxnSum() { return fADCValuesHighnxn; } Float_t GetL0Threshold() const { return fL0Threshold ; } - Float_t GetL1JetLowPtThreshold() const { return fL1JetLowPtThreshold ; } - Float_t GetL1JetMediumPtThreshold() const { return fL1JetMediumPtThreshold ; } - Float_t GetL1JetHighPtThreshold() const { return fL1JetHighPtThreshold ; } + Float_t GetL1GammaLowPtThreshold() const { return fL1GammaLowPtThreshold ; } + Float_t GetL1GammaMediumPtThreshold() const { return fL1GammaMediumPtThreshold ; } + Float_t GetL1GammaHighPtThreshold() const { return fL1GammaHighPtThreshold ; } Int_t GetPatchSize() const { return fPatchSize ; } Int_t GetIsolPatchSize() const { return fIsolPatchSize ; } @@ -94,8 +100,22 @@ class AliEMCALTrigger : public AliTriggerDetector { Bool_t Is2x2Isol() const { return fIs2x2Isol ; } Bool_t IsnxnIsol() const { return fIsnxnIsol ; } - Bool_t IsSimulation() const { return fSimulation ; } - Bool_t IsIsolatedInSuperModule() const { return fIsolateInSuperModule ; } + Bool_t IsSimulation() const { return fSimulation ; } + Bool_t IsIsolatedInSuperModule() const { return fIsolateInSuperModule ; } + Bool_t GetTimeKey() const { return fTimeKey;} + TH2F* GetJetMatrixE() const { return fJetMatrixE;} + Double_t GetEmcalSumAmp() const; + + Int_t GetNJetThreshold() const {return fNJetThreshold;} + Double_t* GetL1JetThresholds() {return fL1JetThreshold;} + TMatrixD GetAmpJetMax() const {return fAmpJetMax;} + + void PrintJetMatrix() const; // *MENU* + void PrintAmpTruMatrix(Int_t ind) const; // *MENU* + void PrintAmpSmMatrix(Int_t ind) const; // *MENU* + void PrintMatrix(const TMatrixD &mat) const; // *MENU* + Bool_t CheckConsistentOfMatrixes(const Int_t pri=0); // *MENU* + //Setters void SetDigitsList(TClonesArray * digits) @@ -103,12 +123,12 @@ class AliEMCALTrigger : public AliTriggerDetector { void SetL0Threshold(Int_t amp) {fL0Threshold = amp; } - void SetL1JetLowPtThreshold(Int_t amp) - {fL1JetLowPtThreshold = amp; } - void SetL1JetMediumPtThreshold(Int_t amp) - {fL1JetMediumPtThreshold = amp; } - void SetL1JetHighPtThreshold(Int_t amp) - {fL1JetHighPtThreshold = amp; } + void SetL1GammaLowPtThreshold(Int_t amp) + {fL1GammaLowPtThreshold = amp; } + void SetL1GammaMediumPtThreshold(Int_t amp) + {fL1GammaMediumPtThreshold = amp; } + void SetL1GammaHighPtThreshold(Int_t amp) + {fL1GammaHighPtThreshold = amp; } void SetPatchSize(Int_t ps) {fPatchSize = ps ; } void SetIsolPatchSize(Int_t ps) {fIsolPatchSize = ps ; } @@ -116,25 +136,56 @@ class AliEMCALTrigger : public AliTriggerDetector { void SetnxnAmpOutOfPatchThres(Float_t th) { fnxnAmpOutOfPatchThres = th; } void SetSimulation(Bool_t sim ) {fSimulation = sim ; } void SetIsolateInSuperModule(Bool_t isol ) {fIsolateInSuperModule = isol ; } - + void SetTimeKey(Bool_t timeKey) {fTimeKey = timeKey;} + void SetJetPatchSize(const Int_t patchSize) {fNJetPatchPhi = fNJetPatchEta = patchSize;} + void SetJetParameters(const Int_t patchSize, Double_t* jetThreshold) + { // unused now + fNJetPatchPhi = fNJetPatchEta = patchSize; + fL1JetThreshold = jetThreshold; + } + void SetVZER0Multiplicity(Double_t mult) {fVZER0Mult = mult;} + + // + virtual void Browse(TBrowser* b); + virtual Bool_t IsFolder() const {return kTRUE;} + + // Name of Jet trigger(s) + Char_t* GetNameOfJetTrigger(const Int_t i) {return Form("%s_Th_%2.2i",fgNameOfJetTriggers.Data(),i);} + static TString GetNameOfJetTriggers() {return fgNameOfJetTriggers;} + static TString fgNameOfJetTriggers; + // Estimation on EMCal energy from VZERO multiplicity + // 0.0153 is coefficient from adc to energy + // Dec 4, 2007 + // 1 p0 2.52248e-02 3.24364e-05 9.29319e-01 -2.34036e-06 + static Double_t GetMeanEmcalEnergy(const Int_t mult) {return 2.52248e-02*Double_t(mult);} + static Double_t GetMeanEmcalPatchEnergy(const Int_t mult, Int_t patchSize) + {return GetMeanEmcalEnergy(mult)*Double_t(patchSize)*Double_t(patchSize)/208.;} private: + void FillTRU(const TClonesArray * digits, TClonesArray * ampmatrix, TClonesArray * ampmatrixsmod, TClonesArray * timeRmatrix); + Bool_t IsPatchIsolated(Int_t iPatchType, const TClonesArray * ampmods, const Int_t imod, const Int_t mtru, const Float_t maxamp, const Int_t maxphi, const Int_t maxeta) ; - void MakeSlidingCell(const TClonesArray * amptrus, const TClonesArray * timeRtrus,const Int_t supermod, TMatrixD *ampmax2, TMatrixD *ampmaxn) ; - - void SetTriggers(const TClonesArray * amptrus,const Int_t iSM, const TMatrixD *ampmax2, const TMatrixD *ampmaxn, const AliEMCALGeometry * geom) ; + void MakeSlidingTowers(const TClonesArray * amptrus, const TClonesArray * timeRtrus, + const Int_t supermod, TMatrixD &max2, TMatrixD &maxn) ; + void SetTriggers(const TClonesArray * amptrus,const Int_t iSM, const TMatrixD &max2, const TMatrixD &maxn) ; + void GetTriggerInfo(TArrayF &triggerPosition, TArrayF &triggerAmplitudes); + // Jet staff + void FillJetMatrixFromSMs(TClonesArray *ampmatrixsmod, TMatrixD* jetMat, AliEMCALGeometry *g); + // no timing information here + void MakeSlidingPatch(const TMatrixD &jm, const Int_t nPatchSize, TMatrixD &JetMax); private: + AliEMCALGeometry *fGeom; //! Float_t f2x2MaxAmp ; //! Maximum 2x2 added amplitude (not overlapped) - Int_t f2x2CellPhi ; //! upper right cell, row(phi) - Int_t f2x2CellEta ; //! and column(eta) + Int_t f2x2ModulePhi ; //! upper right cell, row(phi) + Int_t f2x2ModuleEta ; //! and column(eta) Int_t f2x2SM ; //! Super Module where maximum is found Float_t fnxnMaxAmp ; //! Maximum nxn added amplitude (overlapped) - Int_t fnxnCellPhi ; //! upper right cell, row(phi) - Int_t fnxnCellEta ; //! and column(eta) + Int_t fnxnModulePhi ; //! upper right cell, row(phi) + Int_t fnxnModuleEta ; //! and column(eta) Int_t fnxnSM ; //! Super Module where maximum is found Int_t* fADCValuesHighnxn ; //! Sampled ADC high gain values for the nxn crystals amplitude sum @@ -142,21 +193,15 @@ class AliEMCALTrigger : public AliTriggerDetector { Int_t* fADCValuesHigh2x2 ; //! " high gain " 2x2 " Int_t* fADCValuesLow2x2 ; //! " low gaing " " - TClonesArray* fDigitsList ; //Array of digits + TClonesArray* fDigitsList; //! Array of digits - Float_t fL0Threshold ; //! L0 trigger energy threshold - Float_t fL1JetLowPtThreshold ; //! L1 Low pT trigger energy threshold - Float_t fL1JetMediumPtThreshold ; //! L1 Medium pT trigger energy threshold - Float_t fL1JetHighPtThreshold ; //! L1 High pT trigger energy threshold + Float_t fL0Threshold ; // L0 trigger energy threshold + Float_t fL1GammaLowPtThreshold ; // L1 gamma Low pT trigger energy threshold + Float_t fL1GammaMediumPtThreshold ; // L1 gamma Medium pT trigger energy threshold + Float_t fL1GammaHighPtThreshold ; // L1 gamma High pT trigger energy threshold - Int_t fNTRU; //! Number of TRU per SuperModule (3) - Int_t fNTRUEta ; //! Number of crystal rows per Eta in one TRU (3) - Int_t fNTRUPhi ; //! Number of crystal rows per Phi in one TRU (1) - Int_t fNCellsPhi; //! Number of rows in a TRU (24) - Int_t fNCellsEta; //! Number of columns in a TRU (16) - - Int_t fPatchSize; //! Trigger patch factor, to be multiplied to 2x2 cells - // 0 means 2x2, 1 means 4x4, 2 means 6x6 ... + Int_t fPatchSize; // Trigger patch factor, to be multiplied to 2x2 cells + // 0 means 2x2, 1 means 4x4 (max size 4x4 now) Int_t fIsolPatchSize ; // Isolation patch size, number of rows or columns to add to // the 2x2 or nxn maximum amplitude patch. // 1 means a patch around max amplitude of 2x2 of 4x4 and around @@ -169,10 +214,29 @@ class AliEMCALTrigger : public AliTriggerDetector { Float_t fIs2x2Isol; // Patch is isolated if f2x2AmpOutOfPatchThres threshold is passed Float_t fIsnxnIsol ; - Bool_t fSimulation ; //! Flag to do the trigger during simulation or reconstruction - Bool_t fIsolateInSuperModule; //! Flag to isolate trigger patch in SuperModule or in TRU acceptance - - ClassDef(AliEMCALTrigger,1) + Bool_t fSimulation ; // Flag to do the trigger during simulation or reconstruction + Bool_t fIsolateInSuperModule; // Flag to isolate trigger patch in SuperModule or in TRU acceptance + Bool_t fTimeKey; // Flag to take into account the digits time information + // + TClonesArray *fAmpTrus; //! Array of amplides of TRU matrixes + TClonesArray *fTimeRtrus; //! Array of recent times (unused now) + TClonesArray *fAmpSMods; //! Array of amplides of SM matrixes + // Information for EMCAL ESD + TArrayF fTriggerPosition; // + TArrayF fTriggerAmplitudes; // + // Jet staf + Int_t fNJetPatchPhi; // size of jet pathch in phi(row) direction (nJetPatchPhi*4 module) + Int_t fNJetPatchEta; // size of jet pathch in eta(column) direction (nJetPatchEta*4 module) + Int_t fNJetThreshold; // number of jet threshold + Double_t *fL1JetThreshold; //[fNJetThreshold] array of L1 jet energy threshold (this is not Et) + Double_t fJetMaxAmp; // Max amp from patch (fNJetPatchPhi*fNJetPatchEta) + TMatrixD* fAmpJetMatrix; //-> Jet trigger matrix : (nphi(17), neta(12)) + TH2F* fJetMatrixE; //-> temporary solution for getting coordinate informatin + TMatrixD fAmpJetMax; // 6 elements + // VZER0 + Double_t fVZER0Mult; // multiplicity (V0A+V0c) + + ClassDef(AliEMCALTrigger, 2) } ;