diff --git a/NPSimulation/src/AnnularS1.cc b/NPSimulation/src/AnnularS1.cc index 6d572feb097e577cf52a3f178f450f217c0d9fcb..69c565a5b9928db8050bf76a2897afc7bb39c75c 100644 --- a/NPSimulation/src/AnnularS1.cc +++ b/NPSimulation/src/AnnularS1.cc @@ -166,10 +166,6 @@ void AnnularS1::VolumeMaker(G4int DetecNumber, //////////////////////////////////////////////////////////////// ////////////// Starting Volume Definition ////////////////////// //////////////////////////////////////////////////////////////// - // Little trick to avoid warning in compilation: Use a PVPlacement "buffer". - // If don't you will have a Warning unused variable 'myPVP' - G4PVPlacement* PVPBuffer ; - // Name of the module G4String Name = "S1Annular" + DetectorNumber; @@ -184,7 +180,7 @@ void AnnularS1::VolumeMaker(G4int DetecNumber, // G4LogicalVolume* logicAnnularS1 = new G4LogicalVolume(solidAnnularS1, Iron, Name, 0, 0, 0); G4LogicalVolume* logicAnnularS1 = new G4LogicalVolume(solidAnnularS1, Vacuum, Name, 0, 0, 0); - PVPBuffer = new G4PVPlacement(G4Transform3D(*rotation, position), + new G4PVPlacement(G4Transform3D(*rotation, position), logicAnnularS1, Name, world, @@ -209,8 +205,8 @@ void AnnularS1::VolumeMaker(G4int DetecNumber, // G4LogicalVolume* logicAluStrip = new G4LogicalVolume(solidAluStrip, Aluminium, "logicAluStrip", 0, 0, 0); G4LogicalVolume* logicAluStrip = new G4LogicalVolume(solidAluStrip, Vacuum, "logicAluStrip", 0, 0, 0); - PVPBuffer = new G4PVPlacement(0, positionAluStripFront, logicAluStrip, Name + "_AluStripFront", logicAnnularS1, false, 0); - PVPBuffer = new G4PVPlacement(0, positionAluStripBack, logicAluStrip, Name + "_AluStripBack", logicAnnularS1, false, 0); + new G4PVPlacement(0, positionAluStripFront, logicAluStrip, Name + "_AluStripFront", logicAnnularS1, false, 0); + new G4PVPlacement(0, positionAluStripBack, logicAluStrip, Name + "_AluStripBack", logicAnnularS1, false, 0); logicAluStrip->SetVisAttributes(G4VisAttributes::Invisible); @@ -226,7 +222,7 @@ void AnnularS1::VolumeMaker(G4int DetecNumber, G4LogicalVolume* logicSilicon = new G4LogicalVolume(solidSilicon, Silicon, "logicSilicon", 0, 0, 0); - PVPBuffer = new G4PVPlacement(0, positionSilicon, logicSilicon, Name + "_Silicon", logicAnnularS1, false, 0); + new G4PVPlacement(0, positionSilicon, logicSilicon, Name + "_Silicon", logicAnnularS1, false, 0); // Set Silicon strip sensible logicSilicon->SetSensitiveDetector(m_Scorer); diff --git a/NPSimulation/src/Chamber.cc b/NPSimulation/src/Chamber.cc index a56bb3f43de87139c634ceeac7ce88c92feaac5d..6e58997f5140715a8406c9609c63c8f2cb053e40 100644 --- a/NPSimulation/src/Chamber.cc +++ b/NPSimulation/src/Chamber.cc @@ -63,8 +63,8 @@ Chamber::Chamber() G4Material* Chamber::GetMaterialFromLibrary(G4String MaterialName, G4double Temperature, G4double Pressure) { - Temperature = 0 ; - Pressure = 0 ; + Temperature *= 1 ; + Pressure *= 1 ; G4Material* myMaterial; @@ -215,11 +215,6 @@ void Chamber::ReadConfiguration(string Path) // Called After DetecorConstruction::AddDetector Method void Chamber::ConstructDetector(G4LogicalVolume* world) { - -// Little trick to avoid warning in compilation: Use a PVPlacement "buffer". -// If don't you will have a Warning unused variable 'myPVP' - G4VPhysicalVolume* PVPBuffer ; - if (m_ChamberType) { // case of standard Chamber G4Sphere* solidChamber @@ -231,8 +226,7 @@ void Chamber::ConstructDetector(G4LogicalVolume* world) //G4RotationMatrix *rotation = new G4RotationMatrix(); //rotation->rotateY(m_ChamberAngle); - PVPBuffer = - new G4PVPlacement(0, G4ThreeVector(0., 0., 0.), logicChamber, "Chamber", world, false, 0); + new G4PVPlacement(0, G4ThreeVector(0., 0., 0.), logicChamber, "Chamber", world, false, 0); G4VisAttributes* ChamberVisAtt = new G4VisAttributes(G4Colour(0., 1., 1.)); logicChamber->SetVisAttributes(ChamberVisAtt); diff --git a/NPSimulation/src/DetectorConstruction.cc b/NPSimulation/src/DetectorConstruction.cc index 8a5326d26e1d73222f1ae40ac9860056edf75057..b28e6c1c36d5000a7385ec4985e65eb9e8273ae3 100644 --- a/NPSimulation/src/DetectorConstruction.cc +++ b/NPSimulation/src/DetectorConstruction.cc @@ -173,7 +173,6 @@ void DetectorConstruction::ReadConfigurationFile(string Path){ string LineBuffer; string DataBuffer; - // needed for Magnetic field bool cAddThinSi = false; bool cComptonTelescope = false; @@ -192,10 +191,6 @@ void DetectorConstruction::ReadConfigurationFile(string Path){ bool cW1 = false; bool cHelios = false; -#ifdef INC_HELIOS - bool check_MField = false; - double Bz=0.; -#endif int VerboseLevel = NPOptionManager::getInstance()->GetVerboseLevel(); ifstream ConfigFile; @@ -497,9 +492,12 @@ void DetectorConstruction::ReadConfigurationFile(string Path){ cHelios = true ; cout << "//////// Helios detector ////////" << endl ; +// bool check_MField = false; + double Bz=0.; + ConfigFile >> DataBuffer ; if (DataBuffer.compare(0, 7, "MField=") == 0){ - check_MField = true; +// check_MField = true; ConfigFile >> DataBuffer ; Bz = atof(DataBuffer.c_str()) ; cout << "//////// Magentic Field set at Bz= " << Bz << " ////////" << endl ; diff --git a/NPSimulation/src/DummyDetector.cc b/NPSimulation/src/DummyDetector.cc index 9346d36b2d917956ce3be269fb61231d38c2fd5b..8d8b505e5233135d6cd75fe92c04f46da472e941 100644 --- a/NPSimulation/src/DummyDetector.cc +++ b/NPSimulation/src/DummyDetector.cc @@ -265,8 +265,6 @@ void DUMMYDetector::VolumeMaker(G4ThreeVector Det_pos, int DetNumber, G4LogicalV //////////////////////////////////////////////////////////////// ////////////// Starting Volume Definition ////////////////////// //////////////////////////////////////////////////////////////// - G4PVPlacement* PVPBuffer ; - // Name of the module std::ostringstream DetectorNumber ; DetectorNumber << DetNumber ; @@ -303,7 +301,7 @@ void DUMMYDetector::VolumeMaker(G4ThreeVector Det_pos, int DetNumber, G4LogicalV - PVPBuffer = new G4PVPlacement( 0, + G4PVPlacement( 0, Det_pos, logicDUMMYDetector, Name + "_Scintillator",