+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+////////////////////////////////////////////////////////////////////////////////
//
-// Class AliRsnMother
+// This class implements a candidate resonance. It has two pointers to its
+// two candidate daughters, whose 4-momenta are combined to obtain the mother
+// invariant mass and other kinematical quantities.
+// This class contains also some methods used to compute kinematical relations
+// between the candidate resonance and other particles.
//
-// Implementation of a pair of tracks, for several purposes
-// - computing the total 4-momentum & inv. mass for output histos filling
-// - evaluating cut checks on the pair of particles
-// - evaluating any kind of kinematic value over their sum
-//
-// authors: Martin Vala (martin.vala@cern.ch)
-// Alberto Pulvirenti (alberto.pulvirenti@ct.infn.it)
+// authors: A. Pulvirenti (alberto.pulvirenti@ct.infn.it)
+// M. Vala (martin.vala@cern.ch)
//
+////////////////////////////////////////////////////////////////////////////////
#include <Riostream.h>
#include <TVector3.h>
#include "AliAODMCParticle.h"
#include "AliMCParticle.h"
#include "AliRsnDaughter.h"
-#include "AliRsnPairDef.h"
#include "AliRsnMother.h"
ClassImp(AliRsnMother)
{
//
// Copy constructor.
-// Initializes all variables to copy values.
// Does not duplicate pointers.
//
{
//
// Assignment operator.
-// Initializes all variables to copy values.
// Does not duplicate pointers.
//
Int_t AliRsnMother::CommonMother(Int_t &m0, Int_t &m1) const
{
//
-// Checks if the two tracks in the pair have the same mother.
-// This can be known if MC info is present.
-// If the mother label is the same, rhe PDG code of the mother is returned,
-// otherwise the method returns 0.
-// In the two arguments passed by reference, the mothers of the two daghters are stored
+// If MC info is available, checks if the two tracks in the pair have the same mother.
+// If the mother label is the same, the function returns the PDG code of mother,
+// otherwise it returns 0.
+// The two arguments passed by reference contain the GEANT labels of the mother
+// of the two particles to which the two daughters point. This is for being able
+// to check if they are really coming from a resonance (indexes >= 0) or not.
//
- // if MC info is not available, the pair is not true by default
+ // if MC info is not available, the check can't be done
if (!fDaughter[0]->GetRefMC() || !fDaughter[1]->GetRefMC()) {
- AliWarning("Cannot know if the pairs is true or not because MC Info is not present");
+ AliDebug(AliLog::kDebug, "MC Info absent --> cannot check common mother");
return 0;
}
m1 = fDaughter[1]->GetRefMCAOD()->GetMother();
}
}
- if (m0 != m1) return 0;
-
- // if we reach this point, the two tracks have the same mother
- // let's check now the PDG code of this common mother
- return TMath::Abs(fDaughter[0]->GetMotherPDG());
+
+ // decide the answer depending on the two mother labels
+ if (m0 != m1)
+ return 0;
+ else
+ return TMath::Abs(fDaughter[0]->GetMotherPDG());
}
//_____________________________________________________________________________
(AliRsnDaughter *d0, Double_t mass0, AliRsnDaughter *d1, Double_t mass1)
{
//
-// Sets the pair defined in this usind tso passed daughters and two masses
-// which will be assigned to them, in order to recompute their 4-momenta
-// and sum them into the datamembers of this object.
+// Define both the two candidate daughters to use, and the mass hypothesis
+// to be assigned to each of them.
+// This calls the 'SetMass()' function of each daughter, which defines
+// their 4-momenta, and then sums them to obtain the total 4-momentum
+// of the mother (and then invariant mass, also).
+// The computation is done always for both the reconstructed and the MC,
+// when it is available.
//
if (d0) fDaughter[0] = d0;
void AliRsnMother::ResetPair()
{
//
-// Resets the mother, nullifying all data members
+// Resets the mother, zeroing all data members.
//
Int_t i;
//_____________________________________________________________________________
Double_t AliRsnMother::CosThetaStar(Bool_t first, Bool_t useMC)
{
+//
+// Computes the cosine of theta*, which is the angle of one of the daughters
+// with respect to the total momentum of the resonance, in its rest frame.
+// The arguments are needed to choose which of the daughters one want to use
+// and if reconstructed or MC momentum must be used.
+// [Contribution from Z. Feckova]
+//
+
TLorentzVector mother = (useMC ? fSumMC : fSum);
TLorentzVector daughter0 = (first ? fDaughter[0]->P(useMC) : fDaughter[1]->P(useMC));
TLorentzVector daughter1 = (first ? fDaughter[1]->P(useMC) : fDaughter[0]->P(useMC));
TVector3 normal(mother.Y() / momentumM.Mag(), -mother.X() / momentumM.Mag(), 0.0);
// Computes first the invariant mass of the mother
- Double_t mass0 = fDaughter[0]->P(useMC).M();
- Double_t mass1 = fDaughter[1]->P(useMC).M();
- Double_t p0 = daughter0.Vect().Mag();
- Double_t p1 = daughter1.Vect().Mag();
- Double_t E0 = TMath::Sqrt(mass0 * mass0 + p0 * p0);
- Double_t E1 = TMath::Sqrt(mass1 * mass1 + p1 * p1);
- Double_t MotherMass = TMath::Sqrt((E0 + E1) * (E0 + E1) - (p0 * p0 + 2.0 * daughter0.Vect().Dot(daughter1.Vect()) + p1 * p1));
+ Double_t mass0 = fDaughter[0]->P(useMC).M();
+ Double_t mass1 = fDaughter[1]->P(useMC).M();
+ Double_t p0 = daughter0.Vect().Mag();
+ Double_t p1 = daughter1.Vect().Mag();
+ Double_t E0 = TMath::Sqrt(mass0 * mass0 + p0 * p0);
+ Double_t E1 = TMath::Sqrt(mass1 * mass1 + p1 * p1);
+ Double_t MotherMass = TMath::Sqrt((E0 + E1) * (E0 + E1) - (p0 * p0 + 2.0 * daughter0.Vect().Dot(daughter1.Vect()) + p1 * p1));
MotherMass = fSum.M();
// Computes components of beta