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
Merge requests
!7
Resolve "Translate cb_EMCAL"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Translate cb_EMCAL"
3-translate-cb_emcal
into
master
Overview
0
Commits
10
Pipelines
6
Changes
1
Merged
Whitney Armstrong
requested to merge
3-translate-cb_emcal
into
master
4 years ago
Overview
0
Commits
10
Pipelines
6
Changes
1
Expand
Closes
#3 (closed)
Edited
4 years ago
by
Whitney Armstrong
0
0
Merge request reports
Viewing commit
c679fd7f
Prev
Next
Show latest version
1 file
+
0
−
113
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
c679fd7f
Removing cb_EMCAL.ccpp
· c679fd7f
Whitney Armstrong
authored
4 years ago
deleted: src/cb_EMCAL.cpp
src/cb_EMCAL.cpp deleted
100644 → 0
+
0
−
113
Options
#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
RIn
=
dims
.
inner_radius
();
//double rMin = dims.rmin();
double
thickness
=
dims
.
thickness
();
double
ROut
=
thickness
+
rInner
;
double
innerZ
=
dims
.
inner_z
();
double
outerZ
=
dims
.
outer_z
();
double
angle
=
dims
.
angle
();
Material
mat
=
desc
.
material
(
detElem
.
materialStr
());
std
::
vector
<
double
>
coneROut
=
{
ROut
,
ROut
,
ROut
,
ROut
};
std
::
vector
<
double
>
coneRIn
=
{
ROut
-
1.
*
cm
,
RIn
,
RIn
,
ROut
-
1.
*
cm
};
std
::
vector
<
double
>
coneZ
=
{
-
cfgsolenoid
.
SizeZ
/
2
,
-
cfgsolenoid
.
SizeZ
/
2
+
30
*
cm
,
cfgsolenoid
.
SizeZ
/
2
-
30
*
cm
,
cfgsolenoid
.
SizeZ
/
2
};
Polycone
cone_solid
(
"cb_EMCAL_GVol_Solid"
,
0.
*
deg
,
360.
*
deg
,
4
,
coneZ
,
rInner
,
coneROut
);
Volume
detVol
(
detName
,
cone_solid
,
mat
);
//Logic = new G4LogicalVolume(Solid, worldMaterial, "cb_EMCAL_GVol_Logic");
//Phys = new G4PVPlacement(0, G4ThreeVector(), "cb_EMCAL_GVol_Phys", Logic, motherVolume, false, 0);
//
//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));
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
)
Loading