]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/RESONANCES/AliRsnDaughterDef.h
Added facilities to include 1-track histograms, for monitoring and checks
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnDaughterDef.h
1 //
2 // Class AliRsnDaughterDef
3 //
4 // Defines some requirements to select a good candidate daughter for a resonance
5 // among all available objects presend in each event (tracks, V0s, etc. ...).
6 // This includes:
7 // -- track type (charged track, V0, cascade)
8 // -- track charge
9 // -- track PID type and related mass (only for charged)
10 //
11 // author: A. Pulvirenti (alberto.pulvirenti@ct.infn.it)
12 //
13
14 #ifndef ALIRSNDAUGHTERDEF_H
15 #define ALIRSNDAUGHTERDEF_H
16
17 #include "AliPID.h"
18 #include "AliRsnDaughter.h"
19
20 class AliRsnDaughterDef : public TObject {
21 public:
22
23    AliRsnDaughterDef();
24    AliRsnDaughterDef(AliPID::EParticleType type, Char_t sign);
25    AliRsnDaughterDef(const AliRsnDaughterDef &copy);
26    const AliRsnDaughterDef& operator= (const AliRsnDaughterDef &copy);
27    virtual ~AliRsnDaughterDef() { }
28
29    // getters
30    Double_t                 GetMass()         const {return fMass;}
31    Char_t                   GetCharge()       const {return fCharge;}
32    Short_t                  GetChargeShort()  const {if (fCharge == '+') return 1; else if (fCharge == '-') return -1; else return 0;}
33    AliPID::EParticleType    GetPID()          const {return fPID;}
34    AliRsnDaughter::ERefType GetDaughterType() const {return fDaughterType;}
35    const char*              GetName()         const {return Form("%s%c", AliPID::ParticleShortName(fPID), fCharge);}
36
37    // setters
38    Bool_t SetDaughter(AliPID::EParticleType pid, Char_t charge);
39    
40    // checker
41    Bool_t MatchesDaughter(AliRsnDaughter *daughter, Bool_t truePID = kFALSE);
42
43 private:
44
45    Double_t                  fMass;         // mass of particles
46    Char_t                    fCharge;       // charge of particles
47    AliPID::EParticleType     fPID;          // PID of particles
48    AliRsnDaughter::ERefType  fDaughterType; // object type (track/V0)
49
50    // ROOT dictionary
51    ClassDef(AliRsnDaughterDef, 1)
52 };
53
54 #endif