Possibility to get detailed PID output for Ds (Gian Michele
authorprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 21 Jan 2012 23:22:02 +0000 (23:22 +0000)
committerprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 21 Jan 2012 23:22:02 +0000 (23:22 +0000)
PWG3/vertexingHF/AliAODPidHF.cxx
PWG3/vertexingHF/AliAODPidHF.h
PWG3/vertexingHF/AliRDHFCutsDstoKKpi.cxx
PWG3/vertexingHF/AliRDHFCutsDstoKKpi.h

index 913289e..ccf2930 100644 (file)
@@ -900,3 +900,52 @@ void AliAODPidHF::DrawPrior(AliPID::EParticleType type){
        GetPidCombined()->GetPriorDistribution(type)->Draw();
 }
 
+//--------------------------------------------------------------------------
+Int_t AliAODPidHF::GetnSigmaTPC(AliAODTrack *track, Int_t species, Double_t &sigma) const{
+  if(!CheckStatus(track,"TPC")) return -1;
+  
+  Double_t nsigmaTPC=-999;
+  
+  if(fOldPid){
+    AliAODPid *pidObj = track->GetDetPid();
+    Double_t dedx=pidObj->GetTPCsignal();
+    Double_t mom = pidObj->GetTPCmomentum();
+    if(mom>fPtThresholdTPC) return -2;
+    AliTPCPIDResponse tpcResponse;
+    SetBetheBloch(tpcResponse); 
+    UShort_t nTPCClus=pidObj->GetTPCsignalN();
+    if(nTPCClus==0) {nTPCClus=track->GetTPCNcls();}
+    AliPID::EParticleType type=AliPID::EParticleType(species);
+    nsigmaTPC = TMath::Abs(tpcResponse.GetNumberOfSigmas(mom,dedx,nTPCClus,type));
+    sigma=nsigmaTPC;
+  } else{
+  
+    AliPID::EParticleType type=AliPID::EParticleType(species);
+    nsigmaTPC = TMath::Abs(fPidResponse->NumberOfSigmasTPC(track,type));
+    sigma=nsigmaTPC;
+  }
+  return 1;
+}  
+
+//-----------------------------
+
+Int_t AliAODPidHF::GetnSigmaTOF(AliAODTrack *track,Int_t species, Double_t &sigma) const{
+
+  if(!CheckStatus(track,"TOF")) return -1.;
+  Double_t time[AliPID::kSPECIESN];
+  Double_t sigmaTOFPid[AliPID::kSPECIES];
+  AliAODPid *pidObj = track->GetDetPid();
+  pidObj->GetIntegratedTimes(time);
+  Double_t sigTOF=pidObj->GetTOFsignal();
+  pidObj->GetTOFpidResolution(sigmaTOFPid);
+  
+  if(sigmaTOFPid[species]<1e-99) return -2;
+  
+  Double_t sigmaTOF=TMath::Abs(sigTOF-time[species])/sigmaTOFPid[species];
+  sigma=sigmaTOF;
+  return 1;
+}
+
+//-----------------------------
index 7473aa6..54a90e5 100644 (file)
@@ -59,6 +59,9 @@ class AliAODPidHF : public AliAODPid{
  void SetPidResponse(AliPIDResponse *pidResp) {fPidResponse=pidResp;return;}
  
  //Getters
+ Int_t GetnSigmaTPC(AliAODTrack *track, Int_t species, Double_t &sigma) const;
+ Int_t GetnSigmaTOF(AliAODTrack *track, Int_t species, Double_t &sigma) const;
  Double_t GetSigma(Int_t idet) const{return fnSigma[idet];}
  Double_t GetTofSigma() const{return fTOFSigma;}
  //void GetPriors(Double_t *priors) const{priors=fPriors;return;}
index ebaee66..7bcc072 100644 (file)
@@ -339,6 +339,7 @@ Int_t AliRDHFCutsDstoKKpi::IsSelectedPID(AliAODRecoDecayHF *rd) {
   Int_t sign= rd->GetCharge(); 
   for(Int_t iDaught=0; iDaught<3; iDaught++){
     AliAODTrack *track=(AliAODTrack*)rd->GetDaughter(iDaught);
+    
     Int_t isPion=fPidHF->MakeRawPid(track,AliPID::kPion);
     Int_t isKaon=fPidHF->MakeRawPid(track,AliPID::kKaon);
     Int_t isProton=fPidHF->MakeRawPid(track,AliPID::kProton);
@@ -652,4 +653,55 @@ Int_t AliRDHFCutsDstoKKpi::IsSelected(TObject* obj,Int_t selectionLevel, AliAODE
   return 15;
 
 }
-//---------------------------------------------------------------------------
+
+//--------------------------------------------------------------------------
+
+UInt_t AliRDHFCutsDstoKKpi::GetPIDTrackTPCTOFBitMap(AliAODTrack *track) const{
+
+  UInt_t bitmap=0;
+
+  Double_t sigmaTPCPionHyp=-999.;
+  Double_t sigmaTPCKaonHyp=-999.;
+  Double_t sigmaTPCProtonHyp=-999.;
+  Double_t sigmaTOFPionHyp=-999.;
+  Double_t sigmaTOFKaonHyp=-999.;
+  Double_t sigmaTOFProtonHyp=-999.;
+  
+  Int_t oksigmaTPCPionHyp=fPidHF->GetnSigmaTPC(track,2,sigmaTPCPionHyp);
+  Int_t oksigmaTPCKaonHyp=fPidHF->GetnSigmaTPC(track,3,sigmaTPCKaonHyp);
+  Int_t oksigmaTPCProtonHyp=fPidHF->GetnSigmaTPC(track,4,sigmaTPCProtonHyp);
+  Int_t oksigmaTOFPionHyp=fPidHF->GetnSigmaTOF(track,2,sigmaTOFPionHyp);
+  Int_t oksigmaTOFKaonHyp=fPidHF->GetnSigmaTOF(track,3,sigmaTOFKaonHyp);
+  Int_t oksigmaTOFProtonHyp=fPidHF->GetnSigmaTOF(track,4,sigmaTOFProtonHyp);
+  
+  if (oksigmaTPCPionHyp && sigmaTPCPionHyp>0.){
+    if (sigmaTPCPionHyp<2.) bitmap+=1<<kTPCPionLess2;
+    else { if (sigmaTPCPionHyp<3.) bitmap+=1<<kTPCPionMore2Less3; else bitmap+=1<<kTPCPionMore3;}
+  }
+   if (oksigmaTPCKaonHyp && sigmaTPCKaonHyp>0.){
+    if (sigmaTPCKaonHyp<2.) bitmap+=1<<kTPCKaonLess2;
+    else { if (sigmaTPCKaonHyp<3.) bitmap+=1<<kTPCKaonMore2Less3; else bitmap+=1<<kTPCKaonMore3;}
+  }
+   if (oksigmaTPCProtonHyp && sigmaTPCProtonHyp>0.){
+    if (sigmaTPCProtonHyp<2.) bitmap+=1<<kTPCProtonLess2;
+    else { if (sigmaTPCProtonHyp<3.) bitmap+=1<<kTPCProtonMore2Less3; else bitmap+=1<<kTPCProtonMore3;}
+  }
+  
+  if (oksigmaTOFPionHyp && sigmaTOFPionHyp>0.){
+    if (sigmaTOFPionHyp<2.) bitmap+=1<<kTOFPionLess2;
+    else { if (sigmaTOFPionHyp<3.) bitmap+=1<<kTOFPionMore2Less3; else bitmap+=1<<kTOFPionMore3;}
+  }
+   if (oksigmaTOFKaonHyp && sigmaTOFKaonHyp>0.){
+    if (sigmaTOFKaonHyp<2.) bitmap+=1<<kTOFKaonLess2;
+    else { if (sigmaTOFKaonHyp<3.) bitmap+=1<<kTOFKaonMore2Less3; else bitmap+=1<<kTOFKaonMore3;}
+  }
+   if (oksigmaTOFProtonHyp && sigmaTOFProtonHyp>0.){
+    if (sigmaTOFProtonHyp<2.) bitmap+=1<<kTOFProtonLess2;
+    else { if (sigmaTOFProtonHyp<3.) bitmap+=1<<kTOFProtonMore2Less3; else bitmap+=1<<kTOFProtonMore3;}
+  }
+  
+  
+  return bitmap;
+
+}
+
index 78696ba..921633b 100644 (file)
@@ -42,8 +42,16 @@ class AliRDHFCutsDstoKKpi : public AliRDHFCuts
   virtual Bool_t IsInFiducialAcceptance(Double_t pt,Double_t y) const;
   Float_t GetMassCut(Int_t iPtBin=0) const { return (GetCuts() ? fCutsRD[GetGlobalIndex(0,iPtBin)] : 1.e6);}
   Float_t GetDCACut(Int_t iPtBin=0) const { return (GetCuts() ? fCutsRD[GetGlobalIndex(11,iPtBin)] : 1.e6);}
+  UInt_t GetPIDTrackTPCTOFBitMap(AliAODTrack *track) const;
 
-
+  
+  enum TrackPIDBit{kTPCPionLess2,kTPCPionMore2Less3,kTPCPionMore3,
+                   kTPCKaonLess2,kTPCKaonMore2Less3,kTPCKaonMore3,
+                   kTPCProtonLess2,kTPCProtonMore2Less3,kTPCProtonMore3,
+                   kTOFPionLess2,kTOFPionMore2Less3,kTOFPionMore3,
+                   kTOFKaonLess2,kTOFKaonMore2Less3,kTOFKaonMore3,
+                   kTOFProtonLess2,kTOFProtonMore2Less3,kTOFProtonMore3};
+                   
   enum EDsPid {kConservative, kStrong};
   void SetPidOption(Int_t opt){
     fPidOption=opt;