]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliEMCALTrigger.h
include reconstruction parameters to be used by AliTOFtrackerV1
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALTrigger.h
index c1f48468ed1eb03596939867c0a3a4b6502b278b..05e2851a66e5d6c1587ceb04d74b13fae7e2a4af 100644 (file)
@@ -3,16 +3,19 @@
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
-/* $Id $ */
-/* $Log $ */
+/* $Id$ */
+
 //___________________________________________________________
 //  Class for trigger analysis.
+//
+//  -- Author: Gustavo Conesa & Yves Schutz (IFIC, SUBATECH, CERN)
 //  Digits are grouped in TRU's (Trigger Units). A TRU consist of 384 cells 
-//  ordered fNTRUPhi x fNTRUZ. The algorithm searches all possible 
-//  4x4 crystal combinations per each TRU, adding the digits amplitude and 
-//  finding the maximum. Maximums are transformed in adc time samples. 
-//  Each time bin is compared to the trigger threshold until it is larger 
-//  and then, triggers are set. Thresholds need to be fixed. 
+//  ordered fNTRUPhi x fNTRUEta matrix. The algorithm searches all possible 
+//  2x2 and nxn (n multiple of 4) crystal combinations per each TRU, adding the 
+//  digits amplitude and finding the maximum.  It is found is maximum is isolated. 
+//  Maxima are transformed in adc time samples. Each time bin is compared to the 
+//  trigger threshold until it is larger and then, triggers are set. 
+//  Thresholds need to be fixed. 
 //  Last 2 modules are half size in Phi, I considered that the number 
 //  of TRU is maintained for the last modules but final decision has not 
 //  been taken. If different, then this must to be changed. 
@@ -24,8 +27,9 @@
 //  tr->SetL1JetLowPtThreshold(1000);
 //  tr->SetL1JetMediumPtThreshold(10000);
 //  tr->SetL1JetHighPtThreshold(20000);
+//  ....
 //  tr->Trigger(); //Execute Trigger
-//  tr->Print(""); //Print results
+//  tr->Print("");  //Print data members after calculation.
 //
 //*-- Author: Gustavo Conesa & Yves Schutz (IFIC, SUBATECH, CERN)
      
@@ -45,7 +49,9 @@ 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
@@ -54,27 +60,39 @@ class AliEMCALTrigger : public AliTriggerDetector {
   const AliEMCALTrigger & operator = (const AliEMCALTrigger & ) {return *this;}
 
   //Getters
-  Float_t  Get2x2MaxAmplitude()  const {return f2x2MaxAmp ; }
-  Float_t  Get4x4MaxAmplitude()  const {return f4x4MaxAmp ; }
-  Int_t    Get2x2CellPhi()       const {return f2x2CellPhi ; }
-  Int_t    Get4x4CellPhi()       const {return f4x4CellPhi ; }
-  Int_t    Get2x2CellEta()       const {return f2x2CellEta ; }
-  Int_t    Get4x4CellEta()       const {return f4x4CellEta ; }
-  Int_t    Get2x2SuperModule()   const {return f2x2SM ; }
-  Int_t    Get4x4SuperModule()   const {return f4x4SM ; }
-
-  Int_t *  GetADCValuesLowGainMax2x2Sum()  {return fADCValuesLow2x2; }
-  Int_t *  GetADCValuesHighGainMax2x2Sum() {return fADCValuesHigh2x2; }
-  Int_t *  GetADCValuesLowGainMax4x4Sum()  {return fADCValuesLow4x4; }
-  Int_t *  GetADCValuesHighGainMax4x4Sum() {return fADCValuesHigh4x4; }
-
-  Float_t  GetL0Threshold() const           {return fL0Threshold ; } 
-  Float_t  GetL1JetLowPtThreshold() const   {return fL1JetLowPtThreshold ; }
-  Float_t  GetL1JetMediumPtThreshold()const {return fL1JetMediumPtThreshold ; }
-  Float_t  GetL1JetHighPtThreshold() const  {return fL1JetHighPtThreshold ; }
-  
-  Bool_t   IsSimulation() const {return fSimulation ; }
-  
+  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    Get2x2SuperModule()   const { return f2x2SM ; }
+  Int_t    GetnxnSuperModule()   const { return fnxnSM ; }
+
+  Int_t *  GetADCValuesLowGainMax2x2Sum()  { return fADCValuesLow2x2; }
+  Int_t *  GetADCValuesHighGainMax2x2Sum() { return fADCValuesHigh2x2; }
+  Int_t *  GetADCValuesLowGainMaxnxnSum()  { return fADCValuesLownxn; }
+  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 ; }
+
+  Int_t    GetPatchSize()              const { return fPatchSize ; }
+  Int_t    GetIsolPatchSize()          const { return fIsolPatchSize ; }
+
+  Float_t  Get2x2AmpOutOfPatch()       const { return  f2x2AmpOutOfPatch ; }
+  Float_t  GetnxnAmpOutOfPatch()       const { return  fnxnAmpOutOfPatch ; }
+  Float_t  Get2x2AmpOutOfPatchThres()  const { return  f2x2AmpOutOfPatchThres ; }
+  Float_t  GetnxnAmpOutOfPatchThres()  const { return  fnxnAmpOutOfPatchThres ; } 
+
+  Bool_t   Is2x2Isol()                 const { return  fIs2x2Isol ; }
+  Bool_t   IsnxnIsol()                 const { return  fIsnxnIsol ; }
+
+  Bool_t   IsSimulation()              const { return fSimulation ; }
+  Bool_t   IsIsolatedInSuperModule()   const { return fIsolateInSuperModule ; }
+
   //Setters
   void     SetDigitsList(TClonesArray * digits)          
    {fDigitsList  = digits ; }
@@ -88,28 +106,38 @@ class AliEMCALTrigger : public AliTriggerDetector {
   void     SetL1JetHighPtThreshold(Int_t amp)
     {fL1JetHighPtThreshold   = amp; }
 
+  void SetPatchSize(Int_t ps)                {fPatchSize = ps ; }
+  void SetIsolPatchSize(Int_t ps)          {fIsolPatchSize = ps ; }
+  void Set2x2AmpOutOfPatchThres(Float_t th) { f2x2AmpOutOfPatchThres = th; }
+  void SetnxnAmpOutOfPatchThres(Float_t th) { fnxnAmpOutOfPatchThres = th; }
   void SetSimulation(Bool_t sim )          {fSimulation = sim ; }
+  void SetIsolateInSuperModule(Bool_t isol )          {fIsolateInSuperModule = isol ; }
 
  private:
-  void MakeSlidingCell(const TClonesArray * amptrus, const TClonesArray * timeRtrus,const Int_t supermod, TMatrixD *ampmax2, TMatrixD *ampmax4, AliEMCALGeometry * geom) ; 
+
+  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) ;
   
 
-  void SetTriggers(const Int_t iSM, const TMatrixD *ampmax2, const TMatrixD *ampmax4, AliEMCALGeometry *geom) ;
-    
  private: 
-
-  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   f2x2SM ;            //! Super Module where maximum is found
-  Float_t f4x4MaxAmp ;        //! Maximum 4x4 added amplitude (overlapped)
-  Int_t   f4x4CellPhi ;       //! upper right cell, row(phi)   
-  Int_t   f4x4CellEta ;       //! and column(eta)
-  Int_t   f4x4SM ;            //! Super Module where maximum is found
-
-  Int_t*   fADCValuesHigh4x4 ; //! Sampled ADC high gain values for the 4x4 crystals amplitude sum
-  Int_t*   fADCValuesLow4x4  ; //! " low gain  " 
+  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   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   fnxnSM ;             //! Super Module where maximum is found
+
+  Int_t*   fADCValuesHighnxn ; //! Sampled ADC high gain values for the nxn crystals amplitude sum
+  Int_t*   fADCValuesLownxn  ; //! " low gain  " 
   Int_t*   fADCValuesHigh2x2 ; //! " high gain " 2x2 "
   Int_t*   fADCValuesLow2x2  ; //! " low gaing " "
 
@@ -120,9 +148,24 @@ class AliEMCALTrigger : public AliTriggerDetector {
   Float_t fL1JetMediumPtThreshold ; //! L1 Medium pT trigger energy threshold
   Float_t fL1JetHighPtThreshold ;   //! L1 High pT trigger energy threshold
 
+  Int_t fPatchSize;          //! Trigger patch factor, to be multiplied to 2x2 cells
+                             //  0 means 2x2, 1 means 4x4, 2 means 6x6 ...
+  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         
+                             //  max ampl patch of 4x4 of 8x8 
+    
+  Float_t f2x2AmpOutOfPatch;      //  Amplitude in isolation cone minus maximum amplitude of the reference patch
+  Float_t fnxnAmpOutOfPatch; 
+  Float_t f2x2AmpOutOfPatchThres; //  Threshold to select a trigger as isolated on f2x2AmpOutOfPatch value
+  Float_t fnxnAmpOutOfPatchThres; 
+  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)
+  ClassDef(AliEMCALTrigger,0)
 } ;