Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0"?>
<DDDefinition>
<debug>
<!--
<debug_shapes/>
<debug_includes/>
<debug_rotations/>
<debug_includes/>
<debug_volumes/>
<debug_constants/>
<debug_namespaces/>
<debug_placements/>
<debug_algorithms/>
<debug_materials/>
<debug_visattr/>
-->
</debug>

<open_geometry/>
<close_geometry/>

<IncludeSection>
<Include ref="Geometry/CMSCommonData/data/materials/2021/v1/materials.xml"/>
<Include ref="Geometry/CMSCommonData/data/rotations.xml"/>
<Include ref="Geometry/HGCalCommonData/test/cms.xml"/>
<Include ref="Geometry/HGCalCommonData/data/hgcalcell/vtest/hgcal.xml"/>
<Include ref="Geometry/HGCalCommonData/data/hgcalcell/vtest/hgcalcell.xml"/>
<Include ref="Geometry/HGCalCommonData/data/hgcalcell/vtest/hgcalpos.xml"/>
<Include ref="Geometry/HGCalCommonData/data/dd4hep/world.xml"/>
</IncludeSection>

</DDDefinition>

19 changes: 19 additions & 0 deletions Geometry/HGCalCommonData/data/hgcalcell/vtest/hgcal.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0"?>
<DDDefinition>

<ConstantsSection label="hgcal.xml" eval="true">
<Constant name="WaferSize" value="166.4408*mm"/>
<Constant name="WaferThickness" value="0.30*mm"/>
<Constant name="WaferThicknessFine" value="0.30*mm"/>
<Constant name="WaferThicknessCoarse1" value="0.20*mm"/>
<Constant name="WaferThicknessCoarse2" value="0.30*mm"/>
<Constant name="CellThicknessFine" value="0.12*mm"/>
<Constant name="CellThicknessCoarse1" value="0.20*mm"/>
<Constant name="CellThicknessCoarse2" value="0.30*mm"/>
<Constant name="NumberOfCellsFine" value="12"/>
<Constant name="NumberOfCellsCoarse" value="8"/>
</ConstantsSection>

</DDDefinition>


60 changes: 60 additions & 0 deletions Geometry/HGCalCommonData/data/hgcalcell/vtest/hgcalcell.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?xml version="1.0"?>
<DDDefinition>

<ConstantsSection label="hgcalcell.xml" eval="true">
<Constant name="WaferSize" value="[hgcal:WaferSize]"/>
<Constant name="WaferThicknessFine" value="[hgcal:WaferThicknessFine]"/>
<Constant name="WaferThicknessCoarse1" value="[hgcal:WaferThicknessCoarse1]"/>
<Constant name="WaferThicknessCoarse2" value="[hgcal:WaferThicknessCoarse2]"/>
<Constant name="CellThicknessFine" value="[hgcal:CellThicknessFine]"/>
<Constant name="CellThicknessCoarse1" value="[hgcal:CellThicknessCoarse1]"/>
<Constant name="CellThicknessCoarse2" value="[hgcal:CellThicknessCoarse2]"/>
<Constant name="NumberOfCellsFine" value="[hgcal:NumberOfCellsFine]"/>
<Constant name="NumberOfCellsCoarse" value="[hgcal:NumberOfCellsCoarse]"/>
</ConstantsSection>

<PosPartSection label="hgcalcell.xml" eval="true">
<Algorithm name="hgcal:DDHGCalCell">
<rParent name="hgcalwafer:HGCalCell"/>
<Numeric name="WaferSize" value="[WaferSize]"/>
<Numeric name="WaferThick" value="[WaferThicknessFine]"/>
<Numeric name="CellThick" value="[CellThicknessFine]"/>
<Numeric name="NCells" value="[NumberOfCellsFine]"/>
<Numeric name="PosSensitive" value="0"/>
<String name="Material" value="materials:Silicon"/>
<String name="FullCell" value="HGCalEECellFull0Fine"/>
<String name="FullSensitive" value="HGCalEESensitiveFull0Fine"/>
<Vector name="TruncatedCell" type="string" nEntries="6">
HGCalEECellTrunc01Fine, HGCalEECellTrunc02Fine,
HGCalEECellTrunc03Fine, HGCalEECellTrunc04Fine,
HGCalEECellTrunc05Fine, HGCalEECellTrunc06Fine</Vector>
<Vector name="TruncatedSensitive" type="string" nEntries="6">
HGCalEESensitiveTrunc01Fine, HGCalEESensitiveTrunc02Fine,
HGCalEESensitiveTrunc03Fine, HGCalEESensitiveTrunc04Fine,
HGCalEESensitiveTrunc05Fine, HGCalEESensitiveTrunc06Fine</Vector>
<Vector name="ExtendedCell" type="string" nEntries="6">
HGCalEECellExten01Fine, HGCalEECellExten02Fine,
HGCalEECellExten03Fine, HGCalEECellExten04Fine,
HGCalEECellExten05Fine, HGCalEECellExten06Fine</Vector>
<Vector name="ExtendedSensitive" type="string" nEntries="6">
HGCalEESensitiveExten01Fine, HGCalEESensitiveExten02Fine,
HGCalEESensitiveExten03Fine, HGCalEESensitiveExten04Fine,
HGCalEESensitiveExten05Fine, HGCalEESensitiveExten06Fine</Vector>
<Vector name="CornerCell" type="string" nEntries="12">
HGCalEECellCorner01Fine, HGCalEECellCorner02Fine,
HGCalEECellCorner03Fine, HGCalEECellCorner04Fine,
HGCalEECellCorner05Fine, HGCalEECellCorner06Fine,
HGCalEECellCorner07Fine, HGCalEECellCorner08Fine,
HGCalEECellCorner09Fine, HGCalEECellCorner10Fine,
HGCalEECellCorner11Fine, HGCalEECellCorner12Fine</Vector>
<Vector name="CornerSensitive" type="string" nEntries="12">
HGCalEESensitiveCorner01Fine, HGCalEESensitiveCorner02Fine,
HGCalEESensitiveCorner03Fine, HGCalEESensitiveCorner04Fine,
HGCalEESensitiveCorner05Fine, HGCalEESensitiveCorner06Fine,
HGCalEESensitiveCorner07Fine, HGCalEESensitiveCorner08Fine,
HGCalEESensitiveCorner09Fine, HGCalEESensitiveCorner10Fine,
HGCalEESensitiveCorner11Fine, HGCalEESensitiveCorner126Fine</Vector>
</Algorithm>
</PosPartSection>

</DDDefinition>
132 changes: 132 additions & 0 deletions Geometry/HGCalCommonData/data/hgcalcell/vtest/hgcalpos.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
<?xml version="1.0"?>
<DDDefinition>

<PosPartSection label="hgcalpos.xml">
<PosPart copyNumber="1">
<rParent name="cms:CMSE"/>
<rChild name="hgcalcell:HGCalEECellFull0Fine"/>
<Translation x="0.0*cm" y="6.0*cm" z="0*fm"/>
</PosPart>
<PosPart copyNumber="1">
<rParent name="cms:CMSE"/>
<rChild name="hgcalcell:HGCalEECellTrunc01Fine"/>
<Translation x="-7.5*cm" y="3.0*cm" z="0*fm"/>
</PosPart>
<PosPart copyNumber="1">
<rParent name="cms:CMSE"/>
<rChild name="hgcalcell:HGCalEECellTrunc02Fine"/>
<Translation x="-4.5*fm" y="3.0*cm" z="0*fm"/>
</PosPart>
<PosPart copyNumber="1">
<rParent name="cms:CMSE"/>
<rChild name="hgcalcell:HGCalEECellTrunc03Fine"/>
<Translation x="-1.5*cm" y="3.0*cm" z="0*fm"/>
</PosPart>
<PosPart copyNumber="1">
<rParent name="cms:CMSE"/>
<rChild name="hgcalcell:HGCalEECellTrunc04Fine"/>
<Translation x="1.5*cm" y="3.0*cm" z="0*fm"/>
</PosPart>
<PosPart copyNumber="1">
<rParent name="cms:CMSE"/>
<rChild name="hgcalcell:HGCalEECellTrunc05Fine"/>
<Translation x="4.5*cm" y="3.0*cm" z="0*fm"/>
</PosPart>
<PosPart copyNumber="1">
<rParent name="cms:CMSE"/>
<rChild name="hgcalcell:HGCalEECellTrunc06Fine"/>
<Translation x="7.5*cm" y="3.0*cm" z="0*fm"/>
</PosPart>
<PosPart copyNumber="1">
<rParent name="cms:CMSE"/>
<rChild name="hgcalcell:HGCalEECellExten01Fine"/>
<Translation x="-7.5*cm" y="0.0*cm" z="0*fm"/>
</PosPart>
<PosPart copyNumber="1">
<rParent name="cms:CMSE"/>
<rChild name="hgcalcell:HGCalEECellExten02Fine"/>
<Translation x="-4.5*cm" y="0.0*cm" z="0*fm"/>
</PosPart>
<PosPart copyNumber="1">
<rParent name="cms:CMSE"/>
<rChild name="hgcalcell:HGCalEECellExten03Fine"/>
<Translation x="-1.5*cm" y="0.0*cm" z="0*fm"/>
</PosPart>
<PosPart copyNumber="1">
<rParent name="cms:CMSE"/>
<rChild name="hgcalcell:HGCalEECellExten04Fine"/>
<Translation x="1.5*cm" y="0.0*cm" z="0*fm"/>
</PosPart>
<PosPart copyNumber="1">
<rParent name="cms:CMSE"/>
<rChild name="hgcalcell:HGCalEECellExten05Fine"/>
<Translation x="4.5*cm" y="0.0*cm" z="0*fm"/>
</PosPart>
<PosPart copyNumber="1">
<rParent name="cms:CMSE"/>
<rChild name="hgcalcell:HGCalEECellExten06Fine"/>
<Translation x="7.5*cm" y="0.0*cm" z="0*fm"/>
</PosPart>
<PosPart copyNumber="1">
<rParent name="cms:CMSE"/>
<rChild name="hgcalcell:HGCalEECellCorner01Fine"/>
<Translation x="-7.5*cm" y="-3.0*cm" z="0*fm"/>
</PosPart>
<PosPart copyNumber="1">
<rParent name="cms:CMSE"/>
<rChild name="hgcalcell:HGCalEECellCorner02Fine"/>
<Translation x="-4.5*cm" y="-3.0*cm" z="0*fm"/>
</PosPart>
<PosPart copyNumber="1">
<rParent name="cms:CMSE"/>
<rChild name="hgcalcell:HGCalEECellCorner03Fine"/>
<Translation x="-1.5*cm" y="-3.0*cm" z="0*fm"/>
</PosPart>
<PosPart copyNumber="1">
<rParent name="cms:CMSE"/>
<rChild name="hgcalcell:HGCalEECellCorner04Fine"/>
<Translation x="1.5*cm" y="-3.0*cm" z="0*fm"/>
</PosPart>
<PosPart copyNumber="1">
<rParent name="cms:CMSE"/>
<rChild name="hgcalcell:HGCalEECellCorner05Fine"/>
<Translation x="4.5*cm" y="-3.0*cm" z="0*fm"/>
</PosPart>
<PosPart copyNumber="1">
<rParent name="cms:CMSE"/>
<rChild name="hgcalcell:HGCalEECellCorner06Fine"/>
<Translation x="7.5*cm" y="-3.0*cm" z="0*fm"/>
</PosPart>
<PosPart copyNumber="1">
<rParent name="cms:CMSE"/>
<rChild name="hgcalcell:HGCalEECellCorner07Fine"/>
<Translation x="-7.5*cm" y="-6.0*cm" z="0*fm"/>
</PosPart>
<PosPart copyNumber="1">
<rParent name="cms:CMSE"/>
<rChild name="hgcalcell:HGCalEECellCorner08Fine"/>
<Translation x="-4.5*cm" y="-6.0*cm" z="0*fm"/>
</PosPart>
<PosPart copyNumber="1">
<rParent name="cms:CMSE"/>
<rChild name="hgcalcell:HGCalEECellCorner09Fine"/>
<Translation x="-1.5*cm" y="-6.0*cm" z="0*fm"/>
</PosPart>
<PosPart copyNumber="1">
<rParent name="cms:CMSE"/>
<rChild name="hgcalcell:HGCalEECellCorner10Fine"/>
<Translation x="1.5*cm" y="-6.0*cm" z="0*fm"/>
</PosPart>
<PosPart copyNumber="1">
<rParent name="cms:CMSE"/>
<rChild name="hgcalcell:HGCalEECellCorner11Fine"/>
<Translation x="4.5*cm" y="-6.0*cm" z="0*fm"/>
</PosPart>
<PosPart copyNumber="1">
<rParent name="cms:CMSE"/>
<rChild name="hgcalcell:HGCalEECellCorner12Fine"/>
<Translation x="7.5*cm" y="-6.0*cm" z="0*fm"/>
</PosPart>
</PosPartSection>

</DDDefinition>
1 change: 1 addition & 0 deletions Geometry/HGCalCommonData/data/hgcalwafer/v15f/hgcal.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<Constant name="CellThicknessCoarse2" value="0.30*mm"/>
<Constant name="NumberOfCellsFine" value="12"/>
<Constant name="NumberOfCellsCoarse" value="8"/>
<Constant name="LayerRotation" value="0*deg"/>
<Constant name="radMixL0" value="1537.05*mm"/>
<Constant name="radMixL1" value="1537.05*mm"/>
<Constant name="radMixL2" value="1537.05*mm"/>
Expand Down
36 changes: 19 additions & 17 deletions Geometry/HGCalCommonData/plugins/DDHGCalCell.cc
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,10 @@ void DDHGCalCell::execute(DDCompactView& cpv) {
double dy1 = r;
double dy2 = 0.5 * dy1;
double dy3 = 1.5 * dy1;
std::vector<double> xx = {dx1, dx2, -dx2, -dx1, -dx2, dx2, dx3, -dx4, -dx1, -dx1, -dx4, dx3};
std::vector<double> yy = {0, dy1, dy1, 0, -dy1, -dy1, dy2, dy3, dy1, -dy1, -dy3, -dy2};
std::vector<double> xx = {
dx1, dx2, -dx2, -dx1, -dx2, dx2, dx3, dx1, dx4, -dx4, -dx1, -dx3, -dx3, -dx1, -dx4, dx4, dx1, dx3};
std::vector<double> yy = {
0, dy1, dy1, 0, -dy1, -dy1, dy2, dy1, dy3, dy3, dy1, dy2, -dy2, -dy1, -dy3, -dy3, -dy1, -dy2};
double zpos = (posSens_ == 0) ? -0.5 * (waferT_ - cellT_) : 0.5 * (waferT_ - cellT_);
DDTranslation tran(0, 0, zpos);

Expand Down Expand Up @@ -143,11 +145,11 @@ void DDHGCalCell::execute(DDCompactView& cpv) {
<< tran << " with no rotation";
#endif

static constexpr int ir0[] = {0, 1, 0};
static constexpr int ir1[] = {1, 2, 1};
static constexpr int ir2[] = {2, 3, 3};
static constexpr int ir3[] = {3, 4, 4};
static constexpr int ir4[] = {5, 5, 5};
static constexpr int ir0[] = {0, 1, 0, 1, 3, 5};
static constexpr int ir1[] = {1, 2, 1, 2, 4, 0};
static constexpr int ir2[] = {2, 3, 3, 3, 5, 1};
static constexpr int ir3[] = {3, 4, 4, 4, 0, 2};
static constexpr int ir4[] = {5, 5, 5, 0, 2, 4};
for (unsigned int i = 0; i < truncCN_.size(); ++i) {
std::vector<double> xw = {xx[ir0[i]], xx[ir1[i]], xx[ir2[i]], xx[ir3[i]], xx[ir4[i]]};
std::vector<double> yw = {yy[ir0[i]], yy[ir1[i]], yy[ir2[i]], yy[ir3[i]], yy[ir4[i]]};
Expand Down Expand Up @@ -178,11 +180,11 @@ void DDHGCalCell::execute(DDCompactView& cpv) {
#endif
}

static constexpr int ie0[] = {1, 5, 0};
static constexpr int ie1[] = {2, 6, 1};
static constexpr int ie2[] = {3, 7, 8};
static constexpr int ie3[] = {10, 3, 9};
static constexpr int ie4[] = {11, 4, 5};
static constexpr int ie0[] = {1, 5, 0, 2, 4, 0};
static constexpr int ie1[] = {2, 6, 1, 3, 5, 1};
static constexpr int ie2[] = {3, 9, 10, 4, 0, 2};
static constexpr int ie3[] = {14, 3, 13, 16, 8, 12};
static constexpr int ie4[] = {17, 4, 5, 7, 11, 15};
for (unsigned int i = 0; i < extenCN_.size(); ++i) {
std::vector<double> xw = {xx[ie0[i]], xx[ie1[i]], xx[ie2[i]], xx[ie3[i]], xx[ie4[i]]};
std::vector<double> yw = {yy[ie0[i]], yy[ie1[i]], yy[ie2[i]], yy[ie3[i]], yy[ie4[i]]};
Expand Down Expand Up @@ -213,11 +215,11 @@ void DDHGCalCell::execute(DDCompactView& cpv) {
#endif
}

static constexpr int ic0[] = {0, 1, 1, 1, 1, 0};
static constexpr int ic1[] = {1, 2, 2, 7, 3, 1};
static constexpr int ic2[] = {8, 3, 3, 3, 4, 3};
static constexpr int ic3[] = {3, 5, 10, 4, 5, 9};
static constexpr int ic4[] = {5, 11, 5, 5, 6, 5};
static constexpr int ic0[] = {0, 1, 1, 1, 1, 0, 1, 2, 3, 4, 5, 0};
static constexpr int ic1[] = {1, 2, 2, 9, 3, 1, 2, 3, 4, 5, 0, 1};
static constexpr int ic2[] = {10, 3, 3, 3, 4, 3, 12, 5, 16, 0, 8, 2};
static constexpr int ic3[] = {3, 5, 14, 4, 5, 13, 4, 0, 0, 2, 2, 4};
static constexpr int ic4[] = {5, 17, 5, 5, 6, 5, 0, 7, 2, 11, 4, 15};
for (unsigned int i = 0; i < cornrCN_.size(); ++i) {
std::vector<double> xw = {xx[ic0[i]], xx[ic1[i]], xx[ic2[i]], xx[ic3[i]], xx[ic4[i]]};
std::vector<double> yw = {yy[ic0[i]], yy[ic1[i]], yy[ic2[i]], yy[ic3[i]], yy[ic4[i]]};
Expand Down
Loading