Added some useful constructors to AliRsnDaughterDef
authorpulvir <pulvir@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 17 Feb 2011 15:10:11 +0000 (15:10 +0000)
committerpulvir <pulvir@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 17 Feb 2011 15:10:11 +0000 (15:10 +0000)
PWG2/RESONANCES/AliRsnDaughterDef.cxx
PWG2/RESONANCES/AliRsnDaughterDef.h

index c9c8dc4..7fa727a 100644 (file)
 
 ClassImp(AliRsnDaughterDef)
 
+
+//_____________________________________________________________________________
+AliRsnDaughterDef::AliRsnDaughterDef() :
+   fMass(0.0),
+   fCharge(0),
+   fPID(AliPID::kUnknown),
+   fDaughterType(AliRsnDaughter::kNoType)
+{
+//
+// Constructor.
+// This version of constructor leaves all undefined,
+// and all daughters will be accepted.
+//
+}
+
 //_____________________________________________________________________________
-AliRsnDaughterDef::AliRsnDaughterDef
-(AliPID::EParticleType type, Char_t sign) :
+AliRsnDaughterDef::AliRsnDaughterDef(AliPID::EParticleType type, Char_t sign) :
    fMass(0.0),
    fCharge(sign),
    fPID(type),
    fDaughterType(AliRsnDaughter::kNoType)
 {
 //
-// Constructor with arguments.
-// This constructor allows to define all the working parameters.
+// Constructor.
+// This version of constructor initializes the PID type
+// and the charge (optional, leave its default to include both),
+// and calls 'SetDaughter()' to assign the object type accordingly.
 //
 
    SetDaughter(type, sign);
 }
 
+//_____________________________________________________________________________
+AliRsnDaughterDef::AliRsnDaughterDef(AliRsnDaughter::ERefType refType, Char_t sign) :
+   fMass(0.0),
+   fCharge(sign),
+   fPID(AliPID::kUnknown),
+   fDaughterType(refType)
+{
+//
+// Constructor.
+// This version of constructor initialized the object type
+// and the charge (optiona, leave its defaul to include both),
+// and sets the PID type undefined.
+//
+}
 
 //_____________________________________________________________________________
 AliRsnDaughterDef::AliRsnDaughterDef(const AliRsnDaughterDef &copy) :
index 5ee531b..dff7112 100644 (file)
@@ -20,7 +20,9 @@
 class AliRsnDaughterDef : public TObject {
 public:
 
-   AliRsnDaughterDef(AliPID::EParticleType type = AliPID::kUnknown, Char_t sign = 0);
+   AliRsnDaughterDef();
+   AliRsnDaughterDef(AliPID::EParticleType type, Char_t charge = 0);
+   AliRsnDaughterDef(AliRsnDaughter::ERefType refType, Char_t charge = 0);
    AliRsnDaughterDef(const AliRsnDaughterDef &copy);
    const AliRsnDaughterDef& operator= (const AliRsnDaughterDef &copy);
    virtual ~AliRsnDaughterDef() { }