//-----------------------------------------------------------------------
AliFlowEvent::AliFlowEvent():
- AliFlowEventSimple(), fApplyRecentering(-1), fCachedRun(-1), fCurrentCentrality(-1)
+ AliFlowEventSimple(), fApplyRecentering(-1), fCachedRun(-1), fVZEROcentralityBin(-1)
{
// constructor
for(Int_t i(0); i < 9; i++) {
//-----------------------------------------------------------------------
AliFlowEvent::AliFlowEvent(Int_t n):
- AliFlowEventSimple(n), fApplyRecentering(-1), fCachedRun(-1), fCurrentCentrality(-1)
+ AliFlowEventSimple(n), fApplyRecentering(-1), fCachedRun(-1), fVZEROcentralityBin(-1)
{
// constructor
for(Int_t i(0); i < 9; i++) {
//-----------------------------------------------------------------------
AliFlowEvent::AliFlowEvent(const AliFlowEvent& event):
- AliFlowEventSimple(event), fApplyRecentering(event.fApplyRecentering), fCachedRun(-1), fCurrentCentrality(-1)
+ AliFlowEventSimple(event), fApplyRecentering(event.fApplyRecentering), fCachedRun(-1), fVZEROcentralityBin(-1)
{
// copy constructor
for(Int_t i(0); i < 9; i++) {
fApplyRecentering = event.fApplyRecentering;
fCachedRun = event.fCachedRun;
- fCurrentCentrality = event.fCurrentCentrality;
+ fVZEROcentralityBin = event.fVZEROcentralityBin;
for(Int_t i(0); i < 9; i++) {
for(Int_t j(0); j < 2; j++) {
for(Int_t k(0); k < 2; k++) {
AliFlowEvent::AliFlowEvent( const AliMCEvent* anInput,
const AliCFManager* rpCFManager,
const AliCFManager* poiCFManager):
- AliFlowEventSimple(20), fApplyRecentering(-1), fCachedRun(-1), fCurrentCentrality(-1)
+ AliFlowEventSimple(20), fApplyRecentering(-1), fCachedRun(-1), fVZEROcentralityBin(-1)
{
// constructor
for(Int_t i(0); i < 9; i++) {
AliFlowEvent::AliFlowEvent( const AliESDEvent* anInput,
const AliCFManager* rpCFManager,
const AliCFManager* poiCFManager ):
- AliFlowEventSimple(20), fApplyRecentering(-1), fCachedRun(-1), fCurrentCentrality(-1)
+ AliFlowEventSimple(20), fApplyRecentering(-1), fCachedRun(-1), fVZEROcentralityBin(-1)
{
// constructor
for(Int_t i(0); i < 9; i++) {
AliFlowEvent::AliFlowEvent( const AliAODEvent* anInput,
const AliCFManager* rpCFManager,
const AliCFManager* poiCFManager):
- AliFlowEventSimple(20), fApplyRecentering(-1), fCachedRun(-1), fCurrentCentrality(-1)
+ AliFlowEventSimple(20), fApplyRecentering(-1), fCachedRun(-1), fVZEROcentralityBin(-1)
{
// constructor
for(Int_t i(0); i < 9; i++) {
KineSource anOption,
const AliCFManager* rpCFManager,
const AliCFManager* poiCFManager ):
- AliFlowEventSimple(20), fApplyRecentering(-1), fCachedRun(-1), fCurrentCentrality(-1)
+ AliFlowEventSimple(20), fApplyRecentering(-1), fCachedRun(-1), fVZEROcentralityBin(-1)
{
// constructor
for(Int_t i(0); i < 9; i++) {
AliFlowEvent::AliFlowEvent( const AliESDEvent* anInput,
const AliMultiplicity* anInputTracklets,
const AliCFManager* poiCFManager ):
- AliFlowEventSimple(20), fApplyRecentering(-1), fCachedRun(-1), fCurrentCentrality(-1)
+ AliFlowEventSimple(20), fApplyRecentering(-1), fCachedRun(-1), fVZEROcentralityBin(-1)
{
// constructor
for(Int_t i(0); i < 9; i++) {
AliFlowEvent::AliFlowEvent( const AliESDEvent* esd,
const AliCFManager* poiCFManager,
Bool_t hybrid):
- AliFlowEventSimple(20), fApplyRecentering(-1), fCachedRun(-1), fCurrentCentrality(-1)
+ AliFlowEventSimple(20), fApplyRecentering(-1), fCachedRun(-1), fVZEROcentralityBin(-1)
{
// constructor
for(Int_t i(0); i < 9; i++) {
const AliESDVertex *vertexSPD = esd->GetPrimaryVertexSPD();
const AliESDVertex *vertexTPC = esd->GetPrimaryVertexTPC();
+ AliExternalTrackParam copy(*tpcTrack);
if(hybrid)
- tpcTrack->PropagateToDCA(vertexSPD,esd->GetMagneticField(),100.,dca,cov);
+ copy.PropagateToDCA(vertexSPD,esd->GetMagneticField(),100.,dca,cov);
else
- tpcTrack->PropagateToDCA(vertexTPC,esd->GetMagneticField(),100.,dca,cov);
+ copy.PropagateToDCA(vertexTPC,esd->GetMagneticField(),100.,dca,cov);
// dca3D = TMath::Sqrt(TMath::Power(dca[0],2)+TMath::Power(dca[1],2)); FIXME unused variable
AliFlowEvent::AliFlowEvent( const AliESDEvent* anInput,
const TH2F* anInputFMDhist,
const AliCFManager* poiCFManager ):
- AliFlowEventSimple(20), fApplyRecentering(-1), fCachedRun(-1), fCurrentCentrality(-1)
+ AliFlowEventSimple(20), fApplyRecentering(-1), fCachedRun(-1), fVZEROcentralityBin(-1)
{
// constructor
for(Int_t i(0); i < 9; i++) {
//marking the particles used for the particle of interest (POI) selection:
if(poiOK && poiCFManager)
{
- IncrementNumberOfPOIs(1);
+ IncrementNumberOfPOIs(1);
pTrack->SetForPOISelection(kTRUE);
pTrack->SetSource(AliFlowTrack::kFromESD);
}
TObject* particle = rpCuts->GetInputObject(i);
Bool_t rp = rpCuts->IsSelected(particle,i);
- Int_t poiClass = poiCuts->IsSelected(particle,i);
+ Bool_t poi = poiCuts->IsSelected(particle,i);
- if (!(rp||poiClass>0)) continue;
+ if (!(rp||poi)) continue;
//make new AliFlowTrack
if (rp)
{
pTrack = rpCuts->FillFlowTrack(fTrackCollection,fNumberOfTracks);
if (!pTrack) continue;
- pTrack->TagRP(); IncrementNumberOfPOIs(0);
- if (poiClass>0) {pTrack->Tag(poiClass); IncrementNumberOfPOIs(poiClass);}
+ pTrack->Tag(0); IncrementNumberOfPOIs(0);
+ if (poi) {pTrack->Tag(1); IncrementNumberOfPOIs(1);}
if (pTrack->GetNDaughters()>0) fMothersCollection->Add(pTrack);
}
- else if (poiClass>0)
+ else if (poi)
{
pTrack = poiCuts->FillFlowTrack(fTrackCollection,fNumberOfTracks);
if (!pTrack) continue;
- pTrack->Tag(poiClass); IncrementNumberOfPOIs(poiClass);
+ pTrack->Tag(1); IncrementNumberOfPOIs(1);
if (pTrack->GetNDaughters()>0) fMothersCollection->Add(pTrack);
}
fNumberOfTracks++;
for (Int_t i=0; i<poiCuts->GetNumberOfInputObjects(); i++)
{
TObject* particle = poiCuts->GetInputObject(i);
- Int_t poiClass = poiCuts->IsSelected(particle,i);
- if (poiClass<=0) continue;
+ Bool_t poi = poiCuts->IsSelected(particle,i);
+ if (!poi) continue;
pTrack = poiCuts->FillFlowTrack(fTrackCollection,fNumberOfTracks);
if (!pTrack) continue;
- pTrack->Tag(poiClass);
- IncrementNumberOfPOIs(poiClass);
+ pTrack->Tag(1);
+ IncrementNumberOfPOIs(1);
fNumberOfTracks++;
if (pTrack->GetNDaughters()>0) fMothersCollection->Add(pTrack);
}
for (Int_t i=0; i<numberOfInputObjects; i++)
{
TObject* particle = rpCuts->GetInputObject(i);
- Int_t rp = rpCuts->IsSelected(particle,i);
- if (rp<1) continue;
+ Bool_t rp = rpCuts->IsSelected(particle,i);
+ if (!rp) continue;
pTrack = rpCuts->FillFlowTrack(fTrackCollection,fNumberOfTracks);
if (!pTrack) continue;
- pTrack->TagRP();
+ pTrack->Tag(0);
IncrementNumberOfPOIs(0);
fNumberOfTracks++;
if (pTrack->GetNDaughters()>0) fMothersCollection->Add(pTrack);
*pTrack = *track;
if (track->GetNDaughters()>0)
{
- fMothersCollection->Add(track);
+ fMothersCollection->Add(pTrack);
}
- //pTrack->SetPt( track->Pt() );
- //pTrack->SetPhi( track->Phi() );
- //pTrack->SetEta( track->Eta() );
- //pTrack->SetWeight( track->Weight() );
- //pTrack->SetCharge( track->Charge() );
- //pTrack->SetMass( track->Mass() );
- //pTrack->SetForRPSelection( track->InRPSelection() );
- //pTrack->SetForPOISelection( track->InPOISelection() );
- //if(track->InSubevent(0)) pTrack->SetForSubevent(0);
- //if(track->InSubevent(1)) pTrack->SetForSubevent(1);
- //pTrack->SetID( track->GetID() );
return;
}
//-----------------------------------------------------------------------
AliFlowEvent::AliFlowEvent( AliFlowTrackCuts* rpCuts,
AliFlowTrackCuts* poiCuts ):
- AliFlowEventSimple(20), fApplyRecentering(kFALSE), fCachedRun(-1), fCurrentCentrality(-1)
+ AliFlowEventSimple(20), fApplyRecentering(kFALSE), fCachedRun(-1), fVZEROcentralityBin(-1)
{
// constructor
for(Int_t i(0); i < 9; i++) {
}
//Fills the event from a vevent: AliESDEvent,AliAODEvent,AliMCEvent
//the input data needs to be attached to the cuts
- //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 (!rpCuts || !poiCuts) return;
- AliFlowTrackCuts::trackParameterType sourceRP = rpCuts->GetParamType();
- AliFlowTrackCuts::trackParameterType sourcePOI = poiCuts->GetParamType();
-
- if (sourceRP==sourcePOI)
- {
- //loop over tracks
- Int_t numberOfInputObjects = rpCuts->GetNumberOfInputObjects();
- for (Int_t i=0; i<numberOfInputObjects; i++)
- {
- //get input object (particle)
- TObject* particle = rpCuts->GetInputObject(i);
-
- Bool_t rp = rpCuts->IsSelected(particle,i);
- Int_t poiClass = poiCuts->IsSelected(particle,i);
-
- if (!(rp||poiClass>0)) continue;
-
- //make new AliFLowTrack
- AliFlowTrack* pTrack = NULL;
- if (rp)
- {
- pTrack = rpCuts->FillFlowTrack(fTrackCollection,fNumberOfTracks);
- if (!pTrack) continue;
- pTrack->TagRP(); IncrementNumberOfPOIs(0);
- if (poiClass>0) {pTrack->Tag(poiClass); IncrementNumberOfPOIs(poiClass);}
- }
- else
- if (poiClass>0)
- {
- pTrack = poiCuts->FillFlowTrack(fTrackCollection,fNumberOfTracks);
- if (!pTrack) continue;
- pTrack->Tag(poiClass); IncrementNumberOfPOIs(poiClass);
- }
- TrackAdded();
- }//end of while (i < numberOfTracks)
- }
- else if (sourceRP!=sourcePOI)
- {
- //here we have two different sources of particles, so we fill
- //them independently
- AliFlowTrack* pTrack = NULL;
- //RP
- Int_t numberOfInputObjects = rpCuts->GetNumberOfInputObjects();
- for (Int_t i=0; i<numberOfInputObjects; i++)
- {
- TObject* particle = rpCuts->GetInputObject(i);
- Bool_t rp = rpCuts->IsSelected(particle,i);
- if (!rp) continue;
- pTrack = rpCuts->FillFlowTrack(fTrackCollection,fNumberOfTracks);
- if (!pTrack) continue;
- pTrack->TagRP(); IncrementNumberOfPOIs(0);
- TrackAdded();
- }
- //POI
- numberOfInputObjects = poiCuts->GetNumberOfInputObjects();
- for (Int_t i=0; i<numberOfInputObjects; i++)
- {
- TObject* particle = poiCuts->GetInputObject(i);
- Int_t poiClass = poiCuts->IsSelected(particle,i);
- if (poiClass<=0) continue;
- pTrack = poiCuts->FillFlowTrack(fTrackCollection,fNumberOfTracks);
- if (!pTrack) continue;
- pTrack->Tag(poiClass); IncrementNumberOfPOIs(poiClass);
- TrackAdded();
- }
- }
+ Fill(rpCuts,poiCuts);
}
//-------------------------------------------------------------------//
AliFlowEvent::AliFlowEvent( const AliESDEvent* anInput,
const AliESDPmdTrack *pmdtracks,
const AliCFManager* poiCFManager ):
- AliFlowEventSimple(20), fApplyRecentering(kFALSE), fCachedRun(-1), fCurrentCentrality(-1)
+ AliFlowEventSimple(20), fApplyRecentering(kFALSE), fCachedRun(-1), fVZEROcentralityBin(-1)
{
// constructor
for(Int_t i(0); i < 9; i++) {
Double_t Qycrms(1);
if( n == 2) { // second order symmetry
- Qxamean = fMeanQ[fCurrentCentrality][1][0];
- Qxarms = fWidthQ[fCurrentCentrality][1][0];
- Qyamean = fMeanQ[fCurrentCentrality][1][1];
- Qyarms = fWidthQ[fCurrentCentrality][1][1];
-
- Qxcmean = fMeanQ[fCurrentCentrality][0][0];
- Qxcrms = fWidthQ[fCurrentCentrality][0][0];
- Qycmean = fMeanQ[fCurrentCentrality][0][1];
- Qycrms = fWidthQ[fCurrentCentrality][0][1];
+ Qxamean = fMeanQ[fVZEROcentralityBin][1][0];
+ Qxarms = fWidthQ[fVZEROcentralityBin][1][0];
+ Qyamean = fMeanQ[fVZEROcentralityBin][1][1];
+ Qyarms = fWidthQ[fVZEROcentralityBin][1][1];
+
+ Qxcmean = fMeanQ[fVZEROcentralityBin][0][0];
+ Qxcrms = fWidthQ[fVZEROcentralityBin][0][0];
+ Qycmean = fMeanQ[fVZEROcentralityBin][0][1];
+ Qycrms = fWidthQ[fVZEROcentralityBin][0][1];
} else if (n == 3) { // third order symmetry
- Qxamean = fMeanQv3[fCurrentCentrality][1][0];
- Qxarms = fWidthQv3[fCurrentCentrality][1][0];
- Qyamean = fMeanQv3[fCurrentCentrality][1][1];
- Qyarms = fWidthQv3[fCurrentCentrality][1][1];
+ Qxamean = fMeanQv3[fVZEROcentralityBin][1][0];
+ Qxarms = fWidthQv3[fVZEROcentralityBin][1][0];
+ Qyamean = fMeanQv3[fVZEROcentralityBin][1][1];
+ Qyarms = fWidthQv3[fVZEROcentralityBin][1][1];
- Qxcmean = fMeanQv3[fCurrentCentrality][0][0];
- Qxcrms = fWidthQv3[fCurrentCentrality][0][0];
- Qycmean = fMeanQv3[fCurrentCentrality][0][1];
- Qycrms = fWidthQv3[fCurrentCentrality][0][1];
+ Qxcmean = fMeanQv3[fVZEROcentralityBin][0][0];
+ Qxcrms = fWidthQv3[fVZEROcentralityBin][0][0];
+ Qycmean = fMeanQv3[fVZEROcentralityBin][0][1];
+ Qycrms = fWidthQv3[fVZEROcentralityBin][0][1];
}
// do the correction
Double_t QxaCor = (Qxa - Qxamean)/Qxarms;
if(!cuts->GetEvent()) return; // coverity. we need to know the event to get the runnumber and centrlaity
// get the vzero centrality percentile (cc dependent calibration)
Float_t v0Centr(cuts->GetEvent()->GetCentrality()->GetCentralityPercentile("V0M"));
- if(v0Centr < 5) fCurrentCentrality = 0;
- else if(v0Centr < 10) fCurrentCentrality = 1;
- else if(v0Centr < 20) fCurrentCentrality = 2;
- else if(v0Centr < 30) fCurrentCentrality = 3;
- else if(v0Centr < 40) fCurrentCentrality = 4;
- else if(v0Centr < 50) fCurrentCentrality = 5;
- else if(v0Centr < 60) fCurrentCentrality = 6;
- else if(v0Centr < 70) fCurrentCentrality = 7;
- else fCurrentCentrality = 8;
+ if(v0Centr < 5) fVZEROcentralityBin = 0;
+ else if(v0Centr < 10) fVZEROcentralityBin = 1;
+ else if(v0Centr < 20) fVZEROcentralityBin = 2;
+ else if(v0Centr < 30) fVZEROcentralityBin = 3;
+ else if(v0Centr < 40) fVZEROcentralityBin = 4;
+ else if(v0Centr < 50) fVZEROcentralityBin = 5;
+ else if(v0Centr < 60) fVZEROcentralityBin = 6;
+ else if(v0Centr < 70) fVZEROcentralityBin = 7;
+ else fVZEROcentralityBin = 8;
// if this event is from the same run as the previous event
// we can use the cached calibration values, no need to re-open the
}
//_____________________________________________________________________________
+void AliFlowEvent::ClearFast()
+{
+ //clear the event without releasing any memory
+ AliFlowEventSimple::ClearFast();
+ fApplyRecentering=0;
+ fCachedRun=0;
+}