#ifndef ALIEMCALTENDERSUPPLY_H
#define ALIEMCALTENDERSUPPLY_H
#include "AliTenderSupply.h"
class TTree;
class TClonesArray;
class AliVCluster;
class AliEMCALRecoUtils;
class AliEMCALGeometry;
class TGeoHMatrix;
class TTree;
class TFile;
class TString;
class AliEMCALClusterizer;
class AliEMCALAfterBurnerUF;
class AliEMCALRecParam;
class AliAnalysisTaskSE;
class AliVEvent;
class AliEMCALTenderSupply: public AliTenderSupply {
public:
AliEMCALTenderSupply();
AliEMCALTenderSupply(const char *name, const AliTender *tender=NULL);
AliEMCALTenderSupply(const char *name, AliAnalysisTaskSE *task);
virtual ~AliEMCALTenderSupply();
enum NonlinearityFunctions{kPi0MC=0,kPi0GammaGamma=1,kPi0GammaConversion=2,kNoCorrection=3,kBeamTest=4,kBeamTestCorrected=5};
enum MisalignSettings{kdefault=0,kSurveybyS=1,kSurveybyM=2};
virtual void Init();
virtual void ProcessEvent();
void SetTask(AliAnalysisTaskSE *task) { fTask = task ;}
void SetDefaults();
void SetEMCALGeometryName(const char *name) { fEMCALGeoName = name ;}
TString EMCALGeometryName() const { return fEMCALGeoName ;}
void SetDebugLevel(Int_t level) { fDebugLevel=level ;}
void SetBasePath(const Char_t *basePath) { fBasePath = basePath ;}
void SetConfigFileName(const char *name) { fConfigName = name ;}
void SetNonLinearityFunction(Int_t fun) { fNonLinearFunc = fun ;}
Int_t GetNonLinearityFunction() const { return fNonLinearFunc ;}
void SetNonLinearityThreshold(Int_t threshold) { fNonLinearThreshold = threshold ;}
Int_t GetNonLinearityThreshold() const { return fNonLinearThreshold ;}
void SwitchOnNonLinearityCorrection() { fDoNonLinearity = kTRUE ;}
void SwitchOffNonLinearityCorrection() { fDoNonLinearity = kFALSE ;}
void SwitchOnReCalibrateCluster() { fReCalibCluster = kTRUE ;}
void SwitchOffReCalibrateCluster() { fReCalibCluster = kFALSE ;}
void SwitchOnRecalculateClusPos() { fRecalClusPos = kTRUE ;}
void SwitchOffRecalculateClusPos() { fRecalClusPos = kFALSE ;}
void SetMisalignmentMatrixSurvey(Int_t misalignSurvey) { fMisalignSurvey = misalignSurvey ;}
Int_t GetMisalignmentMatrixSurvey() const { return fMisalignSurvey ;}
void SwitchOnCellFiducialRegion() { fFiducial = kTRUE ;}
void SwitchOffCellFiducialRegion() { fFiducial = kFALSE ;}
void SetNumberOfCellsFromEMCALBorder(Int_t n) { fNCellsFromEMCALBorder = n ;}
Int_t GetNumberOfCellsFromEMCALBorder() const { return fNCellsFromEMCALBorder ;}
void SwitchOnRecalDistBadChannel() { fRecalDistToBadChannels = kTRUE ;}
void SwitchOffRecalDistBadChannel() { fRecalDistToBadChannels = kFALSE ;}
void SwitchOnRecalShowerShape() { fRecalShowerShape = kTRUE ;}
void SwitchOffRecalShowerShape() { fRecalShowerShape = kFALSE ;}
Float_t GetRCut() const { return fRcut ;}
void SetRCut(Float_t rcut) { fRcut = rcut ;}
Double_t GetMass() const { return fMass ;}
void SetMass(Double_t mass) { fMass = mass ;}
Double_t GetStep() const { return fStep ;}
void SetStep(Double_t step) { fStep = step ;}
Double_t GetEtaCut() const { return fEtacut ;}
void SetEtaCut(Double_t eta) { fEtacut = eta ;}
Double_t GetPhiCut() const { return fPhicut ;}
void SetPhiCut(Double_t phi) { fPhicut = phi ;}
Float_t GetExoticCellFraction() const { return fExoticCellFraction ;}
void SetExoticCellFraction(Float_t f) { fExoticCellFraction = f ;}
Float_t GetExoticCellDiffTime() const { return fExoticCellDiffTime ;}
void SetExoticCellDiffTime(Float_t f) { fExoticCellDiffTime = f ;}
Float_t GetExoticCellMinAmplitude() const { return fExoticCellMinAmplitude ;}
void SetExoticCellMinAmplitude(Float_t f) { fExoticCellMinAmplitude = f ;}
void SwitchOnReclustering() { fReClusterize = kTRUE ;}
void SwitchOffReclustering() { fReClusterize = kFALSE ;}
void SwitchOnCutEtaPhiSum() { fCutEtaPhiSum=kTRUE; fCutEtaPhiSeparate=kFALSE ;}
void SwitchOnCutEtaPhiSeparate() { fCutEtaPhiSeparate=kTRUE; fCutEtaPhiSum=kFALSE ;}
void SwitchOnLoadOwnGeometryMatrices() { fLoadGeomMatrices = kTRUE ;}
void SwitchOffLoadOwnGeometryMatrices() { fLoadGeomMatrices = kFALSE ;}
void SetGeometryMatrixInSM(TGeoHMatrix* m, Int_t i) { fEMCALMatrix[i] = m ;}
AliEMCALRecParam *GetRecParam() const { return fRecParam ;}
void SetRecParam(AliEMCALRecParam *p) { fRecParam = p ;}
AliEMCALRecoUtils *GetRecoUtils() const { return fEMCALRecoUtils ;}
void SetRecoUtils(AliEMCALRecoUtils *r) { fEMCALRecoUtils = r ;}
void SwitchOnUpdateCell() { fUpdateCell = kTRUE ;}
void SwitchOffUpdateCell() { fUpdateCell = kFALSE ;}
void SwitchOnBadCellRemove() { fBadCellRemove = kTRUE ;}
void SwitchOffBadCellRemove() { fBadCellRemove = kFALSE ;}
void SwitchOnClusterBadChannelCheck() { fClusterBadChannelCheck = kTRUE ;}
void SwitchOffClusterBadChannelCheck() { fClusterBadChannelCheck = kFALSE ;}
void SwitchOnExoticCellRemove() { fRejectExoticCells = kTRUE ;}
void SwitchOffExoticCellRemove() { fRejectExoticCells = kFALSE ;}
void SwitchOnClusterExoticChannelCheck() { fRejectExoticClusters = kTRUE ;}
void SwitchOffClusterExoticChannelCheck() { fRejectExoticClusters = kFALSE ;}
void SwitchOnCalibrateEnergy() { fCalibrateEnergy = kTRUE ;}
void SwitchOffCalibrateEnergy() { fCalibrateEnergy = kFALSE ;}
void SwitchOnCalibrateTime() { fCalibrateTime = kTRUE ;}
void SwitchOffCalibrateTime() { fCalibrateTime = kFALSE ;}
void SwitchOnUpdateCellOnly() { fDoUpdateOnly = kTRUE ;}
void SwitchOffUpdateCellOnly() { fDoUpdateOnly = kFALSE ;}
void SwitchOnTrackMatch() { fDoTrackMatch = kTRUE ;}
void SwitchOffTrackMatch() { fDoTrackMatch = kFALSE ;}
void SetPass(const char* p) { fFilepass = p; fGetPassFromFileName = kFALSE; }
void UnsetPass() { fFilepass = ""; fGetPassFromFileName = kTRUE; }
void RemapMCLabelForAODs(Int_t &label);
void SwitchOnRemapMCLabelForAODs() { fRemapMCLabelForAODs = kTRUE ; }
void SwitchOffRemapMCLabelForAODs() { fRemapMCLabelForAODs = kFALSE ; }
void SetClustersMCLabelFromOriginalClusters() ;
void SwitchOnUseClusterMCLabelForCell(Int_t opt = 2) { fSetCellMCLabelFromCluster = opt ; }
void SwitchOffUseClusterMCLabelForCell() { fSetCellMCLabelFromCluster = 0 ; }
void SwitchOnUseAutomaticRecalibParam() { fUseAutomaticRecalib = kTRUE ; }
void SwitchOnUseAutomaticRunDepRecalibParam() { fUseAutomaticRunDepRecalib = kTRUE ; }
void SwitchOnUseAutomaticTimeCalibParam() { fUseAutomaticTimeCalib = kTRUE ; }
void SwitchOnUseAutomaticRecParam() { fUseAutomaticRecParam = kTRUE ; }
void SwitchOffUseAutomaticRecalibParam() { fUseAutomaticRecalib = kFALSE ; }
void SwitchOffUseAutomaticRunDepRecalibParam() { fUseAutomaticRunDepRecalib = kFALSE ; }
void SwitchOffUseAutomaticTimeCalibParam() { fUseAutomaticTimeCalib = kFALSE ; }
void SwitchOffUseAutomaticRecParam() { fUseAutomaticRecParam = kFALSE ; }
private:
AliVEvent* GetEvent();
TString GetBeamType();
Bool_t RunChanged() const;
Int_t InitBadChannels();
Bool_t InitClusterization();
Int_t InitRecParam();
Bool_t InitMisalignMatrix();
Int_t InitRecalib();
Int_t InitRunDepRecalib();
Int_t InitTimeCalibration();
void Clusterize();
void FillDigitsArray();
void GetPass();
void RecPoints2Clusters(TClonesArray *clus);
void RecalibrateCells();
void UpdateCells();
void UpdateClusters();
AliAnalysisTaskSE *fTask;
Int_t fRun;
AliEMCALGeometry *fEMCALGeo;
TString fEMCALGeoName;
AliEMCALRecoUtils *fEMCALRecoUtils;
TString fConfigName;
Int_t fDebugLevel;
Int_t fNonLinearFunc;
Int_t fNonLinearThreshold;
Bool_t fReCalibCluster;
Bool_t fUpdateCell;
Bool_t fCalibrateEnergy;
Bool_t fCalibrateTime;
Bool_t fCalibrateTimeParamAvailable;
Bool_t fDoNonLinearity;
Bool_t fBadCellRemove;
Bool_t fRejectExoticCells;
Bool_t fRejectExoticClusters;
Bool_t fClusterBadChannelCheck;
TGeoHMatrix *fEMCALMatrix[12];
Bool_t fRecalClusPos;
Bool_t fFiducial;
Int_t fNCellsFromEMCALBorder;
Bool_t fRecalDistToBadChannels;
Bool_t fRecalShowerShape;
TTree *fInputTree;
TFile *fInputFile;
Bool_t fGetPassFromFileName;
TString fFilepass;
Double_t fMass;
Double_t fStep;
Bool_t fCutEtaPhiSum;
Bool_t fCutEtaPhiSeparate;
Float_t fRcut;
Float_t fEtacut;
Float_t fPhicut;
TString fBasePath;
Bool_t fReClusterize;
AliEMCALClusterizer *fClusterizer;
Bool_t fGeomMatrixSet;
Bool_t fLoadGeomMatrices;
AliEMCALRecParam *fRecParam;
Bool_t fDoTrackMatch;
Bool_t fDoUpdateOnly;
AliEMCALAfterBurnerUF *fUnfolder;
TClonesArray *fDigitsArr;
TObjArray *fClusterArr;
Int_t fMisalignSurvey;
Float_t fExoticCellFraction;
Float_t fExoticCellDiffTime;
Float_t fExoticCellMinAmplitude;
Int_t fOrgClusterCellId[12672];
Int_t fSetCellMCLabelFromCluster;
TClonesArray * fTempClusterArr ;
Bool_t fRemapMCLabelForAODs ;
Bool_t fUseAutomaticRecalib;
Bool_t fUseAutomaticRunDepRecalib;
Bool_t fUseAutomaticTimeCalib;
Bool_t fUseAutomaticRecParam;
AliEMCALTenderSupply( const AliEMCALTenderSupply&c);
AliEMCALTenderSupply& operator= (const AliEMCALTenderSupply&c);
ClassDef(AliEMCALTenderSupply, 17);
};
#endif
AliEMCALTenderSupply.h:10 AliEMCALTenderSupply.h:11 AliEMCALTenderSupply.h:12 AliEMCALTenderSupply.h:13 AliEMCALTenderSupply.h:14 AliEMCALTenderSupply.h:15 AliEMCALTenderSupply.h:16 AliEMCALTenderSupply.h:17 AliEMCALTenderSupply.h:18 AliEMCALTenderSupply.h:19 AliEMCALTenderSupply.h:20 AliEMCALTenderSupply.h:21 AliEMCALTenderSupply.h:22 AliEMCALTenderSupply.h:23 AliEMCALTenderSupply.h:24 AliEMCALTenderSupply.h:25 AliEMCALTenderSupply.h:26 AliEMCALTenderSupply.h:27 AliEMCALTenderSupply.h:28 AliEMCALTenderSupply.h:29 AliEMCALTenderSupply.h:30 AliEMCALTenderSupply.h:31 AliEMCALTenderSupply.h:32 AliEMCALTenderSupply.h:33 AliEMCALTenderSupply.h:34 AliEMCALTenderSupply.h:35 AliEMCALTenderSupply.h:36 AliEMCALTenderSupply.h:37 AliEMCALTenderSupply.h:38 AliEMCALTenderSupply.h:39 AliEMCALTenderSupply.h:40 AliEMCALTenderSupply.h:41 AliEMCALTenderSupply.h:42 AliEMCALTenderSupply.h:43 AliEMCALTenderSupply.h:44 AliEMCALTenderSupply.h:45 AliEMCALTenderSupply.h:46 AliEMCALTenderSupply.h:47 AliEMCALTenderSupply.h:48 AliEMCALTenderSupply.h:49 AliEMCALTenderSupply.h:50 AliEMCALTenderSupply.h:51 AliEMCALTenderSupply.h:52 AliEMCALTenderSupply.h:53 AliEMCALTenderSupply.h:54 AliEMCALTenderSupply.h:55 AliEMCALTenderSupply.h:56 AliEMCALTenderSupply.h:57 AliEMCALTenderSupply.h:58 AliEMCALTenderSupply.h:59 AliEMCALTenderSupply.h:60 AliEMCALTenderSupply.h:61 AliEMCALTenderSupply.h:62 AliEMCALTenderSupply.h:63 AliEMCALTenderSupply.h:64 AliEMCALTenderSupply.h:65 AliEMCALTenderSupply.h:66 AliEMCALTenderSupply.h:67 AliEMCALTenderSupply.h:68 AliEMCALTenderSupply.h:69 AliEMCALTenderSupply.h:70 AliEMCALTenderSupply.h:71 AliEMCALTenderSupply.h:72 AliEMCALTenderSupply.h:73 AliEMCALTenderSupply.h:74 AliEMCALTenderSupply.h:75 AliEMCALTenderSupply.h:76 AliEMCALTenderSupply.h:77 AliEMCALTenderSupply.h:78 AliEMCALTenderSupply.h:79 AliEMCALTenderSupply.h:80 AliEMCALTenderSupply.h:81 AliEMCALTenderSupply.h:82 AliEMCALTenderSupply.h:83 AliEMCALTenderSupply.h:84 AliEMCALTenderSupply.h:85 AliEMCALTenderSupply.h:86 AliEMCALTenderSupply.h:87 AliEMCALTenderSupply.h:88 AliEMCALTenderSupply.h:89 AliEMCALTenderSupply.h:90 AliEMCALTenderSupply.h:91 AliEMCALTenderSupply.h:92 AliEMCALTenderSupply.h:93 AliEMCALTenderSupply.h:94 AliEMCALTenderSupply.h:95 AliEMCALTenderSupply.h:96 AliEMCALTenderSupply.h:97 AliEMCALTenderSupply.h:98 AliEMCALTenderSupply.h:99 AliEMCALTenderSupply.h:100 AliEMCALTenderSupply.h:101 AliEMCALTenderSupply.h:102 AliEMCALTenderSupply.h:103 AliEMCALTenderSupply.h:104 AliEMCALTenderSupply.h:105 AliEMCALTenderSupply.h:106 AliEMCALTenderSupply.h:107 AliEMCALTenderSupply.h:108 AliEMCALTenderSupply.h:109 AliEMCALTenderSupply.h:110 AliEMCALTenderSupply.h:111 AliEMCALTenderSupply.h:112 AliEMCALTenderSupply.h:113 AliEMCALTenderSupply.h:114 AliEMCALTenderSupply.h:115 AliEMCALTenderSupply.h:116 AliEMCALTenderSupply.h:117 AliEMCALTenderSupply.h:118 AliEMCALTenderSupply.h:119 AliEMCALTenderSupply.h:120 AliEMCALTenderSupply.h:121 AliEMCALTenderSupply.h:122 AliEMCALTenderSupply.h:123 AliEMCALTenderSupply.h:124 AliEMCALTenderSupply.h:125 AliEMCALTenderSupply.h:126 AliEMCALTenderSupply.h:127 AliEMCALTenderSupply.h:128 AliEMCALTenderSupply.h:129 AliEMCALTenderSupply.h:130 AliEMCALTenderSupply.h:131 AliEMCALTenderSupply.h:132 AliEMCALTenderSupply.h:133 AliEMCALTenderSupply.h:134 AliEMCALTenderSupply.h:135 AliEMCALTenderSupply.h:136 AliEMCALTenderSupply.h:137 AliEMCALTenderSupply.h:138 AliEMCALTenderSupply.h:139 AliEMCALTenderSupply.h:140 AliEMCALTenderSupply.h:141 AliEMCALTenderSupply.h:142 AliEMCALTenderSupply.h:143 AliEMCALTenderSupply.h:144 AliEMCALTenderSupply.h:145 AliEMCALTenderSupply.h:146 AliEMCALTenderSupply.h:147 AliEMCALTenderSupply.h:148 AliEMCALTenderSupply.h:149 AliEMCALTenderSupply.h:150 AliEMCALTenderSupply.h:151 AliEMCALTenderSupply.h:152 AliEMCALTenderSupply.h:153 AliEMCALTenderSupply.h:154 AliEMCALTenderSupply.h:155 AliEMCALTenderSupply.h:156 AliEMCALTenderSupply.h:157 AliEMCALTenderSupply.h:158 AliEMCALTenderSupply.h:159 AliEMCALTenderSupply.h:160 AliEMCALTenderSupply.h:161 AliEMCALTenderSupply.h:162 AliEMCALTenderSupply.h:163 AliEMCALTenderSupply.h:164 AliEMCALTenderSupply.h:165 AliEMCALTenderSupply.h:166 AliEMCALTenderSupply.h:167 AliEMCALTenderSupply.h:168 AliEMCALTenderSupply.h:169 AliEMCALTenderSupply.h:170 AliEMCALTenderSupply.h:171 AliEMCALTenderSupply.h:172 AliEMCALTenderSupply.h:173 AliEMCALTenderSupply.h:174 AliEMCALTenderSupply.h:175 AliEMCALTenderSupply.h:176 AliEMCALTenderSupply.h:177 AliEMCALTenderSupply.h:178 AliEMCALTenderSupply.h:179 AliEMCALTenderSupply.h:180 AliEMCALTenderSupply.h:181 AliEMCALTenderSupply.h:182 AliEMCALTenderSupply.h:183 AliEMCALTenderSupply.h:184 AliEMCALTenderSupply.h:185 AliEMCALTenderSupply.h:186 AliEMCALTenderSupply.h:187 AliEMCALTenderSupply.h:188 AliEMCALTenderSupply.h:189 AliEMCALTenderSupply.h:190 AliEMCALTenderSupply.h:191 AliEMCALTenderSupply.h:192 AliEMCALTenderSupply.h:193 AliEMCALTenderSupply.h:194 AliEMCALTenderSupply.h:195 AliEMCALTenderSupply.h:196 AliEMCALTenderSupply.h:197 AliEMCALTenderSupply.h:198 AliEMCALTenderSupply.h:199 AliEMCALTenderSupply.h:200 AliEMCALTenderSupply.h:201 AliEMCALTenderSupply.h:202 AliEMCALTenderSupply.h:203 AliEMCALTenderSupply.h:204 AliEMCALTenderSupply.h:205 AliEMCALTenderSupply.h:206 AliEMCALTenderSupply.h:207 AliEMCALTenderSupply.h:208 AliEMCALTenderSupply.h:209 AliEMCALTenderSupply.h:210 AliEMCALTenderSupply.h:211 AliEMCALTenderSupply.h:212 AliEMCALTenderSupply.h:213 AliEMCALTenderSupply.h:214 AliEMCALTenderSupply.h:215 AliEMCALTenderSupply.h:216 AliEMCALTenderSupply.h:217 AliEMCALTenderSupply.h:218 AliEMCALTenderSupply.h:219 AliEMCALTenderSupply.h:220 AliEMCALTenderSupply.h:221 AliEMCALTenderSupply.h:222 AliEMCALTenderSupply.h:223 AliEMCALTenderSupply.h:224 AliEMCALTenderSupply.h:225 AliEMCALTenderSupply.h:226 AliEMCALTenderSupply.h:227 AliEMCALTenderSupply.h:228 AliEMCALTenderSupply.h:229 AliEMCALTenderSupply.h:230 AliEMCALTenderSupply.h:231 AliEMCALTenderSupply.h:232 AliEMCALTenderSupply.h:233 AliEMCALTenderSupply.h:234 AliEMCALTenderSupply.h:235 AliEMCALTenderSupply.h:236 AliEMCALTenderSupply.h:237 AliEMCALTenderSupply.h:238 AliEMCALTenderSupply.h:239 AliEMCALTenderSupply.h:240 AliEMCALTenderSupply.h:241 AliEMCALTenderSupply.h:242 AliEMCALTenderSupply.h:243 AliEMCALTenderSupply.h:244 AliEMCALTenderSupply.h:245 AliEMCALTenderSupply.h:246 AliEMCALTenderSupply.h:247 AliEMCALTenderSupply.h:248 AliEMCALTenderSupply.h:249 AliEMCALTenderSupply.h:250 AliEMCALTenderSupply.h:251 AliEMCALTenderSupply.h:252 AliEMCALTenderSupply.h:253 AliEMCALTenderSupply.h:254 AliEMCALTenderSupply.h:255 AliEMCALTenderSupply.h:256 AliEMCALTenderSupply.h:257 AliEMCALTenderSupply.h:258 AliEMCALTenderSupply.h:259 AliEMCALTenderSupply.h:260 AliEMCALTenderSupply.h:261 AliEMCALTenderSupply.h:262 AliEMCALTenderSupply.h:263 AliEMCALTenderSupply.h:264 AliEMCALTenderSupply.h:265 AliEMCALTenderSupply.h:266 AliEMCALTenderSupply.h:267 AliEMCALTenderSupply.h:268 AliEMCALTenderSupply.h:269 AliEMCALTenderSupply.h:270 AliEMCALTenderSupply.h:271 AliEMCALTenderSupply.h:272 AliEMCALTenderSupply.h:273 AliEMCALTenderSupply.h:274 AliEMCALTenderSupply.h:275