diff --git a/NPLib/Detectors/Minos/TMinosData.cxx b/NPLib/Detectors/Minos/TMinosData.cxx index 416ab7293e9fe5ff50f742c9522fd1c08ea5a48f..03e795c65fc322626579936b71ef439cf5f7ab2d 100644 --- a/NPLib/Detectors/Minos/TMinosData.cxx +++ b/NPLib/Detectors/Minos/TMinosData.cxx @@ -50,6 +50,83 @@ void TMinosData::Clear() { // Time fMinos_T_DetectorNbr.clear(); fMinos_Time.clear(); + + +//From Santamaria: + +x_tpc.clear(); +y_tpc.clear(); +z_tpc.clear(); +e_tpc.clear(); + +x_InRoh.clear(); +y_InRoh.clear(); +z_InRoh.clear(); +e_InRoh.clear(); + +x_OutRoh.clear(); +y_OutRoh.clear(); +z_OutRoh.clear(); +e_OutRoh.clear(); + +x_Kap.clear(); +y_Kap.clear(); +z_Kap.clear(); +e_Kap.clear(); + +x_tar.clear(); +y_tar.clear(); +z_tar.clear(); +e_tar.clear(); + +x_win.clear(); +y_win.clear(); +z_win.clear(); +e_win.clear(); + +x_ch.clear(); +y_ch.clear(); +z_ch.clear(); +e_ch.clear(); + +x_trigger.clear(); +y_trigger.clear(); +z_trigger.clear(); +e_trigger.clear(); + +Et_tpc_tot=0.; + +Et_trigger.clear(); +Et_tar.clear(); +Et_ch.clear(); +Et_win.clear(); +Et_tpc.clear(); +Et_InnerRohacell.clear(); +Et_OuterRohacell.clear(); +Et_Kapton.clear(); + +/* //unuseful, cause nptool should make already that +//initial conditions +x0.clear(); +y0.clear(); +z0.clear(); +theta0.clear(); +phi0.clear(); +energy0.clear(); +detection.clear(); +event = 0; +*/ + +A.clear(); +Z.clear(); + +trackID.clear(); +parentID.clear(); + + + + + } @@ -76,4 +153,19 @@ void TMinosData::Dump() const { cout << "DetNbr: " << fMinos_T_DetectorNbr[i] << " Time: " << fMinos_Time[i]; } + + + + + + + +////////////////////////ADD DUMP FOR SANTAMARIA VARIABLES !!!!!!!!!!!! +//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + + + + + + } diff --git a/NPLib/Detectors/Minos/TMinosData.h b/NPLib/Detectors/Minos/TMinosData.h index d53368992a6ad0709959d01c39abcbb5ce129066..01ba60dbd6feaa16db905c24c375fed468bfac54 100644 --- a/NPLib/Detectors/Minos/TMinosData.h +++ b/NPLib/Detectors/Minos/TMinosData.h @@ -43,7 +43,33 @@ class TMinosData : public TObject { vector<Double_t> fMinos_Time; // maybe directions with angle varagles have to be added? - + +//From Santamaria: + + +//from simulation + vector<double> x_tpc,y_tpc,z_tpc,e_tpc; + vector<double> x_trigger,y_trigger,z_trigger,e_trigger; +vector<double> x_tar,y_tar,z_tar,e_tar; +vector<double> x_ch,y_ch,z_ch,e_ch; +vector<double> x_win,y_win,z_win,e_win; +vector<double> x_InRoh,y_InRoh,z_InRoh,e_InRoh; +vector<double> x_OutRoh,y_OutRoh,z_OutRoh,e_OutRoh; +vector<double> x_Kap,y_Kap,z_Kap,e_Kap; +double Et_tpc_tot; +vector<double> Et_tar,Et_ch,Et_tpc,Et_trigger,Et_win,Et_InnerRohacell, Et_OuterRohacell, Et_Kapton; +vector<int> A, Z; +vector<int> trackID, parentID; + + /* //unuseful, cause nptool should make already that +//initial conditions +//double x0,y0,z0,theta0,phi0,energy0; +vector<double> x0, y0, z0, theta0, phi0, energy0; +vector<bool> detection; +int event; +*/ + + ////////////////////////////////////////////////////////////// // Constructor and destructor public: diff --git a/NPLib/Physics/NPReaction.cxx b/NPLib/Physics/NPReaction.cxx index 8af58373bc4f0f5a5383e98cd8274637f9e1072a..6f21b1d81dcff36daa14325f36e2ada6990f04b2 100644 --- a/NPLib/Physics/NPReaction.cxx +++ b/NPLib/Physics/NPReaction.cxx @@ -171,7 +171,6 @@ Reaction::~Reaction(){ bool Reaction::CheckKinematic(){ double theta = fThetaCM; if (m1 > m2) theta = M_PI - fThetaCM; - fEnergyImpulsionCM_3 = TLorentzVector(pCM_3*sin(theta),0,pCM_3*cos(theta),ECM_3); fEnergyImpulsionCM_4 = fTotalEnergyImpulsionCM - fEnergyImpulsionCM_3; diff --git a/NPSimulation/Detectors/Minos/Minos.cc b/NPSimulation/Detectors/Minos/Minos.cc index 178cb7a8ab972415dfc26cd8c1db184ff2aa5c59..b6e47eb399edd72c63440126052c5a2c4ba1234f 100644 --- a/NPSimulation/Detectors/Minos/Minos.cc +++ b/NPSimulation/Detectors/Minos/Minos.cc @@ -134,6 +134,7 @@ void Minos::DefineMaterials() // // define Elements // + G4Element* H = new G4Element("Hydrogen",symbol="H" , z= 1., a= 1.01*g/mole); G4Element* C = new G4Element("Carbon" ,symbol="C" , z= 6., a= 12.01*g/mole); @@ -151,6 +152,8 @@ void Minos::DefineMaterials() new G4Material("Silicium", z=14., a=28.09*g/mole, density=2.330*g/cm3); new G4Material("Titanium", z=22., a=47.87*g/mole, density=4.510*g/cm3); + + G4Material* iso = new G4Material("isobutane", density=0.002506*g/cm3, ncomponents=2); iso->AddElement(C, natoms=4); iso->AddElement(H, natoms=10); @@ -244,7 +247,7 @@ void Minos::DefineMaterials() Rohacell->AddElement(O, fractionmass=0.3154); Rohacell->AddElement(N, fractionmass=0.00276); - G4cout << *(G4Material::GetMaterialTable()) << G4endl; + //G4cout << *(G4Material::GetMaterialTable()) << G4endl; //default materials of the World defaultMaterial = Vacuum; @@ -309,23 +312,6 @@ G4LogicalVolume* Minos::BuildCylindricalDetector(){ */ - TargetRadius = 28.*mm; TargetLength = 150./2.*mm; - ChamberInnerRadius = 37.*mm; ChamberThickness = 1.*mm; - ChamberLength = 300./2.*mm; - InnerRohacellThickness = 1.*mm; KaptonThickness = 0.125*mm; OuterRohacellThickness = 2.*mm; - TPCRadiusExt = 100.*mm; WindowThickness = 0.150/2.*mm; - - DefineMaterials(); - SetTargetMaterial("LH2"); - SetChamberMaterial("Inox"); - SetTPCMaterial("mix"); - SetWindowMaterial("Mylar"); - SetKaptonMaterial("Kapton"); - SetInnerRohacellMaterial("Rohacell"); - SetOuterRohacellMaterial("Rohacell"); - - - @@ -334,6 +320,16 @@ G4LogicalVolume* Minos::BuildCylindricalDetector(){ } return m_CylindricalDetector; } + + + + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + +// Below are vis attributes that permits someone to test / play + // with the interactive expansion / contraction geometry system of the + // vis/OpenInventor driver : + //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... G4LogicalVolume* Minos::BuildTarget(){ if(!logicTarget){ @@ -350,7 +346,14 @@ G4LogicalVolume* Minos::BuildTarget(){ logicTarget = new G4LogicalVolume(solidTarget, //its solid TargetMaterial, //its material "Target"); //its name - } + + + {G4VisAttributes* atb= new G4VisAttributes(G4Colour(0.6,1.,1.)); + atb->SetForceSolid(true); + logicTarget->SetVisAttributes(atb);} + + + } return logicTarget; } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... @@ -365,7 +368,12 @@ G4LogicalVolume* Minos::BuildChamber(){ logicChamber = new G4LogicalVolume(solidChamber, //its solid ChamberMaterial, //its material "Chamber"); //its name - } + +{G4VisAttributes* simpleBoxVisAtt= new G4VisAttributes(G4Colour(0,1,0)); + simpleBoxVisAtt->SetVisibility(true); + logicChamber->SetVisAttributes(simpleBoxVisAtt);} + + } return logicChamber; } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... @@ -380,6 +388,10 @@ G4LogicalVolume* Minos::BuildInnerRohacell(){ logicInnerRohacell = new G4LogicalVolume(solidInnerRohacell, //its solid InnerRohacellMaterial, //its material "InnerRohacell"); //its name + + + + } return logicInnerRohacell; } @@ -426,7 +438,12 @@ G4LogicalVolume* Minos::BuildTPC(){ TPCMaterial, //its material "TPC"); //name - } + + {G4VisAttributes* atb= new G4VisAttributes(G4Colour(1.,1.,0.6)); + logicTPC->SetVisAttributes(atb);} + + + } return logicTPC; } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... @@ -442,7 +459,14 @@ solidWindow0 = new G4Tubs("WindowTube", //its name logicWindow0 = new G4LogicalVolume(solidWindow0, //its solid WindowMaterial, //its material "WindowTube"); //name - } + + {G4VisAttributes* atb= new G4VisAttributes(G4Colour(0,0,1)); + atb->SetForceSolid(true); + logicWindow0->SetVisAttributes(atb);} + + + + } return logicWindow0; } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... @@ -454,7 +478,13 @@ G4LogicalVolume* Minos::BuildWindow1(){ logicWindow1 = new G4LogicalVolume(solidWindow1, //its solid WindowMaterial, //its material "WindowEntrance"); //name - } + + {G4VisAttributes* atb= new G4VisAttributes(G4Colour(0,0,1)); + atb->SetForceSolid(true); + logicWindow1->SetVisAttributes(atb);} + + + } return logicWindow1; } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... @@ -466,6 +496,11 @@ solidWindow2 = new G4Tubs("WindowOutcoming", //its name logicWindow2 = new G4LogicalVolume(solidWindow2, //its solid WindowMaterial, //its material "WindowOutcoming"); //name + + {G4VisAttributes* atb= new G4VisAttributes(G4Colour(0,0,1)); + atb->SetForceSolid(true); + logicWindow2->SetVisAttributes(atb);} + } return logicWindow2; } @@ -516,12 +551,28 @@ void Minos::ReadConfiguration(NPL::InputParser parser){ void Minos::ConstructDetector(G4LogicalVolume* world){ for (unsigned short i = 0 ; i < m_R.size() ; i++) { + TargetRadius = 28.*mm; TargetLength = 150./2.*mm; + ChamberInnerRadius = 37.*mm; ChamberThickness = 1.*mm; + ChamberLength = 300./2.*mm; + InnerRohacellThickness = 1.*mm; KaptonThickness = 0.125*mm; OuterRohacellThickness = 2.*mm; + TPCRadiusExt = 100.*mm; WindowThickness = 0.150/2.*mm; + + DefineMaterials(); + + SetTargetMaterial("LH2"); + SetChamberMaterial("Inox"); + SetTPCMaterial("mix"); + SetWindowMaterial("Mylar"); + SetKaptonMaterial("Kapton"); + SetInnerRohacellMaterial("Rohacell"); + SetOuterRohacellMaterial("Rohacell"); + G4double wX = m_R[i] * sin(m_Theta[i] ) * cos(m_Phi[i] ) ; G4double wY = m_R[i] * sin(m_Theta[i] ) * sin(m_Phi[i] ) ; G4double wZ = m_R[i] * cos(m_Theta[i] ) ; G4ThreeVector Det_pos = G4ThreeVector(wX, wY, wZ) ; // So the face of the detector is at R instead of the middle - Det_pos+=Det_pos.unit()*Minos_NS::Thickness*0.5; + Det_pos+=Det_pos.unit()*Minos_NS::Thickness*0.5; // Building Detector reference frame G4double ii = cos(m_Theta[i]) * cos(m_Phi[i]); G4double jj = cos(m_Theta[i]) * sin(m_Phi[i]); @@ -536,16 +587,16 @@ void Minos::ConstructDetector(G4LogicalVolume* world){ G4RotationMatrix* Rot = new G4RotationMatrix(u,v,w); if(m_Shape[i] == "Cylindrical"){ - new G4PVPlacement(G4Transform3D(*Rot,Det_pos), - BuildCylindricalDetector(), - "Minos",world,false,i+1); + // new G4PVPlacement(G4Transform3D(*Rot,Det_pos), + // BuildCylindricalDetector(), + // "Minos",world,false,i+1); } else if(m_Shape[i] == "Square"){ - new G4PVPlacement(G4Transform3D(*Rot,Det_pos), - BuildSquareDetector(), - "Minos",world,false,i+1); + + } + physiTarget = new G4PVPlacement(0, //no rotation G4ThreeVector(0,0,TargetLength), //at (0,0,0) BuildTarget(), //its logical volume @@ -554,7 +605,7 @@ void Minos::ConstructDetector(G4LogicalVolume* world){ false, //no boolean operation 0); //copy number - physiChamber = new G4PVPlacement(0, //its name + physiChamber = new G4PVPlacement(0, //its name G4ThreeVector(0,0,ChamberLength), //at (0,0,0) BuildChamber(), //its logical volume "Chamber", //its name @@ -568,61 +619,53 @@ void Minos::ConstructDetector(G4LogicalVolume* world){ "InnerRohacell", //its name world, //its mother volume false, //no boolean operation - 0); //copy number - - physiOuterRohacell = new G4PVPlacement(0, //its name - G4ThreeVector(0,0,ChamberLength), //at (0,0,0) - BuildOuterRohacell(), //its logical volume - "OuterRohacell", //its name - world, //its mother volume - false, //no boolean operation - 0); //copy number - + 0); physiOuterRohacell = new G4PVPlacement(0, //its name + G4ThreeVector(0,0,ChamberLength), //at (0,0,0) + BuildOuterRohacell(), //its logical volume + "OuterRohacell", //its name + world, //its mother volume + false, //no boolean operation + 0); //copy number + physiKapton = new G4PVPlacement(0, //its name - G4ThreeVector(0,0,ChamberLength), //at (0,0,0) + G4ThreeVector(0,0,ChamberLength), //at (0,0,0) BuildKapton(), //its logical volume - "Kapton", //its name - world, //its mother volume - false, //no boolean operation - 0); //copy number - + "Kapton", //its name + world, //its mother volume + false, //no boolean operation + 0); //copy number + physiTPC = new G4PVPlacement(0, //its name - G4ThreeVector(0,0,ChamberLength), //at (0,0,0) + G4ThreeVector(0,0,ChamberLength), //at (0,0,0) BuildTPC(), //its logical volume - "TPC", //its name - world, //its mother volume - false, //no boolean operation - 0); //copy number - - physiWindow0 = new G4PVPlacement(0, //its name - G4ThreeVector(0,0,TargetLength), //at (0,0,0) - BuildWindow0(), //its logical volume - "WindowTube", //its name - world, //its mother volume - false, //no boolean operation - 0); //copy number - - physiWindow1 = new G4PVPlacement(0, //its name - G4ThreeVector(0,0,-1.*WindowThickness), //at (0,0,0) - BuildWindow1(), //its logical volume - "WindowEntrance", //its name - world, //its mother volume - false, //no boolean operation - 0); //copy number - - physiWindow2 = new G4PVPlacement(0, //its name - G4ThreeVector(0,0,2.*TargetLength+WindowThickness), //at (0,0,0) - BuildWindow2(), //its logical volume - "WindowOutcoming", //its name - world, //its mother volume - false, //no boolean operation - 0); //copy number - + "TPC", //its name + world, //its mother volume + false, //no boolean operation + 0); //copy number - G4Region* aRegion = new G4Region("TPCLog"); - logicTPC -> SetRegion(aRegion); - aRegion -> AddRootLogicalVolume(logicTPC); - } + physiWindow0 = new G4PVPlacement(0, //its name + G4ThreeVector(0,0,TargetLength), //at (0,0,0) + BuildWindow0(), //its logical volume + "WindowTube", //its name + world, //its mother volume + false, //no boolean operation + 0); physiWindow1 = new G4PVPlacement(0, //its name + G4ThreeVector(0,0,-1.*WindowThickness), //at (0,0,0) + BuildWindow1(), //its logical volume + "WindowEntrance", //its name + world, //its mother volume + false, //no boolean operation + 0); physiWindow2 = new G4PVPlacement(0, //its name + G4ThreeVector(0,0,2.*TargetLength+WindowThickness), //at (0,0,0) + BuildWindow2(), //its logical volume + "WindowOutcoming", //its name + world, //its mother volume + false, //no boolean operation + 0); //copy number + G4Region* aRegion = new G4Region("TPCLog"); + logicTPC -> SetRegion(aRegion); + aRegion -> AddRootLogicalVolume(logicTPC); + } // // Visualization attributes // diff --git a/Projects/Dali/carbon.reaction b/Projects/Dali/carbon.reaction new file mode 100644 index 0000000000000000000000000000000000000000..eade1aafcae76a25f3a3af467b8304746fd78605 --- /dev/null +++ b/Projects/Dali/carbon.reaction @@ -0,0 +1,32 @@ +%%%%%%%%%%%%%%%%%%%%%% FOR DALI PROTON ELASTIC SCATTERING %%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Beam + Particle= 1H + ExcitationEnergy= 0 + Energy= 170 + SigmaEnergy= 0.448 + SigmaThetaX= 0.01 + SigmaPhiY= 0.01 + SigmaX= 0.01 + %0.5 + SigmaY= 0.01 + %0.5 + MeanThetaX= 0 + MeanPhiY= 0 + MeanX= 0 + MeanY= 0 + %EnergyProfilePath= + %XThetaXProfilePath= + %YPhiYProfilePath= +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +TwoBodyReaction + Beam= 1H + Target= 12C + Light= 12C + Heavy= 1H + ExcitationEnergyLight= 0.0 + ExcitationEnergyHeavy= 0.0 + CrossSectionPath= flat.txt CSR + ShootLight= 1 + ShootHeavy= 1 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%