]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TUHKMgen/UHKM/DecayChannel.cxx
deleted duplicated macro
[u/mrichter/AliRoot.git] / TUHKMgen / UHKM / DecayChannel.cxx
index ca5a39275e89c4ec236136f833bb7deb54df0f08..d04ce52e12de59f8ffdc4d9935f10d9513ba9f4a 100644 (file)
@@ -1,46 +1,55 @@
-/*
-  Copyright   : The FASTMC and SPHMC Collaboration
-  Author      : Ionut Cristian Arsene 
-  Affiliation : Oslo University, Norway & Institute for Space Sciences, Bucharest, Romania
-  e-mail      : i.c.arsene@fys.uio.no
-  Date        : 2007/05/30
-
-  This class is using the particle and decay lists provided by the 
-  THERMINATOR (Computer Physics Communications 174 669 (2006)) and
-  SHARE (Computer Physics Communications 167 229 (2005)) collaborations.
-*/
-
-#ifndef DECAY_CHANNEL
-#include "DecayChannel.h"
-#endif
-
+////////////////////////////////////////////////////////////////////////////////////////////////
+//  Copyright   : The FASTMC and SPHMC Collaboration                                          //
+//  Author      : Ionut Cristian Arsene                                                       //
+//  Affiliation : Oslo University, Norway & Institute for Space Sciences, Bucharest, Romania  //
+//  e-mail      : i.c.arsene@fys.uio.no                                                       //
+//  Date        : 2007/05/30                                                                  //
+//                                                                                            //
+//  This class is using the particle and decays lists provided by the                         //
+//  THERMINATOR (Computer Physics Communications 174 669 (2006)) and                          //
+//  SHARE (Computer Physics Communications 167 229 (2005)) collaborations.                    //
+////////////////////////////////////////////////////////////////////////////////////////////////
 #include <iostream>
 using std::cout;
 using std::endl;
 
+#include "DecayChannel.h"
+
+//_______________________________________________________________________________
 DecayChannel::DecayChannel() :
   fMotherPDG(kNonsensePDG),
   fBranchingRatio(0.0),
   fNDaughters(0)
 {
+  //
+  //  default constructor
+  //
   for(Int_t i=0; i<kMaxDaughters; i++)
     fDaughtersPDG[i] = kNonsensePDG;
 }
 
+//_______________________________________________________________________________
 DecayChannel::DecayChannel(const DecayChannel &copy):
   fMotherPDG(copy.fMotherPDG),
   fBranchingRatio(copy.fBranchingRatio),
   fNDaughters(copy.fNDaughters)
 {
+  //
+  // copy constructor
+  //
   for(Int_t i=0; i<fNDaughters; i++)
     fDaughtersPDG[i] = copy.fDaughtersPDG[i];
 }
 
-DecayChannel::DecayChannel(Int_t mother, Double_t branching, Int_t nDaughters, Int_t *daughters):
+//_______________________________________________________________________________
+DecayChannel::DecayChannel(Int_t mother, Double_t branching, Int_t nDaughters, const Int_t *daughters):
   fMotherPDG(mother),
   fBranchingRatio(branching),
   fNDaughters(0)
 {
+  //
+  // constructor
+  //
   for(Int_t i=0; i<nDaughters; i++) {
     if(i >= kMaxDaughters) {
       cout << "ERROR in DecayChannel explicit constructor: " << endl;
@@ -50,7 +59,11 @@ DecayChannel::DecayChannel(Int_t mother, Double_t branching, Int_t nDaughters, I
   }
 }
 
-void DecayChannel::SetDaughters(Int_t *daughters, Int_t n) {
+//_______________________________________________________________________________
+void DecayChannel::SetDaughters(const Int_t *daughters, Int_t n) {
+  //
+  // set the daughter PDGs
+  //
   for(Int_t i=0; i<n; i++) {
     if(i >= kMaxDaughters) {
       cout << "ERROR in DecayChannel::SetDaughters() :" << endl;
@@ -60,7 +73,11 @@ void DecayChannel::SetDaughters(Int_t *daughters, Int_t n) {
   }
 }
 
+//_______________________________________________________________________________
 void DecayChannel::AddDaughter(Int_t pdg) {
+  //
+  // add a daughter to this channel
+  //
   if(fNDaughters >= kMaxDaughters) {
     cout << "ERROR in DecayChannel::AddDaughter() :" << endl;
     cout << "Number of daughters is already >= than the maximum allowed one (" << kMaxDaughters << ") !!" << endl;
@@ -68,7 +85,12 @@ void DecayChannel::AddDaughter(Int_t pdg) {
   fDaughtersPDG[fNDaughters++] = pdg;
 }
 
+
+//_______________________________________________________________________________
 Int_t DecayChannel::GetDaughterPDG(Int_t i) {
+  //
+  // get the PDG of the i'th daughter
+  //
   if((i >= fNDaughters) || (i<0)) {
     cout << "ERROR in DecayChannel::GetDaughterPDG() :" << endl;
     cout << "Daughter index required is too big or less than zero!! There are only " << fNDaughters << " secondaries in this channel !!" << endl;