]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGHF/hfe/AliHFEsignalCuts.cxx
Add flow tasks to the compilation, update others
[u/mrichter/AliRoot.git] / PWGHF / hfe / AliHFEsignalCuts.cxx
index bddaf85037e0e0f29bb15ace954bb57b14851d5c..02990c71a1d80e3bc18036b94f6f735ce7e3fd82 100644 (file)
@@ -320,6 +320,7 @@ Int_t AliHFEsignalCuts::GetElecSource(const AliVParticle * const track) const {
   TClass *tracktype;
   const AliVParticle *mctrack = NULL;
   TParticle *mcpart = NULL;
+  //AliMCParticle *esdmcmother = NULL;
   if((tracktype = track->IsA()) == AliESDtrack::Class() || tracktype == AliAODTrack::Class()){
     mctrack = fMC->GetTrack(TMath::Abs(track->GetLabel()));
   } else  mctrack = track;
@@ -331,6 +332,23 @@ Int_t AliHFEsignalCuts::GetElecSource(const AliVParticle * const track) const {
     if(esdmc){
       mcpart = esdmc->Particle();
       eSource=fMCQA->GetElecSource(mcpart);
+/* // considering secondary pions
+      if(eSource>=AliHFEmcQA::kGammaPi0) {  // conversion electron, be careful with the enum odering 
+        Int_t glabel=TMath::Abs(esdmc->GetMother()); // gamma label
+        if((esdmcmother= dynamic_cast<AliMCParticle *>(fMC->GetTrack(glabel)))){
+          glabel=TMath::Abs(esdmcmother->GetMother()); // gamma's mother's label
+          if((esdmcmother= dynamic_cast<AliMCParticle *>(fMC->GetTrack(glabel)))){
+            if(glabel>fMC->GetNumberOfPrimaries()) eSource=AliHFEmcQA::kElse;
+          }
+        }
+      }
+      else if(eSource==AliHFEmcQA::kPi0 || (eSource>=AliHFEmcQA::kEta && eSource<=AliHFEmcQA::kRho0) ){ // nonHFE except for the conversion electron
+        Int_t glabel=TMath::Abs(esdmc->GetMother());
+        if((esdmcmother= dynamic_cast<AliMCParticle *>(fMC->GetTrack(glabel)))){
+          if(glabel>fMC->GetNumberOfPrimaries()) eSource=AliHFEmcQA::kElse;
+        }
+      }
+*/
     }
   } else {
     return -1;