Commit 3413b7d5 authored by Morfouace's avatar Morfouace
Browse files

* updating sofia detector

parent 1ec3592c
Pipeline #92487 passed with stages
in 20 minutes and 29 seconds
......@@ -55,6 +55,11 @@ void TSofiaData::Clear() {
fTWIN_AnodeNbr.clear();
fTWIN_AnodeEnergy.clear();
fTWIN_AnodeTime.clear();
fTWIN_Esum1 = -10;
fTWIN_Esum2 = -10;
fTWIN_Esum3 = -10;
fTWIN_Esum4 = -10;
}
......
......@@ -45,7 +45,10 @@ class TSofiaData : public TObject {
vector<int> fTWIN_AnodeNbr;
vector<double> fTWIN_AnodeEnergy;
vector<double> fTWIN_AnodeTime;
double fTWIN_Esum1;
double fTWIN_Esum2;
double fTWIN_Esum3;
double fTWIN_Esum4;
//////////////////////////////////////////////////////////////
// Constructor and destructor
......@@ -80,6 +83,10 @@ class TSofiaData : public TObject {
inline void SetTwinAnodeNbr(int Anode){fTWIN_AnodeNbr.push_back(Anode);};//!
inline void SetTwinAnodeEnergy(double Energy){fTWIN_AnodeEnergy.push_back(Energy);};//!
inline void SetTwinAnodeTime(double Time){fTWIN_AnodeTime.push_back(Time);};//!
inline void SetTwinEsum1(double E){fTWIN_Esum1=E;};//!
inline void SetTwinEsum2(double E){fTWIN_Esum2=E;};//!
inline void SetTwinEsum3(double E){fTWIN_Esum3=E;};//!
inline void SetTwinEsum4(double E){fTWIN_Esum4=E;};//!
////////////////////// GETTERS ////////////////////////
// TOF
......@@ -95,6 +102,10 @@ class TSofiaData : public TObject {
inline int GetTwinAnodeNbr(const unsigned int &i) const {return fTWIN_AnodeNbr[i];}//!
inline double GetTwinAnodeEnergy(const unsigned int &i) const {return fTWIN_AnodeEnergy[i];}//!
inline double GetTwinAnodeTime(const unsigned int &i) const {return fTWIN_AnodeTime[i];}//!
inline double GetTwinEsum1() const {return fTWIN_Esum1;}//!
inline double GetTwinEsum2() const {return fTWIN_Esum2;}//!
inline double GetTwinEsum3() const {return fTWIN_Esum3;}//!
inline double GetTwinEsum4() const {return fTWIN_Esum4;}//!
//////////////////////////////////////////////////////////////
// Required for ROOT dictionnary
......
......@@ -62,20 +62,20 @@ public:
GEF(NPL::Particle FissNucl);
~GEF(void);
inline double GetBrhoffl(void){return Brhoffl;}
inline double GetBrhoffh(void){return Brhoffh;}
inline double GetThffl(void){return Thlab_light;}
inline double GetThffh(void){return Thlab_heavy;}
inline double GetPhffl(void){return Phlab_light;}
inline double GetPhffh(void){return Phlab_heavy;}
inline float GetKEffl(void){return KElab_light;}
inline float GetKEffh(void){return KElab_heavy;}
inline float GetVffl(void){return vlab_light;}
inline float GetVffh(void){return vlab_heavy;}
inline int GetZffl(void){return I_Z_light_sci;}
inline int GetZffh(void){return I_Z_heavy_sci;}
inline int GetAffl(void){return I_A_light_sci;}
inline int GetAffh(void){return I_A_heavy_sci;}
inline double GetBrhoffl(void) {return Brhoffl;}
inline double GetBrhoffh(void) {return Brhoffh;}
inline double GetThffl(void) {return Thlab_light;}
inline double GetThffh(void) {return Thlab_heavy;}
inline double GetPhffl(void) {return Phlab_light;}
inline double GetPhffh(void) {return Phlab_heavy;}
inline float GetKEffl(void) {return KElab_light;}
inline float GetKEffh(void) {return KElab_heavy;}
inline float GetVffl(void) {return vlab_light;}
inline float GetVffh(void) {return vlab_heavy;}
inline int GetZffl(void) {return I_Z_light_sci;}
inline int GetZffh(void) {return I_Z_heavy_sci;}
inline int GetAffl(void) {return I_A_light_sci;}
inline int GetAffh(void) {return I_A_heavy_sci;}
float* GetNeutronEnergyFrag1() {return Array_E_n1_frag1;}
float* GetNeutronEnergyFrag2() {return Array_E_n2_frag2;}
......
......@@ -412,7 +412,10 @@ void Sofia::ReadSensitive(const G4Event* ){
///////////
// Twin scorer
CalorimeterScorers::PS_Calorimeter* TwinScorer= (CalorimeterScorers::PS_Calorimeter*) m_TwinScorer->GetPrimitive(0);
double Esum1=0;
double Esum2=0;
double Esum3=0;
double Esum4=0;
unsigned int twin_size = TwinScorer->GetMult();
for(unsigned int i = 0 ; i < twin_size ; i++){
vector<unsigned int> level = TwinScorer->GetLevel(i);
......@@ -421,12 +424,21 @@ void Sofia::ReadSensitive(const G4Event* ){
double Time = RandGauss::shoot(TwinScorer->GetTime(i),Sofia_NS::ResoTime);
int SectorNbr = level[0];
int PlasticNbr = level[1];
if(SectorNbr==1) Esum1 += Energy;
if(SectorNbr==2) Esum2 += Energy;
if(SectorNbr==3) Esum3 += Energy;
if(SectorNbr==4) Esum4 += Energy;
m_Event->SetTwinSectorNbr(SectorNbr);
m_Event->SetTwinAnodeNbr(PlasticNbr);
m_Event->SetTwinAnodeEnergy(Energy);
m_Event->SetTwinAnodeTime(Time);
}
}
m_Event->SetTwinEsum1(Esum1);
m_Event->SetTwinEsum2(Esum1);
m_Event->SetTwinEsum3(Esum1);
m_Event->SetTwinEsum4(Esum1);
TwinScorer->clear();
}
......
......@@ -189,10 +189,12 @@ void FissionDecay::DoIt(const G4FastTrack& fastTrack,G4FastStep& fastStep){
Momentum=Momentum.unit();
double Brho = FissionFragment[i].GetBrho();
double KineticEnergy = FissionFragment[i].GetEnergy();
m_FissionConditions->SetFragmentZ(FFZ);
m_FissionConditions->SetFragmentA(FFA);
m_FissionConditions->SetFragmentKineticEnergy(DEK[i]);
//m_FissionConditions->SetFragmentKineticEnergy(DEK[i]);
m_FissionConditions->SetFragmentKineticEnergy(KineticEnergy);
m_FissionConditions->SetFragmentBrho(Brho);
m_FissionConditions->SetFragmentTheta(Momentum.theta()/deg);
m_FissionConditions->SetFragmentPhi(Momentum.phi()/deg);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment