]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
explicitly removing charged kaon MIPs and showers from the kaon correction to avoid...
authorcnattras <cnattras@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 4 Jun 2013 15:06:44 +0000 (15:06 +0000)
committercnattras <cnattras@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 4 Jun 2013 15:06:44 +0000 (15:06 +0000)
PWGLF/totEt/AliAnalysisEtMonteCarlo.cxx

index 34edc066e68feb80f41b2a482c5d808750902c60..3526c7fe51672c39109bc691ffd94f8f1221c00a 100644 (file)
@@ -1079,8 +1079,16 @@ Int_t AliAnalysisEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2)
            if (!stack->IsPhysicalPrimary(myPart)){
              primIdx = GetPrimMother(iPart, stack);
            } // end of primary particle check
-
-           if(primIdx==iPart && primIdx>0){//This cluster is from our primary particle and our primary particle is a kaon
+           TParticle *hitPart = stack->Particle(myPart);
+           Bool_t hitsAsChargedKaon = kFALSE;
+           if(hitPart->GetPdgCode()== fgKPlusCode || hitPart->GetPdgCode()== fgKPlusCode){
+             if(myPart==primIdx){
+               //The particle hits as a charged kaon and that kaon is a primary kaon - do not count because this is counted in the hadronic correction!
+               hitsAsChargedKaon = kTRUE;
+               //cout<<"Found primary charged kaon cluster!"<<endl;
+             }
+           }
+           if(primIdx==iPart && primIdx>0 && !hitsAsChargedKaon){//This cluster is from our primary particle and our primary particle is a kaon
              //cout<<"I have a particle match! prim code"<<code<<" id "<<primIdx <<endl;
              Float_t pos[3];
              caloCluster->GetPosition(pos);