#include "AliLog.h"
+using std::cout;
+using std::endl;
ClassImp(AliAnalysisTaskFlowEvent)
//________________________________________________________________________
fV5(0.),
fDifferentialV2(0),
fFlowEvent(NULL),
+ fShuffleTracks(kFALSE),
fMyTRandom3(NULL)
{
// Constructor
fV5(0.),
fDifferentialV2(0),
fFlowEvent(NULL),
+ fShuffleTracks(kFALSE),
fMyTRandom3(NULL)
{
// Constructor
void AliAnalysisTaskFlowEvent::NotifyRun()
{
//at the beginning of each new run
+ if (fCutsRP) fCutsRP->SetRunsMuon(fInputHandler); // XZhang 20120604
+ if (fCutsPOI) fCutsPOI->SetRunsMuon(fInputHandler); // XZhang 20120604
AliESDEvent* fESD = dynamic_cast<AliESDEvent*> (InputEvent());
if (!fESD) return;
cc->SetHistWeightvsPhiMax(fHistWeightvsPhiMax);
cc->SetHistWeightvsPhiMin(fHistWeightvsPhiMin);
- fFlowEvent = new AliFlowEvent(3000);
+ fFlowEvent = new AliFlowEvent(10000);
if (fQAon)
{
if (fAnalysisType == "AUTOMATIC")
{
//check event cuts
- if (InputEvent() && !fCutsEvent->IsSelected(InputEvent())) return;
+ if (InputEvent() && !fCutsEvent->IsSelected(InputEvent(),MCEvent()))
+ return;
//first attach all possible information to the cuts
fCutsRP->SetEvent( InputEvent(), MCEvent() ); //attach event
//fFlowEvent = new AliFlowEvent( fCutsRP, fCutsPOI );
// if (myESD)
- fFlowEvent->SetReferenceMultiplicity(fCutsEvent->GetReferenceMultiplicity(InputEvent()));
+ fFlowEvent->SetReferenceMultiplicity(fCutsEvent->GetReferenceMultiplicity(InputEvent(),mcEvent));
+ fFlowEvent->SetCentrality(fCutsEvent->GetCentrality(InputEvent(),mcEvent));
if (mcEvent && mcEvent->GenEventHeader()) fFlowEvent->SetMCReactionPlaneAngle(mcEvent);
}
for(int iCand=0; iCand!=candidates->GetEntriesFast(); ++iCand ) {
AliFlowCandidateTrack *cand = dynamic_cast<AliFlowCandidateTrack*>(candidates->At(iCand));
if (!cand) continue;
- //printf(" Ⱶ Checking at candidate %d with %d daughters: mass %f\n",iCand,cand->GetNDaughters(),cand->Mass());
+ //printf(" - Checking at candidate %d with %d daughters: mass %f\n",iCand,cand->GetNDaughters(),cand->Mass());
for(int iDau=0; iDau!=cand->GetNDaughters(); ++iDau) {
- //printf(" Ⱶ Daughter %d with fID %d", iDau, cand->GetIDDaughter(iDau) );
+ //printf(" - Daughter %d with fID %d", iDau, cand->GetIDDaughter(iDau) );
for(int iRPs=0; iRPs!=fFlowEvent->NumberOfTracks(); ++iRPs ) {
AliFlowTrack *iRP = dynamic_cast<AliFlowTrack*>(fFlowEvent->GetTrack( iRPs ));
if (!iRP) continue;
h1->Fill(fFlowEvent->GetMCReactionPlaneAngle());
}
+ //do we want to serve shullfed tracks to everybody?
+ fFlowEvent->SetShuffleTracks(fShuffleTracks);
+
+ // associate the mother particles to their daughters in the flow event (if any)
+ fFlowEvent->FindDaughters();
+
//fListHistos->Print();
//fOutputFile->WriteObject(fFlowEvent,"myFlowEventSimple");
PostData(1,fFlowEvent);