- update for electron selection, PID for TOF and TOF+TPC combined
authorarossi <arossi@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 8 Feb 2013 18:14:27 +0000 (18:14 +0000)
committerarossi <arossi@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 8 Feb 2013 18:14:27 +0000 (18:14 +0000)
(Per-Ivar)

- bugfix in configuration to use both D0 and D0bar in the correlations
(Hege)
- coverity defect 20324 corrected: pointer check

PWGHF/correlationHF/AliAnalysisTaskDxHFECorrelation.cxx
PWGHF/correlationHF/AliAnalysisTaskDxHFECorrelation.h
PWGHF/correlationHF/AliDxHFEParticleSelection.cxx
PWGHF/correlationHF/AliDxHFEParticleSelection.h
PWGHF/correlationHF/AliDxHFEParticleSelectionD0.cxx
PWGHF/correlationHF/AliDxHFEParticleSelectionEl.cxx
PWGHF/correlationHF/AliDxHFEParticleSelectionEl.h

index 670551f..0aab544 100644 (file)
@@ -80,6 +80,7 @@ AliAnalysisTaskDxHFECorrelation::AliAnalysisTaskDxHFECorrelation(const char* opt
   , fCutsHFE(NULL)
   , fCuts(NULL)
   , fPID(NULL)
+  , fPIDTOF(NULL)
   , fFillOnlyD0D0bar(0)
   , fUseMC(kFALSE)
   , fUseEventMixing(kFALSE)
@@ -92,6 +93,7 @@ AliAnalysisTaskDxHFECorrelation::AliAnalysisTaskDxHFECorrelation(const char* opt
   //
   DefineSlots();
   fPID = new AliHFEpid("hfePid");
+  fPIDTOF = new AliHFEpid("hfePidTOF");
 
 }
 
@@ -131,6 +133,8 @@ AliAnalysisTaskDxHFECorrelation::~AliAnalysisTaskDxHFECorrelation()
   fCutsHFE=NULL;
   if(fPID) delete fPID;
   fPID=NULL;
+  if(fPIDTOF) delete fPIDTOF;
+  fPIDTOF=NULL;
   if(fSelectedElectrons) delete fSelectedElectrons;
   fSelectedElectrons=NULL;
   if(fSelectedD0s) delete fSelectedD0s;
@@ -145,16 +149,25 @@ void AliAnalysisTaskDxHFECorrelation::UserCreateOutputObjects()
   int iResult=0;
 
   //Initialize PID for electron selection
+  // TODO: Put the initialization of these objects in the AddTask..
+  // PID for Only TOF
+  if(!fPIDTOF->GetNumberOfPIDdetectors()) { 
+    fPIDTOF->AddDetector("TOF",0);
+  }
+  fPIDTOF->ConfigureTOF(3); // number of sigma TOF
+  
+  // PID object for TPC and TOF combined
   if(!fPID->GetNumberOfPIDdetectors()) { 
     fPID->AddDetector("TOF",0);
     fPID->AddDetector("TPC",1);
   }
-  fPID->InitializePID();
+
   const int paramSize=4;
   Double_t params[paramSize];
   memset(params, 0, sizeof(Double_t)*paramSize);
-  params[0]=1.;
+  params[0]=-1.;
   fPID->ConfigureTPCdefaultCut(NULL, params, 3.);
+  fPID->InitializePID();
 
   fOutput = new TList;
   fOutput->SetOwner();
@@ -178,7 +191,9 @@ void AliAnalysisTaskDxHFECorrelation::UserCreateOutputObjects()
   //Electrons
   if(fUseMC) fElectrons=new AliDxHFEParticleSelectionMCEl;
   else fElectrons=new AliDxHFEParticleSelectionEl;
+  //TODO: Create a TList containing all cut-objects needed for the worker classes
   fElectrons->SetCuts(fPID, AliDxHFEParticleSelectionEl::kCutPID);
+  fElectrons->SetCuts(fPIDTOF, AliDxHFEParticleSelectionEl::kCutPIDTOF);
   fElectrons->SetCuts(fCutsHFE, AliDxHFEParticleSelectionEl::kCutHFE);
   iResult=fElectrons->Init();
   if (iResult<0) {
@@ -224,15 +239,16 @@ void AliAnalysisTaskDxHFECorrelation::UserCreateOutputObjects()
   while((obj = next()))
     fOutput->Add(obj);
 
-  if (fCutsD0) {
-    // TODO: eliminate this copy
-    AliRDHFCutsD0toKpi* cuts=dynamic_cast<AliRDHFCutsD0toKpi*>(fCutsD0);
-    if (!cuts) {
-      AliFatal(Form("cut object %s is of incorrect type %s, expecting AliRDHFCutsD0toKpi", fCutsD0->GetName(), fCutsD0->ClassName()));
-      return;
-    }
+  if (!fCutsD0) {
+    AliFatal(Form("cut object for D0 missing"));
+    return;
+  }
+  if (!dynamic_cast<AliRDHFCutsD0toKpi*>(fCutsD0)) {
+    AliFatal(Form("cut object %s is of incorrect type %s, expecting AliRDHFCutsD0toKpi", fCutsD0->GetName(), fCutsD0->ClassName()));
+    return;
   }
-  // TODO: why copy? cleanup?
+  // that's the copy for the output stream
   AliRDHFCutsD0toKpi* copyfCuts=new AliRDHFCutsD0toKpi(dynamic_cast<AliRDHFCutsD0toKpi&>(*fCutsD0));
   const char* nameoutput=GetOutputSlot(2)->GetContainer()->GetName();
   copyfCuts->SetName(nameoutput);
@@ -299,14 +315,22 @@ void AliAnalysisTaskDxHFECorrelation::UserExec(Option_t* /*option*/)
     AliWarning("PID not initialised, get from Run no");
     fPID->InitializePID(pEvent->GetRunNumber());
   }
+  if(!fPIDTOF->IsInitialized()){ 
+    // Initialize PID with the given run number
+    AliWarning("PIDTOF not initialised, get from Run no");
+    fPIDTOF->InitializePID(pEvent->GetRunNumber());
+  }
 
   AliPIDResponse *pidResponse = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler())->GetPIDResponse();
   if(!pidResponse){
+    // TODO: consider issuing fatal instead of debug in case pidresponse not available
     AliDebug(1, "Using default PID Response");
     pidResponse = AliHFEtools::GetDefaultPID(kFALSE, fInputEvent->IsA() == AliAODEvent::Class()); 
   }
  
   fPID->SetPIDResponse(pidResponse);
+  fPIDTOF->SetPIDResponse(pidResponse);
+  fElectrons->SetPIDResponse(pidResponse); 
 
   // Retrieving process from the AODMCHeader. 
   // TODO: Move it somewhere else? (keep it here for the moment since only need to read once pr event)
index adbd9f3..0184929 100644 (file)
@@ -87,7 +87,8 @@ class AliAnalysisTaskDxHFECorrelation : public AliAnalysisTaskSE {
   AliAnalysisCuts *fCutsD0;              //  Cuts D0 
   AliHFEcuts *fCutsHFE;                  //  Cuts HFE
   AliAnalysisCuts *fCuts;                // Cuts which holds info for AliHFCorrelator 
-  AliHFEpid *fPID;                       //  dummy
+  AliHFEpid *fPID;                       //  PID TPC and TOF
+  AliHFEpid *fPIDTOF;                    //  PID TOF only
   Int_t     fFillOnlyD0D0bar;            // flag to set what to fill (0 = both, 1 = D0 only, 2 = D0bar only)
   Bool_t fUseMC;                 // use MC info
   Bool_t fUseEventMixing;        // Run Event Mixing analysis
@@ -96,7 +97,7 @@ class AliAnalysisTaskDxHFECorrelation : public AliAnalysisTaskSE {
   TObjArray *fSelectedElectrons; // Array for selected Electrons
 
 
-  ClassDef(AliAnalysisTaskDxHFECorrelation, 3);
+  ClassDef(AliAnalysisTaskDxHFECorrelation, 4);
 };
 
 #endif
index d5f6612..d86231a 100644 (file)
@@ -241,7 +241,7 @@ TObjArray* AliDxHFEParticleSelection::Select(const AliVEvent* pEvent)
   if (!pEvent) return NULL;
   TObjArray* selectedTracks=new TObjArray;
   if (!selectedTracks) return NULL;
-  selectedTracks->SetOwner(); // creating new track objects below
+  selectedTracks->SetOwner(kFALSE); // creating new track objects below
   int nofTracks=pEvent->GetNumberOfTracks();
   for (int itrack=0; itrack<nofTracks; itrack++) {
     AliVParticle* track=pEvent->GetTrack(itrack);
index 3dccad0..31cc9d7 100644 (file)
@@ -18,6 +18,7 @@
 #include "TString.h"
 class AliVEvent;
 class AliVParticle;
+class AliPIDResponse;
 class TObjArray;
 class TH1;
 class THnSparse;
@@ -73,6 +74,8 @@ class AliDxHFEParticleSelection : public TNamed {
   /// object array needs to be deleted by caller
   virtual TObjArray* Select(TObjArray* particles, const AliVEvent* pEvent);
 
+  virtual void SetPIDResponse(const AliPIDResponse* /*const pidresp*/){}
+
   // Get the list fControlObjects. 
   const TList* GetControlObjects() const {return fControlObjects;}
 
index 3c1d8bc..eb32639 100644 (file)
@@ -314,17 +314,16 @@ int AliDxHFEParticleSelectionD0::IsSelected(AliVParticle* p, const AliVEvent* pE
     if (pEvent) aod=dynamic_cast<AliAODEvent*>(const_cast<AliVEvent*>(pEvent));
   
     // Selected. Return 0 (none), 1 (D0), 2 (D0bar) or 3 (both)
+    // check daughters before calling as there is unchecked code in
+    // AliAODRecoDecayHF::HasBadDaughters called
+    TObject* o=NULL;
+    if ((o=d0->GetDaughter(0))!=NULL && dynamic_cast<AliAODTrack*>(o)!=NULL &&
+       (o=d0->GetDaughter(1))!=NULL && dynamic_cast<AliAODTrack*>(o)!=NULL) {
     selectionCode=cuts->IsSelected(d0,AliRDHFCuts::kAll,aod); 
 
     AliDebug(1,Form("Candidate is %d \n", selectionCode));
-    TObjArray daughters;
-    daughters.AddAt((AliAODTrack*)d0->GetDaughter(0),0);
-    daughters.AddAt((AliAODTrack*)d0->GetDaughter(1),1);
-
-    //check daughters
-    if(!daughters.UncheckedAt(0) || !daughters.UncheckedAt(1)) {
+    } else {
       AliDebug(1,"at least one daughter not found!");
-      daughters.Clear();
       return 0;
     }
   }
index 686eaed..efc5525 100644 (file)
@@ -39,6 +39,7 @@
 #include "AliCFManager.h"
 #include "THnSparse.h"
 #include "TH1F.h"
+#include "TH2F.h"
 #include "TAxis.h"
 #include "TObjArray.h"
 #include <iostream>
@@ -53,8 +54,22 @@ ClassImp(AliDxHFEParticleSelectionEl)
 AliDxHFEParticleSelectionEl::AliDxHFEParticleSelectionEl(const char* opt)
   : AliDxHFEParticleSelection("electron", opt)
   , fPID(NULL)
+  , fPIDTOF(NULL)
   , fElectronProperties(NULL)
-  , fWhichCut(NULL)  
+  , fWhichCut(NULL)
+  , fdEdx(NULL)
+  , fdEdxCut(NULL)
+  , fdEdxPid(NULL)
+  , fdEdxPidTOF(NULL)
+  , fnSigTPC(NULL)
+  , fnSigTPCCut(NULL)
+  , fnSigTPCPid(NULL)
+  , fnSigTPCPidTOF(NULL)
+  , fnSigTOF(NULL)
+  , fnSigTOFCut(NULL)
+  , fnSigTOFPid(NULL)
+  , fnSigTOFPidTOF(NULL)
+  , fPIDResponse(NULL)
   , fCuts(NULL)
   , fCFM(NULL)
 {
@@ -80,9 +95,63 @@ AliDxHFEParticleSelectionEl::~AliDxHFEParticleSelectionEl()
     delete fWhichCut;
     fWhichCut=NULL;
   }
+  if(fdEdx){
+    delete fdEdx;
+    fdEdx=NULL;
+  }
+  if(fdEdxCut){
+    delete fdEdxCut;
+    fdEdxCut=NULL;
+  }
+  if(fdEdxPid){
+    delete fdEdxPid;
+    fdEdxPid=NULL;
+  }
+  if(fdEdxPidTOF){
+    delete fdEdxPidTOF;
+    fdEdxPidTOF=NULL;
+  }
+  if(fnSigTPC){
+    delete fnSigTPC;
+    fnSigTPC=NULL;
+  }
+  if(fnSigTPCCut){
+    delete fnSigTPCCut;
+    fnSigTPCCut=NULL;
+  }
+  if(fnSigTPCPid){
+    delete fnSigTPCPid;
+    fnSigTPCPid=NULL;
+  }
+  if(fnSigTPCPidTOF){
+    delete fnSigTPCPidTOF;
+    fnSigTPCPidTOF=NULL;
+  }
+  if(fnSigTOF){
+    delete fnSigTOF;
+    fnSigTOF=NULL;
+  }
+  if(fnSigTOFCut){
+    delete fnSigTOFCut;
+    fnSigTOFCut=NULL;
+  }
+  if(fnSigTOFPid){
+    delete fnSigTOFPid;
+    fnSigTOFPid=NULL;
+  }
 
+  if(fnSigTOFPidTOF){
+    delete fnSigTOFPidTOF;
+    fnSigTOFPidTOF=NULL;
+  }
+
+  if(fPIDResponse){
+    delete fPIDResponse;
+    fPIDResponse=NULL;
+  }
   // NOTE: external objects fPID and fCuts are not deleted here
   fPID=NULL;
+  fPIDTOF=NULL;
   fCuts=NULL;
 }
 
@@ -92,8 +161,10 @@ const char* AliDxHFEParticleSelectionEl::fgkCutBinNames[]={
   "kHFEcuts",
   "kHFEcutsTOFPID",
   "kHFEcutsTPCPID",
+  "kPIDTOF",
   "kPID",
   "Selected e"
+
 };
 
 int AliDxHFEParticleSelectionEl::Init()
@@ -165,11 +236,88 @@ int AliDxHFEParticleSelectionEl::InitControlObjects()
   fElectronProperties=DefineTHnSparse();
   AddControlObject(fElectronProperties);
 
-  //
+  //Look into VarManager to set up and fill histos
   fWhichCut= new TH1F("fWhichCut","effective cut for a rejected particle",kNCutLabels,-0.5,kNCutLabels-0.5);
   for (int iLabel=0; iLabel<kNCutLabels; iLabel++)
     fWhichCut->GetXaxis()->SetBinLabel(iLabel+1, fgkCutBinNames[iLabel]);
   AddControlObject(fWhichCut);
+  //
+  // dEdx plots, TPC signal vs momentum
+  // 
+  fdEdx = new TH2F("fdEdx", "dEdx before cuts", 1000,0.,10.,200,0.,200.);
+  fdEdx->GetXaxis()->SetTitle("momentum (GeV/c)");
+  fdEdx->GetYaxis()->SetTitle("dE/dx in TPC (a.u.)");
+  AddControlObject(fdEdx);
+  //
+  fdEdxCut = new TH2F("fdEdxCut", "dEdx after cuts", 1000,0.,10.,200,0.,200.);
+  fdEdxCut->GetXaxis()->SetTitle("momentum (GeV/c)");
+  fdEdxCut->GetYaxis()->SetTitle("dE/dx in TPC (a.u.)");
+  AddControlObject(fdEdxCut);
+  //
+  fdEdxPid = new TH2F("fdEdxPid", "dEdx after pid",  1000,0.,10.,200,0.,200.);
+  fdEdxPid->GetXaxis()->SetTitle("momentum (GeV/c)");
+  fdEdxPid->GetYaxis()->SetTitle("dE/dx in TPC (a.u.)");
+  AddControlObject(fdEdxPid);
+  //
+  fdEdxPidTOF = new TH2F("fdEdxPidTOF", "dEdx after TOF pid",  1000,0.,10.,200,0.,200.);
+  fdEdxPidTOF->GetXaxis()->SetTitle("momentum (GeV/c)");
+  fdEdxPidTOF->GetYaxis()->SetTitle("dE/dx in TPC (a.u.)");
+  AddControlObject(fdEdxPidTOF);
+
+  //
+  // nSigmaTPC vs momentum
+  //
+
+  fnSigTPC = new TH2F("fnSigTPC", "nSigTPC before cuts",  1000,0.,10.,200,-10.,10.);
+  fnSigTPC->GetXaxis()->SetTitle("momentum (GeV/c)");
+  fnSigTPC->GetYaxis()->SetTitle("nSigma in TPC (a.u.)");
+  AddControlObject(fnSigTPC);
+
+
+  fnSigTPCCut = new TH2F("fnSigTPCCut", "nSigmaTPC after cuts",  1000,0.,10.,200,-10.,10.);
+  fnSigTPCCut->GetXaxis()->SetTitle("momentum (GeV/c)");
+  fnSigTPCCut->GetYaxis()->SetTitle("nSigma in TPC (a.u.)");
+  AddControlObject(fnSigTPCCut);
+
+
+  fnSigTPCPid = new TH2F("fnSigTPCPid", "nSigmaTPC after PID",  1000,0.,10.,200,-10.,10.);
+  fnSigTPCPid->GetXaxis()->SetTitle("momentum (GeV/c)");
+  fnSigTPCPid->GetYaxis()->SetTitle("nSigma in TPC (a.u.)");
+  AddControlObject(fnSigTPCPid);
+
+
+  fnSigTPCPidTOF = new TH2F("fnSigTPCPidTOF", "nSigmaTPC after TOF PID",  1000,0.,10.,200,-10.,10.);
+  fnSigTPCPidTOF->GetXaxis()->SetTitle("momentum (GeV/c)");
+  fnSigTPCPidTOF->GetYaxis()->SetTitle("nSigma in TPC (a.u.)");
+  AddControlObject(fnSigTPCPidTOF);
+
+  //
+  // nSigmaTOF vs momentum
+  //
+
+  fnSigTOF = new TH2F("fnSigTOF", "nSigmaTOF before cuts",  1000,0.,10.,200,-10.,10.);
+  fnSigTOF->GetXaxis()->SetTitle("momentum (GeV/c)");
+  fnSigTOF->GetYaxis()->SetTitle("nSigma in TOF (a.u.)");
+  AddControlObject(fnSigTOF);
+
+
+  fnSigTOFCut = new TH2F("fnSigTOFCut", "nSigmaTOF after cuts",  1000,0.,10.,200,-10.,10.);
+  fnSigTOFCut->GetXaxis()->SetTitle("momentum (GeV/c)");
+  fnSigTOFCut->GetYaxis()->SetTitle("nSigma in TOF (a.u.)");
+  AddControlObject(fnSigTOFCut);
+
+
+  fnSigTOFPid = new TH2F("fnSigTOFPid", "nSigmaTOF after PID",  1000,0.,10.,200,-10.,10.);
+  fnSigTOFPid->GetXaxis()->SetTitle("momentum (GeV/c)");
+  fnSigTOFPid->GetYaxis()->SetTitle("nSigma in TOF (a.u.)");
+  AddControlObject(fnSigTOFPid);
+
+
+  fnSigTOFPidTOF = new TH2F("fnSigTOFPidTOF", "nSigmaTOF after TOF PID",  1000,0.,10.,200,-10.,10.);
+  fnSigTOFPidTOF->GetXaxis()->SetTitle("momentum (GeV/c)");
+  fnSigTOFPidTOF->GetYaxis()->SetTitle("nSigma in TOF (a.u.)");
+  AddControlObject(fnSigTOFPidTOF);
+
 
   return AliDxHFEParticleSelection::InitControlObjects();
 }
@@ -214,7 +362,11 @@ int AliDxHFEParticleSelectionEl::IsSelected(AliVParticle* pEl, const AliVEvent*
 
   AliAODTrack *track=(AliAODTrack*)pEl;
   fCFM->SetRecEventInfo(pEvent);
-
+  
+  fdEdx->Fill(track->GetTPCmomentum(), track->GetTPCsignal());
+  fnSigTPC->Fill(track->GetTPCmomentum(), fPIDResponse->NumberOfSigmasTPC(track,AliPID::kElectron));
+  fnSigTOF->Fill(track->P(), fPIDResponse->NumberOfSigmasTOF(track,AliPID::kElectron));
+  
   //--------track cut selection-----------------------
   //Using AliHFECuts:
   // RecKine: ITSTPC cuts  
@@ -249,6 +401,9 @@ int AliDxHFEParticleSelectionEl::IsSelected(AliVParticle* pEl, const AliVEvent*
  
   // HFEcuts: Nb of tracklets TRD0
   //if(!ProcessCutStep(AliHFEcuts::kStepHFEcutsTRD, track)) continue;
+  fdEdxCut->Fill(track->GetTPCmomentum(), track->GetTPCsignal());
+  fnSigTPCCut->Fill(track->GetTPCmomentum(), fPIDResponse->NumberOfSigmasTPC(track,AliPID::kElectron));
+  fnSigTOFCut->Fill(track->P(), fPIDResponse->NumberOfSigmasTOF(track,AliPID::kElectron));
 
 
   //--------PID selection-----------------------
@@ -260,15 +415,31 @@ int AliDxHFEParticleSelectionEl::IsSelected(AliVParticle* pEl, const AliVEvent*
   //if(IsPbPb()) hfetrack.SetPbPb();
   hfetrack.SetPP();
 
+  if(fPIDTOF && fPIDTOF->IsSelected(&hfetrack)) {
+    fdEdxPidTOF->Fill(track->GetTPCmomentum(), track->GetTPCsignal());
+    fnSigTPCPidTOF->Fill(track->GetTPCmomentum(), fPIDResponse->NumberOfSigmasTPC(track,AliPID::kElectron));
+    fnSigTOFPidTOF->Fill(track->P(), fPIDResponse->NumberOfSigmasTOF(track,AliPID::kElectron));
+  }
+  else{
+    fWhichCut->Fill(kPIDTOF);
+    return 0;
+  }
+
+  //Combined tof & tpc pid
   if(fPID && fPID->IsSelected(&hfetrack)) {
     AliDebug(3,"Inside FilldPhi, electron is selected");
     fWhichCut->Fill(kSelected);
+    fdEdxPid->Fill(track->GetTPCmomentum(), track->GetTPCsignal());
+    fnSigTPCPid->Fill(track->GetTPCmomentum(), fPIDResponse->NumberOfSigmasTPC(track,AliPID::kElectron));
+    fnSigTOFPid->Fill(track->P(), fPIDResponse->NumberOfSigmasTOF(track,AliPID::kElectron));
     return 1;
   }
   else{
     fWhichCut->Fill(kPID);
     return 0;
   }
+
+
 }
 
 void AliDxHFEParticleSelectionEl::SetCuts(TObject* cuts, int level)
@@ -289,6 +460,14 @@ void AliDxHFEParticleSelectionEl::SetCuts(TObject* cuts, int level)
     }
     return;
   }
+
+  if (level==kCutPIDTOF) {
+    fPIDTOF=dynamic_cast<AliHFEpid*>(cuts);
+    if (!fPIDTOF && cuts) {
+      AliError(Form("cuts object is not of required type AliHFEpid but %s", cuts->ClassName()));
+    }
+    return;
+  }
 }
 
 //________________________________________________________________________
index cc467ef..d2dfe9b 100644 (file)
@@ -27,6 +27,7 @@
 //  G__PWGHFcorrelationHF.cxx:1658:15:   instantiated from here
 //  $ROOTSYS/include/TBuffer.h:373:47: error: invalid use of incomplete type ‘struct AliHFEcuts’
 //  correlationHF/AliDxHFEParticleSelectionEl.h:25:7: error: forward declaration of ‘struct AliHFEcuts’
+
 #include "AliHFEcuts.h" // need to directly include to avoid compilation error in the dictionary
 #include "AliHFEpid.h"  // need to directly include to avoid compilation error in the dictionary
 
@@ -38,7 +39,8 @@ class AliHFEtools;
 class AliVEvent;
 class AliCFManager;
 class TH1;
-
+class TH1F;
+class TH2F;
 /**
  * @class AliDxHFEParticleSelectionEl
  * Electron selection for D-HFE correlations, implements the specific
@@ -50,10 +52,11 @@ class AliDxHFEParticleSelectionEl : public AliDxHFEParticleSelection {
   AliDxHFEParticleSelectionEl(const char* opt="");
   /// destructor
   virtual ~AliDxHFEParticleSelectionEl();
-
+  
   enum {
     kCutHFE = 0,
     kCutPID = 1,
+    kCutPIDTOF = 2,
     kNCuts
   };
 
@@ -63,6 +66,7 @@ class AliDxHFEParticleSelectionEl : public AliDxHFEParticleSelection {
     kHFEcutsITS,
     kHFEcutsTOF,
     kHFEcutsTPC,
+    kPIDTOF,
     kPID,
     kSelected,
     kNCutLabels
@@ -84,27 +88,44 @@ class AliDxHFEParticleSelectionEl : public AliDxHFEParticleSelection {
 
   /// set cuts object: a type cast check is implemented in the method
   virtual void SetCuts(TObject* /*cuts*/, int /*level*/=0);
+  virtual void SetPIDResponse(const AliPIDResponse* const pidresp){fPIDResponse=(AliPIDResponse*)(pidresp);}
 
  protected:
 
  private:
+
   /// copy contructor prohibited
   AliDxHFEParticleSelectionEl(const AliDxHFEParticleSelectionEl&);
   /// assignment operator prohibited
   AliDxHFEParticleSelectionEl& operator=(const AliDxHFEParticleSelectionEl&);
-
   /// check cut of specified step, e.g.
   bool ProcessCutStep(Int_t cutStep, AliVParticle *track);
 
   AliHFEpid*    fPID;                //! the PID object
+  AliHFEpid*    fPIDTOF;             //! the PID TOF object
   THnSparse*    fElectronProperties; // the particle properties of selected particles
   TH1*          fWhichCut;           // effective cut for a rejected particle
+  TH2F*         fdEdx;               // dedx plot
+  TH2F*         fdEdxCut;            // dedx plot after track cuts
+  TH2F*         fdEdxPid;            // dedx plot after pid
+  TH2F*         fdEdxPidTOF;         // dedx plot after TOF pid
+  TH2F*         fnSigTPC;            // nSigmaTPC vs momentum before track cut
+  TH2F*         fnSigTPCCut;         // nSigmaTPC vs momentum after track cut
+  TH2F*         fnSigTPCPid;         // nSigmaTPC vs momentum after PID
+  TH2F*         fnSigTPCPidTOF;      // nSigmaTPC vs momentum after TOF PID
+  TH2F*         fnSigTOF;            // nSigmaTOF vs momentum before track cut
+  TH2F*         fnSigTOFCut;         // nSigmaTOF vs momentum after track cut
+  TH2F*         fnSigTOFPid;         // nSigmaTOF vs momentum after PID
+  TH2F*         fnSigTOFPidTOF;      // nSigmaTOF vs momentum after  TOF PID
+  AliPIDResponse* fPIDResponse;      // fPIDResponse
   AliHFEcuts*   fCuts;               //! Cuts for HF electrons
   AliCFManager* fCFM;                //! Correction Framework Manager
 
   static const char* fgkCutBinNames[]; //! bin labels for cuts histogram
 
-  ClassDef(AliDxHFEParticleSelectionEl, 2);
+  ClassDef(AliDxHFEParticleSelectionEl, 3);
 };
 
 #endif