**************************************************************************/
/* $Id */
+/////////////////////////////////////////////////////////////////////////
+// AliFlowEventSimpleMaker:
+//
+// Class to fill the AliFlowEventSimple
+// with AliFlowTrackSimple objects
+// Has fill methods for TTree, AliMCEvent, AliESDEvent and AliAODEvent
+// author: N. van der Kolk (kolk@nikhef.nl)
+/////////////////////////////////////////////////////////////////////////
+
+
#include "Riostream.h"
#include "AliFlowEventSimpleMaker.h"
#include "AliFlowEventSimple.h"
#include "AliFlowTrackSimpleCuts.h"
-
-// AliFlowEventSimpleMaker:
-// Class to fill the AliFlowEventSimple
-// with AliFlowTrackSimple objects
-// Has fill methods for TTree, AliMCEvent, AliESDEvent and AliAODEvent
-// author: N. van der Kolk (kolk@nikhef.nl)
-
ClassImp(AliFlowEventSimpleMaker)
//-----------------------------------------------------------------------
AliFlowEventSimpleMaker::AliFlowEventSimpleMaker() :
}
//-----------------------------------------------------------------------
-AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(TTree* anInput, AliFlowTrackSimpleCuts* intCuts, AliFlowTrackSimpleCuts* diffCuts)
+AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(TTree* anInput, AliFlowTrackSimpleCuts* rpCuts, AliFlowTrackSimpleCuts* poiCuts)
{
//fills the event from a TTree of kinematic.root files
Int_t iLoops = 1;
//flags for particles passing int. and diff. flow cuts
- Bool_t bPassedIntFlowCuts = kFALSE;
- Bool_t bPassedDiffFlowCuts = kFALSE;
+ Bool_t bPassedRPFlowCuts = kFALSE;
+ Bool_t bPassedPOIFlowCuts = kFALSE;
//track cut values
- Double_t dPtMaxInt = intCuts->GetPtMax();
- Double_t dPtMinInt = intCuts->GetPtMin();
- Double_t dEtaMaxInt = intCuts->GetEtaMax();
- Double_t dEtaMinInt = intCuts->GetEtaMin();
- Double_t dPhiMaxInt = intCuts->GetPhiMax();
- Double_t dPhiMinInt = intCuts->GetPhiMin();
- Int_t iPIDInt = intCuts->GetPID();
-
- Double_t dPtMaxDiff = diffCuts->GetPtMax();
- Double_t dPtMinDiff = diffCuts->GetPtMin();
- Double_t dEtaMaxDiff = diffCuts->GetEtaMax();
- Double_t dEtaMinDiff = diffCuts->GetEtaMin();
- Double_t dPhiMaxDiff = diffCuts->GetPhiMax();
- Double_t dPhiMinDiff = diffCuts->GetPhiMin();
- Int_t iPIDDiff = diffCuts->GetPID();
+ Double_t dPtMaxRP = rpCuts->GetPtMax();
+ Double_t dPtMinRP = rpCuts->GetPtMin();
+ Double_t dEtaMaxRP = rpCuts->GetEtaMax();
+ Double_t dEtaMinRP = rpCuts->GetEtaMin();
+ Double_t dPhiMaxRP = rpCuts->GetPhiMax();
+ Double_t dPhiMinRP = rpCuts->GetPhiMin();
+ Int_t iPIDRP = rpCuts->GetPID();
+
+ Double_t dPtMaxPOI = poiCuts->GetPtMax();
+ Double_t dPtMinPOI = poiCuts->GetPtMin();
+ Double_t dEtaMaxPOI = poiCuts->GetEtaMax();
+ Double_t dEtaMinPOI = poiCuts->GetEtaMin();
+ Double_t dPhiMaxPOI = poiCuts->GetPhiMax();
+ Double_t dPhiMinPOI = poiCuts->GetPhiMin();
+ Int_t iPIDPOI = poiCuts->GetPID();
Int_t iNumberOfInputTracks = anInput->GetEntries() ;
Int_t iGoodTracks = 0;
Int_t itrkN = 0;
- Int_t iSelParticlesDiff = 0;
- Int_t iSelParticlesInt = 0;
+ Int_t iSelParticlesRP = 0;
+ Int_t iSelParticlesPOI = 0;
+
while (itrkN < iNumberOfInputTracks) {
anInput->GetEntry(itrkN); //get input particle
- //checking the cuts for int. and diff. flow
- if (pParticle->Pt() > dPtMinInt && pParticle->Pt() < dPtMaxInt &&
- pParticle->Eta() > dEtaMinInt && pParticle->Eta() < dEtaMaxInt &&
- pParticle->Phi() > dPhiMinInt && pParticle->Phi() < dPhiMaxInt &&
- TMath::Abs(pParticle->GetPdgCode()) == iPIDInt) {
- bPassedIntFlowCuts = kTRUE;
- }
+ if (pParticle->IsPrimary()) {
+ //checking the cuts for int. and diff. flow
+ if (pParticle->Pt() > dPtMinRP && pParticle->Pt() < dPtMaxRP &&
+ pParticle->Eta() > dEtaMinRP && pParticle->Eta() < dEtaMaxRP &&
+ pParticle->Phi() > dPhiMinRP && pParticle->Phi() < dPhiMaxRP &&
+ TMath::Abs(pParticle->GetPdgCode()) == iPIDRP) {
+ bPassedRPFlowCuts = kTRUE;
+ }
- if (pParticle->Pt() > dPtMinDiff && pParticle->Pt() < dPtMaxDiff &&
- pParticle->Eta() > dEtaMinDiff && pParticle->Eta() < dEtaMaxDiff &&
- pParticle->Phi() > dPhiMinDiff && pParticle->Phi() < dPhiMaxDiff &&
- TMath::Abs(pParticle->GetPdgCode()) == iPIDDiff){
- bPassedDiffFlowCuts = kTRUE;
+ if (pParticle->Pt() > dPtMinPOI && pParticle->Pt() < dPtMaxPOI &&
+ pParticle->Eta() > dEtaMinPOI && pParticle->Eta() < dEtaMaxPOI &&
+ pParticle->Phi() > dPhiMinPOI && pParticle->Phi() < dPhiMaxPOI &&
+ TMath::Abs(pParticle->GetPdgCode()) == iPIDPOI){
+ bPassedPOIFlowCuts = kTRUE;
+ }
}
-
- if (bPassedIntFlowCuts || bPassedDiffFlowCuts) {
+ if (bPassedRPFlowCuts || bPassedPOIFlowCuts) {
for(Int_t d=0;d<iLoops;d++) {
AliFlowTrackSimple* pTrack = new AliFlowTrackSimple();
pTrack->SetPt(pParticle->Pt());
pTrack->SetPhi(pParticle->Phi());
//marking the particles used for int. flow:
- if(bPassedIntFlowCuts && iSelParticlesInt < iN*iLoops) {
+ if(bPassedRPFlowCuts && iSelParticlesRP < iN*iLoops) {
pTrack->SetForRPSelection(kTRUE);
- iSelParticlesInt++;
+ iSelParticlesRP++;
}
//marking the particles used for diff. flow:
- if(bPassedDiffFlowCuts) {
+ if(bPassedPOIFlowCuts) {
pTrack->SetForPOISelection(kTRUE);
- iSelParticlesDiff++;
+ iSelParticlesPOI++;
}
//adding a particles which were used either for int. or diff. flow to the list
pEvent->TrackCollection()->Add(pTrack);
}//end of for(Int_t d=0;d<iLoops;d++)
}//end of if(bPassedIntFlowCuts || bPassedDiffFlowCuts)
itrkN++;
- bPassedIntFlowCuts = kFALSE;
- bPassedDiffFlowCuts = kFALSE;
+ bPassedRPFlowCuts = kFALSE;
+ bPassedPOIFlowCuts = kFALSE;
}//end of while (itrkN < iNumberOfInputTracks)
- pEvent->SetEventNSelTracksRP(iSelParticlesInt);
- pEvent->SetNumberOfTracks(iGoodTracks);//tracks used either for int. or for diff. flow
+ pEvent->SetEventNSelTracksRP(iSelParticlesRP);
+ pEvent->SetNumberOfTracks(iGoodTracks);//tracks used either for RP or for POI selection
pEvent->SetMCReactionPlaneAngle(fMCReactionPlaneAngle);
if (!fMCReactionPlaneAngle == 0) cout<<" MC Reaction Plane Angle = "<< fMCReactionPlaneAngle << endl;
else cout<<" MC Reaction Plane Angle = unknown "<< endl;
cout<<" iGoodTracks = "<< iGoodTracks << endl;
- cout<<" # of selected tracks for int. flow = "<<iSelParticlesInt<<endl;
- cout<<" # of selected tracks for diff. flow = "<<iSelParticlesDiff<<endl;
+ cout<<" # of RP selected tracks = "<<iSelParticlesRP<<endl;
+ cout<<" # of POI selected tracks = "<<iSelParticlesPOI<<endl;
cout << "# " << ++fCount << " events processed" << endl;
delete pParticle;
void SetMCReactionPlaneAngle(Double_t fPhiRP) { this->fMCReactionPlaneAngle = fPhiRP; }
//TTree
- AliFlowEventSimple* FillTracks(TTree* anInput, AliFlowTrackSimpleCuts* intCuts, AliFlowTrackSimpleCuts* diffCuts); //use own cut class
+ AliFlowEventSimple* FillTracks(TTree* anInput, AliFlowTrackSimpleCuts* rpCuts, AliFlowTrackSimpleCuts* poiCuts); //use own cut class
//AliMCEvent
AliFlowEventSimple* FillTracks(AliMCEvent* anInput); //use own cuts
- AliFlowEventSimple* FillTracks(AliMCEvent* anInput, AliCFManager* intCFManager, AliCFManager* diffCFManager ); //use CF(2x)
+ AliFlowEventSimple* FillTracks(AliMCEvent* anInput, AliCFManager* rpCFManager, AliCFManager* poiCFManager ); //use CF(2x)
//AliESDEvent
AliFlowEventSimple* FillTracks(AliESDEvent* anInput); //use own cuts
- AliFlowEventSimple* FillTracks(AliESDEvent* anInput, AliCFManager* intCFManager, AliCFManager* diffCFManager); //use CF(2x)
+ AliFlowEventSimple* FillTracks(AliESDEvent* anInput, AliCFManager* rpCFManager, AliCFManager* poiCFManager); //use CF(2x)
//AliESDEvent & AliMCEvent
AliFlowEventSimple* FillTracks(AliESDEvent* anInput, AliMCEvent* anInputMc, Int_t anOption); //use own cuts
- AliFlowEventSimple* FillTracks(AliESDEvent* anInput, AliMCEvent* anInputMc, AliCFManager* intCFManager, AliCFManager* diffCFManager, Int_t anOption); //use CF(2x)
+ AliFlowEventSimple* FillTracks(AliESDEvent* anInput, AliMCEvent* anInputMc, AliCFManager* rpCFManager, AliCFManager* poiCFManager, Int_t anOption); //use CF(2x)
// anOption = 0 : kine from ESD
// anOption = 1 : kine from MC
//AliAODEvent
AliFlowEventSimple* FillTracks(AliAODEvent* anInput); //use own cuts
- AliFlowEventSimple* FillTracks(AliAODEvent* anInput, AliCFManager* intCFManager, AliCFManager* diffCFManager); //use CF(2x)
+ AliFlowEventSimple* FillTracks(AliAODEvent* anInput, AliCFManager* rpCFManager, AliCFManager* poiCFManager); //use CF(2x)
private:
AliFlowEventSimpleMaker(const AliFlowEventSimpleMaker& anAnalysis); //copy constructor