* copies and that both the copyright notice and this permission notice *
* appear in the supporting documentation. The authors make no claims *
* about the suitability of this software for any purpose. It is *
-* provided "as is" without express or implied warranty. *
+* provided "as is" without express or implied warranty. *
**************************************************************************/
////////////////////////////////////////////////////
//
// analysis task for filling the flow event
// from MCEvent, ESD, AOD ....
-// and put it in an output stream so it can
-// be used by the various flow analysis methods
+// and put it in an output stream so it can
+// be used by the various flow analysis methods
// for cuts the correction framework is used
// which also outputs QA histograms to view
// the effects of the cuts
#include "AliGenEposEventHeader.h"
// Interface to make the Flow Event Simple used in the flow analysis methods
-#include "AliFlowEventSimple.h"
-#include "AliFlowEventSimpleMaker.h"
+#include "AliFlowEvent.h"
#include "AliAnalysisTaskFlowEvent.h"
ClassImp(AliAnalysisTaskFlowEvent)
-
+
//________________________________________________________________________
-AliAnalysisTaskFlowEvent::AliAnalysisTaskFlowEvent() :
- AliAnalysisTaskSE(),
+AliAnalysisTaskFlowEvent::AliAnalysisTaskFlowEvent() :
+ AliAnalysisTaskSE(),
// fOutputFile(NULL),
- fEventMaker(NULL),
fAnalysisType("ESD"),
fCFManager1(NULL),
fCFManager2(NULL),
}
//________________________________________________________________________
-AliAnalysisTaskFlowEvent::AliAnalysisTaskFlowEvent(const char *name, Bool_t on, UInt_t iseed) :
- AliAnalysisTaskSE(name),
-// fOutputFile(NULL),
- fEventMaker(NULL),
+AliAnalysisTaskFlowEvent::AliAnalysisTaskFlowEvent(const char *name, Bool_t on, UInt_t iseed) :
+ AliAnalysisTaskSE(name),
+ // fOutputFile(NULL),
fAnalysisType("ESD"),
fCFManager1(NULL),
fCFManager2(NULL),
{
// Constructor
cout<<"AliAnalysisTaskFlowEvent::AliAnalysisTaskFlowEvent(const char *name, Bool_t on, UInt_t iseed)"<<endl;
- fMyTRandom3 = new TRandom3(iseed);
+ fMyTRandom3 = new TRandom3(iseed);
gRandom->SetSeed(fMyTRandom3->Integer(65539));
// Define output slots here
// Define here the flow event output
- DefineOutput(1, AliFlowEventSimple::Class());
- if(on) {
+ DefineOutput(1, AliFlowEventSimple::Class());
+ if(on)
+ {
DefineOutput(2, TList::Class());
- DefineOutput(3, TList::Class()); }
+ DefineOutput(3, TList::Class());
+ }
// and for testing open an output file
// fOutputFile = new TFile("FlowEvents.root","RECREATE");
// Destructor
//
if (fMyTRandom3) delete fMyTRandom3;
- // objects in the output list are deleted
+ // objects in the output list are deleted
// by the TSelector dtor (I hope)
}
//________________________________________________________________________
-void AliAnalysisTaskFlowEvent::UserCreateOutputObjects()
+void AliAnalysisTaskFlowEvent::UserCreateOutputObjects()
{
// Called at every worker node to initialize
cout<<"AliAnalysisTaskFlowEvent::CreateOutputObjects()"<<endl;
- if (!(fAnalysisType == "AOD" || fAnalysisType == "ESD" || fAnalysisType == "ESDMC0" || fAnalysisType == "ESDMC1" || fAnalysisType == "MC")) {
- cout<<"WRONG ANALYSIS TYPE! only ESD, ESDMC0, ESDMC1, AOD and MC are allowed."<<endl;
+ if (!(fAnalysisType == "AOD" || fAnalysisType == "ESD" || fAnalysisType == "ESDMCkineESD" || fAnalysisType == "ESDMCkineMC" || fAnalysisType == "MC"))
+ {
+ cout<<"WRONG ANALYSIS TYPE! only ESD, ESDMCkineESD, ESDMCkineMC, AOD and MC are allowed."<<endl;
exit(1);
}
-
- // Flow Event maker
- fEventMaker = new AliFlowEventSimpleMaker();
}
//________________________________________________________________________
-void AliAnalysisTaskFlowEvent::UserExec(Option_t *)
+void AliAnalysisTaskFlowEvent::UserExec(Option_t *)
{
// Main loop
// Called for each event
- AliFlowEventSimple* fEvent = NULL;
- Double_t fRP = 0.; // the monte carlo reaction plane angle
- AliMCEvent* mcEvent = fMCEvent; // from TaskSE
- AliESDEvent* myESD = dynamic_cast<AliESDEvent*>(fInputEvent); // from TaskSE
- AliAODEvent* myAOD = dynamic_cast<AliAODEvent*>(fInputEvent); // from TaskSE
-
- // if monte carlo event get reaction plane from monte carlo (depends on generator)
- if (mcEvent && mcEvent-> GenEventHeader()) {
-
- //COCKTAIL with HIJING
- if (!strcmp(mcEvent-> GenEventHeader()->GetName(),"Cocktail Header")) { //returns 0 if matches
- AliGenCocktailEventHeader *headerC = dynamic_cast<AliGenCocktailEventHeader *> (mcEvent-> GenEventHeader());
- if (headerC) {
- TList *lhd = headerC->GetHeaders();
- if (lhd) {
- AliGenHijingEventHeader *hdh = dynamic_cast<AliGenHijingEventHeader *> (lhd->At(0));
- if (hdh) {
- fRP = hdh->ReactionPlaneAngle();
- fEventMaker->SetMCReactionPlaneAngle(fRP);
- //cout<<"The reactionPlane from Hijing is: "<< fRP <<endl;
- }
- }
- }
- //else { cout<<"headerC is NULL"<<endl; }
- }
-
- //GEVSIM
- else if (!strcmp(mcEvent-> GenEventHeader()->GetName(),"GeVSim header")) { //returns 0 if matches
- AliGenGeVSimEventHeader* headerG = (AliGenGeVSimEventHeader*)(mcEvent->GenEventHeader());
- if (headerG) {
- fRP = headerG->GetEventPlane();
- fEventMaker->SetMCReactionPlaneAngle(fRP);
- //cout<<"The reactionPlane from GeVSim is: "<< fRP <<endl;
- }
- //else { cout<<"headerG is NULL"<<endl; }
- }
-
- //HIJING
- else if (!strcmp(mcEvent-> GenEventHeader()->GetName(),"Hijing")) { //returns 0 if matches
- AliGenHijingEventHeader* headerH = (AliGenHijingEventHeader*)(mcEvent->GenEventHeader());
- if (headerH) {
- fRP = headerH->ReactionPlaneAngle();
- fEventMaker->SetMCReactionPlaneAngle(fRP);
- //cout<<"The reactionPlane from Hijing is: "<< fRP <<endl;
- }
- //else { cout<<"headerH is NULL"<<endl; }
- }
-
- //EPOS
- else if (!strcmp(mcEvent->GenEventHeader()->GetName(),"EPOS")) {
- AliGenEposEventHeader* headerE = (AliGenEposEventHeader*)(mcEvent->GenEventHeader());
- if (headerE) {
- fRP = headerE->ReactionPlaneAngle();
- fEventMaker->SetMCReactionPlaneAngle(fRP);
- //cout<<"The reactionPlane from EPOS is: "<< fR <<endl;
- }
- //else { cout<<"headerE is NULL"<<endl; }
- }
- }
-
- //setting event cuts
- fEventMaker->SetMinMult(fMinMult);
- fEventMaker->SetMaxMult(fMaxMult);
- //setting ranges for eta subevents
- fEventMaker->SetSubeventEtaRange(fMinA,fMaxA,fMinB,fMaxB);
-
- //TODO
- if (fbAfterburnerOn && fMyTRandom3) {
- // set the new value of the values using a after burner
- cout << "settings for afterburner in TaskFlowEvent.cxx:" << endl;
- cout << "fCount = " << fCount << endl;
- cout << "fNoOfLoops = " << fNoOfLoops << endl;
- cout << "fEllipticFlowValue = " << fEllipticFlowValue << endl;
- cout << "fSigmaEllipticFlowValue = " << fSigmaEllipticFlowValue << endl;
- cout << "fMultiplicityOfEvent = " << fMultiplicityOfEvent << endl;
- cout << "fSigmaMultiplicityOfEvent = " << fSigmaMultiplicityOfEvent << endl;
- Double_t xRPangle;
- if (!mcEvent) { xRPangle = TMath::TwoPi()*(fMyTRandom3->Rndm()); }
- else { xRPangle = fRP; }
- Double_t xNewFlowValue = fMyTRandom3->Gaus(fEllipticFlowValue,fSigmaEllipticFlowValue);
- Int_t nNewMultOfEvent = TMath::Nint(fMyTRandom3->Gaus(fMultiplicityOfEvent,fSigmaMultiplicityOfEvent));
-
- cout << "xRPangle = " << xRPangle << endl;
- cout << "xNewFlowValue = " << xNewFlowValue << endl;
- cout << "nNewMultOfEvent = " << nNewMultOfEvent << endl;
- cout << "settings for after burner" << endl;
-
- fEventMaker->SetMCReactionPlaneAngle(xRPangle);
- fEventMaker->SetNoOfLoops(fNoOfLoops);
- fEventMaker->SetEllipticFlowValue(xNewFlowValue);
- fEventMaker->SetMultiplicityOfEvent(nNewMultOfEvent);
- //end settings afterburner
- }
-
- // Fill the FlowEventSimple for MC input
- if (fAnalysisType == "MC") {
- if (!fCFManager1) {cout << "ERROR: No pointer to correction framework cuts! " << endl; return; }
- if (!fCFManager2) {cout << "ERROR: No pointer to correction framework cuts! " << endl; return; }
-
+ AliFlowEvent* flowEvent = NULL;
+ AliMCEvent* mcEvent = MCEvent(); // from TaskSE
+ AliESDEvent* myESD = dynamic_cast<AliESDEvent*>(InputEvent()); // from TaskSE
+ AliAODEvent* myAOD = dynamic_cast<AliAODEvent*>(InputEvent()); // from TaskSE
+
+ // Make the FlowEvent for MC input
+ if (fAnalysisType == "MC")
+ {
// Process MC truth, therefore we receive the AliAnalysisManager and ask it for the AliMCEventHandler
// This handler can return the current MC event
- if (!mcEvent) { Printf("ERROR: Could not retrieve MC event"); return;}
+ if (!(fCFManager1&&fCFManager2))
+ {
+ cout << "ERROR: No pointer to correction framework cuts! " << endl;
+ return;
+ }
+ if (!mcEvent)
+ {
+ Printf("ERROR: Could not retrieve MC event");
+ return;
+ }
fCFManager1->SetMCEventInfo(mcEvent);
fCFManager2->SetMCEventInfo(mcEvent);
-
- // analysis
+
Printf("Number of MC particles: %d", mcEvent->GetNumberOfTracks());
- fEvent = fEventMaker->FillTracks(mcEvent,fCFManager1,fCFManager2);
+ // analysis
+ flowEvent = new AliFlowEvent(mcEvent,fCFManager1,fCFManager2);
}
-
- // Fill the FlowEventSimple for ESD input
- else if (fAnalysisType == "ESD") {
- if (!fCFManager1) {cout << "ERROR: No pointer to correction framework cuts! " << endl; return; }
- if (!fCFManager2) {cout << "ERROR: No pointer to correction framework cuts! " << endl; return; }
-
- if (!myESD) { Printf("ERROR: ESD not available"); return;}
+ // Make the FlowEvent for ESD input
+ else if (fAnalysisType == "ESD")
+ {
+ if (!(fCFManager1&&fCFManager2))
+ {
+ cout << "ERROR: No pointer to correction framework cuts! " << endl;
+ return;
+ }
+ if (!myESD)
+ {
+ Printf("ERROR: ESD not available");
+ return;
+ }
//check the offline trigger (check if the event has the correct trigger)
Printf("There are %d tracks in this event", fInputEvent->GetNumberOfTracks());
- // analysis
- fEvent = fEventMaker->FillTracks(myESD,fCFManager1,fCFManager2);
+ // analysis
+ flowEvent = new AliFlowEvent(myESD,fCFManager1,fCFManager2);
}
- // Fill the FlowEventSimple for ESD input combined with MC info
- else if (fAnalysisType == "ESDMC0" || fAnalysisType == "ESDMC1" ) {
- if (!fCFManager1) {cout << "ERROR: No pointer to correction framework cuts! " << endl; return; }
- if (!fCFManager2) {cout << "ERROR: No pointer to correction framework cuts! " << endl; return; }
-
- if (!myESD) { Printf("ERROR: ESD not available"); return;}
+ // Make the FlowEvent for ESD input combined with MC info
+ else if (fAnalysisType == "ESDMCkineESD" || fAnalysisType == "ESDMCkineMC" )
+ {
+ if (!(fCFManager1&&fCFManager2))
+ {
+ cout << "ERROR: No pointer to correction framework cuts! " << endl;
+ return;
+ }
+ if (!myESD)
+ {
+ Printf("ERROR: ESD not available");
+ return;
+ }
Printf("There are %d tracks in this event", fInputEvent->GetNumberOfTracks());
-
- if (!mcEvent) {Printf("ERROR: Could not retrieve MC event"); return;}
+
+ if (!mcEvent)
+ {
+ Printf("ERROR: Could not retrieve MC event");
+ return;
+ }
fCFManager1->SetMCEventInfo(mcEvent);
fCFManager2->SetMCEventInfo(mcEvent);
-
- if (fAnalysisType == "ESDMC0") {
- fEvent = fEventMaker->FillTracks(myESD, mcEvent, fCFManager1, fCFManager2, 0); //0 = kine from ESD, 1 = kine from MC
- } else if (fAnalysisType == "ESDMC1") {
- fEvent = fEventMaker->FillTracks(myESD, mcEvent, fCFManager1, fCFManager2, 1); //0 = kine from ESD, 1 = kine from MC
+ if (fAnalysisType == "ESDMCkineESD")
+ {
+ flowEvent = new AliFlowEvent(myESD, mcEvent, AliFlowEvent::kESDkine, fCFManager1, fCFManager2 );
+ }
+ else if (fAnalysisType == "ESDMCkineMC")
+ {
+ flowEvent = new AliFlowEvent(myESD, mcEvent, AliFlowEvent::kMCkine, fCFManager1, fCFManager2 );
}
}
- // Fill the FlowEventSimple for AOD input
- else if (fAnalysisType == "AOD") {
- if (!myAOD) {Printf("ERROR: AOD not available"); return;}
+ // Make the FlowEventSimple for AOD input
+ else if (fAnalysisType == "AOD")
+ {
+ if (!myAOD)
+ {
+ Printf("ERROR: AOD not available");
+ return;
+ }
Printf("There are %d tracks in this event", myAOD->GetNumberOfTracks());
-
- // analysis
- //For the moment don't use CF //AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fOutputAOD,fCFManager1,fCFManager2);
- fEvent = fEventMaker->FillTracks(myAOD);
+ flowEvent = new AliFlowEvent(myAOD);
}
+ //check event cuts
+ Int_t mult = flowEvent->NumberOfTracks();
+ if (mult<fMinMult && mult>fMaxMult) return;
+
+ //tag subevents
+ flowEvent->TagSubeventsInEta(fMinA,fMaxA,fMinB,fMaxB);
+
+ ////TODO afterburner
+ //if (fbAfterburnerOn && fMyTRandom3) {
+ // // set the new value of the values using a after burner
+ // cout << "settings for afterburner in TaskFlowEvent.cxx:" << endl;
+ // cout << "fCount = " << fCount << endl;
+ // cout << "fNoOfLoops = " << fNoOfLoops << endl;
+ // cout << "fEllipticFlowValue = " << fEllipticFlowValue << endl;
+ // cout << "fSigmaEllipticFlowValue = " << fSigmaEllipticFlowValue << endl;
+ // cout << "fMultiplicityOflowEvent = " << fMultiplicityOflowEvent << endl;
+ // cout << "fSigmaMultiplicityOflowEvent = " << fSigmaMultiplicityOflowEvent << endl;
+ // Double_t xRPangle;
+ // if (!mcEvent) { xRPangle = TMath::TwoPi()*(fMyTRandom3->Rndm()); }
+ // else { xRPangle = fRP; }
+ // Double_t xNewFlowValue = fMyTRandom3->Gaus(fEllipticFlowValue,fSigmaEllipticFlowValue);
+ // Int_t nNewMultOflowEvent = TMath::Nint(fMyTRandom3->Gaus(fMultiplicityOflowEvent,fSigmaMultiplicityOflowEvent));
+ // cout << "xRPangle = " << xRPangle << endl;
+ // cout << "xNewFlowValue = " << xNewFlowValue << endl;
+ // cout << "nNewMultOflowEvent = " << nNewMultOflowEvent << endl;
+ // cout << "settings for after burner" << endl;
+ // flowEventMaker->SetMCReactionPlaneAngle(xRPangle);
+ // flowEventMaker->SetNoOfLoops(fNoOfLoops);
+ // flowEventMaker->SetEllipticFlowValue(xNewFlowValue);
+ // flowEventMaker->SetMultiplicityOflowEvent(nNewMultOflowEvent);
+ // //end settings afterburner
+ //}
+
+ // if monte carlo event get reaction plane from monte carlo (depends on generator)
+ if (mcEvent && mcEvent->GenEventHeader()) flowEvent->SetMCReactionPlaneAngle(mcEvent);
+
//fListHistos->Print();
- // fOutputFile->WriteObject(fEvent,"myFlowEventSimple");
- PostData(1,fEvent);
- if (fQA) {
+ // fOutputFile->WriteObject(flowEvent,"myFlowEventSimple");
+ PostData(1,flowEvent);
+ if (fQA)
+ {
PostData(2,fQAInt);
- PostData(3,fQADiff); }
-}
+ PostData(3,fQADiff);
+ }
+}
//________________________________________________________________________
-void AliAnalysisTaskFlowEvent::Terminate(Option_t *)
+void AliAnalysisTaskFlowEvent::Terminate(Option_t *)
{
// Called once at the end of the query -- do not call in case of CAF
-
}
Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
- //loop over tracks
- for (Int_t itrkN=0; itrkN<iNumberOfInputTracks; itrkN++)
+ //loop over tracks
+ for (Int_t itrkN=0; itrkN<iNumberOfInputTracks; itrkN++)
+ {
+ //get input particle
+ AliMCParticle* pParticle = dynamic_cast<AliMCParticle*>(anInput->GetTrack(itrkN));
+ if (!pParticle) continue;
+
+ //check if pParticle passes the cuts
+ Bool_t rpOK = kTRUE;
+ Bool_t poiOK = kTRUE;
+ if (intCFManager && diffCFManager)
{
- //get input particle
- AliMCParticle* pParticle = dynamic_cast<AliMCParticle*>(anInput->GetTrack(itrkN));
- if (!pParticle) continue;
-
- //check if pParticle passes the cuts
- Bool_t rpOK = kTRUE;
- Bool_t poiOK = kTRUE;
- if (intCFManager && diffCFManager)
- {
- rpOK = intCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pParticle);
- poiOK = diffCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pParticle);
- }
- if (!(rpOK||poiOK)) continue;
+ rpOK = intCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pParticle);
+ poiOK = diffCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pParticle);
+ }
+ if (!(rpOK||poiOK)) continue;
- //TODO maybe make a class AliFlowTrack with a constructor from AliVParticle
- AliFlowTrackSimple* pTrack = new AliFlowTrackSimple();
- pTrack->SetEta(pParticle->Eta());
- pTrack->SetPhi(pParticle->Phi());
- pTrack->SetPt(pParticle->Pt());
+ //TODO maybe make a class AliFlowTrack with a constructor from AliVParticle
+ AliFlowTrackSimple* pTrack = new AliFlowTrackSimple();
+ pTrack->SetEta(pParticle->Eta());
+ pTrack->SetPhi(pParticle->Phi());
+ pTrack->SetPt(pParticle->Pt());
- if (rpOK && intCFManager)
- {
- pTrack->SetForRPSelection(kTRUE);
- fEventNSelTracksRP++;
- }
- if (poiOK && diffCFManager)
- {
- pTrack->SetForPOISelection(kTRUE);
- }
+ if (rpOK && intCFManager)
+ {
+ pTrack->SetForRPSelection(kTRUE);
+ fEventNSelTracksRP++;
+ }
+ if (poiOK && diffCFManager)
+ {
+ pTrack->SetForPOISelection(kTRUE);
+ }
- AddTrack(pTrack) ;
- }//for all tracks
+ AddTrack(pTrack) ;
+ }//for all tracks
SetMCReactionPlaneAngle(anInput);
}
//Fills the event from the AOD
Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
- //loop over tracks
+ //loop over tracks
for (Int_t itrkN=0; itrkN<iNumberOfInputTracks; itrkN++)
- {
- AliAODTrack* pParticle = anInput->GetTrack(itrkN); //get input particle
+ {
+ AliAODTrack* pParticle = anInput->GetTrack(itrkN); //get input particle
- //check if pParticle passes the cuts
- Bool_t rpOK = kTRUE;
- Bool_t poiOK = kTRUE;
- if (intCFManager && diffCFManager)
- {
- rpOK = ( intCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) &&
- intCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle));
- poiOK = ( diffCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) &&
- diffCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle));
- }
- if (!(rpOK || poiOK)) continue;
+ //check if pParticle passes the cuts
+ Bool_t rpOK = kTRUE;
+ Bool_t poiOK = kTRUE;
+ if (intCFManager && diffCFManager)
+ {
+ rpOK = ( intCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) &&
+ intCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle));
+ poiOK = ( diffCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) &&
+ diffCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle));
+ }
+ if (!(rpOK || poiOK)) continue;
- //make new AliFlowTrackSimple
- AliFlowTrackSimple* pTrack = new AliFlowTrackSimple();
- pTrack->SetPt(pParticle->Pt() );
- pTrack->SetEta(pParticle->Eta() );
- pTrack->SetPhi(pParticle->Phi() );
+ //make new AliFlowTrackSimple
+ AliFlowTrackSimple* pTrack = new AliFlowTrackSimple();
+ pTrack->SetPt(pParticle->Pt() );
+ pTrack->SetEta(pParticle->Eta() );
+ pTrack->SetPhi(pParticle->Phi() );
- if (rpOK && intCFManager)
- {
- pTrack->SetForRPSelection(kTRUE);
- fEventNSelTracksRP++;
- }
- if (poiOK && diffCFManager)
- {
- pTrack->SetForPOISelection(kTRUE);
- }
- AddTrack(pTrack);
+ if (rpOK && intCFManager)
+ {
+ pTrack->SetForRPSelection(kTRUE);
+ fEventNSelTracksRP++;
}
+ if (poiOK && diffCFManager)
+ {
+ pTrack->SetForPOISelection(kTRUE);
+ }
+ AddTrack(pTrack);
+ }
// if (iSelParticlesRP >= fMinMult && iSelParticlesRP <= fMaxMult)
// {
//loop over ESD tracks
for (Int_t itrkN=0; itrkN<iNumberOfInputTracks; itrkN++)
+ {
+ AliESDtrack* pParticle = anInput->GetTrack(itrkN); //get input particle
+ //get Label
+ Int_t iLabel = pParticle->GetLabel();
+ //match to mc particle
+ AliMCParticle* pMcParticle = (AliMCParticle*) anInputMc->GetTrack(TMath::Abs(iLabel));
+
+ //check
+ if (TMath::Abs(pParticle->GetLabel())!=pMcParticle->Label()) cout<<"pParticle->GetLabel()!=pMcParticle->Label() "<<pParticle->GetLabel()<<" "<<pMcParticle->Label()<<endl;
+
+ //check if pParticle passes the cuts
+ Bool_t rpOK = kTRUE;
+ Bool_t poiOK = kTRUE;
+ if (intCFManager && diffCFManager)
{
- AliESDtrack* pParticle = anInput->GetTrack(itrkN); //get input particle
- //get Label
- Int_t iLabel = pParticle->GetLabel();
- //match to mc particle
- AliMCParticle* pMcParticle = (AliMCParticle*) anInputMc->GetTrack(TMath::Abs(iLabel));
-
- //check
- if (TMath::Abs(pParticle->GetLabel())!=pMcParticle->Label()) cout<<"pParticle->GetLabel()!=pMcParticle->Label() "<<pParticle->GetLabel()<<" "<<pMcParticle->Label()<<endl;
-
- //check if pParticle passes the cuts
- Bool_t rpOK = kTRUE;
- Bool_t poiOK = kTRUE;
- if (intCFManager && diffCFManager)
- {
if(anOption == kESDkine)
{
//cout<<"take the PID from the MC & the kinematics from the ESD"<<endl;
if (diffCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pMcParticle))
poiOK=kTRUE;
}
- }
-
- if (!(rpOK || poiOK)) continue;
+ }
- //make new AliFlowTrackSimple
- AliFlowTrackSimple* pTrack = new AliFlowTrackSimple();
- if(anOption == kESDkine) //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 == kMCkine) //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;
- }
+ if (!(rpOK || poiOK)) continue;
- if (rpOK && intCFManager)
- {
- fEventNSelTracksRP++;
- pTrack->SetForRPSelection();
- }
- if (poiOK && diffCFManager) pTrack->SetForPOISelection();
+ //make new AliFlowTrackSimple
+ AliFlowTrackSimple* pTrack = new AliFlowTrackSimple();
+ if(anOption == kESDkine) //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 == kMCkine) //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;
+ }
- AddTrack(pTrack);
+ if (rpOK && intCFManager)
+ {
+ fEventNSelTracksRP++;
+ pTrack->SetForRPSelection();
}
- SetMCReactionPlaneAngle(anInputMc);
+ if (poiOK && diffCFManager) pTrack->SetForPOISelection();
+
+ AddTrack(pTrack);
+ }
+ SetMCReactionPlaneAngle(anInputMc);
}