diff --git a/Inputs/DetectorConfiguration/Riken_65mm.detector b/Inputs/DetectorConfiguration/Riken_65mm.detector index 1931bbd73a23f2f30a3fbb5e1e013246af175e20..2cace566d03d4546598209b313a2100903f7e81a 100644 --- a/Inputs/DetectorConfiguration/Riken_65mm.detector +++ b/Inputs/DetectorConfiguration/Riken_65mm.detector @@ -17,12 +17,12 @@ GeneralTarget Z= 0 CryoTarget - THICKNESS= 4400 + THICKNESS= 3 RADIUS= 45 TEMPERATURE= 26 PRESSURE= 1 MATERIAL= D2 - WINDOWSTHICKNESS= 12 + WINDOWSTHICKNESS= 0 WINDOWSMATERIAL= Mylar X= 0 Y= 0 diff --git a/Inputs/EventGenerator/10He.reaction b/Inputs/EventGenerator/10He.reaction index 2cbb5f098acbcd63c70eaf0206cfe8f52913da7c..9b71622344f5ef1e607ba911c66cf308cd444332 100644 --- a/Inputs/EventGenerator/10He.reaction +++ b/Inputs/EventGenerator/10He.reaction @@ -14,12 +14,12 @@ TransfertToResonance SigmaPhiY= 0.963142053 SigmaX= 6.232 SigmaY= 9.069 - ResonanceWidth= 1.0 + ResonanceWidth= 0 ResonanceDecayZ= 2 ResonanceDecayA= 8 CrossSectionPath= 11Li(d,3He)10He.txt ShootLight= 1 - ShootHeavy= 1 + ShootHeavy= 0 ShootDecayProduct= 0 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/NPAnalysis/10He_Riken/src/Analysis.cc b/NPAnalysis/10He_Riken/src/Analysis.cc index 857bb639ea0ef529dea8f20dc3e8c2e4357c817d..bebe502b09a365729d464274121a6f8c7965f70a 100644 --- a/NPAnalysis/10He_Riken/src/Analysis.cc +++ b/NPAnalysis/10He_Riken/src/Analysis.cc @@ -72,6 +72,8 @@ int main(int argc,char** argv) TInteractionCoordinates* ICoord = new TInteractionCoordinates(); Chain->SetBranchAddress("InteractionCoordinates" ,&ICoord ); + + double XTarget=0 ; double YTarget=0; double ZTarget = 0 ; double BeamTheta = 0 ; double BeamPhi = 0 ; double E=-1000; // Get Detector Pointer: @@ -154,6 +156,7 @@ RootOutput::getInstance()->GetList()->Add(myHist1D); TVector3 BeamDirection = TVector3(cos(BeamPhi)*sin(BeamTheta) , sin(BeamPhi)*sin(BeamTheta) , cos(BeamTheta)) ; //// + // Must 2 And ThinSi // for(int hit = 0; hit < M2 -> Si_E.size() ; hit ++) { @@ -162,6 +165,13 @@ RootOutput::getInstance()->GetList()->Add(myHist1D); // Angle between beam and particle ThetaLab[hit] = ThetaCalculation ( HitDirection , BeamDirection ) ; + double Xint = ICoord-> GetDetectedPositionX(hit) - M2 -> GetPositionOfInteraction(hit).X(); + double Yint = ICoord-> GetDetectedPositionY(hit) - M2 -> GetPositionOfInteraction(hit).Y(); + double Zint = ICoord-> GetDetectedPositionZ(hit) - M2 -> GetPositionOfInteraction(hit).Z(); + + +// cout << Xint << " " << Yint << " " << Zint << endl; + // Angle between particule and z axis (target Normal) double ThetaN = ThetaCalculation ( HitDirection , TVector3(0,0,1) ) ; // Angle between particule and Must2 Si surface @@ -189,11 +199,11 @@ RootOutput::getInstance()->GetList()->Add(myHist1D); } ELab[hit]= He3TargetWind.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle - 10*micrometer , // Target Thickness at 0 degree + 0*micrometer , // Target Thickness at 0 degree ThetaN ); ELab[hit]= He3TargetGaz.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle - 1.5*mm , // Target Thickness at 0 degree + 3*micrometer , // Target Thickness at 0 degree ThetaN ); ThetaCM[hit] = He10Reaction -> EnergyLabToThetaCM( ELab[hit] ) /deg ; @@ -238,11 +248,11 @@ RootOutput::getInstance()->GetList()->Add(myHist1D); } ELab[hit]= He3TargetWind.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle - 10*micrometer , // Target Thickness at 0 degree + 0*micrometer , // Target Thickness at 0 degree ThetaN ); ELab[hit]= He3TargetGaz.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle - 1.5*mm , // Target Thickness at 0 degree + 3*micrometer , // Target Thickness at 0 degree ThetaN ); ThetaCM[hit]= He10Reaction -> EnergyLabToThetaCM( ELab[hit] ) /deg ; diff --git a/NPLib/Plastic/TPlasticPhysics.cxx b/NPLib/Plastic/TPlasticPhysics.cxx index 6c0ee1ab0b33698c326a6112b8f16e674d6779dc..394c52311177561dfeb8c4a3c9909f4dcbe0c119 100644 --- a/NPLib/Plastic/TPlasticPhysics.cxx +++ b/NPLib/Plastic/TPlasticPhysics.cxx @@ -76,18 +76,20 @@ void TPlasticPhysics::ReadConfiguration(string Path) string LineBuffer ; string DataBuffer ; - double Theta = 0 , Phi = 0 , R = 0 , Thickness = 0 , Radius = 0 , LeadThickness = 0; - string Scintillator ; - - bool check_Theta = false ; - bool check_Phi = false ; - bool check_R = false ; + bool check_Theta = false ; + bool check_Phi = false ; + bool check_R = false ; bool check_Thickness = false ; - bool check_Radius = false ; - bool check_LeadThickness = false ; + bool check_Radius = false ; + bool check_LeadThickness = false ; bool check_Scintillator = false ; - bool ReadingStatus = false ; - + bool check_Height = false ; + bool check_Width = false ; + bool check_Shape = false ; + bool check_X = false ; + bool check_Y = false ; + bool check_Z = false ; + bool ReadingStatus = false ; while (!ConfigFile.eof()) { @@ -117,54 +119,96 @@ void TPlasticPhysics::ReadConfiguration(string Path) // Finding another telescope (safety), toggle out else if (DataBuffer.compare(0, 6, "Plastic") == 0) { - cout << "WARNING: Another Telescope is find before standard sequence of Token, Error may occured in Telecope definition" << endl ; + cout << "WARNING: Another Detector is find before standard sequence of Token, Error may occured in Telecope definition" << endl ; ReadingStatus = false ; } - //Angle method + //Angle method else if (DataBuffer.compare(0, 6, "THETA=") == 0) { check_Theta = true; ConfigFile >> DataBuffer ; - Theta = atof(DataBuffer.c_str()) ; + cout << "Theta: " << atof(DataBuffer.c_str()) << "deg" << endl; } else if (DataBuffer.compare(0, 4, "PHI=") == 0) { check_Phi = true; ConfigFile >> DataBuffer ; - Phi = atof(DataBuffer.c_str()) ; + cout << "Phi: " << atof( DataBuffer.c_str() ) << "deg" << endl; } else if (DataBuffer.compare(0, 2, "R=") == 0) { check_R = true; ConfigFile >> DataBuffer ; - R = atof(DataBuffer.c_str()) ; + cout << "R: " << atof( DataBuffer.c_str() ) << "mm" << endl; + } + + //Position method + else if (DataBuffer.compare(0, 2, "X=") == 0) { + check_X = true; + ConfigFile >> DataBuffer ; + cout << "X: " << atof( DataBuffer.c_str() ) << "mm" << endl; + } + + else if (DataBuffer.compare(0, 2, "Y=") == 0) { + check_Y = true; + ConfigFile >> DataBuffer ; + cout << "Y: " << atof( DataBuffer.c_str() ) << "mm"<< endl; + } + + else if (DataBuffer.compare(0, 2, "Z=") == 0) { + check_Z = true; + ConfigFile >> DataBuffer ; + cout << "Z: " << atof( DataBuffer.c_str() ) << "mm" << endl; } + + //General + else if (DataBuffer.compare(0, 6, "Shape=") == 0) { + check_Shape = true; + ConfigFile >> DataBuffer ; + cout << "Shape: " << DataBuffer << endl; + } + + // Cylindrical shape else if (DataBuffer.compare(0, 7, "Radius=") == 0) { check_Radius = true; ConfigFile >> DataBuffer ; - Radius = atof(DataBuffer.c_str()) ; + cout << "Plastic Radius: " << atof( DataBuffer.c_str() ) << "mm" << endl; + } + + // Squared shape + else if (DataBuffer.compare(0, 7, "Width=") == 0) { + check_Width = true; + ConfigFile >> DataBuffer ; + cout << "Plastic Width: " <<atof( DataBuffer.c_str() ) << "mm" << endl; + } + + else if (DataBuffer.compare(0, 7, "Height=") == 0) { + check_Height = true; + ConfigFile >> DataBuffer ; + cout << "Plastic Height: " << atof( DataBuffer.c_str() ) << "mm" << endl; } + // Common else if (DataBuffer.compare(0, 10, "Thickness=") == 0) { check_Thickness = true; ConfigFile >> DataBuffer ; - Thickness = atof(DataBuffer.c_str()) ; + cout << "Plastic Thickness: " << atof( DataBuffer.c_str() ) << "mm" << endl; } else if (DataBuffer.compare(0, 13, "Scintillator=") == 0) { check_Scintillator = true ; ConfigFile >> DataBuffer ; - Scintillator = DataBuffer ; + cout << "Plastic Scintillator type: " << DataBuffer << endl; } else if (DataBuffer.compare(0, 14, "LeadThickness=") == 0) { check_LeadThickness = true; ConfigFile >> DataBuffer ; - LeadThickness = atof(DataBuffer.c_str()) ; + cout << "Lead Thickness : " << atof( DataBuffer.c_str() ) << "mm" << endl; } - - /////////////////////////////////////////////////// + + /////////////////////////////////////////////////// // If no Detector Token and no comment, toggle out else {ReadingStatus = false; cout << "Wrong Token Sequence: Getting out " << DataBuffer << endl ;} @@ -172,21 +216,26 @@ void TPlasticPhysics::ReadConfiguration(string Path) ///////////////////////////////////////////////// // If All necessary information there, toggle out - if ( check_Theta && check_Phi && check_R && check_Thickness && check_Radius && check_LeadThickness && check_Scintillator) + if ( check_Theta && check_Phi && check_R && check_Thickness && check_Radius && check_LeadThickness && check_Scintillator && check_Height && check_Width && check_Shape && check_X && check_Y && check_Z ) { NumberOfDetector++; - // Reinitialisation of Check Boolean - - check_Theta = false ; - check_Phi = false ; - check_R = false ; - check_Thickness = false ; - check_Radius = false ; - check_LeadThickness = false ; - check_Scintillator = false ; - ReadingStatus = false ; - cout << "///"<< endl ; + // Reinitialisation of Check Boolean + check_Theta = false ; + check_Phi = false ; + check_R = false ; + check_Thickness = false ; + check_Radius = false ; + check_LeadThickness = false ; + check_Scintillator = false ; + check_Height = false ; + check_Width = false ; + check_Shape = false ; + check_X = false ; + check_Y = false ; + check_Z = false ; + ReadingStatus = false ; + cout << "///"<< endl ; } } diff --git a/NPSimulation/src/EventGeneratorTransfertToResonance.cc b/NPSimulation/src/EventGeneratorTransfertToResonance.cc index eb96fa7ec7c8b56e68080d3a0cff18de9af73d04..f7338b3a15f0c470c67fe3d69df7e4e45ae31cea 100644 --- a/NPSimulation/src/EventGeneratorTransfertToResonance.cc +++ b/NPSimulation/src/EventGeneratorTransfertToResonance.cc @@ -405,15 +405,16 @@ void EventGeneratorTransfertToResonance::GenerateEvent(G4Event* anEvent , G4Part // Shoot the Resonance energy following the mean and width value // EXX should always be more than specific heat of the reaction - double EXX = RandBreitWigner::shoot(m_ResonanceMean,m_ResonanceWidth) ; + // double EXX = RandBreitWigner::shoot(m_ResonanceMean,m_ResonanceWidth) ; + double EXX = RandGauss::shoot(m_ResonanceMean,m_ResonanceWidth) ; m_Reaction->SetExcitation( EXX ); while ( m_Reaction->CheckKinematic()==false ) { - EXX = RandBreitWigner::shoot(m_ResonanceMean,m_ResonanceWidth) ; +// EXX = RandBreitWigner::shoot(m_ResonanceMean,m_ResonanceWidth) ; + EXX = RandGauss::shoot(m_ResonanceMean,m_ResonanceWidth) ; m_Reaction->SetExcitation( EXX ); } - // Beam G4int BeamZ = m_Reaction->GetNucleus1()->GetZ(); G4int BeamA = m_Reaction->GetNucleus1()->GetA(); diff --git a/NPSimulation/src/MUST2Array.cc b/NPSimulation/src/MUST2Array.cc index 5f2a6ced9a4733d3f3820acccfdceb72e4f5e53b..b8c5f43281a739a3ab1ec0d4bc16fcc661fbe14a 100644 --- a/NPSimulation/src/MUST2Array.cc +++ b/NPSimulation/src/MUST2Array.cc @@ -163,12 +163,12 @@ void MUST2Array::VolumeMaker(G4int TelescopeNumber , G4String Name = "MUST2Telescope" + DetectorNumber ; - PVPBuffer = new G4PVPlacement(G4Transform3D(*MMrot, MMpos) , - logicMM , - Name , - world , - false , - 0); + PVPBuffer = new G4PVPlacement( G4Transform3D(*MMrot, MMpos) , + logicMM , + Name , + world , + false , + 0); @@ -879,20 +879,19 @@ void MUST2Array::ConstructDetector(G4LogicalVolume* world) // (u,v) // to silicon plan // w perpendicular to (u,v) plan and pointing CsI MMu = m_X128_Y1[i] - m_X1_Y1[i] ; - MMu = -MMu.unit() ; + MMu = MMu.unit() ; MMv = m_X1_Y128[i] - m_X1_Y1[i] ; - MMv = -MMv.unit() ; - + MMv = MMv.unit() ; + MMw = MMv.cross(MMu) ; // if (MMw.z() > 0)MMw = MMv.cross(MMu) ; MMw = MMw.unit() ; - + MMCenter = (m_X1_Y1[i] + m_X1_Y128[i] + m_X128_Y1[i] + m_X128_Y128[i]) / 4 ; // Passage Matrix from Lab Referential to Telescope Referential MMrot = new G4RotationMatrix(MMv, MMu, MMw); - // translation to place Telescope MMpos = MMw * Length * 0.5 + MMCenter ; }