]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/RESONANCES/AliRsnEvent.h
Package upgrade.
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnEvent.h
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  * See cxx source for full Copyright notice                               *
4  **************************************************************************/
5
6 /* $Id$ */
7
8 //
9 // *** Class AliRsnEvent ***
10 //
11 // A container for a collection of AliRsnDaughter objects from an event.
12 // Contains also the primary vertex, useful for some cuts.
13 // In order to retrieve easily the tracks which have been identified
14 // as a specific type and charge, there is an array of indexes which
15 // allows to avoid to loop on all tracks and have only the neede ones.
16 //
17 // authors: A. Pulvirenti (email: alberto.pulvirenti@ct.infn.it)
18 //          M. Vala (email: martin.vala@cern.ch)
19 //
20
21 #ifndef ALIRSNEVENT_H
22 #define ALIRSNEVENT_H
23
24 class AliRsnDaughter;
25
26 #include <TNamed.h>
27 #include <TArrayI.h>
28 #include <TClonesArray.h>
29 #include "AliRsnPID.h"
30 #include "AliRsnPIDIndex.h"
31
32 class AliRsnEvent : public TNamed
33 {
34   public:
35
36     AliRsnEvent();
37     AliRsnEvent (const AliRsnEvent& copy);
38     AliRsnEvent& operator= (const AliRsnEvent& copy);
39     virtual ~AliRsnEvent();
40
41     // Array management
42     void            Init();
43     void            Clear (Option_t *option = "");
44     AliRsnDaughter* AddTrack (AliRsnDaughter track);
45     AliRsnDaughter* GetTrack (Int_t index);
46     TClonesArray*   GetTracks() {return fTracks;}
47     TArrayI*        GetCharged (Char_t sign);
48     TArrayI*        GetTracksArray (AliRsnPID::EMethod pidtype, Char_t sign, AliRsnPID::EType type);
49     void            FillPIDArrays();
50     void            Print (Option_t *option = "") const;
51
52     // Primary vertex
53     Double_t GetPrimaryVertexX() const {return fPVx;}
54     Double_t GetPrimaryVertexY() const {return fPVy;}
55     Double_t GetPrimaryVertexZ() const {return fPVz;}
56     void     GetPrimaryVertex (Double_t &x, Double_t &y, Double_t &z) const {x=fPVx;y=fPVy;z=fPVz;}
57     void     SetPrimaryVertexX (Double_t value) {fPVx = value;}
58     void     SetPrimaryVertexY (Double_t value) {fPVy = value;}
59     void     SetPrimaryVertexZ (Double_t value) {fPVz = value;}
60     void     SetPrimaryVertex (Double_t x, Double_t y, Double_t z) {fPVx=x;fPVy=y;fPVz=z;}
61
62     // Multiplicity
63     Int_t GetMultiplicity() const;
64     Int_t GetNCharged (Char_t sign);
65
66   private:
67
68     Int_t ChargeIndex (Char_t sign) const;
69     Int_t Fill (TObjArray *array);
70
71     Double_t        fPVx;                 // position of
72     Double_t        fPVy;                 // primary
73     Double_t        fPVz;                 // vertex
74
75     TClonesArray   *fTracks;              // collection of particles
76
77     AliRsnPIDIndex *fNoPID;               // array index only for charged tracks
78     AliRsnPIDIndex *fPerfectPID;          // array index for perfect PID
79     AliRsnPIDIndex *fRealisticPID;        // array index for realistic PID (largest prob)
80
81     ClassDef (AliRsnEvent, 2);
82 };
83
84 #endif