diff --git a/NPLib/Detectors/FissionChamber/TFissionChamberData.cxx b/NPLib/Detectors/FissionChamber/TFissionChamberData.cxx index c1262445d38c5cb5c911c1e86a59e91c69c8f789..123430d5a337d6928c750a7a336e5a0a956124a6 100644 --- a/NPLib/Detectors/FissionChamber/TFissionChamberData.cxx +++ b/NPLib/Detectors/FissionChamber/TFissionChamberData.cxx @@ -50,6 +50,7 @@ void TFissionChamberData::Clear() { fFC_Qmax.clear(); fFC_Time.clear(); fFC_Time_HF.clear(); + fFC_ToF.clear(); fFC_isFakeFission.clear(); } diff --git a/NPLib/Detectors/FissionChamber/TFissionChamberData.h b/NPLib/Detectors/FissionChamber/TFissionChamberData.h index 43e1a9a9d8ad08bb28d34c96972a3d3f69e25f23..978a9d5ed38fc1d671a992e6994db69c1156a740 100644 --- a/NPLib/Detectors/FissionChamber/TFissionChamberData.h +++ b/NPLib/Detectors/FissionChamber/TFissionChamberData.h @@ -41,6 +41,7 @@ class TFissionChamberData : public TObject { vector<Double_t> fFC_Qmax; vector<Bool_t> fFC_isFakeFission; vector<Double_t> fFC_Time_HF; + vector<Double_t> fFC_ToF; ////////////////////////////////////////////////////////////// // Constructor and destructor @@ -70,6 +71,7 @@ class TFissionChamberData : public TObject { inline void SetQmax(const Double_t& Qmax){fFC_Qmax.push_back(Qmax);}//! inline void SetTime(const Double_t& Time){fFC_Time.push_back(Time);}//! inline void SetTimeHF(const Double_t& Time){fFC_Time_HF.push_back(Time);}//! + inline void SetToF(const Double_t& ToF){fFC_ToF.push_back(ToF);}//! inline void SetFakeFissionStatus(const Bool_t& isFF){fFC_isFakeFission.push_back(isFF);}//! ////////////////////// GETTERS //////////////////////// @@ -88,6 +90,8 @@ class TFissionChamberData : public TObject { {return fFC_Time[i];}//! inline Double_t GetTimeHF(const unsigned int &i) const {return fFC_Time_HF[i];}//! + inline Double_t GetToF(const unsigned int &i) const + {return fFC_ToF[i];}//! inline UShort_t GetHFMultiplicity() const {return fFC_Time_HF.size();}//! inline Bool_t GetFakeFissionStatus(const unsigned int &i) const diff --git a/NPLib/Detectors/FissionChamber/TFissionChamberPhysics.cxx b/NPLib/Detectors/FissionChamber/TFissionChamberPhysics.cxx index d0a3477c03a8046c657e8f0dac92686f347e5a7b..1782d0a086ab525713d61eabb8e0edf8967122fd 100644 --- a/NPLib/Detectors/FissionChamber/TFissionChamberPhysics.cxx +++ b/NPLib/Detectors/FissionChamber/TFissionChamberPhysics.cxx @@ -60,8 +60,9 @@ void TFissionChamberPhysics::AddDetector(TVector3 pos) { // Typically for more complex detector one would calculate the relevant // positions (stripped silicon) or angles (gamma array) m_NumberOfDetectors++; + for(int i =0; i<11; i++){ - TVector3 AnodePos(pos.X() , pos.Y(), pos.Z() - 25 + i*5); + TVector3 AnodePos(pos.X() , pos.Y(), pos.Z() - 27.5 + i*5.5); m_AnodePosition.push_back(AnodePos); } @@ -91,6 +92,7 @@ void TFissionChamberPhysics::BuildSimplePhysicalEvent() { /////////////////////////////////////////////////////////////////////////// void TFissionChamberPhysics::BuildPhysicalEvent() { // apply thresholds and calibration + PreTreat(); // match energy and time together @@ -112,13 +114,9 @@ void TFissionChamberPhysics::BuildPhysicalEvent() { isFakeFission.push_back(m_PreTreatedData->GetFakeFissionStatus(e)); Time_HF.push_back(m_PreTreatedData->GetTimeHF(e)); + ToF.push_back(m_PreTreatedData->GetToF(e)); } - /*unsigned int mysizeHF = m_PreTreatedData->GetHFMultiplicity(); - for(UShort_t e =0; e < mysizeHF ; e++){ - Time_HF.push_back(m_PreTreatedData->GetTimeHF(e)); - }*/ - } /////////////////////////////////////////////////////////////////////////// @@ -139,12 +137,16 @@ void TFissionChamberPhysics::PreTreat() { Double_t Q2 = m_EventData->GetQ2(i); Double_t Qmax = m_EventData->GetQmax(i); - if (Q1 > m_E_Threshold) { + int AnodeNumber = m_EventData->GetAnodeNbr(i); - double TimeOffset = Cal->GetValue("FissionChamber/ANODE"+NPL::itoa(AnodeNumber)+"_TIMEOFFSET",0); - double Time = m_EventData->GetTime(i);// + TimeOffset; - + double TimeOffset = 0; + TimeOffset = Cal->GetValue("FissionChamber/ANODE"+NPL::itoa(AnodeNumber)+"_TIMEOFFSET",0); + double Time = m_EventData->GetTime(i); + double tof = Time - m_EventData->GetTimeHF(i) - TimeOffset; + if(tof < 0){ + tof += Cal->GetValue("FissionChamber/PULSE_TIMEOFFSET",0) ; + } m_PreTreatedData->SetAnodeNbr(AnodeNumber); m_PreTreatedData->SetQ1(Q1); m_PreTreatedData->SetQ2(Q2); @@ -152,14 +154,10 @@ void TFissionChamberPhysics::PreTreat() { m_PreTreatedData->SetTime(Time); m_PreTreatedData->SetFakeFissionStatus(m_EventData->GetFakeFissionStatus(i)); m_PreTreatedData->SetTimeHF(m_EventData->GetTimeHF(i)); + m_PreTreatedData->SetToF(tof); } } - /*unsigned int mysizeHF = m_EventData->GetHFMultiplicity(); - for (UShort_t i = 0; i < mysizeHF ; ++i) { - m_PreTreatedData->SetTimeHF(m_EventData->GetTimeHF(i)); - }*/ - } @@ -236,6 +234,7 @@ void TFissionChamberPhysics::Clear() { Qmax.clear(); Time.clear(); Time_HF.clear(); + ToF.clear(); isFakeFission.clear(); DT_FC.clear(); } @@ -328,10 +327,10 @@ void TFissionChamberPhysics::WriteSpectra() { /////////////////////////////////////////////////////////////////////////// void TFissionChamberPhysics::AddParameterToCalibrationManager() { CalibrationManager* Cal = CalibrationManager::getInstance(); - for (int i = 0; i < m_NumberOfDetectors; ++i) { - Cal->AddParameter("FissionChamber", "ANODE"+ NPL::itoa(i+1)+"_ENERGY","FissionChamber_ANODE"+ NPL::itoa(i+1)+"_ENERGY"); - Cal->AddParameter("FissionChamber", "ANODE"+ NPL::itoa(i+1)+"_TIMEOFFSET","FissionChamber_ANODE"+ NPL::itoa(i+1)+"_TIMEOFFSET"); + for (int i = 0; i <= 11; ++i) { // 11 anodes + Cal->AddParameter("FissionChamber", "ANODE"+ NPL::itoa(i)+"_TIMEOFFSET","FissionChamber_ANODE"+ NPL::itoa(i)+"_TIMEOFFSET"); } + Cal->AddParameter("FissionChamber", "PULSE_TIMEOFFSET","FissionChamber_PULSE_TIMEOFFSET"); } diff --git a/NPLib/Detectors/FissionChamber/TFissionChamberPhysics.h b/NPLib/Detectors/FissionChamber/TFissionChamberPhysics.h index db47fa132f2cf242e413cac5e0dabe7937704f05..0fb6700821a2369823ec1395704b9c3c8db88163 100644 --- a/NPLib/Detectors/FissionChamber/TFissionChamberPhysics.h +++ b/NPLib/Detectors/FissionChamber/TFissionChamberPhysics.h @@ -69,6 +69,7 @@ class TFissionChamberPhysics : public TObject, public NPL::VDetector { vector<double> Time; vector<bool> isFakeFission; vector<double> Time_HF; + vector<double> ToF; vector<double> DT_FC; /// A usefull method to bundle all operation to add a detector diff --git a/NPSimulation/Detectors/Vendeta/Vendeta.cc b/NPSimulation/Detectors/Vendeta/Vendeta.cc index d492843039fbafb1644295102113e2846cd9799c..72bd475351c005494927325b969ea99a7b7779fd 100644 --- a/NPSimulation/Detectors/Vendeta/Vendeta.cc +++ b/NPSimulation/Detectors/Vendeta/Vendeta.cc @@ -60,12 +60,13 @@ using namespace CLHEP; //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... namespace Vendeta_NS{ // Energy and time Resolution - const double EnergyThreshold = 0.01*MeV; - const double ResoTime = 0.454*ns ; // reso Cf - /* const double ResoTime = 0.61*ns ; // reso U8 */ + const double EnergyThreshold = 0.02*MeV; + /* const double ResoTime = 0.454*ns ; // reso Cf */ + double ResoTime = 0.61*ns ; // reso U8 /* const double ResoTime = 0.*ns ; // reso U8 */ const double ResoEnergyLG = 0.43*MeV ; - const double ResoEnergyHG = 0.255*MeV ; + /* const double ResoEnergyHG = 0.255*MeV ; */ + const double ResoEnergyHG = 0.2*MeV ; const double Thickness = 51.*mm ; const double Radius = 127./2*mm ; @@ -83,7 +84,7 @@ Vendeta::Vendeta(){ m_VendetaDetector = 0; m_SensitiveCell = 0; m_MecanicalStructure = 0; - m_Build_MecanicalStructure = 0; + m_Build_MecanicalStructure = 1; m_LeadShield = 0; m_BuildLeadShield = 1; @@ -278,7 +279,7 @@ void Vendeta::ReadConfiguration(NPL::InputParser parser){ vector<string> cart = {"POS"}; vector<string> sphe = {"R","Theta","Phi"}; - + Vendeta_NS::ResoTime = blocks[0]->GetDouble("SigmaT","ns"); for(unsigned int i = 0 ; i < blocks.size() ; i++){ if(blocks[i]->HasTokenList(cart)){ if(NPOptionManager::getInstance()->GetVerboseLevel()) @@ -293,7 +294,9 @@ void Vendeta::ReadConfiguration(NPL::InputParser parser){ double R = blocks[i]->GetDouble("R","mm"); double Theta = blocks[i]->GetDouble("Theta","deg"); double Phi = blocks[i]->GetDouble("Phi","deg"); + m_BuildLeadShield = blocks[i]->GetInt("LeadShield"); AddDetector(R,Theta,Phi); + } else{ cout << "ERROR: check your input file formatting " << endl; @@ -308,6 +311,14 @@ void Vendeta::ReadConfiguration(NPL::InputParser parser){ // Construct detector and inialise sensitive part. // Called After DetecorConstruction::AddDetector Method void Vendeta::ConstructDetector(G4LogicalVolume* world){ + + // Air density at Los Alamos (temp ~ 25 degres) + double density = 0.90*mg/cm3; + cout <<"units "<< mg << " " << cm3 << endl; + G4Material* Air = MaterialManager::getInstance()->GetMaterialFromLibrary("Air"); + + world->SetMaterial(Air); + for (unsigned short i = 0 ; i < m_R.size() ; i++) { G4double wX = m_R[i] * sin(m_Theta[i] ) * cos(m_Phi[i] ) ; @@ -338,16 +349,8 @@ void Vendeta::ConstructDetector(G4LogicalVolume* world){ BuildMecanicalStructure()->MakeImprint(world,PosMeca,RotMeca); } - - G4double platformWidth = 3.0 * m; - G4double platformLength = 3.0 * m; - G4double platformThickness = 1.2 * cm; - G4ThreeVector *platformPosition = new G4ThreeVector(0,0,-1000); - G4Box* platformSolid = new G4Box("PlatformSolid", platformWidth / 2.0, platformThickness / 2.0, platformLength / 2.0); - G4LogicalVolume* platformLogical = new G4LogicalVolume(platformSolid, m_Al, "PlatformLogical"); - G4PVPlacement* platformPhysical = new G4PVPlacement(0, G4ThreeVector(0,-1000,0), platformLogical, "PlatformPhysical",world,0,false); - } + //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... // Add Detector branch to the EventTree. // Called After DetecorConstruction::AddDetector Method @@ -374,28 +377,28 @@ void Vendeta::ReadSensitive(const G4Event* ){ for(unsigned int i = 0 ; i < size ; i++){ vector<unsigned int> level = Scorer->GetLevel(i); /* double Energy =Scorer->GetEnergy(i); */ - double EnergyLG = RandGauss::shoot(Scorer->GetEnergy(i),Vendeta_NS::ResoEnergyLG); - double EnergyHG = RandGauss::shoot(Scorer->GetEnergy(i),Vendeta_NS::ResoEnergyHG); + double sigmaE = Scorer->GetEnergy(i) * 0.1897 + 0.04; + + double EnergyLG = RandGauss::shoot(Scorer->GetEnergy(i), sigmaE); + double EnergyHG = RandGauss::shoot(Scorer->GetEnergy(i), sigmaE); + //Convert enrgy deposit to Light Output thanks the F. Pino et al. formula double LightOutHG = 0.62*EnergyHG-1.3*(1-exp(-0.39*pow(EnergyHG,0.97))); // F. Pino et al double LightOutLG = 0.62*EnergyLG-1.3*(1-exp(-0.39*pow(EnergyLG,0.97))); // F. Pino et al // Apply Resolution on Charge measured on Vendeta data - /* LightOut = RandGauss::shoot(LightOut, Vendeta_NS::ResoEnergy); */ - if( EnergyHG > Vendeta_NS::EnergyThreshold){ + if( LightOutHG > Vendeta_NS::EnergyThreshold){ double Time = RandGauss::shoot(Scorer->GetTime(i),Vendeta_NS::ResoTime); int DetectorNbr = level[0]-1; - // Filling HG m_Event->SetHGDetectorNbr(DetectorNbr); - m_Event->SetHGQ1(LightOutHG*50000); - m_Event->SetHGQ2(LightOutHG*50000); + m_Event->SetHGQ1(LightOutHG); + m_Event->SetHGQ2(LightOutHG); m_Event->SetHGTime(Time); m_Event->SetHGQmax(0); - // Filling LG m_Event->SetLGDetectorNbr(DetectorNbr); - m_Event->SetLGQ1(LightOutLG*20000); - m_Event->SetLGQ2(LightOutLG*20000); + m_Event->SetLGQ1(LightOutLG); + m_Event->SetLGQ2(LightOutLG); m_Event->SetLGTime(Time); m_Event->SetLGQmax(0); diff --git a/Projects/Inelastic/eli.detector b/Projects/Inelastic/eli.detector new file mode 100644 index 0000000000000000000000000000000000000000..52f30da36d4eaaac9dea93062439312781a66c69 --- /dev/null +++ b/Projects/Inelastic/eli.detector @@ -0,0 +1,139 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Target + THICKNESS= 10 micrometer + RADIUS= 20 mm + MATERIAL= Fe + ANGLE= 0 deg + X= 0 mm + Y= 0 mm + Z= 0 mm +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Vendeta + R= 500 mm + THETA= 20 deg + PHI= 0 deg +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Vendeta + R= 500 mm + THETA= 20 deg + PHI= 90 deg +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Vendeta + R= 500 mm + THETA= 40 deg + PHI= 0 deg +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Vendeta + R= 500 mm + THETA= 40 deg + PHI= 90 deg +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Vendeta + R= 500 mm + THETA= 35 deg + PHI= 45 deg +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Vendeta + R= 500 mm + THETA= 35 deg + PHI= 135 deg +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Vendeta + R= 500 mm + THETA= 20 deg + PHI= 180 deg +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Vendeta + R= 500 mm + THETA= 40 deg + PHI= 180 deg +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Vendeta + R= 500 mm + THETA= -20 deg + PHI= 90 deg +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Vendeta + R= 500 mm + THETA= -40 deg + PHI= 90 deg +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Vendeta + R= 500 mm + THETA= -35 deg + PHI= 45 deg +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Vendeta + R= 500 mm + THETA= -35 deg + PHI= 135 deg + + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Vendeta + R= 500 mm + THETA= 160 deg + PHI= 0 deg +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Vendeta + R= 500 mm + THETA= 160 deg + PHI= 90 deg +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Vendeta + R= 500 mm + THETA= 140 deg + PHI= 0 deg +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Vendeta + R= 500 mm + THETA= 140 deg + PHI= 90 deg +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Vendeta + R= 500 mm + THETA= 145 deg + PHI= 45 deg +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Vendeta + R= 500 mm + THETA= 145 deg + PHI= 135 deg +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Vendeta + R= 500 mm + THETA= 160 deg + PHI= 180 deg +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Vendeta + R= 500 mm + THETA= 140 deg + PHI= 180 deg +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Vendeta + R= 500 mm + THETA= -160 deg + PHI= 90 deg +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Vendeta + R= 500 mm + THETA= -140 deg + PHI= 90 deg +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Vendeta + R= 500 mm + THETA= -145 deg + PHI= 45 deg +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Vendeta + R= 500 mm + THETA= -145 deg + PHI= 135 deg + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%FissionChamber + POS= 0 0 0 mm + GasMaterial= CF4 + Pressure= 1 bar diff --git a/Projects/ana_e850/macro/Mass/GEF/mass_99.dat b/Projects/ana_e850/macro/Mass/GEF/mass_99.dat new file mode 100644 index 0000000000000000000000000000000000000000..10aae96576056f17043277e302572df918776ca7 --- /dev/null +++ b/Projects/ana_e850/macro/Mass/GEF/mass_99.dat @@ -0,0 +1,11 @@ +0.5 5.551 +1.0 5.635 +2.0 5.632 +3.0 5.437 +4.0 5.439 +5.0 5.414 +6.0 5.440 +7.0 5.527 +8.0 5.396 +9.0 5.302 +10.0 5.234