diff --git a/NPLib/Core/NPInputParser.cxx b/NPLib/Core/NPInputParser.cxx index 84ea383ef72afcc36a31933d6e2d7c1b0cef3a54..577983975a9a8249375ecabbd9f3ded97dcc1502 100644 --- a/NPLib/Core/NPInputParser.cxx +++ b/NPLib/Core/NPInputParser.cxx @@ -458,6 +458,14 @@ double NPL::ApplyUnit(double value, std::string unit){ if(unit=="void") // apply no unit return value; + else if(unit=="g/cm3"){ + return value*NPUNITS::g/NPUNITS::cm3; + } + + else if(unit=="kg/cm3"){ + return value*NPUNITS::kg/NPUNITS::cm3; + } + else if(unit=="millimeter"){ return value*NPUNITS::millimeter; } diff --git a/NPLib/Physics/NPNucleus.cxx b/NPLib/Physics/NPNucleus.cxx index bf9c9ac39709473362ed3d72e2f9b7491e67b558..44038da618164558bd4df79f4ba6b84fbde418c5 100644 --- a/NPLib/Physics/NPNucleus.cxx +++ b/NPLib/Physics/NPNucleus.cxx @@ -185,8 +185,8 @@ void Nucleus::Extract(string line){ fLifeTime*=1e-18; else if(s_lt_units=="zs") fLifeTime*=1e-21; - else if(s_lt_units=="zs") - fLifeTime*=1e-23; + else if(s_lt_units=="ys") + fLifeTime*=1e-24; else if(s_lt_units=="m") fLifeTime*=60; else if(s_lt_units=="h") diff --git a/NPLib/Physics/NPNucleus.h b/NPLib/Physics/NPNucleus.h index bc13d1768246cee3ae7b866679fd509f21ea568f..18bf35d0ef4bfc00ecf01047aa65309474899946 100644 --- a/NPLib/Physics/NPNucleus.h +++ b/NPLib/Physics/NPNucleus.h @@ -52,13 +52,13 @@ namespace NPL { //intrinsic properties string fName; // Nucleus name string fNucleusName; - int fCharge; // Nucleus charge - int fAtomicWeight; // Nucleus atomic weight + int fCharge; // Nucleus charge + int fAtomicWeight; // Nucleus atomic weight double fMassExcess; // Nucleus mass excess in keV string fSpinParity; // Nucleus spin and parity double fSpin; // Nucleus spin - string fParity; // Nucleus parity - double fLifeTime; // life time + string fParity; // Nucleus parity + double fLifeTime; // life time //kinematic properties double fKineticEnergy; @@ -91,17 +91,17 @@ namespace NPL { string GetName() const {return fNucleusName;} int GetZ() const {return fCharge;} int GetA() const {return fAtomicWeight;} - double GetMassExcess() const {return fMassExcess;} - string GetSpinParity() const {return fSpinParity;} - double GetSpin() const {return fSpin;} - string GetParity() const {return fParity;} - double GetLifeTime() const {return fLifeTime;} - double GetEnergy() const {return fKineticEnergy;} - double GetBrho() const {return fBrho;} - double GetTimeOfFlight() const {return fTimeOfFlight;} - double GetBeta() const {return fBeta;} - double GetGamma() const {return fGamma;} - double GetVelocity() const {return fVelocity;} + double GetMassExcess() const {return fMassExcess;} + string GetSpinParity() const {return fSpinParity;} + double GetSpin() const {return fSpin;} + string GetParity() const {return fParity;} + double GetLifeTime() const {return fLifeTime;} + double GetEnergy() const {return fKineticEnergy;} + double GetBrho() const {return fBrho;} + double GetTimeOfFlight() const {return fTimeOfFlight;} + double GetBeta() const {return fBeta;} + double GetGamma() const {return fGamma;} + double GetVelocity() const {return fVelocity;} TLorentzVector GetEnergyImpulsion() const {return fEnergyImpulsion;} void SetName(const char* name) {fName = name;} void SetZ(int charge) {fCharge = charge;} diff --git a/NPSimulation/Core/Target.cc b/NPSimulation/Core/Target.cc index ddf19b7c4f800145719d7fde14704b488720db38..ecb81aab77764c8ae2203f2f1c2c99c420777d45 100644 --- a/NPSimulation/Core/Target.cc +++ b/NPSimulation/Core/Target.cc @@ -112,14 +112,17 @@ void Target::ReadConfiguration(NPL::InputParser parser){ } else if(ctarget.size()==1){ - cout << " Solid Target found " << endl; + m_TargetType=false; + cout << " Cryo Target found " << endl; vector<string> token = {"Thickness","Radius","Material","Density","WindowsThickness","WindowsMaterial","Angle","X","Y","Z"}; if(ctarget[0]->HasTokenList(token)){ m_TargetThickness= ctarget[0]->GetDouble("Thickness","micrometer"); m_TargetAngle=ctarget[0]->GetDouble("Angle","deg"); - m_TargetMaterial= GetMaterialFromLibrary(ctarget[0]->GetString("Material")); + m_TargetMaterial= MaterialManager::getInstance()->GetMaterialFromLibrary(ctarget[0]->GetString("Material"),ctarget[0]->GetDouble("Density","g/cm3")); m_WindowsThickness= ctarget[0]->GetDouble("WindowsThickness","micrometer"); m_WindowsMaterial= GetMaterialFromLibrary(ctarget[0]->GetString("WindowsMaterial")); + m_TargetRadius=ctarget[0]->GetDouble("Radius","mm"); + m_TargetX=ctarget[0]->GetDouble("X","mm"); m_TargetY=ctarget[0]->GetDouble("Y","mm"); m_TargetZ =ctarget[0]->GetDouble("Z","mm"); diff --git a/Projects/MUGAST/DetectorConfiguration/MUGAST_Agata_Cryo.detector b/Projects/MUGAST/DetectorConfiguration/MUGAST_Agata_Cryo.detector index 068eb26ae72a9f17c0a390ffb852e96b14805b67..66a113a1b36a50b5157555c09ae249b474937c98 100644 --- a/Projects/MUGAST/DetectorConfiguration/MUGAST_Agata_Cryo.detector +++ b/Projects/MUGAST/DetectorConfiguration/MUGAST_Agata_Cryo.detector @@ -1,166 +1,165 @@ %%%%%%%%%%Detector%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 CryoTarget - THICKNESS= 1000 - RADIUS= 7.5 - MATERIAL= D2 - DENSITY= 0.16383 - WINDOWSTHICKNESS= 1 - WINDOWSMATERIAL= Mylar - ANGLE= 0 - X= 0 - Y= 0 - Z= 0 + THICKNESS= 1 mm + RADIUS= 7.5 mm + MATERIAL= D2 + DENSITY= 0.16383 g/cm3 + WINDOWSTHICKNESS= 1 micrometer + WINDOWSMATERIAL= Mylar + ANGLE= 0 deg + X= 0 mm + Y= 0 mm + Z= 0 mm %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GaspardTracker GPDChamber= MUGAST %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 Annular Back GPDAnnular - Z= -134.15 - RMIN= 16 - RMAX= 45 - FIRSTSTAGE= 1 - SECONDSTAGE= 1 - THIRDSTAGE= 1 - VIS= all + Z= -134.15 + RMIN= 16 + RMAX= 45 + FIRSTSTAGE= 1 + SECONDSTAGE= 1 + THIRDSTAGE= 1 + VIS= all %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 End-Cap Back GPDTrapezoid - X128_Y128= 41.963 21.364 -99.28 - X1_Y128= 23.737 39.592 -99.282 - X128_Y1= 122.368 54.712 -31.789 - X1_Y1= 57.084 119.996 -31.789 - FIRSTSTAGE= 1 - SECONDSTAGE= 0 - THIRDSTAGE= 0 - VIS= all + X128_Y128= 41.963 21.364 -99.28 + X1_Y128= 23.737 39.592 -99.282 + X128_Y1= 122.368 54.712 -31.789 + X1_Y1= 57.084 119.996 -31.789 + FIRSTSTAGE= 1 + SECONDSTAGE= 0 + THIRDSTAGE= 0 + VIS= all %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%2 GPDTrapezoid - X128_Y128= -41.963 -21.364 -99.28 - X1_Y128= -23.737 -39.592 -99.282 - X128_Y1= -122.368 -54.712 -31.789 - X1_Y1= -57.084 -119.996 -31.789 - FIRSTSTAGE= 1 - SECONDSTAGE= 0 - THIRDSTAGE= 0 - VIS= all + X128_Y128= -41.963 -21.364 -99.28 + X1_Y128= -23.737 -39.592 -99.282 + X128_Y1= -122.368 -54.712 -31.789 + X1_Y1= -57.084 -119.996 -31.789 + FIRSTSTAGE= 1 + SECONDSTAGE= 0 + THIRDSTAGE= 0 + VIS= all %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%3 GPDTrapezoid - X128_Y128= -21.364 41.963 -99.28 - X1_Y128= -39.592 23.737 -99.282 - X128_Y1= -54.712 122.368 -31.789 - X1_Y1= -119.996 57.084 -31.789 - FIRSTSTAGE= 1 - SECONDSTAGE= 0 - THIRDSTAGE= 0 - VIS= all + X128_Y128= -21.364 41.963 -99.28 + X1_Y128= -39.592 23.737 -99.282 + X128_Y1= -54.712 122.368 -31.789 + X1_Y1= -119.996 57.084 -31.789 + FIRSTSTAGE= 1 + SECONDSTAGE= 0 + THIRDSTAGE= 0 + VIS= all %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%4 GPDTrapezoid - X128_Y128= 21.364 -41.963 -99.28 - X1_Y128= 39.592 -23.737 -98.282 - X128_Y1= 54.712 -122.368 -31.789 - X1_Y1= 119.996 -57.084 -31.789 - FIRSTSTAGE= 1 - SECONDSTAGE= 0 - THIRDSTAGE= 0 - VIS= all + X128_Y128= 21.364 -41.963 -99.28 + X1_Y128= 39.592 -23.737 -98.282 + X128_Y1= 54.712 -122.368 -31.789 + X1_Y1= 119.996 -57.084 -31.789 + FIRSTSTAGE= 1 + SECONDSTAGE= 0 + THIRDSTAGE= 0 + VIS= all %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 Barrel GPDRectangle - X1_Y1= -132.251 58.314 88.72 - X128_Y1= -61.823 128.742 88.72 - X1_Y128= -132.251 58.314 -3.13 - X128_Y128= -61.823 128.742 -3.13 - FIRSTSTAGE= 1 - SECONDSTAGE= 1 - THIRDSTAGE= 0 - VIS= all + X1_Y1= -132.251 58.314 88.72 + X128_Y1= -61.823 128.742 88.72 + X1_Y128= -132.251 58.314 -3.13 + X128_Y128= -61.823 128.742 -3.13 + FIRSTSTAGE= 1 + SECONDSTAGE= 1 + THIRDSTAGE= 0 + VIS= all %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%2 GPDRectangle - X1_Y1= -135.00 -51.01 88.72 - X128_Y1= -135.00 43.99 88.72 - X1_Y128= -135.00 -51.01 -3.13 - X128_Y128= -135.00 43.99 -3.13 - FIRSTSTAGE= 1 - SECONDSTAGE= 1 - THIRDSTAGE= 0 - VIS= all + X1_Y1= -135.00 -51.01 88.72 + X128_Y1= -135.00 43.99 88.72 + X1_Y128= -135.00 -51.01 -3.13 + X128_Y128= -135.00 43.99 -3.13 + FIRSTSTAGE= 1 + SECONDSTAGE= 1 + THIRDSTAGE= 0 + VIS= all %%%%%%%%%%%%%%%%%%%%% -MUST2Array %%%%%%% Telescope 1 %%%%%%% M2Telescope -X1_Y1= 13.00 102.79 161.98 -X1_Y128= 24.88 10.58 191.20 -X128_Y1= 103.08 102.90 126.06 -X128_Y128= 115.23 10.76 155.14 -SI= 1.00 -SILI= 0.00 -CSI= 1.00 -VIS= all + X1_Y1= 13.00 102.79 161.98 + X1_Y128= 24.88 10.58 191.20 + X128_Y1= 103.08 102.90 126.06 + X128_Y128= 115.23 10.76 155.14 + SI= 1.00 + SILI= 0.00 + CSI= 1.00 + VIS= all %%%%%%% Telescope 2 %%%%%%% M2Telescope -X1_Y1= -114.05 10.98 154.48 -X1_Y128= -23.81 10.92 190.84 -X128_Y1= -102.23 102.22 125.39 -X128_Y128= -11.95 102.90 161.48 -SI= 1.00 -SILI= 0.00 -CSI= 1.00 -VIS= all + X1_Y1= -114.05 10.98 154.48 + X1_Y128= -23.81 10.92 190.84 + X128_Y1= -102.23 102.22 125.39 + X128_Y128= -11.95 102.90 161.48 + SI= 1.00 + SILI= 0.00 + CSI= 1.00 + VIS= all %%%%%%% Telescope 3 %%%%%%% M2Telescope -X1_Y1= -11.91 -103.68 162.50 -X1_Y128= -24.30 -10.94 191.00 -X128_Y1= -102.03 -103.39 126.36 -X128_Y128= -114.58 -10.71 154.76 -SI= 1.00 -SILI= 0.00 -CSI= 1.00 -VIS= all + X1_Y1= -11.91 -103.68 162.50 + X1_Y128= -24.30 -10.94 191.00 + X128_Y1= -102.03 -103.39 126.36 + X128_Y128= -114.58 -10.71 154.76 + SI= 1.00 + SILI= 0.00 + CSI= 1.00 + VIS= all %%%%%%% Telescope 4 %%%%%%% M2Telescope -X1_Y1= 115.12 -11.35 154.94 -X1_Y128= 24.33 -11.60 190.81 -X128_Y1= 103.64 -103.42 126.51 -X128_Y128= 12.89 -103.90 162.29 -SI= 1.00 -SILI= 0.00 -CSI= 1.00 -VIS= all + X1_Y1= 115.12 -11.35 154.94 + X1_Y128= 24.33 -11.60 190.81 + X128_Y1= 103.64 -103.42 126.51 + X128_Y128= 12.89 -103.90 162.29 + SI= 1.00 + SILI= 0.00 + CSI= 1.00 + VIS= all %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -AGATA - THETA= 157.5 - PHI= 45 - R= 270 - Shape= Square +%AGATA + THETA= 157.5 + PHI= 45 + R= 270 + Shape= Square %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -AGATA - THETA= 157.5 - PHI= 117 - R= 270 - Shape= Square +%AGATA + THETA= 157.5 + PHI= 117 + R= 270 + Shape= Square %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -AGATA - THETA= 157.5 - PHI= 189 - R= 270 - Shape= Square +%AGATA + THETA= 157.5 + PHI= 189 + R= 270 + Shape= Square %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -AGATA - THETA= 157.5 - PHI= 261 - R= 270 - Shape= Square +%AGATA + THETA= 157.5 + PHI= 261 + R= 270 + Shape= Square %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -AGATA - THETA= 157.5 - PHI= 333 - R= 270 - Shape= Square +%AGATA + THETA= 157.5 + PHI= 333 + R= 270 + Shape= Square %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%