Skip to content
Snippets Groups Projects
Commit 5c0acb92 authored by moukaddam's avatar moukaddam
Browse files

Adding energy and time resolutions

parent 22a02a42
Branches
No related tags found
No related merge requests found
...@@ -572,10 +572,9 @@ void GeTAMU::ReadSensitive(const G4Event* event){ ...@@ -572,10 +572,9 @@ void GeTAMU::ReadSensitive(const G4Event* event){
// Loop on the HPGE map // Loop on the HPGE map
for (HPGE_itr = HPGEHitMap->GetMap()->begin() ; HPGE_itr != HPGEHitMap->GetMap()->end() ; HPGE_itr++){ for (HPGE_itr = HPGEHitMap->GetMap()->begin() ; HPGE_itr != HPGEHitMap->GetMap()->end() ; HPGE_itr++){
bool GeScoredHit= false; // flag true if first stage scores a hit above threshold
G4double* Info = *(HPGE_itr->second); G4double* Info = *(HPGE_itr->second);
G4double Energy = Info[0]; // RandGauss::shoot(Info[0], ResoEnergy/2.334); G4double Energy = Info[0];
G4double Time = Info[1]; G4double Time = Info[1];
// //
G4double InterPos_X = Info[2]; G4double InterPos_X = Info[2];
...@@ -594,7 +593,6 @@ void GeTAMU::ReadSensitive(const G4Event* event){ ...@@ -594,7 +593,6 @@ void GeTAMU::ReadSensitive(const G4Event* event){
else { SegmentNbr = 3; } // LEFT else { SegmentNbr = 3; } // LEFT
if(Energy>0.0*keV){ if(Energy>0.0*keV){
GeScoredHit= true;
m_GeTAMUData->SetCoreE(CloverNbr, CrystalNbr, Energy/keV); m_GeTAMUData->SetCoreE(CloverNbr, CrystalNbr, Energy/keV);
m_GeTAMUData->SetCoreT(CloverNbr, CrystalNbr, Time/ns); m_GeTAMUData->SetCoreT(CloverNbr, CrystalNbr, Time/ns);
m_GeTAMUData->SetSegmentE(CloverNbr, SegmentNbr, Energy/keV); m_GeTAMUData->SetSegmentE(CloverNbr, SegmentNbr, Energy/keV);
...@@ -607,6 +605,17 @@ void GeTAMU::ReadSensitive(const G4Event* event){ ...@@ -607,6 +605,17 @@ void GeTAMU::ReadSensitive(const G4Event* event){
ms_InterCoord->SetDetectedPositionZ(InterPos_Z) ; ms_InterCoord->SetDetectedPositionZ(InterPos_Z) ;
ms_InterCoord->SetDetectedAngleTheta(InterPos_Theta/deg) ; ms_InterCoord->SetDetectedAngleTheta(InterPos_Theta/deg) ;
ms_InterCoord->SetDetectedAnglePhi(InterPos_Phi/deg) ; ms_InterCoord->SetDetectedAnglePhi(InterPos_Phi/deg) ;
//add resolutions
G4double energyCry = RandGauss::shoot(Energy, ResoCry);
G4double energySeg = RandGauss::shoot(Energy, ResoSeg);
G4double time = RandGauss::shoot(Time, ResoTime);
if(Energy > EnergyThreshold){
m_GeTAMUData->SetCoreE(CloverNbr, CrystalNbr, energyCry/keV);
m_GeTAMUData->SetCoreT(CloverNbr, CrystalNbr, time/ns);
m_GeTAMUData->SetSegmentE(CloverNbr, SegmentNbr, energySeg/keV);
m_GeTAMUData->SetSegmentT(CloverNbr, SegmentNbr, time/ns);
} }
} }
......
...@@ -46,9 +46,10 @@ using namespace CLHEP; ...@@ -46,9 +46,10 @@ using namespace CLHEP;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
namespace GETAMU{ namespace GETAMU{
// Energy and time Resolution // Energy and time Resolution
const G4double ResoTime = 0 ; const G4double ResoTime = 4.25532 ;// = 10 ns FWHM // Unit is ns/2.35
const G4double ResoEnergy = 0.035*MeV ;// = zzkeV of Resolution // Unit is MeV/2.35 const G4double ResoCry = 0.00085 ;// = 2 keV FWHM // Unit is MeV/2.35
const G4double EnergyThreshold = 50.0*keV; const G4double ResoSeg = 0.0085 ;// = 10 kev FWHM // Unit is MeV/2.35
const G4double EnergyThreshold = 10.0*keV ;
} }
using namespace GETAMU ; using namespace GETAMU ;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment