#include "AliAnalysisTaskFlowEvent.h"
+#include "AliLog.h"
+
ClassImp(AliAnalysisTaskFlowEvent)
//________________________________________________________________________
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;
+ AliError("WRONG ANALYSIS TYPE! only ESD, ESDMCkineESD, ESDMCkineMC, AOD and MC are allowed.");
exit(1);
}
}
// This handler can return the current MC event
if (!(fCFManager1&&fCFManager2))
{
- cout << "ERROR: No pointer to correction framework cuts! " << endl;
+ AliError("ERROR: No pointer to correction framework cuts! ");
return;
}
if (!mcEvent)
{
- Printf("ERROR: Could not retrieve MC event");
+ AliError("ERROR: Could not retrieve MC event");
return;
}
fCFManager1->SetMCEventInfo(mcEvent);
fCFManager2->SetMCEventInfo(mcEvent);
- Printf("Number of MC particles: %d", mcEvent->GetNumberOfTracks());
- // analysis
+ AliInfo(Form("Number of MC particles: %d", mcEvent->GetNumberOfTracks()));
+
+ //check multiplicity
+ if (!fCFManager1->CheckEventCuts(AliCFManager::kEvtGenCuts,mcEvent))
+ {
+ AliWarning("Event does not pass multiplicity cuts"); return;
+ }
+ //make event
flowEvent = new AliFlowEvent(mcEvent,fCFManager1,fCFManager2);
}
// Make the FlowEvent for ESD input
{
if (!(fCFManager1&&fCFManager2))
{
- cout << "ERROR: No pointer to correction framework cuts! " << endl;
+ AliError("ERROR: No pointer to correction framework cuts!");
return;
}
if (!myESD)
{
- Printf("ERROR: ESD not available");
+ AliError("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
+ AliInfo(Form("There are %d tracks in this event", fInputEvent->GetNumberOfTracks()));
+
+ //check multiplicity
+ if (!fCFManager1->CheckEventCuts(AliCFManager::kEvtRecCuts,myESD))
+ {
+ AliWarning("Event does not pass multiplicity cuts"); return;
+ }
+
+ //make event
flowEvent = new AliFlowEvent(myESD,fCFManager1,fCFManager2);
}
// Make the FlowEvent for ESD input combined with MC info
{
if (!(fCFManager1&&fCFManager2))
{
- cout << "ERROR: No pointer to correction framework cuts! " << endl;
+ AliError("ERROR: No pointer to correction framework cuts! ");
return;
}
if (!myESD)
{
- Printf("ERROR: ESD not available");
+ AliError("ERROR: ESD not available");
return;
}
- Printf("There are %d tracks in this event", fInputEvent->GetNumberOfTracks());
+ AliInfo(Form("There are %d tracks in this event", fInputEvent->GetNumberOfTracks()));
if (!mcEvent)
{
- Printf("ERROR: Could not retrieve MC event");
+ AliError("ERROR: Could not retrieve MC event");
return;
}
fCFManager1->SetMCEventInfo(mcEvent);
fCFManager2->SetMCEventInfo(mcEvent);
+ //check multiplicity
+ if (!fCFManager1->CheckEventCuts(AliCFManager::kEvtRecCuts,myESD))
+ {
+ AliWarning("Event does not pass multiplicity cuts"); return;
+ }
+
+ //make event
if (fAnalysisType == "ESDMCkineESD")
{
flowEvent = new AliFlowEvent(myESD, mcEvent, AliFlowEvent::kESDkine, fCFManager1, fCFManager2 );
{
if (!myAOD)
{
- Printf("ERROR: AOD not available");
+ AliError("ERROR: AOD not available");
return;
}
- Printf("There are %d tracks in this event", myAOD->GetNumberOfTracks());
+ AliInfo(Form("There are %d tracks in this event", myAOD->GetNumberOfTracks()));
flowEvent = new AliFlowEvent(myAOD);
}
- //check event cuts
+ //check final event cuts
Int_t mult = flowEvent->NumberOfTracks();
- if (mult<fMinMult && mult>fMaxMult) return;
+ if (mult<fMinMult && mult>fMaxMult)
+ {
+ AliWarning("FlowEvent cut on multiplicity"); return;
+ }
//tag subevents
flowEvent->TagSubeventsInEta(fMinA,fMaxA,fMinB,fMaxB);
#include "AliFlowTrackSimpleCuts.h"
#include "AliFlowEventSimple.h"
#include "AliFlowEvent.h"
+#include "AliLog.h"
ClassImp(AliFlowEvent)
//fills the event with tracks from the ESD and kinematics from the MC info via the track label
if (anOption==kNoKine)
{
- cout<<"WRONG OPTION IN AliFlowEventMaker::FillTracks(AliESDEvent* anInput, AliMCEvent* anInputMc, KineSource anOption)"<<endl;
+ AliFatal("WRONG OPTION IN AliFlowEventMaker::FillTracks(AliESDEvent* anInput, AliMCEvent* anInputMc, KineSource anOption)");
exit(1);
}
Int_t iNumberOfInputTracksMC = anInputMc->GetNumberOfTracks() ;
if (iNumberOfInputTracksMC==-1)
{
- cout<<"Skipping Event -- No MC information available for this event"<<endl;
+ AliError("Skipping Event -- No MC information available for this event");
return;
}
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;
+ if (TMath::Abs(pParticle->GetLabel())!=pMcParticle->Label())
+ AliWarning(Form("pParticle->GetLabel()!=pMcParticle->Label(), %i, %i", pParticle->GetLabel(), pMcParticle->Label()));
//check if pParticle passes the cuts
Bool_t rpOK = kTRUE;
{
if(anOption == kESDkine)
{
- //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))
rpOK=kTRUE;
}
else if (anOption == kMCkine)
{
- //cout<<"take the PID and kinematics from the MC"<<endl;
if (intCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pMcParticle))
rpOK=kTRUE;
if (diffCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pMcParticle))
pTrack->SetEta(pMcParticle->Eta() );
pTrack->SetPhi(pMcParticle->Phi() );
}
- else
- {
- cout<<"Not a valid option"<<endl;
- }
if (rpOK && intCFManager)
{