1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 ////////////////////////////////////////////////////////////////////////////////
18 // This class is a simple set of definitions which are used to define a
19 // decay tree to be studied for a resonance, in terms of the PID and charge
20 // of its candidate daughters, which in turn determins what kind of objects
21 // the analysis must take into account.
22 // This object contains two AliRsnDaughterDef which define a model for each
23 // of the two expected daughters (see also AliRsnDaughterDef class) plus a
24 // mass hypothesis for the resonance, which is used for computin quantities
25 // which need it (like rapidity or Mt), and a PDG code, which is used to
26 // check for true pairs, when needed. In all other cases, these two additional
27 // values can be left to their default (meaningless) value.
28 // Since this object must define a decay channel, the only provided constructor
29 // allow to set a PID and a charge.
31 // authors: A. Pulvirenti (alberto.pulvirenti@ct.infn.it)
32 // M. Vala (martin.vala@cern.ch)
34 ////////////////////////////////////////////////////////////////////////////////
37 #include "AliRsnMother.h"
38 #include "AliRsnPairDef.h"
40 ClassImp(AliRsnPairDef)
42 //_____________________________________________________________________________
43 AliRsnPairDef::AliRsnPairDef() : fMotherMass(0.0), fMotherPDG(0), fDef1(), fDef2()
47 // Initializes the data members to default values:
48 // - no definition of particles in the pair;
49 // - histogram binning undefined.
50 // When using this constructor, all analysis elements (particles, histogram)
51 // must be defined before starting event processing.
55 //_____________________________________________________________________________
56 AliRsnPairDef::AliRsnPairDef
57 (EPARTYPE type1, Char_t sign1, EPARTYPE type2, Char_t sign2, Int_t motherPDG, Double_t motherMass) :
58 fMotherMass(motherMass),
59 fMotherPDG(motherPDG),
60 fDef1(AliRsnDaughter::FromAliPID(type1), sign1),
61 fDef2(AliRsnDaughter::FromAliPID(type2), sign2)
64 // Constructor with arguments.
65 // This constructor allows to define all the working parameters.
69 //_____________________________________________________________________________
70 AliRsnPairDef::AliRsnPairDef
71 (AliRsnDaughter::ESpecies type1, Char_t sign1, AliRsnDaughter::ESpecies type2, Char_t sign2, Int_t motherPDG, Double_t motherMass) :
72 fMotherMass(motherMass),
73 fMotherPDG(motherPDG),
78 // Constructor with arguments.
79 // This constructor allows to define all the working parameters.
83 //_____________________________________________________________________________
84 AliRsnPairDef::AliRsnPairDef(const AliRsnPairDef ©) :
86 fMotherMass(copy.fMotherMass),
87 fMotherPDG(copy.fMotherPDG),
92 // Copy constructor with standard behavior
96 //_____________________________________________________________________________
97 const AliRsnPairDef& AliRsnPairDef::operator=(const AliRsnPairDef ©)
100 // Assignment operator with standard behavior.
103 fMotherMass = copy.fMotherMass;
104 fMotherPDG = copy.fMotherPDG;
111 //_____________________________________________________________________________
112 const char* AliRsnPairDef::GetPairName() const
115 // Returns a compact string with the name of the pair,
116 // to be used for naming objects related to it.
119 return Form("%s%s", fDef1.GetName(), fDef2.GetName());