Skip to content

Commit

Permalink
Merge production into production_pythia8
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Sep 14, 2021
2 parents 247ac01 + 74746a2 commit 3352a44
Show file tree
Hide file tree
Showing 8 changed files with 96 additions and 44 deletions.
2 changes: 1 addition & 1 deletion common/G4_DIRC.C
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void DIRCSetup(PHG4Reco* g4Reco)
dircSubsys->set_double_param("Radius", 75.0 * Enable::DIRC_SCALE);
dircSubsys->set_double_param("Prizm_width", 38.65 * Enable::DIRC_SCALE);
dircSubsys->set_double_param("Prizm_length", 30.0 * Enable::DIRC_SCALE);
dircSubsys->set_double_param("Prizm_height_at_lens", 3.7 * Enable::DIRC_SCALE);
dircSubsys->set_double_param("Prizm_height_at_lens", 5 * Enable::DIRC_SCALE); // override internal default
dircSubsys->set_double_param("Bar_thickness", 1.7 * Enable::DIRC_SCALE);
dircSubsys->set_double_param("Bar_width", 3.5 * Enable::DIRC_SCALE);
dircSubsys->set_double_param("BarL_length", 122.5 * Enable::DIRC_SCALE);
Expand Down
5 changes: 3 additions & 2 deletions common/G4_EventEvaluator.C
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ void Event_Eval(const std::string &filename)
if (Enable::BECAL) eval->set_do_BECAL(true);

eval->set_do_MCPARTICLES(true);
eval->set_do_HEPMC(true);
eval->set_do_store_event_level_info(true);
eval->set_do_HEPMC(Input::PYTHIA6 or Input::PYTHIA8 or Input::SARTRE or Input::HEPMC
or Input::READEIC );
eval->set_do_store_event_level_info( Input::PYTHIA6 or Input::PYTHIA8 or Input::READEIC );
se->registerSubsystem(eval);

return;
Expand Down
2 changes: 1 addition & 1 deletion common/G4_HcalIn_ref.C
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ double HCalInner(PHG4Reco *g4Reco,

hcal->set_double_param("outer_radius", 138.5);
hcal->set_double_param("scinti_outer_radius", 138.0);
hcal->set_double_param("inner_radius", 134.0);
hcal->set_double_param("inner_radius", 135.0);
hcal->set_double_param("tilt_angle", 36.15);
hcal->set_double_param("size_z", length);
hcal->set_int_param("n_scinti_tiles", 0);
Expand Down
8 changes: 4 additions & 4 deletions common/G4_Pipe_EIC.C
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ double Pipe(PHG4Reco* g4Reco,
double radius)
{
bool AbsorberActive = Enable::ABSORBER || Enable::PIPE_ABSORBER;
bool OverlapCheck = Enable::PIPE_OVERLAPCHECK; // detach from Enable::OVERLAPCHECK || to suppress GDML validation messages
bool OverlapCheck = Enable::PIPE_OVERLAPCHECK or Enable::OVERLAPCHECK; // || to suppress GDML validation messages
int verbosity = std::max(Enable::VERBOSITY, Enable::PIPE_VERBOSITY);
// process pipe extentions?
const bool do_pipe_hadron_forward_extension = G4PIPE::use_forward_pipes && true;
Expand All @@ -81,7 +81,7 @@ double Pipe(PHG4Reco* g4Reco,
cyl->set_string_param("material", "G4_Galactic");
cyl->set_double_param("thickness", G4PIPE::be_pipe_radius- G4PIPE::Au_coating_thickness);
cyl->SuperDetector("PIPE");
cyl->OverlapCheck(true);
cyl->OverlapCheck(OverlapCheck);
g4Reco->registerSubsystem(cyl);

// 2um Au coating for X-ray absorption
Expand All @@ -93,7 +93,7 @@ double Pipe(PHG4Reco* g4Reco,
cyl->set_string_param("material", "G4_Au");
cyl->set_double_param("thickness", G4PIPE::Au_coating_thickness);
cyl->SuperDetector("PIPE");
cyl->OverlapCheck(true);
cyl->OverlapCheck(OverlapCheck);
if (AbsorberActive) cyl->SetActive();
g4Reco->registerSubsystem(cyl);

Expand All @@ -105,7 +105,7 @@ double Pipe(PHG4Reco* g4Reco,
cyl->set_string_param("material", "G4_Be");
cyl->set_double_param("thickness", G4PIPE::be_pipe_thickness);
cyl->SuperDetector("PIPE");
cyl->OverlapCheck(true);
cyl->OverlapCheck(OverlapCheck);
if (AbsorberActive) cyl->SetActive();
g4Reco->registerSubsystem(cyl);

Expand Down
4 changes: 2 additions & 2 deletions common/G4_TTL_EIC.C
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ int make_forward_station(string name, PHG4Reco *g4Reco,
ttl->set_double_param("offset_x", xoffset * cm); //
ttl->set_double_param("tSilicon", tSilicon); //
// ttl->OverlapCheck(true);
ttl->OverlapCheck(false);
ttl->OverlapCheck(Enable::OVERLAPCHECK);

g4Reco->registerSubsystem(ttl);

Expand Down Expand Up @@ -312,7 +312,7 @@ int make_barrel_layer(string name, PHG4Reco *g4Reco,
ttl->set_double_param("rMin", radius * cm); //
ttl->set_double_param("length", 2.0 * halflength * cm);
ttl->set_double_param("tSilicon", tSilicon); //
ttl->OverlapCheck(false);
ttl->OverlapCheck(Enable::OVERLAPCHECK);

g4Reco->registerSubsystem(ttl);

Expand Down
59 changes: 54 additions & 5 deletions common/G4_hFarBwdBeamLine_EIC.C
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace Enable

namespace hFarBwdBeamLine
{
double starting_z = -450; //cm as center-forward interface
double starting_z = -410; //cm as center-forward interface
double enclosure_z_max = NAN;
double enclosure_r_max = NAN;
double enclosure_center = NAN;
Expand Down Expand Up @@ -276,12 +276,37 @@ void hFarBwdDefineMagnets(PHG4Reco *g4Reco)

void hFarBwdDefineDetectorsIP6(PHG4Reco *g4Reco)
{
bool overlapCheck = Enable::OVERLAPCHECK || Enable::HFARFWD_OVERLAPCHECK;
if (Enable::HFARFWD_VIRTUAL_DETECTORS_IP6 && Enable::HFARFWD_VIRTUAL_DETECTORS_IP8)
bool overlapCheck = Enable::OVERLAPCHECK || Enable::HFARBWD_OVERLAPCHECK;
if (Enable::HFARBWD_VIRTUAL_DETECTORS_IP6 && Enable::HFARBWD_VIRTUAL_DETECTORS_IP8)
{
cout << "You cannot have detectors enabled for both IP6 and IP8 ON at the same time" << endl;
gSystem->Exit(1);
}

int verbosity = std::max(Enable::VERBOSITY, Enable::HFARBWD_VERBOSITY);

auto *detBackward = new PHG4CylinderSubsystem("detBackward");
detBackward->SuperDetector("backTruth");
detBackward->set_double_param("place_x", 0);
detBackward->set_double_param("place_y", 0);
// detBackward->set_double_param("place_z", -500);
detBackward->set_double_param("place_z", -500 - hFarBwdBeamLine::enclosure_center);
detBackward->set_double_param("rot_y", 0);
detBackward->set_double_param("radius", 0);
detBackward->set_double_param("thickness", 30); // This is intentionally made large 25cm radius
detBackward->set_double_param("length", 0.03);
detBackward->set_string_param("material", "G4_Si");

detBackward->SetMotherSubsystem(hFarBwdBeamLine::hFarBwdBeamLineEnclosure);


detBackward->SetActive();
detBackward->OverlapCheck(overlapCheck);
detBackward->set_color(1, 0, 0, 0.5);

detBackward->BlackHole();
if (verbosity) detBackward->Verbosity(verbosity);
g4Reco->registerSubsystem(detBackward);

// int verbosity = std::max(Enable::VERBOSITY, Enable::HFARFWD_VERBOSITY);

Expand All @@ -292,13 +317,37 @@ void hFarBwdDefineDetectorsIP8(PHG4Reco *g4Reco)
// cout << __PRETTY_FUNCTION__ << " : IP8 setup is not yet validated!" << endl;
// gSystem->Exit(1);

bool overlapCheck = Enable::OVERLAPCHECK || Enable::HFARFWD_OVERLAPCHECK;
if (Enable::HFARFWD_VIRTUAL_DETECTORS_IP6 && Enable::HFARFWD_VIRTUAL_DETECTORS_IP8)
bool overlapCheck = Enable::OVERLAPCHECK || Enable::HFARBWD_OVERLAPCHECK;
if (Enable::HFARBWD_VIRTUAL_DETECTORS_IP6 && Enable::HFARBWD_VIRTUAL_DETECTORS_IP8)
{
cout << "You cannot have detectors enabled for both IP6 and IP8 ON at the same time" << endl;
gSystem->Exit(1);
}

int verbosity = std::max(Enable::VERBOSITY, Enable::HFARBWD_VERBOSITY);

auto *detBackward = new PHG4CylinderSubsystem("detBackward");
detBackward->SuperDetector("backTruth");
detBackward->set_double_param("place_x", 0);
detBackward->set_double_param("place_y", 0);
// detBackward->set_double_param("place_z", -500);
detBackward->set_double_param("place_z", -500 - hFarBwdBeamLine::enclosure_center);
detBackward->set_double_param("rot_y", 0);
detBackward->set_double_param("radius", 0);
detBackward->set_double_param("thickness", 30); // This is intentionally made large 25cm radius
detBackward->set_double_param("length", 0.03);
detBackward->set_string_param("material", "G4_Si");

detBackward->SetMotherSubsystem(hFarBwdBeamLine::hFarBwdBeamLineEnclosure);

detBackward->SetActive();
detBackward->OverlapCheck(overlapCheck);
detBackward->set_color(1, 0, 0, 0.5);

detBackward->BlackHole();
if (verbosity) detBackward->Verbosity(verbosity);
g4Reco->registerSubsystem(detBackward);

// int verbosity = std::max(Enable::VERBOSITY, Enable::HFARFWD_VERBOSITY);

}
Expand Down
56 changes: 29 additions & 27 deletions common/G4_hFarFwdBeamLine_EIC.C
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void hFarFwdBeamLineInit()
{
hFarFwdBeamLine::enclosure_z_max = 4500.;
BlackHoleGeometry::min_z = std::min(BlackHoleGeometry::min_z, hFarFwdBeamLine::starting_z);
hFarFwdBeamLine::enclosure_r_max = 200.;
hFarFwdBeamLine::enclosure_r_max = 200.;
}

hFarFwdBeamLine::enclosure_center = 0.5 * (hFarFwdBeamLine::starting_z + hFarFwdBeamLine::enclosure_z_max);
Expand Down Expand Up @@ -366,7 +366,7 @@ void hFarFwdDefineDetectorsIP6(PHG4Reco *g4Reco)
//// Disk design
//// 50 cm in x

auto *detRP = new PHG4CylinderSubsystem(Form("rpTruth_%d", i),i);
auto *detRP = new PHG4CylinderSubsystem(Form("rpTruth_%d", i), i);
detRP->SuperDetector("rpTruth");
detRP->set_double_param("place_x", PosFlip(rp_xCent[i]));
detRP->set_double_param("place_y", 0);
Expand All @@ -385,19 +385,24 @@ void hFarFwdDefineDetectorsIP6(PHG4Reco *g4Reco)
}

const int b0DetNr = 4;
const double b0Mag_zCent = 590;
const double b0Mag_zLen = 120;

// Sep 09 2021 by Bill:
// B0 magnet center location in z: 640
// B0 place location in z after 50cm shift: 592, 616, 640, 664
// B0 layers has the same x coordinate: -14.57

const double b0Mag_zCent = 640;
const double b0Mag_zLen = 120;

for (int i = 0; i < b0DetNr; i++)
{
auto *detB0 = new PHG4CylinderSubsystem(Form("b0Truth_%d", i),i);
auto *detB0 = new PHG4CylinderSubsystem(Form("b0Truth_%d", i), i);
detB0->SuperDetector("b0Truth");
detB0->set_double_param("radius", 0);
detB0->set_double_param("thickness", 20);
detB0->set_double_param("length", 0.1);
detB0->set_string_param("material", "G4_Si");
detB0->set_double_param("place_z", b0Mag_zLen / (b0DetNr + 1) * (i - b0DetNr / 2));
detB0->set_double_param("place_z", b0Mag_zLen / (b0DetNr + 1) * (i - b0DetNr / 2)); // relative to B0 magnet
detB0->SetActive(true);
if (verbosity) detB0->Verbosity(verbosity);
detB0->OverlapCheck(overlapCheck);
Expand Down Expand Up @@ -425,21 +430,17 @@ void hFarFwdDefineDetectorsIP8(PHG4Reco *g4Reco)

int verbosity = std::max(Enable::VERBOSITY, Enable::HFARFWD_VERBOSITY);

//const int offMomDetNr = 3;
//const double om_xCent[offMomDetNr] = {100, 100, 100};
//const double om_zCent[offMomDetNr] = {4250, 4400, 4550};

const int offMomDetNr = 2;
const double om_xCent[offMomDetNr] = {46, 49};
const double om_zCent[offMomDetNr] = {3250, 3450};

for (int i = 0; i < offMomDetNr; i++)
{
auto *detOM = new PHG4BlockSubsystem(Form("offMomTruth_%d", i),i);
detOM->SuperDetector(Form("SDoffMomTruth_%d",i));
auto *detOM = new PHG4BlockSubsystem(Form("offMomTruth_%d", i), i);
detOM->SuperDetector("offMomTruth");
detOM->set_double_param("place_x", PosFlip(om_xCent[i]));
detOM->set_double_param("place_y", 0);
detOM->set_double_param("place_z", om_zCent[i] - hFarFwdBeamLine::enclosure_center);
detOM->set_double_param("place_z", PosFlip(om_zCent[i] - hFarFwdBeamLine::enclosure_center));
detOM->set_double_param("rot_y", AngleFlip(-0.045 * TMath::RadToDeg()));
detOM->set_double_param("size_x", 40); // Original design specification
detOM->set_double_param("size_y", 35); // Original design specification
Expand Down Expand Up @@ -468,11 +469,11 @@ void hFarFwdDefineDetectorsIP8(PHG4Reco *g4Reco)
detZDCsurrogate->OverlapCheck(overlapCheck);
detZDCsurrogate->set_color(1, 0, 0, 0.5);
if (!Enable::ZDC_DISABLE_BLACKHOLE) detZDCsurrogate->BlackHole();
if (verbosity) detZDCsurrogate->Verbosity(verbosity);
if (verbosity)
detZDCsurrogate->Verbosity(verbosity);
detZDCsurrogate->SetMotherSubsystem(hFarFwdBeamLine::hFarFwdBeamLineEnclosure);
g4Reco->registerSubsystem(detZDCsurrogate);



if (Enable::ZDC_DISABLE_BLACKHOLE)
{

Expand All @@ -491,15 +492,13 @@ void hFarFwdDefineDetectorsIP8(PHG4Reco *g4Reco)
// Roman pot set #1
const int rpDetNr = 2;

//const double rp_xCent[rpDetNr] = {75, 75, 75, 75};
//const double rp_zCent[rpDetNr] = {2200, 2500, 2800, 3100};
const double rp_xCent[rpDetNr] = {75.6, 78.15};
const double rp_zCent[rpDetNr] = {2600, 2800};

for (int i = 0; i < rpDetNr; i++)
{
auto *detRP = new PHG4BlockSubsystem(Form("RomanPots_%d", i),i);
detRP->SuperDetector(Form("SDRomanPots_%d", i));
auto *detRP = new PHG4BlockSubsystem(Form("rpTruth_%d", i), i);
detRP->SuperDetector("rpTruth");
detRP->set_double_param("place_x", PosFlip(rp_xCent[i]));
detRP->set_double_param("place_y", 0);
detRP->set_double_param("place_z", rp_zCent[i] - hFarFwdBeamLine::enclosure_center);
Expand All @@ -511,7 +510,8 @@ void hFarFwdDefineDetectorsIP8(PHG4Reco *g4Reco)
detRP->OverlapCheck(overlapCheck);
detRP->SetMotherSubsystem(hFarFwdBeamLine::hFarFwdBeamLineEnclosure);
detRP->SetActive();
if (verbosity) detRP->Verbosity(verbosity);
if (verbosity)
detRP->Verbosity(verbosity);
g4Reco->registerSubsystem(detRP);
}

Expand All @@ -524,8 +524,8 @@ void hFarFwdDefineDetectorsIP8(PHG4Reco *g4Reco)

for (int i = 0; i < rp2ndDetNr; i++)
{
auto *detRP_2nd = new PHG4BlockSubsystem(Form("RomanPots_2nd_%d", i),i);
detRP_2nd->SuperDetector(Form("SDRomanPots_2nd_%d", i));
auto *detRP_2nd = new PHG4BlockSubsystem(Form("rpTruth2_%d", i), i);
detRP_2nd->SuperDetector("rpTruth2");
detRP_2nd->set_double_param("place_x", PosFlip(rp_2nd_xCent[i]));
detRP_2nd->set_double_param("place_y", 0);
detRP_2nd->set_double_param("place_z", rp_2nd_zCent[i] - hFarFwdBeamLine::enclosure_center);
Expand All @@ -537,7 +537,8 @@ void hFarFwdDefineDetectorsIP8(PHG4Reco *g4Reco)
detRP_2nd->OverlapCheck(overlapCheck);
detRP_2nd->SetMotherSubsystem(hFarFwdBeamLine::hFarFwdBeamLineEnclosure);
detRP_2nd->SetActive();
if (verbosity) detRP_2nd->Verbosity(verbosity);
if (verbosity)
detRP_2nd->Verbosity(verbosity);
g4Reco->registerSubsystem(detRP_2nd);
}

Expand All @@ -551,8 +552,8 @@ void hFarFwdDefineDetectorsIP8(PHG4Reco *g4Reco)
const double b0Mag_zLen = 120;
for (int i = 0; i < b0DetNr; i++)
{
auto *detB0 = new PHG4CylinderSubsystem(Form("b0Truth_%d", i),i);
detB0->SuperDetector("b0truth");
auto *detB0 = new PHG4CylinderSubsystem(Form("b0Truth_%d", i), i);
detB0->SuperDetector("b0Truth");
detB0->set_double_param("radius", 0);
detB0->set_double_param("thickness", 20);
detB0->set_double_param("length", 0.1);
Expand All @@ -562,7 +563,8 @@ void hFarFwdDefineDetectorsIP8(PHG4Reco *g4Reco)
detB0->OverlapCheck(overlapCheck);
detB0->SetMotherSubsystem(hFarFwdBeamLine::B0Magnet);
detB0->SetActive(true);
if (verbosity) detB0->Verbosity(verbosity);
if (verbosity)
detB0->Verbosity(verbosity);
g4Reco->registerSubsystem(detB0);
}
}
Expand Down
4 changes: 2 additions & 2 deletions detectors/EICDetector/Fun4All_G4_EICDetector.C
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ int Fun4All_G4_EICDetector(
Enable::BECAL_CLUSTER = Enable::BECAL_TOWER && true;
Enable::BECAL_EVAL = Enable::BECAL_CLUSTER && false;

Enable::HCALIN = false;
Enable::HCALIN = true;
// Enable::HCALIN_ABSORBER = true;
Enable::HCALIN_CELL = Enable::HCALIN && true;
Enable::HCALIN_TOWER = Enable::HCALIN_CELL && true;
Expand All @@ -327,7 +327,7 @@ int Fun4All_G4_EICDetector(
Enable::HCALOUT_EVAL = Enable::HCALOUT_CLUSTER && false;

// EICDetector geometry - barrel
Enable::DIRC = false;
Enable::DIRC = true;

// EICDetector geometry - 'hadron' direction
Enable::RICH = true;
Expand Down

0 comments on commit 3352a44

Please sign in to comment.