Skip to content
Snippets Groups Projects
Commit 0823abad authored by Adrien Matta's avatar Adrien Matta :skull_crossbones:
Browse files

* Fixing various warning in NPSimulation

parent a6fca307
No related branches found
No related tags found
No related merge requests found
...@@ -2157,7 +2157,9 @@ void Chamber::ConstructDetector(G4LogicalVolume* world) ...@@ -2157,7 +2157,9 @@ void Chamber::ConstructDetector(G4LogicalVolume* world)
case 0 : case 0 :
break; break;
case 1 : yPos -= (7.0*mm + connectorW); case 1 : yPos -= (7.0*mm + connectorW);
break;
case 2 : yPos -= (15.0*mm + connectorW); case 2 : yPos -= (15.0*mm + connectorW);
break;
case 3 : yPos -= (7.0*mm + connectorW); case 3 : yPos -= (7.0*mm + connectorW);
break; break;
} }
......
...@@ -137,7 +137,7 @@ G4LogicalVolume* Dali::BuildSquareDetector(){ ...@@ -137,7 +137,7 @@ G4LogicalVolume* Dali::BuildSquareDetector(){
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4Element* H = new G4Element("Hydrogen","H" , 1., 1.01*g/mole); //G4Element* H = new G4Element("Hydrogen","H" , 1., 1.01*g/mole);
G4Isotope* Mg24 = new G4Isotope ("Mg24", 12, 24, 23.985041*g/mole); G4Isotope* Mg24 = new G4Isotope ("Mg24", 12, 24, 23.985041*g/mole);
G4Isotope* Mg25 = new G4Isotope ("Mg25", 12, 25, 24.985836*g/mole); G4Isotope* Mg25 = new G4Isotope ("Mg25", 12, 25, 24.985836*g/mole);
...@@ -196,7 +196,7 @@ G4LogicalVolume* Dali::BuildSquareDetector(){ ...@@ -196,7 +196,7 @@ G4LogicalVolume* Dali::BuildSquareDetector(){
G4ThreeVector positionnull = G4ThreeVector(0,0,0); G4ThreeVector positionnull = G4ThreeVector(0,0,0);
// MgO Volume - // MgO Volume -
G4PVPlacement* physi_MgO = new G4PVPlacement(0, positionnull, new G4PVPlacement(0, positionnull,
m_SquareDetector_CanMgO, m_SquareDetector_CanMgO,
"MgO", "MgO",
m_SquareDetector_Can, m_SquareDetector_Can,
...@@ -207,7 +207,7 @@ G4LogicalVolume* Dali::BuildSquareDetector(){ ...@@ -207,7 +207,7 @@ G4LogicalVolume* Dali::BuildSquareDetector(){
// NaI Volume - // NaI Volume -
G4PVPlacement* physi_NaI = new G4PVPlacement(0, positionnull, new G4PVPlacement(0, positionnull,
m_SquareDetector_Crystal, m_SquareDetector_Crystal,
"Crystal NaI", "Crystal NaI",
m_SquareDetector_CanMgO, m_SquareDetector_CanMgO,
...@@ -217,7 +217,7 @@ G4LogicalVolume* Dali::BuildSquareDetector(){ ...@@ -217,7 +217,7 @@ G4LogicalVolume* Dali::BuildSquareDetector(){
m_SquareDetector_Crystal->SetVisAttributes(m_VisSquare); m_SquareDetector_Crystal->SetVisAttributes(m_VisSquare);
m_SquareDetector_Crystal->SetSensitiveDetector(m_DaliScorer); m_SquareDetector_Crystal->SetSensitiveDetector(m_DaliScorer);
G4VPhysicalVolume* ArrayDali_1 = new G4PVReplica("ArrayDali_1", new G4PVReplica("ArrayDali_1",
m_SquareDetector_Can, m_SquareDetector_Can,
Logic_ArrayDali_1 , Logic_ArrayDali_1 ,
kYAxis, kYAxis,
......
...@@ -168,25 +168,25 @@ void LightPipe::ConstructDetector(G4LogicalVolume* world){ ...@@ -168,25 +168,25 @@ void LightPipe::ConstructDetector(G4LogicalVolume* world){
return (i - (imax/2.))*width + width/2.; return (i - (imax/2.))*width + width/2.;
}; };
int i=0, j=0, k=0; //int i=0, j=0, k=0;
int iPipeX=1, iPipeY=1, iDet=1; int iPipeX=1,/* iPipeY=1,*/ iDet=1;
for(const auto& det : m_Detector) { for(const auto& det : m_Detector) {
const G4int& nrow = get<0>(det); const G4int& nrow = get<0>(det);
const G4int& ncol = get<1>(det); const G4int& ncol = get<1>(det);
const G4int& nlayer = get<2>(det); //const G4int& nlayer = get<2>(det);
const G4double& width = get<3>(det); const G4double& width = get<3>(det);
const G4double& thickness = get<4>(det); const G4double& thickness = get<4>(det);
const G4double& pipe_width = get<5>(det); const G4double& pipe_width = get<5>(det);
const G4double& pipe_thickness = get<6>(det); const G4double& pipe_thickness = get<6>(det);
const G4double pd_thickness = 1*mm; //const G4double pd_thickness = 1*mm;
vector<vector<G4PVPlacement*> > physVol(nrow); vector<vector<G4PVPlacement*> > physVol(nrow);
for(auto& v : physVol) { v.resize(ncol); } for(auto& v : physVol) { v.resize(ncol); }
auto buildRow = [&](G4int irow, G4double z){ auto buildRow = [&](G4int irow, G4double z){
G4double rowWidthX = nrow*width; //G4double rowWidthX = nrow*width;
G4double pipe_length = width*ncol + 1*cm; G4double pipe_length = width*ncol + 1*cm;
// //
// Build light pipe above detectors // Build light pipe above detectors
...@@ -201,7 +201,7 @@ void LightPipe::ConstructDetector(G4LogicalVolume* world){ ...@@ -201,7 +201,7 @@ void LightPipe::ConstructDetector(G4LogicalVolume* world){
G4RotationMatrix* myRotation = new G4RotationMatrix(); G4RotationMatrix* myRotation = new G4RotationMatrix();
myRotation->rotateX(90.*deg); myRotation->rotateX(90.*deg);
// Create PV Placement // Create PV Placement
G4PVPlacement* pv = new G4PVPlacement( new G4PVPlacement(
myRotation, pipePos, pipe, "LightPipe_PipeX", world, false, iPipeX++, warnOverlap); myRotation, pipePos, pipe, "LightPipe_PipeX", world, false, iPipeX++, warnOverlap);
std::vector<G4PVPlacement*> pvRow; std::vector<G4PVPlacement*> pvRow;
......
...@@ -238,7 +238,7 @@ void Miniball::InitializeRootOutput(){ ...@@ -238,7 +238,7 @@ void Miniball::InitializeRootOutput(){
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// Read sensitive part and fill the Root tree. // Read sensitive part and fill the Root tree.
// Called at in the EventAction::EndOfEventAvtion // Called at in the EventAction::EndOfEventAvtion
void Miniball::ReadSensitive(const G4Event* event){ void Miniball::ReadSensitive(const G4Event* ){
m_Event->Clear(); m_Event->Clear();
/////////// ///////////
......
# Install script for directory: /Users/valerian/Software/other_nptool_versions/nptool/NPSimulation/Detectors/beam_dump # Install script for directory: /scratch/nptool/NPSimulation/Detectors/beam_dump
# Set the install prefix # Set the install prefix
if(NOT DEFINED CMAKE_INSTALL_PREFIX) if(NOT DEFINED CMAKE_INSTALL_PREFIX)
...@@ -27,6 +27,11 @@ if(NOT CMAKE_INSTALL_COMPONENT) ...@@ -27,6 +27,11 @@ if(NOT CMAKE_INSTALL_COMPONENT)
endif() endif()
endif() endif()
# Install shared libraries without execute permission?
if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
set(CMAKE_INSTALL_SO_NO_EXE "1")
endif()
# Is this installation the result of a crosscompile? # Is this installation the result of a crosscompile?
if(NOT DEFINED CMAKE_CROSSCOMPILING) if(NOT DEFINED CMAKE_CROSSCOMPILING)
set(CMAKE_CROSSCOMPILING "FALSE") set(CMAKE_CROSSCOMPILING "FALSE")
......
...@@ -104,8 +104,17 @@ void Analysis::TreatEvent(){ ...@@ -104,8 +104,17 @@ void Analysis::TreatEvent(){
int TelescopeNumber = M2->TelescopeNumber[countMust2]; int TelescopeNumber = M2->TelescopeNumber[countMust2];
Si_X_M2 = X ; Si_X_M2 = X ;
Si_Y_M2 = Y ; Si_Y_M2 = Y ;
// Beam Energy from Cav Time of Flight //
if(TelescopeNumber<9){ double BeamSpeed = 138.898 - 14765.1/ ModularLeaf->GetCalibratedValue("T_CATS1_CAV") ; // mm/ns
// Beam Energy before CATS1
static double c2 = 299.792458*299.792458;// mm/ns
double gamma = 1./sqrt(1-BeamSpeed*BeamSpeed/c2);
BeamEnergy= 11200.962140*(gamma-1);
double BeamAngle= BeamDirection.Angle(TVector3(0,0,1));
double gammaCav = (BeamEnergy+11200.962140) / 11200.962140 ;
double BeamSpeedCav = sqrt(c2*(1-1/(gammaCav*gammaCav)));
//cout << ModularLeaf->GetCalibratedValue("T_CATS1_CAV") << " " << BeamSpeed << " " << BeamEnergy << " " << BeamEnergy/12. << endl;
if(BeamEnergy>0 && TelescopeNumber<5){
DetectorNumber = TelescopeNumber ; DetectorNumber = TelescopeNumber ;
/* // Part 1 : Impact Angle */ /* // Part 1 : Impact Angle */
...@@ -122,26 +131,8 @@ void Analysis::TreatEvent(){ ...@@ -122,26 +131,8 @@ void Analysis::TreatEvent(){
Y_M2 = M2 -> GetPositionOfInteraction(countMust2).Y() ; Y_M2 = M2 -> GetPositionOfInteraction(countMust2).Y() ;
Z_M2 = M2 -> GetPositionOfInteraction(countMust2).Z() ; Z_M2 = M2 -> GetPositionOfInteraction(countMust2).Z() ;
// Beam Energy from Cav Time of Flight //
// Beam speed from Beam Energy
// double BeamSpeed = 10.8727 + ModularLeaf->GetCalibratedValue("T_CATS1_CAV")*0.276825; // mm/ns
//double BeamSpeed = 5.17952 + ModularLeaf->GetCalibratedValue("T_CATS1_CAV")*0.305315; // mm/ns
//double BeamSpeed = 11.0476 + ModularLeaf->GetCalibratedValue("T_CATS1_CAV")*0.278917; // mm/ns
//double BeamSpeed = 7.20255 + ModularLeaf->GetCalibratedValue("T_CATS1_CAV")*0.293392; // mm/ns
double BeamSpeed = 20.0747+ ModularLeaf->GetCalibratedValue("T_CATS1_CAV")*0.237811; // mm/ns
// Beam Energy before CATS1 // Beam Energy and speed after CATS1
static double c2 = 299.792458*299.792458;// mm/ns
double gamma = 1./sqrt(1-BeamSpeed*BeamSpeed/c2);
BeamEnergy= 11200.962140*(gamma-1);
double BeamAngle= BeamDirection.Angle(TVector3(0,0,1));
double gammaCav = (BeamEnergy+11200.962140) / 11200.962140 ;
double BeamSpeedCav = sqrt(c2*(1-1/(gammaCav*gammaCav)));
// Beam Energy and speed after CATS1
double BeamEnergyC1 = BeamMylar.Slow(BeamEnergy,1.2*micrometer,BeamAngle); double BeamEnergyC1 = BeamMylar.Slow(BeamEnergy,1.2*micrometer,BeamAngle);
BeamEnergyC1 = BeamIsobutane.Slow(BeamEnergyC1,cm/3.,BeamAngle); BeamEnergyC1 = BeamIsobutane.Slow(BeamEnergyC1,cm/3.,BeamAngle);
BeamEnergyC1 = BeamMylar.Slow(BeamEnergyC1,0.9*micrometer,BeamAngle); BeamEnergyC1 = BeamMylar.Slow(BeamEnergyC1,0.9*micrometer,BeamAngle);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment