updated
authorssakai <ssakai@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 11 Jul 2013 13:55:50 +0000 (13:55 +0000)
committerssakai <ssakai@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 11 Jul 2013 13:55:50 +0000 (13:55 +0000)
PWGHF/hfe/AliAnalysisTaskEMCalHFEpA.cxx
PWGHF/hfe/AliAnalysisTaskEMCalHFEpA.h

index ebaef1a..36054b6 100644 (file)
@@ -117,6 +117,7 @@ AliAnalysisTaskEMCalHFEpA::AliAnalysisTaskEMCalHFEpA(const char *name)
        ,fPidResponse(0)
        ,fNonHFE(new AliSelectNonHFE())
        ,fIsAOD(kFALSE)
+       ,fIsPP(kFALSE)
        ,fCentrality(0)
        ,fCentralityMin(0)
        ,fCentralityMax(100)
@@ -295,6 +296,7 @@ AliAnalysisTaskEMCalHFEpA::AliAnalysisTaskEMCalHFEpA()
        ,fPidResponse(0)
        ,fNonHFE(new AliSelectNonHFE())
        ,fIsAOD(kFALSE)
+       ,fIsPP(kFALSE)
        ,fCentrality(0)
        ,fCentralityMin(0)
        ,fCentralityMax(100)
@@ -1528,9 +1530,15 @@ void AliAnalysisTaskEMCalHFEpA::UserExec(Option_t *)
 ///Here the PID cuts defined in the file "ConfigEMCalHFEpA.C" is applied
            Int_t pidpassed = 1;
            AliHFEpidObject hfetrack;
-           hfetrack.SetAnalysisType(AliHFEpidObject::kESDanalysis);
+           
+           if(fIsAOD) hfetrack.SetAnalysisType(AliHFEpidObject::kAODanalysis);
+           else hfetrack.SetAnalysisType(AliHFEpidObject::kESDanalysis);
+           
            hfetrack.SetRecTrack(track);
-           hfetrack.SetPP();   //proton-proton analysis
+           
+           if(fIsPP) hfetrack.SetPP();         //proton-proton analysis
+           else hfetrack.SetPbPb();            //Heavy-ion analysis
+           
            if(!fPID->IsSelected(&hfetrack, NULL, "", fPIDqa)) pidpassed = 0;
            fpid->Fill(pidpassed);
                
index 96faed7..3f011d7 100644 (file)
@@ -84,6 +84,8 @@ class AliAnalysisTaskEMCalHFEpA : public AliAnalysisTaskSE
        void SetEMCalTriggerEG2() { fEMCEG2=kTRUE; };
        void SetCentralityEstimator(Int_t Estimator) { fEstimator=Estimator; }; //0 = V0A, 1 = Other
        
+       void SetPPanalysis(Bool_t IsPP = kTRUE) { fIsPP=IsPP; }; //0 = V0A, 1 = Other
+       
        //Getters
        AliHFEpid *GetPID() const {return fPID;};
 //______________________________________________________________________
@@ -130,6 +132,7 @@ class AliAnalysisTaskEMCalHFEpA : public AliAnalysisTaskSE
        
 //For the case of AOD analysis
        Bool_t                                  fIsAOD;                                 //flag for AOD analysis
+       Bool_t                                  fIsPP;                                  //flag for AOD analysis
        
 //For Centrality Selection
        AliCentrality                   *fCentrality;