public:
enum type {kPtThresIC, kSumPtIC, kPtFracIC, kSumPtFracIC};
-
- Float_t GetConeSize() const {return fConeSize ; }
- Float_t GetPtThreshold() const {return fPtThreshold ; }
- Float_t GetPtFraction() const {return fPtFraction ; }
- Int_t GetICMethod() const {return fICMethod ; }
+ enum partInCone {kNeutralAndCharged=0, kOnlyNeutral=1, kOnlyCharged=2};
+
+ Float_t GetConeSize() const {return fConeSize ;}
+ Float_t GetPtThreshold() const {return fPtThreshold;}
+ Float_t GetPtFraction() const {return fPtFraction ;}
+ Int_t GetICMethod() const {return fICMethod ;}
+ Int_t GetParticleTypeInCone() const {return fPartInCone ;}
+
TString GetICParametersList() ;
-
+
void MakeIsolationCut(TObjArray * const plCTS, TObjArray * const plNe, AliCaloTrackReader * const reader,
const Bool_t fillAOD, AliAODPWG4ParticleCorrelation * pCandidate, const TString aodObjArrayName,
Int_t &n, Int_t & nfrac, Float_t &ptsum, Bool_t & isolated) const ;
void Print(const Option_t * opt)const;
- void SetConeSize(Float_t r) {fConeSize = r ; }
- void SetPtThreshold(Float_t pt) {fPtThreshold = pt; }
- void SetPtFraction(Float_t pt) {fPtFraction = pt; }
- void SetICMethod(Int_t i ) {fICMethod = i ; }
-
+ void SetConeSize(Float_t r) {fConeSize = r ; }
+ void SetPtThreshold(Float_t pt) {fPtThreshold = pt; }
+ void SetPtFraction(Float_t pt) {fPtFraction = pt; }
+ void SetICMethod(Int_t i ) {fICMethod = i ; }
+ void SetParticleTypeInCone(Int_t i){fPartInCone = i;}
+
void InitParameters();
// kSumPtIC: Cone pt sum method
// kPtFracIC: Pt threshold, fraction of candidate pt, method
// kSumPtFracIC: Cone pt sum , fraction of cone sum, method
-
- ClassDef(AliIsolationCut,1)
+ Int_t fPartInCone; // Type of particles inside cone:
+ // kNeutralAndCharged, kOnlyNeutral, kOnlyCharged
+
+
+
+ ClassDef(AliIsolationCut,2)
} ;
TList * GetCreateOutputObjects();
Double_t GetAngleMaxParam(Int_t i) const {return fAngleMaxParam.At(i) ; }
- void SetAngleMaxParam(Int_t i, Double_t par){fAngleMaxParam.AddAt(par,i) ; }
+ void SetAngleMaxParam(Int_t i, Double_t par){fAngleMaxParam.AddAt(par,i) ; }
Double_t GetInvMassMaxCut() const {return fInvMassMaxCut ; }
Double_t GetInvMassMinCut() const {return fInvMassMinCut ; }
- void SetInvMassCutRange(Double_t invmassmin, Double_t invmassmax)
+ void SetInvMassCutRange(Double_t invmassmin, Double_t invmassmax)
{fInvMassMaxCut =invmassmax; fInvMassMinCut =invmassmin;}
Double_t GetMass() const {return fM ; }
void SetMass(Double_t m) { fM =m ; }
Bool_t AreNeutralMesonSelectionHistosKept() const { return fKeepNeutralMesonHistos ; }
- void KeepNeutralMesonSelectionHistos(Bool_t keep) { fKeepNeutralMesonHistos = keep ; }
+ void KeepNeutralMesonSelectionHistos(Bool_t keep) { fKeepNeutralMesonHistos = keep ; }
void InitParameters();
Bool_t IsAngleInWindow(const Float_t angle, const Float_t e) const ;
void Print(const Option_t * opt) const;
Bool_t SelectPair(TLorentzVector particlei, TLorentzVector particlej) ;
-
+
+ void SwitchOnAngleSelection() {fUseAngleCut = kTRUE ; }
+ void SwitchOffAngleSelection() {fUseAngleCut = kFALSE ; }
+
//Histogrammes setters and getters
virtual void SetHistoERangeAndNBins(Float_t min, Float_t max, Int_t n) {
private:
- Double_t fM ; //mass of the neutral meson
- Double_t fInvMassMaxCut ; // Invariant Mass cut maximum
- Double_t fInvMassMinCut ; // Invariant Masscut minimun
- TArrayD fAngleMaxParam ; //Max opening angle selection parameters
-
- Bool_t fKeepNeutralMesonHistos ; // Keep neutral meson selection histograms
+ Double_t fM ; // Mass of the neutral meson
+ Double_t fInvMassMaxCut ; // Invariant Mass cut maximum
+ Double_t fInvMassMinCut ; // Invariant Masscut minimun
+ TArrayD fAngleMaxParam ; // Max opening angle selection parameters
+ Bool_t fUseAngleCut ; // Select pairs depending on their opening angle
+ Bool_t fKeepNeutralMesonHistos ; // Keep neutral meson selection histograms
//Histograms
TH2F * fhAnglePairNoCut ; //Aperture angle of decay photons, no cuts
Float_t fHistoIMMax ; //Maximum value of Invariant Mass histogram range
Float_t fHistoIMMin ; //Minimum value of Invariant Mass histogram range
- ClassDef(AliNeutralMesonSelection,2)
+ ClassDef(AliNeutralMesonSelection,3)
} ;
AliAnaPartCorrBaseClass(),
fDeltaPhiMaxCut(0.), fDeltaPhiMinCut(0.), fSelectIsolated(0),
fMakeSeveralUE(0), fUeDeltaPhiMaxCut(0.), fUeDeltaPhiMinCut(0.),
+ fhPtLeadingCharged(0),fhPhiLeadingCharged(0),fhEtaLeadingCharged(0),
+ fhDeltaPhiDeltaEtaCharged(0),fhDeltaPhiDeltaEtaNeutral(0),
fhPhiCharged(0), fhPhiNeutral(0), fhEtaCharged(0), fhEtaNeutral(0),
fhDeltaPhiCharged(0), fhDeltaPhiNeutral(0),
fhDeltaEtaCharged(0), fhDeltaEtaNeutral(0),
//Correlation with charged hadrons
if(GetReader()->IsCTSSwitchedOn()) {
+
+ fhPtLeadingCharged = new TH1F ("hPtLeadingCharged","p_T distribution of leading particles", nptbins,ptmin,ptmax);
+ fhPtLeadingCharged->SetXTitle("p_{T}^{trig} (GeV/c)");
+
+ fhPhiLeadingCharged = new TH2F ("hPhiLeadingCharged","#phi distribution of leading Particles",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
+ fhPhiLeadingCharged->SetYTitle("#phi (rad)");
+
+ fhEtaLeadingCharged = new TH2F ("hEtaLeadingCharged","#eta distribution of leading",nptbins,ptmin,ptmax, netabins,etamin,etamax);
+ fhEtaLeadingCharged->SetYTitle("#eta ");
+
+ fhDeltaPhiDeltaEtaCharged = new TH2F
+ ("DeltaPhiDeltaEtaCharged","#phi_{trigger} - #phi_{h^{#pm}} vs #eta_{trigger} - #eta_{h^{#pm}}",
+ 140,-2.,5.,200,-2,2);
+ fhDeltaPhiDeltaEtaCharged->SetXTitle("#Delta #phi");
+ fhDeltaPhiDeltaEtaCharged->SetYTitle("#Delta #eta");
+
fhPhiCharged = new TH2F
("PhiCharged","#phi_{h^{#pm}} vs p_{T #pm}",
nptbins,ptmin,ptmax,nphibins,phimin,phimax);
nptbins,ptmin,ptmax,200,0.,10.);
fhPtHbpUeCharged->SetYTitle("ln(1/x_{E})");
fhPtHbpUeCharged->SetXTitle("p_{T trigger}");
-
+
+ outputContainer->Add(fhPtLeadingCharged);
+ outputContainer->Add(fhPhiLeadingCharged);
+ outputContainer->Add(fhEtaLeadingCharged);
+ outputContainer->Add(fhDeltaPhiDeltaEtaCharged);
outputContainer->Add(fhPhiCharged) ;
outputContainer->Add(fhEtaCharged) ;
outputContainer->Add(fhDeltaPhiCharged) ;
//Correlation with neutral hadrons
if(GetReader()->IsEMCALSwitchedOn() || GetReader()->IsPHOSSwitchedOn()){
+ fhDeltaPhiDeltaEtaNeutral = new TH2F
+ ("DeltaPhiDeltaEtaNeutral","#phi_{trigger} - #phi_{h^{0}} vs #eta_{trigger} - #eta_{h^{0}}",
+ 140,-2.,5.,200,-2,2);
+ fhDeltaPhiDeltaEtaNeutral->SetXTitle("#Delta #phi");
+ fhDeltaPhiDeltaEtaNeutral->SetYTitle("#Delta #eta");
+
fhPhiNeutral = new TH2F
("PhiNeutral","#phi_{#pi^{0}} vs p_{T #pi^{0}}",
nptbins,ptmin,ptmax,nphibins,phimin,phimax);
fhPtHbpUeNeutral->SetXTitle("p_{T trigger}");
-
+ outputContainer->Add(fhDeltaPhiDeltaEtaNeutral);
outputContainer->Add(fhPhiNeutral) ;
outputContainer->Add(fhEtaNeutral) ;
outputContainer->Add(fhDeltaPhiNeutral) ;
}
//Loop on stored AOD particles, trigger
+ Double_t ptTrig = 0.;
+ Int_t trigIndex = -1;
Int_t naod = GetInputAODBranch()->GetEntriesFast();
for(Int_t iaod = 0; iaod < naod ; iaod++){
AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod));
-
- //Make correlation with charged hadrons
- if(GetReader()->IsCTSSwitchedOn() )
- MakeChargedCorrelation(particle, GetAODCTS(),kFALSE);
+ //find the leading particles with highest momentum
+ if (particle->Pt()>ptTrig) {
+ ptTrig = particle->Pt() ;
+ trigIndex = iaod ;
+ }
+ }//Aod branch loop
+
+ //Do correlation with leading particle
+ if(trigIndex!=-1){
+
+ AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(trigIndex));
+ //Make correlation with charged hadrons
+ if(GetReader()->IsCTSSwitchedOn() )
+ MakeChargedCorrelation(particle, GetAODCTS(),kFALSE);
//Make correlation with neutral pions
//Trigger particle in PHOS, correlation with EMCAL
}
- }//Aod branch loop
-
+ }//Correlate leading
+
if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillAOD() - End fill AODs \n");
}
printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - In particle branch aod entries %d\n", GetInputAODBranch()->GetEntriesFast());
}
- //Loop on stored AOD particles
+ //Loop on stored AOD particles, find leading
Int_t naod = GetInputAODBranch()->GetEntriesFast();
+ Double_t ptTrig = 0.;
+ Int_t trigIndex = -1 ;
for(Int_t iaod = 0; iaod < naod ; iaod++){
AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod));
//check if the particle is isolated or if we want to take the isolation into account
if(OnlyIsolated() && !particle->IsIsolated()) continue;
-
+ //find the leading particles with highest momentum
+ if (particle->Pt()>ptTrig) {
+ ptTrig = particle->Pt() ;
+ trigIndex = iaod ;
+ }
+ }//finish searching for trigger particle
+
+ if(trigIndex!=-1){ //using trigger partilce to do correlations
+ AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(trigIndex));
+
+ //Fill leading particle histogram
+ fhPtLeadingCharged->Fill(particle->Pt());
+ Float_t phi = particle->Phi();
+ if(phi<0)phi+=TMath::TwoPi();
+ fhPhiLeadingCharged->Fill(particle->Pt(), phi);
+ fhEtaLeadingCharged->Fill(particle->Pt(), particle->Eta());
+
//Make correlation with charged hadrons
TObjArray * reftracks = particle->GetObjArray(GetAODObjArrayName()+"Tracks");
if(reftracks){
- if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Particle %d, In Track Refs entries %d\n", iaod, reftracks->GetEntriesFast());
+ if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Particle %d, In Track Refs entries %d\n", trigIndex, reftracks->GetEntriesFast());
if(reftracks->GetEntriesFast() > 0) MakeChargedCorrelation(particle, reftracks,kTRUE);
}
//Make correlation with neutral pions
if(GetOutputAODBranch() && GetOutputAODBranch()->GetEntriesFast() > 0){
- if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Particle %d, In Cluster Refs entries %d\n",iaod, GetOutputAODBranch()->GetEntriesFast());
+ if(GetDebug() > 1) printf("AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms() - Particle %d, In Cluster Refs entries %d\n",trigIndex, GetOutputAODBranch()->GetEntriesFast());
MakeNeutralCorrelationFillHistograms(particle);
}
Double_t cosi = -100.;
Double_t phi = -100. ;
Double_t eta = -100. ;
- Double_t p[3];
-
+ TVector3 p3;
+
TObjArray * reftracks =0x0;
Int_t nrefs = 0;
//Track loop, select tracks with good pt, phi and fill AODs or histograms
- for(Int_t ipr = 0;ipr < pl->GetEntries() ; ipr ++ ){
+ for(Int_t ipr = 0;ipr < pl->GetEntriesFast() ; ipr ++ ){
AliAODTrack * track = (AliAODTrack *) (pl->At(ipr)) ;
- track->GetPxPyPz(p) ;
- TLorentzVector mom(p[0],p[1],p[2],0);
- pt = mom.Pt();
- px = mom.Px();
- py = mom.Py();
- eta = mom.Eta();
- phi = mom.Phi() ;
- if(phi < 0) phi+=TMath::TwoPi();
+ if(track->GetID()==aodParticle->GetTrackLabel(0)) continue ;
+ if(track->Pt()>ptTrig) continue ;
+ Double_t mom[3] = {track->Px(),track->Py(),track->Pz()};
+ p3.SetXYZ(mom[0],mom[1],mom[2]);
+ pt = p3.Pt();
+ px = p3.Px();
+ py = p3.Py();
+ eta = p3.Eta();
+ phi = p3.Phi() ;
+ if(phi < 0) phi+=TMath::TwoPi();
rat = pt/ptTrig ;
xE = -(px*pxTrig+py*pyTrig)/(ptTrig*ptTrig);
if(xE <0.)xE =-xE;
//Selection within angular range
Float_t deltaphi = phiTrig-phi;
- if(deltaphi<-TMath::PiOver2()) deltaphi+=TMath::TwoPi();
+ if(deltaphi< -TMath::PiOver2()) deltaphi+=TMath::TwoPi();
if(deltaphi>3*TMath::PiOver2()) deltaphi-=TMath::TwoPi();
if(GetDebug() > 2)
fhPhiCharged->Fill(pt,phi);
fhDeltaEtaCharged->Fill(ptTrig,aodParticle->Eta()-eta);
fhDeltaPhiCharged->Fill(ptTrig, deltaphi);
-
+ fhDeltaPhiDeltaEtaCharged->Fill(deltaphi,aodParticle->Eta()-eta);
+
if(GetDebug() > 2 ) printf("AliAnaParticleHadronCorrelation::MakeChargedCorrelation() - Selected charge for momentum imbalance: pt %2.2f, phi %2.2f, eta %2.2f \n",pt,phi,eta);
//delta phi cut for correlation
fhPhiNeutral->Fill(pt,phi);
fhDeltaEtaNeutral->Fill(ptTrig,etaTrig-eta);
fhDeltaPhiNeutral->Fill(ptTrig,deltaphi);
-
+ fhDeltaPhiDeltaEtaNeutral->Fill(deltaphi,etaTrig-eta);
+
//delta phi cut for correlation
if( (deltaphi > fDeltaPhiMinCut) && ( deltaphi < fDeltaPhiMaxCut) ) {
fhDeltaPhiNeutralPt->Fill(pt,deltaphi);