]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Material and volume names in comment lines to simplify debugging.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 22 Feb 2005 12:28:29 +0000 (12:28 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 22 Feb 2005 12:28:29 +0000 (12:28 +0000)
TFluka/TFlukaConfigOption.cxx
TFluka/TFlukaConfigOption.h
TFluka/TFlukaMCGeometry.cxx

index fd85b313e79b35593beb15e4034219df22ebac9b..4beac26f01f6f65fe11dfc38fbf17396e8390e07 100644 (file)
@@ -97,7 +97,22 @@ void TFlukaConfigOption::WriteFlukaInputCards()
     //
     //
     if (fMedium > -1) {
-       fprintf(fgFile,"*\n*Material specific process and cut settings for #%8d \n", fMedium);
+       TFluka* fluka = (TFluka*) gMC;
+       TObjArray *matList = fluka->GetFlukaMaterials();
+       Int_t nmaterial =  matList->GetEntriesFast();
+       TGeoMaterial* material = 0;
+       for (Int_t im = 0; im < nmaterial; im++)
+       {
+           material = dynamic_cast<TGeoMaterial*> (matList->At(im));
+           Int_t idmat = material->GetIndex();
+           if (idmat == fMedium) break;            
+       }
+       
+       
+//
+// Check if global option
+
+       fprintf(fgFile,"*\n*Material specific process and cut settings for #%8d %s\n", fMedium, material->GetName());
        fCMatMin = fMedium;
        fCMatMax = fMedium;
     } else {
@@ -553,7 +568,7 @@ void TFlukaConfigOption::ProcessCUTNEU()
        Float_t neutronCut = cut;
        if (neutronCut < 0.0196) {
            neutronCut = 0.0196;
-           printf("Cut on neutron lower than upper limit if first energy group.\n");
+           printf("Cut on neutron lower than upper limit of first energy group.\n");
            printf("Cut reset to 19.6 MeV !\n");
        }
        fprintf(fgFile,"PART-THR  %10.4g%10.1f%10.1f\n", -neutronCut,  8.0,  9.0);
index 74ab4871ac0155e1f63691f1a7940bac155040cb..e422d068de7a52591112f2f1b156590188253b82 100644 (file)
@@ -75,7 +75,7 @@ public:
  protected:
     Double_t fCutValue[11];            // User cut
     Int_t    fProcessFlag[15];         // User flag assigned to processes
-    Int_t    fMedium;                  // Materials assigned to user settings
+    Int_t    fMedium;                  // Material assigned to user settings
     Float_t  fCMatMin;                 // Minimum material number used for current card 
     Float_t  fCMatMax;                 // Maximum material number used for current card
     
index 20da6f0b3bffb6e7e207e83aa60721206ebb9696..4f7e61004fdb91fad6ceb2f08604353f513e1f90 100644 (file)
@@ -785,7 +785,9 @@ void TFlukaMCGeometry::CreateFlukaMatFile(const char *fname)
       }   
 
       Float_t hasfield  = (vol->GetMedium()->GetParam(1) > 0) ? flagfield : 0.;
-      
+      out << "* Assigning material:   " << vol->GetMedium()->GetMaterial()->GetName() << "   to Volume: " << vol->GetName();
+      out << endl;
+
       out << setw(10) << "ASSIGNMAT ";
       out.setf(static_cast<std::ios::fmtflags>(0),std::ios::floatfield);
       out << setw(10) << setiosflags(ios::fixed) << Double_t(idmat);