]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG4/CaloCalib/AliAnalysisTaskEMCALClusterize.h
Add cell rejection based on energy in sorrounding cells, 4 cells in corners with...
[u/mrichter/AliRoot.git] / PWG4 / CaloCalib / AliAnalysisTaskEMCALClusterize.h
index b76c233e0b4821a16004a50c96f4b857c6281ec9..d2b5f6edf18d2a658f423235cf7104240209ade7 100644 (file)
@@ -36,6 +36,28 @@ class AliAnalysisTaskEMCALClusterize : public AliAnalysisTaskSE {
   virtual void   UserExec(Option_t *option);
   virtual void   Init();
   virtual void   LocalInit()                                    { Init()                       ; }
+    
+  // Event methods, settings
+  void           CheckAndGetEvent();
+  
+  Bool_t         IsExoticEvent();
+  void           SwitchOnExoticEventsRemoval()                  { fRemoveExoticEvents= kTRUE   ; }
+  void           SwitchOffExoticEventsRemoval()                 { fRemoveExoticEvents= kFALSE  ; } 
+  
+  Bool_t         IsExoticCell(const Int_t absId, const Float_t ecell, 
+                              const Float_t tcell, AliVCaloCells* cells);
+  void           SwitchOnExoticCellRemoval()                    { fRemoveExoticCells = kTRUE   ; }
+  void           SwitchOffExoticCellRemoval()                   { fRemoveExoticCells = kFALSE  ; } 
+  
+  void           SetExoticCellFractionCut(Float_t f)            { fExoticCellFraction = f      ; }
+  void           SetExoticCellDiffTimeCut(Float_t dt)           { fExoticCellDiffTime = dt     ; }
+  void           SetExoticCellMinAmplitudeCut(Float_t ma)       { fExoticCellMinAmplitude = ma ; }
+  
+  Bool_t         IsLEDEvent();
+  void           SwitchOnLEDEventsRemoval()                     { fRemoveLEDEvents   = kTRUE   ; }
+  void           SwitchOffLEDEventsRemoval()                    { fRemoveLEDEvents   = kFALSE  ; } 
+
+  Bool_t         AcceptCalibrateCell(const Int_t absId, Float_t & amp, Double_t & time, AliVCaloCells* cells) ;
   
   //OCDB
   Bool_t         AccessOCDB();
@@ -44,6 +66,7 @@ class AliAnalysisTaskEMCALClusterize : public AliAnalysisTaskSE {
   void           SetOCDBPath(const char *path)                  { fOCDBpath         = path     ; }
   
   //Geometry methods
+  void           InitGeometry();
   void           SetGeometryName(TString &name)                 { fGeomName = name             ; }
   TString        GeometryName()                          const  { return fGeomName             ; }  
   void           SwitchOnLoadOwnGeometryMatrices()              { fLoadGeomMatrices = kTRUE    ; }
@@ -61,9 +84,11 @@ class AliAnalysisTaskEMCALClusterize : public AliAnalysisTaskSE {
   void           SwitchOffFillAODCaloCells()                    { fFillAODCaloCells  = kFALSE  ; } 
   
   //Algorithms settings
-  void           JustUnfold(Bool_t yesno)                       { fJustUnfold        = yesno   ; }
   AliEMCALRecParam * GetRecParam()                       const  { return fRecParam             ; }
   void           InitClusterization();
+  void           ClusterizeCells();
+  void           ClusterUnfolding();
+  void           JustUnfold(Bool_t yesno)                       { fJustUnfold        = yesno   ; }
   
   void           SetEMCALRecoUtils(AliEMCALRecoUtils * ru)      { fRecoUtils         = ru      ; }
   AliEMCALRecoUtils* GetRecoUtils()                      const  { return fRecoUtils            ; }
@@ -78,65 +103,69 @@ class AliAnalysisTaskEMCALClusterize : public AliAnalysisTaskSE {
   void           SwitchOnCellEnergySelection()                  { fSelectCell        = kTRUE   ; }
   void           SwitchOffCellEnergySelection()                 { fSelectCell        = kFALSE  ; } 
   void           SetCellCuts(Float_t e, Float_t frac)           { fSelectCellMinE    = e       ; 
-                                                                  fSelectCellMinFrac = frac    ; }
-  void           SwitchOnLEDEventsRemoval()                     { fRemoveLEDEvents   = kTRUE   ; }
-  void           SwitchOffLEDEventsRemoval()                    { fRemoveLEDEvents   = kFALSE  ; } 
-  
+                                                                  fSelectCellMinFrac = frac    ; }  
   
  private:
     
   virtual void  RecPoints2Clusters(TClonesArray *fdigitsArr, TObjArray *fRecPoints, TObjArray *clusArray);
   
+  AliVEvent             *fEvent;                   // Event 
+  
   //Geometry  
-  AliEMCALGeometry      *fGeom;             // EMCAL geometry
-  TString                fGeomName;         // Name of geometry to use.
-  TGeoHMatrix           *fGeomMatrix[10];   // Geometry matrices with alignments
-  Bool_t                 fGeomMatrixSet;    // Set geometry matrices only once, for the first event.         
-  Bool_t                 fLoadGeomMatrices; // Matrices set from configuration, not get from geometry.root or from ESDs/AODs
+  AliEMCALGeometry      *fGeom;                    // EMCAL geometry
+  TString                fGeomName;                // Name of geometry to use.
+  TGeoHMatrix           *fGeomMatrix[10];          // Geometry matrices with alignments
+  Bool_t                 fGeomMatrixSet;           // Set geometry matrices only once, for the first event.         
+  Bool_t                 fLoadGeomMatrices;        // Matrices set from configuration, not get from geometry.root or from ESDs/AODs
 
   //OCDB
-  AliEMCALCalibData     *fCalibData;        // EMCAL calib data
-  AliCaloCalibPedestal  *fPedestalData;     // EMCAL pedestal
-  TString                fOCDBpath;         // Path with OCDB location
-  Bool_t                 fAccessOCDB;       // Need to access info from OCDB (not really)   
+  AliEMCALCalibData     *fCalibData;               // EMCAL calib data
+  AliCaloCalibPedestal  *fPedestalData;            // EMCAL pedestal
+  TString                fOCDBpath;                // Path with OCDB location
+  Bool_t                 fAccessOCDB;              // Need to access info from OCDB (not really)   
 
   //Temporal arrays
-  TClonesArray          *fDigitsArr;        //-> Digits array
-  TObjArray             *fClusterArr;       //-> Recpoints array
-  TObjArray             *fCaloClusterArr;   //-> CaloClusters array
+  TClonesArray          *fDigitsArr;               //-> Digits array
+  TObjArray             *fClusterArr;              //-> Recpoints array
+  TObjArray             *fCaloClusterArr;          //-> CaloClusters array
 
   //Clusterizers 
-  AliEMCALRecParam      *fRecParam;         // Reconstruction parameters container
-  AliEMCALClusterizer   *fClusterizer;      //! EMCAL clusterizer
-  AliEMCALAfterBurnerUF *fUnfolder;         //! Unfolding procedure
-  Bool_t                 fJustUnfold;       // Just unfold, do not recluster
+  AliEMCALRecParam      *fRecParam;                // Reconstruction parameters container
+  AliEMCALClusterizer   *fClusterizer;             //! EMCAL clusterizer
+  AliEMCALAfterBurnerUF *fUnfolder;                //! Unfolding procedure
+  Bool_t                 fJustUnfold;              // Just unfold, do not recluster
   
   //AOD
-  TClonesArray          *fOutputAODBranch;     //! AOD Branch with output clusters  
-  TString                fOutputAODBranchName; // New of output AOD branch
-  Bool_t                 fFillAODFile;         // Fill the output AOD file with the new clusters, 
-                                               // if not they will be only available for the event they were generated
-  Bool_t                 fFillAODHeader;       // Copy header to standard branch
-  Bool_t                 fFillAODCaloCells;    // Copy calocells to standard branch
-
-  Int_t                  fRun;                 //!run number
+  TClonesArray          *fOutputAODBranch;         //! AOD Branch with output clusters  
+  TString                fOutputAODBranchName;     // New of output AOD branch
+  Bool_t                 fFillAODFile;             // Fill the output AOD file with the new clusters, 
+                                                   // if not they will be only available for the event they were generated
+  Bool_t                 fFillAODHeader;           // Copy header to standard branch
+  Bool_t                 fFillAODCaloCells;        // Copy calocells to standard branch
+
+  Int_t                  fRun;                     //!run number
   
-  AliEMCALRecoUtils*     fRecoUtils;           // Access to factorized reconstruction algorithms
-  TString                fConfigName;          // Name of analysis configuration file
+  AliEMCALRecoUtils*     fRecoUtils;               // Access to factorized reconstruction algorithms
+  TString                fConfigName;              // Name of analysis configuration file
   
   Int_t                  fCellLabels[12672];       // Array with MC label to be passed to digit. 
   Int_t                  fCellSecondLabels[12672]; // Array with Second MC label to be passed to digit. 
   Double_t               fCellTime[12672];         // Array with cluster time to be passed to digit in case of AODs 
 
-  Int_t                  fMaxEvent;            // Set a maximum event
+  Int_t                  fMaxEvent;                // Set a maximum event
   
-  Bool_t                 fDoTrackMatching;     // On/Off the matching recalulation to speed up analysis in PbPb
-  Bool_t                 fSelectCell;          // Reject cells from cluster if energy is too low and recalculate position/energy and other
-  Float_t                fSelectCellMinE;      // Min energy cell threshold, after unfolding
-  Float_t                fSelectCellMinFrac;   // Min fraction of cell energy after unfolding cut
-  Bool_t                 fRemoveLEDEvents;     // Remove LED events, use only for LHC11a and if input is V1 or V1+unfolding
+  Bool_t                 fDoTrackMatching;         // On/Off the matching recalulation to speed up analysis in PbPb
+  Bool_t                 fSelectCell;              // Reject cells from cluster if energy is too low and recalculate position/energy and other
+  Float_t                fSelectCellMinE;          // Min energy cell threshold, after unfolding
+  Float_t                fSelectCellMinFrac;       // Min fraction of cell energy after unfolding cut
+  Bool_t                 fRemoveLEDEvents;         // Remove LED events, use only for LHC11a 
+  Bool_t                 fRemoveExoticEvents;      // Remove exotic events
+  Bool_t                 fRemoveExoticCells;       // Remove exotic cells
+  Float_t                fExoticCellFraction;      // Good cell if fraction < 1-ecross/ecell
+  Float_t                fExoticCellDiffTime;      // If time of candidate to exotic and close cell is too different, it must be noisy, set amp to 0
+  Float_t                fExoticCellMinAmplitude;  // Check for exotic only if amplitud is larger than this value
   
-  ClassDef(AliAnalysisTaskEMCALClusterize, 12);
+  ClassDef(AliAnalysisTaskEMCALClusterize, 14);
 
 };