Import Geant4 10.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-12-09 12:35:28 +01:00
parent 4ec577e5c4
commit a3452e42ac
3514 changed files with 210500 additions and 89628 deletions
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4AdjointSteppingAction.cc 81774 2014-06-05 08:36:37Z gcosmo $
// $Id: G4AdjointSteppingAction.cc 101439 2016-11-17 14:54:08Z gcosmo $
//
/////////////////////////////////////////////////////////////////////////////
// Class Name: G4AdjointSteppingAction
@@ -44,7 +44,7 @@
G4AdjointSteppingAction::G4AdjointSteppingAction()
: ext_sourceEMax(0.), start_event(false),
did_adj_part_reach_ext_source(false), last_ekin(0.), last_weight(0.),
prim_weight(0.), last_part_def(0), theUserAdjointSteppingAction(0),
prim_weight(1.), last_part_def(0), theUserAdjointSteppingAction(0),
theUserFwdSteppingAction(0)
{
theG4AdjointCrossSurfChecker = G4AdjointCrossSurfChecker::GetInstance();
@@ -59,6 +59,7 @@ G4AdjointSteppingAction::~G4AdjointSteppingAction()
void G4AdjointSteppingAction::UserSteppingAction(const G4Step* aStep)
{
G4Track* aTrack =aStep->GetTrack();
//G4cout<<"Ste weight "<<<<std:.endl;
//forward tracking mode
if(!is_adjoint_tracking_mode){
//check if last adjoint did reach the external source
@@ -72,6 +73,7 @@ void G4AdjointSteppingAction::UserSteppingAction(const G4Step* aStep)
}
//Apply first the user adjoint stepping action
//---------------------------
did_adj_part_reach_ext_source=false;
if (theUserAdjointSteppingAction) theUserAdjointSteppingAction->UserSteppingAction(aStep);
@@ -88,15 +90,17 @@ void G4AdjointSteppingAction::UserSteppingAction(const G4Step* aStep)
did_adj_part_reach_ext_source=false;
return;
}
G4double weight_factor = aTrack->GetWeight()/prim_weight;
//G4cout<<"Weight adjoint "<<aTrack->GetWeight()<<std::endl;
/*G4double weight_factor = aTrack->GetWeight()/prim_weight;
if ( (weight_factor>0 && weight_factor<=0) || weight_factor<= 1e-290 || weight_factor>1.e200)
{
//std::cout<<"Weight_factor problem! Value = "<<weight_factor<<std::endl;
aTrack->SetTrackStatus(fStopAndKill);
did_adj_part_reach_ext_source=false;
//G4cout<<thePartDef->GetParticleName()<<std::endl;
return;
}
*/
//Kill conditions for surface crossing
+21 -1
View File
@@ -100,10 +100,30 @@ void G4AdjointTrackingAction::PreUserTrackingAction(const G4Track* aTrack)
last_fwd_part_index=i;
i++;
}
//Fill the vectors
last_pos_vec.push_back(last_pos);
last_direction_vec.push_back(last_direction);
last_ekin_vec.push_back(last_ekin);
last_ekin_nuc_vec.push_back(last_ekin_nuc);
last_cos_th_vec.push_back(last_cos_th);
last_weight_vec.push_back(last_weight);
//G4cout<<"Last weight "<<last_weight<<std::endl;
last_fwd_part_PDGEncoding_vec.push_back(last_fwd_part_PDGEncoding);
last_fwd_part_index_vec.push_back(last_fwd_part_index);
}
else {
}
}
/////////////////////////////////////////////////////////
void G4AdjointTrackingAction::ClearEndOfAdjointTrackInfoVectors()
{ last_pos_vec.clear();
last_direction_vec.clear();
last_ekin_vec.clear();
last_ekin_nuc_vec.clear();
last_cos_th_vec.clear();
last_weight_vec.clear();
last_fwd_part_PDGEncoding_vec.clear();
last_fwd_part_index_vec.clear();
}