////////////////////////////////////////////////////////////////////// // // $Id: AliFlowEvent.h 18618 2007-05-16 15:38:22Z snelling $ // // Author: Emanuele Simili // ////////////////////////////////////////////////////////////////////// // // Description: event format fitted to flow study, adapted from STAR. // The AliFlowEvent object stores global event variables, tracks and // v0s, and provides the method to calculate Flow observables (Q vector, // R.P. angle, phi weights). It needs an AliFlowSelection object. // // Original Authors: Raimond Snellings & Art Poskanzer // ////////////////////////////////////////////////////////////////////// #ifndef AliFlowEvent_h #define AliFlowEvent_h #include "TVector.h" #include "TVector2.h" #include "TVector3.h" #include "TClonesArray.h" #include "TNamed.h" #include "AliFlowConstants.h" class AliFlowTrack ; class AliFlowV0 ; class AliFlowSelection ; class AliFlowEvent : public TNamed { public: AliFlowEvent() ; // default constructor (to read events) AliFlowEvent(Int_t length) ; // (new) constructor (to create events) virtual ~AliFlowEvent(); // Arrays TClonesArray* TrackCollection() const { return fTrackCollection; } // Returns a pointer to the TClonesArray of AliFlowTrack TClonesArray* V0Collection() const { return fV0Collection; } // Returns a pointer to the TClonesArray of AliFlowV0 // Calculations void MakeAll() ; // In just one loop, makes all the calculaton (Q, psi, mult) basing on the selection. Int_t Mult(AliFlowSelection* pFlowSelect) const ; // Returns Multiplicity of tracks selected for the event plane Float_t MeanPt(AliFlowSelection* pFlowSelect) const ; // Returns Mean pt of tracks selected for the event plane TVector2 Q(AliFlowSelection* pFlowSelect) const ; // Returns Event plane vector TVector2 NormQ(AliFlowSelection* pFlowSelect) const ; // Returns normalized Q = Q/sqrt(weights^2++) Float_t OldQ(AliFlowSelection* pFlowSelect) const ; // Returns Magnitude of normalized Q vector without pt or eta weighting Float_t Psi(AliFlowSelection* pFlowSelect) const ; // Returns Event plane angle Double_t SumWeightSquare(AliFlowSelection* pFlowSelect) const ; // Returns Sum of weights^2 Double_t WgtMultQ4(AliFlowSelection* pFlowSelect) const ; // old comulants Double_t WgtMultQ6(AliFlowSelection* pFlowSelect) const ; // old comulants void SetSelections(AliFlowSelection* pFlowSelect) ; // Sets the tracks selection for R.P. calculations (see static cuts in AliFlowSelection class) void MakeSubEvents() const ; // Makes sub-events, eta based (if EtaSubs()) or Random (otherwise) void MakeRndSubEvents() const ; // Makes random sub-events void MakeEtaSubEvents() const ; // Makes eta sub-events void MakeChrSubEvents() const ; // Makes charged (+/-) sub-events void SetPids() ; // Re-sets the tracks P.id. (using the current fBayesianCs[] array) void RandomShuffle() ; // Randomly re-shuffles the ObjArray of tracks Double_t NewG(AliFlowSelection* pFlowSelect,Double_t Zx,Double_t Zy) const ; // Generating function for the new cumulant method (eq.3 in the Practical Guide) Double_t OldG(AliFlowSelection* pFlowSelect,Double_t Zx,Double_t Zy) const ; // Generating function for the old cumulant method (if expanded in Taylor series, one recovers G_New() in new new cumulant method) Double_t PhiWeight(Int_t selN,Int_t harN,AliFlowTrack* pFlowTrack) const ; // Returns PhiWeightRaw()*Weight() Double_t PhiWeightRaw(Int_t selN,Int_t harN,AliFlowTrack* pFlowTrack) const ; // Returns weights for making the R.P. isotropic in the lab Double_t Weight(Int_t selN,Int_t harN,AliFlowTrack* pFlowTrack) const ; // Returns weights for enhancing the resolution (+/-Sign(eta) for odd harmonics) TVector Bayesian() const ; // Returns the stored particle abundances as a TVector void Bayesian(Double_t bayes[AliFlowConstants::kPid]) const { for(Int_t i=0;iGetEntries() ; } // Returns the number of V0s Int_t TrackMult() const { return fTrackCollection->GetEntries() ; } // Returns number of tracks stored in the event Int_t UncorrNegMult(Float_t eta = AliFlowConstants::fgEtaGood) const ; // Returns number of - tracks in eta (-eta;eta) Int_t UncorrPosMult(Float_t eta = AliFlowConstants::fgEtaGood) const ; // Returns number of + tracks in eta (-eta;eta) Int_t MultEta() const ; // Returns multiplicity in |eta|