Skip to content
Snippets Groups Projects
Commit 044f8da8 authored by Xythere's avatar Xythere
Browse files

adding Micron quadranMSQ25 detector

parent d67032b2
No related branches found
No related tags found
1 merge request!27Draft: [Epic] Preparation of the environement for the new GaseousDetectorScorers...
Pipeline #374788 passed
...@@ -69,7 +69,7 @@ quadranMSQ25::quadranMSQ25() { ...@@ -69,7 +69,7 @@ quadranMSQ25::quadranMSQ25() {
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
quadranMSQ25::~quadranMSQ25() {} quadranMSQ25::~quadranMSQ25() {}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void quadranMSQ25::AddTelescope(G4ThreeVector TL, G4ThreeVector BL, G4ThreeVector BR, G4ThreeVector TR) { void quadranMSQ25::AddTelescope(G4ThreeVector TL, G4ThreeVector BL, G4ThreeVector BR, G4ThreeVector TR, G4double thickness) {
m_DefinitionType.push_back(true); m_DefinitionType.push_back(true);
m_TL.push_back(TL); m_TL.push_back(TL);
...@@ -83,9 +83,11 @@ void quadranMSQ25::AddTelescope(G4ThreeVector TL, G4ThreeVector BL, G4ThreeVecto ...@@ -83,9 +83,11 @@ void quadranMSQ25::AddTelescope(G4ThreeVector TL, G4ThreeVector BL, G4ThreeVecto
m_beta_u.push_back(0); m_beta_u.push_back(0);
m_beta_v.push_back(0); m_beta_v.push_back(0);
m_beta_w.push_back(0); m_beta_w.push_back(0);
m_thickness.push_back(thickness);
} }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void quadranMSQ25::AddTelescope(G4double R, G4double Theta, G4double Phi, G4double beta_u, G4double beta_v, G4double beta_w) { void quadranMSQ25::AddTelescope(G4double R, G4double Theta, G4double Phi, G4double beta_u, G4double beta_v, G4double beta_w, G4double thickness) {
G4ThreeVector empty = G4ThreeVector(0, 0, 0); G4ThreeVector empty = G4ThreeVector(0, 0, 0);
m_DefinitionType.push_back(false); m_DefinitionType.push_back(false);
...@@ -101,16 +103,19 @@ void quadranMSQ25::AddTelescope(G4double R, G4double Theta, G4double Phi, G4doub ...@@ -101,16 +103,19 @@ void quadranMSQ25::AddTelescope(G4double R, G4double Theta, G4double Phi, G4doub
m_BL.push_back(empty); m_BL.push_back(empty);
m_BR.push_back(empty); m_BR.push_back(empty);
m_TR.push_back(empty); m_TR.push_back(empty);
m_thickness.push_back(thickness);
} }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void quadranMSQ25::VolumeMaker(G4int DetNumber, G4ThreeVector Det_pos, G4RotationMatrix* Det_rot, G4LogicalVolume* world) { void quadranMSQ25::VolumeMaker(G4int DetNumber, G4ThreeVector Det_pos, G4RotationMatrix* Det_rot, G4LogicalVolume* world, G4double thick) {
G4double NbrTelescopes = DetNumber; G4double NbrTelescopes = DetNumber;
G4String DetectorNumber; G4String DetectorNumber;
std::ostringstream Number; std::ostringstream Number;
Number << NbrTelescopes; Number << NbrTelescopes;
DetectorNumber = Number.str(); DetectorNumber = Number.str();
G4VisAttributes* VisAtt1 = new G4VisAttributes(G4Colour(0.2, 0.5, 0.2));
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
/////////General Geometry Parameter Definition ///////////////// /////////General Geometry Parameter Definition /////////////////
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
...@@ -131,7 +136,6 @@ void quadranMSQ25::VolumeMaker(G4int DetNumber, G4ThreeVector Det_pos, G4Rotatio ...@@ -131,7 +136,6 @@ void quadranMSQ25::VolumeMaker(G4int DetNumber, G4ThreeVector Det_pos, G4Rotatio
new G4Box(Name + "_Frame", 0.5 * (DetectorSize - SiliconSize) / 2, 0.5 * DetectorSize, 0.5 * FrameThickness * mm); new G4Box(Name + "_Frame", 0.5 * (DetectorSize - SiliconSize) / 2, 0.5 * DetectorSize, 0.5 * FrameThickness * mm);
G4LogicalVolume* logicFrameHorizontal = new G4LogicalVolume(solidFrameHorizontal, m_MaterialAl, Name, 0, 0); G4LogicalVolume* logicFrameHorizontal = new G4LogicalVolume(solidFrameHorizontal, m_MaterialAl, Name, 0, 0);
G4VisAttributes* VisAtt1 = new G4VisAttributes(G4Colour(0.2, 0.5, 0.2));
logicFrameHorizontal->SetVisAttributes(VisAtt1); logicFrameHorizontal->SetVisAttributes(VisAtt1);
G4LogicalVolume* logicFrameVertical = new G4LogicalVolume(solidFrameVertical, m_MaterialAl, Name, 0, 0); G4LogicalVolume* logicFrameVertical = new G4LogicalVolume(solidFrameVertical, m_MaterialAl, Name, 0, 0);
...@@ -142,13 +146,13 @@ void quadranMSQ25::VolumeMaker(G4int DetNumber, G4ThreeVector Det_pos, G4Rotatio ...@@ -142,13 +146,13 @@ void quadranMSQ25::VolumeMaker(G4int DetNumber, G4ThreeVector Det_pos, G4Rotatio
G4ThreeVector FrameLeftPosition = G4ThreeVector(0.5 * SiliconSize + 0.5 * (DetectorSize - SiliconSize) / 2, 0, 0); G4ThreeVector FrameLeftPosition = G4ThreeVector(0.5 * SiliconSize + 0.5 * (DetectorSize - SiliconSize) / 2, 0, 0);
G4ThreeVector FrameRightPosition = G4ThreeVector(-0.5 * SiliconSize - 0.5 * (DetectorSize - SiliconSize) / 2, 0, 0); G4ThreeVector FrameRightPosition = G4ThreeVector(-0.5 * SiliconSize - 0.5 * (DetectorSize - SiliconSize) / 2, 0, 0);
new G4PVPlacement(0, FrameTopPosition, logicFrameHorizontal, Name + "_Frame", logicquadranMSQ25, false, DetNumber); new G4PVPlacement(0, FrameTopPosition, logicFrameHorizontal, Name + "_FrameT", logicquadranMSQ25, false, DetNumber);
new G4PVPlacement(0, FrameBottomPosition, logicFrameHorizontal, Name + "_Frame", logicquadranMSQ25, false, DetNumber); new G4PVPlacement(0, FrameBottomPosition, logicFrameHorizontal, Name + "_FrameH", logicquadranMSQ25, false, DetNumber);
new G4PVPlacement(0, FrameLeftPosition, logicFrameVertical, Name + "_Frame", logicquadranMSQ25, false, DetNumber); new G4PVPlacement(0, FrameLeftPosition, logicFrameVertical, Name + "_FrameL", logicquadranMSQ25, false, DetNumber);
new G4PVPlacement(0, FrameRightPosition, logicFrameVertical, Name + "_Frame", logicquadranMSQ25, false, DetNumber); new G4PVPlacement(0, FrameRightPosition, logicFrameVertical, Name + "_FrameR", logicquadranMSQ25, false, DetNumber);
G4ThreeVector posAluFront = G4ThreeVector(0, 0, AluStripFront_PosZ); G4ThreeVector posAluFront = G4ThreeVector(0, 0, AluStripFront_PosZ);
G4ThreeVector posSi = G4ThreeVector(0, 0, 0); G4ThreeVector posSi = G4ThreeVector(0, 0, 0);
...@@ -162,7 +166,7 @@ void quadranMSQ25::VolumeMaker(G4int DetNumber, G4ThreeVector Det_pos, G4Rotatio ...@@ -162,7 +166,7 @@ void quadranMSQ25::VolumeMaker(G4int DetNumber, G4ThreeVector Det_pos, G4Rotatio
new G4PVPlacement(0, posAluBack, logicAlu, Name + "_AluBack", logicquadranMSQ25, true, DetNumber); new G4PVPlacement(0, posAluBack, logicAlu, Name + "_AluBack", logicquadranMSQ25, true, DetNumber);
G4Box* solidSi = new G4Box("quadranMSQ25", 0.5 * SiliconSize, 0.5 * SiliconSize, 0.5 * SiliconThickness); G4Box* solidSi = new G4Box("quadranMSQ25", 0.5 * SiliconSize, 0.5 * SiliconSize, 0.5 * thick);
G4LogicalVolume* logicSi = new G4LogicalVolume(solidSi, m_MaterialSilicon, "logicSi", 0, 0, 0); G4LogicalVolume* logicSi = new G4LogicalVolume(solidSi, m_MaterialSilicon, "logicSi", 0, 0, 0);
...@@ -187,8 +191,8 @@ void quadranMSQ25::ReadConfiguration(NPL::InputParser parser) { ...@@ -187,8 +191,8 @@ void quadranMSQ25::ReadConfiguration(NPL::InputParser parser) {
if (NPOptionManager::getInstance()->GetVerboseLevel()) if (NPOptionManager::getInstance()->GetVerboseLevel())
cout << "//// " << blocks.size() << " detectors found " << endl; cout << "//// " << blocks.size() << " detectors found " << endl;
vector<string> cart = {"A", "B", "C", "D"}; vector<string> cart = {"A", "B", "C", "D", "Thickness"};
vector<string> sphe = {"R", "THETA", "PHI", "BETA"}; vector<string> sphe = {"R", "THETA", "PHI", "BETA", "Thickness"};
for (unsigned int i = 0; i < blocks.size(); i++) { for (unsigned int i = 0; i < blocks.size(); i++) {
if (blocks[i]->HasTokenList(cart)) { if (blocks[i]->HasTokenList(cart)) {
...@@ -198,7 +202,8 @@ void quadranMSQ25::ReadConfiguration(NPL::InputParser parser) { ...@@ -198,7 +202,8 @@ void quadranMSQ25::ReadConfiguration(NPL::InputParser parser) {
G4ThreeVector B = NPS::ConvertVector(blocks[i]->GetTVector3("B", "mm")); G4ThreeVector B = NPS::ConvertVector(blocks[i]->GetTVector3("B", "mm"));
G4ThreeVector C = NPS::ConvertVector(blocks[i]->GetTVector3("C", "mm")); G4ThreeVector C = NPS::ConvertVector(blocks[i]->GetTVector3("C", "mm"));
G4ThreeVector D = NPS::ConvertVector(blocks[i]->GetTVector3("D", "mm")); G4ThreeVector D = NPS::ConvertVector(blocks[i]->GetTVector3("D", "mm"));
AddTelescope(A, B, C, D); G4double T = blocks[i]->GetDouble("Thickness", "um");
AddTelescope(A, B, C, D, T);
} }
else if (blocks[i]->HasTokenList(sphe)) { else if (blocks[i]->HasTokenList(sphe)) {
if (NPOptionManager::getInstance()->GetVerboseLevel()) if (NPOptionManager::getInstance()->GetVerboseLevel())
...@@ -207,7 +212,8 @@ void quadranMSQ25::ReadConfiguration(NPL::InputParser parser) { ...@@ -207,7 +212,8 @@ void quadranMSQ25::ReadConfiguration(NPL::InputParser parser) {
double Theta = blocks[i]->GetDouble("THETA", "deg"); double Theta = blocks[i]->GetDouble("THETA", "deg");
double Phi = blocks[i]->GetDouble("PHI", "deg"); double Phi = blocks[i]->GetDouble("PHI", "deg");
vector<double> beta = blocks[i]->GetVectorDouble("BETA", "deg"); vector<double> beta = blocks[i]->GetVectorDouble("BETA", "deg");
AddTelescope(R, Theta, Phi, beta[0], beta[1], beta[2]); G4double T = blocks[i]->GetDouble("Thickness", "um");
AddTelescope(R, Theta, Phi, beta[0], beta[1], beta[2], T);
} }
else { else {
cout << "ERROR: check your input file formatting " << endl; cout << "ERROR: check your input file formatting " << endl;
...@@ -296,7 +302,7 @@ void quadranMSQ25::ConstructDetector(G4LogicalVolume* world) { ...@@ -296,7 +302,7 @@ void quadranMSQ25::ConstructDetector(G4LogicalVolume* world) {
Det_pos = Det_w + CT; Det_pos = Det_w + CT;
} }
VolumeMaker(i + 1, Det_pos, Det_rot, world); VolumeMaker(i + 1, Det_pos, Det_rot, world, m_thickness[i]);
} }
delete Det_rot; delete Det_rot;
...@@ -335,14 +341,15 @@ void quadranMSQ25::ReadSensitive(const G4Event* event) { ...@@ -335,14 +341,15 @@ void quadranMSQ25::ReadSensitive(const G4Event* event) {
if (Energy > EnergyThreshold) { if (Energy > EnergyThreshold) {
double Time = Info[1]; double Time = Info[1];
int DetNbr = (int)Info[7]; int DetNbr = (int)Info[7];
int StripFront = (int)Info[8]; int striplength = (int)Info[8]-1;
int stripwidth = (int)Info[9]-1;
m_Event->SetEnergyDetectorNbr(DetNbr); m_Event->SetEnergyDetectorNbr(DetNbr);
m_Event->SetEnergyStripNbr(StripFront); m_Event->SetEnergyStripNbr(striplength*2+stripwidth);
m_Event->SetEnergy(RandGauss::shoot(Energy, ResoEnergy)); m_Event->SetEnergy(RandGauss::shoot(Energy, ResoEnergy));
m_Event->SetTimeDetectorNbr(DetNbr); m_Event->SetTimeDetectorNbr(DetNbr);
m_Event->SetTimeStripNbr(StripFront); m_Event->SetTimeStripNbr(striplength*2+stripwidth);
m_Event->SetTime(RandGauss::shoot(Time, ResoTime)); m_Event->SetTime(RandGauss::shoot(Time, ResoTime));
} }
} }
......
...@@ -45,13 +45,14 @@ using namespace CLHEP; ...@@ -45,13 +45,14 @@ using namespace CLHEP;
namespace quadranMSQ25_LOCAL{ namespace quadranMSQ25_LOCAL{
// Energy and time Resolution // Energy and time Resolution
const G4double ResoTime = 0 ; //unchecked const G4double ResoTime = 0 ; //unchecked
const G4double ResoEnergy = 0.043 ; //unchecked// = 150keV of Resolution // Unit is MeV/2.35 const G4double ResoEnergy = 1e-9 ; //unchecked// = 150keV of Resolution // Unit is MeV (sigma)
// const G4double ResoEnergy = 20e-3 ; //unchecked// = 150keV of Resolution // Unit is MeV (sigma)
const G4double EnergyThreshold = 100*keV; //unchecked const G4double EnergyThreshold = 100*keV; //unchecked
// Geometry // Geometry
const G4double DetectorSize = 70*mm ; const G4double DetectorSize = 71.12*mm ;
const G4double SiliconThickness = 500*micrometer ; const G4double SiliconThickness = 800*micrometer ;
const G4double FrameThickness = 3.2*mm ; const G4double FrameThickness = 3.2*mm ;
const G4double SiliconSize = 50*mm ; //unchecked const G4double SiliconSize = 50.8*mm ; //unchecked
const G4double AluThickness = 0.3*micrometer ; const G4double AluThickness = 0.3*micrometer ;
const G4int NumberOfStripH = 2 ; const G4int NumberOfStripH = 2 ;
const G4int NumberOfStripL = 2 ; const G4int NumberOfStripL = 2 ;
...@@ -77,21 +78,24 @@ public: ...@@ -77,21 +78,24 @@ public:
void AddTelescope( G4ThreeVector TL , void AddTelescope( G4ThreeVector TL ,
G4ThreeVector BL , G4ThreeVector BL ,
G4ThreeVector BR , G4ThreeVector BR ,
G4ThreeVector TR ); G4ThreeVector TR ,
G4double T );
// By Angle Method // By Angle Method
void AddTelescope( G4double R , void AddTelescope( G4double R ,
G4double Theta , G4double Theta ,
G4double Phi , G4double Phi ,
G4double beta_u , G4double beta_u ,
G4double beta_v , G4double beta_v ,
G4double beta_w ); G4double beta_w ,
G4double T );
// Effectively construct Volume // Effectively construct Volume
// Avoid to have two time same code for Angle and Point definition // Avoid to have two time same code for Angle and Point definition
void VolumeMaker( G4int DetectorNumber , void VolumeMaker( G4int DetectorNumber ,
G4ThreeVector MMpos , G4ThreeVector MMpos ,
G4RotationMatrix* MMrot , G4RotationMatrix* MMrot ,
G4LogicalVolume* world ); G4LogicalVolume* world ,
G4double thick );
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
...@@ -149,6 +153,8 @@ private: ...@@ -149,6 +153,8 @@ private:
private: private:
// True if Define by Position, False is Define by angle // True if Define by Position, False is Define by angle
vector<bool> m_DefinitionType ; vector<bool> m_DefinitionType ;
vector<G4double> m_thickness ;
// Used for "By Point Definition" // Used for "By Point Definition"
vector<G4ThreeVector> m_TL ; // Top Left Corner Position Vector vector<G4ThreeVector> m_TL ; // Top Left Corner Position Vector
......
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