including a function to set CPV method
authormcosenti <mcosenti@cern.ch>
Thu, 24 Apr 2014 13:20:19 +0000 (10:20 -0300)
committermcosenti <mcosenti@cern.ch>
Thu, 24 Apr 2014 13:21:31 +0000 (10:21 -0300)
PWGGA/EMCALTasks/AliAnalysisTaskEMCALIsoPhoton.cxx
PWGGA/EMCALTasks/AliAnalysisTaskEMCALIsoPhoton.h

index a77288a..f6fd7bf 100644 (file)
@@ -78,6 +78,7 @@ AliAnalysisTaskEMCALIsoPhoton::AliAnalysisTaskEMCALIsoPhoton() :
   fSelHybrid(kFALSE),
   fFillQA(kFALSE),
   fClusIdFromTracks(""),
+  fCpvFromTrack(kFALSE),
   fESD(0),
   fAOD(0),
   fVEvent(0),
@@ -166,6 +167,7 @@ AliAnalysisTaskEMCALIsoPhoton::AliAnalysisTaskEMCALIsoPhoton(const char *name) :
   fSelHybrid(kFALSE),
   fFillQA(kFALSE),
   fClusIdFromTracks(""),
+  fCpvFromTrack(kFALSE),
   fESD(0),
   fAOD(0),
   fVEvent(0),
@@ -622,6 +624,8 @@ void AliAnalysisTaskEMCALIsoPhoton::FillClusHists()
       continue;
     if(c->E()<fECut)
       continue;
+    if(fCpvFromTrack && fClusIdFromTracks.Contains(Form("%d",ic)))
+       continue;
     Short_t id;
     Double_t Emax = GetMaxCellEnergy( c, id);
     Double_t Ecross = GetCrossEnergy( c, id);
index bd6e6b9..acd8008 100644 (file)
@@ -63,8 +63,9 @@ class AliAnalysisTaskEMCALIsoPhoton : public AliAnalysisTaskSE {
                                            TString pa = "")     { fImportGeometryFromFile = im ; 
                                                                   fImportGeometryFilePath = pa ; }    
   void                  SetTrackFilterBit(ULong_t bit)          { fFilterBit = bit;  }
-  void                  SetHybridOn()                          { fSelHybrid = kTRUE; }
-  void                  SetFillQA()                            { fFillQA = kTRUE; }
+  void                  SetHybridOn()                           { fSelHybrid = kTRUE; }
+  void                  SetFillQA()                             { fFillQA = kTRUE; }
+  void                  SelectCPVFromTrack(Bool_t b)             { fCpvFromTrack = b; }
 
  protected:
   TObjArray             *fESDClusters;           //!pointer to EMCal clusters
@@ -101,6 +102,7 @@ class AliAnalysisTaskEMCALIsoPhoton : public AliAnalysisTaskSE {
   Bool_t                 fSelHybrid;             // bool to select hybrid tracks
   Bool_t                 fFillQA;                // bool to fill the QA plots
   TString                fClusIdFromTracks;      // string to hold the list of cluster ids given by tracks
+  Bool_t                 fCpvFromTrack;