X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=PWGGA%2FEMCALTasks%2FAliAnalysisTaskEMCALClusterize.h;h=53ab4bcb3447722f70d73b4dc5562e9395145a4e;hb=67018bf4be7d0d55d2a49060659c0c28d1aa6f9b;hp=740acf4e36af0bb7ee98c6173f83fa3833fa4564;hpb=596697e6bb05db18f7d38fd566d9638b6c0e2d69;p=u%2Fmrichter%2FAliRoot.git diff --git a/PWGGA/EMCALTasks/AliAnalysisTaskEMCALClusterize.h b/PWGGA/EMCALTasks/AliAnalysisTaskEMCALClusterize.h index 740acf4e36a..53ab4bcb344 100644 --- a/PWGGA/EMCALTasks/AliAnalysisTaskEMCALClusterize.h +++ b/PWGGA/EMCALTasks/AliAnalysisTaskEMCALClusterize.h @@ -9,12 +9,16 @@ class TTree; class TClonesArray; +#include "AliCentrality.h" + //EMCAL class AliEMCALGeometry; class AliEMCALCalibData; class AliCaloCalibPedestal; class AliEMCALClusterizer; class AliEMCALAfterBurnerUF; +class AliEMCALRecPoint; +class AliAODCaloCluster; #include "AliEMCALRecParam.h" #include "AliEMCALRecoUtils.h" @@ -33,6 +37,16 @@ class AliAnalysisTaskEMCALClusterize : public AliAnalysisTaskSE { virtual void LocalInit() { Init() ; } // Event methods, settings + + Bool_t AcceptEventEMCAL(); + void SwitchOnSelectEMCALEvent() { fSelectEMCALEvent = kTRUE ; } + void SwitchOffSelectEMCALEvent() { fSelectEMCALEvent = kFALSE ; } + void SetEMCALEnergyCut(Float_t cut) { fEMCALEnergyCut = cut ; } + void SetEMCALNcellsCut(Int_t cut) { fEMCALNcellsCut = cut ; } + + void SwitchOnInputAODFilter() { fInputFromFilter = kTRUE ; } + void SwitchOffInputAODFilter() { fInputFromFilter = kFALSE ; } + void CheckAndGetEvent(); Bool_t IsExoticEvent(); @@ -60,7 +74,6 @@ class AliAnalysisTaskEMCALClusterize : public AliAnalysisTaskSE { void SetImportGeometryFromFile(Bool_t im, TString pa = "") { fImportGeometryFromFile = im ; fImportGeometryFilePath = pa ; } - //AOD methods void SetAODBranchName(TString &name) { fOutputAODBranchName = name ; } void FillAODFile(Bool_t yesno) { fFillAODFile = yesno ; } @@ -70,6 +83,11 @@ class AliAnalysisTaskEMCALClusterize : public AliAnalysisTaskSE { void SwitchOffFillAODHeader() { fFillAODHeader = kFALSE ; } void SwitchOnFillAODCaloCells() { fFillAODCaloCells = kTRUE ; } void SwitchOffFillAODCaloCells() { fFillAODCaloCells = kFALSE ; } + + void SwitchOnRecalibrateWithClusterTime() { fRecalibrateWithClusterTime = kTRUE ; } + void SwitchOffRecalibrateWithClusterTime() { fRecalibrateWithClusterTime = kFALSE ; } + + //Algorithms settings @@ -94,7 +112,8 @@ class AliAnalysisTaskEMCALClusterize : public AliAnalysisTaskSE { void SwitchOnCellEnergySelection() { fSelectCell = kTRUE ; } void SwitchOffCellEnergySelection() { fSelectCell = kFALSE ; } void SetCellCuts(Float_t e, Float_t frac) { fSelectCellMinE = e ; - fSelectCellMinFrac = frac ; } + fSelectCellMinFrac = frac ; } + void SetRejectBelowThreshold(Bool_t reject) { fRejectBelowThreshold =reject ; } // OADB options settings void AccessOADB() ; @@ -106,13 +125,38 @@ class AliAnalysisTaskEMCALClusterize : public AliAnalysisTaskSE { void SetOADBFilePath(TString path) { fOADBFilePath = path ; } - private: + // Centrality selection + + AliCentrality* GetCentrality() { return InputEvent()->GetCentrality() ; } //Look in AOD reader, different there + void SetCentralityClass(TString name) { fCentralityClass = name ; } + TString GetCentralityClass() const { return fCentralityClass ; } + Float_t GetEventCentrality() { if(GetCentrality()) return GetCentrality()->GetCentralityPercentile(fCentralityClass) ; + else return -1. ; } + void SetCentralityBin(Int_t min, Int_t max) //Set the centrality bin to select the event. If used, then need to get percentile + { fCentralityBin[0]=min ; fCentralityBin[1]=max ; } + Float_t GetCentralityBin(Int_t i) const { if(i < 0 || i > 1) return -1 ; + else return fCentralityBin[i] ; } + + //MC label methods + + void RemapMCLabelForAODs(Int_t &label); + void SwitchOnRemapMCLabelForAODs() { fRemapMCLabelForAODs = kTRUE ; } + void SwitchOffRemapMCLabelForAODs() { fRemapMCLabelForAODs = kFALSE ; } + + void SetClustersMCLabelFrom2SelectedLabels(AliEMCALRecPoint* recPoint, AliAODCaloCluster *clus) ; + void SetClustersMCLabelFromOriginalClusters(AliAODCaloCluster * clus) ; + + void SwitchOnUseClusterMCLabelForCell(Int_t opt = 2) { fSetCellMCLabelFromCluster = opt ; } + void SwitchOffUseClusterMCLabelForCell() { fSetCellMCLabelFromCluster = 0 ; } + +private: virtual void FillCaloClusterInEvent(); virtual void RecPoints2Clusters(); - + virtual void ResetArrays(); + AliVEvent *fEvent; // Event //Geometry @@ -153,18 +197,23 @@ class AliAnalysisTaskEMCALClusterize : public AliAnalysisTaskSE { 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 fOrgClusterCellId[12672]; // Array ID of cluster to wich the cell belongs in unmodified clusters + 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 Float_t fCellMatchdEta[12672]; // Array with cluster-track dPhi Float_t fCellMatchdPhi[12672]; // Array with cluster-track dEta + Bool_t fRecalibrateWithClusterTime; // Use fCellTime to store time of cells in cluster + 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 fRejectBelowThreshold; // split (false-default) or reject (true) cell energy below threshold after UF Bool_t fRemoveLEDEvents; // Remove LED events, use only for LHC11a Bool_t fRemoveExoticEvents; // Remove exotic events @@ -175,10 +224,28 @@ class AliAnalysisTaskEMCALClusterize : public AliAnalysisTaskSE { Bool_t fAccessOADB ; // Get calibration from OADB for EMCAL TString fOADBFilePath ; // Default path $ALICE_ROOT/OADB/EMCAL, if needed change + //Centrality + TString fCentralityClass; // Name of selected centrality class + Float_t fCentralityBin[2]; // Minimum and maximum value of the centrality for the analysis + + // Event selection with some signal in EMCAL + Bool_t fSelectEMCALEvent; // Process the event if there is some high energy cluster + Float_t fEMCALEnergyCut; // At least an EMCAL cluster with this energy in the event + Int_t fEMCALNcellsCut; // At least an EMCAL cluster with fNCellsCut cells over fEnergyCut + + Int_t fSetCellMCLabelFromCluster; // Use cluster MC label as cell label: + // 0 - get the MC label stored in cells + // 1 - from old way, select 2 most likely labels + // 2 - from new way, get the original clusters, add all the MC labels (useful for any reclusterization with output V1 clusters) + Bool_t fRemapMCLabelForAODs ; // Remap AOD cells MC label + + + Bool_t fInputFromFilter ; // Get the input from AODs from the filter + AliAnalysisTaskEMCALClusterize( const AliAnalysisTaskEMCALClusterize&); // not implemented AliAnalysisTaskEMCALClusterize& operator=(const AliAnalysisTaskEMCALClusterize&); // not implemented - ClassDef(AliAnalysisTaskEMCALClusterize, 21); + ClassDef(AliAnalysisTaskEMCALClusterize, 28); };