From eedb40dec0acb6c5ac8334d30fdc8520e9a96372 Mon Sep 17 00:00:00 2001 From: Pierre Morfouace <pierre.morfouace2@cea.fr> Date: Fri, 21 Jan 2022 15:57:10 +0100 Subject: [PATCH] * Updating Sofia project --- Inputs/EventGenerator/sofia.reaction | 22 ++--- NPLib/Detectors/Sofia/TSofFissionFragment.cxx | 8 +- NPLib/Detectors/Sofia/TSofFissionFragment.h | 28 ++++-- NPSimulation/Detectors/Sofia/SofTofW.cc | 49 +++++++++-- NPSimulation/Detectors/Sofia/SofTofW.hh | 8 +- NPSimulation/Process/FissionDecay.cc | 1 - Projects/Sofia/sofia.detector | 12 ++- Projects/s455/Analysis.cxx | 88 ++++++++++--------- .../calibration/SofSci/SofSci_physics.cal | 4 +- .../SofTrim/SofTrim_SectionAlign.cal | 4 +- 10 files changed, 146 insertions(+), 78 deletions(-) diff --git a/Inputs/EventGenerator/sofia.reaction b/Inputs/EventGenerator/sofia.reaction index 88336f892..2c34d4f1d 100644 --- a/Inputs/EventGenerator/sofia.reaction +++ b/Inputs/EventGenerator/sofia.reaction @@ -3,31 +3,31 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%Beam energy given in MeV ; Excitation in MeV ; emmitance in rad Beam - Particle= 238U + Particle= 189Pb Energy= 166000 SigmaEnergy= 2 - SigmaX= 1 cm - SigmaY= 1 cm + SigmaX= 11 mm + SigmaY= 5 mm SigmaThetaX= 0 SigmaPhiY= 0 MeanThetaX= 0 MeanPhiY= 0 - MeanX= 0 - MeanY= 0 + MeanX= 11 mm + MeanY= -1.4 mm %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TwoBodyReaction - Beam= 238U + Beam= 189Pb Target= 208Pb - Light= 208Pb - Heavy= 238U - ExcitationEnergyLight= 0.0 - ExcitationEnergyHeavy= 15.0 + Light= 189Pb + Heavy= 208Pb + ExcitationEnergyLight= 15.0 + ExcitationEnergyHeavy= 0.0 CrossSectionPath= sofia.txt CS ShootLight= 1 ShootHeavy= 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FissionDecay - CompoundNucleus= 238U + CompoundNucleus= 189Pb FissionModel= GEF VamosChargeStates= 0 Shoot_FF= 1 diff --git a/NPLib/Detectors/Sofia/TSofFissionFragment.cxx b/NPLib/Detectors/Sofia/TSofFissionFragment.cxx index 84620fb29..53be42bac 100644 --- a/NPLib/Detectors/Sofia/TSofFissionFragment.cxx +++ b/NPLib/Detectors/Sofia/TSofFissionFragment.cxx @@ -55,8 +55,12 @@ void TSofFissionFragment::Clear() { fFF_ThetaIn.clear(); fFF_TofPosX.clear(); fFF_TofPosY.clear(); - fFF_MwpcPosX.clear(); - fFF_MwpcPosY.clear(); + fFF_PosX1.clear(); + fFF_PosX2.clear(); + fFF_PosX3.clear(); + fFF_PosY1.clear(); + fFF_PosY2.clear(); + fFF_PosY3.clear(); fFF_Zsum = -1; fFF_IntZsum = -1; diff --git a/NPLib/Detectors/Sofia/TSofFissionFragment.h b/NPLib/Detectors/Sofia/TSofFissionFragment.h index c277c833d..c265a6cca 100644 --- a/NPLib/Detectors/Sofia/TSofFissionFragment.h +++ b/NPLib/Detectors/Sofia/TSofFissionFragment.h @@ -46,8 +46,12 @@ class TSofFissionFragment : public TObject { vector<double> fFF_ThetaIn; vector<double> fFF_TofPosX; vector<double> fFF_TofPosY; - vector<double> fFF_MwpcPosX; - vector<double> fFF_MwpcPosY; + vector<double> fFF_PosX1; + vector<double> fFF_PosX2; + vector<double> fFF_PosX3; + vector<double> fFF_PosY1; + vector<double> fFF_PosY2; + vector<double> fFF_PosY3; double fFF_Zsum; int fFF_IntZsum; @@ -87,12 +91,20 @@ class TSofFissionFragment : public TObject { inline void SetThetaIn(double val){fFF_ThetaIn.push_back(val);};//! inline void SetTofPosX(double val){fFF_TofPosX.push_back(val);};//! inline void SetTofPosY(double val){fFF_TofPosY.push_back(val);};//! - inline void SetMwpcPosX(double val){fFF_MwpcPosX.push_back(val);};//! - inline void SetMwpcPosY(double val){fFF_MwpcPosY.push_back(val);};//! + inline void SetPosX1(double val){fFF_PosX1.push_back(val);};//! + inline void SetPosX2(double val){fFF_PosX2.push_back(val);};//! + inline void SetPosX3(double val){fFF_PosX3.push_back(val);};//! + inline void SetPosY1(double val){fFF_PosY1.push_back(val);};//! + inline void SetPosY2(double val){fFF_PosY2.push_back(val);};//! + inline void SetPosY3(double val){fFF_PosY3.push_back(val);};//! ////////////////////// GETTERS //////////////////////// int GetMult() {return fFF_Z.size();}//! + int GetMultTofPos() {return fFF_TofPosY.size();}//! + int GetMultMwpc1() {return fFF_PosY1.size();}//! + int GetMultMwpc2() {return fFF_PosY2.size();}//! + int GetMultMwpc3() {return fFF_PosY3.size();}//! inline double GetZsum() const {return fFF_Zsum;}//! inline int GetIntZsum() const {return fFF_IntZsum;}//! inline double GetZ(int i) const {return fFF_Z[i];}//! @@ -107,8 +119,12 @@ class TSofFissionFragment : public TObject { inline double GetThetaIn(int i) const {return fFF_ThetaIn[i];}//! inline double GetTofPosX(int i) const {return fFF_TofPosX[i];}//! inline double GetTofPosY(int i) const {return fFF_TofPosY[i];}//! - inline double GetMwpcPosX(int i) const {return fFF_MwpcPosX[i];}//! - inline double GetMwpcPosY(int i) const {return fFF_MwpcPosY[i];}//! + inline double GetPosX1(int i) const {return fFF_PosX1[i];}//! + inline double GetPosX2(int i) const {return fFF_PosX2[i];}//! + inline double GetPosX3(int i) const {return fFF_PosX3[i];}//! + inline double GetPosY1(int i) const {return fFF_PosY1[i];}//! + inline double GetPosY2(int i) const {return fFF_PosY2[i];}//! + inline double GetPosY3(int i) const {return fFF_PosY3[i];}//! ////////////////////////////////////////////////////////////// diff --git a/NPSimulation/Detectors/Sofia/SofTofW.cc b/NPSimulation/Detectors/Sofia/SofTofW.cc index b9b1df7e5..d6c2575c9 100644 --- a/NPSimulation/Detectors/Sofia/SofTofW.cc +++ b/NPSimulation/Detectors/Sofia/SofTofW.cc @@ -92,9 +92,14 @@ SofTofW::SofTofW(){ m_TofScorer = 0; m_PlasticTof = 0; m_GLAD= 0; + m_VacuumPipe= 0; m_TofWall = 0; m_Build_GLAD= 0; + m_Build_VacuumPipe= 0; + m_VacuumPipeX= 0; + m_VacuumPipeY= 0; + m_VacuumPipeZ= 0; m_GLAD_MagField = 0; m_GLAD_DistanceFromTarget = 0; @@ -247,18 +252,39 @@ new G4PVPlacement(0,Tv, return m_TwinMusic; }*/ +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... +G4AssemblyVolume* SofTofW::BuildVacuumPipe(){ + if(!m_VacuumPipe){ + m_VacuumPipe = new G4AssemblyVolume; + + //G4Tubs* tube = new G4Tubs("tube",8.*cm,15*cm,155./2*cm,0,360*deg); + G4Box* tube = new G4Box("tube",20.*cm,20*cm,10*cm); + + G4Material* tube_mat = MaterialManager::getInstance()->GetMaterialFromLibrary("Al"); + + G4LogicalVolume* tube_vol = new G4LogicalVolume(tube,tube_mat,"logic_tube",0,0,0); + G4ThreeVector Pos = G4ThreeVector(0,0,0); + G4RotationMatrix* Rot = new G4RotationMatrix(); + m_VacuumPipe->AddPlacedVolume(tube_vol,Pos,Rot); + } + + return m_VacuumPipe; +} + //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... G4AssemblyVolume* SofTofW::BuildGLAD() { if(!m_GLAD){ m_GLAD = new G4AssemblyVolume; string basepath = getenv("NPTOOL"); - string path = basepath + "/NPSimulation/Detectors/Sofia/gdml/glad.gdml"; - m_gdmlparser.Read(path); + //string path = basepath + "/NPSimulation/Detectors/Sofia/gdml/glad.gdml"; + //m_gdmlparser.Read(path); //G4LogicalVolume* vol1 = m_gdmlparser.GetVolume("GEcrans"); //G4LogicalVolume* vol2 = m_gdmlparser.GetVolume("G2202001_Demi_Ecran_thermique_interne"); - G4LogicalVolume* vol3 = m_gdmlparser.GetVolume("G2402001_Enceinte_interne"); + + //G4LogicalVolume* vol3 = m_gdmlparser.GetVolume("G2402001_Enceinte_interne"); + //G4LogicalVolume* vol4 = m_gdmlparser.GetVolume("GEnceinte_externe"); //G4LogicalVolume* vol5 = m_gdmlparser.GetVolume("G2403002_Fonf_cote_sortie"); //G4LogicalVolume* vol6 = m_gdmlparser.GetVolume("G2403001_Fond_cote_entree"); @@ -291,11 +317,11 @@ G4AssemblyVolume* SofTofW::BuildGLAD() //m_GLAD->AddPlacedVolume(vol2,Pos2,Rot2); // *** vol3 *** // - G4ThreeVector Pos3 = G4ThreeVector(0,0,0); + /*G4ThreeVector Pos3 = G4ThreeVector(0,0,0); G4RotationMatrix* Rot3 = new G4RotationMatrix(); Rot3->rotateX(90*deg); Rot3->rotateY(90*deg); - m_GLAD->AddPlacedVolume(vol3,Pos3,Rot3); + m_GLAD->AddPlacedVolume(vol3,Pos3,Rot3);*/ // *** vol4 *** // //G4ThreeVector Pos4 = G4ThreeVector(0*cm,0,0*cm); @@ -371,8 +397,8 @@ void SofTofW::ReadConfiguration(NPL::InputParser parser){ if(NPOptionManager::getInstance()->GetVerboseLevel()) cout << "//// " << blocks.size() << " detectors found " << endl; - vector<string> cart = {"POS","Build_GLAD"}; - vector<string> sphe = {"R","Theta","Phi","Build_GLAD"}; + vector<string> cart = {"POS","Build_GLAD","Build_VacuumPipe"}; + vector<string> sphe = {"R","Theta","Phi","Build_GLAD","Build_VacuumPipe"}; for(unsigned int i = 0 ; i < blocks.size() ; i++){ if(blocks[i]->HasTokenList(cart)){ @@ -381,6 +407,7 @@ void SofTofW::ReadConfiguration(NPL::InputParser parser){ G4ThreeVector Pos = NPS::ConvertVector(blocks[i]->GetTVector3("POS","mm")); m_Build_GLAD = blocks[i]->GetInt("Build_GLAD"); + m_Build_VacuumPipe = blocks[i]->GetInt("Build_VacuumPipe"); AddDetector(Pos); } else if(blocks[i]->HasTokenList(sphe)){ @@ -390,8 +417,12 @@ void SofTofW::ReadConfiguration(NPL::InputParser parser){ double Theta = blocks[i]->GetDouble("Theta","deg"); double Phi = blocks[i]->GetDouble("Phi","deg"); m_Build_GLAD = blocks[i]->GetInt("Build_GLAD"); + m_Build_VacuumPipe = blocks[i]->GetInt("Build_VacuumPipe"); m_GLAD_MagField = blocks[i]->GetDouble("GLAD_MagField","T"); m_GLAD_DistanceFromTarget = blocks[i]->GetDouble("GLAD_DistanceFromTarget", "m"); + m_VacuumPipeX = blocks[i]->GetDouble("VacuumPipeX","m"); + m_VacuumPipeY = blocks[i]->GetDouble("VacuumPipeY","m"); + m_VacuumPipeZ = blocks[i]->GetDouble("VacuumPipeZ","m"); AddDetector(R,Theta,Phi); } @@ -443,6 +474,10 @@ void SofTofW::ConstructDetector(G4LogicalVolume* world){ world, false, 0); */ } + if(m_Build_VacuumPipe==1){ + G4ThreeVector Tube_Pos = G4ThreeVector(m_VacuumPipeX,m_VacuumPipeY,m_VacuumPipeZ); + BuildVacuumPipe()->MakeImprint(world,Tube_Pos,0); + } } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... // Add Detector branch to the EventTree. diff --git a/NPSimulation/Detectors/Sofia/SofTofW.hh b/NPSimulation/Detectors/Sofia/SofTofW.hh index 066bc9139..5df400ed4 100644 --- a/NPSimulation/Detectors/Sofia/SofTofW.hh +++ b/NPSimulation/Detectors/Sofia/SofTofW.hh @@ -59,6 +59,7 @@ class SofTofW : public NPS::VDetector{ G4AssemblyVolume* BuildTOFDetector(); G4AssemblyVolume* BuildGLAD(); + G4AssemblyVolume* BuildVacuumPipe(); private: G4GDMLParser m_gdmlparser; @@ -66,6 +67,7 @@ class SofTofW : public NPS::VDetector{ //G4LogicalVolume* m_GLAD; G4AssemblyVolume* m_GLAD; G4AssemblyVolume* m_TofWall; + G4AssemblyVolume* m_VacuumPipe; //////////////////////////////////////////////////// ////// Inherite from NPS::VDetector class ///////// @@ -110,9 +112,13 @@ class SofTofW : public NPS::VDetector{ // GLAD // int m_Build_GLAD; + int m_Build_VacuumPipe; double m_GLAD_MagField; double m_GLAD_DistanceFromTarget; - + double m_VacuumPipeX; + double m_VacuumPipeY; + double m_VacuumPipeZ; + // Visualisation Attribute G4VisAttributes* m_VisSquare; G4VisAttributes* m_VisGLAD; diff --git a/NPSimulation/Process/FissionDecay.cc b/NPSimulation/Process/FissionDecay.cc index 933717d02..00bb78054 100644 --- a/NPSimulation/Process/FissionDecay.cc +++ b/NPSimulation/Process/FissionDecay.cc @@ -174,7 +174,6 @@ void FissionDecay::DoIt(const G4FastTrack& fastTrack,G4FastStep& fastStep){ G4ParticleDefinition* FissionFragmentDef; unsigned int size = FissionFragment.size(); - if(size == 0) return; diff --git a/Projects/Sofia/sofia.detector b/Projects/Sofia/sofia.detector index 099a9820b..33c41d1c9 100644 --- a/Projects/Sofia/sofia.detector +++ b/Projects/Sofia/sofia.detector @@ -1,7 +1,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Target THICKNESS= 2 mm - RADIUS= 40 mm + RADIUS= 50 mm MATERIAL= Pb ANGLE= 0 deg X= 0 mm @@ -9,13 +9,17 @@ Target Z= 0 m %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SofTofW - R= 8 m + R= 9 m THETA= -9 deg PHI= 0 deg Build_GLAD= 1 - GLAD_DistanceFromTarget= 3.3 m + GLAD_DistanceFromTarget= 3. m GLAD_MagField= 1.8 T - %Build_Twin_Music= 0 + Build_VacuumPipe= 1 + VacuumPipeX= 0 cm + VacuumPipeY= -22.2 cm + VacuumPipeZ= 1 m +%Build_Twin_Music= 0 %Twin_Music_DistanceFromTarget= 1.5 m %Twin_Music_Gas= P10_1atm %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Projects/s455/Analysis.cxx b/Projects/s455/Analysis.cxx index 71875203c..07fd371ec 100644 --- a/Projects/s455/Analysis.cxx +++ b/Projects/s455/Analysis.cxx @@ -133,23 +133,59 @@ void Analysis::FissionFragmentAnalysis(){ PosX.push_back(SofTofW->CalPosX[i]); PosY.push_back(SofTofW->CalPosY[i]); - //SofFF->SetTofPosX(SofTofW->CalPosX[i]); - //SofFF->SetTofPosY(SofTofW->CalPosY[i]); + SofFF->SetTofPosX(SofTofW->CalPosX[i]); + SofFF->SetTofPosY(SofTofW->CalPosY[i]); } } - vector<double> Xmwpc4; - vector<double> Ymwpc4; + vector<double> X1; + vector<double> X2; + vector<double> X3; + vector<double> Y1; + vector<double> Y2; + vector<double> Y3; for(unsigned int i=0; i<SofMwpc->DetectorNbr.size(); i++){ + if(SofMwpc->DetectorNbr[i]==2){ + SofFF->SetPosX1(SofMwpc->PositionX1[i]); + SofFF->SetPosY1(SofMwpc->PositionY[i]); + } + if(SofMwpc->DetectorNbr[i]==3){ + SofFF->SetPosX2(SofMwpc->PositionX1[i]); + SofFF->SetPosY2(SofMwpc->PositionY[i]); + } if(SofMwpc->DetectorNbr[i]==4){ - Xmwpc4.push_back(SofMwpc->PositionX1[i]); - Ymwpc4.push_back(SofMwpc->PositionY[i]); + X3.push_back(SofMwpc->PositionX1[i]); + Y3.push_back(SofMwpc->PositionY[i]); + + SofFF->SetPosX3(SofMwpc->PositionX1[i]); + SofFF->SetPosY3(SofMwpc->PositionY[i]); + } + } - //SofFF->SetMwpcPosX(SofMwpc->PositionX1[i]); - //SofFF->SetMwpcPosY(SofMwpc->PositionY[i]); + vector<double> good_posx; + vector<double> good_posy; + for(unsigned int i=0; i<PosX.size(); i++){ + double tofx = PosX[i]; + double tofy = PosY[i]; + for(unsigned int k=0; k<X3.size(); k++){ + double posx = X3[k]; + if(abs(posx-tofx) < 100){ + good_posx.push_back(posx); + good_posy.push_back(tofy); + } } } + + /*if(good_posx.size()==2 && good_posy.size()==2){ + SofFF->SetTofPosX(good_posx[0]); + SofFF->SetTofPosX(good_posx[1]); + + SofFF->SetTofPosY(good_posy[0]); + SofFF->SetTofPosY(good_posy[1]); + }*/ + + int mult1 = SofTwim->mult1; int mult2 = SofTwim->mult2; int mult3 = SofTwim->mult3; @@ -340,39 +376,7 @@ void Analysis::FissionFragmentAnalysis(){ A1 = AoQ1 * iZ1; A2 = AoQ2 * iZ2; - vector<double> good_posx; - vector<double> good_posy; - for(unsigned int i=0; i<PosX.size(); i++){ - double tofx = PosX[i]; - double tofy = PosY[i]; - for(unsigned int k=0; k<Xmwpc4.size(); k++){ - double posx = Xmwpc4[k]; - if(abs(posx-tofx) < 100){ - good_posx.push_back(posx); - //SofFF->SetMwpcPosX(posx); - //SofFF->SetTofPosX(tofx); - } - } - for(unsigned int p=0; p<Ymwpc4.size(); p++){ - double posy = Ymwpc4[p]; - if(abs(posy-tofy) < 20){ - //good_posy.push_back(posy); - good_posy.push_back(tofy); - //SofFF->SetMwpcPosY(posy); - //SofFF->SetTofPosY(tofy); - } - } - } - - if(good_posx.size()==2 && good_posy.size()==2){ - SofFF->SetTofPosX(good_posx[0]); - SofFF->SetTofPosX(good_posx[1]); - - SofFF->SetTofPosY(good_posy[0]); - SofFF->SetTofPosY(good_posy[1]); - } - - //*** Filling the Fission Fragment Tree ***// + // *** Filling the Fission Fragment Tree *** // SofFF->SetTOF(TOF_left); SofFF->SetTOF(TOF_right); SofFF->SetBeta(Beta_Z1); @@ -520,7 +524,7 @@ void Analysis::InitParameter(){ fDCC = -10000; fK_LS2 = -30e-8; - fRunID = 6; + fRunID = 12; // Beam parameter // fZBeta_p0 = 1; diff --git a/Projects/s455/calibration/SofSci/SofSci_physics.cal b/Projects/s455/calibration/SofSci/SofSci_physics.cal index e8cb13bb5..8778ee911 100644 --- a/Projects/s455/calibration/SofSci/SofSci_physics.cal +++ b/Projects/s455/calibration/SofSci/SofSci_physics.cal @@ -1,4 +1,4 @@ -SofSci_TOF2INV_V -8.04267 0.00737389 +SofSci_TOF2INV_V -8.0515 0.00737389 SofSci_LENGTH_S2 135.614 -SofSci_DET1_POSPAR 90.0 54.6 +SofSci_DET1_POSPAR 45.0 80.0 SofSci_DET2_POSPAR 943.287 86.652 diff --git a/Projects/s455/calibration/SofTrim/SofTrim_SectionAlign.cal b/Projects/s455/calibration/SofTrim/SofTrim_SectionAlign.cal index 8a3e3df45..37d3efaaa 100644 --- a/Projects/s455/calibration/SofTrim/SofTrim_SectionAlign.cal +++ b/Projects/s455/calibration/SofTrim/SofTrim_SectionAlign.cal @@ -1,3 +1,3 @@ -SofTrim_SEC1_ALIGN 310.216 1.00792 +SofTrim_SEC1_ALIGN -457.863 1.03809 SofTrim_SEC2_ALIGN 0 1 -SofTrim_SEC3_ALIGN -1382.53 1.13744 +SofTrim_SEC3_ALIGN -2599.29 1.18757 -- GitLab