Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Reference Detector
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
EIC
detectors
Reference Detector
Commits
9e5b1e0c
Commit
9e5b1e0c
authored
4 years ago
by
Whitney Armstrong
Browse files
Options
Downloads
Patches
Plain Diff
new file: ecal.xml
new file: ../src/cb_EMCAL.cpp
parent
2938d597
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
compact/ecal.xml
+182
-0
182 additions, 0 deletions
compact/ecal.xml
src/cb_EMCAL.cpp
+103
-0
103 additions, 0 deletions
src/cb_EMCAL.cpp
with
285 additions
and
0 deletions
compact/ecal.xml
0 → 100644
+
182
−
0
View file @
9e5b1e0c
<lccdd>
<define>
<constant
name=
"CrystalEndcap_rmin"
value=
"VertexTrackerInnerRadius"
/>
<constant
name=
"CrystalEndcap_rmax"
value=
"EcalEndcapN_rmin"
/>
<constant
name=
"CrystalBox_x_length"
value=
"20.0*mm"
/>
<constant
name=
"CrystalBox_y_length"
value=
"20.0*mm"
/>
<constant
name=
"CrystalBox_z_length"
value=
"200.0*mm"
/>
<constant
name=
"CrystalBox_offset"
value=
"0.000001*mm"
/>
<constant
name=
"CrystalEndcap_x_pos"
value=
"0.0*m"
/>
<constant
name=
"CrystalEndcap_y_pos"
value=
"0.0*m"
/>
<constant
name=
"CrystalEndcap_z_pos"
value=
"-EcalEndcap_zmin"
/>
</define>
<limits>
</limits>
<regions>
</regions>
<!-- Common Generic visualization attributes -->
<comment>
Common Generic visualization attributes
</comment>
<display>
</display>
<detectors>
<comment>
---------------------
Barrel EM Calorimeter
---------------------
A layered EM calorimeter with tungsten and silicon (or scintillator) strips
</comment>
<detector
id=
"ECalBarrel_ID"
name=
"EcalBarrel"
type=
"DD4hep_EcalBarrel"
readout=
"EcalBarrelHits"
calorimeterType=
"EM_BARREL"
>
<dimensions
numsides=
"CaloSides"
rmin=
"EcalBarrel_rmin"
z=
"EcalBarrelLength"
/>
<staves
vis=
"EcalBarrelVis"
/>
<layer
repeat=
"1"
>
<slice
material=
"Silicon"
thickness=
"EcalSiliconThickness"
sensitive=
"yes"
limits=
"cal_limits"
/>
<slice
material=
"Copper"
thickness=
"EcalCopperThickness"
/>
<slice
material=
"Kapton"
thickness=
"EcalKaptonThickness"
/>
<slice
material=
"Air"
thickness=
"EcalAir1Thickness"
/>
</layer>
<layer
repeat=
"EcalBarrelThinLayers"
>
<slice
material=
"TungstenDens24"
thickness=
"EcalThinTungstenThickness"
/>
<slice
material=
"Air"
thickness=
"EcalAir2Thickness"
/>
<slice
material=
"Silicon"
thickness=
"EcalSiliconThickness"
sensitive=
"yes"
limits=
"cal_limits"
/>
<slice
material=
"Copper"
thickness=
"EcalCopperThickness"
/>
<slice
material=
"Kapton"
thickness=
"EcalKaptonThickness"
/>
<slice
material=
"Air"
thickness=
"EcalAir1Thickness"
/>
</layer>
<layer
repeat=
"EcalBarrelThickLayers"
>
<slice
material=
"TungstenDens24"
thickness=
"EcalThickTungstenThickness"
/>
<slice
material=
"Air"
thickness=
"EcalAir2Thickness"
/>
<slice
material=
"Silicon"
thickness=
"EcalSiliconThickness"
sensitive=
"yes"
limits=
"cal_limits"
/>
<slice
material=
"Copper"
thickness=
"EcalCopperThickness"
/>
<slice
material=
"Kapton"
thickness=
"EcalKaptonThickness"
/>
<slice
material=
"Air"
thickness=
"EcalAir1Thickness"
/>
</layer>
</detector>
<comment>
-----------------------------
Forward Endcap EM Calorimeter
-----------------------------
A layered EM calorimeter with tungsten and silicon (or scintillator) strips
</comment>
<detector
id=
"ECalEndcapP_ID"
name=
"EcalEndcapP"
type=
"DD4hep_PolyhedraEndcapCalorimeter2"
reflect=
"false"
readout=
"EcalEndcapHits"
vis=
"EcalEndcapVis"
calorimeterType=
"EM_ENDCAP"
>
<dimensions
numsides=
"CaloSides"
zmin=
"EcalEndcap_zmin"
rmin=
"EcalEndcapP_rmin"
rmax=
"EcalBarrel_rmax "
/>
<layer
repeat=
"1"
>
<slice
material=
"Silicon"
thickness=
"EcalSiliconThickness"
sensitive=
"yes"
limits=
"cal_limits"
/>
<slice
material=
"Copper"
thickness=
"EcalCopperThickness"
/>
<slice
material=
"Kapton"
thickness=
"EcalKaptonThickness"
/>
<slice
material=
"Air"
thickness=
"EcalAir1Thickness"
/>
</layer>
<layer
repeat=
"EcalEndcapThinLayers"
>
<slice
material=
"TungstenDens24"
thickness=
"EcalThinTungstenThickness"
/>
<slice
material=
"Air"
thickness=
"EcalAir2Thickness"
/>
<slice
material=
"Silicon"
thickness=
"EcalSiliconThickness"
sensitive=
"yes"
limits=
"cal_limits"
/>
<slice
material=
"Copper"
thickness=
"EcalCopperThickness"
/>
<slice
material=
"Kapton"
thickness=
"EcalKaptonThickness"
/>
<slice
material=
"Air"
thickness=
"EcalAir1Thickness"
/>
</layer>
<layer
repeat=
"EcalEndcapThickLayers"
>
<slice
material=
"TungstenDens24"
thickness=
"EcalThickTungstenThickness"
/>
<slice
material=
"Air"
thickness=
"EcalAir2Thickness"
/>
<slice
material=
"Silicon"
thickness=
"EcalSiliconThickness"
sensitive=
"yes"
limits=
"cal_limits"
/>
<slice
material=
"Copper"
thickness=
"EcalCopperThickness"
/>
<slice
material=
"Kapton"
thickness=
"EcalKaptonThickness"
/>
<slice
material=
"Air"
thickness=
"EcalAir1Thickness"
/>
</layer>
</detector>
<comment>
-------------------------------
Backwards Endcap EM Calorimeter
-------------------------------
A layered EM calorimeter with tungsten and silicon (or scintillator) strips
</comment>
<detector
id=
"ECalEndcapN_ID"
name=
"EcalEndcapN"
type=
"topside_PolyhedraEndcapCalorimeter2"
reflect=
"true"
readout=
"EcalEndcapHits"
vis=
"EcalEndcapVis"
calorimeterType=
"EM_ENDCAP"
>
<dimensions
numsides=
"CaloSides"
zmin=
"EcalEndcap_zmin"
rmin=
"EcalEndcapN_rmin"
rmax=
"EcalBarrel_rmax "
/>
<layer
repeat=
"1"
>
<slice
material=
"Silicon"
thickness=
"EcalSiliconThickness"
sensitive=
"yes"
limits=
"cal_limits"
/>
<slice
material=
"Copper"
thickness=
"EcalCopperThickness"
/>
<slice
material=
"Kapton"
thickness=
"EcalKaptonThickness"
/>
<slice
material=
"Air"
thickness=
"EcalAir1Thickness"
/>
</layer>
<layer
repeat=
"EcalEndcapThinLayers"
>
<slice
material=
"TungstenDens24"
thickness=
"EcalThinTungstenThickness"
/>
<slice
material=
"Air"
thickness=
"EcalAir2Thickness"
/>
<slice
material=
"Silicon"
thickness=
"EcalSiliconThickness"
sensitive=
"yes"
limits=
"cal_limits"
/>
<slice
material=
"Copper"
thickness=
"EcalCopperThickness"
/>
<slice
material=
"Kapton"
thickness=
"EcalKaptonThickness"
/>
<slice
material=
"Air"
thickness=
"EcalAir1Thickness"
/>
</layer>
<layer
repeat=
"EcalEndcapThickLayers"
>
<slice
material=
"TungstenDens24"
thickness=
"EcalThickTungstenThickness"
/>
<slice
material=
"Air"
thickness=
"EcalAir2Thickness"
/>
<slice
material=
"Silicon"
thickness=
"EcalSiliconThickness"
sensitive=
"yes"
limits=
"cal_limits"
/>
<slice
material=
"Copper"
thickness=
"EcalCopperThickness"
/>
<slice
material=
"Kapton"
thickness=
"EcalKaptonThickness"
/>
<slice
material=
"Air"
thickness=
"EcalAir1Thickness"
/>
</layer>
</detector>
</detectors>
<!-- Definition of the readout segmentation/definition -->
<readouts>
<!--
<readout name="PlaneTrackerHits">
<segmentation type="CartesianGridXY" grid_size_x="20.0*mm" grid_size_y="20.0*mm" />
<id>system:5,module:4,x:32:-16,y:-16</id>
</readout>
-->
<readout
name=
"CrystalEcalHits"
>
<segmentation
type=
"CartesianGridXY"
grid_size_x=
"CrystalBox_x_length"
grid_size_y=
"CrystalBox_y_length"
/>
<id>
system:8,sector:4,module:20,x:48:-8,y:-8
</id>
</readout>
<readout
name=
"EcalBarrelHits"
>
<segmentation
type=
"CartesianGridXY"
grid_size_x=
"3.5 * mm"
grid_size_y=
"3.5 * mm"
/>
<id>
system:8,barrel:3,module:4,layer:6,slice:5,x:32:-16,y:-16
</id>
</readout>
<readout
name=
"EcalEndcapHits"
>
<segmentation
type=
"CartesianGridXY"
grid_size_x=
"3.5 * mm"
grid_size_y=
"3.5 * mm"
/>
<id>
system:8,barrel:3,module:4,layer:6,slice:5,x:32:-16,y:-16
</id>
</readout>
</readouts>
<plugins>
</plugins>
<fields>
</fields>
</lccdd>
This diff is collapsed.
Click to expand it.
src/cb_EMCAL.cpp
0 → 100644
+
103
−
0
View file @
9e5b1e0c
#include
<XML/Helper.h>
using
namespace
dd4hep
;
static
Ref_t
createDetector
(
Detector
&
desc
,
xml_h
handle
,
SensitiveDetector
sens
)
{
xml
::
DetElement
detElem
=
handle
;
std
::
string
detName
=
detElem
.
nameStr
();
int
detID
=
detElem
.
id
();
xml
::
Component
dims
=
detElem
.
dimensions
();
double
rInner
=
dims
.
inner_radius
();
double
rMin
=
dims
.
rmin
();
double
thickness
=
dims
.
thickness
();
double
innerZ
=
dims
.
inner_z
();
double
angle
=
dims
.
angle
();
Material
mat
=
desc
.
material
(
detElem
.
materialStr
());
Tube
outerTubeShape
(
rMin
,
rInner
+
thickness
,
innerZ
+
thickness
);
Tube
innerTubeShape
(
0
,
rInner
,
innerZ
);
SubtractionSolid
unchamferedShape
(
outerTubeShape
,
innerTubeShape
);
Cone
chamferShape
(
thickness
,
0
,
rMin
,
0
,
rMin
+
2
*
tan
(
angle
)
*
thickness
);
SubtractionSolid
detShape
(
unchamferedShape
,
chamferShape
,
Position
(
0
,
0
,
innerZ
+
thickness
));
Volume
detVol
(
detName
,
detShape
,
mat
);
detVol
.
setVisAttributes
(
desc
.
visAttributes
(
detElem
.
visStr
()));
DetElement
det
(
detName
,
detID
);
Volume
motherVol
=
desc
.
pickMotherVolume
(
det
);
PlacedVolume
detPV
=
motherVol
.
placeVolume
(
detVol
);
det
.
setPlacement
(
detPV
);
return
det
;
//struct cb_EMCAL_Config
//{
// double RIn;
// double ROut;
// double ROutshift = 5 * cm;
// double Thickness = 40 * cm;
// double SizeZ;
//};
//
//
//class cb_EMCAL_Design
//{
//public:
// inline void Construct(cb_EMCAL_Config cfg, cb_Solenoid_Config cfgsolenoid, G4Material *worldMaterial, G4VPhysicalVolume *motherVolume)
// {
// spdlog::debug("Begin cb_EMCAL volume \n");
//
// ConstructionConfig = cfg;
//
// //........................EMCAL Barrel detector----------------------------------------------
//
// // working
//
// // G4double EMCALB_R_cone[4]={cb_EMCAL_GVol_RIn, cb_EMCAL_GVol_ROut, cb_EMCAL_GVol_ROut, cb_EMCAL_GVol_RIn };
// // G4double cb_EMCAL_GVol_ConeZ[4]={ -SizeZ/2, -SizeZ/2+60*cm, SizeZ/2-60*cm, SizeZ/2};
//
//
// double coneROut[4] = {cfg.ROut, cfg.ROut, cfg.ROut, cfg.ROut};
// double coneRIn[4] = {cfg.ROut - 1. * cm, cfg.RIn, cfg.RIn, cfg.ROut - 1. * cm};
// double coneZ[4] = {-cfgsolenoid.SizeZ / 2, -cfgsolenoid.SizeZ / 2 + 30 * cm, cfgsolenoid.SizeZ / 2 - 30 * cm, cfgsolenoid.SizeZ / 2};
//
// Solid = new G4Polycone("cb_EMCAL_GVol_Solid", 0. * deg, 360. * deg, 4, coneZ, coneRIn, coneROut);
// Logic = new G4LogicalVolume(Solid, worldMaterial, "cb_EMCAL_GVol_Logic");
// Phys = new G4PVPlacement(0, G4ThreeVector(), "cb_EMCAL_GVol_Phys", Logic, motherVolume, false, 0);
//
//
// G4VisAttributes *visAttr = new G4VisAttributes(G4Color(0.3, 0.5, 0.9, 1.));
// visAttr->SetLineWidth(1);
// visAttr->SetForceSolid(false);
// Logic->SetVisAttributes(visAttr);
// }
//
//
// inline void ConstructBars()
// {
// // Setting material
// cb_EMCAL_det_Material = fMat->GetMaterial("PbWO4");
// Logic->SetMaterial(cb_EMCAL_det_Material);
//
// // Visualising it differently
// auto visualAttributes = new G4VisAttributes(G4Color(0.3, 0.5, 0.9, 1.));
// visualAttributes->SetLineWidth(1);
// visualAttributes->SetForceSolid(true);
// Logic->SetVisAttributes(visualAttributes);
// // fPhysicsEMCAL = new G4PVPlacement(0, G4ThreeVector(0,0,-40*cm), "EMCALbSolPhys",fLogicEMCAL,
// // cb_EMCAL_GVol_Phys, false, 0 );
// }
//
// G4Polycone *Solid; //pointer to the solid
// G4LogicalVolume *Logic; //pointer to the logical
// G4VPhysicalVolume *Phys; //pointer to the physical
//
// /// Parameters that was used in the moment of construction
// cb_EMCAL_Config ConstructionConfig;
}
// clang-format off
DECLARE_DETELEMENT
(
cb_EMCAL
,
createDetector
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment