-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Default macro updated with the June 2021 concept (#17)
* testing out this new branch * (1) update FST dimension (2) add cylindrical supporting structure * beams * simplify beam chamber and narrow down boundary * single switch for IP choices * single switch for IP choices * fix far forward setup * update beam pipes * clean up tracking and bbc * update GEMs * integrate RICH and GEM * update FST * integrating mRICH * integrate DIRC and EEMC * remove support ring * adding EHCal from EIC repo * integrating EHCal * updated inner HCAL design for ECCE first simulation campaign * correct sign convension difference * fix DIRC sign * (1) merged changes from June-2021-concept (2) added barrel tracker from LBNL * fix node name * fix fast dRICH overlap * adjust GEM size * update support barrel per June19 tracking meeting * resolve GEM conflict * integrating mRwell * integrating TTL * adding track projections * move EEMC to avoid confliction * turn on all detectors * disable overlap check * disable verbosity * use simple generator by default * turn off DST output by default * use fast smear vertex Co-authored-by: pingwong <[email protected]> Co-authored-by: John Lajoie <[email protected]> Co-authored-by: cdean-github <[email protected]>
- Loading branch information
1 parent
692490e
commit 38efad6
Showing
20 changed files
with
2,010 additions
and
1,134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,207 +1,58 @@ | ||
/*---------------------------------------------------------------------* | ||
* Barrel tracker designed by LANL EIC team * | ||
* See technical notes for details: arXiv:2009.02888 * | ||
* Contact Ping and Xuan @LANL for questions: * | ||
* Xuan: [email protected] * | ||
* Ping: [email protected] * | ||
*---------------------------------------------------------------------*/ | ||
|
||
#ifndef MACRO_G4BARRELEIC_C | ||
#define MACRO_G4BARRELEIC_C | ||
|
||
#include <GlobalVariables.C> | ||
|
||
#include <g4detectors/PHG4CylinderSubsystem.h> | ||
#ifndef MACRO_G4BARREL_C | ||
#define MACRO_G4BARREL_C | ||
|
||
#include <g4lblvtx/AllSiliconTrackerSubsystem.h> | ||
#include <g4lblvtx/SimpleNtuple.h> | ||
#include <g4main/PHG4Reco.h> | ||
#include <g4trackfastsim/PHG4TrackFastSim.h> | ||
#include "GlobalVariables.C" | ||
|
||
#include <fun4all/Fun4AllServer.h> | ||
#include <string> | ||
|
||
#include <cmath> | ||
#include <vector> | ||
R__LOAD_LIBRARY(libg4detectors.so) | ||
|
||
R__LOAD_LIBRARY(libg4eval.so) | ||
R__LOAD_LIBRARY(libg4mvtx.so) | ||
using namespace std; | ||
|
||
int make_barrel_pixel_layer(const string &name, PHG4Reco *g4Reco, | ||
double radius, double halflength, double tSilicon, double tAirgap); | ||
|
||
//---------------------------------------------------------------------// | ||
namespace Enable | ||
{ | ||
bool BARREL = false; | ||
bool BARREL_ABSORBER = false; | ||
} // namespace Enable | ||
|
||
namespace G4BARREL | ||
{ | ||
namespace SETTING | ||
{ | ||
bool BARRELV0 = false; | ||
bool BARRELV1 = false; | ||
bool BARRELV2 = false; | ||
bool BARRELV3 = false; | ||
bool BARRELV4 = false; | ||
bool BARRELV5 = false; | ||
bool BARRELV6 = false; | ||
} // namespace SETTING | ||
} // namespace G4BARREL | ||
//---------------------------------------------------------------------// | ||
//-----------------------------------------------------------------------------------// | ||
void BarrelInit() | ||
{ | ||
//check barrel setting | ||
if ((G4BARREL::SETTING::BARRELV0 ? 1 : 0) + | ||
(G4BARREL::SETTING::BARRELV1 ? 1 : 0) + | ||
(G4BARREL::SETTING::BARRELV2 ? 1 : 0) + | ||
(G4BARREL::SETTING::BARRELV3 ? 1 : 0) + | ||
(G4BARREL::SETTING::BARRELV4 ? 1 : 0) + | ||
(G4BARREL::SETTING::BARRELV5 ? 1 : 0) + | ||
(G4BARREL::SETTING::BARRELV6 ? 1 : 0) > | ||
1) | ||
{ | ||
cout << "use only "; | ||
for (int i = 0; i < 7; i++) | ||
{ | ||
if (i == 0) | ||
cout << "G4BARREL::SETTING::BARRELV" << i << "=true "; | ||
else | ||
cout << " or G4BARREL::SETTING::BARRELV" << i << "=true "; | ||
} | ||
|
||
gSystem->Exit(1); | ||
} | ||
} | ||
|
||
//---------------------------------------------------------------------// | ||
double Barrel(PHG4Reco *g4Reco, double radius) | ||
//-----------------------------------------------------------------------------------// | ||
void Barrel(PHG4Reco *g4Reco, int det_ver = 3) | ||
{ | ||
const bool AbsorberActive = Enable::ABSORBER || Enable::BARREL_ABSORBER; | ||
double max_bh_radius = 0.; | ||
// Loading All-Si Tracker from dgml file | ||
AllSiliconTrackerSubsystem *allsili = new AllSiliconTrackerSubsystem(); | ||
allsili->set_string_param("GDMPath", string(getenv("CALIBRATIONROOT")) + Form("/AllSiliconTracker/genfitGeom_AllSi_v%d.gdml", det_ver)); | ||
allsili->AddAssemblyVolume("VST"); // Barrel | ||
|
||
//--------------------------------- | ||
//build barrel detector | ||
//--------------------------------- | ||
int nLayer = 5; | ||
const float um = 0.0001; //convert um to cm | ||
// this is for plotting single logical volumes for debugging and geantino scanning they end up at the center, you can plot multiple | ||
// allsili->AddLogicalVolume("VstStave00"); | ||
|
||
// Different Barrel versions documented in arXiv:2009.02888 | ||
double r[6] = {3.64, 4.81, 5.98, 16.0, 22.0, -1}; //cm | ||
double halfLength[6] = {20, 20, 25, 25, 25, 25}; //cm | ||
double tSilicon[6] = {100 * um, 100 * um, 100 * um, 100 * um, 100 * um, 100 * um}; | ||
double tAirgap[6] = {0.9, 0.9, 1, 1, 1, 1}; | ||
allsili->SuperDetector("Barrel"); | ||
allsili->SetActive(); // this saves hits in the MimosaCore volumes | ||
allsili->SetAbsorberActive(); // this saves hits in all volumes (in the absorber node) | ||
g4Reco->registerSubsystem(allsili); | ||
|
||
if (G4BARREL::SETTING::BARRELV1 || G4BARREL::SETTING::BARRELV2) | ||
{ | ||
for (Int_t i = 0; i < 3; i++) tSilicon[i] = 50 * um; | ||
} | ||
else if (G4BARREL::SETTING::BARRELV3) | ||
{ | ||
for (Int_t i = 0; i < 5; i++) tSilicon[i] = 35 * um; | ||
} | ||
else if (G4BARREL::SETTING::BARRELV4) | ||
{ | ||
for (Int_t i = 0; i < 3; i++) tSilicon[i] = 50 * um; | ||
nLayer = 6; | ||
r[3] = 9.2; | ||
r[4] = 17.; | ||
r[5] = 27.; | ||
} | ||
float pitch = 10e-4; | ||
int nBarrel = 6; | ||
|
||
if (G4BARREL::SETTING::BARRELV5 || G4BARREL::SETTING::BARRELV6) | ||
if (TRACKING::FastKalmanFilter) | ||
{ | ||
int nLayer1 = 3; //barrel 1 | ||
int nLayer2 = 2; //barrel 2 | ||
if (G4BARREL::SETTING::BARRELV6) nLayer2 = 1; //compactible w/ TPC | ||
|
||
int my_nLayer[2] = {nLayer1, nLayer2}; | ||
|
||
double my_r[2][3] = {{3.64, 4.81, 5.98}, //cm, barrel1 | ||
{16, 22.0}}; //barrel 2 | ||
|
||
double my_halfLength[2][3] = {{20, 20, 25}, //cm, barrel 1 | ||
{25, 25}}; //barrel 2 | ||
|
||
double my_tSilicon = 35 * um; | ||
|
||
for (int n = 0; n < 2; n++) | ||
for (int i = 10; i < 10 + nBarrel; i++) // hit nodes are shifted with a base of 10 | ||
{ | ||
if (n == 1) my_tSilicon = 85 * um; | ||
for (int i = 0; i < my_nLayer[n]; i++) | ||
{ | ||
make_barrel_pixel_layer(Form("BARREL%d_%d", n, i), g4Reco, my_r[n][i], my_halfLength[n][i], my_tSilicon, tAirgap[i]); | ||
} | ||
TRACKING::FastKalmanFilter->add_phg4hits(Form("G4HIT_Barrel_CENTRAL_%d", i), // const std::string& phg4hitsNames, | ||
PHG4TrackFastSim::Cylinder, // const DETECTOR_TYPE phg4dettype, | ||
999, // const float radres, not used | ||
pitch / sqrt(12.), // const float phires, | ||
pitch / sqrt(12.), // const float lonres, *ignored in plane detector* | ||
1, // const float eff, | ||
0); // const float noise | ||
} | ||
|
||
// update now that we know the outer radius | ||
BlackHoleGeometry::max_radius = std::max(BlackHoleGeometry::max_radius, max_bh_radius); | ||
BlackHoleGeometry::max_z = std::max(BlackHoleGeometry::max_z, halfLength[nLayer1 + nLayer2 - 1]); | ||
BlackHoleGeometry::min_z = std::min(BlackHoleGeometry::min_z, -halfLength[nLayer1 + nLayer2 - 1]); | ||
|
||
max_bh_radius = my_r[1][nLayer2 - 1] + 1.5; | ||
return max_bh_radius; | ||
} | ||
else | ||
{ //ver 0 - 4 | ||
for (int i = 0; i < nLayer; i++) | ||
{ | ||
make_barrel_pixel_layer(Form("BARREL_%d", i), g4Reco, r[i], halfLength[i], tSilicon[i], 1); | ||
max_bh_radius = r[i] + 1.5; | ||
//std::cout << "done with barrel layer intialization at "<< r[i] << std::endl; | ||
} | ||
|
||
// update now that we know the outer radius | ||
BlackHoleGeometry::max_radius = std::max(BlackHoleGeometry::max_radius, max_bh_radius); | ||
BlackHoleGeometry::max_z = std::max(BlackHoleGeometry::max_z, halfLength[nLayer - 1]); | ||
BlackHoleGeometry::min_z = std::min(BlackHoleGeometry::min_z, -halfLength[nLayer - 1]); | ||
return max_bh_radius; | ||
} | ||
|
||
return 0; | ||
} | ||
//-----------------------------------------------------------------------------------// | ||
int make_barrel_pixel_layer(const string &name, PHG4Reco *g4Reco, | ||
double radius, double halflength, double tSilicon, double tAirgap) | ||
{ | ||
//--------------------------------- | ||
//build barrel layer | ||
//--------------------------------- | ||
const int nSubLayer = 7; | ||
const double cm = PHG4Sector::Sector_Geometry::Unit_cm(); | ||
const double mm = .1 * cm; | ||
const double um = 1e-3 * mm; | ||
|
||
string layerName[nSubLayer] = {"SiliconSensor", "Metalconnection", "HDI", "Cooling", | ||
"Support1", "Support_Gap", "Support2"}; | ||
string material[nSubLayer] = {"G4_Si", "G4_Al", "G4_KAPTON", "G4_WATER", | ||
"G4_GRAPHITE", "G4_AIR", "G4_GRAPHITE"}; | ||
double thickness[nSubLayer] = {tSilicon, 15 * um, 20 * um, 100 * um, | ||
50 * um, tAirgap, 50 * um}; | ||
|
||
double max_bh_radius = 0.; | ||
PHG4CylinderSubsystem *cyl; | ||
cout << "started to create cylinder layer: " << name << endl; | ||
|
||
double currRadius = radius; | ||
// cout << currRadius << endl; | ||
for (int l = 0; l < nSubLayer; l++) | ||
{ | ||
cout << name << "_" << layerName[l] << "\t" << currRadius; | ||
cyl = new PHG4CylinderSubsystem(name + "_" + layerName[l], l); | ||
cyl->SuperDetector(name); | ||
cyl->set_double_param("radius", currRadius); | ||
cyl->set_double_param("length", 2.0 * halflength); | ||
cyl->set_string_param("material", material[l]); | ||
cyl->set_double_param("thickness", thickness[l]); | ||
if (l == 0) cyl->SetActive(); //only the Silicon Sensor is active | ||
cyl->OverlapCheck(true); | ||
g4Reco->registerSubsystem(cyl); | ||
currRadius = currRadius + thickness[l]; | ||
cout << "\t" << currRadius << endl; | ||
} | ||
|
||
return 0; | ||
} | ||
|
||
//-----------------------------------------------------------------------------------// | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
|
||
#include <g4detectors/PHG4CylinderSubsystem.h> | ||
#include <g4detectors/PHG4SectorSubsystem.h> | ||
#include <g4trackfastsim/PHG4TrackFastSim.h> | ||
|
||
#include <g4main/PHG4Reco.h> | ||
|
||
|
@@ -28,12 +29,22 @@ namespace Enable | |
|
||
namespace G4DIRC | ||
{ | ||
double radiator_R = 83.65; | ||
double length = 400; | ||
double z_shift = -75; //115 | ||
double z_start = z_shift + length / 2.; | ||
double z_end = z_shift - length / 2.; | ||
double outer_skin_radius = 89.25; | ||
// Grzegorz Kalicy <[email protected]> | ||
// -position in z around IP -168 cm to 287 cm | ||
// -69cm radius for the barrel (70cm inner radius for the bars) | ||
// -12 bar boxes, 10 long bars side-by-side in a bar box | ||
// -bar length 425cm | ||
// -Solid fused silica prism: 24 x 36 x 30 cm3 (H x W x L) | ||
// -Additional longitudinal space for MCP-PMTs, readout cards, cables: ~13cm | ||
// -radial thickness 7-8 cm, including mechanical support | ||
// -~16-18% of a radiation length at normal incidence | ||
|
||
double radiator_R = 70; | ||
double z_end = +168; | ||
double z_start = -287; | ||
double length = z_end - z_start; | ||
double z_shift = 0.5*(z_end + z_start); | ||
double outer_skin_radius = 78; | ||
} // namespace G4DIRC | ||
|
||
void DIRCInit() | ||
|
@@ -53,9 +64,9 @@ double DIRCSetup(PHG4Reco *g4Reco) | |
PHG4SectorSubsystem *dirc; | ||
dirc = new PHG4SectorSubsystem("DIRC"); | ||
dirc->get_geometry().set_normal_polar_angle(M_PI / 2); | ||
dirc->get_geometry().set_normal_start(83.65 * PHG4Sector::Sector_Geometry::Unit_cm()); | ||
dirc->get_geometry().set_min_polar_angle(atan2(G4DIRC::radiator_R, G4DIRC::z_start)); | ||
dirc->get_geometry().set_max_polar_angle(atan2(G4DIRC::radiator_R, G4DIRC::z_end)); | ||
dirc->get_geometry().set_normal_start(G4DIRC::radiator_R * PHG4Sector::Sector_Geometry::Unit_cm()); | ||
dirc->get_geometry().set_min_polar_angle(atan2(G4DIRC::radiator_R, G4DIRC::z_end)); | ||
dirc->get_geometry().set_max_polar_angle(atan2(G4DIRC::radiator_R, G4DIRC::z_start)); | ||
dirc->get_geometry().set_min_polar_edge(PHG4Sector::Sector_Geometry::FlatEdge()); | ||
dirc->get_geometry().set_max_polar_edge(PHG4Sector::Sector_Geometry::FlatEdge()); | ||
dirc->get_geometry().set_material("Quartz"); | ||
|
@@ -72,7 +83,7 @@ double DIRCSetup(PHG4Reco *g4Reco) | |
|
||
// Inner skin: | ||
cyl = new PHG4CylinderSubsystem("DIRC_CST_Inner_Skin", 10); | ||
cyl->set_double_param("radius", 81.71); | ||
cyl->set_double_param("radius", 69); | ||
cyl->set_double_param("length", G4DIRC::length); | ||
cyl->set_string_param("material", "G4_Al"); | ||
cyl->set_double_param("thickness", 0.127); | ||
|
@@ -100,6 +111,12 @@ double DIRCSetup(PHG4Reco *g4Reco) | |
|
||
g4Reco->registerSubsystem(cyl); | ||
|
||
if (TRACKING::FastKalmanFilter) | ||
{ | ||
TRACKING::FastKalmanFilter -> add_cylinder_state("DIRC", G4DIRC::radiator_R); | ||
TRACKING::ProjectionNames.insert("DIRC"); | ||
|
||
} | ||
// Done | ||
return G4DIRC::outer_skin_radius; | ||
} | ||
|
Oops, something went wrong.