including option to apply a cut in the distance to bad channel of clusters; changing...
authormcosenti <mcosenti@cern.ch>
Mon, 15 Sep 2014 17:35:59 +0000 (14:35 -0300)
committermcosenti <mcosenti@cern.ch>
Mon, 15 Sep 2014 17:37:57 +0000 (14:37 -0300)
PWGGA/EMCALTasks/AliAnalysisTaskEMCALIsoPhoton.cxx
PWGGA/EMCALTasks/AliAnalysisTaskEMCALIsoPhoton.h
PWGGA/EMCALTasks/macros/AddTaskEMCALIsoPhoton.C

index 90c9bdf..3d21d0c 100644 (file)
@@ -83,14 +83,15 @@ AliAnalysisTaskEMCALIsoPhoton::AliAnalysisTaskEMCALIsoPhoton() :
   fClusIdFromTracks(""),
   fCpvFromTrack(kFALSE),
   fNBinsPt(200),
-  fPtBinLowEdge(-0.25),
-  fPtBinHighEdge(99.75),
+  fPtBinLowEdge(0),
+  fPtBinHighEdge(100),
   fRemMatchClus(kFALSE),
   fMinIsoClusE(0),
   fNCuts(5),
   fTrCoreRem(kFALSE),
   fClusTDiff(30e-9),
   fPileUpRejSPD(kFALSE),
+  fDistToBadChan(0),
   fESD(0),
   fAOD(0),
   fVEvent(0),
@@ -191,14 +192,15 @@ AliAnalysisTaskEMCALIsoPhoton::AliAnalysisTaskEMCALIsoPhoton(const char *name) :
   fClusIdFromTracks(""),
   fCpvFromTrack(kFALSE),
   fNBinsPt(200),
-  fPtBinLowEdge(-0.25),
-  fPtBinHighEdge(99.75),
+  fPtBinLowEdge(0.),
+  fPtBinHighEdge(100),
   fRemMatchClus(kFALSE),
   fMinIsoClusE(0),
   fNCuts(5),
   fTrCoreRem(kFALSE),
   fClusTDiff(30e-9),
   fPileUpRejSPD(kFALSE),
+  fDistToBadChan(0),
   fESD(0),
   fAOD(0),
   fVEvent(0),
@@ -730,6 +732,11 @@ void AliAnalysisTaskEMCALIsoPhoton::FillClusHists()
        printf("cluster is exotic! xxxx\n");
       continue;
     }
+    if(c->GetDistanceToBadChannel()<fDistToBadChan){
+      if(fDebug)
+       printf("cluster distance to bad channel is %1.1f (<%1.1f) xxxx\n",c->GetDistanceToBadChannel(),fDistToBadChan);
+      continue;
+    }
     Short_t id;
     Double_t Emax = GetMaxCellEnergy( c, id);
     if(fDebug)
index 4df15e4..2d304cd 100644 (file)
@@ -75,7 +75,8 @@ class AliAnalysisTaskEMCALIsoPhoton : public AliAnalysisTaskSE {
   void                  SetMinIsoClusE(Double_t emin)           { fMinIsoClusE        = emin;    }
   void                  SetTrCoreRemoval(Bool_t b)              { fTrCoreRem          = b;       }
   void                  SetClusTDiff(Double_t diff)             { fClusTDiff          = diff;    }
-  void                  SetPileUpRejSPD()                       { fPileUpRejSPD       = kTRUE;  }
+  void                  SetPileUpRejSPD()                       { fPileUpRejSPD       = kTRUE;   }
+  void                  SetDistanceToBadCh(Double_t d)          { fDistToBadChan      = d;       }
  protected:
   TObjArray             *fESDClusters;           //!pointer to EMCal clusters
   TObjArray             *fAODClusters;           //!pointer to EMCal clusters
@@ -123,6 +124,7 @@ class AliAnalysisTaskEMCALIsoPhoton : public AliAnalysisTaskSE {
   Bool_t                 fTrCoreRem;             // flag to set the removal of the core in track isolation (true removes it, default)
   Double_t               fClusTDiff;             // variable to hold the time diff between the candidate cluster and the isolation clusters
   Bool_t                 fPileUpRejSPD;          // flag to set pile-up rejection via SPD (multiple vertices)
+  Double_t               fDistToBadChan;         // distance to bad channel
   
  private:
   AliESDEvent *fESD;      //! ESD object
index 9c1dea0..9d56a66 100644 (file)
@@ -5,7 +5,8 @@ AliAnalysisTaskEMCALIsoPhoton *AddTaskEMCALIsoPhoton(
                                                     TString trigbitname = "kEMC7",
                                                     TString geoname="EMCAL_COMPLETEV1",
                                                     TString pathstrsel = "/",
-                                                    TString trackSelType = "standard"
+                                                    TString trackSelType = "standard",
+                                                    Int_t   distToBadCh = 0
                                                     )
 {
   // Get the pointer to the existing analysis manager via the static access method.
@@ -62,6 +63,7 @@ AliAnalysisTaskEMCALIsoPhoton *AddTaskEMCALIsoPhoton(
   ana->SetPeriod(period.Data());
   ana->SetGeoName(geoname.Data());  
   //ana->SetTrackFilterBit(128);
+  ana->SetDistanceToBadCh(distToBadCh);
   mgr->AddTask(ana);
   TString containername = "histEMCIsoPhoton."+trigbitname;
   TString containernameQA = "histosQA."+trigbitname;