flag for double counting
authorlmilano <lmilano@cern.ch>
Fri, 24 Jan 2014 16:01:14 +0000 (17:01 +0100)
committerlmilano <lmilano@cern.ch>
Fri, 24 Jan 2014 16:01:14 +0000 (17:01 +0100)
PWGLF/SPECTRA/PiKaPr/TestAOD/AliAnalysisTaskSpectraAllChAOD.cxx
PWGLF/SPECTRA/PiKaPr/TestAOD/AliAnalysisTaskSpectraAllChAOD.h

index cb03377..3b89a83 100644 (file)
@@ -57,6 +57,7 @@ AliAnalysisTaskSpectraAllChAOD::AliAnalysisTaskSpectraAllChAOD(const char *name)
   fEventCuts(0x0),
   fHelperPID(0x0),
   fIsMC(0),
+  fDoDoubleCounting(0),
   fCharge(0),
   fVZEROside(0),
   fOutput(0x0),
@@ -248,7 +249,7 @@ void AliAnalysisTaskSpectraAllChAOD::UserExec(Option_t *)
     ((THnSparseF*)fOutput->FindObject("NSparseHistTrk"))->Fill(varTrk);//track loop
     
     //for nsigma PID fill double counting of ID
-    if(fHelperPID->GetPIDType()<kBayes){//only nsigma
+    if(fHelperPID->GetPIDType()<kBayes && fDoDoubleCounting){//only nsigma
       Bool_t *HasDC;
       HasDC=fHelperPID->GetDoubleCounting(track,kTRUE);//get the array with double counting
       for(Int_t ipart=0;ipart<kNSpecies;ipart++){
index 92a573e..a4386be 100644 (file)
@@ -29,6 +29,7 @@ class AliAnalysisTaskSpectraAllChAOD : public AliAnalysisTaskSE
     fEventCuts(0x0),
     fHelperPID(0x0),
     fIsMC(0),
+    fDoDoubleCounting(0),
     fCharge(0),
     fVZEROside(0),
     fOutput(0x0),
@@ -43,6 +44,9 @@ class AliAnalysisTaskSpectraAllChAOD : public AliAnalysisTaskSE
   void SetIsMC(Bool_t isMC = kFALSE)    {fIsMC = isMC; };
   Bool_t GetIsMC()           const           { return fIsMC;};
  
+  void SetDoDoubleCounting(Bool_t doDoubleCounting = kFALSE)    {fDoDoubleCounting = doDoubleCounting; };
+  Bool_t GetDoDoubleCounting()           const           { return fDoDoubleCounting;};
   void SetCharge(Int_t charge = 0)    {fCharge = charge; };
   Int_t GetCharge()           const           { return fCharge;};
   
@@ -66,20 +70,21 @@ class AliAnalysisTaskSpectraAllChAOD : public AliAnalysisTaskSE
   
  private:
   
-  AliAODEvent                   * fAOD;           //! AOD object
-  AliSpectraAODTrackCuts      * fTrackCuts;     // Track Cuts
-  AliSpectraAODEventCuts      * fEventCuts;     // Event Cuts
-  AliHelperPID                   * fHelperPID;      // points to class for PID
-  Bool_t                          fIsMC;           // true if processing MC
-  Int_t                            fCharge;        // charge to be selected
-  Int_t                            fVZEROside;    // 0: VZERO-A 1: VZERO-C
-  TList                          * fOutput;        // output list
-  Int_t                            fnCentBins;        // number of bins for the centrality axis
-  Int_t                            fnQvecBins;        // number of bins for the q vector axis
+  AliAODEvent                   * fAOD;                         //! AOD object
+  AliSpectraAODTrackCuts      * fTrackCuts;                   // Track Cuts
+  AliSpectraAODEventCuts      * fEventCuts;                   // Event Cuts
+  AliHelperPID                   * fHelperPID;                    // points to class for PID
+  Bool_t                          fIsMC;                         // true if processing MC
+  Bool_t                          fDoDoubleCounting;           // true is double counting for Nsigma accepetd
+  Int_t                            fCharge;                      // charge to be selected
+  Int_t                            fVZEROside;                  // 0: VZERO-A 1: VZERO-C
+  TList                          * fOutput;                     // output list
+  Int_t                            fnCentBins;                  // number of bins for the centrality axis
+  Int_t                            fnQvecBins;                 // number of bins for the q vector axis
   AliAnalysisTaskSpectraAllChAOD(const AliAnalysisTaskSpectraAllChAOD&);
   AliAnalysisTaskSpectraAllChAOD& operator=(const AliAnalysisTaskSpectraAllChAOD&);
   
-  ClassDef(AliAnalysisTaskSpectraAllChAOD, 4);
+  ClassDef(AliAnalysisTaskSpectraAllChAOD, 5);
 };
 
 #endif