]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TFluka/endraw.cxx
Code clean-up. (Andrei Gheata).
[u/mrichter/AliRoot.git] / TFluka / endraw.cxx
index ab33cb1d827c7990cb2760eb2a100aab198fe078..a58c5213053fb4a4bfb00b8f60285d07f6bf719a 100644 (file)
@@ -21,6 +21,8 @@ extern "C" {
 void endraw(Int_t& icode, Int_t& mreg, Double_t& rull, Double_t& xsco, Double_t& ysco, Double_t& zsco)
 {
   TFluka* fluka = (TFluka*) gMC;
+  Int_t verbosityLevel = fluka->GetVerbosityLevel();
+  Bool_t debug = (verbosityLevel>=3)?kTRUE:kFALSE;
   fluka->SetCaller(3);
   fluka->SetIcode(icode);
   fluka->SetRull(rull);
@@ -29,14 +31,14 @@ void endraw(Int_t& icode, Int_t& mreg, Double_t& rull, Double_t& xsco, Double_t&
   fluka->SetZsco(zsco);
   fluka->SetMreg(mreg);
   if (icode == 11) {
-    cout << " For icode=" << icode << " Stepping is NOT called" << endl;
+    if (debug) cout << " For icode=" << icode << " Stepping is NOT called" << endl;
     return;
   }
   if (TRACKR.jtrack == -1) {
 // Handle quantum efficiency the G3 way
-      printf("endraw: Cerenkov photon depositing energy: %d %e\n", mreg, rull);
+      if (debug) printf("endraw: Cerenkov photon depositing energy: %d %e\n", mreg, rull);
       TGeoMaterial* material = (gGeoManager->GetCurrentVolume())->GetMaterial();
-      Int_t nmat = material->GetIndex();
+      // Int_t nmat = material->GetIndex();
       TFlukaCerenkov*  cerenkov = dynamic_cast<TFlukaCerenkov*> (material->GetCerenkovProperties());
       if (cerenkov) {
          Double_t eff = (cerenkov->GetQuantumEfficiency(rull));