//Root includes
#include "TNamed.h"
#include "TMath.h"
-#include "TObjArray.h"
-#include "TArrayI.h"
-#include "TArrayF.h"
-#include "TH2F.h"
+class TObjArray;
+class TArrayI;
+class TArrayF;
+#include "TH2I.h"
+class TH2F;
//AliRoot includes
class AliVCluster;
class AliVCaloCells;
class AliVEvent;
-#include "AliLog.h"
// EMCAL includes
class AliEMCALGeometry;
Float_t CorrectClusterEnergyLinearity(AliVCluster* clu);
Float_t GetNonLinearityParam(const Int_t i) const {
- if(i < 6 ){return fNonLinearityParams[i]; }
- else { AliInfo(Form("Index %d larger than 6, do nothing\n",i)); return 0.;}
+ if(i < 7 ){return fNonLinearityParams[i]; }
+ else { AliInfo(Form("Index %d larger than 7, do nothing\n",i)); return 0.;}
}
void SetNonLinearityParam(const Int_t i, const Float_t param) {
- if(i < 6 ){fNonLinearityParams[i] = param; }
- else { AliInfo(Form("Index %d larger than 6, do nothing\n",i));}
+ if(i < 7 ){fNonLinearityParams[i] = param; }
+ else { AliInfo(Form("Index %d larger than 7, do nothing\n",i));}
}
-
- Int_t GetNonLinearityFunction() const { return fNonLinearityFunction ;}
- void SetNonLinearityFunction(Int_t fun) { fNonLinearityFunction = fun ;}
+ void InitNonLinearityParam();
+
+ Int_t GetNonLinearityFunction() const { return fNonLinearityFunction ; }
+ void SetNonLinearityFunction(Int_t fun) { fNonLinearityFunction = fun ; InitNonLinearityParam() ; }
+
+ void SetNonLinearityThreshold(Int_t threshold) {fNonLinearThreshold = threshold ;} //only for Alexie's non linearity correction
+ Int_t GetNonLinearityThreshold() const {return fNonLinearThreshold ;}
+
//-----------------------------------------------------
//Recalibration
void SwitchOnNoFiducialBorderInEMCALEta0() { fNoEMCALBorderAtEta0 = kTRUE ;}
void SwitchOffNoFiducialBorderInEMCALEta0() { fNoEMCALBorderAtEta0 = kFALSE ;}
- Bool_t IsEMCALNoBorderAtEta0() { return fNoEMCALBorderAtEta0 ;}
+ Bool_t IsEMCALNoBorderAtEta0() const { return fNoEMCALBorderAtEta0 ;}
//-----------------------------------------------------
// Bad channels
void SetEMCALChannelStatusMap(TObjArray *map) {fEMCALBadChannelMap = map;}
void SetEMCALChannelStatusMap(Int_t iSM , TH2I* h) {fEMCALBadChannelMap->AddAt(h,iSM);}
- Bool_t ClusterContainsBadChannel(AliEMCALGeometry* geom, UShort_t* cellList, Int_t nCells);
+ Bool_t ClusterContainsBadChannel(AliEMCALGeometry* geom, UShort_t* cellList, const Int_t nCells);
//-----------------------------------------------------
// Recalculate other cluster parameters
// Track matching
//----------------------------------------------------
- void FindMatches(AliVEvent *event, TObjArray * clusterArr=0x0, TString dataType="ESD");
- Int_t FindMatchedCluster(AliESDtrack *track, AliVEvent *event);
- Bool_t ExtrapolateTrackToCluster(AliExternalTrackParam *trkParam, AliVCluster *cluster, Float_t &tmpR, Float_t &tmpZ);
- void GetMatchedResiduals(Int_t clsIndex, Float_t &dR, Float_t &dZ);
- void GetMatchedClusterResiduals(Int_t trkIndex, Float_t &dR, Float_t &dZ);
+ void FindMatches(AliVEvent *event, TObjArray * clusterArr=0x0, AliEMCALGeometry *geom=0x0);
+ Int_t FindMatchedCluster(AliESDtrack *track, AliVEvent *event, AliEMCALGeometry *geom);
+ Bool_t ExtrapolateTrackToCluster(AliExternalTrackParam *trkParam, AliVCluster *cluster, Float_t &tmpEta, Float_t &tmpPhi);
+ void GetMatchedResiduals(Int_t clsIndex, Float_t &dEta, Float_t &dPhi);
+ void GetMatchedClusterResiduals(Int_t trkIndex, Float_t &dEta, Float_t &dPhi);
Int_t GetMatchedTrackIndex(Int_t clsIndex);
Int_t GetMatchedClusterIndex(Int_t trkIndex);
- Bool_t IsClusterMatched(Int_t clsIndex);
- Bool_t IsTrackMatched(Int_t trkIndex);
+ Bool_t IsClusterMatched(Int_t clsIndex) const;
+ Bool_t IsTrackMatched(Int_t trkIndex) const;
UInt_t FindMatchedPosForCluster(Int_t clsIndex) const;
- UInt_t FindMatchedPosForTrack(Int_t trkIndex) const;
+ UInt_t FindMatchedPosForTrack(Int_t trkIndex) const;
+
+ void SwitchOnCutEtaPhiSum() {fCutEtaPhiSum=kTRUE;fCutEtaPhiSeparate=kFALSE;}
+ void SwitchOnCutEtaPhiSeparate() {fCutEtaPhiSeparate=kTRUE;fCutEtaPhiSum=kFALSE;}
- Float_t GetCutR() const { return fCutR ;}
- Float_t GetCutZ() const { return fCutZ ;}
- void SetCutR(Float_t cutR) { fCutR=cutR ;}
- void SetCutZ(Float_t cutZ) { fCutZ=cutZ ;}
+ Float_t GetCutR() const { return fCutR ;}
+ Float_t GetCutEta() const { return fCutEta ;}
+ Float_t GetCutPhi() const { return fCutPhi ;}
+ void SetCutR(Float_t cutR) { fCutR=cutR ;}
+ void SetCutEta(Float_t cutEta) { fCutEta=cutEta ;}
+ void SetCutPhi(Float_t cutPhi) { fCutPhi=cutPhi ;}
+ void SetCutZ(Float_t cutZ) {printf("Obsolete fucntion of cutZ=%1.1f\n",cutZ);} //Obsolete
Double_t GetMass() const { return fMass ;}
Double_t GetStep() const { return fStep ;}
void SetMass(Double_t mass){ fMass=mass ;}
void SetStep(Double_t step){ fStep=step ;}
+ //Cluster cut
+ Bool_t IsGoodCluster(AliVCluster *cluster, AliEMCALGeometry *geom, AliVCaloCells* cells);
+ Bool_t IsExoticCluster(AliVCluster *cluster) const ;
+
+ void SwitchOnRejectExoticCluster() { fRejectExoticCluster=kTRUE ;}
+ void SwitchOffRejectExoticCluster() { fRejectExoticCluster=kFALSE ;}
+ Bool_t IsRejectExoticCluster() const { return fRejectExoticCluster ;}
+
//Track Cuts
Bool_t IsAccepted(AliESDtrack *track);
void InitTrackCuts();
// track quality cut setters
+ void SetMinTrackPt(Double_t pt=0) { fCutMinTrackPt = pt ;}
void SetMinNClustersTPC(Int_t min=-1) { fCutMinNClusterTPC = min ;}
void SetMinNClustersITS(Int_t min=-1) { fCutMinNClusterITS = min ;}
void SetMaxChi2PerClusterTPC(Float_t max=1e10) { fCutMaxChi2PerClusterTPC = max ;}
void SetMaxDCAToVertexZ(Float_t dist=1e10) { fCutMaxDCAToVertexZ = dist ;}
void SetDCAToVertex2D(Bool_t b=kFALSE) { fCutDCAToVertex2D = b ;}
- // getters
+ // getters
+ Double_t GetMinTrackPt() const { return fCutMinTrackPt ;}
Int_t GetMinNClusterTPC() const { return fCutMinNClusterTPC ;}
Int_t GetMinNClustersITS() const { return fCutMinNClusterITS ;}
Float_t GetMaxChi2PerClusterTPC() const { return fCutMaxChi2PerClusterTPC ;}
Float_t fMisalTransShift[15]; // Shift parameters
Float_t fMisalRotShift[15]; // Shift parameters
Int_t fNonLinearityFunction; // Non linearity function choice
- Float_t fNonLinearityParams[6]; // Parameters for the non linearity function
+ Float_t fNonLinearityParams[7]; // Parameters for the non linearity function
Int_t fParticleType; // Particle type for depth calculation
Int_t fPosAlgo; // Position recalculation algorithm
Float_t fW0; // Weight0
+ Int_t fNonLinearThreshold; // Non linearity threshold value for kBeamTesh non linearity function
// Recalibration
Bool_t fRecalibration; // Switch on or off the recalibration
UInt_t fAODFilterMask; // Filter mask to select AOD tracks. Refer to $ALICE_ROOT/ANALYSIS/macros/AddTaskESDFilter.C
TArrayI * fMatchedTrackIndex; // Array that stores indexes of matched tracks
TArrayI * fMatchedClusterIndex; // Array that stores indexes of matched clusters
- TArrayF * fResidualZ; // Array that stores the residual z
- TArrayF * fResidualR; // Array that stores the residual r
- Float_t fCutR; // dR cut on matching
- Float_t fCutZ; // dZ cut on matching
+ TArrayF * fResidualEta; // Array that stores the residual eta
+ TArrayF * fResidualPhi; // Array that stores the residual phi
+ Bool_t fCutEtaPhiSum; // Place cut on sqrt(dEta^2+dPhi^2)
+ Bool_t fCutEtaPhiSeparate; // Cut on dEta and dPhi separately
+ Float_t fCutR; // sqrt(dEta^2+dPhi^2) cut on matching
+ Float_t fCutEta; // dEta cut on matching
+ Float_t fCutPhi; // dPhi cut on matching
Double_t fMass; // Mass hypothesis of the track
Double_t fStep; // Length of each step used in extrapolation in the unit of cm.
-
+
+ // Cluster cuts
+ Bool_t fRejectExoticCluster; // Switch on or off exotic cluster rejection
+
+ // Track cuts
+ Double_t fCutMinTrackPt; // Cut on track pT
Int_t fCutMinNClusterTPC; // Min number of tpc clusters
Int_t fCutMinNClusterITS; // Min number of its clusters
Float_t fCutMaxChi2PerClusterTPC; // Max tpc fit chi2 per tpc cluster
Bool_t fUseTimeCorrectionFactors; // Use Time Dependent Correction
Bool_t fTimeCorrectionFactorsSet; // Time Correction set at leat once
- ClassDef(AliEMCALRecoUtils, 8)
+ ClassDef(AliEMCALRecoUtils, 12)
};