fMinLeadHadPt(0), fMaxLeadHadPt(0),
fFillEtaGapsHisto(1), fFillMomImbalancePtAssocBinsHisto(0),
fMCGenTypeMin(0), fMCGenTypeMax(0),
+ fTrackVector(), fMomentum(),
+ fDecayMom1(), fDecayMom2(),
//Histograms
fhPtTriggerInput(0), fhPtTriggerSSCut(0),
fhPtTriggerIsoCut(0), fhPtTriggerFidCut(0),
{
Int_t mcIndex = GetMCTagHistogramIndex(mcTag);
fhDeltaPhiChargedMC[mcIndex]->Fill(ptTrig , deltaPhi);
- if(GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) && mcIndex==2 )
- fhDeltaPhiChargedMC[7]->Fill(ptTrig , deltaPhi);
+ if(GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) )
+ {
+ // check index in GetMCTagIndexHistogram
+ if ( mcIndex == 2 ) fhDeltaPhiChargedMC[8]->Fill(ptTrig , deltaPhi); // pi0 decay
+ else if( mcIndex == 4 ) fhDeltaPhiChargedMC[9]->Fill(ptTrig , deltaPhi); // eta decay
+ }
}
if(fDecayTrigger && decayTag > 0)
Double_t mcpout = mcAssocPt*TMath::Sin(mcdeltaPhi) ;
- if(GetDebug() > 0 )
- {
- AliInfo(Form("Charged hadron: track Pt %f, track Phi %f, phi trigger %f. Cuts: delta phi %2.2f < %2.2f < %2.2f \n",
- mcAssocPt,mcAssocPhi, mcTrigPhi,fDeltaPhiMinCut, mcdeltaPhi, fDeltaPhiMaxCut));
- }
+ AliDebug(1,Form("Charged hadron: track Pt %f, track Phi %f, phi trigger %f. Cuts: delta phi %2.2f < %2.2f < %2.2f",
+ mcAssocPt,mcAssocPhi, mcTrigPhi,fDeltaPhiMinCut, mcdeltaPhi, fDeltaPhiMaxCut));
+
// Fill Histograms
fhMCEtaCharged [histoIndex]->Fill(mcAssocPt, mcAssocEta);
fhMCPtTrigPout [histoIndex]->Fill(mcTrigPt, mcpout) ;
}
- if(histoIndex==2 && lostDecayPair && 7 >= fMCGenTypeMin && 7 <= fMCGenTypeMax )
+ if(lostDecayPair)
{
- fhMCEtaCharged [7]->Fill(mcAssocPt, mcAssocEta);
- fhMCPhiCharged [7]->Fill(mcAssocPt, mcAssocPhi);
- fhMCDeltaEtaCharged[7]->Fill(mcTrigPt , mcTrigEta-mcAssocEta);
- fhMCDeltaPhiCharged[7]->Fill(mcTrigPt , mcdeltaPhi);
- fhMCPtAssocDeltaPhi[7]->Fill(mcAssocPt, mcdeltaPhi);
-
- fhMCDeltaPhiDeltaEtaCharged[7]->Fill(mcdeltaPhi,mcTrigEta-mcAssocEta);
-
- //delta phi cut for correlation
- if( (mcdeltaPhi > fDeltaPhiMinCut) && (mcdeltaPhi < fDeltaPhiMaxCut) )
+ // check index in GetMCTagIndexHistogram
+ if(histoIndex == 2 && 8 >= fMCGenTypeMin && 8 <= fMCGenTypeMax )
{
- fhMCDeltaPhiChargedPt[7]->Fill(mcAssocPt,mcdeltaPhi);
- fhMCPtXECharged [7]->Fill(mcTrigPt, mcxE);
- fhMCPtHbpXECharged [7]->Fill(mcTrigPt, mchbpXE);
- fhMCPtZTCharged [7]->Fill(mcTrigPt, mczT);
- fhMCPtHbpZTCharged [7]->Fill(mcTrigPt, mchbpZT);
- fhMCPtTrigPout [7]->Fill(mcTrigPt, mcpout) ;
- }
+ // pi0 decay
+ fhMCEtaCharged [8]->Fill(mcAssocPt, mcAssocEta);
+ fhMCPhiCharged [8]->Fill(mcAssocPt, mcAssocPhi);
+ fhMCDeltaEtaCharged[8]->Fill(mcTrigPt , mcTrigEta-mcAssocEta);
+ fhMCDeltaPhiCharged[8]->Fill(mcTrigPt , mcdeltaPhi);
+ fhMCPtAssocDeltaPhi[8]->Fill(mcAssocPt, mcdeltaPhi);
+
+ fhMCDeltaPhiDeltaEtaCharged[8]->Fill(mcdeltaPhi,mcTrigEta-mcAssocEta);
+
+ //delta phi cut for correlation
+ if( (mcdeltaPhi > fDeltaPhiMinCut) && (mcdeltaPhi < fDeltaPhiMaxCut) )
+ {
+ fhMCDeltaPhiChargedPt[8]->Fill(mcAssocPt,mcdeltaPhi);
+ fhMCPtXECharged [8]->Fill(mcTrigPt, mcxE);
+ fhMCPtHbpXECharged [8]->Fill(mcTrigPt, mchbpXE);
+ fhMCPtZTCharged [8]->Fill(mcTrigPt, mczT);
+ fhMCPtHbpZTCharged [8]->Fill(mcTrigPt, mchbpZT);
+ fhMCPtTrigPout [8]->Fill(mcTrigPt, mcpout) ;
+ }
+ } // pi0 decay lost pair
+ if(histoIndex == 4 && 9 >= fMCGenTypeMin && 9 <= fMCGenTypeMax )
+ {
+ // eta decay
+ fhMCEtaCharged [9]->Fill(mcAssocPt, mcAssocEta);
+ fhMCPhiCharged [9]->Fill(mcAssocPt, mcAssocPhi);
+ fhMCDeltaEtaCharged[9]->Fill(mcTrigPt , mcTrigEta-mcAssocEta);
+ fhMCDeltaPhiCharged[9]->Fill(mcTrigPt , mcdeltaPhi);
+ fhMCPtAssocDeltaPhi[9]->Fill(mcAssocPt, mcdeltaPhi);
+
+ fhMCDeltaPhiDeltaEtaCharged[9]->Fill(mcdeltaPhi,mcTrigEta-mcAssocEta);
+
+ //delta phi cut for correlation
+ if( (mcdeltaPhi > fDeltaPhiMinCut) && (mcdeltaPhi < fDeltaPhiMaxCut) )
+ {
+ fhMCDeltaPhiChargedPt[9]->Fill(mcAssocPt,mcdeltaPhi);
+ fhMCPtXECharged [9]->Fill(mcTrigPt, mcxE);
+ fhMCPtHbpXECharged [9]->Fill(mcTrigPt, mchbpXE);
+ fhMCPtZTCharged [9]->Fill(mcTrigPt, mczT);
+ fhMCPtHbpZTCharged [9]->Fill(mcTrigPt, mchbpZT);
+ fhMCPtTrigPout [9]->Fill(mcTrigPt, mcpout) ;
+ }
+ } // eta decay lost pair
}
-
// Underlying event
// Right
Double_t mcUezT = mcAssocPt/mcTrigPt;
if(mcUexE < 0.)
- printf("FillChargedMCCorrelationHistograms(): Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
- mcUexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
+ AliWarning(Form("Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
+ mcUexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
fhMCPtXEUeCharged[histoIndex]->Fill(mcTrigPt,mcUexE);
if(mcUexE > 0) fhMCPtHbpXEUeCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUexE));
fhMCUePart[histoIndex]->Fill(mcTrigPt);
- if(histoIndex==2 && lostDecayPair && 7 >= fMCGenTypeMin && 7 <= fMCGenTypeMax )
+ if(lostDecayPair)
{
- fhMCPtXEUeCharged[7]->Fill(mcTrigPt,mcUexE);
- if(mcUexE > 0) fhMCPtHbpXEUeCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUexE));
-
- fhMCPtZTUeCharged[7]->Fill(mcTrigPt,mcUezT);
- if(mcUezT > 0) fhMCPtHbpZTUeCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUezT));
-
- fhMCUePart[7]->Fill(mcTrigPt);
+ // check index in GetMCTagIndexHistogram
+ if(histoIndex == 2 && 8 >= fMCGenTypeMin && 8 <= fMCGenTypeMax )
+ {
+ // pi0 decay
+ fhMCPtXEUeCharged[8]->Fill(mcTrigPt,mcUexE);
+ if(mcUexE > 0) fhMCPtHbpXEUeCharged[8]->Fill(mcTrigPt,TMath::Log(1/mcUexE));
+
+ fhMCPtZTUeCharged[8]->Fill(mcTrigPt,mcUezT);
+ if(mcUezT > 0) fhMCPtHbpZTUeCharged[8]->Fill(mcTrigPt,TMath::Log(1/mcUezT));
+
+ fhMCUePart[8]->Fill(mcTrigPt);
+ }
+ else if(histoIndex == 4 && 9 >= fMCGenTypeMin && 9 <= fMCGenTypeMax )
+ {
+ // eta decay
+ fhMCPtXEUeCharged[9]->Fill(mcTrigPt,mcUexE);
+ if(mcUexE > 0) fhMCPtHbpXEUeCharged[9]->Fill(mcTrigPt,TMath::Log(1/mcUexE));
+
+ fhMCPtZTUeCharged[9]->Fill(mcTrigPt,mcUezT);
+ if(mcUezT > 0) fhMCPtHbpZTUeCharged[9]->Fill(mcTrigPt,TMath::Log(1/mcUezT));
+
+ fhMCUePart[9]->Fill(mcTrigPt);
+ }
}
}
Double_t mcUezT = mcAssocPt/mcTrigPt;
if(mcUexE < 0.)
- printf("FillChargedMCCorrelationHistograms(): Careful!!, negative xE %2.2f for left UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
- mcUexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
+ AliWarning(Form("Careful!!, negative xE %2.2f for left UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
+ mcUexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
fhMCPtXEUeLeftCharged[histoIndex]->Fill(mcTrigPt,mcUexE);
if(mcUexE > 0) fhMCPtHbpXEUeLeftCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUexE));
fhMCPtZTUeLeftCharged[histoIndex]->Fill(mcTrigPt,mcUezT);
if(mcUezT > 0) fhMCPtHbpZTUeLeftCharged[histoIndex]->Fill(mcTrigPt,TMath::Log(1/mcUezT));
- if(histoIndex==2 && lostDecayPair && 7 >= fMCGenTypeMin && 7 <= fMCGenTypeMax )
+ if(lostDecayPair)
{
- fhMCPtXEUeLeftCharged[7]->Fill(mcTrigPt,mcUexE);
- if(mcUexE > 0) fhMCPtHbpXEUeLeftCharged[7]->Fill(mcTrigPt,TMath::Log(1/mcUexE));
-
- fhMCPtZTUeLeftCharged[7]->Fill(mcTrigPt,mcUezT);
- if(mcUezT > 0) fhMCPtHbpZTUeLeftCharged[7]->Fill(mcTrigPt,TMath::Log(1/mcUezT));
+ // check index in GetMCTagIndexHistogram
+ if(histoIndex == 2 && 8 >= fMCGenTypeMin && 8 <= fMCGenTypeMax )
+ {
+ // pi0 decay
+ fhMCPtXEUeLeftCharged[8]->Fill(mcTrigPt,mcUexE);
+ if(mcUexE > 0) fhMCPtHbpXEUeLeftCharged[8]->Fill(mcTrigPt,TMath::Log(1/mcUexE));
+
+ fhMCPtZTUeLeftCharged[8]->Fill(mcTrigPt,mcUezT);
+ if(mcUezT > 0) fhMCPtHbpZTUeLeftCharged[8]->Fill(mcTrigPt,TMath::Log(1/mcUezT));
+ }
+ else if(histoIndex == 4 && 9 >= fMCGenTypeMin && 9 <= fMCGenTypeMax )
+ {
+ // eta decay
+ fhMCPtXEUeLeftCharged[9]->Fill(mcTrigPt,mcUexE);
+ if(mcUexE > 0) fhMCPtHbpXEUeLeftCharged[9]->Fill(mcTrigPt,TMath::Log(1/mcUexE));
+
+ fhMCPtZTUeLeftCharged[9]->Fill(mcTrigPt,mcUezT);
+ if(mcUezT > 0) fhMCPtHbpZTUeLeftCharged[9]->Fill(mcTrigPt,TMath::Log(1/mcUezT));
+ }
}
}
}
Float_t pout = ptAssoc*TMath::Sin(deltaPhi) ;
if(xE < 0.)
- printf("FillChargedMomentumImbalanceHistograms(): Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
- xE,deltaPhi*TMath::RadToDeg(),TMath::Cos(deltaPhi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
+ AliWarning(Form("Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
+ xE,deltaPhi*TMath::RadToDeg(),TMath::Cos(deltaPhi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
Float_t hbpXE = -100;
Float_t hbpZT = -100;
{
Int_t mcIndex = GetMCTagHistogramIndex(mcTag);
fhXEChargedMC[mcIndex]->Fill(ptTrig , xE);
- if(GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) && mcIndex==2 )
- fhXEChargedMC[7]->Fill(ptTrig , xE);
+ if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) )
+ {
+ // check index in GetMCTagIndexHistogram
+ if ( mcIndex == 2 ) fhXEChargedMC[8]->Fill(ptTrig , xE); // pi0 decay
+ else if ( mcIndex == 4 ) fhXEChargedMC[9]->Fill(ptTrig , xE); // eta decay
+ }
}
// Pile up studies
Double_t uezT = ptAssoc/ptTrig;
if(uexE < 0.)
- printf("FillChargedUnderlyingEventHistograms(): Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
- uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
+ AliWarning(Form("Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
+ uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
fhXEUeCharged->Fill(ptTrig,uexE);
if(uexE > 0) fhPtHbpXEUeCharged->Fill(ptTrig,TMath::Log(1/uexE));
Double_t uezT = ptAssoc/ptTrig;
if(uexE < 0.)
- printf("FillChargedUnderlyingEventSidesHistograms(): Careful!!, negative xE %2.2f for left UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
- uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
+ AliWarning(Form("Careful!!, negative xE %2.2f for left UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
+ uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
fhXEUeLeftCharged->Fill(ptTrig,uexE);
if(uexE > 0) fhPtHbpXEUeLeftCharged->Fill(ptTrig,TMath::Log(1/uexE));
Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
if(uexE < 0.)
- printf("FillChargedUnderlyingEventSidesHistograms(): Careful!!, negative xE %2.2f for left-down UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
- uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
+ AliWarning(Form("Careful!!, negative xE %2.2f for left-down UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
+ uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
fhXEUeLeftDownCharged->Fill(ptTrig,uexE);
}
Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
if(uexE < 0.)
- printf("FillChargedUnderlyingEventSidesHistograms(): Careful!!, negative xE %2.2f for left-up UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
- uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
+ AliWarning(Form("Careful!!, negative xE %2.2f for left-up UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
+ uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
fhXEUeLeftUpCharged->Fill(ptTrig,uexE);
}
Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
if(uexE < 0.)
- printf("FillChargedUnderlyingEventSidesHistograms(): Careful!!, negative xE %2.2f for right-up UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
- uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
+ AliWarning(Form("Careful!!, negative xE %2.2f for right-up UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
+ uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
fhXEUeRightUpCharged->Fill(ptTrig,uexE);
}
Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
if(uexE < 0.)
- printf("FillChargedUnderlyingEventSidesHistograms(): Careful!!, negative xE %2.2f for right-down UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
- uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
+ AliWarning(Form("Careful!!, negative xE %2.2f for right-down UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
+ uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
fhXEUeRightDownCharged->Fill(ptTrig,uexE);
}
}
-//______________________________________________________________________________________________________________________________
-void AliAnaParticleHadronCorrelation::FillDecayPhotonCorrelationHistograms(Float_t ptAssoc, Float_t phiAssoc,
- TLorentzVector mom1, TLorentzVector mom2,
- Bool_t bChargedOrNeutral)
+//_____________________________________________________________________________________________________________________________________
+void AliAnaParticleHadronCorrelation::FillDecayPhotonCorrelationHistograms(Float_t ptAssoc, Float_t phiAssoc, Bool_t bChargedOrNeutral)
{
// Do correlation with decay photons of triggered pi0 or eta
// Calculate the correlation parameters
- Float_t ptDecay1 = mom1.Pt();
- Float_t ptDecay2 = mom2.Pt();
+ Float_t ptDecay1 = fDecayMom1.Pt();
+ Float_t ptDecay2 = fDecayMom2.Pt();
Float_t zTDecay1 = -100, zTDecay2 = -100;
if(ptDecay1 > 0) zTDecay1 = ptAssoc/ptDecay1 ;
if(ptDecay2 > 0) zTDecay2 = ptAssoc/ptDecay2 ;
- Float_t deltaPhiDecay1 = mom1.Phi()-phiAssoc;
+ Float_t deltaPhiDecay1 = fDecayMom1.Phi()-phiAssoc;
if(deltaPhiDecay1< -TMath::PiOver2()) deltaPhiDecay1+=TMath::TwoPi();
if(deltaPhiDecay1>3*TMath::PiOver2()) deltaPhiDecay1-=TMath::TwoPi();
- Float_t deltaPhiDecay2 = mom2.Phi()-phiAssoc;
+ Float_t deltaPhiDecay2 = fDecayMom2.Phi()-phiAssoc;
if(deltaPhiDecay2< -TMath::PiOver2()) deltaPhiDecay2+=TMath::TwoPi();
if(deltaPhiDecay2>3*TMath::PiOver2()) deltaPhiDecay2-=TMath::TwoPi();
fhDeltaPhiPi0DecayCharged->Fill(ptDecay1, deltaPhiDecay1);
fhDeltaPhiPi0DecayCharged->Fill(ptDecay2, deltaPhiDecay2);
- if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::FillDecayPhotonHistograms( Charged corr) - deltaPhoton1 = %f, deltaPhoton2 = %f \n", deltaPhiDecay1, deltaPhiDecay2);
+ AliDebug(2,Form("deltaPhoton1 = %f, deltaPhoton2 = %f", deltaPhiDecay1, deltaPhiDecay2));
if( (deltaPhiDecay1 > fDeltaPhiMinCut) && ( deltaPhiDecay1 < fDeltaPhiMaxCut) )
{
fhDeltaPhiPi0DecayNeutral->Fill(ptDecay1, deltaPhiDecay1);
fhDeltaPhiPi0DecayNeutral->Fill(ptDecay2, deltaPhiDecay2);
- if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::FillDecayPhotonHistograms(Neutral corr) - deltaPhoton1 = %f, deltaPhoton2 = %f \n", deltaPhiDecay1, deltaPhiDecay2);
+ AliDebug(2,Form("deltaPhoton1 = %f, deltaPhoton2 = %f", deltaPhiDecay1, deltaPhiDecay2));
if( (deltaPhiDecay1 > fDeltaPhiMinCut) && ( deltaPhiDecay1 < fDeltaPhiMaxCut) )
{
TList * pool = fListMixTrackEvents[eventBin];
- TVector3 p3;
for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ )
{
AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ;
- Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
- p3.SetXYZ(mom[0],mom[1],mom[2]);
- Float_t pt = p3.Pt();
+ fTrackVector.SetXYZ(track->Px(),track->Py(),track->Pz());
+ Float_t pt = fTrackVector.Pt();
//Select only hadrons in pt range
if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
- AliAODPWG4Particle * mixedTrack = new AliAODPWG4Particle(mom[0],mom[1],mom[2],0);
- mixedTrack->SetDetector("CTS");
+ AliAODPWG4Particle * mixedTrack = new AliAODPWG4Particle(track->Px(),track->Py(),track->Pz(),0);
+ mixedTrack->SetDetectorTag(kCTS);
mixedTrack->SetChargedBit(track->Charge()>0);
mixEventTracks->Add(mixedTrack);
}
TList * poolCalo = fListMixCaloEvents[eventBin];
- TLorentzVector mom;
-
for(Int_t ipr = 0;ipr < pl->GetEntriesFast() ; ipr ++ )
{
AliVCluster * calo = (AliVCluster *) (pl->At(ipr)) ;
//Cluster momentum calculation
if(GetReader()->GetDataType() != AliCaloTrackReader::kMC)
{
- calo->GetMomentum(mom,GetVertex(0)) ;
+ calo->GetMomentum(fMomentum,GetVertex(0)) ;
}//Assume that come from vertex in straight line
else
{
Double_t vertex[]={0,0,0};
- calo->GetMomentum(mom,vertex) ;
+ calo->GetMomentum(fMomentum,vertex) ;
}
- Float_t pt = mom.Pt();
+ Float_t pt = fMomentum.Pt();
//Select only clusters in pt range
if(pt < fMinAssocPt || pt > fMaxAssocPt) continue ;
- AliAODPWG4Particle * mixedCalo = new AliAODPWG4Particle(mom);
- mixedCalo->SetDetector("EMCAL");
+ AliAODPWG4Particle * mixedCalo = new AliAODPWG4Particle(fMomentum);
+ mixedCalo->SetDetectorTag(kEMCAL);
mixEventCalo->Add(mixedCalo);
}
Float_t phiLeadHad = -100 ;
Float_t etaLeadHad = -100 ;
Int_t nTrack = 0;
- TVector3 p3;
for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ )
{
AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ;
- Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
- p3.SetXYZ(mom[0],mom[1],mom[2]);
+ fTrackVector.SetXYZ(track->Px(),track->Py(),track->Pz());
- Float_t pt = p3.Pt();
- Float_t phi = p3.Phi() ;
+ Float_t pt = fTrackVector.Pt();
+ Float_t phi = fTrackVector.Phi() ;
if(phi < 0 ) phi+= TMath::TwoPi();
Float_t deltaPhi = phiTrig-phi;
ptLeadHad = pt ;
phiLeadHad = phi;
dphiLeadHad= deltaPhi;
- etaLeadHad = p3.Eta();
+ etaLeadHad = fTrackVector.Eta();
nTrack++;
}
}// track loop
}
}
- if(GetDebug() > 1 )
- {
- printf("AliAnaParticleHadronCorrelation::FindLeadingOppositeHadronInWindow() pT %2.2f, phi %2.2f, eta %2.2f, nTracks away %d, total tracks %d\n",
- ptLeadHad,phiLeadHad*TMath::RadToDeg(),etaLeadHad,nTrack, GetTrackMultiplicity());
-
- printf("\t pT trig %2.2f, Dphi (trigger-hadron) %2.2f, Deta (trigger-hadron) %2.2f\n",
- ptTrig, dphiLeadHad*TMath::RadToDeg(), etaLeadHad-etaTrig);
- printf("\t cuts pT: min %2.2f, max %2.2f; DPhi: min %2.2f, max %2.2f\n",fMinLeadHadPt,fMaxLeadHadPt,fMinLeadHadPhi*TMath::RadToDeg(),fMaxLeadHadPhi*TMath::RadToDeg());
- }
+
+ AliDebug(1,Form("pT %2.2f, phi %2.2f, eta %2.2f, nTracks away %d, total tracks %d",
+ ptLeadHad,phiLeadHad*TMath::RadToDeg(),etaLeadHad,nTrack, GetTrackMultiplicity()));
+ AliDebug(1,Form("\t pT trig %2.2f, Dphi (trigger-hadron) %2.2f, Deta (trigger-hadron) %2.2f",
+ ptTrig, dphiLeadHad*TMath::RadToDeg(), etaLeadHad-etaTrig));
+ AliDebug(1,Form("\t cuts pT: min %2.2f, max %2.2f; DPhi: min %2.2f, max %2.2f",
+ fMinLeadHadPt,fMaxLeadHadPt,fMinLeadHadPhi*TMath::RadToDeg(),fMaxLeadHadPhi*TMath::RadToDeg()));
+
// reject the trigger if the leading hadron is not in the requested pt or phi window and
Int_t nMixBins = GetNCentrBin()*GetNZvertBin()*GetNRPBin();
- TString nameMC[] = {"Photon","Pi0","Pi0Decay","EtaDecay","OtherDecay","Electron","Hadron","Pi0DecayLostPair"};
+ TString nameMC[] = {"Photon","Pi0","Pi0Decay","Eta","EtaDecay","OtherDecay","Electron","Hadron","Pi0DecayLostPair","EtaDecayLostPair"};
TString pileUpName[] = {"SPD","EMCAL","SPDOrEMCAL","SPDAndEMCAL","SPDAndNotEMCAL","EMCALAndNotSPD","NotSPDAndNotEMCAL"} ;
// For vz dependent histograms, if option ON
fhMCUePart[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
fhMCPtXEUeCharged[i] =
- new TH2F(Form("hMCPtXEUeCharged%s",right.Data()),
- Form("MC %s: #it{x}_{#it{E}} with charged hadrons, Underlying Event",nameMC[i].Data()),
+ new TH2F(Form("hMCPtXEUeCharged%s_%s",right.Data(),nameMC[i].Data()),
+ Form("MC %s: #it{x}_{#it{E}} with charged hadrons, Underlying Event %s",nameMC[i].Data(),right.Data()),
nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
fhMCPtXEUeCharged[i]->SetYTitle("#it{x}_{#it{E}}");
fhMCPtXEUeCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
fhMCPtHbpXEUeCharged[i] =
- new TH2F(Form("hMCPtHbpXEUeCharged%s",right.Data()),
- Form("MC %s: #xi = ln(1/#it{x}_{#it{E}}) with charged hadrons, Underlying Event",nameMC[i].Data()),
+ new TH2F(Form("hMCPtHbpXEUeCharged%s_%s",right.Data(),nameMC[i].Data()),
+ Form("MC %s: #xi = ln(1/#it{x}_{#it{E}}) with charged hadrons, Underlying Event %s",nameMC[i].Data(),right.Data()),
nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
fhMCPtHbpXEUeCharged[i]->SetYTitle("ln(1/#it{x}_{#it{E}})");
fhMCPtHbpXEUeCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
fhMCPtZTUeCharged[i] =
- new TH2F(Form("hMCPtZTUeCharged%s",right.Data()),
- Form("MC %s: #it{z}_{T} with charged hadrons, Underlying Event",nameMC[i].Data()),
+ new TH2F(Form("hMCPtZTUeCharged%s_%s",right.Data(),nameMC[i].Data()),
+ Form("MC %s: #it{z}_{T} with charged hadrons, Underlying Event %s",nameMC[i].Data(),right.Data()),
nptbins,ptmin,ptmax,nxeztbins,xeztmin,xeztmax);
fhMCPtZTUeCharged[i]->SetYTitle("#it{z}_{T}");
fhMCPtZTUeCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
fhMCPtHbpZTUeCharged[i] =
- new TH2F(Form("hMCPtHbpZTUeCharged%s",right.Data()),
- Form("MC %s: #xi = ln(1/#it{z}_{T}) with charged hadrons, Underlying Event",nameMC[i].Data()),
+ new TH2F(Form("hMCPtHbpZTUeCharged%s_%s",right.Data(),nameMC[i].Data()),
+ Form("MC %s: #xi = ln(1/#it{z}_{T}) with charged hadrons, Underlying Event %s",nameMC[i].Data(),right.Data()),
nptbins,ptmin,ptmax,nhbpbins,hbpmin,hbpmax);
fhMCPtHbpZTUeCharged[i]->SetYTitle("ln(1/#it{z}_{T})");
fhMCPtHbpZTUeCharged[i]->SetXTitle("#it{p}_{T trigger} (GeV/#it{c})");
}
-//_________________________________________________________________________________________________
-Bool_t AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum(AliAODPWG4Particle* trigger,
- TLorentzVector & mom1,
- TLorentzVector & mom2)
+//_____________________________________________________________________________________________________________________
+Bool_t AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum(Int_t indexPhoton1, Int_t indexPhoton2, Int_t idetector)
{
// Get the momentum of the pi0/eta assigned decay photons
// In case of pi0/eta trigger, we may want to check their decay correlation,
// get their decay children
- Int_t indexPhoton1 = trigger->GetCaloLabel(0);
- Int_t indexPhoton2 = trigger->GetCaloLabel(1);
-
if(indexPhoton1!=-1 || indexPhoton2!=-1) return kFALSE;
- if(GetDebug() > 1)
- printf("AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum() - indexPhoton1 = %d, indexPhoton2 = %d \n", indexPhoton1, indexPhoton2);
+ AliDebug(1,Form("indexPhoton1 = %d, indexPhoton2 = %d", indexPhoton1, indexPhoton2));
TObjArray * clusters = 0x0 ;
- if(trigger->GetDetector()=="EMCAL") clusters = GetEMCALClusters() ;
- else clusters = GetPHOSClusters() ;
+ if(idetector==kEMCAL) clusters = GetEMCALClusters() ;
+ else clusters = GetPHOSClusters() ;
for(Int_t iclus = 0; iclus < clusters->GetEntriesFast(); iclus++)
{
AliVCluster * photon = (AliVCluster*) (clusters->At(iclus));
- if(photon->GetID()==indexPhoton1) photon->GetMomentum(mom1,GetVertex(0)) ;
- if(photon->GetID()==indexPhoton2) photon->GetMomentum(mom1,GetVertex(0)) ;
+ if(photon->GetID()==indexPhoton1) photon->GetMomentum(fDecayMom1,GetVertex(0)) ;
+ if(photon->GetID()==indexPhoton2) photon->GetMomentum(fDecayMom2,GetVertex(0)) ;
- if(GetDebug() > 1)printf("AliAnaParticleHadronCorrelation::GetDecayPhotonMomentum() - Photon1 = %f, Photon2 = %f \n", mom1.Pt(), mom2.Pt());
+ AliDebug(1,Form("Photon1 = %f, Photon2 = %f", fDecayMom1.Pt(), fDecayMom2.Pt()));
} //cluster loop
// Index of MC histograms depending on MC origin
if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPrompt) ||
- GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCFragmentation)) return 0;
- else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0)) return 1;
- else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0Decay)) return 2;
- else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEta) ||
- GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEtaDecay)) return 3;
- else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCOtherDecay)) return 4;
- else if(!GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCElectron)) return 5;
- else return 6;
+ GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCFragmentation) ||
+ GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCISR) ) return 0;
+ else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0) ) return 1;
+ else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0Decay) ) return 2;
+ else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEta) ) return 3;
+ else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEtaDecay) ) return 4;
+ else if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) ) return 5; // other decays
+ else if(!GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCElectron) ) return 6;
+ else return 7;
}
//Do some checks
if(!GetReader()->IsCTSSwitchedOn())
- AliFatal("STOP!: You want to use CTS tracks in analysis but not read!! \n!!Check the configuration file!!\n");
+ AliFatal("STOP!: You want to use CTS tracks in analysis but not read!! \n!!Check the configuration file!!");
}
//____________________________________________________
fMinLeadHadPt = 1;
fMaxLeadHadPt = 100;
- fMCGenTypeMin = 0;
- fMCGenTypeMax = 6;
+ fMCGenTypeMin = 0;
+ fMCGenTypeMax = 10;
fNDecayBits = 1;
fDecayBits[0] = AliNeutralMesonSelection::kPi0;
// Compare if it is the leading of all tracks
- TVector3 p3;
for(Int_t ipr = 0;ipr < GetCTSTracks()->GetEntriesFast() ; ipr ++ )
{
AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ;
if(track->GetID() == pLeading->GetTrackLabel(0) || track->GetID() == pLeading->GetTrackLabel(1) ||
track->GetID() == pLeading->GetTrackLabel(2) || track->GetID() == pLeading->GetTrackLabel(3) ) continue ;
- Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
- p3.SetXYZ(mom[0],mom[1],mom[2]);
- Float_t pt = p3.Pt();
- Float_t phi = p3.Phi() ;
+ fTrackVector.SetXYZ(track->Px(),track->Py(),track->Pz());
+ Float_t pt = fTrackVector.Pt();
+ Float_t phi = fTrackVector.Phi() ;
if(phi < 0) phi+=TMath::TwoPi();
//jump out this event if near side associated particle pt larger than trigger
{
// Select the calorimeter cluster list
TObjArray * nePl = 0x0;
- if (pLeading->GetDetector() == "PHOS" )
+ if (pLeading->GetDetectorTag() == kPHOS )
nePl = GetPHOSClusters();
else
nePl = GetEMCALClusters();
if(!nePl) return kTRUE; // Do the selection just with the tracks if no calorimeter is available.
- TLorentzVector lv;
for(Int_t ipr = 0;ipr < nePl->GetEntriesFast() ; ipr ++ )
{
AliVCluster * cluster = (AliVCluster *) (nePl->At(ipr)) ;
if(cluster->GetID() == pLeading->GetCaloLabel(0) || cluster->GetID() == pLeading->GetCaloLabel(1) ) continue ;
- cluster->GetMomentum(lv,GetVertex(0));
+ cluster->GetMomentum(fMomentum,GetVertex(0));
- Float_t pt = lv.Pt();
- Float_t phi = lv.Phi() ;
+ Float_t pt = fMomentum.Pt();
+ Float_t phi = fMomentum.Phi() ;
if(phi < 0) phi+=TMath::TwoPi();
if(IsTrackMatched(cluster,GetReader()->GetInputEvent())) continue ; // avoid charged clusters, already covered by tracks, or cluster merging with track.
fLeadingTriggerIndex = index ;
pLeading->SetLeadingParticle(kTRUE);
- if( GetDebug() > 1 ) printf("\t particle AOD with index %d is leading with pT %2.2f\n", fLeadingTriggerIndex, pLeading->Pt());
+ AliDebug(1,Form("\t particle AOD with index %d is leading with pT %2.2f", fLeadingTriggerIndex, pLeading->Pt()));
return kTRUE;
if(!GetInputAODBranch())
{
- AliFatal(Form("No input particles in AOD with name branch < %s >, STOP \n",GetInputAODName().Data()));
+ AliFatal(Form("No input particles in AOD with name branch < %s >, STOP",GetInputAODName().Data()));
return ; // coverity
}
Int_t naod = GetInputAODBranch()->GetEntriesFast();
if( naod == 0 )
{
- if(GetDebug() > 1)
- printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - No particle AOD found! \n");
-
+ AliWarning("No particle AOD found!");
return ; // no trigger particles found.
}
- if(GetDebug() > 1)
- {
- printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Begin hadron correlation analysis, fill histograms \n");
- printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - In particle branch aod entries %d\n", naod);
- printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - In CTS aod entries %d\n", GetCTSTracks()->GetEntriesFast());
- }
+ AliDebug(1,Form("Begin hadron correlation analysis, fill histograms"));
+ AliDebug(1,Form("n particle branch aod entries %d", naod));
+ AliDebug(1,Form("In CTS aod entries %d",GetCTSTracks()->GetEntriesFast()));
//------------------------------------------------------
// Find leading trigger if analysis request only leading,
{
Bool_t leading = IsTriggerTheEventLeadingParticle();
- if(GetDebug() > 1)
- printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - AOD Leading trigger? %d, with index %d\n",leading,fLeadingTriggerIndex);
+ AliDebug(1,Form("AOD Leading trigger? %d, with index %d",leading,fLeadingTriggerIndex));
if(!leading)
{
- if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Leading was requested and not found\n");
+ AliDebug(1,"Leading was requested and not found");
return ;
}
else
// Not needed if already done at the particle identification level,
// but for isolation studies, it is preferred not to remove so we do it here
//
- Int_t clID1 = particle->GetCaloLabel(0) ;
- Int_t clID2 = particle->GetCaloLabel(1) ; // for photon clusters should not be set.
- if( GetDebug() > 1 ) printf("%s Trigger : id1 %d, id2 %d, min %f, max %f, det %s\n",
- GetInputAODName().Data(),clID1,clID2,fM02MinCut,fM02MaxCut,(particle->GetDetector()).Data());
-
- if(clID1 > 0 && clID2 < 0 && fM02MaxCut > 0 && fM02MinCut > 0)
+
+ AliDebug(1,Form("%s Trigger : min %f, max %f, det %d",
+ GetInputAODName().Data(),fM02MinCut,fM02MaxCut,particle->GetDetectorTag()));
+
+ if(fM02MaxCut > 0 && fM02MinCut > 0) //clID1 > 0 && clID2 < 0 &&
{
// Int_t iclus = -1;
// TObjArray* clusters = 0x0;
-// if (particle->GetDetector() == "EMCAL") clusters = GetEMCALClusters();
-// else if(particle->GetDetector() == "PHOS" ) clusters = GetPHOSClusters();
+// if (particle->GetDetectorTag() == kEMCAL) clusters = GetEMCALClusters();
+// else if(particle->GetDetectorTag() == kPHOS ) clusters = GetPHOSClusters();
//
// if(clusters)
// {
// }
Float_t m02 = particle->GetM02();
+
if(m02 > fM02MaxCut || m02 < fM02MinCut) continue ;
fhPtTriggerSSCut->Fill(pt);
+
+ AliDebug(1,"Pass the shower shape cut");
}
//
if(OnlyIsolated())
{
if( !particle->IsIsolated() ) continue;
+
fhPtTriggerIsoCut->Fill(pt);
+
+ AliDebug(1,"Pass the isolation cut");
}
//
//
if(IsFiducialCutOn())
{
- Bool_t in = GetFiducialCut()->IsInFiducialCut(*particle->Momentum(),particle->GetDetector()) ;
+ Bool_t in = GetFiducialCut()->IsInFiducialCut(particle->Eta(),particle->Phi(),particle->GetDetectorTag()) ;
+
if(! in ) continue ;
+
+ AliDebug(1,"Pass the fiducial cut");
}
fhPtTriggerFidCut->Fill(pt);
if(IsDataMC() && mcIndex >=0 && mcIndex < fgkNmcTypes)
{
fhPtTriggerMC[mcIndex]->Fill(pt);
- if( lostDecayPair && mcIndex==2 )
- fhPtTriggerMC[7]->Fill(pt);
+ if( lostDecayPair )
+ {
+ // check index in GetMCTagIndexHistogram
+ if ( mcIndex == 2 ) fhPtTriggerMC[8]->Fill(pt); // pi0 decay
+ else if( mcIndex == 4 ) fhPtTriggerMC[9]->Fill(pt); // eta decay
+ }
}
if(fDecayTrigger)
if(IsDataMC() && mcIndex >=0 && mcIndex < fgkNmcTypes)
{
fhPtDecayTriggerMC[ibit][mcIndex]->Fill(pt);
- if(lostDecayPair && mcIndex==2 )
- fhPtDecayTriggerMC[ibit][7]->Fill(pt);
+ if( lostDecayPair )
+ {
+ // check index in GetMCTagIndexHistogram
+ if( mcIndex == 2 ) fhPtDecayTriggerMC[ibit][8]->Fill(pt); // pi0 decay
+ if( mcIndex == 4 ) fhPtDecayTriggerMC[ibit][9]->Fill(pt); // eta decay
+ }
}
}// check bit
}// bit loop
//Reinit for next event
fLeadingTriggerIndex = -1;
- if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - End fill histograms \n");
+ AliDebug(1,"End fill histograms");
}
//_______________________________________________________________________________________________________
void AliAnaParticleHadronCorrelation::MakeChargedCorrelation(AliAODPWG4ParticleCorrelation *aodParticle)
{
// Charged Hadron Correlation Analysis
- if(GetDebug() > 1)
- printf("AliAnaParticleHadronCorrelation::MakeChargedCorrelation() - Make trigger particle - charged hadron correlation \n");
+ AliDebug(1,"Make trigger particle - charged hadron correlation");
Float_t phiTrig = aodParticle->Phi();
Float_t etaTrig = aodParticle->Eta();
Float_t eta = -100. ;
Float_t deltaPhi = -100. ;
- TVector3 p3;
- TLorentzVector photonMom ;
TObjArray * reftracks = 0x0;
Int_t nrefs = 0;
// In case of pi0/eta trigger, we may want to check their decay correlation,
// get their decay children
//
- TLorentzVector decayMom1;
- TLorentzVector decayMom2;
+
Bool_t decayFound = kFALSE;
if( fPi0Trigger )
{
- decayFound = GetDecayPhotonMomentum(aodParticle,decayMom1, decayMom2);
+ decayFound = GetDecayPhotonMomentum(aodParticle->GetCaloLabel(0),aodParticle->GetCaloLabel(1),aodParticle->GetDetectorTag());
if(decayFound)
{
- fhPtPi0DecayRatio->Fill(ptTrig, decayMom1.Pt()/ptTrig);
- fhPtPi0DecayRatio->Fill(ptTrig, decayMom2.Pt()/ptTrig);
+ fhPtPi0DecayRatio->Fill(ptTrig, fDecayMom1.Pt()/ptTrig);
+ fhPtPi0DecayRatio->Fill(ptTrig, fDecayMom2.Pt()/ptTrig);
}
}
{
AliVTrack * track = (AliVTrack *) (GetCTSTracks()->At(ipr)) ;
- Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
- p3.SetXYZ(mom[0],mom[1],mom[2]);
- pt = p3.Pt();
- eta = p3.Eta();
- phi = p3.Phi() ;
+ fTrackVector.SetXYZ(track->Px(),track->Py(),track->Pz());
+ pt = fTrackVector.Pt();
+ eta = fTrackVector.Eta();
+ phi = fTrackVector.Phi() ;
if(phi < 0) phi+=TMath::TwoPi();
//Select only hadrons in pt range
continue;
}
- if(GetDebug() > 2 )
- printf("AliAnaParticleHadronCorrelation::MakeChargedCorrelation() - Selected charge for momentum imbalance: pt %2.2f, phi %2.2f, eta %2.2f \n",pt,phi,eta);
+ AliDebug(2,Form("Selected charge for momentum imbalance: pt %2.2f, phi %2.2f, eta %2.2f",pt,phi,eta));
// ------------------------------
// Track type bin or bits setting
//
if(fPi0Trigger && decayFound)
- FillDecayPhotonCorrelationHistograms(pt, phi, decayMom1,decayMom2, kTRUE) ;
+ FillDecayPhotonCorrelationHistograms(pt, phi, kTRUE) ;
//
// Add track reference to array
{
// Mix current trigger with tracks in another MB event
- if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Make trigger particle - charged hadron mixed event correlation \n");
+ AliDebug(1,Form("Make trigger particle - charged hadron mixed event correlation"));
if(GetMixedEvent()) return; // This is not the mixed event from general mixing frame
if(!pool) return ;
if( neutralMix && !poolCalo )
- printf("AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation() - Careful, cluster pool not available\n");
+ AliWarning("Careful, cluster pool not available");
Double_t ptTrig = aodParticle->Pt();
Double_t etaTrig = aodParticle->Eta();
Double_t phiTrig = aodParticle->Phi();
if(phiTrig < 0.) phiTrig+=TMath::TwoPi();
- if(GetDebug() > 1)
- printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Pool bin %d size %d, trigger trigger pt=%f, phi=%f, eta=%f\n",
- eventBin,pool->GetSize(), ptTrig,phiTrig,etaTrig);
+ AliDebug(1,Form("Pool bin %d size %d, trigger trigger pt=%f, phi=%f, eta=%f",
+ eventBin,pool->GetSize(), ptTrig,phiTrig,etaTrig));
Double_t ptAssoc = -999.;
Double_t phiAssoc = -999.;
if( neutralMix && poolCalo )
{
if(pool->GetSize()!=poolCalo->GetSize())
- printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Different size of calo and track pools\n");
+ AliWarning("Different size of calo and track pools");
bgCalo = static_cast<TObjArray*>(poolCalo->At(ev));
- if(!bgCalo)
- printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Event %d in calo pool not available?\n",ev);
+ if(!bgCalo) AliDebug(1,Form("Event %d in calo pool not available?",ev));
}
//
}
if( !neutralMix && fCheckLeadingWithNeutralClusters )
- printf("AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation() - Leading of clusters requested but no clusters in mixed event\n");
+ AliWarning("Leading of clusters requested but no clusters in mixed event");
if(neutralMix && fCheckLeadingWithNeutralClusters && bgCalo)
{
Int_t nClusters=bgCalo->GetEntriesFast();
- TLorentzVector mom ;
for(Int_t jlead = 0;jlead <nClusters; jlead++ )
{
AliAODPWG4Particle *cluster= (AliAODPWG4Particle*) bgCalo->At(jlead) ;
if(deltaPhi > 3*TMath::PiOver2()) deltaPhi-=TMath::TwoPi();
deltaEta = etaTrig-etaAssoc;
- if(GetDebug()>0)
- printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation(): deltaPhi= %f, deltaEta=%f\n",deltaPhi, deltaEta);
+ AliDebug(1,Form("deltaPhi= %f, deltaEta=%f",deltaPhi, deltaEta));
// Angular correlation
fhMixDeltaPhiCharged ->Fill(ptTrig, deltaPhi);
xE = -ptAssoc/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
if(xE < 0.)
- printf("MakeChargedMixCorrelation(): Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
- xE,deltaPhi*TMath::RadToDeg(),TMath::Cos(deltaPhi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
+ AliWarning(Form("Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
+ xE,deltaPhi*TMath::RadToDeg(),TMath::Cos(deltaPhi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
fhMixXECharged->Fill(ptTrig,xE);
if(xE > 0 ) fhMixHbpXECharged->Fill(ptTrig, TMath::Log(1./xE));
Double_t uexE = -(ptAssoc/ptTrig)*TMath::Cos(randomphi);
if(uexE < 0.)
- printf("MakeChargedMixCorrelation(): Careful!!, negative xE %2.2f for left UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
- uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
+ AliWarning(Form("Careful!!, negative xE %2.2f for left UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
+ uexE,randomphi*TMath::RadToDeg(),TMath::Cos(randomphi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
fhMixXEUeCharged->Fill(ptTrig,uexE);
}
Int_t npi0 = pi0list->GetEntriesFast();
if(npi0 == 0) return ;
- if(GetDebug() > 1)
- printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelation() - Particle - pi0 correlation, %d pi0's\n",npi0);
+ AliDebug(1,Form("Particle - pi0 correlation, %d pi0's",npi0));
Int_t evtIndex11 = 0 ;
Int_t evtIndex12 = 0 ;
Float_t etaTrig = aodParticle->Eta();
Float_t deltaPhi= -100. ;
Float_t deltaEta= -100. ;
-
- TLorentzVector photonMom ;
// In case of pi0/eta trigger, we may want to check their decay correlation,
// get their decay children
- TLorentzVector decayMom1;
- TLorentzVector decayMom2;
+
Bool_t decayFound = kFALSE;
- if(fPi0Trigger) decayFound = GetDecayPhotonMomentum(aodParticle,decayMom1, decayMom2);
+ if(fPi0Trigger) decayFound = GetDecayPhotonMomentum(aodParticle->GetCaloLabel(0),aodParticle->GetCaloLabel(1),aodParticle->GetDetectorTag());
TObjArray * refpi0 = 0x0;
Int_t nrefs = 0;
xE =-pt/ptTrig*TMath::Cos(deltaPhi); // -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
if(xE < 0.)
- printf("MakeNeutralCorrelation(): Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f\n",
- xE,deltaPhi*TMath::RadToDeg(),TMath::Cos(deltaPhi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg());
+ AliWarning(Form("Careful!!, negative xE %2.2f for right UE cos(dPhi %2.2f) = %2.2f, check correlation dPhi limits %f to %f",
+ xE,deltaPhi*TMath::RadToDeg(),TMath::Cos(deltaPhi),fDeltaPhiMinCut*TMath::RadToDeg(),fDeltaPhiMaxCut*TMath::RadToDeg()));
if(xE > 0 ) hbpXE = TMath::Log(1./xE);
// Decay photon correlations
//
if(fPi0Trigger && decayFound)
- FillDecayPhotonCorrelationHistograms(pt, phi, decayMom1,decayMom2,kFALSE) ;
+ FillDecayPhotonCorrelationHistograms(pt, phi, kFALSE) ;
if(fFillAODWithReferences)
{
refpi0->SetOwner(kFALSE);
}
refpi0->Add(pi0);
- }//put references in trigger AOD
+ } // put references in trigger AOD
- if(GetDebug() > 2 )
- printf("AliAnaParticleHadronCorrelation::MakeNeutralCorrelation() - Selected pi0: pt %2.2f, phi %2.2f, eta %2.2f \n",pt,phi,eta);
+ AliDebug(1,Form("Selected pi0: pt %2.2f, phi %2.2f, eta %2.2f",pt,phi,eta));
}//loop
{
// Charged Hadron Correlation Analysis with MC information
- if ( GetDebug() > 1 )
- AliInfo("Make trigger particle - charged hadron correlation in AOD MC level");
+ AliDebug(1,"Make trigger particle - charged hadron correlation in AOD MC level");
if( label < 0 )
{
- if( GetDebug() > 0 ) AliInfo(Form(" *** bad label ***: label %d", label));
+ AliDebug(1,Form(" *** bad label ***: label %d", label));
return;
}
for (iParticle = 0 ; iParticle < nTracks ; iParticle++)
{
TParticle * particle = stack->Particle(iParticle);
- TLorentzVector momentum;
//keep only final state particles
if( particle->GetStatusCode() != 1 ) continue ;
Int_t charge = (Int_t) TDatabasePDG::Instance()->GetParticle(pdg)->Charge();
if(charge == 0) continue;
- particle->Momentum(momentum);
+ particle->Momentum(fMomentum);
//Particles in CTS acceptance, make sure to use the same selection as in the reader
- Bool_t inCTS = GetReader()->GetFiducialCut()->IsInFiducialCut(momentum,"CTS");
- //printf("Accepted? %d; pt %2.2f, eta %2.2f, phi %2.2f\n",inCTS,momentum.Pt(),momentum.Eta(),momentum.Phi()*TMath::RadToDeg());
+ Bool_t inCTS = GetReader()->GetFiducialCut()->IsInFiducialCut(fMomentum.Eta(),fMomentum.Phi(),kCTS);
+ //printf("Accepted? %d; pt %2.2f, eta %2.2f, phi %2.2f\n",inCTS,fMomentum.Pt(),fMomentum.Eta(),fMomentum.Phi()*TMath::RadToDeg());
if( !inCTS ) continue;
// Remove conversions
if ( part->Charge() == 0 ) continue;
- TLorentzVector momentum(part->Px(),part->Py(),part->Pz(),part->E());
+ fMomentum.SetPxPyPzE(part->Px(),part->Py(),part->Pz(),part->E());
//Particles in CTS acceptance, make sure to use the same selection as in the reader
- Bool_t inCTS = GetReader()->GetFiducialCut()->IsInFiducialCut(momentum,"CTS");
- //printf("Accepted? %d; pt %2.2f, eta %2.2f, phi %2.2f\n",inCTS,momentum.Pt(),momentum.Eta(),momentum.Phi()*TMath::RadToDeg());
+ Bool_t inCTS = GetReader()->GetFiducialCut()->IsInFiducialCut(fMomentum.Eta(),fMomentum.Phi(),kCTS);
+ //printf("Accepted? %d; pt %2.2f, eta %2.2f, phi %2.2f\n",inCTS,fMomentum.Pt(),fMomentum.Eta(),fMomentum.Phi()*TMath::RadToDeg());
if( !inCTS ) continue;
// Remove conversions
fhMCPhiTrigger[histoIndex]->Fill(ptprim,phiprim);
fhMCEtaTrigger[histoIndex]->Fill(ptprim,etaprim);
- if(histoIndex==2 && lostDecayPair && 7 >= fMCGenTypeMin && 7 <= fMCGenTypeMax )
+ if(lostDecayPair)
{
- fhMCPtTrigger [7]->Fill(ptprim);
- fhMCPhiTrigger[7]->Fill(ptprim,phiprim);
- fhMCEtaTrigger[7]->Fill(ptprim,etaprim);
+ // check index in GetMCTagIndexHistogram
+ if (histoIndex == 2 && 8 >= fMCGenTypeMin && 8 <= fMCGenTypeMax )
+ {
+ // pi0 decay
+ fhMCPtTrigger [8]->Fill(ptprim);
+ fhMCPhiTrigger[8]->Fill(ptprim,phiprim);
+ fhMCEtaTrigger[8]->Fill(ptprim,etaprim);
+ }
+ else if(histoIndex == 4 && 9 >= fMCGenTypeMin && 9 <= fMCGenTypeMax )
+ {
+ // eta decay
+ fhMCPtTrigger [9]->Fill(ptprim);
+ fhMCPhiTrigger[9]->Fill(ptprim,phiprim);
+ fhMCEtaTrigger[9]->Fill(ptprim,etaprim);
+ }
}
if(!leadTrig && (fMakeAbsoluteLeading || fMakeNearSideLeading) )
{
- if(GetDebug() > 1)
- printf("AliAnaParticleHadronCorrelation::MakeMCChargedCorrelation(): Not leading primary trigger: pT %2.2f, phi %2.2f, eta %2.2f\n",
- ptprim,phiprim*TMath::RadToDeg(),etaprim);
+ AliDebug(1,Form("Not leading primary trigger: pT %2.2f, phi %2.2f, eta %2.2f",
+ ptprim,phiprim*TMath::RadToDeg(),etaprim));
fhMCPtTriggerNotLeading [histoIndex]->Fill(ptprim);
fhMCPhiTriggerNotLeading[histoIndex]->Fill(ptprim,phiprim);
fhMCEtaTriggerNotLeading[histoIndex]->Fill(ptprim,etaprim);
- if(histoIndex==2 && lostDecayPair && 7 >= fMCGenTypeMin && 7 <= fMCGenTypeMax )
+ if(lostDecayPair)
{
- fhMCPtTriggerNotLeading [7]->Fill(ptprim);
- fhMCPhiTriggerNotLeading[7]->Fill(ptprim,phiprim);
- fhMCEtaTriggerNotLeading[7]->Fill(ptprim,etaprim);
+ // check index in GetMCTagIndexHistogram
+ if (histoIndex == 2 && 8 >= fMCGenTypeMin && 8 <= fMCGenTypeMax )
+ {
+ // pi0 decay
+ fhMCPtTriggerNotLeading [8]->Fill(ptprim);
+ fhMCPhiTriggerNotLeading[8]->Fill(ptprim,phiprim);
+ fhMCEtaTriggerNotLeading[8]->Fill(ptprim,etaprim);
+ }
+ else if(histoIndex == 4 && 9 >= fMCGenTypeMin && 9 <= fMCGenTypeMax )
+ {
+ // eta decay
+ fhMCPtTriggerNotLeading [9]->Fill(ptprim);
+ fhMCPhiTriggerNotLeading[9]->Fill(ptprim,phiprim);
+ fhMCEtaTriggerNotLeading[9]->Fill(ptprim,etaprim);
+ }
}
}
}
}
else
{
- printf("n = larger than 19 or too small, set to 19 \n");
+ AliWarning("n = larger than 19 or too small, set to 19");
fNAssocPtBins = 19;
}
}
}
else
{
- printf("AliAnaParticleHadronCorrelation::SetAssocPtBinLimit() - bin number too large %d > %d or small, nothing done\n", ibin, fNAssocPtBins) ;
+ AliWarning(Form("Bin number too large %d > %d or small, nothing done", ibin, fNAssocPtBins)) ;
}
}