From 2cb29b1cf28b23c5141835610562cb6e9500db52 Mon Sep 17 00:00:00 2001 From: Peter DeRosa <54421997+MagnusSnowleopard@users.noreply.github.com> Date: Fri, 14 Oct 2022 17:45:03 -0400 Subject: [PATCH] added BGOs, needs to be sensitive now --- .CloverDetectorConstruction.cc.swo | Bin 20480 -> 0 bytes .Detector_Parameters.hh.swp | Bin 12288 -> 0 bytes CloverDetectorConstruction.cc | 80 +++++++++++++++++++---------- Detector_Parameters.hh | 48 ++++++++--------- 4 files changed, 76 insertions(+), 52 deletions(-) delete mode 100644 .CloverDetectorConstruction.cc.swo delete mode 100644 .Detector_Parameters.hh.swp diff --git a/.CloverDetectorConstruction.cc.swo b/.CloverDetectorConstruction.cc.swo deleted file mode 100644 index e9833596d616c7df295953183561ddffdfa7169d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20480 zcmeHPZHy#E8E!cF5IjEs#b7k$5TIvnc4l^W_JBS1WN#Pd7Wa0So4vWcJMq%fU9;P6 zPxsK>vwO=4C59bI;E9RMlH=y;b$r`%z21RGZnyt}Bcvc;2ok=RU6LuRisaZLfb_QCi&R zE`5KJ$5_!@!+5S8E3{TNJX7}y4X<6`MmyQ?EQDe>hrIMRK`opNl?ciXyeI(9+Vlij3msRU99bW5P^ zH-@g;eqeNDxI{%)X5P;(z2rc5t@J&WKq`S$0;vR238WH8C6G!Wl|U+i|6vLEt!>KP z7~i?U81D=|&*}PnQ}BLE@Of8P`L^JFXYl#cuJYhD{YWK{N+6X$DuGl2sRU99q!LIa zkV+txKq`S$0;vT44HD1{>HA+o0RZIxL;wGcw<*fgz@xzTf$srd13nIX46uNMz!-2D za4GQGTNUM5;4$Dq;G@8C;6uO>U=p|y$N(1u7Xi<2SCpRtPXWh(bzlW}H*h)dleZ|! z6ToMHj{paNtAOpm#lR0QR+M{zPXPA-!@yrJ0x!UGz%#(Ffct=Zfm?vRzzFbO;0oY; z;Kes9${&CifG-0N0tTP~qrf&m0seBKqTCPM2iytF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HV2KegwdAZZqo0uOMLPRc@3`D;2=h0bo-DEWEi8!hD09;SNGKW#gH(!YnraNn~Y|Q z&eR~H5}xXvbUwq`oH(mRRA9zlGd)vYUJJ|{c9Q2z6kr$W(>ofwh@7#5m7v#`r9mT7 Y2}&%ydK}X^Csm$Z6gG{I4XR8338Auv*Z=?k diff --git a/.Detector_Parameters.hh.swp b/.Detector_Parameters.hh.swp deleted file mode 100644 index b1b499d4cf737cd1d74e1f2ef403ad491bdbe3fd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI2&5smC6u=9N2ULXM(XXc@f~L2+t3T!=t0b}*+yr4|$33`^NlkYRT}e;(*j+tj zS&?uj;Y>XF7jS{Z6P$?NJQ38ye?V`XIq-UVhU^$O(0jwYN`BMn>VEZJ{ieH;$<)Bv zSp5n*+-2AfGxp2+m*Jtuw_ka1h_SIUDzEyV)1o*W3vBIxkK?UEhXo%NC09|o82H0< zK>Jj7IZZMd74~T*Q{#W#J6Y-^vRBS*^uAc{*{D1vXtKP&CUZHe z3M+UVFOE-VWPl9pVxTm`rOrX-xx%ULIQroS@Ya!UcDb3l$p9H317v^-a zBJUt?Bh<(M86X2>fDDiUGC&6QY~X0sR2u1FH3UGIrG6yCbzI(=epgLgw=EH%E+JZb@YS+}CwM!s_B7@BL*@o9Z~09p?aytyE#7LZ z%&U|+mg@w(-T1qjK4BOfw7FK)%_vQQeGrJJI4anrwuFZ%Yj z^GrC-y4#vNtKLi7u0NsPFb-)s8mJsBFtIYyf^n=Z$W?-4P83{OiZm`EX{f3-18X@s*0^3r?X7#41fCu-)upqYJ=2b9T%?9NRnYHiIg(|nzbloF`fR UwofP7Kqjyub1iYPEO4QG3LQ|AWdHyG diff --git a/CloverDetectorConstruction.cc b/CloverDetectorConstruction.cc index 0449219..811d110 100644 --- a/CloverDetectorConstruction.cc +++ b/CloverDetectorConstruction.cc @@ -9,6 +9,7 @@ #include "G4Box.hh" #include "G4Tubs.hh" #include "G4Sphere.hh" +#include "G4Trd.hh" #include "G4IntersectionSolid.hh" #include "G4SubtractionSolid.hh" @@ -120,9 +121,19 @@ G4VPhysicalVolume* CloverDetectorConstruction::DefineVolumes() //Clover casing G4double caseXYInner = 2*(cutXY + 1.0) * mm; - G4double caseZInner = crystalLength/2 + 4 * mm + crystalLength + 15*mm; + G4double caseZInner = crystalLength/2 + crystalLength + 10*mm; G4double caseXYWallThickness = 3.0 * mm; G4double caseZWallThickness = 3.0 * mm; + + + //BGO Detector + + G4double bgoXYInner = 10*mm + 2*(cutXY + 1.0) * mm; + G4double bgoZInner = crystalLength/2 + 4 * mm + crystalLength + 15*mm; + G4double bgoXYWallThickness = 103.5 * mm; //from schematic + G4double bgoanglecut = 53 * mm; + + // Get materials auto backgroundMaterial = G4Material::GetMaterial("G4_AIR"); @@ -154,10 +165,6 @@ G4VPhysicalVolume* CloverDetectorConstruction::DefineVolumes() G4RotationMatrix * rotX = new G4RotationMatrix(); rotX->rotateX(90*degree); G4RotationMatrix * rotY = new G4RotationMatrix(); rotY->rotateY(90*degree); - //G4SubtractionSolid * pipe1 = new G4SubtractionSolid("Pipe1", pipe, pipe0, rotY, G4ThreeVector()); - - // G4LogicalVolume * pipe1LV = new G4LogicalVolume( pipe1, G4Material::GetMaterial("G4_Fe"), "Pipe"); - // G4LogicalVolume * pipe2LV = new G4LogicalVolume( pipe, G4Material::GetMaterial("G4_Fe"), "Pipe2"); G4LogicalVolume * chamberLV = new G4LogicalVolume(chamber, G4Material::GetMaterial("G4_Fe"),"targetchamber"); new G4PVPlacement( 0, // no rotation @@ -168,19 +175,8 @@ G4VPhysicalVolume* CloverDetectorConstruction::DefineVolumes() false, // no boolean operation 0, // copy number fCheckOverlaps); // checking overlaps - /* - new G4PVPlacement( rotY, // no rotation - G4ThreeVector(0, 0, pipeZPos), // at (0,0,0) - pipe2LV, // its logical volume - "Pipe2", // its name - worldLV, // its mother volume - false, // no boolean operation - 0, // copy number - fCheckOverlaps); // checking overlaps - */ - // pipe1LV->SetVisAttributes(new G4VisAttributes(G4Colour(1.0,1.0,1.0))); - // pipe2LV->SetVisAttributes(new G4VisAttributes(G4Colour(1.0,1.0,1.0))); - chamberLV->SetVisAttributes(new G4VisAttributes(G4Colour(1.0,1.0,1.0))); + + chamberLV->SetVisAttributes(new G4VisAttributes(G4Colour(1.0,1.0,1.0))); // Crystals @@ -197,8 +193,18 @@ G4VPhysicalVolume* CloverDetectorConstruction::DefineVolumes() G4Box* case2 = new G4Box("case2", (caseXYInner + caseXYWallThickness)/2. , (caseXYInner + caseXYWallThickness)/2., caseZInner + caseZWallThickness*2.); G4SubtractionSolid * casing = new G4SubtractionSolid("casing", case2, case1); + G4Box* bgo1 = new G4Box("bgo1", bgoXYInner/2., bgoXYInner/2., bgoZInner +10*mm); + + G4Trd* bgo2 = new G4Trd("bgo2", (bgoXYInner+ bgoXYWallThickness)/2. - bgoanglecut ,(bgoXYInner+ bgoXYWallThickness)/2. + , (bgoXYInner + bgoXYWallThickness)/2. - bgoanglecut, (bgoXYInner + bgoXYWallThickness)/2., bgoZInner); + //G4Box* bgo2 = new G4Box("bgo2", (bgoXYInner+ bgoXYWallThickness)/2., (bgoXYInner + bgoXYWallThickness)/2., bgoZInner + bgoZWallThickness*2.); + + G4SubtractionSolid * bgo = new G4SubtractionSolid("bgo", bgo2, bgo1); + + // creating the subtraction solid that will form the actual bgo sheild. - + + double dTheta,dPsi,zmod; for( G4int i = 0 ; i < fNumOfCrystal ; i++){ @@ -216,7 +222,7 @@ G4VPhysicalVolume* CloverDetectorConstruction::DefineVolumes() auto caseLV = new G4LogicalVolume * [fNumOfCrystal/4]; - // auto caseLV = new G4LogicalVolume(casing, G4Material::GetMaterial("G4_Al"), "Case")[i/4+1]; + auto bgoLV = new G4LogicalVolume * [fNumOfCrystal/4]; fLogicCrystal[i]->SetVisAttributes(crystalVisAtt); @@ -237,10 +243,13 @@ G4VPhysicalVolume* CloverDetectorConstruction::DefineVolumes() // if(iClover != DetNum){return 0;} - G4ThreeVector case_pos = G4ThreeVector(0,0,100*mm+crystalZPos + zmod); //The crystalZpos is the radius of the detectors. - + G4ThreeVector case_pos = G4ThreeVector(0,0,60*mm+crystalZPos + zmod); //The crystalZpos is the radius of the detector, + //bgo uses the same position vector and rotation matrix as the case + G4ThreeVector bgo_pos = G4ThreeVector(0,0,60*mm+crystalZPos + zmod); + //Set rotation matrix settings for clovers. + G4RotationMatrix * bgomat = new G4RotationMatrix(); G4RotationMatrix * rotmat = new G4RotationMatrix(); G4RotationMatrix * crystalmat= new G4RotationMatrix(); @@ -249,26 +258,30 @@ G4VPhysicalVolume* CloverDetectorConstruction::DefineVolumes() for(int j = 0; j <= iClover;j++){ if(j == iClover){ - // rotmat->rotateY(yangc *degree); - + + // rotation matrix must undo the operations you perform with the position vector. + + bgomat->rotateZ(-dPsi*degree); + bgomat->rotateX(-dTheta*degree); + rotmat->rotateZ(-dPsi*degree); rotmat->rotateX(-dTheta*degree); - // crystalmat->rotateY(yang*degree); crystalmat->rotateZ(-dPsi*degree); crystalmat->rotateX(-dTheta*degree); //rotate position vector based on iClover. - // pos.rotateY(dPhi*degree); pos.rotateX(dTheta*degree); pos.rotateZ(dPsi *degree); //set rotation for the detector case vector; - // case_pos.rotateY(dPhi*degree); case_pos.rotateX(dTheta *degree); case_pos.rotateZ(dPsi*degree); + + bgo_pos.rotateX(dTheta *degree); + bgo_pos.rotateZ(dPsi*degree); } } new G4PVPlacement( crystalmat, // orientation matrix @@ -283,7 +296,9 @@ G4VPhysicalVolume* CloverDetectorConstruction::DefineVolumes() if( jCrystal == 0 ) { caseLV[iClover] = new G4LogicalVolume(casing, G4Material::GetMaterial("G4_Al"), "Case"); - new G4PVPlacement( rotmat , // case orientation + bgoLV[iClover] = new G4LogicalVolume(bgo , G4Material::GetMaterial("G4_Al"), "BGO "); + + new G4PVPlacement( rotmat , // case orientation case_pos, // case location caseLV[i/4], // its logical volume "Casing", // its name @@ -292,7 +307,16 @@ G4VPhysicalVolume* CloverDetectorConstruction::DefineVolumes() iClover, // copy number fCheckOverlaps); // checking overlaps + new G4PVPlacement( bgomat , // bgo orientation + bgo_pos, // bgo location + bgoLV[i/4], // its logical volume + "Bgo", // its name + worldLV, // its mother volume + false, // no boolean operation + iClover, // copy number + fCheckOverlaps); // checking overlaps caseLV[iClover]->SetVisAttributes(new G4VisAttributes(G4Colour(1.0,1.0,0.0))); + bgoLV[iClover]->SetVisAttributes(new G4VisAttributes(G4Colour(0.,1.0,0.0))); } //Set a i+1%4 for each // diff --git a/Detector_Parameters.hh b/Detector_Parameters.hh index 851a2aa..295f129 100644 --- a/Detector_Parameters.hh +++ b/Detector_Parameters.hh @@ -9,33 +9,33 @@ #include #include - //location data array for each clover needs to be set here; - // clover number , theta, phi, relative z-distance to the Radius - // - - const double Clover_Location[16][4] = {{0,131.75,326.96,0.}, - {1,150.,243.57,0.}, - {2,90.0,257.14,0.}, - {3,90.0,205.71,0.}, - {4,48.25,326.68,0.}, - {5,48.25,252.64,0.}, - {6,131.75,33.31,0.}, - {7,150.,116.42,0.}, - {8,90.,102.85,0.}, - {9,90.,154.28,0.}, - {10,48.25,33.31,0.}, - {11,90.,308.57,0.}, - {12,90.,51.42,0.}, - {13,48.25,180.,0.}, - {14,129.,180.,0.}, - {15,48.25,107.35,0.}};//, - +const int Crystal_Num = 64; // has to be divisible by 4. + +const double Radius = 200.; //Z POSITION -- radius away from target, in milimeters. + //location data array for each clover needs to be set here; + // clover number , theta, phi, relative z-distance to the Radius + // + +const double Clover_Location[Crystal_Num/4][4] = {{0,131.75,326.96,0.}, + {1,150.,243.57,0.}, + {2,90.0,257.14,0.}, + {3,90.0,205.71,0.}, + {4,48.25,326.68,0.}, + {5,48.25,252.64,0.}, + {6,131.75,33.31,0.}, + {7,150.,116.42,0.}, + {8,90.,102.85,0.}, + {9,90.,154.28,0.}, + {10,48.25,33.31,0.}, + {11,90.,308.57,0.}, + {12,90.,51.42,0.}, + {13,48.25,180.,0.}, + {14,129.,180.,0.}, + {15,48.25,107.35,0.}};//, + - const int Crystal_Num = 64; // has to be divisible by 4. - - const double Radius = 200.; //Z POSITION -- radius away from target, in milimeters.