Ignore:
Timestamp:
Jun 18, 2010, 11:42:07 AM (14 years ago)
Author:
garnier
Message:

update geant4-09-04-beta-cand-01 interfaces-V09-03-09 vis-V09-03-08

Location:
trunk/source/particles/management
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/particles/management/include/G4DynamicParticle.hh

    r1196 r1315  
    2525//
    2626//
    27 // $Id: G4DynamicParticle.hh,v 1.18 2007/03/11 07:17:35 kurasige Exp $
    28 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// $Id: G4DynamicParticle.hh,v 1.20 2010/04/20 00:50:18 kurasige Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2929//
    3030//
     
    201201     //    mode 1 : 0 + electron occupancy
    202202
    203    private:
     203   protected:
    204204     void      AllocateElectronOccupancy();
    205205     G4double  GetElectronMass() const;
    206206
    207    private:
     207   protected:
    208208     G4ThreeVector theMomentumDirection;
    209209      //  The normalized momentum vector
     
    232232     G4double thePreAssignedDecayTime;
    233233
    234  private:
     234 protected:
    235235   G4int verboseLevel;
    236236 
     
    243243   //  2: More
    244244
    245  private:
     245 protected:
    246246   G4PrimaryParticle* primaryParticle;
    247247   // This void pointer is used by G4EventManager to maintain the
     
    266266   // returned if available. Otherwise (e.g. for geantino) returns 0.
    267267
    268  private:
     268 protected:
    269269   G4int thePDGcode;
    270270};
  • trunk/source/particles/management/include/G4DynamicParticle.icc

    r1196 r1315  
    2525//
    2626//
    27 // $Id: G4DynamicParticle.icc,v 1.16 2007/03/11 07:17:35 kurasige Exp $
    28 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// $Id: G4DynamicParticle.icc,v 1.17 2010/04/19 00:23:08 kurasige Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2929//
    3030//
     
    8787inline void  G4DynamicParticle::AddElectron(G4int orbit, G4int number )
    8888{
     89  if ( theElectronOccupancy == 0) AllocateElectronOccupancy();
    8990  if ( theElectronOccupancy != 0) {
    9091    G4int n = theElectronOccupancy->AddElectron(orbit, number );
     
    9697inline void    G4DynamicParticle::RemoveElectron(G4int orbit, G4int number)
    9798{
    98   if ( theElectronOccupancy != 0) {
     99 if ( theElectronOccupancy == 0) AllocateElectronOccupancy();
     100 if ( theElectronOccupancy != 0) {
    99101    G4int n = theElectronOccupancy->RemoveElectron(orbit, number );
    100102    theDynamicalCharge += eplus * n;
  • trunk/source/particles/management/src/G4DecayProducts.cc

    r1196 r1315  
    2525//
    2626//
    27 // $Id: G4DecayProducts.cc,v 1.17 2009/04/02 02:24:53 kurasige Exp $
    28 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// $Id: G4DecayProducts.cc,v 1.18 2010/05/20 01:01:07 kurasige Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2929//
    3030//
     
    141141   } else {
    142142#ifdef G4VERBOSE
    143      G4cout << "G4DecayProducts::PushProducts ";
    144      G4cout << " exceeds MaxNumberOfProducts(="
    145             << G4int(MaxNumberOfProducts) << ")";
    146      G4cout << G4endl;
     143     G4cerr << "G4DecayProducts::PushProducts "
     144           << " exceeds MaxNumberOfProducts(="
     145            << G4int(MaxNumberOfProducts) << ")"
     146           << G4endl;
    147147#endif
    148148   }
     
    242242  if ( (parent_momentum.mag() >0.0) && (std::fabs(direction.mag()-1.0) >1.0e-6 ) ) {
    243243#ifdef G4VERBOSE
    244     G4cout << " Momentum Direction Vector of Parent is not normalized ";
    245     G4cout << "  (=" << direction.mag() << ")" << G4endl;
     244    G4cerr << "G4DecayProducts::IsChecked()::  "
     245           << " Momentum Direction Vector of Parent is not normalized "
     246           << "  (=" << direction.mag() << ")" << G4endl;
    246247#endif
    247248    returnValue = false;
     
    263264    if ( (momentum.mag()>0.0) && (std::fabs(direction.mag()-1.0) > 1.0e-6)) {
    264265#ifdef G4VERBOSE
    265       G4cout << " Momentum Direction Vector of Daughter [" << index;
    266       G4cout << "]  is not normalized (=" << direction.mag() << ")" << G4endl;
     266      G4cerr <<  "G4DecayProducts::IsChecked()::  "
     267             << " Momentum Direction Vector of Daughter [" << index
     268             << "]  is not normalized (=" << direction.mag() << ")" << G4endl;
    267269#endif
    268270      returnValue = false;
     
    272274    if (energy - mass < DBL_MIN ) {
    273275#ifdef G4VERBOSE
    274       G4cout << "Daughter [" << index << "] has no kinetic energy "<< G4endl;
     276      G4cerr <<  "G4DecayProducts::IsChecked()::  "
     277             << "  Daughter [" << index << "] has no kinetic energy "<< G4endl;
    275278#endif
    276279      returnValue = false;
     
    282285  if ( (std::fabs(total_energy) >1.0e-9*MeV) || (total_momentum.mag() >1.0e-9*MeV ) ){
    283286#ifdef G4VERBOSE
    284     G4cout << " Energy/Momentum is not conserved   "<< G4endl;
    285     G4cout << " difference between parent energy and sum of dughters' energy : "
     287    G4cerr <<  "G4DecayProducts::IsChecked()::  "
     288           << " Energy/Momentum is not conserved   "<< G4endl;
     289    G4cerr << " difference between parent energy and sum of dughters' energy : "
    286290           << total_energy /MeV << "[MeV]  " << G4endl;
    287     G4cout << " difference between parent momentum and sum of dughters' momentum : "
     291    G4cerr << " difference between parent momentum and sum of dughters' momentum : "
    288292           << " x:" << total_momentum.getX()/MeV
    289293           << " y:" << total_momentum.getY()/MeV 
  • trunk/source/particles/management/src/G4DecayTable.cc

    r1196 r1315  
    2525//
    2626//
    27 // $Id: G4DecayTable.cc,v 1.8 2006/06/29 19:25:02 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// $Id: G4DecayTable.cc,v 1.9 2010/05/20 01:01:07 kurasige Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2929//
    3030//
     
    6363  if (parent != aChannel->GetParent()) {
    6464#ifdef G4VERBOSE
    65     G4cout << " G4DecayTable::Insert :: bad   G4VDecayChannel (mismatch parent) ";
    66     G4cout << "       " << parent->GetParticleName();
    67     G4cout << " input:" << aChannel->GetParent()->GetParticleName() << G4endl;
     65    G4cerr << " G4DecayTable::Insert :: bad   G4VDecayChannel (mismatch parent) "
     66           << "       " << parent->GetParticleName()
     67          << " input:" << aChannel->GetParent()->GetParticleName() << G4endl;
    6868#endif
    6969  } else {
  • trunk/source/particles/management/src/G4DynamicParticle.cc

    r1196 r1315  
    2525//
    2626//
    27 // $Id: G4DynamicParticle.cc,v 1.26 2009/08/17 14:52:19 kurasige Exp $
    28 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// $Id: G4DynamicParticle.cc,v 1.29 2010/05/20 01:01:07 kurasige Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2929//
    3030//
     
    5959//      revised by V.Ivanchenko,    18 June 2003
    6060//         take into account the case of virtual photons
    61 //
     61//      revised by M.Kelsey         12 May 2010
     62//         ensure that all constructors initialize all data members
    6263//--------------------------------------------------------------
    6364
     
    7576////////////////////
    7677G4DynamicParticle::G4DynamicParticle():
    77                    theMomentumDirection(G4ThreeVector(0.0,0.0,1.0)),
     78                   theMomentumDirection(0.0,0.0,1.0),
    7879                   theParticleDefinition(0),
    7980                   theKineticEnergy(0.0),
    8081                   theProperTime(0.0),
     82                   theDynamicalMass(0.0),
     83                   theDynamicalCharge(0.0),
     84                   theDynamicalSpin(0.0),
     85                   theDynamicalMagneticMoment(0.0),
     86                   theElectronOccupancy(0),
    8187                   thePreAssignedDecayProducts(0),
    8288                   thePreAssignedDecayTime(-1.0),
    8389                   verboseLevel(1),
    8490                   primaryParticle(0),
    85                    thePDGcode(0)
    86 
    87    theDynamicalMass = 0.0;
    88    theDynamicalCharge= 0.0;
    89    theElectronOccupancy = 0;
    90 }
     91                   thePDGcode(0) {}
    9192
    9293////////////////////
     
    100101                   theKineticEnergy(aKineticEnergy),
    101102                   theProperTime(0.0),
     103                   theDynamicalMass(aParticleDefinition->GetPDGMass()),
     104                   theDynamicalCharge(aParticleDefinition->GetPDGCharge()),
     105                   theDynamicalSpin(aParticleDefinition->GetPDGSpin()),
     106                   theDynamicalMagneticMoment(aParticleDefinition->GetPDGMagneticMoment()),
     107                   theElectronOccupancy(0),
     108                   thePreAssignedDecayProducts(0),
     109                   thePreAssignedDecayTime(-1.0),
     110                   verboseLevel(1),
     111                   primaryParticle(0),
     112                   thePDGcode(0) {}
     113
     114////////////////////
     115G4DynamicParticle::G4DynamicParticle(G4ParticleDefinition * aParticleDefinition,
     116                                     const G4ThreeVector& aParticleMomentum):
     117                   theParticleDefinition(aParticleDefinition),
     118                   theKineticEnergy(0.0),
     119                   theProperTime(0.0),
     120                   theDynamicalMass(aParticleDefinition->GetPDGMass()),
     121                   theDynamicalCharge(aParticleDefinition->GetPDGCharge()),
     122                   theDynamicalSpin(aParticleDefinition->GetPDGSpin()),
     123                   theDynamicalMagneticMoment(aParticleDefinition->GetPDGMagneticMoment()),
     124                   theElectronOccupancy(0),
    102125                   thePreAssignedDecayProducts(0),
    103126                   thePreAssignedDecayTime(-1.0),
     
    106129                   thePDGcode(0)
    107130{
    108   // set dynamic charge/mass
    109   theDynamicalMass = aParticleDefinition->GetPDGMass();
    110   theDynamicalCharge = aParticleDefinition->GetPDGCharge();
    111   theDynamicalMagneticMoment = aParticleDefinition->GetPDGMagneticMoment();
    112   AllocateElectronOccupancy();
     131  // 3-dim momentum is given
     132  SetMomentum(aParticleMomentum);
    113133}
    114134
    115135////////////////////
    116136G4DynamicParticle::G4DynamicParticle(G4ParticleDefinition * aParticleDefinition,
    117                                      const G4ThreeVector& aParticleMomentum):
     137                                     const G4LorentzVector   &aParticleMomentum):
    118138                   theParticleDefinition(aParticleDefinition),
    119                    theProperTime(0.0),
     139                   theKineticEnergy(0.0),
     140                   theProperTime(0.0),
     141                   theDynamicalMass(aParticleDefinition->GetPDGMass()),
     142                   theDynamicalCharge(aParticleDefinition->GetPDGCharge()),
     143                   theDynamicalSpin(aParticleDefinition->GetPDGSpin()),
     144                   theDynamicalMagneticMoment(aParticleDefinition->GetPDGMagneticMoment()),
     145                   theElectronOccupancy(0),
    120146                   thePreAssignedDecayProducts(0),
    121147                   thePreAssignedDecayTime(-1.0),
     
    124150                   thePDGcode(0)
    125151{
    126   // set dynamic charge/mass
    127   theDynamicalMass = aParticleDefinition->GetPDGMass();
    128   theDynamicalCharge = aParticleDefinition->GetPDGCharge();
    129   theDynamicalMagneticMoment = aParticleDefinition->GetPDGMagneticMoment();
    130   AllocateElectronOccupancy();
    131 
    132   // 3-dim momentum is given
    133   G4double pModule2 = aParticleMomentum.mag2();
    134   if (pModule2>0.0) {
    135     G4double mass = theDynamicalMass;
    136     SetKineticEnergy(std::sqrt(pModule2+mass*mass)-mass);
    137     G4double pModule = std::sqrt(pModule2);
    138     SetMomentumDirection(aParticleMomentum.x()/pModule,
    139                          aParticleMomentum.y()/pModule,
    140                          aParticleMomentum.z()/pModule);
    141   } else {
    142     SetMomentumDirection(1.0,0.0,0.0);
    143     SetKineticEnergy(0.0);
    144   }
    145 }
    146 
    147 ////////////////////
     152  // 4-momentum vector (Lorentz vecotr) is given
     153  Set4Momentum(aParticleMomentum);
     154}
     155
    148156G4DynamicParticle::G4DynamicParticle(G4ParticleDefinition * aParticleDefinition,
    149                                      const G4LorentzVector   &aParticleMomentum):
    150                    theParticleDefinition(aParticleDefinition),
    151                    theProperTime(0.0),
     157                                     G4double totalEnergy,
     158                                     const G4ThreeVector &aParticleMomentum):
     159                   theParticleDefinition(aParticleDefinition),
     160                   theKineticEnergy(0.0),
     161                   theProperTime(0.0),
     162                   theDynamicalMass(aParticleDefinition->GetPDGMass()),
     163                   theDynamicalCharge(aParticleDefinition->GetPDGCharge()),
     164                   theDynamicalSpin(aParticleDefinition->GetPDGSpin()),
     165                   theDynamicalMagneticMoment(aParticleDefinition->GetPDGMagneticMoment()),
     166                   theElectronOccupancy(0),
    152167                   thePreAssignedDecayProducts(0),
    153168                   thePreAssignedDecayTime(-1.0),
     
    156171                   thePDGcode(0)
    157172{
    158    // set dynamic charge/mass
    159   theDynamicalMass = aParticleDefinition->GetPDGMass();
    160   theDynamicalCharge = aParticleDefinition->GetPDGCharge();
    161   theDynamicalMagneticMoment = aParticleDefinition->GetPDGMagneticMoment();
    162   AllocateElectronOccupancy();
    163 
    164   // 4-momentum vector (Lorentz vecotr) is given
    165   G4double pModule2 = aParticleMomentum.x()*aParticleMomentum.x()
    166                        + aParticleMomentum.y()*aParticleMomentum.y()
    167                         + aParticleMomentum.z()*aParticleMomentum.z();
     173  // total energy and 3-dim momentum are given
     174  G4double pModule2 = aParticleMomentum.mag2();
    168175  if (pModule2>0.0) {
    169     G4double pModule = std::sqrt(pModule2);
    170     SetMomentumDirection(aParticleMomentum.x()/pModule,
    171                          aParticleMomentum.y()/pModule,
    172                          aParticleMomentum.z()/pModule);
    173     G4double totalenergy = aParticleMomentum.t();
     176    G4double mass2 = totalEnergy*totalEnergy - pModule2;
     177    if(mass2 < EnergyMomentumRelationAllowance*EnergyMomentumRelationAllowance) {
     178      theDynamicalMass = 0.;
     179      SetMomentumDirection(aParticleMomentum.unit());
     180      SetKineticEnergy(totalEnergy);
     181    } else {
     182      theDynamicalMass = std::sqrt(mass2);
     183      SetMomentum(aParticleMomentum);
     184    }
     185  } else {
     186    SetMomentumDirection(1.0,0.0,0.0);
     187    SetKineticEnergy(0.0);
     188  }
     189}
     190
     191////////////////////
     192G4DynamicParticle::G4DynamicParticle(const G4DynamicParticle &right):
     193  theMomentumDirection(right.theMomentumDirection),
     194  theParticleDefinition(right.theParticleDefinition),
     195  thePolarization(right.thePolarization),
     196  theKineticEnergy(right.theKineticEnergy),
     197  theProperTime(0.0),
     198  theDynamicalMass(right.theDynamicalMass),
     199  theDynamicalCharge(right.theDynamicalCharge),
     200  theDynamicalSpin(right.theDynamicalSpin),
     201  theDynamicalMagneticMoment(right.theDynamicalMagneticMoment),
     202  theElectronOccupancy(0),
     203  thePreAssignedDecayProducts(0),       // Do not copy preassignedDecayProducts
     204  thePreAssignedDecayTime(-1.0),
     205  verboseLevel(right.verboseLevel),
     206  primaryParticle(right.primaryParticle),
     207  thePDGcode(right.thePDGcode)
     208{
     209  if (right.theElectronOccupancy != 0) {
     210      theElectronOccupancy =
     211        new G4ElectronOccupancy(*right.theElectronOccupancy);
     212  }
     213}
     214
     215////////////////////
     216// -- destructor ----
     217////////////////////
     218G4DynamicParticle::~G4DynamicParticle() {
     219
     220  //  delete thePreAssignedDecayProducts
     221  if (thePreAssignedDecayProducts != 0) delete thePreAssignedDecayProducts;
     222  thePreAssignedDecayProducts = 0;
     223
     224  if (theElectronOccupancy != 0) delete theElectronOccupancy;
     225  theElectronOccupancy =0;
     226}
     227
     228
     229////////////////////
     230// -- operators ----
     231////////////////////
     232G4DynamicParticle & G4DynamicParticle::operator=(const G4DynamicParticle &right)
     233{
     234  if (this != &right) {
     235    theMomentumDirection = right.theMomentumDirection;
     236    theParticleDefinition = right.theParticleDefinition;
     237    thePolarization = right.thePolarization;
     238    theKineticEnergy = right.theKineticEnergy;
     239    theProperTime = right.theProperTime;
     240
     241    theDynamicalMass = right.theDynamicalMass;
     242    theDynamicalCharge = right.theDynamicalCharge;
     243    theDynamicalSpin = right.theDynamicalSpin;
     244    theDynamicalMagneticMoment = right.theDynamicalMagneticMoment;
     245
     246    if (theElectronOccupancy != 0) delete theElectronOccupancy;
     247    if (right.theElectronOccupancy != 0){
     248      theElectronOccupancy =
     249             new G4ElectronOccupancy(*right.theElectronOccupancy);
     250    } else {
     251      theElectronOccupancy = 0;
     252    }
     253
     254    // thePreAssignedDecayProducts must not be copied.
     255    thePreAssignedDecayProducts = 0;
     256    thePreAssignedDecayTime = -1.0;
     257
     258    verboseLevel = right.verboseLevel;
     259
     260    // Primary particle information must be preserved
     261    //*** primaryParticle = right.primaryParticle;
     262
     263    thePDGcode = right.thePDGcode;
     264  }
     265  return *this;
     266}
     267
     268////////////////////
     269void G4DynamicParticle::SetDefinition(G4ParticleDefinition * aParticleDefinition)
     270{
     271  // remove preassigned decay
     272  if (thePreAssignedDecayProducts != 0) {
     273#ifdef G4VERBOSE
     274    if (verboseLevel>0) {
     275      G4cerr << " G4DynamicParticle::SetDefinition()::"
     276             << "!!! Pre-assigned decay products is attached !!!! " << G4endl;
     277      G4cerr << "!!! New Definition is " << aParticleDefinition->GetParticleName()
     278             << " !!! " << G4endl;
     279      G4cerr << "!!! Pre-assigned decay products will be deleted !!!! " << G4endl;
     280    }
     281#endif
     282    delete thePreAssignedDecayProducts;
     283  }
     284  thePreAssignedDecayProducts = 0;
     285
     286  theParticleDefinition = aParticleDefinition;
     287
     288  // set Dynamic mass/chrge
     289  theDynamicalMass = theParticleDefinition->GetPDGMass();
     290  theDynamicalCharge = theParticleDefinition->GetPDGCharge();
     291  theDynamicalSpin = theParticleDefinition->GetPDGSpin();
     292  theDynamicalMagneticMoment = theParticleDefinition->GetPDGMagneticMoment();
     293
     294  // Set electron orbits
     295  if (theElectronOccupancy != 0) delete theElectronOccupancy;
     296  theElectronOccupancy =0;
     297  //AllocateElectronOccupancy();
     298
     299}
     300
     301////////////////////
     302G4int G4DynamicParticle::operator==(const G4DynamicParticle &right) const
     303{
     304  return (this == (G4DynamicParticle *) &right);
     305}
     306
     307////////////////////
     308G4int G4DynamicParticle::operator!=(const G4DynamicParticle &right) const
     309{
     310  return (this != (G4DynamicParticle *) &right);
     311}
     312
     313
     314
     315////////////////////
     316// -- AllocateElectronOccupancy --
     317////////////////////
     318void  G4DynamicParticle::AllocateElectronOccupancy()
     319{
     320  G4ParticleDefinition* particle = GetDefinition();
     321
     322  if (G4IonTable::IsIon(particle)) {
     323    // Only ions can have ElectronOccupancy
     324    theElectronOccupancy = new G4ElectronOccupancy();
     325
     326  } else {
     327    theElectronOccupancy = 0;
     328
     329  }
     330}
     331
     332////////////////////
     333// -- methods for setting Energy/Momentum  --
     334////////////////////
     335void G4DynamicParticle::SetMomentum(const G4ThreeVector &momentum)
     336{
     337  G4double pModule2 = momentum.mag2();
     338  if (pModule2>0.0) {
     339    G4double mass = theDynamicalMass;
     340    SetMomentumDirection(momentum.unit());
     341    SetKineticEnergy(std::sqrt(pModule2 + mass*mass)-mass);
     342  } else {
     343    SetMomentumDirection(1.0,0.0,0.0);
     344    SetKineticEnergy(0.0);
     345  }
     346}
     347
     348////////////////////
     349void G4DynamicParticle::Set4Momentum(const G4LorentzVector &momentum )
     350{
     351  G4double pModule2 = momentum.vect().mag2();
     352  if (pModule2>0.0) {
     353    SetMomentumDirection(momentum.vect().unit());
     354    G4double totalenergy = momentum.t();
    174355    G4double mass2 = totalenergy*totalenergy - pModule2;
    175356    if(mass2 < EnergyMomentumRelationAllowance*EnergyMomentumRelationAllowance) {
     
    180361      SetKineticEnergy(totalenergy-theDynamicalMass);
    181362    }
    182 
    183   } else {
    184     SetMomentumDirection(1.0,0.0,0.0);
    185     SetKineticEnergy(0.0);
    186   }
    187 }
    188 
    189 G4DynamicParticle::G4DynamicParticle(G4ParticleDefinition * aParticleDefinition,
    190                                      G4double totalEnergy,
    191                                      const G4ThreeVector &aParticleMomentum):
    192                    theParticleDefinition(aParticleDefinition),
    193                    theProperTime(0.0),
    194                    thePreAssignedDecayProducts(0),
    195                    thePreAssignedDecayTime(-1.0),
    196                    verboseLevel(1),
    197                    primaryParticle(0),
    198                    thePDGcode(0)
    199 {
    200    // set dynamic charge/mass
    201   theDynamicalMass = aParticleDefinition->GetPDGMass();
    202   theDynamicalCharge = aParticleDefinition->GetPDGCharge();
    203   theDynamicalMagneticMoment = aParticleDefinition->GetPDGMagneticMoment();
    204   AllocateElectronOccupancy();
    205  
    206   // total energy and momentum direction are given
    207   G4double pModule2 = aParticleMomentum.mag2();
    208   if (pModule2>0.0) {
    209     G4double pModule = std::sqrt(pModule2);
    210     SetMomentumDirection(aParticleMomentum.x()/pModule,
    211                          aParticleMomentum.y()/pModule,
    212                          aParticleMomentum.z()/pModule);
    213 
    214     G4double mass2 = totalEnergy*totalEnergy - pModule2;
    215     if(mass2 < EnergyMomentumRelationAllowance*EnergyMomentumRelationAllowance) {
    216       theDynamicalMass = 0.;
    217       SetKineticEnergy(totalEnergy);
    218     } else {
    219       theDynamicalMass = std::sqrt(mass2);
    220       SetKineticEnergy(totalEnergy-theDynamicalMass);
    221     }
    222   } else {
    223     SetMomentumDirection(1.0,0.0,0.0);
    224     SetKineticEnergy(0.0);
    225   }
    226 }
    227 
    228 ////////////////////
    229 G4DynamicParticle::G4DynamicParticle(const G4DynamicParticle &right)
    230 {
    231   theDynamicalMass = right.theDynamicalMass;
    232   theDynamicalCharge = right.theDynamicalCharge;
    233   theDynamicalMagneticMoment = right.theDynamicalMagneticMoment;
    234 
    235   if (right.theElectronOccupancy != 0){
    236       theElectronOccupancy =
    237         new G4ElectronOccupancy(*right.theElectronOccupancy);
    238   } else {
    239      theElectronOccupancy = 0;
    240   }
    241 
    242   theParticleDefinition = right.theParticleDefinition;
    243   theMomentumDirection = right.theMomentumDirection;
    244   theKineticEnergy = right.theKineticEnergy;
    245   thePolarization = right.thePolarization;
    246   verboseLevel = right.verboseLevel;
    247 
    248   // proper time is set to zero
    249   theProperTime = 0.0;
    250 
    251   // thePreAssignedDecayProducts/Time must not be copied.
    252   thePreAssignedDecayProducts = 0;
    253   thePreAssignedDecayTime = -1.0;
    254 
    255   primaryParticle = right.primaryParticle;
    256   thePDGcode = right.thePDGcode;
    257 }
    258 
    259 ////////////////////
    260 // -- destructor ----
    261 ////////////////////
    262 G4DynamicParticle::~G4DynamicParticle() {
    263 
    264   //  delete thePreAssignedDecayProducts
    265   if (thePreAssignedDecayProducts != 0) delete thePreAssignedDecayProducts;
    266   thePreAssignedDecayProducts = 0;
    267 
    268   if (theElectronOccupancy != 0) delete theElectronOccupancy;
    269   theElectronOccupancy =0;
    270 }
    271 
    272 
    273 ////////////////////
    274 // -- operators ----
    275 ////////////////////
    276 G4DynamicParticle & G4DynamicParticle::operator=(const G4DynamicParticle &right)
    277 {
    278   if (this != &right) {
    279     theDynamicalMass = right.theDynamicalMass;
    280     theDynamicalCharge = right.theDynamicalCharge;
    281     theDynamicalMagneticMoment = right.theDynamicalMagneticMoment;
    282 
    283     if (theElectronOccupancy != 0) delete theElectronOccupancy;
    284     if (right.theElectronOccupancy != 0){
    285       theElectronOccupancy =
    286              new G4ElectronOccupancy(*right.theElectronOccupancy);
    287     } else {
    288       theElectronOccupancy = 0;
    289     }
    290 
    291     theParticleDefinition = right.theParticleDefinition;
    292     theMomentumDirection = right.theMomentumDirection;
    293     theKineticEnergy = right.theKineticEnergy;
    294     thePolarization = right.thePolarization;
    295     theProperTime = right.theProperTime;
    296     verboseLevel = right.verboseLevel;
    297 
    298     // thePreAssignedDecayProducts must not be copied.
    299     thePreAssignedDecayProducts = 0;
    300     thePreAssignedDecayTime = -1.0;
    301 
    302   }
    303   return *this;
    304 }
    305 
    306 ////////////////////
    307 void G4DynamicParticle::SetDefinition(G4ParticleDefinition * aParticleDefinition)
    308 {
    309   // remove preassigned decay
    310   if (thePreAssignedDecayProducts != 0) {
    311 #ifdef G4VERBOSE
    312     if (verboseLevel>0) {
    313       G4cout << " G4DynamicParticle::SetDefinition()::";
    314       G4cout << "!!! Pre-assigned decay products is attached !!!! " << G4endl;
    315       DumpInfo(0);
    316       G4cout << "!!! New Definition is " << aParticleDefinition->GetParticleName()
    317              << " !!! " << G4endl;
    318       G4cout << "!!! Pre-assigned decay products will be deleted !!!! " << G4endl;
    319     }
    320 #endif
    321     delete thePreAssignedDecayProducts;
    322   }
    323   thePreAssignedDecayProducts = 0;
    324 
    325   theParticleDefinition = aParticleDefinition;
    326   // set Dynamic mass/chrge
    327   theDynamicalMass = theParticleDefinition->GetPDGMass();
    328   theDynamicalCharge = theParticleDefinition->GetPDGCharge();
    329   theDynamicalMagneticMoment = theParticleDefinition->GetPDGMagneticMoment();
    330 
    331   // Set electron orbits
    332   if (theElectronOccupancy != 0) delete theElectronOccupancy;
    333   theElectronOccupancy =0;
    334   AllocateElectronOccupancy();
    335 
    336 }
    337 
    338 ////////////////////
    339 G4int G4DynamicParticle::operator==(const G4DynamicParticle &right) const
    340 {
    341   return (this == (G4DynamicParticle *) &right);
    342 }
    343 
    344 ////////////////////
    345 G4int G4DynamicParticle::operator!=(const G4DynamicParticle &right) const
    346 {
    347   return (this != (G4DynamicParticle *) &right);
    348 }
    349 
    350 
    351 
    352 ////////////////////
    353 // -- AllocateElectronOccupancy --
    354 ////////////////////
    355 void  G4DynamicParticle::AllocateElectronOccupancy()
    356 {
    357   G4ParticleDefinition* particle = GetDefinition();
    358 
    359   if (G4IonTable::IsIon(particle)) {
    360     // Only ions can have ElectronOccupancy
    361     theElectronOccupancy = new G4ElectronOccupancy();
    362 
    363   } else {
    364     theElectronOccupancy = 0;
    365 
    366   }
    367 }
    368 
    369 ////////////////////
    370 // -- methods for setting Energy/Momentum  --
    371 ////////////////////
    372 void G4DynamicParticle::SetMomentum(const G4ThreeVector &momentum)
    373 {
    374   G4double pModule2 = momentum.mag2();
    375   if (pModule2>0.0) {
    376     G4double mass = theDynamicalMass;
    377     G4double pModule = std::sqrt(pModule2);
    378     SetMomentumDirection(momentum.x()/pModule,
    379                          momentum.y()/pModule,
    380                          momentum.z()/pModule);
    381     SetKineticEnergy(std::sqrt(pModule2 + mass*mass)-mass);
    382   } else {
    383     SetMomentumDirection(1.0,0.0,0.0);
    384     SetKineticEnergy(0.0);
    385   }
    386 }
    387 
    388 ////////////////////
    389 void G4DynamicParticle::Set4Momentum(const G4LorentzVector &momentum )
    390 {
    391   G4double pModule2 = momentum.x()*momentum.x()
    392                        + momentum.y()*momentum.y()
    393                         + momentum.z()*momentum.z();
    394   if (pModule2>0.0) {
    395     G4double pModule = std::sqrt(pModule2);
    396     SetMomentumDirection(momentum.x()/pModule,
    397                          momentum.y()/pModule,
    398                          momentum.z()/pModule);
    399     G4double totalenergy = momentum.t();
    400     G4double mass2 = totalenergy*totalenergy - pModule2;
    401     if(mass2 < 0.0001*MeV*MeV) {
    402       theDynamicalMass = 0.;
    403       SetKineticEnergy(totalenergy);
    404     } else {
    405       theDynamicalMass = std::sqrt(mass2);
    406       SetKineticEnergy(totalenergy-theDynamicalMass);
    407     }
    408 
    409363  } else {
    410364    SetMomentumDirection(1.0,0.0,0.0);
  • trunk/source/particles/management/src/G4IonTable.cc

    r1196 r1315  
    2525//
    2626//
    27 // $Id: G4IonTable.cc,v 1.60 2009/09/23 12:13:48 kurasige Exp $
    28 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// $Id: G4IonTable.cc,v 1.61 2010/05/20 01:01:07 kurasige Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2929//
    3030//
     
    110110#ifdef G4VERBOSE
    111111    if (GetVerboseLevel()>1) {
    112       G4cout << "G4IonTable::CreateIon() : can not create ion of  ";
    113       G4cout << " Z =" << Z << "  A = " << A <<  G4endl;
    114       G4cout << " because the current state is PreInit !!" <<   G4endl;
     112      G4cerr << "G4IonTable::CreateIon() : can not create ion of  "
     113             << " Z =" << Z << "  A = " << A
     114             << " because the current state is PreInit !!" <<   G4endl;
    115115    }
    116116#endif
     
    125125#ifdef G4VERBOSE
    126126    if (GetVerboseLevel()>0) {
    127       G4cout << "G4IonTable::CreateIon() : can not create ions " << G4endl;
    128       G4cout << " Z =" << Z << "  A = " << A <<  G4endl;
     127      G4cerr << "G4IonTable::CreateIon() : can not create ions "
     128            << " Z =" << Z << "  A = " << A <<  G4endl;
    129129    }
    130130#endif
     
    196196#ifdef G4VERBOSE
    197197    if (GetVerboseLevel()>1) {
    198       G4cout << "G4IonTable::CreateIon() : can not create ion of  ";
    199       G4cout << " Z =" << Z << "  A = " << A <<  " L = " <<L << G4endl;
    200       G4cout << " because the current state is PreInit !!" <<   G4endl;
     198      G4cerr << "G4IonTable::CreateIon() : can not create ion of  "
     199             << " Z =" << Z << "  A = " << A <<  " L = " <<L
     200            << " because the current state is PreInit !!" <<   G4endl;
    201201    }
    202202#endif
     
    211211#ifdef G4VERBOSE
    212212    if (GetVerboseLevel()>0) {
    213       G4cout << "G4IonTable::CreateIon() : can not create ions " << G4endl;
    214       G4cout << " Z =" << Z << "  A = " << A << "  L = " << L <<  G4endl;
     213      G4cerr << "G4IonTable::CreateIon() : can not create ions "
     214            << " Z =" << Z << "  A = " << A << "  L = " << L <<  G4endl;
    215215    }
    216216#endif
     
    277277#ifdef G4VERBOSE
    278278    if (GetVerboseLevel()>0) {
    279       G4cout << "G4IonTable::GetIon() : illegal encoding" << G4endl;
    280       G4cout << " CODE:" << encoding << G4endl;
     279      G4cerr << "G4IonTable::GetIon() : illegal encoding"
     280            << " CODE:" << encoding << G4endl;
    281281    }
    282282#endif
     
    295295#ifdef G4VERBOSE
    296296    if (GetVerboseLevel()>0) {
    297       G4cout << "G4IonTable::GetIon() : illegal atomic number/mass" << G4endl;
    298       G4cout << " Z =" << Z << "  A = " << A <<  "  E = " << E/keV << G4endl;
     297      G4cerr << "G4IonTable::GetIon() : illegal atomic number/mass"
     298            << " Z =" << Z << "  A = " << A <<  "  E = " << E/keV << G4endl;
    299299    }
    300300#endif
     
    321321#ifdef G4VERBOSE
    322322    if (GetVerboseLevel()>0) {
    323       G4cout << "G4IonTable::GetIon() : illegal atomic number/mass" << G4endl;
    324       G4cout << " Z =" << Z << "  A = " << A << " L = " << L
     323      G4cerr << "G4IonTable::GetIon() : illegal atomic number/mass"
     324            << " Z =" << Z << "  A = " << A << " L = " << L
    325325             <<"  E = " << E/keV << G4endl;
    326326    }
     
    330330#ifdef G4VERBOSE
    331331    if (GetVerboseLevel()>0) {
    332       G4cout << "G4IonTable::GetIon() : No boud state for " << G4endl;
    333       G4cout << " Z =" << Z << "  A = " << A << " L = " << L
     332      G4cerr << "G4IonTable::GetIon() : No boud state for "
     333            << " Z =" << Z << "  A = " << A << " L = " << L
    334334             <<  "  E = " << E/keV << G4endl;
    335335    }
     
    357357#ifdef G4VERBOSE
    358358    if (GetVerboseLevel()>0) {
    359       G4cout << "G4IonTable::FindIon() : illegal atomic number/mass or excitation level " << G4endl;
    360       G4cout << " Z =" << Z << "  A = " << A <<  "  E = " << E/keV << G4endl;
     359      G4cerr << "G4IonTable::FindIon() : illegal atomic number/mass or excitation level "
     360            << " Z =" << Z << "  A = " << A <<  "  E = " << E/keV << G4endl;
    361361    }
    362362#endif
     
    403403#ifdef G4VERBOSE
    404404    if (GetVerboseLevel()>0) {
    405       G4cout << "G4IonTable::FindIon() : illegal atomic number/mass or excitation level " << G4endl;
    406       G4cout << " Z =" << Z << "  A = " << A << " L = " << L
     405      G4cerr << "G4IonTable::FindIon() : illegal atomic number/mass or excitation level "
     406            << " Z =" << Z << "  A = " << A << " L = " << L
    407407             <<"  E = " << E/keV << G4endl;
    408408    }   
     
    671671#ifdef G4VERBOSE
    672672    if (GetVerboseLevel()>0) {
    673       G4cout << "G4IonTable::GetNucleusMass() : illegal atomic number/mass " << G4endl;
    674       G4cout << " Z =" << Z << "  A = " << A  << G4endl;
     673      G4cerr << "G4IonTable::GetNucleusMass() : illegal atomic number/mass "
     674            << " Z =" << Z << "  A = " << A  << G4endl;
    675675    }
    676676#endif
     
    742742#ifdef G4VERBOSE
    743743    if (GetVerboseLevel()>1) {
    744       G4cout << "G4IonTable::Remove :" << particle->GetParticleName() ;
    745       G4cout << " is not ions" << G4endl;
     744      G4cerr << "G4IonTable::Remove :" << particle->GetParticleName()
     745            << " is not ions" << G4endl;
    746746    }
    747747#endif
     
    912912#ifdef G4VERBOSE
    913913  if (GetVerboseLevel()>1){
    914     G4cout << " G4IonTable::GetParticle";
    915     G4cout << " invalid index (=" << index << ")"
     914    G4cerr << " G4IonTable::GetParticle"
     915          << " invalid index (=" << index << ")"
    916916           << " entries = " << Entries() << G4endl;
    917917  }
  • trunk/source/particles/management/src/G4NucleiProperties.cc

    r1196 r1315  
    2525//
    2626//
    27 // $Id: G4NucleiProperties.cc,v 1.21 2009/05/02 11:58:17 kurasige Exp $
    28 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// $Id: G4NucleiProperties.cc,v 1.22 2010/05/20 01:01:07 kurasige Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2929//
    3030//
     
    6767   return mass;
    6868}
     69
    6970
    7071G4double G4NucleiProperties::GetNuclearMass(const G4int A, const G4int Z)
     
    9091#ifdef G4VERBOSE
    9192    if (G4ParticleTable::GetParticleTable()->GetVerboseLevel()>0) {
    92       G4cout << "G4NucleiProperties::GetNuclearMass: Wrong values for A = " << A
     93      G4cerr << "G4NucleiProperties::GetNuclearMass: Wrong values for A = " << A
    9394             << " and Z = " << Z << G4endl;
    9495    }
     
    143144#ifdef G4VERBOSE
    144145    if (G4ParticleTable::GetParticleTable()->GetVerboseLevel()>0) {
    145       G4cout << "G4NucleiProperties::IsInStableTable: Wrong values for A = "
     146      G4cerr << "G4NucleiProperties::IsInStableTable: Wrong values for A = "
    146147             << A << " and Z = " << Z << G4endl;       
    147148    }
     
    166167#ifdef G4VERBOSE
    167168    if (G4ParticleTable::GetParticleTable()->GetVerboseLevel()>0) {
    168       G4cout << "G4NucleiProperties::GetMassExccess: Wrong values for A = "
     169      G4cerr << "G4NucleiProperties::GetMassExccess: Wrong values for A = "
    169170             << A << " and Z = " << Z << G4endl;
    170171    }
     
    191192#ifdef G4VERBOSE
    192193    if (G4ParticleTable::GetParticleTable()->GetVerboseLevel()>0) {
    193       G4cout << "G4NucleiProperties::GetAtomicMass: Wrong values for A = "
     194      G4cerr << "G4NucleiProperties::GetAtomicMass: Wrong values for A = "
    194195             << A << " and Z = " << Z << G4endl;       
    195196    }
     
    225226#ifdef G4VERBOSE
    226227    if (G4ParticleTable::GetParticleTable()->GetVerboseLevel()>0) {
    227       G4cout << "G4NucleiProperties::GetMassExccess: Wrong values for A = "
     228      G4cerr << "G4NucleiProperties::GetMassExccess: Wrong values for A = "
    228229             << A << " and Z = " << Z << G4endl;
    229230    }
     
    265266#ifdef G4VERBOSE
    266267    if (G4ParticleTable::GetParticleTable()->GetVerboseLevel()>0) {
    267       G4cout << "G4NucleiProperties::NuclearMass: Wrong values for A = "
     268      G4cerr << "G4NucleiProperties::NuclearMass: Wrong values for A = "
    268269             << A << " and Z = " << Z << G4endl;
    269270    }
  • trunk/source/particles/management/src/G4ParticleDefinition.cc

    r1196 r1315  
    2525//
    2626//
    27 // $Id: G4ParticleDefinition.cc,v 1.34 2009/09/21 04:08:24 kurasige Exp $
    28 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// $Id: G4ParticleDefinition.cc,v 1.36 2010/05/20 01:01:07 kurasige Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2929//
    3030//
     
    133133   G4ApplicationState currentState = G4StateManager::GetStateManager()->GetCurrentState();
    134134
    135    if ( (theParticleType!=nucleus) && (currentState!=G4State_PreInit)){
     135   if ( !fShortLivedFlag && (theParticleType!=nucleus) && (currentState!=G4State_PreInit)){
    136136#ifdef G4VERBOSE
    137137     if (GetVerboseLevel()>0) {
    138        G4cout << "G4ParticleDefintion (other than ions) should be created in Pre_Init state  ";
    139        G4cout << aName << G4endl;
     138       G4cerr << "G4ParticleDefintion (other than ions and shortlived) should be created in Pre_Init state  "
     139             << aName << G4endl;
    140140     }
    141141#endif
     
    225225#ifdef G4VERBOSE
    226226        if (verboseLevel>0) {
    227           G4cout << "G4ParticleDefinition::FillQuarkContents  : ";
    228           G4cout << " illegal charge (" << thePDGCharge/eplus;
    229           G4cout << " PDG code=" << thePDGEncoding <<G4endl;
     227          G4cerr << "G4ParticleDefinition::FillQuarkContents  : "
     228                 << " illegal charge (" << thePDGCharge/eplus
     229                << " PDG code=" << thePDGEncoding <<G4endl;
    230230        }
    231231#endif
     
    236236#ifdef G4VERBOSE
    237237        if (verboseLevel>0) {
    238           G4cout << "G4ParticleDefinition::FillQuarkContents  : ";
    239           G4cout << " illegal SPIN (" << thePDGiSpin << "/2";
    240           G4cout << " PDG code=" << thePDGEncoding <<G4endl;
     238          G4cerr << "G4ParticleDefinition::FillQuarkContents  : "
     239                 << " illegal SPIN (" << thePDGiSpin << "/2"
     240                << " PDG code=" << thePDGEncoding <<G4endl;
    241241        }
    242242#endif
  • trunk/source/particles/management/src/G4ParticleTable.cc

    r1196 r1315  
    2525//
    2626//
    27 // $Id: G4ParticleTable.cc,v 1.35 2009/08/17 14:52:19 kurasige Exp $
    28 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// $Id: G4ParticleTable.cc,v 1.36 2010/05/20 01:01:07 kurasige Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2929//
    3030// class G4ParticleTable
     
    225225#ifdef G4VERBOSE
    226226    if (verboseLevel>0){
    227       G4cout << "The particle[Addr:" << particle << "] has no name "<< G4endl;
     227      G4cerr << "The particle[Addr:" << particle << "] has no name "<< G4endl;
    228228    }
    229229#endif
     
    235235#ifdef G4VERBOSE
    236236      if (verboseLevel>0){
    237         G4cout << "The particle " << particle->GetParticleName()
     237        G4cerr << "The particle " << particle->GetParticleName()
    238238               << "has been already registered in the Particle Table "<< G4endl;
    239239      }
     
    384384#ifdef G4VERBOSE
    385385  if (verboseLevel>1){
    386     G4cout << " G4ParticleTable::GetParticle";
    387     G4cout << " invalid index (=" << index << ")" << G4endl;
     386    G4cerr << " G4ParticleTable::GetParticle"
     387          << " invalid index (=" << index << ")" << G4endl;
    388388  }
    389389#endif
     
    407407#ifdef G4VERBOSE
    408408      if (verboseLevel>1){
    409         G4cout << "PDGEncoding  [" <<  aPDGEncoding << "] is not valid " << G4endl;
     409        G4cerr << "PDGEncoding  [" <<  aPDGEncoding << "] is not valid " << G4endl;
    410410      }
    411411#endif
     
    423423#ifdef G4VERBOSE
    424424    if ((particle == 0) && (verboseLevel>1) ){
    425       G4cout << "CODE:" << aPDGEncoding << " does not exist in ParticleTable " << G4endl;
     425      G4cerr << "CODE:" << aPDGEncoding << " does not exist in ParticleTable " << G4endl;
    426426    }
    427427#endif
     
    447447      ptr->DumpTable();
    448448    } else {
    449       G4cout << " G4ParticleTable::DumpTable : "
     449      G4cerr << " G4ParticleTable::DumpTable : "
    450450             << particle_name << " does not exist in ParticleTable " <<G4endl;
    451451    }
  • trunk/source/particles/management/src/G4VDecayChannel.cc

    r1196 r1315  
    2525//
    2626//
    27 // $Id: G4VDecayChannel.cc,v 1.19 2009/08/17 14:52:19 kurasige Exp $
    28 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// $Id: G4VDecayChannel.cc,v 1.20 2010/05/20 01:01:07 kurasige Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2929//
    3030//
     
    218218#ifdef G4VERBOSE
    219219    if (verboseLevel>0) {
    220       G4cout << "G4VDecayChannel::SetDaughter: ";
    221       G4cout << "Number of daughters is not defined" << G4endl;
     220      G4cerr << "G4VDecayChannel::SetDaughter: "
     221            << "Number of daughters is not defined" << G4endl;
    222222    }
    223223#endif
     
    238238#ifdef G4VERBOSE
    239239    if (verboseLevel>0) {
    240       G4cout << "G4VDecayChannel::SetDaughter";
    241       G4cout << "index out of range " << anIndex << G4endl;
     240      G4cerr << "G4VDecayChannel::SetDaughter"
     241            << "index out of range " << anIndex << G4endl;
    242242    }
    243243#endif
     
    281281#ifdef G4VERBOSE
    282282    if (verboseLevel>0) {
    283       G4cout << "G4VDecayChannel::FillDaughters   ";
    284       G4cout << "[ " << parent->GetParticleName() << " ]";
    285       G4cout << "numberOfDaughters is not defined yet";
     283      G4cerr << "G4VDecayChannel::FillDaughters   "
     284             << "[ " << parent->GetParticleName() << " ]"
     285            << "numberOfDaughters is not defined yet";
    286286    }
    287287#endif
     
    302302#ifdef G4VERBOSE
    303303      if (verboseLevel>0) {
    304         G4cout << "G4VDecayChannel::FillDaughters  ";
    305         G4cout << "[ " << parent->GetParticleName() << " ]";
    306         G4cout << index << "-th daughter is not defined yet" << G4endl;
     304        G4cerr << "G4VDecayChannel::FillDaughters  "
     305               << "[ " << parent->GetParticleName() << " ]"
     306              << index << "-th daughter is not defined yet" << G4endl;
    307307      }
    308308#endif
     
    318318#ifdef G4VERBOSE
    319319      if (verboseLevel>0) {
    320         G4cout << "G4VDecayChannel::FillDaughters  ";
    321         G4cout << "[ " << parent->GetParticleName() << " ]";
    322         G4cout << index << ":" << *daughters_name[index];
    323         G4cout << " is not defined !!" << G4endl;
    324         G4cout << " The BR of this decay mode is set to zero " << G4endl;
     320        G4cerr << "G4VDecayChannel::FillDaughters  "
     321                << "[ " << parent->GetParticleName() << " ]"
     322               << index << ":" << *daughters_name[index]
     323              << " is not defined !!" << G4endl;
     324        G4cerr << " The BR of this decay mode is set to zero " << G4endl;
    325325      }
    326326#endif
     
    345345#ifdef G4VERBOSE
    346346   if (GetVerboseLevel()>0) {
    347      G4cout << "G4VDecayChannel::FillDaughters ";
    348      G4cout << "[ " << parent->GetParticleName() << " ]";
    349      G4cout << "    Energy/Momentum conserevation breaks " <<G4endl;
     347     G4cerr << "G4VDecayChannel::FillDaughters "
     348            << "[ " << parent->GetParticleName() << " ]"
     349           << "    Energy/Momentum conserevation breaks " <<G4endl;
    350350     if (GetVerboseLevel()>1) {
    351        G4cout << "    parent:" << *parent_name;
    352        G4cout << " mass:" << parentmass/GeV << "[GeV/c/c]" <<G4endl;
     351       G4cerr << "    parent:" << *parent_name
     352             << " mass:" << parentmass/GeV << "[GeV/c/c]" <<G4endl;
    353353       for (index=0; index < numberOfDaughters; index++){
    354          G4cout << "     daughter " << index << ":" << *daughters_name[index];
    355          G4cout << " mass:" << daughters[index]->GetPDGMass()/GeV;
    356          G4cout << "[GeV/c/c]" <<G4endl;
     354         G4cerr << "     daughter " << index << ":" << *daughters_name[index]
     355                << " mass:" << daughters[index]->GetPDGMass()/GeV
     356                << "[GeV/c/c]" <<G4endl;
    357357       }
    358358     }
     
    369369#ifdef G4VERBOSE
    370370    if (verboseLevel>0) {
    371       G4cout << "G4VDecayChannel::FillParent   ";
    372       G4cout << ": parent name is not defined !!" << G4endl;
     371      G4cerr << "G4VDecayChannel::FillParent   "
     372            << ": parent name is not defined !!" << G4endl;
    373373    }
    374374#endif
     
    384384#ifdef G4VERBOSE
    385385    if (verboseLevel>0) {
    386       G4cout << "G4VDecayChannel::FillParent   ";
    387       G4cout << *parent_name << " does not exist !!" << G4endl;
     386      G4cerr << "G4VDecayChannel::FillParent   "
     387            << *parent_name << " does not exist !!" << G4endl;
    388388    }
    389389#endif
Note: See TracChangeset for help on using the changeset viewer.