From 12b2b8bc0f66042ba947ab316dfa2437065e0173 Mon Sep 17 00:00:00 2001 From: snelling Date: Tue, 19 Oct 2010 16:09:39 +0000 Subject: [PATCH] adds tracklets to flow cuts, fixes for MC analysis + other fixes. --- .../AliFlowCommon/AliFlowTrackSimpleCuts.cxx | 2 +- .../AliFlowCommon/AliFlowTrackSimpleCuts.h | 2 +- .../AliFlowTasks/AliAnalysisTaskFlowEvent.cxx | 10 +- PWG2/FLOW/AliFlowTasks/AliFlowEvent.cxx | 142 ++++++++++++---- PWG2/FLOW/AliFlowTasks/AliFlowTrackCuts.cxx | 156 ++++++++++++------ PWG2/FLOW/AliFlowTasks/AliFlowTrackCuts.h | 13 +- PWG2/FLOW/macros/AddTaskFlowCentrality.C | 49 +++--- 7 files changed, 260 insertions(+), 114 deletions(-) diff --git a/PWG2/FLOW/AliFlowCommon/AliFlowTrackSimpleCuts.cxx b/PWG2/FLOW/AliFlowCommon/AliFlowTrackSimpleCuts.cxx index 2128385b421..87fd274fa33 100644 --- a/PWG2/FLOW/AliFlowCommon/AliFlowTrackSimpleCuts.cxx +++ b/PWG2/FLOW/AliFlowCommon/AliFlowTrackSimpleCuts.cxx @@ -94,7 +94,7 @@ AliFlowTrackSimpleCuts::AliFlowTrackSimpleCuts(): //} //----------------------------------------------------------------------- -Bool_t AliFlowTrackSimpleCuts::IsSelected(TObject* obj) +Bool_t AliFlowTrackSimpleCuts::IsSelected(TObject* obj, Int_t id) { //check cuts TParticle* p = dynamic_cast(obj); diff --git a/PWG2/FLOW/AliFlowCommon/AliFlowTrackSimpleCuts.h b/PWG2/FLOW/AliFlowCommon/AliFlowTrackSimpleCuts.h index 699c1d12e30..6ef46ebd054 100644 --- a/PWG2/FLOW/AliFlowCommon/AliFlowTrackSimpleCuts.h +++ b/PWG2/FLOW/AliFlowCommon/AliFlowTrackSimpleCuts.h @@ -48,7 +48,7 @@ class AliFlowTrackSimpleCuts : public TNamed { Bool_t PassesCuts(const AliFlowTrackSimple *track) const; Bool_t PassesCuts(TParticle* p) const; - virtual Bool_t IsSelected(TObject* obj); + virtual Bool_t IsSelected(TObject* obj, Int_t id=-1); protected: Bool_t fCutPt; diff --git a/PWG2/FLOW/AliFlowTasks/AliAnalysisTaskFlowEvent.cxx b/PWG2/FLOW/AliFlowTasks/AliAnalysisTaskFlowEvent.cxx index 4c1511917eb..1ae0b6aa529 100644 --- a/PWG2/FLOW/AliFlowTasks/AliAnalysisTaskFlowEvent.cxx +++ b/PWG2/FLOW/AliFlowTasks/AliAnalysisTaskFlowEvent.cxx @@ -75,7 +75,7 @@ ClassImp(AliAnalysisTaskFlowEvent) AliAnalysisTaskFlowEvent::AliAnalysisTaskFlowEvent() : AliAnalysisTaskSE(), // fOutputFile(NULL), - fAnalysisType("MK"), + fAnalysisType("AUTOMATIC"), fRPType("Global"), fCFManager1(NULL), fCFManager2(NULL), @@ -126,7 +126,7 @@ AliAnalysisTaskFlowEvent::AliAnalysisTaskFlowEvent() : AliAnalysisTaskFlowEvent::AliAnalysisTaskFlowEvent(const char *name, TString RPtype, Bool_t on, UInt_t iseed) : AliAnalysisTaskSE(name), // fOutputFile(NULL), - fAnalysisType("MK"), + fAnalysisType("AUTOMATIC"), fRPType(RPtype), fCFManager1(NULL), fCFManager2(NULL), @@ -210,9 +210,9 @@ void AliAnalysisTaskFlowEvent::UserCreateOutputObjects() // Called at every worker node to initialize cout<<"AliAnalysisTaskFlowEvent::CreateOutputObjects()"<GetMCevent(); - if (!event) return; + AliFlowTrackCuts::trackParameterType sourceRP = rpCuts->GetParamType(); + AliFlowTrackCuts::trackParameterType sourcePOI = poiCuts->GetParamType(); - Int_t numberOfTracks = event->GetNumberOfTracks() ; - - //loop over tracks - for (Int_t i=0; iGetTrack(i); //get input particle + eventRP = rpCuts->GetMCevent(); + eventPOI = poiCuts->GetMCevent(); + } + if (sourceRP==AliFlowTrackCuts::kMC) eventRP = rpCuts->GetMCevent(); + if (sourcePOI==AliFlowTrackCuts::kMC) eventPOI = poiCuts->GetMCevent(); + + //if we dont have input data return + if (!eventRP || !eventPOI) return; + + //check if we want to use tracklets, TODO: const_casts to be somehow removed! + AliESDEvent* esdEvent = NULL; + AliMultiplicity* trackletsRP=NULL; + AliMultiplicity* trackletsPOI=NULL; + if (sourceRP==AliFlowTrackCuts::kESD_SPDtracklet) + { + esdEvent = dynamic_cast(eventRP); + if (!esdEvent) return; + trackletsRP=const_cast(esdEvent->GetMultiplicity()); + } + if (sourcePOI==AliFlowTrackCuts::kESD_SPDtracklet) + { + esdEvent = dynamic_cast(eventPOI); + if (!esdEvent) return; + trackletsPOI=const_cast(esdEvent->GetMultiplicity()); + } - Bool_t rp = rpCuts->IsSelected(particle); - Bool_t poi = poiCuts->IsSelected(particle); - - if (!(rp||poi)) continue; + //we have two cases, if we're cutting the same collection of tracks + //(same param type) then we can have tracks that are both rp and poi + //in the other case we want to have two exclusive sets of rps and pois + //e.g. one tracklets, the other PMD or global - USER IS RESPOSIBLE + //FOR MAKING SURE THEY DONT OVERLAP OR ELSE THE SAME PARTICLE WILL BE + //TAKEN TWICE + if (sourceRP==sourcePOI) + { + //loop over tracks + //check the number of particles first + Int_t numberOfTracks = 0; + if (trackletsRP) numberOfTracks = trackletsRP->GetNumberOfTracklets(); + else numberOfTracks = eventRP->GetNumberOfTracks(); - //make new AliFLowTrack - //here we need to be careful: if selected particle passes both rp and poi cuts - //then both cuts should have been done on the same set of parameters, e.g. global - //or TPConly. Otherwise we would have to introduce the same particle twice. - //this means that in a sane scenario when we pass both rp and poi cuts we get our - //parameters from any one of them (here rp). - AliFlowTrack* pTrack = NULL; - if (rp&&poi) + for (Int_t i=0; iMakeFlowTrack(); - pTrack->TagRP(); fNumberOfRPs++; - pTrack->TagPOI(); - } - else - if (rp) + //get input object (particle) + TObject* particle = NULL; + if (trackletsRP) particle = trackletsRP; + else particle = eventRP->GetTrack(i); + + Bool_t rp = rpCuts->IsSelected(particle,i); + Bool_t poi = poiCuts->IsSelected(particle,i); + + if (!(rp||poi)) continue; + + //make new AliFLowTrack + AliFlowTrack* pTrack = NULL; + if (rp&&poi) + { + pTrack = rpCuts->MakeFlowTrack(); + pTrack->TagRP(); fNumberOfRPs++; + pTrack->TagPOI(); + } + else + if (rp) + { + pTrack = rpCuts->MakeFlowTrack(); + pTrack->TagRP(); fNumberOfRPs++; + } + else + if (poi) + { + pTrack = poiCuts->MakeFlowTrack(); + pTrack->TagPOI(); + } + + AddTrack(pTrack); + }//end of while (i < numberOfTracks) + } + else if (sourceRP!=sourcePOI) + { + //here we have two different sources of particles, so we fill + //them independently + //RP + Int_t numberOfRPs = 0; + if (trackletsRP) numberOfRPs = trackletsRP->GetNumberOfTracklets(); + else numberOfRPs = eventRP->GetNumberOfTracks(); + for (Int_t i=0; iMakeFlowTrack(); + TObject* particle = NULL; + if (trackletsRP) particle = trackletsRP; + else particle = eventRP->GetTrack(i); + Bool_t rp = rpCuts->IsSelected(particle,i); + if (!rp) continue; + AliFlowTrack* pTrack = rpCuts->MakeFlowTrack(); pTrack->TagRP(); fNumberOfRPs++; } - else - if (poi) + //POI + Int_t numberOfPOIs = 0; + if (trackletsPOI) numberOfPOIs = trackletsPOI->GetNumberOfTracklets(); + else numberOfPOIs = eventPOI->GetNumberOfTracks(); + for (Int_t i=0; iMakeFlowTrack(); + TObject* particle = NULL; + if (trackletsPOI) particle = trackletsPOI; + else particle = eventPOI->GetTrack(i); + Bool_t poi = poiCuts->IsSelected(particle,i); + if (!poi) continue; + AliFlowTrack* pTrack = poiCuts->MakeFlowTrack(); pTrack->TagPOI(); } - - AddTrack(pTrack); - }//end of while (i < numberOfTracks) + } } //-------------------------------------------------------------------// diff --git a/PWG2/FLOW/AliFlowTasks/AliFlowTrackCuts.cxx b/PWG2/FLOW/AliFlowTasks/AliFlowTrackCuts.cxx index 92c8ccf7489..259b58d57dc 100644 --- a/PWG2/FLOW/AliFlowTasks/AliFlowTrackCuts.cxx +++ b/PWG2/FLOW/AliFlowTasks/AliFlowTrackCuts.cxx @@ -40,6 +40,7 @@ #include "AliVParticle.h" #include "AliMCParticle.h" #include "AliESDtrack.h" +#include "AliMultiplicity.h" #include "AliAODTrack.h" #include "AliFlowTrack.h" #include "AliFlowTrackCuts.h" @@ -59,10 +60,13 @@ AliFlowTrackCuts::AliFlowTrackCuts(): fMCisPrimary(kFALSE), fRequireCharge(kFALSE), fFakesAreOK(kTRUE), - fParamType(kESD_Global), + fParamType(kGlobal), fParamMix(kPure), fCleanupTrack(kFALSE), fTrack(NULL), + fTrackPhi(0.), + fTrackEta(0.), + fTrackWeight(0.), fTrackLabel(INT_MIN), fMCevent(NULL), fMCparticle(NULL) @@ -86,6 +90,9 @@ AliFlowTrackCuts::AliFlowTrackCuts(const AliFlowTrackCuts& someCuts): fParamMix(someCuts.fParamMix), fCleanupTrack(kFALSE), fTrack(NULL), + fTrackPhi(someCuts.fTrackPhi), + fTrackEta(someCuts.fTrackEta), + fTrackWeight(someCuts.fTrackWeight), fTrackLabel(INT_MIN), fMCevent(NULL), fMCparticle(NULL) @@ -112,6 +119,9 @@ AliFlowTrackCuts& AliFlowTrackCuts::operator=(const AliFlowTrackCuts& someCuts) fCleanupTrack=kFALSE; fTrack=NULL; + fTrackPhi=someCuts.fTrackPhi; + fTrackPhi=someCuts.fTrackPhi; + fTrackWeight=someCuts.fTrackWeight; fTrackLabel=INT_MIN; fMCevent=NULL; fMCparticle=NULL; @@ -128,13 +138,15 @@ AliFlowTrackCuts::~AliFlowTrackCuts() } //----------------------------------------------------------------------- -Bool_t AliFlowTrackCuts::IsSelected(TObject* obj) +Bool_t AliFlowTrackCuts::IsSelected(TObject* obj, Int_t id) { //check cuts AliVParticle* vparticle = dynamic_cast(obj); if (vparticle) return PassesCuts(vparticle); AliFlowTrackSimple* flowtrack = dynamic_cast(obj); if (flowtrack) return PassesCuts(flowtrack); + AliMultiplicity* tracklets = dynamic_cast(obj); + if (tracklets) return PassesCuts(tracklets,id); return kFALSE; //default when passed wrong type of object } @@ -148,6 +160,53 @@ Bool_t AliFlowTrackCuts::PassesCuts(AliFlowTrackSimple* track) return AliFlowTrackSimpleCuts::PassesCuts(track); } +//----------------------------------------------------------------------- +Bool_t AliFlowTrackCuts::PassesCuts(AliMultiplicity* tracklet, Int_t id) +{ + //check cuts on a tracklets + + //clean up from last iteration + if (fCleanupTrack) delete fTrack; fTrack = NULL; + fMCparticle=NULL; + + fTrackPhi = tracklet->GetPhi(id); + fTrackEta = tracklet->GetEta(id); + fTrackWeight = 1.0; + if (fCutEta) {if ( fTrackEta < fEtaMin || fTrackEta >= fEtaMax ) return kFALSE;} + if (fCutPhi) {if ( fTrackPhi < fPhiMin || fTrackPhi >= fPhiMax ) return kFALSE;} + + //check MC info if available + fTrackLabel = tracklet->GetLabel(id,1); //TODO: this can be improved + if (!PassesMCcuts()) return kFALSE; + return kTRUE; +} + +//----------------------------------------------------------------------- +Bool_t AliFlowTrackCuts::PassesMCcuts() +{ + //check the MC info + if (!fMCevent) {AliError("no MC info"); return kFALSE;} + fMCparticle = static_cast(fMCevent->GetTrack(fTrackLabel)); + if (!fMCparticle) {AliError("no MC info"); return kFALSE;} + + if (fCutMCisPrimary) + { + if (IsPhysicalPrimary() != fMCisPrimary) return kFALSE; + } + if (fCutMCPID) + { + Int_t pdgCode = fMCparticle->PdgCode(); + if (fMCPID != pdgCode) return kFALSE; + } + if ( fCutMCprocessType ) + { + TParticle* particle = fMCparticle->Particle(); + Int_t processID = particle->GetUniqueID(); + if (processID != fMCprocessType ) return kFALSE; + } + return kTRUE; +} + //----------------------------------------------------------------------- Bool_t AliFlowTrackCuts::PassesCuts(AliVParticle* vparticle) { @@ -192,24 +251,7 @@ Bool_t AliFlowTrackCuts::PassesCuts(AliVParticle* vparticle) //if(fCutPID) {if (fTrack->PID() != fPID) return kFALSE;} //when additionally MC info is required - if (fCutMCisPrimary) - { - if (!fMCevent) {AliError("no MC info"); return kFALSE;} - if (fMCevent->IsPhysicalPrimary(fTrackLabel) != fMCisPrimary) return kFALSE; - } - if (fCutMCPID) - { - if (!fMCparticle) {AliError("no MC info"); return kFALSE;} - Int_t pdgCode = fMCparticle->PdgCode(); - if (fMCPID != pdgCode) return kFALSE; - } - if ( fCutMCprocessType ) - { - if (!fMCparticle) {AliError("no MC info"); return kFALSE;} - TParticle* particle = fMCparticle->Particle(); - Int_t processID = particle->GetUniqueID(); - if (processID != fMCprocessType ) return kFALSE; - } + if (!PassesMCcuts()) return kFALSE; //check all else for ESDs using aliesdtrackcuts if (esdTrack && (fParamType!=kMC) ) return fAliESDtrackCuts->IsSelected(static_cast(fTrack)); @@ -223,10 +265,6 @@ void AliFlowTrackCuts::HandleVParticle(AliVParticle* track) //handle the general case switch (fParamType) { - case kMC: - fCleanupTrack = kFALSE; - fTrack = fMCparticle; - break; default: fCleanupTrack = kFALSE; fTrack = track; @@ -239,7 +277,7 @@ void AliFlowTrackCuts::HandleESDtrack(AliESDtrack* track) //handle esd track switch (fParamType) { - case kESD_Global: + case kGlobal: fTrack = track; fCleanupTrack = kFALSE; break; @@ -252,10 +290,6 @@ void AliFlowTrackCuts::HandleESDtrack(AliESDtrack* track) if (fMCevent) fMCparticle = static_cast(fMCevent->GetTrack(fTrackLabel)); else fMCparticle=NULL; break; - case kMC: - fCleanupTrack = kFALSE; - fTrack = fMCparticle; - break; default: fTrack = track; fCleanupTrack = kFALSE; @@ -282,7 +316,7 @@ AliFlowTrackCuts* AliFlowTrackCuts::GetStandardITSTPCTrackCuts2009(Bool_t selPri cuts->SetName("standard global track cuts 2009"); delete cuts->fAliESDtrackCuts; cuts->fAliESDtrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2009(selPrimaries); - cuts->SetParamType(kESD_Global); + cuts->SetParamType(kGlobal); return cuts; } @@ -292,24 +326,34 @@ AliFlowTrack* AliFlowTrackCuts::MakeFlowTrack() const //get a flow track constructed from whatever we applied cuts on //caller is resposible for deletion AliFlowTrack* flowtrack=NULL; - switch(fParamMix) + if (fParamType==kESD_SPDtracklet) { - case kPure: - flowtrack = new AliFlowTrack(fTrack); - break; - case kTrackWithMCkine: - flowtrack = new AliFlowTrack(fMCparticle); - break; - case kTrackWithMCPID: - flowtrack = new AliFlowTrack(fTrack); - break; - default: - flowtrack = new AliFlowTrack(fTrack); + flowtrack = new AliFlowTrack(); + flowtrack->SetPhi(fTrackPhi); + flowtrack->SetEta(fTrackEta); + flowtrack->SetSource(AliFlowTrack::kFromTracklet); + } + else + { + switch(fParamMix) + { + case kPure: + flowtrack = new AliFlowTrack(fTrack); + break; + case kTrackWithMCkine: + flowtrack = new AliFlowTrack(fMCparticle); + break; + case kTrackWithMCPID: + flowtrack = new AliFlowTrack(fTrack); + break; + default: + flowtrack = new AliFlowTrack(fTrack); + } + if (fParamType==kMC) flowtrack->SetSource(AliFlowTrack::kFromMC); + else if (dynamic_cast(fTrack)) flowtrack->SetSource(AliFlowTrack::kFromESD); + else if (dynamic_cast(fTrack)) flowtrack->SetSource(AliFlowTrack::kFromAOD); + else if (dynamic_cast(fTrack)) flowtrack->SetSource(AliFlowTrack::kFromMC); } - if (fParamType==kMC) flowtrack->SetSource(AliFlowTrack::kFromMC); - else if (dynamic_cast(fTrack)) flowtrack->SetSource(AliFlowTrack::kFromMC); - else if (dynamic_cast(fTrack)) flowtrack->SetSource(AliFlowTrack::kFromESD); - else if (dynamic_cast(fTrack)) flowtrack->SetSource(AliFlowTrack::kFromAOD); return flowtrack; } @@ -319,3 +363,23 @@ Bool_t AliFlowTrackCuts::IsPhysicalPrimary() const //check if current particle is a physical primary return fMCevent->IsPhysicalPrimary(fTrackLabel); } + +//----------------------------------------------------------------------- +const char* AliFlowTrackCuts::GetParamTypeName(trackParameterType type) +{ + //return the name of the selected parameter type + switch (type) + { + case kMC: + return "MC"; + case kGlobal: + return "ESD global"; + case kESD_TPConly: + return "TPC only"; + case kESD_SPDtracklet: + return "SPD tracklet"; + default: + return "unknown"; + } + return "unknown"; +} diff --git a/PWG2/FLOW/AliFlowTasks/AliFlowTrackCuts.h b/PWG2/FLOW/AliFlowTasks/AliFlowTrackCuts.h index a7d775a19f7..e9ef62f6745 100644 --- a/PWG2/FLOW/AliFlowTasks/AliFlowTrackCuts.h +++ b/PWG2/FLOW/AliFlowTasks/AliFlowTrackCuts.h @@ -18,6 +18,7 @@ class AliMCParticle; class AliFlowTrack; class AliMCEvent; class AliVEvent; +class AliMultiplicity; class AliFlowTrackCuts : public AliFlowTrackSimpleCuts { @@ -30,7 +31,7 @@ class AliFlowTrackCuts : public AliFlowTrackSimpleCuts { static AliFlowTrackCuts* GetStandardTPCOnlyTrackCuts(); static AliFlowTrackCuts* GetStandardITSTPCTrackCuts2009(Bool_t selPrimaries=kTRUE); - enum trackParameterType { kMC, kESD_Global, kESD_TPConly }; + enum trackParameterType { kMC, kGlobal, kESD_TPConly, kESD_SPDtracklet }; enum trackParameterMix { kPure, kTrackWithMCkine, kTrackWithMCPID }; //setters (interface to AliESDtrackCuts) @@ -86,10 +87,11 @@ class AliFlowTrackCuts : public AliFlowTrackSimpleCuts { void SetParamType(trackParameterType paramType) {fParamType=paramType;} trackParameterType GetParamType() const {return fParamType;} + static const char* GetParamTypeName(trackParameterType type); void SetParamMix(trackParameterMix paramMix) {fParamMix=paramMix;} trackParameterMix GetParamMix() const {return fParamMix;} - virtual Bool_t IsSelected(TObject* obj); + virtual Bool_t IsSelected(TObject* obj, Int_t id=-1); AliVParticle* GetTrack() const {return fTrack;} AliMCParticle* GetMCparticle() const {return fMCparticle;} AliFlowTrack* MakeFlowTrack() const; @@ -101,6 +103,8 @@ class AliFlowTrackCuts : public AliFlowTrackSimpleCuts { protected: Bool_t PassesCuts(AliVParticle* track); Bool_t PassesCuts(AliFlowTrackSimple* track); + Bool_t PassesCuts(AliMultiplicity* track, Int_t id); + Bool_t PassesMCcuts(); void HandleESDtrack(AliESDtrack* track); void HandleVParticle(AliVParticle* track); @@ -116,8 +120,11 @@ class AliFlowTrackCuts : public AliFlowTrackSimpleCuts { trackParameterType fParamType; //parameter type tu cut on trackParameterMix fParamMix; //parameter mixing - Bool_t fCleanupTrack; //check if we need to delete + Bool_t fCleanupTrack; //check if we need to delete the track AliVParticle* fTrack; //!the track to apply cuts on + Double_t fTrackPhi; //!track phi + Double_t fTrackEta; //!track eta + Double_t fTrackWeight; //!track weight Int_t fTrackLabel; //!track label, or its absolute value if FakesAreOK AliMCEvent* fMCevent; //!mc event AliMCParticle* fMCparticle; //!mc particle diff --git a/PWG2/FLOW/macros/AddTaskFlowCentrality.C b/PWG2/FLOW/macros/AddTaskFlowCentrality.C index be2eb1dfbf2..cacedcc67b6 100644 --- a/PWG2/FLOW/macros/AddTaskFlowCentrality.C +++ b/PWG2/FLOW/macros/AddTaskFlowCentrality.C @@ -55,11 +55,12 @@ Bool_t WEIGHTS[] = {kFALSE,kFALSE,kFALSE}; //Phi, v'(pt), v'(eta) // SETTING THE CUTS //----------For RP selection---------- -//kMC, kESD_Global, kESD_TPConly -const TString rptype = "kMC"; -const TString poitype = "kMC"; +//kMC, kGlobal, kESD_TPConly, kESD_SPDtracklet +AliFlowTrackCuts::trackParameterType rptype = AliFlowTrackCuts::kGlobal; +AliFlowTrackCuts::trackParameterType poitype = AliFlowTrackCuts::kGlobal; -const TString type = "MK"; +const char* rptypestr = AliFlowTrackCuts::GetParamTypeName(rptype) +const char* poitypestr = AliFlowTrackCuts::GetParamTypeName(poitype) void AddTaskFlowCentrality( Int_t refMultMin=0, Int_t refMultMax=1e10, @@ -168,7 +169,7 @@ void AddTaskFlowCentrality( Int_t refMultMin=0, if (LYZ2SUM){ // read the output directory from LYZ1SUM TString inputFileNameLYZ2SUM = "outputLYZ1SUManalysis" ; - inputFileNameLYZ2SUM += type; + inputFileNameLYZ2SUM += rptypestr; cout<<"The input directory is "<FindObjectAny(inputFileNameLYZ2SUM.Data()); if(!fInputFileLYZ2SUM || fInputFileLYZ2SUM->IsZombie()) { @@ -185,7 +186,7 @@ void AddTaskFlowCentrality( Int_t refMultMin=0, if (LYZ2PROD){ // read the output directory from LYZ1PROD TString inputFileNameLYZ2PROD = "outputLYZ1PRODanalysis" ; - inputFileNameLYZ2PROD += type; + inputFileNameLYZ2PROD += rptypestr; cout<<"The input directory is "<FindObjectAny(inputFileNameLYZ2PROD.Data()); if(!fInputFileLYZ2PROD || fInputFileLYZ2PROD->IsZombie()) { @@ -217,7 +218,7 @@ void AddTaskFlowCentrality( Int_t refMultMin=0, // read the output file from LYZ2SUM TString inputFileNameLYZEP = "outputLYZ2SUManalysis" ; - inputFileNameLYZEP += type; + inputFileNameLYZEP += rptypestr; cout<<"The input file is "<FindObjectAny(inputFileNameLYZEP.Data()); if(!fInputFileLYZEP || fInputFileLYZEP->IsZombie()) { @@ -234,9 +235,9 @@ void AddTaskFlowCentrality( Int_t refMultMin=0, // Create the FMD task and add it to the manager //=========================================================================== - if (rptype == "FMD") { + if (rptypestr == "FMD") { AliFMDAnalysisTaskSE *taskfmd = NULL; - if (rptype == "FMD") { + if (rptypestr == "FMD") { taskfmd = new AliFMDAnalysisTaskSE("TaskFMD"); mgr->AddTask(taskfmd); @@ -256,12 +257,12 @@ void AddTaskFlowCentrality( Int_t refMultMin=0, if(useAfterBurner) { - taskFE = new AliAnalysisTaskFlowEvent("TaskFlowEvent",rptype,kFALSE,1); + taskFE = new AliAnalysisTaskFlowEvent("TaskFlowEvent","",kFALSE,1); taskFE->SetFlow(v1,v2,v3,v4); taskFE->SetNonFlowNumberOfTrackClones(numberOfTrackClones); taskFE->SetAfterburnerOn(); } - else {taskFE = new AliAnalysisTaskFlowEvent("TaskFlowEvent",rptype,kFALSE); } + else {taskFE = new AliAnalysisTaskFlowEvent("TaskFlowEvent","",kFALSE); } if (ExcludeRegion) { taskFE->DefineDeadZone(excludeEtaMin, excludeEtaMax, excludePhiMin, excludePhiMax); } @@ -372,7 +373,7 @@ void AddTaskFlowCentrality( Int_t refMultMin=0, //=========================================================================== AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer(); - if (rptype == "FMD") { + if (rptypestr == "FMD") { AliAnalysisDataContainer *coutputFMD = mgr->CreateContainer(Form("BackgroundCorrected_%s",fileName.Data()), TList::Class(), AliAnalysisManager::kExchangeContainer); //input and output taskFMD @@ -399,7 +400,7 @@ void AddTaskFlowCentrality( Int_t refMultMin=0, if(SP) { TString outputSP = fileName; outputSP += ":outputSPanalysis"; - outputSP+= type; + outputSP+= rptypestr; AliAnalysisDataContainer *coutputSP = mgr->CreateContainer(Form("cobjSP_%s",fileName.Data()), TList::Class(),AliAnalysisManager::kOutputContainer,outputSP); mgr->ConnectInput(taskSP,0,coutputFE); @@ -412,7 +413,7 @@ void AddTaskFlowCentrality( Int_t refMultMin=0, if(LYZ1SUM) { TString outputLYZ1SUM = fileName; outputLYZ1SUM += ":outputLYZ1SUManalysis"; - outputLYZ1SUM+= type; + outputLYZ1SUM+= rptypestr; AliAnalysisDataContainer *coutputLYZ1SUM = mgr->CreateContainer(Form("cobjLYZ1SUM_%s",fileName.Data()), TList::Class(),AliAnalysisManager::kOutputContainer,outputLYZ1SUM); mgr->ConnectInput(taskLYZ1SUM,0,coutputFE); @@ -421,7 +422,7 @@ void AddTaskFlowCentrality( Int_t refMultMin=0, if(LYZ1PROD) { TString outputLYZ1PROD = fileName; outputLYZ1PROD += ":outputLYZ1PRODanalysis"; - outputLYZ1PROD+= type; + outputLYZ1PROD+= rptypestr; AliAnalysisDataContainer *coutputLYZ1PROD = mgr->CreateContainer(Form("cobjLYZ1PROD_%s",fileName.Data()), TList::Class(),AliAnalysisManager::kOutputContainer,outputLYZ1PROD); mgr->ConnectInput(taskLYZ1PROD,0,coutputFE); @@ -432,7 +433,7 @@ void AddTaskFlowCentrality( Int_t refMultMin=0, TList::Class(),AliAnalysisManager::kInputContainer); TString outputLYZ2SUM = fileName; outputLYZ2SUM += ":outputLYZ2SUManalysis"; - outputLYZ2SUM+= type; + outputLYZ2SUM+= rptypestr; AliAnalysisDataContainer *coutputLYZ2SUM = mgr->CreateContainer(Form("cobjLYZ2SUM_%s",fileName.Data()), TList::Class(),AliAnalysisManager::kOutputContainer,outputLYZ2SUM); @@ -446,7 +447,7 @@ void AddTaskFlowCentrality( Int_t refMultMin=0, TList::Class(),AliAnalysisManager::kInputContainer); TString outputLYZ2PROD = fileName; outputLYZ2PROD += ":outputLYZ2PRODanalysis"; - outputLYZ2PROD+= type; + outputLYZ2PROD+= rptypestr; AliAnalysisDataContainer *coutputLYZ2PROD = mgr->CreateContainer(Form("cobjLYZ2PROD_%s",fileName.Data()), TList::Class(),AliAnalysisManager::kOutputContainer,outputLYZ2PROD); @@ -460,7 +461,7 @@ void AddTaskFlowCentrality( Int_t refMultMin=0, TList::Class(),AliAnalysisManager::kInputContainer); TString outputLYZEP = fileName; outputLYZEP += ":outputLYZEPanalysis"; - outputLYZEP+= type; + outputLYZEP+= rptypestr; AliAnalysisDataContainer *coutputLYZEP = mgr->CreateContainer(Form("cobjLYZEP_%s",fileName.Data()), TList::Class(),AliAnalysisManager::kOutputContainer,outputLYZEP); @@ -472,7 +473,7 @@ void AddTaskFlowCentrality( Int_t refMultMin=0, if(GFC) { TString outputGFC = fileName; outputGFC += ":outputGFCanalysis"; - outputGFC+= type; + outputGFC+= rptypestr; AliAnalysisDataContainer *coutputGFC = mgr->CreateContainer(Form("cobjGFC_%s",fileName.Data()), TList::Class(),AliAnalysisManager::kOutputContainer,outputGFC); @@ -486,7 +487,7 @@ void AddTaskFlowCentrality( Int_t refMultMin=0, if(QC) { TString outputQC = fileName; outputQC += ":outputQCanalysis"; - outputQC+= type; + outputQC+= rptypestr; AliAnalysisDataContainer *coutputQC = mgr->CreateContainer(Form("cobjQC_%s",fileName.Data()), TList::Class(),AliAnalysisManager::kOutputContainer,outputQC); @@ -500,7 +501,7 @@ void AddTaskFlowCentrality( Int_t refMultMin=0, if(FQD) { TString outputFQD = fileName; outputFQD += ":outputFQDanalysis"; - outputFQD+= type; + outputFQD+= rptypestr; AliAnalysisDataContainer *coutputFQD = mgr->CreateContainer(Form("cobjFQD_%s",fileName.Data()), TList::Class(),AliAnalysisManager::kOutputContainer,outputFQD); @@ -514,7 +515,7 @@ void AddTaskFlowCentrality( Int_t refMultMin=0, if(MCEP) { TString outputMCEP = fileName; outputMCEP += ":outputMCEPanalysis"; - outputMCEP+= type; + outputMCEP+= rptypestr; AliAnalysisDataContainer *coutputMCEP = mgr->CreateContainer(Form("cobjMCEP_%s",fileName.Data()), TList::Class(),AliAnalysisManager::kOutputContainer,outputMCEP); @@ -524,7 +525,7 @@ void AddTaskFlowCentrality( Int_t refMultMin=0, if(MH) { TString outputMH = fileName; outputMH += ":outputMHanalysis"; - outputMH += type; + outputMH += rptypestr; AliAnalysisDataContainer *coutputMH = mgr->CreateContainer(Form("cobjMH_%s",fileName.Data()), TList::Class(),AliAnalysisManager::kOutputContainer,outputMH); @@ -538,7 +539,7 @@ void AddTaskFlowCentrality( Int_t refMultMin=0, if(NL) { TString outputNL = fileName; outputNL += ":outputNLanalysis"; - outputNL += type; + outputNL += rptypestr; AliAnalysisDataContainer *coutputNL = mgr->CreateContainer(Form("cobjNL_%s",fileName.Data()), TList::Class(),AliAnalysisManager::kOutputContainer,outputNL); -- 2.43.0