fESD = esdH->GetEvent();
}
}
- else if (fAnalysisType == "ESD") {
+ else if (fAnalysisType == "ESD" || fAnalysisType == "ESDMC0" || fAnalysisType == "ESDMC1" ) {
tree->SetBranchStatus("*", kFALSE);
tree->SetBranchStatus("Tracks.*", kTRUE);
}
}
else {
- Printf("Wrong analysis type: Only ESD, AOD and MC types are allowed!");
+ Printf("Wrong analysis type: Only ESD, ESDMC0, ESDMC1, AOD and MC types are allowed!");
exit(1);
}
// Called once
cout<<"AliAnalysisTaskLYZEventPlane::CreateOutputObjects()"<<endl;
- if (!(fAnalysisType == "AOD" || fAnalysisType == "ESD" || fAnalysisType == "MC")) {
- cout<<"WRONG ANALYSIS TYPE! only ESD, AOD and MC are allowed."<<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;
exit(1);
}
fLyz->Make(fEvent,fLyzEp);
delete fEvent;
}
+ else if (fAnalysisType == "ESDMC0") {
+ if (!fESD) {
+ Printf("ERROR: fESD not available");
+ return;
+ }
+ Printf("There are %d tracks in this event", fESD->GetNumberOfTracks());
+
+ AliMCEventHandler* eventHandler = dynamic_cast<AliMCEventHandler*> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
+ if (!eventHandler) {
+ Printf("ERROR: Could not retrieve MC event handler");
+ return;
+ }
+
+ AliMCEvent* mcEvent = eventHandler->MCEvent();
+ if (!mcEvent) {
+ Printf("ERROR: Could not retrieve MC event");
+ return;
+ }
+
+ //lee yang zeros analysis
+ AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fESD,mcEvent,0); //0 = kine from ESD, 1 = kine from MC
+ fLyz->Make(fEvent,fLyzEp);
+ delete fEvent;
+ //delete mcEvent;
+ }
+ else if (fAnalysisType == "ESDMC1") {
+ if (!fESD) {
+ Printf("ERROR: fESD not available");
+ return;
+ }
+ Printf("There are %d tracks in this event", fESD->GetNumberOfTracks());
+
+ AliMCEventHandler* eventHandler = dynamic_cast<AliMCEventHandler*> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
+ if (!eventHandler) {
+ Printf("ERROR: Could not retrieve MC event handler");
+ return;
+ }
+
+ AliMCEvent* mcEvent = eventHandler->MCEvent();
+ if (!mcEvent) {
+ Printf("ERROR: Could not retrieve MC event");
+ return;
+ }
+
+ //lee yang zeros analysis
+ AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fESD,mcEvent,1); //0 = kine from ESD, 1 = kine from MC
+ fLyz->Make(fEvent,fLyzEp);
+ delete fEvent;
+ //delete mcEvent;
+ }
else if (fAnalysisType == "AOD") {
if (!fAOD) {
Printf("ERROR: fAOD not available");
fESD = esdH->GetEvent();
}
}
- else if (fAnalysisType == "ESD") {
+ else if (fAnalysisType == "ESD" || fAnalysisType == "ESDMC0" || fAnalysisType == "ESDMC1" ) {
tree->SetBranchStatus("*", kFALSE);
tree->SetBranchStatus("Tracks.*", kTRUE);
}
}
else {
- Printf("Wrong analysis type: Only ESD, AOD and MC types are allowed!");
+ Printf("Wrong analysis type: Only ESD, ESDMC0, ESDMC1, AOD and MC types are allowed!");
}
}
// Called once
cout<<"AliAnalysisTaskLeeYangZeros::CreateOutputObjects()"<<endl;
- if (!(fAnalysisType == "AOD" || fAnalysisType == "ESD" || fAnalysisType == "MC")) {
- cout<<"WRONG ANALYSIS TYPE! only ESD, AOD and MC are allowed."<<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;
exit(1);
}
fLyz->Make(fEvent);
delete fEvent;
}
+ else if (fAnalysisType == "ESDMC0") {
+ if (!fESD) {
+ Printf("ERROR: fESD not available");
+ return;
+ }
+ Printf("There are %d tracks in this event", fESD->GetNumberOfTracks());
+
+ AliMCEventHandler* eventHandler = dynamic_cast<AliMCEventHandler*> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
+ if (!eventHandler) {
+ Printf("ERROR: Could not retrieve MC event handler");
+ return;
+ }
+
+ AliMCEvent* mcEvent = eventHandler->MCEvent();
+ if (!mcEvent) {
+ Printf("ERROR: Could not retrieve MC event");
+ return;
+ }
+
+ //lee yang zeros analysis
+ AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fESD,mcEvent,0); //0 = kine from ESD, 1 = kine from MC
+ fLyz->Make(fEvent);
+ delete fEvent;
+ //delete mcEvent;
+ }
+ else if (fAnalysisType == "ESDMC1") {
+ if (!fESD) {
+ Printf("ERROR: fESD not available");
+ return;
+ }
+ Printf("There are %d tracks in this event", fESD->GetNumberOfTracks());
+
+ AliMCEventHandler* eventHandler = dynamic_cast<AliMCEventHandler*> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
+ if (!eventHandler) {
+ Printf("ERROR: Could not retrieve MC event handler");
+ return;
+ }
+
+ AliMCEvent* mcEvent = eventHandler->MCEvent();
+ if (!mcEvent) {
+ Printf("ERROR: Could not retrieve MC event");
+ return;
+ }
+
+ //lee yang zeros analysis
+ AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fESD,mcEvent,1); //0 = kine from ESD, 1 = kine from MC
+ fLyz->Make(fEvent);
+ delete fEvent;
+ //delete mcEvent;
+ }
else if (fAnalysisType == "AOD") {
if (!fAOD) {
Printf("ERROR: fAOD not available");
Printf("ERROR: Could not read chain from input slot 0");
} else {
// Disable all branches and enable only the needed ones
+
if (fAnalysisType == "MC") {
cout<<"!!!!!reading MC kinematics only"<<endl;
// we want to process only MC
fESD = esdH->GetEvent();
}
}
- else if (fAnalysisType == "ESD") {
+
+ else if (fAnalysisType == "ESD" || fAnalysisType == "ESDMC0" || fAnalysisType == "ESDMC1" ) {
cout<<"!!!!!reading the ESD only"<<endl;
tree->SetBranchStatus("*", kFALSE);
tree->SetBranchStatus("Tracks.*", kTRUE);
} else
fESD = esdH->GetEvent();
}
+
else if (fAnalysisType == "AOD") {
cout<<"!!!!!reading the AOD only"<<endl;
AliAODInputHandler *aodH = dynamic_cast<AliAODInputHandler*> (AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
}
}
else {
- Printf("!!!!!Wrong analysis type: Only ESD, AOD and MC types are allowed!");
+ Printf("!!!!!Wrong analysis type: Only ESD, ESDMC0, ESDMC1, AOD and MC types are allowed!");
exit(1);
}
// Called once
cout<<"AliAnalysisTaskMCEventPlane::CreateOutputObjects()"<<endl;
- if (!(fAnalysisType == "AOD" || fAnalysisType == "ESD" || fAnalysisType == "MC")) {
- cout<<"WRONG ANALYSIS TYPE! only ESD, AOD and MC are allowed."<<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;
exit(1);
}
delete fEvent;
}
+
else if (fAnalysisType == "ESD") {
if (!fESD) {
Printf("ERROR: fESD not available");
fMc->Make(fEvent,fRP);
delete fEvent;
}
+
+ else if (fAnalysisType == "ESDMC0") {
+ if (!fESD) {
+ Printf("ERROR: fESD not available");
+ return;
+ }
+ Printf("There are %d tracks in this event", fESD->GetNumberOfTracks());
+
+ // analysis
+ AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fESD,mcEvent,0); //0 = kine from ESD, 1 = kine from MC
+ fMc->Make(fEvent,fRP);
+ delete fEvent;
+ }
+
+ else if (fAnalysisType == "ESDMC1") {
+ if (!fESD) {
+ Printf("ERROR: fESD not available");
+ return;
+ }
+ Printf("There are %d tracks in this event", fESD->GetNumberOfTracks());
+
+ // analysis
+ AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fESD,mcEvent,1); //0 = kine from ESD, 1 = kine from MC
+ fMc->Make(fEvent,fRP);
+ delete fEvent;
+ }
+
else if (fAnalysisType == "AOD") {
if (!fAOD) {
Printf("ERROR: fAOD not available");
AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliMCEvent* fInput)
{
//Fills the event from the MC kinematic information
- Bool_t fDoubleLoop = kFALSE;
-
+
Int_t fNumberOfInputTracks = fInput->GetNumberOfTracks() ;
cerr<<"fInput->GetNumberOfTracks() = "<<fNumberOfInputTracks<<endl;
Int_t fSelParticlesDiff = 0;
Int_t fSelParticlesInt = 0;
-
- if (fDoubleLoop)
- { //double loop
- while (fGoodTracks < fN*2 && ftrkN < fNumberOfInputTracks)
- {
- AliMCParticle* fParticle = fInput->GetTrack(ftrkN); //get input particle
- //cut on tracks
- if(TMath::Abs(fParticle->Eta()) < 0.9)
- {
- // Int_t fLoop = floor(2.*fParticle->Pt())+2;
- // for(Int_t d=0;d<fLoop;d++)
- for(Int_t d=0;d<2;d++)
- {
- if(
- TMath::Abs(fParticle->Particle()->GetPdgCode()) == 211
- // TMath::Abs(fParticle->Particle()->GetPdgCode()) == 211 ||
- // TMath::Abs(fParticle->Particle()->GetPdgCode()) == 321 ||
- // TMath::Abs(fParticle->Particle()->GetPdgCode()) == 2212
- )
- {
- fTrack = new AliFlowTrackSimple();
- fTrack->SetPt(fParticle->Pt() );
- fTrack->SetEta(fParticle->Eta() );
- fTrack->SetPhi(fParticle->Phi() );
- fTrack->SetForIntegratedFlow(kTRUE);
- fTrack->SetForDifferentialFlow(kTRUE);
-
- if (fTrack->UseForIntegratedFlow())
- { fSelParticlesInt++; }
- if (fTrack->UseForDifferentialFlow())
- { fSelParticlesDiff++; }
- fGoodTracks++;
- fEvent->TrackCollection()->Add(fTrack);
- }
- /*
- else if(
- TMath::Abs(fParticle->Particle()->GetPdgCode()) == 2212
- )
- {
- fTrack = new AliFlowTrackSimple();
- fTrack->SetPt(fParticle->Pt() );
- fTrack->SetEta(fParticle->Eta() );
- fTrack->SetPhi(fParticle->Phi() );
- fTrack->SetForIntegratedFlow(kFALSE);
- fTrack->SetForDifferentialFlow(kTRUE);
-
- if (fTrack->UseForIntegratedFlow())
- { fSelParticlesInt++; }
- if (fTrack->UseForDifferentialFlow())
- { fSelParticlesDiff++; }
- fGoodTracks++;
- fEvent->TrackCollection()->Add(fTrack);
- }
- */
- }
- }
- ftrkN++;
- }
- }
- else { //normal loop
- while (fGoodTracks < fN && ftrkN < fNumberOfInputTracks) {
- AliMCParticle* fParticle = fInput->GetTrack(ftrkN); //get input particle
- //cut on tracks
- if (TMath::Abs(fParticle->Eta()) < 0.2)
- {
- if(
- TMath::Abs(fParticle->Particle()->GetPdgCode()) == 211
- // TMath::Abs(fParticle->Particle()->GetPdgCode()) == 211 ||
- // TMath::Abs(fParticle->Particle()->GetPdgCode()) == 321 ||
- // TMath::Abs(fParticle->Particle()->GetPdgCode()) == 2212
- )
- {
- fTrack = new AliFlowTrackSimple() ;
- fTrack->SetPt(fParticle->Pt() );
- fTrack->SetEta(fParticle->Eta() );
- fTrack->SetPhi(fParticle->Phi() );
- fTrack->SetForIntegratedFlow(kTRUE);
- fTrack->SetForDifferentialFlow(kTRUE);
-
- if (fTrack->UseForIntegratedFlow())
- { fSelParticlesInt++; }
- if (fTrack->UseForDifferentialFlow())
- { fSelParticlesDiff++; }
- fGoodTracks++;
- fEvent->TrackCollection()->Add(fTrack) ;
- }
+
+ //normal loop
+ while (fGoodTracks < fN && ftrkN < fNumberOfInputTracks) {
+ AliMCParticle* fParticle = fInput->GetTrack(ftrkN); //get input particle
+ //cut on tracks
+ if (TMath::Abs(fParticle->Eta()) < 0.2)
+ {
+ if(
+ TMath::Abs(fParticle->Particle()->GetPdgCode()) == 211
+ // TMath::Abs(fParticle->Particle()->GetPdgCode()) == 211 ||
+ // TMath::Abs(fParticle->Particle()->GetPdgCode()) == 321 ||
+ // TMath::Abs(fParticle->Particle()->GetPdgCode()) == 2212
+ )
+ {
+ fTrack = new AliFlowTrackSimple() ;
+ fTrack->SetPt(fParticle->Pt() );
+ fTrack->SetEta(fParticle->Eta() );
+ fTrack->SetPhi(fParticle->Phi() );
+ fTrack->SetForIntegratedFlow(kTRUE);
+ fTrack->SetForDifferentialFlow(kTRUE);
+
+ if (fTrack->UseForIntegratedFlow())
+ { fSelParticlesInt++; }
+ if (fTrack->UseForDifferentialFlow())
+ { fSelParticlesDiff++; }
+ fGoodTracks++;
+ fEvent->TrackCollection()->Add(fTrack) ;
+ }
/* else if(
TMath::Abs(fParticle->Particle()->GetPdgCode()) == 211
)
fEvent->TrackCollection()->Add(fTrack);
}
*/
- }
+ }
- ftrkN++;
- }
+ ftrkN++;
}
-
-
+
fEvent-> SetEventNSelTracksIntFlow(fSelParticlesInt);
fEvent->SetNumberOfTracks(fGoodTracks);
cout<<" fGoodTracks = "<<fGoodTracks<<endl;
AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliESDEvent* fInput)
{
//Fills the event from the ESD
- Bool_t fDoubleLoop = kFALSE;
-
+
Int_t fNumberOfInputTracks = fInput->GetNumberOfTracks() ;
cerr<<"fInput->GetNumberOfTracks() = "<<fNumberOfInputTracks<<endl;
Int_t fSelParticlesInt = 0;
- if (fDoubleLoop)
- { //double loop
- while (fGoodTracks < fN*2 && ftrkN < fNumberOfInputTracks)
- {
- AliESDtrack* fParticle = fInput->GetTrack(ftrkN); //get input particle
- //cut on tracks
- if(TMath::Abs(fParticle->Eta()) < 0.9)
- {
- // Int_t fLoop = floor(2.*fParticle->Pt())+2;
- // for(Int_t d=0;d<fLoop;d++)
- for(Int_t d=0;d<2;d++)
- {
- fTrack = new AliFlowTrackSimple();
- fTrack->SetPt(fParticle->Pt() );
- fTrack->SetEta(fParticle->Eta() );
- fTrack->SetPhi(fParticle->Phi() );
- fTrack->SetForIntegratedFlow(kTRUE);
- fTrack->SetForDifferentialFlow(kTRUE);
-
- if (fTrack->UseForIntegratedFlow())
- { fSelParticlesInt++; }
- if (fTrack->UseForDifferentialFlow())
- { fSelParticlesDiff++; }
- fGoodTracks++;
- fEvent->TrackCollection()->Add(fTrack);
- }
- }
- ftrkN++;
- }
- }
- else { //normal loop
- while (fGoodTracks < fN && ftrkN < fNumberOfInputTracks) {
- AliESDtrack* fParticle = fInput->GetTrack(ftrkN); //get input particle
- //cut on tracks
- if (TMath::Abs(fParticle->Eta()) < 0.2)
- {
- fTrack = new AliFlowTrackSimple() ;
- fTrack->SetPt(fParticle->Pt() );
- fTrack->SetEta(fParticle->Eta() );
- fTrack->SetPhi(fParticle->Phi() );
- fTrack->SetForIntegratedFlow(kTRUE);
- fTrack->SetForDifferentialFlow(kTRUE);
-
- if (fTrack->UseForIntegratedFlow())
- { fSelParticlesInt++; }
- if (fTrack->UseForDifferentialFlow())
- { fSelParticlesDiff++; }
- fGoodTracks++;
- fEvent->TrackCollection()->Add(fTrack) ;
- }
+ //normal loop
+ while (fGoodTracks < fN && ftrkN < fNumberOfInputTracks) {
+ AliESDtrack* fParticle = fInput->GetTrack(ftrkN); //get input particle
+ //cut on tracks
+ if (TMath::Abs(fParticle->Eta()) < 0.2)
+ {
+ fTrack = new AliFlowTrackSimple() ;
+ fTrack->SetPt(fParticle->Pt() );
+ fTrack->SetEta(fParticle->Eta() );
+ fTrack->SetPhi(fParticle->Phi() );
+ fTrack->SetForIntegratedFlow(kTRUE);
+ fTrack->SetForDifferentialFlow(kTRUE);
+
+ if (fTrack->UseForIntegratedFlow())
+ { fSelParticlesInt++; }
+ if (fTrack->UseForDifferentialFlow())
+ { fSelParticlesDiff++; }
+ fGoodTracks++;
+ fEvent->TrackCollection()->Add(fTrack) ;
+ }
- ftrkN++;
- }
+ ftrkN++;
}
-
-
+
fEvent-> SetEventNSelTracksIntFlow(fSelParticlesInt);
fEvent->SetNumberOfTracks(fGoodTracks);
cout<<" fGoodTracks = "<<fGoodTracks<<endl;
cout << " fSelectedTracksInt = " << fSelParticlesInt << endl;
return fEvent;
-
+
}
AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliAODEvent* fInput)
{
//Fills the event from the AOD
- Bool_t fDoubleLoop = kFALSE;
-
+
Int_t fNumberOfInputTracks = fInput->GetNumberOfTracks() ;
cerr<<"fInput->GetNumberOfTracks() = "<<fNumberOfInputTracks<<endl;
Int_t fSelParticlesInt = 0;
- if (fDoubleLoop)
- { //double loop
- while (fGoodTracks < fN*2 && ftrkN < fNumberOfInputTracks)
- {
- AliAODTrack* fParticle = fInput->GetTrack(ftrkN); //get input particle
- //cut on tracks
- if(TMath::Abs(fParticle->Eta()) < 0.9)
- {
- // Int_t fLoop = floor(2.*fParticle->Pt())+2;
- // for(Int_t d=0;d<fLoop;d++)
- for(Int_t d=0;d<2;d++)
- {
- fTrack = new AliFlowTrackSimple();
- fTrack->SetPt(fParticle->Pt() );
- fTrack->SetEta(fParticle->Eta() );
- fTrack->SetPhi(fParticle->Phi() );
- fTrack->SetForIntegratedFlow(kTRUE);
- fTrack->SetForDifferentialFlow(kTRUE);
-
- if (fTrack->UseForIntegratedFlow())
- { fSelParticlesInt++; }
- if (fTrack->UseForDifferentialFlow())
- { fSelParticlesDiff++; }
- fGoodTracks++;
- fEvent->TrackCollection()->Add(fTrack);
- }
- }
- ftrkN++;
- }
- }
- else { //normal loop
- while (fGoodTracks < fN && ftrkN < fNumberOfInputTracks) {
- AliAODTrack* fParticle = fInput->GetTrack(ftrkN); //get input particle
- //cut on tracks
- if (TMath::Abs(fParticle->Eta()) < 0.2)
- {
- fTrack = new AliFlowTrackSimple() ;
- fTrack->SetPt(fParticle->Pt() );
- fTrack->SetEta(fParticle->Eta() );
- fTrack->SetPhi(fParticle->Phi() );
- fTrack->SetForIntegratedFlow(kTRUE);
- fTrack->SetForDifferentialFlow(kTRUE);
-
- if (fTrack->UseForIntegratedFlow())
- { fSelParticlesInt++; }
- if (fTrack->UseForDifferentialFlow())
- { fSelParticlesDiff++; }
- fGoodTracks++;
- fEvent->TrackCollection()->Add(fTrack) ;
- }
+ //normal loop
+ while (fGoodTracks < fN && ftrkN < fNumberOfInputTracks) {
+ AliAODTrack* fParticle = fInput->GetTrack(ftrkN); //get input particle
+ //cut on tracks
+ if (TMath::Abs(fParticle->Eta()) < 0.2)
+ {
+ fTrack = new AliFlowTrackSimple() ;
+ fTrack->SetPt(fParticle->Pt() );
+ fTrack->SetEta(fParticle->Eta() );
+ fTrack->SetPhi(fParticle->Phi() );
+ fTrack->SetForIntegratedFlow(kTRUE);
+ fTrack->SetForDifferentialFlow(kTRUE);
+
+ if (fTrack->UseForIntegratedFlow())
+ { fSelParticlesInt++; }
+ if (fTrack->UseForDifferentialFlow())
+ { fSelParticlesDiff++; }
+ fGoodTracks++;
+ fEvent->TrackCollection()->Add(fTrack) ;
+ }
- ftrkN++;
- }
+ ftrkN++;
+ }
+
+ fEvent-> SetEventNSelTracksIntFlow(fSelParticlesInt);
+ fEvent->SetNumberOfTracks(fGoodTracks);
+ cout<<" fGoodTracks = "<<fGoodTracks<<endl;
+ cout << " fSelectedTracksInt = " << fSelParticlesInt << endl;
+ return fEvent;
+
+}
+//-----------------------------------------------------------------------
+AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliESDEvent* fInput, AliMCEvent* fInputMc, Int_t fOption)
+{
+ //fills the event with tracks from the ESD and kinematics from the MC info via the track label
+
+ if (!(fOption ==0 || fOption ==1)) {
+ cout<<"WRONG OPTION IN AliFlowEventSimpleMaker::FillTracks(AliESDEvent* fInput, AliMCEvent* fInputMc, Int_t fOption)"<<endl;
+ exit(1);
}
+ Int_t fNumberOfInputTracks = fInput->GetNumberOfTracks() ;
+ cerr<<"fInput->GetNumberOfTracks() = "<<fNumberOfInputTracks<<endl;
+
+ fEvent = new AliFlowEventSimple(10);
+
+ //Int_t fN = 256; //multiplicity for chi=1
+ Int_t fN = fNumberOfInputTracks;
+ Int_t fGoodTracks = 0;
+ Int_t ftrkN = 0;
+ Int_t fSelParticlesDiff = 0;
+ Int_t fSelParticlesInt = 0;
+ //normal loop
+ while (fGoodTracks < fN && ftrkN < fNumberOfInputTracks) {
+ AliESDtrack* fParticle = fInput->GetTrack(ftrkN); //get input particle
+ //get Label
+ Int_t fLabel = fParticle->GetLabel();
+ //match to mc particle
+ AliMCParticle* fMcParticle = fInputMc->GetTrack(TMath::Abs(fLabel));
+
+ //check
+ if (TMath::Abs(fParticle->GetLabel())!=fMcParticle->Label()) cout<<"fParticle->GetLabel()!=fMcParticle->Label() "<<fParticle->GetLabel()<<" "<<fMcParticle->Label()<<endl;
+
+ //cut on tracks
+ if (TMath::Abs(fParticle->Eta()) < 0.2)
+ {
+ if(
+ TMath::Abs(fMcParticle->Particle()->GetPdgCode()) == 211 //pions
+ // TMath::Abs(fMcParticle->Particle()->GetPdgCode()) == 211 ||
+ // TMath::Abs(fMcParticle->Particle()->GetPdgCode()) == 321 ||
+ // TMath::Abs(fMcParticle->Particle()->GetPdgCode()) == 2212
+ )
+ {
+ if(fOption == 0) { //take the PID from the MC & the kinematics from the ESD
+ fTrack = new AliFlowTrackSimple() ;
+ fTrack->SetPt(fParticle->Pt() );
+ fTrack->SetEta(fParticle->Eta() );
+ fTrack->SetPhi(fParticle->Phi() );
+ fTrack->SetForIntegratedFlow(kTRUE);
+ fTrack->SetForDifferentialFlow(kTRUE);
+ }
+ else if (fOption == 1) { //take the PID and kinematics from the MC
+ fTrack = new AliFlowTrackSimple() ;
+ fTrack->SetPt(fMcParticle->Pt() );
+ fTrack->SetEta(fMcParticle->Eta() );
+ fTrack->SetPhi(fMcParticle->Phi() );
+ fTrack->SetForIntegratedFlow(kTRUE);
+ fTrack->SetForDifferentialFlow(kTRUE);
+ }
+ else { cout<<"Not a valid option"<<endl; }
+ if (fTrack->UseForIntegratedFlow())
+ { fSelParticlesInt++; }
+ if (fTrack->UseForDifferentialFlow())
+ { fSelParticlesDiff++; }
+ fGoodTracks++;
+ fEvent->TrackCollection()->Add(fTrack) ;
+ }
+ }
+ ftrkN++;
+ }
+
fEvent-> SetEventNSelTracksIntFlow(fSelParticlesInt);
fEvent->SetNumberOfTracks(fGoodTracks);
cout<<" fGoodTracks = "<<fGoodTracks<<endl;
cout << " fSelectedTracksInt = " << fSelParticlesInt << endl;
return fEvent;
-
+
}
+
+
/*
$Log$
*/
AliFlowEventSimple* FillTracks(TTree* fInput);
AliFlowEventSimple* FillTracks(AliMCEvent* fInput);
AliFlowEventSimple* FillTracks(AliESDEvent* fInput);
+ AliFlowEventSimple* FillTracks(AliESDEvent* fInput, AliMCEvent* fInputMc, Int_t fOption);
+ // fOption = 0 : kine from ESD
+ // fOption = 1 : kine from MC
AliFlowEventSimple* FillTracks(AliAODEvent* fInput);
private:
timer.Start();
// include path (to find the .h files when compiling)
- //gSystem->AddIncludePath("-I$ALICE_ROOT/include") ;
- //gSystem->AddIncludePath("-I$ROOTSYS/include") ;
+ gSystem->AddIncludePath("-I$ALICE_ROOT/include") ;
+ gSystem->AddIncludePath("-I$ROOTSYS/include") ;
// load needed libraries
gSystem->Load("libTree.so");
cerr<<"libESD loaded..."<<endl;
gSystem->Load("libANALYSIS.so");
cerr<<"libANALYSIS.so loaded..."<<endl;
- gSystem->Load("libPWG2flow.so");
+ //gSystem->Load("libPWG2flow.so");
- //gROOT->LoadMacro("AliFlowLYZConstants.cxx+");
- //gROOT->LoadMacro("AliFlowCommonConstants.cxx+");
- //gROOT->LoadMacro("AliFlowVector.cxx+");
- //gROOT->LoadMacro("AliFlowTrackSimple.cxx+");
- //gROOT->LoadMacro("AliFlowEventSimple.cxx+");
- //gROOT->LoadMacro("AliFlowEventSimpleMaker.cxx+");
- //gROOT->LoadMacro("AliFlowCommonHist.cxx+");
- //gROOT->LoadMacro("AliFlowCommonHistResults.cxx+");
- //gROOT->LoadMacro("AliFlowLYZEventPlane.cxx+");
- //gROOT->LoadMacro("AliFlowAnalysisWithLYZEventPlane.cxx+");
- //gROOT->LoadMacro("AliAnalysisTaskLYZEventPlane.cxx+");
+ gROOT->LoadMacro("AliFlowLYZConstants.cxx+");
+ gROOT->LoadMacro("AliFlowCommonConstants.cxx+");
+ gROOT->LoadMacro("AliFlowVector.cxx+");
+ gROOT->LoadMacro("AliFlowTrackSimple.cxx+");
+ gROOT->LoadMacro("AliFlowEventSimple.cxx+");
+ gROOT->LoadMacro("AliFlowEventSimpleMaker.cxx+");
+ gROOT->LoadMacro("AliFlowCommonHist.cxx+");
+ gROOT->LoadMacro("AliFlowCommonHistResults.cxx+");
+ gROOT->LoadMacro("AliFlowLYZEventPlane.cxx+");
+ gROOT->LoadMacro("AliFlowAnalysisWithLYZEventPlane.cxx+");
+ gROOT->LoadMacro("AliAnalysisTaskLYZEventPlane.cxx+");
// create the TChain. CreateESDChain() is defined in CreateESDChain.C
TChain* chain = CreateESDChain(dataDir, nRuns, offset);
-void runAliAnalysisTaskLeeYangZeros(Int_t nRuns = 2, TString type = "ESD", Bool_t firstrun = kTRUE, Bool_t usesum = kTRUE, const Char_t* dataDir="/Users/snelling/alice_data/TherminatorFIX", Int_t offset = 0)
+void runAliAnalysisTaskLeeYangZeros(Int_t nRuns = 2, Bool_t firstrun = kTRUE, TString type = "ESD", Bool_t usesum = kTRUE, const Char_t* dataDir="/Users/snelling/alice_data/TherminatorFIX", Int_t offset = 0)
{
TStopwatch timer;
timer.Start();
// include path (to find the .h files when compiling)
- //gSystem->AddIncludePath("-I$ALICE_ROOT/include") ;
- //gSystem->AddIncludePath("-I$ROOTSYS/include") ;
+ gSystem->AddIncludePath("-I$ALICE_ROOT/include") ;
+ gSystem->AddIncludePath("-I$ROOTSYS/include") ;
// load needed libraries
gSystem->Load("libTree.so");
cerr<<"libANALYSIS.so loaded..."<<endl;
gSystem->Load("libPWG2flow.so");
- //gROOT->LoadMacro("AliFlowLYZConstants.cxx+");
- //gROOT->LoadMacro("AliFlowCommonConstants.cxx+");
- //gROOT->LoadMacro("AliFlowVector.cxx+");
- //gROOT->LoadMacro("AliFlowTrackSimple.cxx+");
- //gROOT->LoadMacro("AliFlowEventSimple.cxx+");
- //gROOT->LoadMacro("AliFlowEventSimpleMaker.cxx+");
- //gROOT->LoadMacro("AliFlowCommonHist.cxx+");
- //gROOT->LoadMacro("AliFlowCommonHistResults.cxx+");
- //gROOT->LoadMacro("AliFlowLYZHist1.cxx+");
- //gROOT->LoadMacro("AliFlowLYZHist2.cxx+");
- //gROOT->LoadMacro("AliFlowAnalysisWithLeeYangZeros.cxx+");
- //gROOT->LoadMacro("AliAnalysisTaskLeeYangZeros.cxx+");
+ // gROOT->LoadMacro("AliFlowLYZConstants.cxx+");
+ // gROOT->LoadMacro("AliFlowCommonConstants.cxx+");
+ // gROOT->LoadMacro("AliFlowVector.cxx+");
+ // gROOT->LoadMacro("AliFlowTrackSimple.cxx+");
+ // gROOT->LoadMacro("AliFlowEventSimple.cxx+");
+ // gROOT->LoadMacro("AliFlowEventSimpleMaker.cxx+");
+ // gROOT->LoadMacro("AliFlowCommonHist.cxx+");
+ // gROOT->LoadMacro("AliFlowCommonHistResults.cxx+");
+ // gROOT->LoadMacro("AliFlowLYZHist1.cxx+");
+ // gROOT->LoadMacro("AliFlowLYZHist2.cxx+");
+ // gROOT->LoadMacro("AliFlowAnalysisWithLeeYangZeros.cxx+");
+ // gROOT->LoadMacro("AliAnalysisTaskLeeYangZeros.cxx+");
// create the TChain. CreateESDChain() is defined in CreateESDChain.C
TChain* chain = CreateESDChain(dataDir, nRuns, offset);
-void runAliAnalysisTaskMCEventPlane(Int_t nRuns = 2, TString type = "MC", const Char_t* dataDir="/Users/snelling/alice_data/TherminatorFIX", Int_t offset = 0)
+void runAliAnalysisTaskMCEventPlane(Int_t nRuns = 2, TString type = "MC", const Char_t* dataDir="/data/alice1/kolk/TherminatorFIX", Int_t offset = 0)
{
TStopwatch timer;
timer.Start();
// include path (to find the .h files when compiling)
- //gSystem->AddIncludePath("-I$ALICE_ROOT/include") ;
- //gSystem->AddIncludePath("-I$ROOTSYS/include") ;
+ gSystem->AddIncludePath("-I$ALICE_ROOT/include") ;
+ gSystem->AddIncludePath("-I$ROOTSYS/include") ;
// load needed libraries
gSystem->Load("libTree.so");
cerr<<"libESD loaded..."<<endl;
gSystem->Load("libANALYSIS.so");
cerr<<"libANALYSIS.so loaded..."<<endl;
- gSystem->Load("libPWG2flow.so");
+ //gSystem->Load("libPWG2flow.so");
- //gROOT->LoadMacro("AliFlowCommonConstants.cxx+");
- //gROOT->LoadMacro("AliFlowVector.cxx+");
- //gROOT->LoadMacro("AliFlowTrackSimple.cxx+");
- //gROOT->LoadMacro("AliFlowEventSimple.cxx+");
- //gROOT->LoadMacro("AliFlowEventSimpleMaker.cxx+");
- //gROOT->LoadMacro("AliFlowCommonHist.cxx+");
- //gROOT->LoadMacro("AliFlowCommonHistResults.cxx+");
- //gROOT->LoadMacro("AliFlowAnalysisWithMCEventPlane.cxx+");
- //gROOT->LoadMacro("AliAnalysisTaskMCEventPlane.cxx+");
+ gROOT->LoadMacro("AliFlowCommonConstants.cxx+");
+ gROOT->LoadMacro("AliFlowVector.cxx+");
+ gROOT->LoadMacro("AliFlowTrackSimple.cxx+");
+ gROOT->LoadMacro("AliFlowEventSimple.cxx+");
+ gROOT->LoadMacro("AliFlowEventSimpleMaker.cxx+");
+ gROOT->LoadMacro("AliFlowCommonHist.cxx+");
+ gROOT->LoadMacro("AliFlowCommonHistResults.cxx+");
+ gROOT->LoadMacro("AliFlowAnalysisWithMCEventPlane.cxx+");
+ gROOT->LoadMacro("AliAnalysisTaskMCEventPlane.cxx+");
// create the TChain. CreateESDChain() is defined in CreateESDChain.C
TChain* chain = CreateESDChain(dataDir, nRuns, offset);
//____________________________________________//
// Make the analysis manager
AliAnalysisManager *mgr = new AliAnalysisManager("TestManager");
- if (type == "ESD" || type == "MC" ) {
+ if (type == "ESD" || type == "ESDMC0" || type == "ESDMC1" || type == "MC" ) {
AliVEventHandler* esdH = new AliESDInputHandler;
mgr->SetInputEventHandler(esdH);
}
#pragma link C++ class AliFlowLYZEventPlane+;
#pragma link C++ class AliFlowEventSimpleMaker+;
#pragma link C++ class AliFlowAnalysisWithMCEventPlane+;
+#pragma link C++ class AliFlowAnalysisWithScalarProduct+;
#pragma link C++ class AliFlowAnalysisWithLYZEventPlane+;
#pragma link C++ class AliFlowAnalysisWithLeeYangZeros+;
#pragma link C++ class AliFlowAnalysisWithCumulants+;
+#pragma link C++ class AliAnalysisTaskScalarProduct+;
#pragma link C++ class AliAnalysisTaskMCEventPlane+;
#pragma link C++ class AliAnalysisTaskLYZEventPlane+;
#pragma link C++ class AliAnalysisTaskLeeYangZeros+;
FLOW/AliFlowVector.cxx \
FLOW/AliFlowLYZEventPlane.cxx \
FLOW/AliFlowEventSimpleMaker.cxx \
+ FLOW/AliFlowAnalysisWithScalarProduct.cxx \
FLOW/AliFlowAnalysisWithMCEventPlane.cxx \
FLOW/AliFlowAnalysisWithLYZEventPlane.cxx \
FLOW/AliFlowAnalysisWithLeeYangZeros.cxx \
FLOW/AliFlowAnalysisWithCumulants.cxx \
+ FLOW/AliAnalysisTaskScalarProduct.cxx \
FLOW/AliAnalysisTaskMCEventPlane.cxx \
FLOW/AliAnalysisTaskLYZEventPlane.cxx \
FLOW/AliAnalysisTaskLeeYangZeros.cxx