2 // *** Class AliRsnEvent ***
4 // A container for a collection of AliRsnDaughter objects from an event.
5 // Contains also the primary vertex, useful for some cuts.
6 // In order to retrieve easily the tracks which have been identified
7 // as a specific type and charge, there is an array of indexes which
8 // allows to avoid to loop on all tracks and have only the neede ones.
10 // authors: A. Pulvirenti (email: alberto.pulvirenti@ct.infn.it)
11 // M. Vala (email: martin.vala@cern.ch)
18 #include "AliRsnPIDDefESD.h"
19 #include "AliRsnDaughter.h"
24 class AliRsnEvent : public TObject
28 AliRsnEvent(AliVEvent *ref = 0, AliMCEvent *refMC = 0);
29 AliRsnEvent(const AliRsnEvent& copy);
30 AliRsnEvent& operator= (const AliRsnEvent& copy);
31 virtual ~AliRsnEvent();
33 void SetRef(AliVEvent *const event, AliMCEvent *const mc = 0) {fRef = event; fRefMC = mc;}
34 void SetRefMC(AliMCEvent * const mc) {fRefMC = mc;}
35 AliVEvent* GetRef() const {return fRef;}
36 AliMCEvent* GetRefMC() const {return fRefMC;}
37 AliRsnPIDDefESD* GetPIDDefESD() {return &fPIDDefESD;}
39 void SetDaughter(AliRsnDaughter &daughter, Int_t index);
40 AliRsnDaughter GetDaughter(Int_t i);
41 Int_t GetMultiplicity();
43 AliRsnDaughter GetLeadingParticle(Double_t ptMin = 0.0, AliPID::EParticleType type = AliPID::kUnknown);
44 Double_t GetAverageMomentum(Int_t &count, AliPID::EParticleType type = AliPID::kUnknown);
45 Bool_t GetAngleDistr(Double_t &angleMean, Double_t &angleRMS, AliRsnDaughter d);
47 void SetPriorProbability(AliPID::EParticleType type, Double_t p) {if (type>=0&&type<(Int_t)AliPID::kSPECIES)fPrior[type]=p;}
48 void SetPriorProbability(Double_t* const out);
50 void GetPriorProbability(Double_t *out) const;
54 Bool_t AcceptTrackPID(AliRsnDaughter*const d, AliPID::EParticleType type = AliPID::kUnknown);
56 Double_t fPrior[AliPID::kSPECIES]; // prior probabilities
57 AliVEvent *fRef; // pointer to input event
58 AliMCEvent *fRefMC; // pointer to reference MC event (if any)
59 AliRsnPIDDefESD fPIDDefESD; // (optional) customization of PID weights for ESD
61 ClassDef(AliRsnEvent, 3);