Skip to content

Commit 5c52a4b

Browse files
authored
Fixing the FOCAL-E pad geometry (#13764)
1 parent f8c8cd5 commit 5c52a4b

File tree

3 files changed

+25
-23
lines changed

3 files changed

+25
-23
lines changed

Detectors/FOCAL/simulation/data/simcuts.dat

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
FOC 0 5.e-5 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4 -1. -1 -1 -1 -1 1 -1 3 -1 -1 -1 -1 -1
77
* Si sensor
88
FOC 1 1.e-5 1.e-5 1.e-5 1.e-5 1.e-5 1.e-5 1.e-5 1.e-5 1.e-5 -1. -1 -1 -1 -1 1 -1 1 -1 -1 -1 -1 -1
9+
* Si pixel
10+
FOC 2 1.e-5 1.e-5 1.e-5 1.e-5 1.e-5 1.e-5 1.e-5 1.e-5 1.e-5 -1. -1 -1 -1 -1 1 -1 1 -1 -1 -1 -1 -1
911
* G10 plate
10-
FOC 2 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4 -1. -1 -1 -1 -1 1 -1 3 -1 -1 -1 -1 -1
12+
FOC 3 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4 -1. -1 -1 -1 -1 1 -1 3 -1 -1 -1 -1 -1
1113
* Alloy
12-
FOC 5 5.e-5 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4 -1. -1 -1 -1 -1 1 -1 3 -1 -1 -1 -1 -1
14+
FOC 6 5.e-5 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4 -1. -1 -1 -1 -1 1 -1 3 -1 -1 -1 -1 -1
1315
* Aluminium
14-
FOC 10 5.e-5 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4 -1. -1 -1 -1 -1 1 -1 3 -1 -1 -1 -1 -1
15-
* G10 plate
16-
FOC 12 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4 -1. -1 -1 -1 -1 1 -1 3 -1 -1 -1 -1 -1
16+
FOC 11 5.e-5 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4 -1. -1 -1 -1 -1 1 -1 3 -1 -1 -1 -1 -1

Detectors/FOCAL/simulation/geometryFiles/geometry_Spaghetti.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ COMMAND_INSERT_PIX_AT_L9
5858
GLOBAL_TOWER_TOL 0. Air
5959
GLOBAL_TOWER_TOLX 0.02 Air
6060
GLOBAL_TOWER_TOLY 0.8 Al
61-
GLOBAL_FOCAL_Z 764.47
61+
GLOBAL_FOCAL_Z 763.5
6262
GLOBAL_Tower_NX 2
6363
GLOBAL_Tower_NY 11
6464
GLOBAL_MIDDLE_TOWER_OFFSET 5

Detectors/FOCAL/simulation/src/Detector.cxx

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ void Detector::addAlignableVolumes() const
406406
//____________________________________________________________________________
407407
void Detector::addAlignableVolumesHCAL() const
408408
{
409-
const std::string vpsector = "/cave_1/caveRB24_1/FOCAL_1/HCAL_1";
409+
const std::string vpsector = "/cave_1/barrel_1/FOCAL_1/HCAL_1";
410410
const std::string snsector = "FOCAL/HCAL";
411411

412412
if (!gGeoManager->SetAlignableEntry(snsector.c_str(), vpsector.c_str())) {
@@ -417,7 +417,7 @@ void Detector::addAlignableVolumesHCAL() const
417417
//____________________________________________________________________________
418418
void Detector::addAlignableVolumesECAL() const
419419
{
420-
const std::string vpsector = "/cave_1/caveRB24_1/FOCAL_1/ECAL_1";
420+
const std::string vpsector = "/cave_1/barrel_1/FOCAL_1/ECAL_1";
421421
const std::string snsector = "FOCAL/ECAL";
422422

423423
if (!gGeoManager->SetAlignableEntry(snsector.c_str(), vpsector.c_str())) {
@@ -485,8 +485,8 @@ void Detector::ConstructGeometry()
485485
} else {
486486
CreateHCALSpaghetti();
487487
}
488-
const float z0 = 1312.5; // center of caveRB24 mother volume
489-
TVirtualMC::GetMC()->Gspos("FOCAL", 1, "caveRB24", 0, 0, mGeometry->getFOCALZ0() - (mGeometry->getInsertFrontPadLayers() ? 2.0 : 0.0) + (mGeometry->getInsertHCalReadoutMaterial() ? 1.5 : 0.0) - z0, 0, "ONLY");
488+
// const float z0 = 1312.5; // center of barrel mother volume
489+
TVirtualMC::GetMC()->Gspos("FOCAL", 1, "barrel", 0, 30., mGeometry->getFOCALZ0() - (mGeometry->getInsertFrontPadLayers() ? 2.0 : 0.0) + (mGeometry->getInsertHCalReadoutMaterial() ? 1.5 : 0.0), 0, "ONLY");
490490
}
491491

492492
void Detector::CreateHCALSpaghetti()
@@ -795,8 +795,8 @@ void Detector::CreateECALGeometry()
795795
// gMC->Gsvolu("EMSC1", "BOX", idtmed[3698], pars, 4);//Left towers (pixels shifted right)
796796
// gMC->Gsvolu("EMSC2", "BOX", idtmed[3698], pars, 4);//Right towers (pixels shifted left)
797797

798-
TVirtualMC::GetMC()->Gsvolu("EMSC1", "BOX", ID_AIR, pars, 4); // Left towers (pixels shifted right)
799-
TVirtualMC::GetMC()->Gsvolu("EMSC2", "BOX", ID_AIR, pars, 4); // Right towers (pixels shifted left)
798+
TVirtualMC::GetMC()->Gsvolu("EMSC1", "BOX", getMediumID(ID_AIR), pars, 4); // Left towers (pixels shifted right)
799+
TVirtualMC::GetMC()->Gsvolu("EMSC2", "BOX", getMediumID(ID_AIR), pars, 4); // Right towers (pixels shifted left)
800800
// mSensitiveECALPad.push_back("EMSC1");
801801
// mSensitiveECALPad.push_back("EMSC2");
802802
mSensitive.push_back("EMSC1");
@@ -816,7 +816,7 @@ void Detector::CreateECALGeometry()
816816

817817
if (icomp->material() == "PureW") {
818818
// TVirtualMC::GetMC()->Gsvolu("EW1", "BOX", idtmed[3599], pars, 4);
819-
TVirtualMC::GetMC()->Gsvolu("EW1", "BOX", ID_TUNGSTEN, pars, 4);
819+
TVirtualMC::GetMC()->Gsvolu("EW1", "BOX", getMediumID(ID_TUNGSTEN), pars, 4);
820820
// mSensitiveECALPad.push_back("EW1");
821821
mSensitive.push_back("EW1");
822822
gGeoManager->GetVolume("EW1")->SetLineColor(kBlue);
@@ -827,7 +827,7 @@ void Detector::CreateECALGeometry()
827827
}
828828
if (icomp->material() == "Alloy") {
829829
// TVirtualMC::GetMC()->Gsvolu("EW1", "BOX", idtmed[3604], pars, 4);
830-
TVirtualMC::GetMC()->Gsvolu("EW1", "BOX", ID_ALLOY, pars, 4);
830+
TVirtualMC::GetMC()->Gsvolu("EW1", "BOX", getMediumID(ID_ALLOY), pars, 4);
831831
// mSensitiveECALPad.push_back("EW1");
832832
mSensitive.push_back("EW1");
833833
TVirtualMC::GetMC()->Gspos("EW1", icomp->id() + 1, "EMSC1",
@@ -838,7 +838,7 @@ void Detector::CreateECALGeometry()
838838

839839
if (icomp->material() == "G10") {
840840
// TVirtualMC::GetMC()->Gsvolu("G10RO1", "BOX", idtmed[3601], pars, 4);
841-
TVirtualMC::GetMC()->Gsvolu("G10RO1", "BOX", ID_G10, pars, 4);
841+
TVirtualMC::GetMC()->Gsvolu("G10RO1", "BOX", getMediumID(ID_G10), pars, 4);
842842
// mSensitiveECALPad.push_back("G10RO1");
843843
mSensitive.push_back("G10RO1");
844844
gGeoManager->GetVolume("G10RO1")->SetLineColor(kGreen);
@@ -850,7 +850,7 @@ void Detector::CreateECALGeometry()
850850

851851
if (icomp->material() == "Cu") {
852852
// TVirtualMC::GetMC()->Gsvolu("EWCU", "BOX", idtmed[3602], pars, 4);
853-
TVirtualMC::GetMC()->Gsvolu("EWCU", "BOX", ID_COPPER, pars, 4);
853+
TVirtualMC::GetMC()->Gsvolu("EWCU", "BOX", getMediumID(ID_COPPER), pars, 4);
854854
// mSensitiveECALPad.push_back("EWCU");
855855
mSensitive.push_back("EWCU");
856856
gGeoManager->GetVolume("EWCU")->SetLineColor(kViolet);
@@ -862,7 +862,7 @@ void Detector::CreateECALGeometry()
862862

863863
if (icomp->material() == "Air") {
864864
// TVirtualMC::GetMC()->Gsvolu("EWAIR1", "BOX", idtmed[3698], pars, 4);
865-
TVirtualMC::GetMC()->Gsvolu("EWAIR1", "BOX", ID_AIR, pars, 4);
865+
TVirtualMC::GetMC()->Gsvolu("EWAIR1", "BOX", getMediumID(ID_AIR), pars, 4);
866866
// mSensitiveECALPad.push_back("EWAIR1");
867867
mSensitive.push_back("EWAIR1");
868868
gGeoManager->GetVolume("EWAIR1")->SetLineColor(kGray);
@@ -874,7 +874,7 @@ void Detector::CreateECALGeometry()
874874

875875
if (icomp->material() == "Ceramic") {
876876
// TVirtualMC::GetMC()->Gsvolu("EWAIR1", "BOX", idtmed[3607], pars, 4);
877-
TVirtualMC::GetMC()->Gsvolu("EWAIR1", "BOX", ID_CERAMIC, pars, 4);
877+
TVirtualMC::GetMC()->Gsvolu("EWAIR1", "BOX", getMediumID(ID_CERAMIC), pars, 4);
878878
// mSensitiveECALPad.push_back("EWAIR1");
879879
mSensitive.push_back("EWAIR1");
880880
TVirtualMC::GetMC()->Gspos("EWAIR1", icomp->id() + 1, "EMSC1",
@@ -885,7 +885,7 @@ void Detector::CreateECALGeometry()
885885

886886
if (icomp->material() == "SiPad") {
887887
// TVirtualMC::GetMC()->Gsvolu("EWSIPAD1", "BOX", idtmed[3600], pars, 4);
888-
TVirtualMC::GetMC()->Gsvolu("EWSIPAD1", "BOX", ID_SIPAD, pars, 4);
888+
TVirtualMC::GetMC()->Gsvolu("EWSIPAD1", "BOX", getMediumID(ID_SIPAD), pars, 4);
889889
// mSensitiveECALPad.push_back("EWSIPAD1");
890890
mSensitive.push_back("EWSIPAD1");
891891
gGeoManager->GetVolume("EWSIPAD1")->SetLineColor(kOrange - 7);
@@ -900,7 +900,7 @@ void Detector::CreateECALGeometry()
900900
// Pixels (sensitive layer)
901901
if (icomp->material() == "SiPix") {
902902
// TVirtualMC::GetMC()->Gsvolu("EWSIPIX1", "BOX", idtmed[3600], pars, 4);
903-
TVirtualMC::GetMC()->Gsvolu("EWSIPIX1", "BOX", ID_SIPIX, pars, 4);
903+
TVirtualMC::GetMC()->Gsvolu("EWSIPIX1", "BOX", getMediumID(ID_SIPIX), pars, 4);
904904
// mSensitiveECALPix.push_back("EWSIPIX1");
905905
mSensitive.push_back("EWSIPIX1");
906906
gGeoManager->GetVolume("EWSIPIX1")->SetLineColor(kPink);
@@ -915,7 +915,7 @@ void Detector::CreateECALGeometry()
915915
// Passive silicon
916916
if (icomp->material() == "Si") {
917917
// TVirtualMC::GetMC()->Gsvolu("EWSI1", "BOX", idtmed[3610], pars, 4);
918-
TVirtualMC::GetMC()->Gsvolu("EWSI1", "BOX", ID_SIINSENS, pars, 4);
918+
TVirtualMC::GetMC()->Gsvolu("EWSI1", "BOX", getMediumID(ID_SIINSENS), pars, 4);
919919
// mSensitiveECALPix.push_back("EWSI1");
920920
mSensitive.push_back("EWSI1");
921921
gGeoManager->GetVolume("EWSI1")->SetLineColor(kPink);
@@ -954,7 +954,7 @@ void Detector::CreateECALGeometry()
954954
fcal_pars[3] = 0.;
955955

956956
// TVirtualMC::GetMC()->Gsvolu("ECAL", "BOX", idtmed[3698], fcal_pars, 4);
957-
TVirtualMC::GetMC()->Gsvolu("ECAL", "BOX", ID_AIR, fcal_pars, 4);
957+
TVirtualMC::GetMC()->Gsvolu("ECAL", "BOX", getMediumID(ID_AIR), fcal_pars, 4);
958958
// mSensitiveECALPad.push_back("ECAL");
959959
mSensitive.push_back("ECAL");
960960

@@ -964,7 +964,9 @@ void Detector::CreateECALGeometry()
964964
TGeoVolume* volumeSiPad = new TGeoVolume("volSiPad", siPadBox, gGeoManager->GetMedium(getMediumID(ID_SIPAD)));
965965
volumeSiPad->SetLineColor(kOrange + 7);
966966
// mSensitiveECALPad.push_back(volumeSiPad->GetName());
967-
mSensitive.push_back(volumeSiPad->GetName());
967+
if (geom->getInsertFrontPadLayers()) {
968+
mSensitive.push_back(volumeSiPad->GetName());
969+
}
968970

969971
double xp, yp, zp;
970972
int itowerx, itowery;

0 commit comments

Comments
 (0)