Multiple high pT trigger study
authorlcunquei <lcunquei@cern.ch>
Tue, 18 Nov 2014 10:57:15 +0000 (11:57 +0100)
committerlcunquei <lcunquei@cern.ch>
Tue, 18 Nov 2014 10:57:15 +0000 (11:57 +0100)
PWGJE/AliAnalysisTaskJetCore.cxx

index 5b36c38..a403ea6 100644 (file)
@@ -1228,8 +1228,11 @@ Int_t  AliAnalysisTaskJetCore::SelectTrigger(TList *list,Double_t minT,Double_t
      if(!aod)return 0;
      Int_t index=-1;
      Int_t triggers[100];
-     for(Int_t cr=0;cr<100;cr++){triggers[cr]=-1;}
+     Int_t triggers2[100];
+     for(Int_t cr=0;cr<100;cr++){triggers[cr]=-1;
+       triggers2[cr]=-1;}
      Int_t im=0;
+     Int_t im2=0;
      for(int it = 0;it < aod->GetNumberOfTracks();++it){
       AliAODTrack *tr = dynamic_cast<AliAODTrack*>(aod->GetTrack(it));
       if(!tr) AliFatal("Not a standard AOD");
@@ -1251,26 +1254,30 @@ Int_t  AliAnalysisTaskJetCore::SelectTrigger(TList *list,Double_t minT,Double_t
       
       if(tr->Pt()>=minT && tr->Pt()<maxT){
        triggers[im]=iCount-1;
-        im=im+1;}
+        im=im+1;
+       if(tr->Pt()>=20.){triggers2[im2]=iCount-1;
+         im2=im2+1;}
 
-     }
+      }}
+      
       number=im;
       Int_t rd=0;
-      if(im==0) rd=0;
-      if(im>0) rd=fRandom->Integer(im);
-      index=triggers[rd];
-       AliVParticle *tr1 = (AliVParticle*)list->At(index);     
+      if(im2==0) rd=0;
+      if(im2>0) rd=fRandom->Integer(im2);
+      index=triggers2[rd];
+      AliVParticle *tr1 = (AliVParticle*)list->At(index);     
       
     
 
-      for(Int_t kk=0;kk<number;kk++){
-       if(kk==rd) continue;
+      for(Int_t kk=0;kk<im;kk++){
+       //if(kk==rd) continue;
+        if(index==triggers[kk]) continue;
        Int_t lab=triggers[kk];
          AliVParticle *tr2 = (AliVParticle*)list->At(lab);     
        
        Double_t detat=tr1->Eta()-tr2->Eta();
        Double_t dphit=RelativePhi(tr1->Phi(),tr2->Phi());
-       Double_t deltaRt=TMath::Sqrt(detat*detat+dphit*dphit);
+       Double_t deltaRt=TMath::Sqrt(detat*detat+dphit*dphit);
      
         if(deltaRt>0.4) number=number-1;}