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)
17 #include "AliESDEvent.h"
18 #include "AliAODEvent.h"
19 #include "AliRsnDaughter.h"
25 class AliRsnEvent : public TObject
29 AliRsnEvent(AliVEvent *ref = 0, AliMCEvent *refMC = 0);
30 AliRsnEvent(const AliRsnEvent& copy);
31 AliRsnEvent& operator= (const AliRsnEvent& copy);
32 virtual ~AliRsnEvent();
34 void SetRef(AliVEvent * const event, AliMCEvent * const mc = 0) {fRef = event; fRefMC = mc;}
35 AliVEvent* GetRef() const {return fRef;}
36 AliMCEvent* GetRefMC() const {return fRefMC;}
37 AliESDEvent* GetRefESD() const {return dynamic_cast<AliESDEvent*>(fRef);}
38 AliAODEvent* GetRefAOD() const {return dynamic_cast<AliAODEvent*>(fRef);}
39 Bool_t IsESD() const {return (GetRefESD() != 0x0);}
40 Bool_t IsAOD() const {return (GetRefAOD() != 0x0);}
43 Int_t GetMultiplicity();
45 Bool_t SetDaughter(AliRsnDaughter &daughter, Int_t index, AliRsnDaughter::ERefType type = AliRsnDaughter::kTrack);
46 Bool_t SetDaughterMC(AliRsnDaughter &daughter, Int_t index);
47 AliRsnDaughter GetDaughter(Int_t i, AliRsnDaughter::ERefType type = AliRsnDaughter::kTrack);
48 AliRsnDaughter GetDaughterMC(Int_t i);
50 Int_t SelectLeadingParticle(Double_t ptMin = 0.0, AliRsnCutPID *cutPID = 0x0);
51 Int_t GetLeadingParticleID() {return fLeading;}
52 void SetLeadingParticle(AliRsnDaughter &leading) {if (fLeading >= 0) SetDaughter(leading, fLeading);}
53 Double_t GetAverageMomentum(Int_t &count, AliRsnCutPID *cutPID = 0x0);
54 Bool_t GetAngleDistr(Double_t &angleMean, Double_t &angleRMS, AliRsnDaughter reference);
58 AliVEvent *fRef; // pointer to input event
59 AliMCEvent *fRefMC; // pointer to reference MC event (if any)
60 Int_t fLeading; // index of leading track
62 ClassDef(AliRsnEvent, 3);