Adapted to changes in Geant4.10.3, fixed bug in musrRootOutput.cc

This commit is contained in:
prokscha 2017-03-11 14:50:06 +01:00
parent fa3de4a9b8
commit cf85ff8d25
4 changed files with 12 additions and 10 deletions

View File

@ -91,10 +91,10 @@ G4DecayProducts *MuDecayChannel::DecayIt(G4double)
if (GetVerboseLevel()>1) G4cout << "MuDecayChannel::DecayIt "; if (GetVerboseLevel()>1) G4cout << "MuDecayChannel::DecayIt ";
#endif #endif
//------------------------------modified----------xran---------------- //------------------------------Geant4.10.3-------TP------------------
if (G4MT_parent == 0) FillParent(); if (G4MT_parent == 0) CheckAndFillParent();
if (G4MT_daughters == 0) FillDaughters(); if (G4MT_daughters == 0) CheckAndFillDaughters();
//------------------------------modified----------xran---------------- //------------------------------modified----------TP------------------
// parent mass // parent mass
//------------------------------modified----------xran---------------- //------------------------------modified----------xran----------------

View File

@ -68,9 +68,9 @@ G4DecayProducts *MuDecayChannelWithSpin::DecayIt(G4double)
#ifdef G4VERBOSE #ifdef G4VERBOSE
if (GetVerboseLevel()>1) G4cout << "MuDecayChannelWithSpin::DecayIt "; if (GetVerboseLevel()>1) G4cout << "MuDecayChannelWithSpin::DecayIt ";
#endif #endif
// -------- Geant4.10.3 -TP-----------------------
if (G4MT_parent == 0) FillParent(); if (G4MT_parent == 0) CheckAndFillParent();
if (G4MT_daughters == 0) FillDaughters(); if (G4MT_daughters == 0) CheckAndFillDaughters();
// parent mass // parent mass
G4double parentmass = G4MT_parent->GetPDGMass(); G4double parentmass = G4MT_parent->GetPDGMass();

View File

@ -527,6 +527,7 @@ void musrPhysicsList::ConstructEM()
//del G4String myTypeOfProcesses = musrParameters::GetInstance()->GetMyTypeOfProcesses(); //del G4String myTypeOfProcesses = musrParameters::GetInstance()->GetMyTypeOfProcesses();
//del G4cout<<"musrPhysicsList::ConstructEM(): myTypeOfProcesses="<<myTypeOfProcesses<<G4endl; //del G4cout<<"musrPhysicsList::ConstructEM(): myTypeOfProcesses="<<myTypeOfProcesses<<G4endl;
auto theParticleIterator=GetParticleIterator(); //Geant4.10.3
theParticleIterator->reset(); theParticleIterator->reset();
while( (*theParticleIterator)() ){ while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->value(); G4ParticleDefinition* particle = theParticleIterator->value();
@ -587,6 +588,7 @@ void musrPhysicsList::ConstructGeneral() {
G4RadioactiveDecay* theRadioactiveDecay = new G4RadioactiveDecay(); G4RadioactiveDecay* theRadioactiveDecay = new G4RadioactiveDecay();
G4GenericIon* ion = G4GenericIon::GenericIon(); G4GenericIon* ion = G4GenericIon::GenericIon();
auto theParticleIterator=GetParticleIterator(); //Geant4.10.3
theParticleIterator->reset(); theParticleIterator->reset();
while( (*theParticleIterator)() ){ while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->value(); G4ParticleDefinition* particle = theParticleIterator->value();

View File

@ -471,10 +471,10 @@ void musrRootOutput::EndOfRunAction() {
for (Int_t i=0; i<maxNGeantParameters; i++) { for (Int_t i=0; i<maxNGeantParameters; i++) {
TVector_GeantParametersD[i]=GeantParametersD[i]; TVector_GeantParametersD[i]=GeantParametersD[i];
} }
TVector_GeantParametersD.Write("geantParametersD");
// //
TH1D* hGeantParameters = new TH1D("hGeantParameters","hGeantParameters",maxNGeantParameters,0.,float(maxNGeantParameters)); TH1D* hGeantParameters = new TH1D("hGeantParameters","hGeantParameters",maxNGeantParameters,0.,float(maxNGeantParameters));
for (Int_t i=0; i<maxNGeantParameters+1; i++) { TVector_GeantParametersD.Write("geantParametersD");
for (Int_t i=0; i<maxNGeantParameters; i++) {
hGeantParameters->SetBinContent(i,GeantParametersD[i]); hGeantParameters->SetBinContent(i,GeantParametersD[i]);
} }
hGeantParameters->Write(); hGeantParameters->Write();