]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TGeant4/TG4ExtDecayer.cxx
Coding Rule violations corrected.
[u/mrichter/AliRoot.git] / TGeant4 / TG4ExtDecayer.cxx
index 8d9cf7158802e769abccaff8223b1110c77ed705..9ef10488937bdc2e6c029f7ad9c889977a1ed611 100644 (file)
@@ -1,6 +1,10 @@
 // $Id$
 // Category: physics
 //
+// Author: I. Hrivnacova
+//
+// Class TG4ExtDecayer
+// -------------------
 // See the class description in the header file.
 
 #include "AliDecayer.h"
 
 #include <math.h>
 
-// constructor
+//_____________________________________________________________________________
 TG4ExtDecayer::TG4ExtDecayer(AliDecayer* externalDecayer)
   : G4VExtDecayer("TG4ExtDecayer"),
-    fExternalDecayer(externalDecayer),
-    fVerboseLevel(0) {
+    TG4Verbose("extDecayer"),
+    fExternalDecayer(externalDecayer) {
 //
   fDecayProductsArray = new  TClonesArray("TParticle", 1000);
   fParticlesManager = TG4ParticlesManager::Instance();
 }
 
+//_____________________________________________________________________________
+TG4ExtDecayer::TG4ExtDecayer(const TG4ExtDecayer& right)
+  : TG4Verbose("extDecayer") {
+// 
+  TG4Globals::Exception(
+    "TG4ExtDecayer is protected from copying.");
+}
+
+//_____________________________________________________________________________
 TG4ExtDecayer::~TG4ExtDecayer() {
 //
   delete fDecayProductsArray;
 }
 
+
+// operators
+
+//_____________________________________________________________________________
+TG4ExtDecayer& TG4ExtDecayer::operator=(const TG4ExtDecayer& right)
+{
+  // check assignement to self
+  if (this == &right) return *this;
+
+  TG4Globals::Exception(
+    "TG4ExtDecayer is protected from assigning.");
+    
+  return *this;  
+} 
+
 // public methods
 
+//_____________________________________________________________________________
 G4DecayProducts* TG4ExtDecayer::ImportDecayProducts(const G4Track& track)
 {
   // check if external decayer is defined
@@ -72,8 +101,9 @@ G4DecayProducts* TG4ExtDecayer::ImportDecayProducts(const G4Track& track)
   G4int nofParticles
     = fExternalDecayer->ImportParticles(fDecayProductsArray);
   
-  if (fVerboseLevel>0)
+  if (VerboseLevel()>1) {
     G4cout << "nofParticles: " <<  nofParticles << G4endl;
+  }  
 
   // convert decay products TParticle type 
   // to G4DecayProducts  
@@ -94,8 +124,9 @@ G4DecayProducts* TG4ExtDecayer::ImportDecayProducts(const G4Track& track)
       // pass to tracking final particles only;
       // skip neutrinos
 
-      if (fVerboseLevel>0)
+      if (VerboseLevel()>1) {
         G4cout << "  " << i << "th particle PDG: " << pdg << "   ";
+      }
             
       // create G4DynamicParticle 
       G4DynamicParticle* dynamicParticle 
@@ -103,10 +134,11 @@ G4DecayProducts* TG4ExtDecayer::ImportDecayProducts(const G4Track& track)
 
       if (dynamicParticle) {
 
-        if (fVerboseLevel>0)
+        if (VerboseLevel()>1) {
           G4cout << "  G4 particle name: " 
                  << dynamicParticle->GetDefinition()->GetParticleName()
                 << G4endl;
+       }        
 
         // add dynamicParticle to decayProducts
         decayProducts->PushProducts(dynamicParticle);
@@ -115,8 +147,9 @@ G4DecayProducts* TG4ExtDecayer::ImportDecayProducts(const G4Track& track)
       }
     }       
   }                         
-  if (fVerboseLevel>0)
+  if (VerboseLevel()>1) {
     G4cout << "nofParticles for tracking: " <<  counter << G4endl;
+  }  
      
   return decayProducts;
 }