Ignore:
Timestamp:
Nov 5, 2010, 4:08:39 PM (14 years ago)
Author:
garnier
Message:

update ti head

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/advanced/microbeam/src/MicrobeamRunAction.cc

    r807 r1342  
    2525//
    2626// -------------------------------------------------------------------
    27 // $Id: MicrobeamRunAction.cc,v 1.6 2006/06/29 16:05:37 gunter Exp $
     27// $Id: MicrobeamRunAction.cc,v 1.7 2010/10/07 14:03:11 sincerti Exp $
    2828// -------------------------------------------------------------------
    2929
     
    3636//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    3737
    38 MicrobeamRunAction::MicrobeamRunAction(MicrobeamDetectorConstruction* det)
    39 :Detector(det)
     38MicrobeamRunAction::MicrobeamRunAction(MicrobeamDetectorConstruction* det,
     39MicrobeamHistoManager * his)
     40:Detector(det),Histo(his)
    4041{   
    4142  saveRndm = 0; 
     
    5556
    5657 
     58  // Histograms
     59  Histo->book();
     60
    5761  // save Rndm status
    5862  if (saveRndm > 0)
     
    99103  }   
    100104 
    101   FILE *myFile;
    102   myFile=fopen("3DDose.txt","a");
    103105  for (G4int i=0; i<nbOfPixels; i++)
    104106  { 
     
    106108    v = mapVoxels[i];
    107109    if ( (GetNumEvent()+1) !=0)
    108       fprintf (myFile,"%f %f %f %f \n", v.x(), v.y(), v.z(), dose3DDose[i]/(GetNumEvent()+1));
     110      {
     111          Histo->FillNtuple(4,0,v.x());
     112          Histo->FillNtuple(4,1,v.y());
     113          Histo->FillNtuple(4,2,v.z());
     114          Histo->FillNtuple(4,3,dose3DDose[i]/(GetNumEvent()+1));
     115          Histo->AddRowNtuple(4);                           
     116      }
    109117  }
    110   fclose (myFile);                             
    111    
     118   
    112119  G4cout << "-> Total number of particles detected by the gas detector : " << GetNbOfHitsGas() << G4endl; 
    113120  G4cout << G4endl;   
     121 
     122  //save histograms     
     123  Histo->save();
     124
    114125}
Note: See TracChangeset for help on using the changeset viewer.