Skip to content
Snippets Groups Projects
Commit f7630cfb authored by Unknown's avatar Unknown
Browse files

No commit message

No commit message
parent 030fe1d8
No related branches found
No related tags found
No related merge requests found
...@@ -14,11 +14,12 @@ TransfertToResonance ...@@ -14,11 +14,12 @@ TransfertToResonance
SigmaPhiY= 0.963142053 SigmaPhiY= 0.963142053
SigmaX= 6.232 SigmaX= 6.232
SigmaY= 9.069 SigmaY= 9.069
ResonanceWidth= 1.3
ResonanceDecayZ= 2 ResonanceDecayZ= 2
ResonanceDecayA= 8 ResonanceDecayA= 8
CrossSectionPath= 11Li(d,3He)10He.txt CrossSectionPath= 11Li(d,3He)10He.txt
ShootLight= 0 ShootLight= 1
ShootHeavy= 1 ShootHeavy= 0
ShootDecayProduct= 0 ShootDecayProduct= 0
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
......
...@@ -59,6 +59,7 @@ class EventGeneratorTransfertToResonance : public VEventGenerator ...@@ -59,6 +59,7 @@ class EventGeneratorTransfertToResonance : public VEventGenerator
double SigmaY , double SigmaY ,
double SigmaThetaX , double SigmaThetaX ,
double SigmaPhiY, double SigmaPhiY,
double ResonanceWidth,
int ResonanceDecayZ , int ResonanceDecayZ ,
int ResonanceDecayA , int ResonanceDecayA ,
bool ShootLight , bool ShootLight ,
...@@ -114,8 +115,10 @@ class EventGeneratorTransfertToResonance : public VEventGenerator ...@@ -114,8 +115,10 @@ class EventGeneratorTransfertToResonance : public VEventGenerator
Reaction* m_Reaction ; Reaction* m_Reaction ;
private: // Resonance decay channel private: // Resonance decay channel
int m_ResonanceDecayZ ; double m_ResonanceWidth ;
int m_ResonanceDecayA ; double m_ResonanceMean ;
int m_ResonanceDecayZ ;
int m_ResonanceDecayA ;
//Other //Other
void Print() const ; void Print() const ;
...@@ -144,6 +147,7 @@ class EventGeneratorTransfertToResonance : public VEventGenerator ...@@ -144,6 +147,7 @@ class EventGeneratorTransfertToResonance : public VEventGenerator
double SigmaY , double SigmaY ,
double SigmaThetaX , double SigmaThetaX ,
double SigmaPhiY , double SigmaPhiY ,
double ResonanceWidth,
int ResonanceDecayZ , int ResonanceDecayZ ,
int ResonanceDecayA , int ResonanceDecayA ,
bool ShootLight , bool ShootLight ,
......
...@@ -84,6 +84,7 @@ EventGeneratorTransfertToResonance::EventGeneratorTransfertToResonance( string ...@@ -84,6 +84,7 @@ EventGeneratorTransfertToResonance::EventGeneratorTransfertToResonance( string
double SigmaY , double SigmaY ,
double SigmaThetaX , double SigmaThetaX ,
double SigmaPhiY , double SigmaPhiY ,
double ResonanceWidth,
int ResonanceDecayZ , int ResonanceDecayZ ,
int ResonanceDecayA , int ResonanceDecayA ,
bool ShootLight , bool ShootLight ,
...@@ -104,6 +105,7 @@ EventGeneratorTransfertToResonance::EventGeneratorTransfertToResonance( string ...@@ -104,6 +105,7 @@ EventGeneratorTransfertToResonance::EventGeneratorTransfertToResonance( string
SigmaY , SigmaY ,
SigmaThetaX , SigmaThetaX ,
SigmaPhiY , SigmaPhiY ,
ResonanceWidth ,
ResonanceDecayZ , ResonanceDecayZ ,
ResonanceDecayA , ResonanceDecayA ,
ShootLight , ShootLight ,
...@@ -140,7 +142,7 @@ void EventGeneratorTransfertToResonance::ReadConfiguration(string Path) ...@@ -140,7 +142,7 @@ void EventGeneratorTransfertToResonance::ReadConfiguration(string Path)
////////Reaction Setting needs/////// ////////Reaction Setting needs///////
string Beam, Target, Heavy, Light, CrossSectionPath ; string Beam, Target, Heavy, Light, CrossSectionPath ;
G4double BeamEnergy = 0 , ExcitationEnergy = 0 , BeamEnergySpread = 0 , SigmaX = 0 , SigmaY = 0 , SigmaThetaX = 0 , SigmaPhiY=0, ResonanceDecayZ = 0 , ResonanceDecayA = 0 ; G4double BeamEnergy = 0 , ExcitationEnergy = 0 , BeamEnergySpread = 0 , SigmaX = 0 , SigmaY = 0 , SigmaThetaX = 0 , SigmaPhiY=0, ResonanceWidth = 0 ,ResonanceDecayZ = 0 , ResonanceDecayA = 0 ;
bool ShootLight = false ; bool ShootLight = false ;
bool ShootHeavy = false ; bool ShootHeavy = false ;
bool ShootDecayProduct = false ; bool ShootDecayProduct = false ;
...@@ -160,6 +162,7 @@ void EventGeneratorTransfertToResonance::ReadConfiguration(string Path) ...@@ -160,6 +162,7 @@ void EventGeneratorTransfertToResonance::ReadConfiguration(string Path)
bool check_CrossSectionPath = false ; bool check_CrossSectionPath = false ;
bool check_ShootLight = false ; bool check_ShootLight = false ;
bool check_ShootHeavy = false ; bool check_ShootHeavy = false ;
bool check_ResonanceWidth = false ;
bool check_ResonanceDecayZ = false ; bool check_ResonanceDecayZ = false ;
bool check_ResonanceDecayA = false ; bool check_ResonanceDecayA = false ;
bool check_ShootDecayProduct = false ; bool check_ShootDecayProduct = false ;
...@@ -265,6 +268,13 @@ while(ReadingStatus){ ...@@ -265,6 +268,13 @@ while(ReadingStatus){
G4cout << "Beam Emmitance Phi " << SigmaPhiY / deg << " deg" << G4endl; G4cout << "Beam Emmitance Phi " << SigmaPhiY / deg << " deg" << G4endl;
} }
else if (DataBuffer.compare(0, 15, "ResonanceWidth=") == 0) {
check_ResonanceWidth = true ;
ReactionFile >> DataBuffer;
ResonanceWidth = atof(DataBuffer.c_str())*MeV;
G4cout << "Resonance Width " << ResonanceWidth/MeV << " MeV" << G4endl;
}
else if (DataBuffer.compare(0, 17, "ResonanceDecayZ=") == 0) { else if (DataBuffer.compare(0, 17, "ResonanceDecayZ=") == 0) {
check_ResonanceDecayZ = true ; check_ResonanceDecayZ = true ;
ReactionFile >> DataBuffer; ReactionFile >> DataBuffer;
...@@ -320,7 +330,7 @@ while(ReadingStatus){ ...@@ -320,7 +330,7 @@ while(ReadingStatus){
if( check_Beam && check_Target && check_Light && check_Heavy && check_ExcitationEnergy if( check_Beam && check_Target && check_Light && check_Heavy && check_ExcitationEnergy
&& check_BeamEnergy && check_BeamEnergySpread && check_FWHMX && check_FWHMY && check_EmmitanceTheta && check_BeamEnergy && check_BeamEnergySpread && check_FWHMX && check_FWHMY && check_EmmitanceTheta
&& check_EmmitancePhi && check_CrossSectionPath && check_ShootLight && check_ShootHeavy && check_EmmitancePhi && check_CrossSectionPath && check_ShootLight && check_ShootHeavy
&& check_ResonanceDecayZ && check_ResonanceDecayA && check_ShootDecayProduct) && check_ResonanceWidth && check_ResonanceDecayZ && check_ResonanceDecayA && check_ShootDecayProduct)
ReadingStatus = false ; ReadingStatus = false ;
} }
...@@ -339,6 +349,7 @@ while(ReadingStatus){ ...@@ -339,6 +349,7 @@ while(ReadingStatus){
SigmaY , SigmaY ,
SigmaThetaX , SigmaThetaX ,
SigmaPhiY , SigmaPhiY ,
ResonanceWidth,
ResonanceDecayZ , ResonanceDecayZ ,
ResonanceDecayA , ResonanceDecayA ,
ShootLight , ShootLight ,
...@@ -346,7 +357,6 @@ while(ReadingStatus){ ...@@ -346,7 +357,6 @@ while(ReadingStatus){
ShootDecayProduct , ShootDecayProduct ,
CrossSectionPath ); CrossSectionPath );
ReactionFile.close(); ReactionFile.close();
} }
...@@ -371,6 +381,14 @@ void EventGeneratorTransfertToResonance::GenerateEvent(G4Event* anEvent , G4Part ...@@ -371,6 +381,14 @@ void EventGeneratorTransfertToResonance::GenerateEvent(G4Event* anEvent , G4Part
G4ParticleDefinition* HeavyName G4ParticleDefinition* HeavyName
= G4ParticleTable::GetParticleTable()->GetIon(HeavyZ, HeavyA, m_Reaction->GetExcitation()*MeV); = G4ParticleTable::GetParticleTable()->GetIon(HeavyZ, HeavyA, m_Reaction->GetExcitation()*MeV);
// Shoot the Resonance energy following the mean and width value
double EXX = -10 ;
while(EXX<0)
EXX = RandGauss::shoot(m_ResonanceMean,m_ResonanceWidth) ;
m_Reaction->SetExcitation( EXX );
// Vertex position and beam angle inte world frame // Vertex position and beam angle inte world frame
G4double x0 = 1000 * cm ; G4double x0 = 1000 * cm ;
G4double y0 = 1000 * cm ; G4double y0 = 1000 * cm ;
...@@ -427,7 +445,7 @@ void EventGeneratorTransfertToResonance::GenerateEvent(G4Event* anEvent , G4Part ...@@ -427,7 +445,7 @@ void EventGeneratorTransfertToResonance::GenerateEvent(G4Event* anEvent , G4Part
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// Beam incident energy // Beam incident energy
G4double NominalBeamEnergy = m_BeamEnergy; G4double NominalBeamEnergy = m_BeamEnergy;
G4double IncidentBeamEnergy = RandGauss::shoot(NominalBeamEnergy, m_BeamEnergySpread / 2.35); G4double IncidentBeamEnergy = RandGauss::shoot(NominalBeamEnergy, m_BeamEnergySpread);
m_Reaction->SetBeamEnergy(IncidentBeamEnergy); m_Reaction->SetBeamEnergy(IncidentBeamEnergy);
m_InitConditions->SetICIncidentEnergy(IncidentBeamEnergy / MeV); m_InitConditions->SetICIncidentEnergy(IncidentBeamEnergy / MeV);
// Angles // Angles
...@@ -702,6 +720,7 @@ void EventGeneratorTransfertToResonance::SetEverything( string name1 ...@@ -702,6 +720,7 @@ void EventGeneratorTransfertToResonance::SetEverything( string name1
double SigmaY , double SigmaY ,
double SigmaThetaX , double SigmaThetaX ,
double SigmaPhiY , double SigmaPhiY ,
double ResonanceWidth ,
int ResonanceDecayZ , int ResonanceDecayZ ,
int ResonanceDecayA , int ResonanceDecayA ,
bool ShootLight , bool ShootLight ,
...@@ -724,6 +743,8 @@ void EventGeneratorTransfertToResonance::SetEverything( string name1 ...@@ -724,6 +743,8 @@ void EventGeneratorTransfertToResonance::SetEverything( string name1
m_SigmaY = SigmaY ; m_SigmaY = SigmaY ;
m_SigmaThetaX = SigmaThetaX ; m_SigmaThetaX = SigmaThetaX ;
m_SigmaPhiY = SigmaPhiY ; m_SigmaPhiY = SigmaPhiY ;
m_ResonanceWidth = ResonanceWidth ;
m_ResonanceMean = Excitation ;
m_ResonanceDecayZ = ResonanceDecayZ ; m_ResonanceDecayZ = ResonanceDecayZ ;
m_ResonanceDecayA = ResonanceDecayA ; m_ResonanceDecayA = ResonanceDecayA ;
m_ShootLight = ShootLight ; m_ShootLight = ShootLight ;
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# choose a graphic system # choose a graphic system
#/vis/open OGLIX #/vis/open OGLIX
#/vis/open OGLSX #/vis/open OGLSX
/vis/open VRML2FILE #/vis/open VRML2FILE
/vis/scene/create /vis/scene/create
/vis/drawVolume /vis/drawVolume
/vis/viewer/set/viewpointThetaPhi 0 0 deg /vis/viewer/set/viewpointThetaPhi 0 0 deg
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment