Int_t triggerAway_entries = triggerAway->GetEntriesFast();
AliVParticle* found_particle[triggerAway_entries];
- for (Int_t j=0; j<triggerAway_entries; j++){
- AliVParticle* part2 = (AliVParticle*) triggerAway->UncheckedAt(j);
-
- Double_t part2_pt = part2->Pt();
- //check if pT of trigger 2 is within the trigger range
- //also pt of trigger 2 needs to be smaller than the pt of trigger 1 (to have an ordering if both pt are close to each other)
- if(part2_pt<fTriggerPt2Min || part2_pt>fTriggerPt2Max || part2_pt>part_pt)
- continue;
+ //have to fake the away side triggers for the 1+1 analysis
+ if(is1plus1){
+ found_particle[ind_found] = part;//in 1plus1 use first trigger particle also as pseudo second trigger particle
+ ind_max_found_pt = ind_found;
+ ind_found = 1;
+ }else{
+ //normal 2+1 analysis
+ for (Int_t j=0; j<triggerAway_entries; j++){
+ AliVParticle* part2 = (AliVParticle*) triggerAway->UncheckedAt(j);
+
+ Double_t part2_pt = part2->Pt();
+ //check if pT of trigger 2 is within the trigger range
+ //also pt of trigger 2 needs to be smaller than the pt of trigger 1 (to have an ordering if both pt are close to each other)
+ if(part2_pt<fTriggerPt2Min || part2_pt>fTriggerPt2Max || part2_pt>part_pt)
+ continue;
- // don't use the same particle (is in any case impossible because the Delta phi angle will be 0)
- if(part==part2){
- continue;
- }
+ // don't use the same particle (is in any case impossible because the Delta phi angle will be 0)
+ if(part==part2){
+ continue;
+ }
- Double_t dphi_triggers = part_phi-part2->Phi();
-
- if(dphi_triggers>1.5*TMath::Pi()) dphi_triggers -= TMath::TwoPi();
- else if(dphi_triggers<-0.5*TMath::Pi()) dphi_triggers += TMath::TwoPi();
+ Double_t dphi_triggers = part_phi-part2->Phi();
+
+ if(dphi_triggers>1.5*TMath::Pi()) dphi_triggers -= TMath::TwoPi();
+ else if(dphi_triggers<-0.5*TMath::Pi()) dphi_triggers += TMath::TwoPi();
- //if 2+1 analysis check if trigger particles have a delta phi = pi +/- alpha
- if(!is1plus1 && !isBackgroundSame)
- dphi_triggers -= TMath::Pi();
- else if(!is1plus1 && isBackgroundSame){
- //shift defined area of delta phi
- if(dphi_triggers>TMath::Pi()) dphi_triggers -= TMath::TwoPi();
-
- //look at delta phi = +/- pi/2
- if(dphi_triggers<0)
- dphi_triggers += 0.5*TMath::Pi();
- else if(dphi_triggers>0)
- dphi_triggers -= 0.5*TMath::Pi();
- }
- if(!is1plus1 && TMath::Abs(dphi_triggers)>fAlpha)
- continue;
-
- found_particle[ind_found] = part2;
- if(ind_max_found_pt==-1 || part2_pt>found_particle[ind_max_found_pt]->Pt()) ind_max_found_pt = ind_found;
- ind_found++;
-
- if(is1plus1){
- Double_t vars[7];
- vars[0] = part_eta-part2->Eta();
- vars[1] = part2_pt;
- vars[2] = part_pt;
- vars[3] = centrality;
- vars[4] = dphi_triggers;//in case of is1plus1 this did not change
- vars[5] = zVtx;
- vars[6] = part2_pt;
+ //if 2+1 analysis check if trigger particles have a delta phi = pi +/- alpha
+ if(!isBackgroundSame)
+ dphi_triggers -= TMath::Pi();
+ else if(isBackgroundSame){
+ //shift defined area of delta phi
+ if(dphi_triggers>TMath::Pi()) dphi_triggers -= TMath::TwoPi();
- track_hist->Fill(vars, stepUEHist, weight);
- }
+ //look at delta phi = +/- pi/2
+ if(dphi_triggers<0)
+ dphi_triggers += 0.5*TMath::Pi();
+ else if(dphi_triggers>0)
+ dphi_triggers -= 0.5*TMath::Pi();
+ }
+ if(TMath::Abs(dphi_triggers)>fAlpha)
+ continue;
- }//end loop to search for the second trigger particle
+ found_particle[ind_found] = part2;
+ if(ind_max_found_pt==-1 || part2_pt>found_particle[ind_max_found_pt]->Pt()) ind_max_found_pt = ind_found;
+ ind_found++;
+ }//end loop to search for the second trigger particle
+ }
//if no second trigger particle was found continue to search for the next first trigger particle
if(ind_found==0)
event_hist->Fill(vars, stepUEHist+1, weight);//away side
}
}
-
- //search only for the distribution of the 2nd trigger particle
- if(is1plus1)
- continue;
-
+
//add correlated particles on the near side
for (Int_t k=0; k<assocNear->GetEntriesFast(); k++){
AliVParticle* part3 = (AliVParticle*) assocNear->UncheckedAt(k);
track_hist->Fill(vars, stepUEHist, weight);
}
+ //search only for the distribution of the 2nd trigger particle
+ if(is1plus1)
+ continue;
+
//add correlated particles on the away side
for (Int_t k=0; k<assocAway->GetEntriesFast(); k++){
AliVParticle* part3 = (AliVParticle*) assocAway->UncheckedAt(k);
virtual ~AliTwoPlusOneContainer();
- enum PlotKind {kSameNS = 0, kSameAS, kMixedNS, kMixedAS, kMixedCombNS, kMixedCombAS, k1plus1, kBackgroundSameNS, kBackgroundSameAS};
+ enum PlotKind {kSameNS = 0, kSameAS, kMixedNS, kMixedAS, kMixedCombNS, kMixedCombAS, k1plus1, kBackgroundSameNS, kBackgroundSameAS, kMixed1plus1};
void FillCorrelations(Double_t centrality, Float_t zVtx, AliTwoPlusOneContainer::PlotKind step, TObjArray* triggerNear, TObjArray* triggerAway, TObjArray* assocNear, TObjArray* assocAway, Double_t weight, Bool_t is1plus1, Bool_t isBackgroundSame);
Double_t fAlpha; //minimum energy for the first trigger particle
Int_t fMergeCount; // counts how many objects have been merged together
- ClassDef(AliTwoPlusOneContainer, 2) // underlying event histogram container
+ ClassDef(AliTwoPlusOneContainer, 3) // underlying event histogram container
};