]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/RESONANCES/AliRsnEvent.h
trackmultiplicity based on RP cuts
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnEvent.h
CommitLineData
06351446 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//
0dffcc8a 13
14#ifndef ALIRSNEVENT_H
15#define ALIRSNEVENT_H
16
2dab9030 17#include "AliESDEvent.h"
18#include "AliAODEvent.h"
e2bafbbc 19#include "AliRsnDaughter.h"
78b94cbd 20
5eb970a4 21class AliVEvent;
22class AliMCEvent;
2dab9030 23class AliRsnCutPID;
7c2974c8 24
5eb970a4 25class AliRsnEvent : public TObject
0dffcc8a 26{
06351446 27 public:
28
5eb970a4 29 AliRsnEvent(AliVEvent *ref = 0, AliMCEvent *refMC = 0);
aec0ec32 30 AliRsnEvent(const AliRsnEvent& copy);
06351446 31 AliRsnEvent& operator= (const AliRsnEvent& copy);
7c2974c8 32 virtual ~AliRsnEvent();
33
2dab9030 34 void SetRef(AliVEvent * const event, AliMCEvent * const mc = 0) {fRef = event; fRefMC = mc;}
9477aa42 35 AliVEvent* GetRef() const {return fRef;}
36 AliMCEvent* GetRefMC() const {return fRefMC;}
2dab9030 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);}
41
4fbb2459 42 Double_t GetVz();
2dab9030 43 Int_t GetMultiplicity();
44
45 Bool_t SetDaughter(AliRsnDaughter &daughter, Int_t index, AliRsnDaughter::ERefType type = AliRsnDaughter::kTrack);
2e521c29 46 Bool_t SetDaughterMC(AliRsnDaughter &daughter, Int_t index);
2dab9030 47 AliRsnDaughter GetDaughter(Int_t i, AliRsnDaughter::ERefType type = AliRsnDaughter::kTrack);
2e521c29 48 AliRsnDaughter GetDaughterMC(Int_t i);
2dab9030 49
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);
06351446 55
56 private:
57
2dab9030 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
06351446 61
15d5fd02 62 ClassDef(AliRsnEvent, 3);
0dffcc8a 63};
64
65#endif