28 #include "Riostream.h" 36 #include "TTimeStamp.h" 37 #include "AliAODHandler.h" 40 #include "AliAnalysisManager.h" 41 #include "AliAnalysisTaskSE.h" 42 #include "AliESDtrackCuts.h" 45 #include "AliESDEvent.h" 46 #include "AliESDInputHandler.h" 49 #include "AliAODEvent.h" 50 #include "AliAODInputHandler.h" 53 #include "AliMCEventHandler.h" 54 #include "AliMCEvent.h" 57 #include "AliCFManager.h" 60 #include "AliGenCocktailEventHeader.h" 61 #include "AliGenHijingEventHeader.h" 62 #include "AliGenGeVSimEventHeader.h" 63 #include "AliGenEposEventHeader.h" 66 #include "TObjArray.h" 77 #include "AliAODHeader.h" 78 #include "AliAODVertex.h" 79 #include "AliHeader.h" 89 fAnalysisType("AUTOMATIC"),
105 fLoadCandidates(kFALSE),
106 fPassMCeventToCutsObject(kTRUE),
118 fPhiMax(TMath::TwoPi()),
125 fHistWeightvsPhiMin(0.),
126 fHistWeightvsPhiMax(3.),
131 fAfterburnerOn(kFALSE),
132 fNonFlowNumberOfTrackClones(0),
140 fShuffleTracks(kFALSE),
144 AliDebug(2,
"AliAnalysisTaskFlowEvent::AliAnalysisTaskFlowEvent()");
151 fAnalysisType(
"AUTOMATIC"),
158 fCutContainer(new
TList()),
167 fLoadCandidates(bCandidates),
168 fPassMCeventToCutsObject(kTRUE),
180 fPhiMax(TMath::TwoPi()),
187 fHistWeightvsPhiMin(0.),
188 fHistWeightvsPhiMax(3.),
193 fAfterburnerOn(kFALSE),
194 fNonFlowNumberOfTrackClones(0),
202 fShuffleTracks(kFALSE),
206 AliDebug(2,
"AliAnalysisTaskFlowEvent::AliAnalysisTaskFlowEvent(const char *name, Bool_t on, UInt_t iseed)");
210 int availableINslot=1;
212 if (strcmp(RPtype,
"FMD")==0) {
213 DefineInput(availableINslot++, TList::Class());
217 DefineInput(availableINslot, TObjArray::Class());
221 DefineOutput(1, AliFlowEventSimple::Class());
222 DefineOutput(2, TList::Class());
254 Int_t run = fESD->GetRunNumber();
255 AliInfo(Form(
"Stariting run #%i",run));
262 AliDebug(2,
"AliAnalysisTaskFlowEvent::CreateOutputObjects()");
266 AliError(
"WRONG ANALYSIS TYPE! only ESD, ESDMCkineESD, ESDMCkineMC, AOD, MC and AUTOMATIC are allowed.");
299 fQAList->SetName(Form(
"%s QA",GetName()));
303 fQAList->Add(
new TH1F(
"event plane angle",
"event plane angle;angle [rad];",100,0.,TMath::TwoPi()));
315 AliMCEvent* mcEvent = MCEvent();
318 AliMultiplicity* myTracklets = NULL;
319 AliESDPmdTrack* pmdtracks = NULL;
321 int availableINslot=1;
325 AliError(
"cuts not set");
343 AliMCEvent* McEventFake = NULL;
367 AliError(
"ERROR: No pointer to correction framework cuts! ");
372 AliError(
"ERROR: Could not retrieve MC event");
379 AliInfo(Form(
"Number of MC particles: %d", mcEvent->GetNumberOfTracks()));
382 if (!
fCFManager1->CheckEventCuts(AliCFManager::kEvtGenCuts,mcEvent))
384 AliWarning(
"Event does not pass multiplicity cuts");
return;
395 AliError(
"ERROR: No pointer to correction framework cuts!");
400 AliError(
"ERROR: ESD not available");
405 AliInfo(Form(
"ESD has %d tracks", fInputEvent->GetNumberOfTracks()));
408 if (!
fCFManager1->CheckEventCuts(AliCFManager::kEvtRecCuts,myESD))
410 AliWarning(
"Event does not pass multiplicity cuts");
return;
417 else if (
fRPType ==
"TPCOnly") {
420 else if (
fRPType ==
"TPCHybrid") {
423 else if (
fRPType ==
"Tracklet"){
427 TList* dataFMD =
dynamic_cast<TList*
>(GetInputData(availableINslot++));
429 cout<<
" No dataFMD "<<endl;
432 TH2F* histFMD =
dynamic_cast<TH2F*
>(dataFMD->FindObject(
"dNdetadphiHistogramTrVtx"));
434 cout<<
"No histFMD"<<endl;
455 AliError(
"ERROR: No pointer to correction framework cuts! ");
460 AliError(
"ERROR: ESD not available");
463 AliInfo(Form(
"There are %d tracks in this event", fInputEvent->GetNumberOfTracks()));
467 AliError(
"ERROR: Could not retrieve MC event");
475 if (!
fCFManager1->CheckEventCuts(AliCFManager::kEvtRecCuts,myESD))
477 AliWarning(
"Event does not pass multiplicity cuts");
return;
500 AliError(
"ERROR: AOD not available");
503 AliInfo(Form(
"AOD has %d tracks", myAOD->GetNumberOfTracks()));
514 for(
int iCand=0; iCand!=candidates->GetEntriesFast(); ++iCand ) {
548 AliWarning(
"FlowEvent cut on multiplicity");
return;
577 TH1* h1 =
static_cast<TH1*
>(
fQAList->FindObject(
"event plane angle"));
void SetMassMin(Double_t i)
virtual void UserExec(Option_t *option)
Bool_t fPassMCeventToCutsObject
void FindDaughters(Bool_t keepDaughtersInRPselection=kFALSE)
Float_t GetCentrality(AliVEvent *event, AliMCEvent *mcEvent)
AliAnalysisTaskFlowEvent()
Int_t GetNumberOfRPs() const
void AddFlow(Double_t v1, Double_t v2, Double_t v3, Double_t v4, Double_t v5)
Int_t fNonFlowNumberOfTrackClones
Int_t GetReferenceMultiplicity(AliVEvent *event, AliMCEvent *mcEvent)
AliFlowTrackCuts * fCutsRP
void SetNbinsPhi(Int_t i)
void SetPhiMin(Double_t i)
void SetMCReactionPlaneAngle(const AliMCEvent *mcEvent)
void SetHistWeightvsPhiMax(Double_t d)
Double_t fHistWeightvsPhiMin
AliCFManager * fCFManager2
void SetEtaMax(Double_t i)
void SetReferenceMultiplicity(Int_t m)
AliCFManager * fCFManager1
void SetRunsMuon(const AliVEventHandler *eventHandler)
Bool_t InRPSelection() const
virtual ~AliAnalysisTaskFlowEvent()
AliFlowTrack * GetTrack(Int_t i)
AliFlowTrackCuts * fCutsPOI
AliFlowEventCuts * fCutsEvent
void SetForRPSelection(Bool_t b=kTRUE)
Int_t GetNDaughters(void) const
void SetNumberOfRPs(Int_t nr)
virtual void Terminate(Option_t *)
void Fill(AliFlowTrackCuts *rpCuts, AliFlowTrackCuts *poiCuts)
void SetShuffleTracks(Bool_t b)
void CloneTracks(Int_t n)
void SetNbinsEta(Int_t i)
void SetNbinsMult(Int_t i)
void SetMassMax(Double_t i)
static AliFlowCommonConstants * GetMaster()
void SetNbinsMass(Int_t i)
void SetCentrality(Double_t c)
void DefineDeadZone(Double_t etaMin, Double_t etaMax, Double_t phiMin, Double_t phiMax)
void SetMultMax(Double_t i)
Int_t GetIDDaughter(Int_t value) const
void SetPtMax(Double_t i)
void SetEvent(AliVEvent *event, AliMCEvent *mcEvent=NULL)
Bool_t IsSetMCReactionPlaneAngle() const
Double_t fHistWeightvsPhiMax
void SetPhiMax(Double_t i)
void SetEtaMin(Double_t i)
void SetForPOISelection(Bool_t b=kTRUE)
void SetHistWeightvsPhiMin(Double_t d)
void TagSubeventsInEta(Double_t etaMinA, Double_t etaMaxA, Double_t etaMinB, Double_t etaMaxB)
Double_t GetMCReactionPlaneAngle() const
void SetMultMin(Double_t i)
virtual Bool_t IsSelected(TObject *obj, TObject *objmc)
void SetPtMin(Double_t i)
virtual void UserCreateOutputObjects()
void InsertTrack(AliFlowTrack *)
AliFlowEvent * fFlowEvent
Int_t NumberOfTracks() const