Add jet embedding MC (M. Verweij)
authormvl <mvl@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 7 Mar 2013 17:02:16 +0000 (17:02 +0000)
committermvl <mvl@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 7 Mar 2013 17:02:16 +0000 (17:02 +0000)
JETAN/AliAnalysisTaskFastEmbedding.cxx
JETAN/AliAnalysisTaskJetCluster.cxx

index 0fe959c..e2ff6e8 100644 (file)
@@ -853,7 +853,7 @@ void AliAnalysisTaskFastEmbedding::UserExec(Option_t *)
                new((*mcpartOUT)[nAODmcpart++]) AliAODMCParticle(*tmpPart);
                dummy = (*mcpartOUT)[nAODmcpart-1];
 
-               if(tmpPart->IsPhysicalPrimary() && tmpPart->Charge()!=0. && tmpPart->Charge()!=-99. ){
+               if(tmpPart->IsPhysicalPrimary() && tmpPart->Charge()!=0. && tmpPart->Charge()!=-99.  && tmpPart->Pt()>0.){
                   fh1MCTrackPt->Fill(tmpPart->Pt());
                   fh2MCTrackEtaPhi->Fill(tmpPart->Eta(), tmpPart->Phi());
                   nPhysicalPrimary++;
index 62cb3be..76cbbe1 100644 (file)
@@ -1929,11 +1929,21 @@ Int_t  AliAnalysisTaskJetCluster::GetListOfTracks(TList *list,Int_t type){
       if(!aodExtraTracks)return iCount;
       for(int it =0; it<aodExtraTracks->GetEntries(); it++) {
        AliVParticle *track = dynamic_cast<AliVParticle*> ((*aodExtraTracks)[it]);
+       AliAODMCParticle *partmc = dynamic_cast<AliAODMCParticle*> ((*aodExtraTracks)[it]);
        if (!track) {
          if(fDebug)  printf("track %d does not exist\n",it);
          continue;
        }
 
+
+       if(partmc && !partmc->IsPhysicalPrimary())continue;
+
+       if (track->Pt()<fTrackPtCut) {
+         if(fDebug>2)  printf("track %d has too low pt %.2f\n",it,track->Pt());
+         continue;
+       }
+
+
        Float_t mom[3];
        mom[0] = track->Pt();
        mom[1] = track->Phi();