fHistProDiffFlowEtaPOI(NULL),
fHistSpreadOfFlow(NULL),
fHarmonic(2),
- fResonanceList(NULL),
- fFlowOfResonances(kFALSE),
- fResonanceSettings(NULL),
+ fMixedHarmonicsList(NULL),
+ fEvaluateMixedHarmonics(kTRUE),
+ fMixedHarmonicsSettings(NULL),
+ fnBinsMult(10000),
+ fMinMult(0.),
+ fMaxMult(10000.),
+ fNinCorrelator(2),
+ fMinCorrelator(2),
fXinPairAngle(0.5)
{
fQsum = new TVector2; // flow vector sum
- fResonanceList = new TList();
- // Initialize arrays needed for the flow of resonances:
- for(Int_t cs=0;cs<2;cs++) // cos/sin
- {
- fPairCorrelator[cs] = NULL;
- }
-
-}
+ fMixedHarmonicsList = new TList();
+ this->InitalizeArraysForMixedHarmonics();
+}
- //-----------------------------------------------------------------------
-
+//-----------------------------------------------------------------------
- AliFlowAnalysisWithMCEventPlane::~AliFlowAnalysisWithMCEventPlane()
- {
- //destructor
- delete fHistList;
- delete fQsum;
- }
+AliFlowAnalysisWithMCEventPlane::~AliFlowAnalysisWithMCEventPlane()
+{
+ //destructor
+ delete fHistList;
+ delete fQsum;
+}
//-----------------------------------------------------------------------
fEventNumber = 0; //set number of events to zero
- if(fFlowOfResonances) this->BookObjectsForFlowOfResonances();
+ if(fEvaluateMixedHarmonics) this->BookObjectsForMixedHarmonics();
TH1::AddDirectory(oldHistAddStatus);
}
fHistSpreadOfFlow->Fill(flowEBE->GetBinContent(1),flowEBE->GetBinEntries(1));
delete flowEBE;
- if(fFlowOfResonances) FlowOfResonances(anEvent);
+ if(fEvaluateMixedHarmonics) EvaluateMixedHarmonics(anEvent);
}
}
//--------------------------------------------------------------------
cout<<"WARNING: Histograms needed to run Finish() are not accessible!"<<endl; }
//fListHistos->Print();
+
+ TList *pMixedHarmonicsList = dynamic_cast<TList*>
+ (outputListHistos->FindObject("Mixed Harmonics"));
+ if(pMixedHarmonicsList) {this->GetOutputHistoramsForMixedHarmonics(pMixedHarmonicsList);}
+
} else { cout << "histogram list pointer is empty" << endl;}
}
- //--------------------------------------------------------------------
+//--------------------------------------------------------------------
+
+void AliFlowAnalysisWithMCEventPlane::GetOutputHistoramsForMixedHarmonics(TList *mixedHarmonicsList)
+{
+ // Get pointers to all objects relevant for mixed harmonics study.
+
+ if(mixedHarmonicsList)
+ {
+ // ...
+ } else
+ {
+ cout<<endl;
+ cout<<"WARNING (MCEP): mixedHarmonicsList in NULL in MCEP::GetOutputHistoramsForMixedHarmonics() !!!! "<<endl;
+ cout<<endl;
+ }
+
+} // end of void AliFlowAnalysisWithMCEventPlane::GetOutputHistoramsForMixedHarmonics(TList *mixedHarmonicsList)
+
+//--------------------------------------------------------------------
+
void AliFlowAnalysisWithMCEventPlane::Finish() {
//*************make histograms etc.
//cout<<".....finished"<<endl;
}
-void AliFlowAnalysisWithMCEventPlane::BookObjectsForFlowOfResonances()
+//-----------------------------------------------------------------------
+
+void AliFlowAnalysisWithMCEventPlane::InitalizeArraysForMixedHarmonics()
{
- // Book all objecsts needed to study flow of resonances.
+ // Iinitialize all arrays for mixed harmonics.
+
+ for(Int_t cs=0;cs<2;cs++) // cos/sin
+ {
+ fPairCorrelator[cs] = NULL;
+ fPairCorrelatorVsM[cs] = NULL;
+ for(Int_t sd=0;sd<2;sd++) // pt sum/difference
+ {
+ fPairCorrelatorVsPtSumDiff[cs][sd] = NULL;
+ }
+ }
+
+} // end of void InitalizeArraysForMixedHarmonics()
+
+//-----------------------------------------------------------------------
+
+void AliFlowAnalysisWithMCEventPlane::BookObjectsForMixedHarmonics()
+{
+ // Book all objects needed for mixed harmonics.
- // List:
- fResonanceList->SetName("Resonances");
- fResonanceList->SetOwner(kTRUE);
- fHistList->Add(fResonanceList);
+ // List holding all objects relevant for mixed harmonics:
+ fMixedHarmonicsList->SetName("Mixed Harmonics");
+ fMixedHarmonicsList->SetOwner(kTRUE);
+ fHistList->Add(fMixedHarmonicsList);
- // Profile holding settings for flow of resoances:
- TString resonanceSettingsName = "fResonanceSettings";
- fResonanceSettings = new TProfile(resonanceSettingsName.Data(),"Settings for flow of resonances",2,0,2);
- //fResonanceSettings->GetXaxis()->SetLabelSize(0.025);
- fResonanceSettings->GetXaxis()->SetBinLabel(1,"fFlowOfResonances");
- fResonanceSettings->Fill(0.5,(Int_t)fFlowOfResonances);
- fResonanceSettings->GetXaxis()->SetBinLabel(2,"x in #phi_{pair}"); // phi_{pair} = x*phi1+(1-x)*phi2
- fResonanceSettings->Fill(1.5,fXinPairAngle);
- fResonanceList->Add(fResonanceSettings);
+ // Profile holding settings relevant for mixed harmonics:
+ TString mixedHarmonicsSettingsName = "fMixedHarmonicsSettings";
+ fMixedHarmonicsSettings = new TProfile(mixedHarmonicsSettingsName.Data(),"Settings for Mixed Harmonics",4,0,4);
+ //fMixedHarmonicsSettings->GetXaxis()->SetLabelSize(0.025);
+ fMixedHarmonicsSettings->GetXaxis()->SetBinLabel(1,"fEvaluateMixedHarmonics");
+ fMixedHarmonicsSettings->Fill(0.5,(Int_t)fEvaluateMixedHarmonics);
+ fMixedHarmonicsSettings->GetXaxis()->SetBinLabel(2,"fNinCorrelator");
+ fMixedHarmonicsSettings->Fill(1.5,(Int_t)fNinCorrelator);
+ fMixedHarmonicsSettings->GetXaxis()->SetBinLabel(3,"fMinCorrelator");
+ fMixedHarmonicsSettings->Fill(2.5,(Int_t)fMinCorrelator);
+ fMixedHarmonicsSettings->GetXaxis()->SetBinLabel(4,"x in #phi_{pair}"); // phi_{pair} = x*phi1+(1-x)*phi2
+ fMixedHarmonicsSettings->Fill(3.5,fXinPairAngle);
+ fMixedHarmonicsList->Add(fMixedHarmonicsSettings);
- // Profiles used to calculate <cos[n(phi_{pair}-RP)]> and <sin[n(phi_{pair}-RP)]> (0 = cos, 1 = sin), where phi_{pair} = x*phi1+(1-x)*phi2:
+ // Profiles used to calculate <cos[m*phi_{pair}-n*RP]> and <sin[m*phi_{pair}-n*RP]>, where phi_{pair} = x*phi1+(1-x)*phi2:
TString cosSinFlag[2] = {"Cos","Sin"};
- TString cosSinTitleFlag[2] = {"cos[n(#phi_{pair}-#psi_{RP})]","sin[n(#phi_{pair}-#psi_{RP})]"};
+ TString cosSinTitleFlag[2] = {"cos[m#phi_{pair}-n#psi_{RP}]","sin[m#phi_{pair}-n#psi_{RP}]"};
+ if(fNinCorrelator == 2 && fMinCorrelator == 2 && TMath::Abs(fXinPairAngle-0.5)<1.e-44) // default values
+ {
+ cosSinTitleFlag[0] = "cos[#phi_{1}+#phi_{2}-2#psi_{RP})]";
+ cosSinTitleFlag[1] = "sin[#phi_{1}+#phi_{2}-2#psi_{RP})]";
+ }
+ TString psdFlag[2] = {"Sum","Diff"};
+ TString psdTitleFlag[2] = {"(p_{t,1}+p_{t,2})/2","#left|p_{t,1}-p_{t,2}#right|"};
TString pairCorrelatorName = "fPairCorrelator";
+ TString pairCorrelatorVsMName = "fPairCorrelatorVsM";
+ TString pairCorrelatorVsPtSumDiffName = "fPairCorrelatorVsPt";
+ Int_t iNbinsPt = AliFlowCommonConstants::GetMaster()->GetNbinsPt();
+ Double_t dPtMin = AliFlowCommonConstants::GetMaster()->GetPtMin();
+ Double_t dPtMax = AliFlowCommonConstants::GetMaster()->GetPtMax();
for(Int_t cs=0;cs<2;cs++)
{
- fPairCorrelator[cs] = new TProfile(Form("%s%s",pairCorrelatorName.Data(),cosSinFlag[cs].Data()),cosSinTitleFlag[cs].Data(),1,0.,1.);
+ fPairCorrelator[cs] = new TProfile(Form("%s, %s",pairCorrelatorName.Data(),cosSinFlag[cs].Data()),cosSinTitleFlag[cs].Data(),1,0.,1.);
fPairCorrelator[cs]->GetXaxis()->SetBinLabel(1,cosSinTitleFlag[cs].Data());
- fResonanceList->Add(fPairCorrelator[cs]);
- }
+ fMixedHarmonicsList->Add(fPairCorrelator[cs]);
+
+ fPairCorrelatorVsM[cs] = new TProfile(Form("%s, %s",pairCorrelatorVsMName.Data(),cosSinFlag[cs].Data()),cosSinTitleFlag[cs].Data(),fnBinsMult,fMinMult,fMaxMult);
+ fPairCorrelatorVsM[cs]->GetXaxis()->SetTitle("# of RPs");
+ fMixedHarmonicsList->Add(fPairCorrelatorVsM[cs]);
+
+ for(Int_t sd=0;sd<2;sd++)
+ {
+ fPairCorrelatorVsPtSumDiff[cs][sd] = new TProfile(Form("%s%s, %s",pairCorrelatorVsPtSumDiffName.Data(),psdFlag[sd].Data(),cosSinFlag[cs].Data()),cosSinTitleFlag[cs].Data(),iNbinsPt,dPtMin,dPtMax);
+ fPairCorrelatorVsPtSumDiff[cs][sd]->GetXaxis()->SetTitle(psdTitleFlag[sd].Data());
+ fMixedHarmonicsList->Add(fPairCorrelatorVsPtSumDiff[cs][sd]);
+ } // end of for(Int_t sd=0;sd<2;sd++)
+ } // end of for(Int_t cs=0;cs<2;cs++)
-} // end of void AliFlowAnalysisWithMCEventPlane::BookObjectsForFlowOfResonances()
+} // end of void AliFlowAnalysisWithMCEventPlane::BookObjectsForMixedHarmonics()
-void AliFlowAnalysisWithMCEventPlane::FlowOfResonances(AliFlowEventSimple* anEvent)
+//-----------------------------------------------------------------------
+
+void AliFlowAnalysisWithMCEventPlane::EvaluateMixedHarmonics(AliFlowEventSimple* anEvent)
{
- // Evaluate correlators relevant for the flow of resonances.
+ // Evaluate correlators relevant for the mixed harmonics.
// Get the MC reaction plane angle:
- Double_t RP = anEvent->GetMCReactionPlaneAngle();
+ Double_t dReactionPlane = anEvent->GetMCReactionPlaneAngle();
// Get the number of tracks:
Int_t iNumberOfTracks = anEvent->NumberOfTracks();
+ Int_t nRP = anEvent->GetEventNSelTracksRP(); // number of Reference Particles
AliFlowTrackSimple *pTrack = NULL;
Double_t dPhi1 = 0.;
Double_t dPhi2 = 0.;
+ Double_t dPt1 = 0.;
+ Double_t dPt2 = 0.;
+ Double_t n = fNinCorrelator; // shortcut
+ Double_t m = fMinCorrelator; // shortcut
Double_t x = fXinPairAngle; // shortcut
- Double_t n = fHarmonic; // shortcut
for(Int_t i=0;i<iNumberOfTracks;i++)
{
pTrack = anEvent->GetTrack(i);
if(pTrack && pTrack->InRPSelection())
{
dPhi1 = pTrack->Phi();
+ dPt1 = pTrack->Pt();
}
for(Int_t j=0;j<iNumberOfTracks;j++)
{
if(j==i) continue;
pTrack = anEvent->GetTrack(j);
- if(pTrack && pTrack->InRPSelection())
+ if(pTrack && pTrack->InPOISelection())
{
dPhi2 = pTrack->Phi();
+ dPt2 = pTrack->Pt();
}
Double_t dPhiPair = x*dPhi1+(1.-x)*dPhi2;
- fPairCorrelator[0]->Fill(0.5,TMath::Cos(n*(dPhiPair-RP)),1.);
- fPairCorrelator[1]->Fill(0.5,TMath::Sin(n*(dPhiPair-RP)),1.);
+ Double_t dPtSum = 0.5*(dPt1+dPt2);
+ Double_t dPtDiff = TMath::Abs(dPt1-dPt2);
+ fPairCorrelator[0]->Fill(0.5,TMath::Cos(m*dPhiPair-n*dReactionPlane),1.);
+ fPairCorrelator[1]->Fill(0.5,TMath::Sin(m*dPhiPair-n*dReactionPlane),1.);
+ fPairCorrelatorVsM[0]->Fill(nRP+0.5,TMath::Cos(m*dPhiPair-n*dReactionPlane),1.);
+ fPairCorrelatorVsM[1]->Fill(nRP+0.5,TMath::Sin(m*dPhiPair-n*dReactionPlane),1.);
+ fPairCorrelatorVsPtSumDiff[0][0]->Fill(dPtSum,TMath::Cos(m*dPhiPair-n*dReactionPlane),1.);
+ fPairCorrelatorVsPtSumDiff[1][0]->Fill(dPtSum,TMath::Sin(m*dPhiPair-n*dReactionPlane),1.);
+ fPairCorrelatorVsPtSumDiff[0][1]->Fill(dPtDiff,TMath::Cos(m*dPhiPair-n*dReactionPlane),1.);
+ fPairCorrelatorVsPtSumDiff[1][1]->Fill(dPtDiff,TMath::Sin(m*dPhiPair-n*dReactionPlane),1.);
} // end of for(Int_t j=i+1;j<iNumberOfTracks;j++)
} // end of for(Int_t i=0;i<iNumberOfTracks;i++)
-} // end of void AliFlowAnalysisWithMCEventPlane::FlowOfResonances()
+} // end of void AliFlowAnalysisWithMCEventPlane::EvaluateMixedHarmonics()
+
void SetHarmonic(Int_t const harmonic) {this->fHarmonic = harmonic;};
Int_t GetHarmonic() const {return this->fHarmonic;};
- // flow of resonances:
+ // mixed harmonics:
// a) methods:
- virtual void BookObjectsForFlowOfResonances();
- virtual void FlowOfResonances(AliFlowEventSimple* anEvent);
+ virtual void InitalizeArraysForMixedHarmonics();
+ virtual void BookObjectsForMixedHarmonics();
+ virtual void EvaluateMixedHarmonics(AliFlowEventSimple* anEvent);
+ virtual void GetOutputHistoramsForMixedHarmonics(TList *mixedHarmonicsList);
// b) setters and getters:
- void SetResonanceList(TList* const rl) {this->fResonanceList = rl;}
- TList* GetResonanceList() const {return this->fResonanceList;}
- void SetFlowOfResonances(Bool_t const ffor) {this->fFlowOfResonances = ffor;};
- Bool_t GetFlowOfResonances() const {return this->fFlowOfResonances;};
- void SetResonanceSettings(TProfile* const rs) {this->fResonanceSettings = rs;};
- TProfile* GetResonanceSettings() const {return this->fResonanceSettings;};
+ void SetMixedHarmonicsList(TList* const mhl) {this->fMixedHarmonicsList = mhl;}
+ TList* GetMixedHarmonicsList() const {return this->fMixedHarmonicsList;}
+ void SetEvaluateMixedHarmonics(Bool_t const emh) {this->fEvaluateMixedHarmonics = emh;};
+ Bool_t GetEvalauteMixedHarmonics() const {return this->fEvaluateMixedHarmonics;};
+ void SetMixedHarmonicsSettings(TProfile* const mhs) {this->fMixedHarmonicsSettings = mhs;};
+ TProfile* GetMixedHarmonicsSettings() const {return this->fMixedHarmonicsSettings;};
void SetPairCorrelator(TProfile* const spc, Int_t const cs) {this->fPairCorrelator[cs] = spc;};
- TProfile* GetPairCorrelator(Int_t cs) const {return this->fPairCorrelator[cs];};
+ TProfile* GetPairCorrelator(Int_t const cs) const {return this->fPairCorrelator[cs];};
+ void SetPairCorrelatorVsM(TProfile* const spcVsM, Int_t const cs) {this->fPairCorrelatorVsM[cs] = spcVsM;};
+ TProfile* GetPairCorrelatorVsM(Int_t const cs) const {return this->fPairCorrelatorVsM[cs];};
+ void SetnBinsMult(Int_t const nbm) {this->fnBinsMult = nbm;};
+ Int_t GetnBinsMult() const {return this->fnBinsMult;};
+ void SetMinMult(Double_t const minm) {this->fMinMult = minm;};
+ Double_t GetMinMult() const {return this->fMinMult;};
+ void SetMaxMult(Double_t const maxm) {this->fMaxMult = maxm;};
+ Double_t GetMaxMult() const {return this->fMaxMult;};
+ void SetPairCorrelatorVsPtSumDiff(TProfile* const spcVspsd, Int_t const cs, Int_t const sd) {this->fPairCorrelatorVsPtSumDiff[cs][sd] = spcVspsd;};
+ TProfile* GetPairCorrelatorVsPtSumDiff(Int_t const cs, Int_t const sd) const {return this->fPairCorrelatorVsPtSumDiff[cs][sd];};
+ void SetNinCorrelator(Int_t const n) {this->fNinCorrelator = n;};
+ Int_t GetNinCorrelator() const {return this->fNinCorrelator;};
+ void SetMinCorrelator(Int_t const m) {this->fMinCorrelator = m;};
+ Int_t GetMinCorrelator() const {return this->fMinCorrelator;};
void SetXinPairAngle(Double_t const xipa) {this->fXinPairAngle = xipa;};
Double_t GetXinPairAngle() const {return this->fXinPairAngle;};
TH1D* fHistSpreadOfFlow; // histogram filled with reference flow calculated e-b-e
Int_t fHarmonic; // harmonic
- // objects needed for a study of flow of resonances (and in addition for strong parity violation):
- TList *fResonanceList; // list to hold all objects relevant for a study of flow of resonances
- Bool_t fFlowOfResonances; // evaluate and store objects relevant for study of flow of resonances
- TProfile *fResonanceSettings; // profile used to hold all flags relevant for the flow of resonances
- TProfile *fPairCorrelator[2]; // profiles used to calculate <cos[n(phi_{pair}-RP)]> and <sin[n(phi_{pair}-RP)]> (0 = cos, 1 = sin), where phi_{pair} = x*phi1+(1-x)*phi2
+ // mixed harmonics:
+ TList *fMixedHarmonicsList; // list to hold all objects relevant for mixed harmonics
+ Bool_t fEvaluateMixedHarmonics; // evaluate and store objects relevant for mixed harmonics
+ TProfile *fMixedHarmonicsSettings; // profile used to hold all flags relevant for the mixed harmonics
+ TProfile *fPairCorrelator[2]; // profiles used to calculate <cos[m*phi_{pair}-n*RP]> and <sin[m*phi_{pair}-n*RP]> (0 = cos, 1 = sin), where phi_{pair} = x*phi1+(1-x)*phi2
+ TProfile *fPairCorrelatorVsM[2]; // <cos[m*phi_{pair}-n*RP]> and <sin[m*phi_{pair}-n*RP]> versus multiplicity (0 = cos, 1 = sin), where phi_{pair} = x*phi1+(1-x)*phi2
+ Int_t fnBinsMult; // number of multiplicity bins for mixed harmonics analysis versus multiplicity
+ Double_t fMinMult; // minimal multiplicity for mixed harmonics analysis versus multiplicity
+ Double_t fMaxMult; // maximal multiplicity for mixed harmonics analysis versus multiplicity
+ TProfile *fPairCorrelatorVsPtSumDiff[2][2]; // <cos/sin[m*phi_{pair}-n*RP]> vs (1/2)(pt1+pt2) (0) and |pt1-pt2| (1), where phi_{pair} = x*phi1+(1-x)*phi2
+ Int_t fNinCorrelator; // n in <cos[m*phi_{pair}-n*RP]> and <sin[m*phi_{pair}-n*RP]>, where phi_{pair} = x*phi1+(1-x)*phi2
+ Int_t fMinCorrelator; // m in <cos[m*phi_{pair}-n*RP]> and <sin[m*phi_{pair}-n*RP]>, where phi_{pair} = x*phi1+(1-x)*phi2
Double_t fXinPairAngle; // x in definition phi_{pair} = x*phi1+(1-x)*phi2
ClassDef(AliFlowAnalysisWithMCEventPlane,0) // Analyse particle distribution versus MC reaction plane
- };
+
+ };
#endif