fCount(0),
fNoOfLoops(1),
fEllipticFlowValue(0.),
- fMultiplicityOfEvent(1000000000)
+ fMultiplicityOfEvent(1000000000),
+ fMinMult(0),
+ fMaxMult(1000000000)
{
//constructor
}
//destructor
}
+//-----------------------------------------------------------------------
+AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliMCEvent* anInput, AliCFManager* intCFManager, AliCFManager* diffCFManager)
+{
+ //Fills the event from the MC kinematic information
+
+ Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
+
+ if (iNumberOfInputTracks==-1) {
+ cout<<"Skipping Event -- No MC information available for this event"<<endl;
+ return 0;
+ }
+
+ Int_t iN = iNumberOfInputTracks; //maximum number of tracks in AliFlowEventSimple
+ Int_t iGoodTracks = 0; //number of good tracks
+ Int_t itrkN = 0; //track counter
+ Int_t iSelParticlesPOI = 0; //number of tracks selected for Diff
+ Int_t iSelParticlesRP = 0; //number of tracks selected for Int
+
+ // cut on the multiplicity
+ if (intCFManager->CheckEventCuts(AliCFManager::kEvtGenCuts,anInput)) {
+ // cout<<"iNumberOfInputTracks = "<<iNumberOfInputTracks<<endl;
+ // create an AliFlowEventSimple
+ AliFlowEventSimple* pEvent = new AliFlowEventSimple(10);
+
+ //loop over tracks
+ while (iGoodTracks < iN && itrkN < iNumberOfInputTracks) {
+ //get input particle
+ AliMCParticle* pParticle = anInput->GetTrack(itrkN);
+ //make new AliFlowTrackSimple
+ AliFlowTrackSimple* pTrack = new AliFlowTrackSimple();
+ pTrack->SetPt(pParticle->Pt() );
+ pTrack->SetEta(pParticle->Eta() );
+ pTrack->SetPhi(pParticle->Phi() );
+
+ //check if pParticle passes the cuts
+ if (intCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pParticle)) {
+ pTrack->SetForRPSelection(kTRUE);
+ //cout<<"integrated selection. PID = "<<pParticle->Particle()->GetPdgCode()<<endl;
+ }
+ if (diffCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pParticle)) {
+ pTrack->SetForPOISelection(kTRUE);
+ //cout<<"differential selection. PID = "<<pParticle->Particle()->GetPdgCode()<<endl;
+ }
+
+ //check if any bits are set
+ TBits bFlowBits = pTrack->GetFlowBits();
+ if (bFlowBits.CountBits() ==0) {
+ delete pTrack; } //track will not be used anymore
+ else {
+ pEvent->TrackCollection()->Add(pTrack) ;
+ iGoodTracks++;
+
+ if (pTrack->InRPSelection())
+ { iSelParticlesRP++; }
+ if (pTrack->InPOISelection())
+ { iSelParticlesPOI++; }
+ }
+
+ itrkN++;
+ }
+
+ pEvent-> SetEventNSelTracksRP(iSelParticlesRP);
+ pEvent-> SetNumberOfTracks(iGoodTracks);
+ pEvent->SetMCReactionPlaneAngle(fMCReactionPlaneAngle);
+
+ if (iSelParticlesRP >= fMinMult && iSelParticlesRP <= fMaxMult) {
+ if ( (++fCount % 100) == 0) {
+ if (!fMCReactionPlaneAngle == 0) cout<<" MC Reaction Plane Angle = "<< fMCReactionPlaneAngle << endl;
+ else cout<<" MC Reaction Plane Angle = unknown "<< endl;
+ cout<<" iGoodTracks = "<<iGoodTracks<<endl;
+ cout<<" # of RP selected tracks = "<<iSelParticlesRP<<endl;
+ cout<<" # of POI selected tracks = "<<iSelParticlesPOI<<endl;
+ cout << "# " << fCount << " events processed" << endl;
+ }
+ return pEvent;
+ }
+ else {
+ cout<<"Not enough tracks in the FlowEventSimple"<<endl;
+ return 0;
+ }
+ }
+ else {
+ cout<<"Event does not pass multiplicity cuts"<<endl;
+ return 0;
+ }
+
+}
+
+//-----------------------------------------------------------------------
+AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, AliCFManager* intCFManager, AliCFManager* diffCFManager)
+{
+ //Fills the event from the ESD
+
+ //flags for particles passing int. and diff. flow cuts
+ Bool_t bPassedRPFlowCuts = kFALSE;
+ Bool_t bPassedPOIFlowCuts = kFALSE;
+
+ Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
+
+ Int_t iGoodTracks = 0; //number of good tracks
+ Int_t itrkN = 0; //track counter
+ Int_t iSelParticlesRP = 0; //number of tracks selected for Int
+ Int_t iSelParticlesPOI = 0; //number of tracks selected for Diff
+
+ // cut on the multiplicity
+ if (intCFManager->CheckEventCuts(AliCFManager::kEvtRecCuts,anInput)) {
+ // cout<<"iNumberOfInputTracks = "<<iNumberOfInputTracks<<endl;
+ // create an AliFlowEventSimple
+ AliFlowEventSimple* pEvent = new AliFlowEventSimple(10);
+
+ //loop over tracks
+ while (itrkN < iNumberOfInputTracks) {
+ AliESDtrack* pParticle = anInput->GetTrack(itrkN); //get input particle
+
+ //check if pParticle passes the cuts
+ if (intCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) &&
+ intCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle)) {
+ bPassedRPFlowCuts = kTRUE;
+ }
+ if (diffCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) &&
+ diffCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle)) {
+ bPassedPOIFlowCuts = kTRUE;
+ }
+
+ if (bPassedRPFlowCuts || bPassedPOIFlowCuts) {
+ //make new AliFLowTrackSimple
+ AliFlowTrackSimple* pTrack = new AliFlowTrackSimple();
+ pTrack->SetPt(pParticle->Pt() );
+ pTrack->SetEta(pParticle->Eta() );
+ pTrack->SetPhi(pParticle->Phi() );
+
+ //marking the particles used for int. flow:
+ if(bPassedRPFlowCuts) {
+ pTrack->SetForRPSelection(kTRUE);
+ iSelParticlesRP++;
+ }
+ //marking the particles used for diff. flow:
+ if(bPassedPOIFlowCuts) {
+ pTrack->SetForPOISelection(kTRUE);
+ iSelParticlesPOI++;
+ }
+ //adding a particles which were used either for int. or diff. flow to the list
+ pEvent->TrackCollection()->Add(pTrack);
+ iGoodTracks++;
+ }//end of if(bPassedIntFlowCuts || bPassedDiffFlowCuts)
+ itrkN++;
+ bPassedRPFlowCuts = kFALSE;
+ bPassedPOIFlowCuts = kFALSE;
+ }//end of while (itrkN < iNumberOfInputTracks)
+
+ pEvent->SetEventNSelTracksRP(iSelParticlesRP);
+ pEvent->SetNumberOfTracks(iGoodTracks);
+ pEvent->SetMCReactionPlaneAngle(fMCReactionPlaneAngle);
+
+
+ if (iSelParticlesRP >= fMinMult && iSelParticlesRP <= fMaxMult) {
+ if ( (++fCount % 100) == 0) {
+ if (!fMCReactionPlaneAngle == 0) cout<<" MC Reaction Plane Angle = "<< fMCReactionPlaneAngle << endl;
+ else cout<<" MC Reaction Plane Angle = unknown "<< endl;
+ cout<<" iGoodTracks = "<<iGoodTracks<<endl;
+ cout<<" # of RP selected tracks = "<<iSelParticlesRP<<endl;
+ cout<<" # of POI selected tracks = "<<iSelParticlesPOI<<endl;
+ cout << "# " << fCount << " events processed" << endl;
+ }
+ return pEvent;
+ }
+ else {
+ cout<<"Not enough tracks in the FlowEventSimple"<<endl;
+ return 0;
+ }
+ }
+ else {
+ cout<<"Event does not pass multiplicity cuts"<<endl;
+ return 0;
+ }
+
+}
+
+//-----------------------------------------------------------------------
+AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliAODEvent* anInput, AliCFManager* intCFManager, AliCFManager* diffCFManager)
+{
+ //Fills the event from the AOD
+
+ Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
+
+ Int_t iN = iNumberOfInputTracks; //maximum number of tracks in AliFlowEventSimple
+ Int_t iGoodTracks = 0; //number of good tracks
+ Int_t itrkN = 0; //track counter
+ Int_t iSelParticlesPOI = 0; //number of tracks selected for Diff
+ Int_t iSelParticlesRP = 0; //number of tracks selected for Int
+
+ // cut on the multiplicity
+ if (intCFManager->CheckEventCuts(AliCFManager::kEvtRecCuts,anInput)) {
+ // cout<<"iNumberOfInputTracks = "<<iNumberOfInputTracks<<endl;
+ // create an AliFlowEventSimple
+ AliFlowEventSimple* pEvent = new AliFlowEventSimple(10);
+
+ //loop over tracks
+ while (iGoodTracks < iN && itrkN < iNumberOfInputTracks) {
+ AliAODTrack* pParticle = anInput->GetTrack(itrkN); //get input particle
+ //make new AliFlowTrackSimple
+ AliFlowTrackSimple* pTrack = new AliFlowTrackSimple();
+ pTrack->SetPt(pParticle->Pt() );
+ pTrack->SetEta(pParticle->Eta() );
+ pTrack->SetPhi(pParticle->Phi() );
+
+ //check if pParticle passes the cuts
+ if (intCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) &&
+ intCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle)) {
+ pTrack->SetForRPSelection(kTRUE); }
+ if (diffCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) &&
+ diffCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle)) {
+ pTrack->SetForPOISelection(kTRUE);}
+
+
+ //check if any bits are set
+ TBits bFlowBits = pTrack->GetFlowBits();
+ if (bFlowBits.CountBits() ==0) {
+ delete pTrack; } //track will not be used anymore
+ else {
+ pEvent->TrackCollection()->Add(pTrack) ;
+ iGoodTracks++;
+
+ if (pTrack->InRPSelection())
+ { iSelParticlesRP++; }
+ if (pTrack->InPOISelection())
+ { iSelParticlesPOI++; }
+
+ }
+
+ itrkN++;
+ }
+
+ pEvent-> SetEventNSelTracksRP(iSelParticlesRP);
+ pEvent->SetNumberOfTracks(iGoodTracks);
+ pEvent->SetMCReactionPlaneAngle(fMCReactionPlaneAngle);
+
+ if (iSelParticlesRP >= fMinMult && iSelParticlesRP <= fMaxMult) {
+ if ( (++fCount % 100) == 0) {
+ if (!fMCReactionPlaneAngle == 0) cout<<" MC Reaction Plane Angle = "<< fMCReactionPlaneAngle << endl;
+ else cout<<" MC Reaction Plane Angle = unknown "<< endl;
+ cout<<" iGoodTracks = "<<iGoodTracks<<endl;
+ cout<<" # of RP selected tracks = "<<iSelParticlesRP<<endl;
+ cout<<" # of POI selected tracks = "<<iSelParticlesPOI<<endl;
+ cout << "# " << fCount << " events processed" << endl;
+ }
+ return pEvent;
+ }
+ else {
+ cout<<"Not enough tracks in the FlowEventSimple"<<endl;
+ return 0;
+ }
+ }
+ else {
+ cout<<"Event does not pass multiplicity cuts"<<endl;
+ return 0;
+ }
+
+}
+
+//-----------------------------------------------------------------------
+AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, AliMCEvent* anInputMc, AliCFManager* intCFManager, AliCFManager* diffCFManager, Int_t anOption)
+{
+ //fills the event with tracks from the ESD and kinematics from the MC info via the track label
+
+
+ if (!(anOption ==0 || anOption ==1)) {
+ cout<<"WRONG OPTION IN AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, AliMCEvent* anInputMc, Int_t anOption)"<<endl;
+ exit(1);
+ }
+
+ Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
+
+ Int_t iNumberOfInputTracksMC = anInputMc->GetNumberOfTracks() ;
+ if (iNumberOfInputTracksMC==-1) {
+ cout<<"Skipping Event -- No MC information available for this event"<<endl;
+ return 0;
+ }
+
+ Int_t iN = iNumberOfInputTracks; //maximum number of tracks in AliFlowEventSimple
+ Int_t iGoodTracks = 0; //number of good tracks
+ Int_t itrkN = 0; //track counter
+ Int_t iSelParticlesPOI = 0; //number of tracks selected for Diff
+ Int_t iSelParticlesRP = 0; //number of tracks selected for Int
+
+ // cut on the multiplicity
+ if (intCFManager->CheckEventCuts(AliCFManager::kEvtRecCuts,anInput)) {
+ // cout<<"iNumberOfInputTracks = "<<iNumberOfInputTracks<<endl;
+ // create an AliFlowEventSimple
+ AliFlowEventSimple* pEvent = new AliFlowEventSimple(10);
+
+ //loop over ESD tracks
+ while (iGoodTracks < iN && itrkN < iNumberOfInputTracks) {
+ AliESDtrack* pParticle = anInput->GetTrack(itrkN); //get input particle
+ //get Label
+ Int_t iLabel = pParticle->GetLabel();
+ //match to mc particle
+ AliMCParticle* pMcParticle = anInputMc->GetTrack(TMath::Abs(iLabel));
+
+ //check
+ if (TMath::Abs(pParticle->GetLabel())!=pMcParticle->Label()) cout<<"pParticle->GetLabel()!=pMcParticle->Label() "<<pParticle->GetLabel()<<" "<<pMcParticle->Label()<<endl;
+
+ //make new AliFlowTrackSimple
+ AliFlowTrackSimple* pTrack = new AliFlowTrackSimple();
+ if(anOption == 0) { //take the PID from the MC & the kinematics from the ESD
+ pTrack->SetPt(pParticle->Pt() );
+ pTrack->SetEta(pParticle->Eta() );
+ pTrack->SetPhi(pParticle->Phi() );
+ }
+ else if (anOption == 1) { //take the PID and kinematics from the MC
+ pTrack->SetPt(pMcParticle->Pt() );
+ pTrack->SetEta(pMcParticle->Eta() );
+ pTrack->SetPhi(pMcParticle->Phi() );
+ }
+ else { cout<<"Not a valid option"<<endl; }
+
+ //check if pParticle passes the cuts
+ if(anOption == 0) {
+ //cout<<"take the PID from the MC & the kinematics from the ESD"<<endl;
+ if (intCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pMcParticle,"mcGenCuts1") &&
+ intCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle)) {
+ pTrack->SetForRPSelection(kTRUE); }
+ if (diffCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pMcParticle,"mcGenCuts2") &&
+ diffCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle)) {
+ pTrack->SetForPOISelection(kTRUE);}
+ }
+ else if (anOption == 1) {
+ //cout<<"take the PID and kinematics from the MC"<<endl;
+ if (intCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pMcParticle)) {
+ pTrack->SetForRPSelection(kTRUE); }
+ if (diffCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pMcParticle)) {
+ pTrack->SetForPOISelection(kTRUE);}
+ }
+ else { cout<<"Not a valid option"<<endl; }
+
+ //check if any bits are set
+ TBits bFlowBits = pTrack->GetFlowBits();
+ if (bFlowBits.CountBits() ==0) {
+ delete pTrack; } //track will not be used anymore
+ else {
+ pEvent->TrackCollection()->Add(pTrack) ;
+ iGoodTracks++;
+
+ if (pTrack->InRPSelection())
+ { iSelParticlesRP++; }
+ if (pTrack->InPOISelection())
+ { iSelParticlesPOI++; }
+
+ }
+
+ itrkN++;
+ }
+
+ pEvent->SetEventNSelTracksRP(iSelParticlesRP);
+ pEvent->SetNumberOfTracks(iGoodTracks);
+ pEvent->SetMCReactionPlaneAngle(fMCReactionPlaneAngle);
+
+ if (iSelParticlesRP >= fMinMult && iSelParticlesRP <= fMaxMult) {
+ if ( (++fCount % 100) == 0) {
+ if (!fMCReactionPlaneAngle == 0) cout<<" MC Reaction Plane Angle = "<< fMCReactionPlaneAngle << endl;
+ else cout<<" MC Reaction Plane Angle = unknown "<< endl;
+ cout << " Number of MC input tracks = " << iNumberOfInputTracksMC << endl;
+ cout<<" iGoodTracks = "<<iGoodTracks<<endl;
+ cout<<" # of RP selected tracks = "<<iSelParticlesRP<<endl;
+ cout<<" # of POI selected tracks = "<<iSelParticlesPOI<<endl;
+ cout << "# " << fCount << " events processed" << endl;
+ }
+ return pEvent;
+ }
+ else {
+ cout<<"Not enough tracks in the FlowEventSimple"<<endl;
+ return 0;
+ }
+ }
+ else {
+ cout<<"Event does not pass multiplicity cuts"<<endl;
+ return 0;
+ }
+
+}
+
+//local methods
//-----------------------------------------------------------------------
AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(TTree* anInput, AliFlowTrackSimpleCuts* rpCuts, AliFlowTrackSimpleCuts* poiCuts)
{
}
-
-//-----------------------------------------------------------------------
-AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliMCEvent* anInput, AliCFManager* intCFManager, AliCFManager* diffCFManager)
-{
- //Fills the event from the MC kinematic information
-
- Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
-
- if (iNumberOfInputTracks==-1) {
- cout<<"Skipping Event -- No MC information available for this event"<<endl;
- return 0;
- }
-
- AliFlowEventSimple* pEvent = new AliFlowEventSimple(10);
-
- Int_t iN = iNumberOfInputTracks; //maximum number of tracks in AliFlowEventSimple
- Int_t iGoodTracks = 0; //number of good tracks
- Int_t itrkN = 0; //track counter
- Int_t iSelParticlesPOI = 0; //number of tracks selected for Diff
- Int_t iSelParticlesRP = 0; //number of tracks selected for Int
-
-
- //normal loop
- while (iGoodTracks < iN && itrkN < iNumberOfInputTracks) {
- //get input particle
- AliMCParticle* pParticle = anInput->GetTrack(itrkN);
- //make new AliFlowTrackSimple
- AliFlowTrackSimple* pTrack = new AliFlowTrackSimple();
- pTrack->SetPt(pParticle->Pt() );
- pTrack->SetEta(pParticle->Eta() );
- pTrack->SetPhi(pParticle->Phi() );
-
- //check if pParticle passes the cuts
- if (intCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pParticle)) {
- pTrack->SetForRPSelection(kTRUE);
- //cout<<"integrated selection. PID = "<<pParticle->Particle()->GetPdgCode()<<endl;
- }
- if (diffCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pParticle)) {
- pTrack->SetForPOISelection(kTRUE);
- //cout<<"differential selection. PID = "<<pParticle->Particle()->GetPdgCode()<<endl;
- }
-
- //check if any bits are set
- TBits bFlowBits = pTrack->GetFlowBits();
- if (bFlowBits.CountBits() ==0) {
- delete pTrack; } //track will not be used anymore
- else {
- pEvent->TrackCollection()->Add(pTrack) ;
- iGoodTracks++;
-
- if (pTrack->InRPSelection())
- { iSelParticlesRP++; }
- if (pTrack->InPOISelection())
- { iSelParticlesPOI++; }
- }
-
- itrkN++;
- }
-
- pEvent-> SetEventNSelTracksRP(iSelParticlesRP);
- pEvent-> SetNumberOfTracks(iGoodTracks);
- pEvent->SetMCReactionPlaneAngle(fMCReactionPlaneAngle);
-
- if ( (++fCount % 100) == 0) {
- if (!fMCReactionPlaneAngle == 0) cout<<" MC Reaction Plane Angle = "<< fMCReactionPlaneAngle << endl;
- else cout<<" MC Reaction Plane Angle = unknown "<< endl;
- cout<<" iGoodTracks = "<<iGoodTracks<<endl;
- cout<<" # of RP selected tracks = "<<iSelParticlesRP<<endl;
- cout<<" # of POI selected tracks = "<<iSelParticlesPOI<<endl;
- cout << "# " << fCount << " events processed" << endl;
- }
-
- return pEvent;
-
-}
-
-
//-----------------------------------------------------------------------
AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput)
{
return pEvent;
}
-
-//-----------------------------------------------------------------------
-AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, AliCFManager* intCFManager, AliCFManager* diffCFManager)
-{
- //Fills the event from the ESD
-
- //flags for particles passing int. and diff. flow cuts
- Bool_t bPassedRPFlowCuts = kFALSE;
- Bool_t bPassedPOIFlowCuts = kFALSE;
-
- Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
-
- AliFlowEventSimple* pEvent = new AliFlowEventSimple(10);
-
- Int_t iGoodTracks = 0; //number of good tracks
- Int_t itrkN = 0; //track counter
- Int_t iSelParticlesRP = 0; //number of tracks selected for Int
- Int_t iSelParticlesPOI = 0; //number of tracks selected for Diff
-
- //normal loop
- while (itrkN < iNumberOfInputTracks) {
- AliESDtrack* pParticle = anInput->GetTrack(itrkN); //get input particle
-
- //check if pParticle passes the cuts
- if (intCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) &&
- intCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle)) {
- bPassedRPFlowCuts = kTRUE;
- }
- if (diffCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) &&
- diffCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle)) {
- bPassedPOIFlowCuts = kTRUE;
- }
-
- if (bPassedRPFlowCuts || bPassedPOIFlowCuts) {
- for(Int_t d=0;d<fNoOfLoops;d++) {
- //make new AliFLowTrackSimple
- AliFlowTrackSimple* pTrack = new AliFlowTrackSimple();
- pTrack->SetPt(pParticle->Pt() );
- pTrack->SetEta(pParticle->Eta() );
- pTrack->SetPhi(pParticle->Phi()-fEllipticFlowValue*TMath::Sin(2*(pParticle->Phi()-fMCReactionPlaneAngle)) );
-
- //marking the particles used for int. flow:
- if(bPassedRPFlowCuts && iSelParticlesRP < fMultiplicityOfEvent) {
- pTrack->SetForRPSelection(kTRUE);
- iSelParticlesRP++;
- }
- //marking the particles used for diff. flow:
- if(bPassedPOIFlowCuts && iGoodTracks%fNoOfLoops==0) {
- pTrack->SetForPOISelection(kTRUE);
- iSelParticlesPOI++;
- }
- //adding a particles which were used either for int. or diff. flow to the list
- pEvent->TrackCollection()->Add(pTrack);
- iGoodTracks++;
- }//end of for(Int_t d=0;d<iLoops;d++)
- }//end of if(bPassedIntFlowCuts || bPassedDiffFlowCuts)
- itrkN++;
- bPassedRPFlowCuts = kFALSE;
- bPassedPOIFlowCuts = kFALSE;
- }//end of while (itrkN < iNumberOfInputTracks)
-
- pEvent->SetEventNSelTracksRP(iSelParticlesRP);
- pEvent->SetNumberOfTracks(iGoodTracks);
- pEvent->SetMCReactionPlaneAngle(fMCReactionPlaneAngle);
-
- if ( (++fCount % 100) == 0) {
- if (!fMCReactionPlaneAngle == 0) cout<<" MC Reaction Plane Angle = "<< fMCReactionPlaneAngle << endl;
- else cout<<" MC Reaction Plane Angle = unknown "<< endl;
- cout<<" iGoodTracks = "<<iGoodTracks<<endl;
- cout<<" # of RP selected tracks = "<<iSelParticlesRP<<endl;
- cout<<" # of POI selected tracks = "<<iSelParticlesPOI<<endl;
- cout << "# " << fCount << " events processed" << endl;
- }
-
- return pEvent;
-}
-
//-----------------------------------------------------------------------
AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliAODEvent* anInput)
{
return pEvent;
}
-
-//-----------------------------------------------------------------------
-AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliAODEvent* anInput, AliCFManager* intCFManager, AliCFManager* diffCFManager)
-{
- //Fills the event from the AOD
-
- Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
-
- AliFlowEventSimple* pEvent = new AliFlowEventSimple(10);
-
- Int_t iN = iNumberOfInputTracks; //maximum number of tracks in AliFlowEventSimple
- Int_t iGoodTracks = 0; //number of good tracks
- Int_t itrkN = 0; //track counter
- Int_t iSelParticlesPOI = 0; //number of tracks selected for Diff
- Int_t iSelParticlesRP = 0; //number of tracks selected for Int
-
- //normal loop
- while (iGoodTracks < iN && itrkN < iNumberOfInputTracks) {
- AliAODTrack* pParticle = anInput->GetTrack(itrkN); //get input particle
- //make new AliFlowTrackSimple
- AliFlowTrackSimple* pTrack = new AliFlowTrackSimple();
- pTrack->SetPt(pParticle->Pt() );
- pTrack->SetEta(pParticle->Eta() );
- pTrack->SetPhi(pParticle->Phi() );
-
- //check if pParticle passes the cuts
- if (intCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) &&
- intCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle)) {
- pTrack->SetForRPSelection(kTRUE); }
- if (diffCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) &&
- diffCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle)) {
- pTrack->SetForPOISelection(kTRUE);}
-
- //check if any bits are set
- TBits bFlowBits = pTrack->GetFlowBits();
- if (bFlowBits.CountBits() ==0) {
- delete pTrack; } //track will not be used anymore
- else {
- pEvent->TrackCollection()->Add(pTrack) ;
- iGoodTracks++;
-
- if (pTrack->InRPSelection())
- { iSelParticlesRP++; }
- if (pTrack->InPOISelection())
- { iSelParticlesPOI++; }
-
- }
-
- itrkN++;
- }
-
- pEvent-> SetEventNSelTracksRP(iSelParticlesRP);
- pEvent->SetNumberOfTracks(iGoodTracks);
- pEvent->SetMCReactionPlaneAngle(fMCReactionPlaneAngle);
-
- if ( (++fCount % 100) == 0) {
- if (!fMCReactionPlaneAngle == 0) cout<<" MC Reaction Plane Angle = "<< fMCReactionPlaneAngle << endl;
- else cout<<" MC Reaction Plane Angle = unknown "<< endl;
- cout<<" iGoodTracks = "<<iGoodTracks<<endl;
- cout<<" # of RP selected tracks = "<<iSelParticlesRP<<endl;
- cout<<" # of POI selected tracks = "<<iSelParticlesPOI<<endl;
- cout << "# " << fCount << " events processed" << endl;
- }
-
- return pEvent;
-}
-
//-----------------------------------------------------------------------
AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, AliMCEvent* anInputMc, Int_t anOption)
{
return pEvent;
}
-
-//-----------------------------------------------------------------------
-AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, AliMCEvent* anInputMc, AliCFManager* intCFManager, AliCFManager* diffCFManager, Int_t anOption)
-{
- //fills the event with tracks from the ESD and kinematics from the MC info via the track label
-
-
- if (!(anOption ==0 || anOption ==1)) {
- cout<<"WRONG OPTION IN AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, AliMCEvent* anInputMc, Int_t anOption)"<<endl;
- exit(1);
- }
-
- Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
-
- Int_t iNumberOfInputTracksMC = anInputMc->GetNumberOfTracks() ;
- if (iNumberOfInputTracksMC==-1) {
- cout<<"Skipping Event -- No MC information available for this event"<<endl;
- return 0;
- }
-
- AliFlowEventSimple* pEvent = new AliFlowEventSimple(10);
-
- Int_t iN = iNumberOfInputTracks; //maximum number of tracks in AliFlowEventSimple
- Int_t iGoodTracks = 0; //number of good tracks
- Int_t itrkN = 0; //track counter
- Int_t iSelParticlesPOI = 0; //number of tracks selected for Diff
- Int_t iSelParticlesRP = 0; //number of tracks selected for Int
-
-
- //normal loop
- while (iGoodTracks < iN && itrkN < iNumberOfInputTracks) {
- AliESDtrack* pParticle = anInput->GetTrack(itrkN); //get input particle
- //get Label
- Int_t iLabel = pParticle->GetLabel();
- //match to mc particle
- AliMCParticle* pMcParticle = anInputMc->GetTrack(TMath::Abs(iLabel));
-
- //check
- if (TMath::Abs(pParticle->GetLabel())!=pMcParticle->Label()) cout<<"pParticle->GetLabel()!=pMcParticle->Label() "<<pParticle->GetLabel()<<" "<<pMcParticle->Label()<<endl;
-
- //make new AliFlowTrackSimple
- AliFlowTrackSimple* pTrack = new AliFlowTrackSimple();
- if(anOption == 0) { //take the PID from the MC & the kinematics from the ESD
- pTrack->SetPt(pParticle->Pt() );
- pTrack->SetEta(pParticle->Eta() );
- pTrack->SetPhi(pParticle->Phi() );
- }
- else if (anOption == 1) { //take the PID and kinematics from the MC
- pTrack->SetPt(pMcParticle->Pt() );
- pTrack->SetEta(pMcParticle->Eta() );
- pTrack->SetPhi(pMcParticle->Phi() );
- }
- else { cout<<"Not a valid option"<<endl; }
-
- //check if pParticle passes the cuts
- if(anOption == 0) {
- //cout<<"take the PID from the MC & the kinematics from the ESD"<<endl;
- if (intCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pMcParticle,"mcGenCuts1") &&
- intCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle)) {
- pTrack->SetForRPSelection(kTRUE); }
- if (diffCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pMcParticle,"mcGenCuts2") &&
- diffCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle)) {
- pTrack->SetForPOISelection(kTRUE);}
- }
- else if (anOption == 1) {
- //cout<<"take the PID and kinematics from the MC"<<endl;
- if (intCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pMcParticle)) {
- pTrack->SetForRPSelection(kTRUE); }
- if (diffCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pMcParticle)) {
- pTrack->SetForPOISelection(kTRUE);}
- }
- else { cout<<"Not a valid option"<<endl; }
-
- //check if any bits are set
- TBits bFlowBits = pTrack->GetFlowBits();
- if (bFlowBits.CountBits() ==0) {
- delete pTrack; } //track will not be used anymore
- else {
- pEvent->TrackCollection()->Add(pTrack) ;
- iGoodTracks++;
-
- if (pTrack->InRPSelection())
- { iSelParticlesRP++; }
- if (pTrack->InPOISelection())
- { iSelParticlesPOI++; }
-
- }
-
- itrkN++;
- }
-
- pEvent-> SetEventNSelTracksRP(iSelParticlesRP);
- pEvent->SetNumberOfTracks(iGoodTracks);
- pEvent->SetMCReactionPlaneAngle(fMCReactionPlaneAngle);
-
- if ( (++fCount % 100) == 0) {
- if (!fMCReactionPlaneAngle == 0) cout<<" MC Reaction Plane Angle = "<< fMCReactionPlaneAngle << endl;
- else cout<<" MC Reaction Plane Angle = unknown "<< endl;
- cout << " Number of MC input tracks = " << iNumberOfInputTracksMC << endl;
- cout<<" iGoodTracks = "<<iGoodTracks<<endl;
- cout<<" # of RP selected tracks = "<<iSelParticlesRP<<endl;
- cout<<" # of POI selected tracks = "<<iSelParticlesPOI<<endl;
- cout << "# " << fCount << " events processed" << endl;
- }
-
- return pEvent;
-}
-