AliAnalysisTaskSE(),
// fOutputFile(NULL),
fAnalysisType("ESD"),
+ fRPType("Global"),
fCFManager1(NULL),
fCFManager2(NULL),
fQAInt(NULL),
AliAnalysisTaskSE(name),
// fOutputFile(NULL),
fAnalysisType("ESD"),
+ fRPType("Global"),
fCFManager1(NULL),
fCFManager2(NULL),
fQAInt(NULL),
AliMCEvent* mcEvent = MCEvent(); // from TaskSE
AliESDEvent* myESD = dynamic_cast<AliESDEvent*>(InputEvent()); // from TaskSE
AliAODEvent* myAOD = dynamic_cast<AliAODEvent*>(InputEvent()); // from TaskSE
+ AliMultiplicity* myTracklets = NULL;
+
+ /*test*/ cout<<"(AliAnalysisTaskFlowEvent::UserExec)fRPType = "<<fRPType<<endl;
// Make the FlowEvent for MC input
if (fAnalysisType == "MC")
//make event
flowEvent = new AliFlowEvent(mcEvent,fCFManager1,fCFManager2);
}
+
// Make the FlowEvent for ESD input
else if (fAnalysisType == "ESD")
{
}
//make event
- flowEvent = new AliFlowEvent(myESD,fCFManager1,fCFManager2);
+ if (fRPType == "Global") {
+ flowEvent = new AliFlowEvent(myESD,fCFManager1,fCFManager2);
+ }
+ else if (fRPType == "Tracklet"){
+ flowEvent = new AliFlowEvent(myESD,myTracklets,fCFManager2);
+ }
+ // if monte carlo event get reaction plane from monte carlo (depends on generator)
+ if (mcEvent && mcEvent->GenEventHeader()) flowEvent->SetMCReactionPlaneAngle(mcEvent);
}
+
// Make the FlowEvent for ESD input combined with MC info
else if (fAnalysisType == "ESDMCkineESD" || fAnalysisType == "ESDMCkineMC" )
{
AliWarning("FlowEvent cut on multiplicity"); return;
}
- //tag subevents
+ //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(flowEvent,"myFlowEventSimple");
+ //fOutputFile->WriteObject(flowEvent,"myFlowEventSimple");
PostData(1,flowEvent);
if (fQA)
{
void SetAnalysisType(TString type) { this->fAnalysisType = type; }
TString GetAnalysisType() const { return this->fAnalysisType; }
+ void SetRPType(TString rptype) { this->fRPType = rptype; }
+ TString GetRPType() const { return this->fRPType; }
+
void SetMinMult(Int_t multmin) {this->fMinMult = multmin; }
Int_t GetMinMult() const {return this->fMinMult; }
void SetMaxMult(Int_t multmax) {this->fMaxMult = multmax; }
// AliESDEvent* fESD; // ESD object
// AliAODEvent* fAOD; // AOD object
TString fAnalysisType; // can be MC, ESD or AOD
+ TString fRPType; // can be Global or Tracklet
AliCFManager* fCFManager1; // correction framework manager
AliCFManager* fCFManager2; // correction framework manager
TList* fQAInt; // QA histogram list
SetMCReactionPlaneAngle(anInputMc);
}
+//-----------------------------------------------------------------------
+AliFlowEvent::AliFlowEvent( const AliESDEvent* anInput,
+ const AliMultiplicity* anInputTracklets,
+ const AliCFManager* poiCFManager ):
+ AliFlowEventSimple(20)
+{
+
+ //Select the particles of interest from the ESD
+ Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
+
+ //loop over tracks
+ for (Int_t itrkN=0; itrkN<iNumberOfInputTracks; itrkN++)
+ {
+ AliESDtrack* pParticle = anInput->GetTrack(itrkN); //get input particle
+
+ //check if pParticle passes the cuts
+ Bool_t poiOK = kTRUE;
+ if (poiCFManager)
+ {
+ poiOK = ( poiCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) &&
+ poiCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle));
+ }
+ if (!poiOK) continue;
+
+ //make new AliFLowTrack
+ AliFlowTrack* pTrack = new AliFlowTrack();
+ pTrack->SetPt(pParticle->Pt() );
+ pTrack->SetEta(pParticle->Eta() );
+ pTrack->SetPhi(pParticle->Phi() );
+
+ //marking the particles used for the particle of interest (POI) selection:
+ if(poiOK && poiCFManager)
+ {
+ pTrack->SetForPOISelection(kTRUE);
+ pTrack->SetSource(AliFlowTrack::kFromESD);
+ }
+
+ AddTrack(pTrack);
+ }//end of while (itrkN < iNumberOfInputTracks)
+
+ //Select the reference particles from the SPD tracklets
+ anInputTracklets = anInput->GetMultiplicity();
+ Int_t multSPD = anInputTracklets->GetNumberOfTracklets();
+
+ cout << "N tracklets: " << multSPD << endl; //for testing
+
+ //loop over tracklets
+ for (Int_t itracklet=0; itracklet<multSPD; ++itracklet) {
+ Float_t thetaTr= anInputTracklets->GetTheta(itracklet);
+ Float_t phiTr= anInputTracklets->GetPhi(itracklet);
+ // calculate eta
+ Float_t etaTr = -TMath::Log(TMath::Tan(thetaTr/2.));
+
+ //make new AliFLowTrackSimple
+ AliFlowTrack* pTrack = new AliFlowTrack();
+ pTrack->SetPt(0.0);
+ pTrack->SetEta(etaTr);
+ pTrack->SetPhi(phiTr);
+ //marking the particles used for the reference particle (RP) selection:
+ fNumberOfRPs++;
+ pTrack->SetForRPSelection(kTRUE);
+ pTrack->SetSource(AliFlowTrack::kFromTracklet);
+
+ //Add the track to the flowevent
+ AddTrack(pTrack);
+ }
+
+}
+
+
const AliCFManager* poiCFManager=NULL ); //use CF(2x)
AliFlowEvent( const AliESDEvent* anInput,
const AliMultiplicity* anInputTracklets,
- const AliCFManager* poiCFManager ){}
+ const AliCFManager* poiCFManager );
void SetMCReactionPlaneAngle(const AliMCEvent* mcEvent);
/////////////////////////////////////////////////////////////////////////////////////////////
// Define the range for eta subevents (for SP method)
-Double_t minA = -0.9;
+Double_t minA = -2.0;
Double_t maxA = -0.1;
Double_t minB = 0.1;
-Double_t maxB = 0.9;
+Double_t maxB = 2.0;
// use physics selection class
Bool_t UsePhysicsSelection = kTRUE;
//----------For RP selection----------
+// Use Global tracks ("Global") or SPD tracklets ("Tracklet") for the RP selection
+const TString rptype = "Global";
+//const TString rptype = "Tracklet";
+
//KINEMATICS (on generated and reconstructed tracks)
Bool_t UseKineforRP = kTRUE;
const Double_t ptminRP = 0.0;
Bool_t UseKineforPOI = kTRUE;
const Double_t ptminPOI = 0.0;
const Double_t ptmaxPOI = 10.0;
-const Double_t etaminPOI = -0.9;
-const Double_t etamaxPOI = 0.9;
+const Double_t etaminPOI = -0.5;
+const Double_t etamaxPOI = 0.5;
const Int_t chargePOI = 1; //not used
const Bool_t isChargedPOI = kTRUE;
taskFE->SetEllipticFlowValue(ellipticFlow); } //TEST
else {taskFE = new AliAnalysisTaskFlowEvent("TaskFlowEvent",kTRUE); }
taskFE->SetAnalysisType(type);
+ taskFE->SetRPType(rptype); //only for ESD
if (UseMultCut) {
taskFE->SetMinMult(multmin);
taskFE->SetMaxMult(multmax);
taskGFC->SetUsePhiWeights(WEIGHTS[0]);
taskGFC->SetUsePtWeights(WEIGHTS[1]);
taskGFC->SetUseEtaWeights(WEIGHTS[2]);
- // calculation vs multiplicity:
- taskGFC->SetCalculateVsMultiplicity(kFALSE);
- taskGFC->SetnBinsMult(10000);
- taskGFC->SetMinMult(0);
- taskGFC->SetMaxMult(10000);
- // tuning of interpolating parameters:
- taskGFC->SetTuneParameters(kFALSE);
- Double_t r0[10] = {1.8,1.9,2.0,2.1,2.2,2.3,2.4,2.5,2.6,2.7}; // up to 10 values allowed
- for(Int_t r=0;r<10;r++) {taskGFC->SetTuningR0(r0[r],r);}
mgr->AddTask(taskGFC);
}
if (QC){