Ignore:
Timestamp:
Sep 30, 2010, 2:47:17 PM (15 years ago)
Author:
garnier
Message:

tag geant4.9.4 beta 1 + modifs locales

Location:
trunk/examples/extended/electromagnetic/TestEm9/src
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/extended/electromagnetic/TestEm9/src/DetectorConstruction.cc

    r1230 r1337  
    2525//
    2626//
    27 // $Id: DetectorConstruction.cc,v 1.11 2008/04/07 18:09:05 vnivanch Exp $
    28 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// $Id: DetectorConstruction.cc,v 1.14 2009/11/21 17:28:16 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//
     
    251251  G4double vertWidth = ecalWidth/5.;
    252252  G4int npads = (G4int)(vertWidth/padWidth);
     253  //G4cout << " vertWidth= " << vertWidth << " padWidth= " << padWidth
     254  //     << " npads= " << npads << G4endl;
     255  // insure beam to hit a middle of central pad
    253256  npads = (npads/2)*2 + 1;
    254   x0 = -0.5*padWidth*((G4double)(npads-1));
    255   G4double x1 = std::fabs(x0) + 0.5*padWidth + gap;
     257  x0 = -0.5*(padWidth + vertWidth);
     258  G4double x1 = 0.5*vertWidth + gap;
    256259  G4double z  = -(vertexLength+absLength);
    257260
  • trunk/examples/extended/electromagnetic/TestEm9/src/DetectorMessenger.cc

    r1230 r1337  
    2626//
    2727// $Id: DetectorMessenger.cc,v 1.3 2006/06/29 17:03:01 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//
  • trunk/examples/extended/electromagnetic/TestEm9/src/EmAcceptance.cc

    r1230 r1337  
    2626//
    2727// $Id: EmAcceptance.cc,v 1.4 2006/06/29 17:03:03 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//
  • trunk/examples/extended/electromagnetic/TestEm9/src/EventAction.cc

    r1230 r1337  
    2424// ********************************************************************
    2525//
    26 // $Id: EventAction.cc,v 1.4 2006/06/29 17:03:06 gunter Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     26// $Id: EventAction.cc,v 1.6 2010/06/07 05:40:46 perl Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
     
    3535
    3636#include "G4UImanager.hh"
    37 #include "G4TrajectoryContainer.hh"
    38 #include "G4Trajectory.hh"
    39 #include "G4VVisManager.hh"
    4037#include "G4Gamma.hh"
    4138#include "G4ios.hh"
     
    9289//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    9390
    94 void EventAction::EndOfEventAction(const G4Event* evt)
     91void EventAction::EndOfEventAction(const G4Event*)
    9592{
    9693  (HistoManager::GetPointer())->EndOfEvent();
    97   G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
    98 
    99   if(pVVisManager) {
    100     G4TrajectoryContainer* trjc = evt->GetTrajectoryContainer();
    101     G4int n_trajectories = 0;
    102     if (trjc) n_trajectories = trjc->entries();
    103 
    104     for(G4int i=0; i<n_trajectories; i++) {
    105       G4Trajectory* t = (G4Trajectory*)((*(evt->GetTrajectoryContainer()))[i]);
    106       if (drawFlag == "all") t->DrawTrajectory(1000);
    107       else if ((drawFlag == "charged")&&(t->GetCharge() != 0.))
    108                              t->DrawTrajectory(1000);
    109     }
    110   }
    11194
    11295  if(verbose > 0) {
  • trunk/examples/extended/electromagnetic/TestEm9/src/EventActionMessenger.cc

    r1230 r1337  
    2525//
    2626// $Id: EventActionMessenger.cc,v 1.3 2006/06/29 17:03:08 gunter Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/electromagnetic/TestEm9/src/HistoManager.cc

    r1230 r1337  
    3838
    3939#include "HistoManager.hh"
     40#include "G4MaterialCutsCouple.hh"
     41#include "G4EmProcessSubType.hh"
     42#include "G4VProcess.hh"
     43#include "G4VEmProcess.hh"
     44#include "G4VEnergyLossProcess.hh"
    4045#include "G4UnitsTable.hh"
    4146#include "Histo.hh"
     
    163168
    164169  histo->book();
     170
     171  brem.resize(93,0.0);
     172  phot.resize(93,0.0);
     173  comp.resize(93,0.0);
     174  conv.resize(93,0.0);
    165175
    166176  if(verbose > 0) {
     
    280290  }
    281291  if(isStarted) acc.EndOfAcceptance();
     292
     293  // atom frequency
     294  G4cout << "   Z  bremsstrahlung photoeffect  compton    conversion" << G4endl;
     295  for(j=1; j<93; ++j) {
     296    G4int n1 = G4int(brem[j]*x);
     297    G4int n2 = G4int(phot[j]*x);
     298    G4int n3 = G4int(comp[j]*x);
     299    G4int n4 = G4int(conv[j]*x);
     300    if(n1 + n2 + n3 + n4 > 0) {
     301      G4cout << std::setw(4) << j << std::setw(12) << n1 << std::setw(12) << n2
     302             << std::setw(12) << n3 << std::setw(12) << n4 << G4endl;
     303    }
     304  }
    282305}
    283306
     
    390413  G4ThreeVector pos = aTrack->GetVertexPosition();
    391414
     415  // primary
    392416  if(0 == pid) {
    393417
     
    414438    }
    415439
     440    // secondary
     441  } else {
     442    const G4VProcess* proc = aTrack->GetCreatorProcess();
     443    G4int type = proc->GetProcessSubType();
     444    if(type == fBremsstrahlung) {
     445      const G4Element* elm = static_cast<const G4VEnergyLossProcess*>(proc)->GetCurrentElement();
     446      if(elm) {
     447        G4int Z = G4int(elm->GetZ());
     448        if(Z > 0 && Z < 93) { brem[Z] += 1.0; }
     449      }
     450    } else if(type == fPhotoElectricEffect) {
     451      const G4Element* elm = static_cast<const G4VEmProcess*>(proc)->GetCurrentElement();
     452      if(elm) {
     453        G4int Z = G4int(elm->GetZ());
     454        if(Z > 0 && Z < 93) { phot[Z] += 1.0; }
     455      }
     456    } else if(type == fGammaConversion) {
     457      const G4Element* elm = static_cast<const G4VEmProcess*>(proc)->GetCurrentElement();
     458      if(elm) {
     459        G4int Z = G4int(elm->GetZ());
     460        if(Z > 0 && Z < 93) { conv[Z] += 1.0; }
     461      }
     462    } else if(type == fComptonScattering) {
     463      const G4Element* elm = static_cast<const G4VEmProcess*>(proc)->GetCurrentElement();
     464      if(elm) {
     465        G4int Z = G4int(elm->GetZ());
     466        if(Z > 0 && Z < 93) { comp[Z] += 1.0; }
     467      }
     468    }
     469
    416470    // delta-electron
    417   } else if (0 < pid && "e-" == name) {
    418     if(1 < verbose) {
    419       G4cout << "TrackingAction: Secondary electron " << G4endl;
    420     }
    421     AddDeltaElectron(dynParticle);
    422 
    423   } else if (0 < pid && "e+" == name) {
    424     if(1 < verbose) {
    425       G4cout << "TrackingAction: Secondary positron " << G4endl;
    426     }
    427     AddPositron(dynParticle);
    428 
    429   } else if (0 < pid && "gamma" == name) {
    430     if(1 < verbose) {
    431       G4cout << "TrackingAction: Secondary gamma; parentID= " << pid
    432              << " E= " << kinE << G4endl;
    433     }
    434     AddPhoton(dynParticle);
    435 
     471    if (0 < pid && "e-" == name) {
     472      if(1 < verbose) {
     473        G4cout << "TrackingAction: Secondary electron " << G4endl;
     474      }
     475      AddDeltaElectron(dynParticle);
     476
     477    } else if (0 < pid && "e+" == name) {
     478      if(1 < verbose) {
     479        G4cout << "TrackingAction: Secondary positron " << G4endl;
     480      }
     481      AddPositron(dynParticle);
     482
     483    } else if (0 < pid && "gamma" == name) {
     484      if(1 < verbose) {
     485        G4cout << "TrackingAction: Secondary gamma; parentID= " << pid
     486               << " E= " << kinE << G4endl;
     487      }
     488      AddPhoton(dynParticle);
     489    }
    436490  }
    437491}
  • trunk/examples/extended/electromagnetic/TestEm9/src/HistoMessenger.cc

    r1230 r1337  
    2626//
    2727// $Id: HistoMessenger.cc,v 1.7 2008/08/22 14:11:53 vnivanch Exp $
    28 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/electromagnetic/TestEm9/src/PhysListEmStandard.cc

    r1230 r1337  
    2525//
    2626//
    27 // $Id: PhysListEmStandard.cc,v 1.13 2008/11/16 21:01:10 maire Exp $
    28 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// $Id: PhysListEmStandard.cc,v 1.15 2009/11/20 20:27:21 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/electromagnetic/TestEm9/src/PhysicsList.cc

    r1230 r1337  
    2424// ********************************************************************
    2525//
    26 // $Id: PhysicsList.cc,v 1.24 2008/10/16 11:48:58 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     26// $Id: PhysicsList.cc,v 1.25 2009/11/20 20:22:44 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//---------------------------------------------------------------------------
     
    5050#include "G4EmStandardPhysics_option2.hh"
    5151#include "G4EmStandardPhysics_option3.hh"
    52 #include "PhysListEmLivermore.hh"
    53 #include "PhysListEmPenelope.hh"
     52#include "G4EmLivermorePhysics.hh"
     53#include "G4EmPenelopePhysics.hh"
    5454#include "G4DecayPhysics.hh"
    5555#include "G4HadronElasticPhysics.hh"
     
    188188      G4cout << "PhysicsList::Set " << name << " EM physics" << G4endl;
    189189
    190   } else if (name == "livermore") {
    191     emName = name;
    192     delete emPhysicsList;
    193     emPhysicsList = new PhysListEmLivermore();
    194     if (verboseLevel > 0)
    195       G4cout << "PhysicsList::Set Livermore EM physics" << G4endl;
    196 
    197   } else if (name == "penelope") {
    198     emName = name;
    199     delete emPhysicsList;
    200     emPhysicsList = new PhysListEmPenelope();
    201     if (verboseLevel > 0)
    202       G4cout << "PhysicsList::Set Penelope EM physics" << G4endl;
     190  } else if (name == "emlivermore") {
     191    emName = name;
     192    delete emPhysicsList;
     193    emPhysicsList = new G4EmLivermorePhysics();
     194
     195  } else if (name == "empenelope") {
     196    emName = name;
     197    delete emPhysicsList;
     198    emPhysicsList = new G4EmPenelopePhysics();
    203199
    204200  } else if (name == "elastic" && !helIsRegisted) {
  • trunk/examples/extended/electromagnetic/TestEm9/src/PhysicsListMessenger.cc

    r1230 r1337  
    2626//
    2727// $Id: PhysicsListMessenger.cc,v 1.4 2008/04/03 15:07:55 vnivanch Exp $
    28 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//
  • trunk/examples/extended/electromagnetic/TestEm9/src/PrimaryGeneratorAction.cc

    r1230 r1337  
    2626//
    2727// $Id: PrimaryGeneratorAction.cc,v 1.3 2006/06/29 17:03:46 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//
  • trunk/examples/extended/electromagnetic/TestEm9/src/StepMax.cc

    r1230 r1337  
    2525//
    2626// $Id: StepMax.cc,v 1.3 2006/06/29 17:03:52 gunter Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/electromagnetic/TestEm9/src/StepMaxMessenger.cc

    r1230 r1337  
    2525//
    2626// $Id: StepMaxMessenger.cc,v 1.2 2006/06/29 17:03:54 gunter Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/electromagnetic/TestEm9/src/SteppingAction.cc

    r1230 r1337  
    2626//
    2727// $Id: SteppingAction.cc,v 1.2 2006/06/29 17:03:57 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//
Note: See TracChangeset for help on using the changeset viewer.