Skip to content
Snippets Groups Projects
Commit 4665714b authored by Adrien Matta's avatar Adrien Matta :skull_crossbones:
Browse files

* Fixing issue where using Dali and Minos lead to unconsistant Dali Det

Nbr
        - The issue was in the Calorimeter scorer
        - The size of the level vector was access via a static
parent 3daa6597
No related branches found
No related tags found
No related merge requests found
/*****************************************************************************
* Copyright (C) 2009-2018 this file is part of the NPTool Project *
* Copyright (C) 2009-2018 this file is part of the NPTool Project *
* *
* For the licensing terms see $NPTOOL/Licence/NPTool_Licence *
* For the list of contributors see $NPTOOL/Licence/Contributors *
*****************************************************************************/
/*****************************************************************************
* Original Author: Elidiano Tronchin contact address: elidiano.tronchin@studenti.unipd.it *
* Original Author: E. Tronchin *
* contact address: elidiano.tronchin@studenti.unipd.it *
* *
* Creation Date : septembre 2018 *
* Last update : *
*---------------------------------------------------------------------------*
* Decription: *
* This class describe Dali simulation *
* This class describe Dali simulation *
* *
*---------------------------------------------------------------------------*
* Comment: *
......@@ -379,8 +380,6 @@ void Dali::ReadSensitive(const G4Event* ){
int DetectorNbr = (ArrayNbr-1)*3+DetectinsArrayNbr;
m_Event->SetEnergy(DetectorNbr,Energy);
m_Event->SetTime(DetectorNbr,Time);
}
}
}
......@@ -390,7 +389,7 @@ void Dali::ReadSensitive(const G4Event* ){
void Dali::InitializeScorers() {
// This check is necessary in case the geometry is reloaded
bool already_exist = false;
vector<G4int> NestingLevel;
vector<int> NestingLevel;
NestingLevel.push_back(2);
NestingLevel.push_back(3);
......@@ -400,7 +399,7 @@ void Dali::InitializeScorers() {
return ; //Necessary?
// Otherwise the scorer is initialised
vector<int> level; level.push_back(0);
// vector<int> level; level.push_back(0);
G4VPrimitiveScorer* Calorimeter= new CalorimeterScorers::PS_Calorimeter("Calorimeter", NestingLevel) ;
G4VPrimitiveScorer* Interaction= new InteractionScorers::PS_Interactions("Interaction",ms_InterCoord, 0) ;
//and register it to the multifunctionnal detector
......
This diff is collapsed.
......@@ -58,13 +58,13 @@ PS_Calorimeter::~PS_Calorimeter(){
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4bool PS_Calorimeter::ProcessHits(G4Step* aStep, G4TouchableHistory*){
// Contain Energy, Time + as many copy number as nested volume
static unsigned int mysize = m_NestingLevel.size();
unsigned int mysize = m_NestingLevel.size();
t_Energy = aStep->GetTotalEnergyDeposit();
t_Time = aStep->GetPreStepPoint()->GetGlobalTime();
t_Level.clear();
for(unsigned int i = 0 ; i < mysize ; i++){
t_Level.push_back(aStep->GetPreStepPoint()->GetTouchableHandle()->GetCopyNumber(m_NestingLevel[i]));
}
t_Level.push_back(aStep->GetPreStepPoint()->GetTouchableHandle()->GetCopyNumber(m_NestingLevel[i]));
}
// Check if the particle has interact before, if yes, add up the energies.
vector<CalorimeterData>::iterator it;
it = m_Data.find(CalorimeterData::CalculateIndex(t_Level));
......
......@@ -6,44 +6,44 @@ Minos
Shape= Cylindrical
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Dali
R = 210
Alpha = -60
Zeta = 90.03
R = 210 mm
Alpha = -60 deg
Zeta = 90.03 mm
Shape = Square
Material = NaI(Tl)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Dali
R = 210
Alpha = 0
Zeta = 90.03
R = 210 mm
Alpha = 0 deg
Zeta = 90.03 mm
Shape = Square
Material = NaI(Tl)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Dali
R = 210
Alpha = 60
Zeta = 90.03
R = 210 mm
Alpha = 60 deg
Zeta = 90.03 mm
Shape = Square
Material = NaI(Tl)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Dali
R = 210
Alpha = 120
Zeta = 90.03
R = 210 mm
Alpha = 120 deg
Zeta = 90.03 mm
Shape = Square
Material = NaI(Tl)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Dali
R = 210
Alpha = 180
Zeta = 90.03
R = 210 mm
Alpha = 180 deg
Zeta = 90.03 mm
Shape = Square
Material = NaI(Tl)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Dali
R = 210
Alpha = 240
Zeta = 90.03
R = 210 mm
Alpha = 240 deg
Zeta = 90.03 mm
Shape = Square
Material = NaI(Tl)
......@@ -51,44 +51,44 @@ Dali
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Dali
R = 210
Alpha = -60
Zeta = -90.03
R = 210 mm
Alpha = -60 deg
Zeta = -90.03 mm
Shape = Square
Material = NaI(Tl)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Dali
R = 210
Alpha = 0
Zeta = -90.03
R = 210 mm
Alpha = 0 deg
Zeta = -90.03 mm
Shape = Square
Material = NaI(Tl)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Dali
R = 210
Alpha = 60
Zeta = -90.03
R = 210 mm
Alpha = 60 deg
Zeta = -90.03 mm
Shape = Square
Material = NaI(Tl)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Dali
R = 210
Alpha = 120
Zeta = -90.03
R = 210 mm
Alpha = 120 deg
Zeta = -90.03 mm
Shape = Square
Material = NaI(Tl)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Dali
R = 210
Alpha = 180
Zeta = -90.03
R = 210 mm
Alpha = 180 deg
Zeta = -90.03 mm
Shape = Square
Material = NaI(Tl)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Dali
R = 210
Alpha = 240
Zeta = -90.03
R = 210 mm
Alpha = 240 deg
Zeta = -90.03 mm
Shape = Square
Material = NaI(Tl)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
......@@ -2,19 +2,19 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Beam
Particle= 1H
ExcitationEnergy= 0
Energy= 170
SigmaEnergy= 0.448
SigmaThetaX= 0.01
SigmaPhiY= 0.01
SigmaX= 0.01
ExcitationEnergy= 0 MeV
Energy= 170 MeV
SigmaEnergy= 0.448 MeV
SigmaThetaX= 0.01 deg
SigmaPhiY= 0.01 deg
SigmaX= 0.01 mm
%0.5
SigmaY= 0.01
SigmaY= 0.01 mm
%0.5
MeanThetaX= 0
MeanPhiY= 0
MeanX= 0
MeanY= 0
MeanThetaX= 0 deg
MeanPhiY= 0 deg
MeanX= 0 mm
MeanY= 0 mm
%EnergyProfilePath=
%XThetaXProfilePath=
%YPhiYProfilePath=
......@@ -24,8 +24,8 @@ TwoBodyReaction
Target= 12C
Light= 12C
Heavy= 1H
ExcitationEnergyLight= 0.0
ExcitationEnergyHeavy= 0.0
ExcitationEnergyLight= 0.0 MeV
ExcitationEnergyHeavy= 0.0 MeV
CrossSectionPath= flat.txt CSR
ShootLight= 1
ShootHeavy= 1
......
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