]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/RESONANCES/AliRsnEvent.h
Upgrades for setting up a working version of ME task
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnEvent.h
1 //
2 // *** Class AliRsnEvent ***
3 //
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.
9 //
10 // authors: A. Pulvirenti (email: alberto.pulvirenti@ct.infn.it)
11 //          M. Vala (email: martin.vala@cern.ch)
12 //
13
14 #ifndef ALIRSNEVENT_H
15 #define ALIRSNEVENT_H
16
17 #include "AliPID.h"
18 #include "AliRsnPIDDefESD.h"
19 #include "AliRsnDaughter.h"
20
21 class AliVEvent;
22 class AliMCEvent;
23
24 class AliRsnEvent : public TObject
25 {
26   public:
27
28     AliRsnEvent(AliVEvent *ref = 0, AliMCEvent *refMC = 0);
29     AliRsnEvent(const AliRsnEvent& copy);
30     AliRsnEvent& operator= (const AliRsnEvent& copy);
31     virtual ~AliRsnEvent();
32
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;}
38
39     void             SetDaughter(AliRsnDaughter &daughter, Int_t index);
40     AliRsnDaughter   GetDaughter(Int_t i);
41     Int_t            GetMultiplicity();
42     Double_t         GetVz();
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);
46
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);
49     void             DumpPriors();
50     void             GetPriorProbability(Double_t *out) const;
51
52   private:
53
54     Bool_t AcceptTrackPID(AliRsnDaughter*const d, AliPID::EParticleType type = AliPID::kUnknown);
55
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
60
61     ClassDef(AliRsnEvent, 3);
62 };
63
64 #endif