]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Removed the 'useMC' data member which is never used along the class. In the only...
authorpulvir <pulvir@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 21 Feb 2011 08:11:48 +0000 (08:11 +0000)
committerpulvir <pulvir@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 21 Feb 2011 08:11:48 +0000 (08:11 +0000)
PWG2/RESONANCES/AliRsnMother.cxx
PWG2/RESONANCES/AliRsnMother.h

index 6bb49fe9e5e19f559655524dbdf45d9ddf35799c..126086b684cb24f46bd08d5797176767563dc97e 100644 (file)
@@ -23,7 +23,6 @@ ClassImp(AliRsnMother)
 
 //_____________________________________________________________________________
 AliRsnMother::AliRsnMother() :
 
 //_____________________________________________________________________________
 AliRsnMother::AliRsnMother() :
-   fUseMC(kFALSE),
    fSum(),
    fSumMC()
 {
    fSum(),
    fSumMC()
 {
@@ -39,7 +38,6 @@ AliRsnMother::AliRsnMother() :
 //_____________________________________________________________________________
 AliRsnMother::AliRsnMother(const AliRsnMother &obj) :
    TObject(obj),
 //_____________________________________________________________________________
 AliRsnMother::AliRsnMother(const AliRsnMother &obj) :
    TObject(obj),
-   fUseMC(obj.fUseMC),
    fSum(obj.fSum),
    fSumMC(obj.fSumMC)
 {
    fSum(obj.fSum),
    fSumMC(obj.fSumMC)
 {
@@ -92,9 +90,9 @@ Int_t AliRsnMother::CommonMother(Int_t &m0, Int_t &m1) const
 // In the two arguments passed by reference, the mothers of the two daghters are stored
 //
 
 // In the two arguments passed by reference, the mothers of the two daghters are stored
 //
 
-   // if MC info is not available, the pairs is not true by default
+   // if MC info is not available, the pair is not true by default
    if (!fDaughter[0]->GetRefMC() || !fDaughter[1]->GetRefMC()) {
    if (!fDaughter[0]->GetRefMC() || !fDaughter[1]->GetRefMC()) {
-      AliInfo("Cannot know if the pairs is true or not because MC Info is not present");
+      AliWarning("Cannot know if the pairs is true or not because MC Info is not present");
       return 0;
    }
 
       return 0;
    }
 
@@ -138,8 +136,8 @@ void AliRsnMother::SetDaughters
    fDaughter[0]->SetMass(mass0);
    fDaughter[1]->SetMass(mass1);
 
    fDaughter[0]->SetMass(mass0);
    fDaughter[1]->SetMass(mass1);
 
-   fSum   = fDaughter[0]->P(kFALSE) + fDaughter[1]->P(kFALSE);
-   fSumMC = fDaughter[0]->P(kTRUE)  + fDaughter[1]->P(kTRUE);
+   fSum   = fDaughter[0]->Prec() + fDaughter[1]->Prec();
+   fSumMC = fDaughter[0]->Psim() + fDaughter[1]->Psim();
 }
 
 //_____________________________________________________________________________
 }
 
 //_____________________________________________________________________________
@@ -207,7 +205,7 @@ void AliRsnMother::PrintInfo(const Option_t * /*option*/) const
 }
 
 //_____________________________________________________________________________
 }
 
 //_____________________________________________________________________________
-Bool_t AliRsnMother::CheckPair() const
+Bool_t AliRsnMother::CheckPair(Bool_t checkMC) const
 {
 //
 // Checks that the pair is well initialized:
 {
 //
 // Checks that the pair is well initialized:
@@ -220,7 +218,7 @@ Bool_t AliRsnMother::CheckPair() const
       return kFALSE;
    }
 
       return kFALSE;
    }
 
-   if (fUseMC) {
+   if (checkMC) {
       if (fDaughter[0]->GetRefMC() == 0x0 || fDaughter[1]->GetRefMC() == 0x0) {
          AliError("Required MC info but not all MC refs are available");
          return kFALSE;
       if (fDaughter[0]->GetRefMC() == 0x0 || fDaughter[1]->GetRefMC() == 0x0) {
          AliError("Required MC info but not all MC refs are available");
          return kFALSE;
index fa1a846b6ef27079cf3908e2fe95629c72e23d6b..a60a2be50e554d00d58c52917849ce0a78af8280 100644 (file)
@@ -23,9 +23,8 @@ public:
    AliRsnMother& operator=(const AliRsnMother &obj);
    virtual ~AliRsnMother();
 
    AliRsnMother& operator=(const AliRsnMother &obj);
    virtual ~AliRsnMother();
 
-   Bool_t            IsUsingMC()                        const {return fUseMC;}
-   AliRsnDaughter*   GetDaughter(const Int_t &index)    const {if (index == 0 || index == 1) return fDaughter[index]; return 0x0;}
-   AliRsnDaughter&   GetDaughterRef(const Int_t &index) const {if (index < 1) return (*fDaughter[1]); return (*fDaughter[0]);}
+   AliRsnDaughter*   GetDaughter(const Int_t &index)    const {if (index < 1) return   fDaughter[0] ; return   fDaughter[1] ;}
+   AliRsnDaughter&   GetDaughterRef(const Int_t &index) const {if (index < 1) return (*fDaughter[0]); return (*fDaughter[1]);}
    TLorentzVector&   Sum()                                    {return fSum;}
    TLorentzVector&   SumMC()                                  {return fSumMC;}
    
    TLorentzVector&   Sum()                                    {return fSum;}
    TLorentzVector&   SumMC()                                  {return fSumMC;}
    
@@ -40,11 +39,10 @@ public:
    void              SetDaughters(AliRsnDaughter * const daughter1, Double_t mass1, AliRsnDaughter * const daughter2, Double_t mass2);
    void              ResetPair();
    void              PrintInfo(const Option_t *option = "ALL") const;
    void              SetDaughters(AliRsnDaughter * const daughter1, Double_t mass1, AliRsnDaughter * const daughter2, Double_t mass2);
    void              ResetPair();
    void              PrintInfo(const Option_t *option = "ALL") const;
-   Bool_t            CheckPair() const;
+   Bool_t            CheckPair(Bool_t checkMC = kFALSE) const;
 
 private:
 
 
 private:
 
-   Bool_t           fUseMC;            // choose if momenta are taken from ESD/AOD or MC
    AliRsnDaughter  *fDaughter[2];      // elements of the pair
    TLorentzVector   fSum;              // sum computed from the two daughters
    TLorentzVector   fSumMC;            // sum computed from the two daughters
    AliRsnDaughter  *fDaughter[2];      // elements of the pair
    TLorentzVector   fSum;              // sum computed from the two daughters
    TLorentzVector   fSumMC;            // sum computed from the two daughters