Skip to content

Commit

Permalink
Merge production into production_singleElectron_0-20GeV
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Dec 6, 2021
2 parents aa63c2a + d10b680 commit b732898
Show file tree
Hide file tree
Showing 12 changed files with 2,003 additions and 121 deletions.
49 changes: 35 additions & 14 deletions common/G4_EEMC_hybrid.C
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ R__LOAD_LIBRARY(libg4eval.so)

namespace Enable
{
bool EEMCH = false;
bool EEMCH_ABSORBER = false;
bool EEMCH_CELL = false;
bool EEMCH_TOWER = false;
bool EEMCH_CLUSTER = false;
bool EEMCH_EVAL = false;
bool EEMCH = false;
bool EEMCH_ABSORBER = false;
bool EEMCH_CELL = false;
bool EEMCH_TOWER = false;
bool EEMCH_CLUSTER = false;
bool EEMCH_EVAL = false;
bool EEMCH_OVERLAPCHECK = false;
int EEMCH_VERBOSITY = 0;
int EEMCH_VERBOSITY = 0;
} // namespace Enable


Expand All @@ -50,8 +50,12 @@ namespace G4EEMCH

namespace SETTING
{
bool USEHYBRID = false;
bool USECEMCGeo = false;
bool USEHYBRID = false;
bool USECEMCGeo = false;
bool USECUSTOMMAPNOCARBON = false;
bool USECUSTOMMAP30CM = false;
bool USECUSTOMMAPCARBON = false;
bool USECUSTOMMAPUPDATED = false;
} // namespace SETTING

// Digitization (default photon digi):
Expand All @@ -78,9 +82,11 @@ namespace G4EEMCH

void EEMCHInit()
{
BlackHoleGeometry::max_radius = std::max(BlackHoleGeometry::max_radius, 77.);
BlackHoleGeometry::max_radius = std::max(BlackHoleGeometry::max_radius, 90.);
// from towerMap_EEMC_v006.txt
BlackHoleGeometry::min_z = std::min(BlackHoleGeometry::min_z, G4EEMCH::Gz0 - G4EEMCH::Gdz / 2.);
BlackHoleGeometry::max_z = std::max(BlackHoleGeometry::max_z, 30.);

}


Expand All @@ -101,7 +107,15 @@ void EEMCHSetup(PHG4Reco *g4Reco)
if (AbsorberActive)
eemc_crystal->SetAbsorberActive();

if (G4EEMCH::SETTING::USEHYBRID && !G4EEMCH::SETTING::USECEMCGeo)
if(G4EEMCH::SETTING::USECUSTOMMAPNOCARBON){
mapping_eemc_1 << getenv("CALIBRATIONROOT") << "/CrystalCalorimeter/mapping/crystal_mapping/tower_map_purecrystal_185_noCarbon.txt";
} else if (G4EEMCH::SETTING::USECUSTOMMAP30CM){
mapping_eemc_1 << getenv("CALIBRATIONROOT") << "/CrystalCalorimeter/mapping/crystal_mapping/tower_map_purecrystal_185_30cm.txt";
} else if (G4EEMCH::SETTING::USECUSTOMMAPCARBON){
mapping_eemc_1 << getenv("CALIBRATIONROOT") << "/CrystalCalorimeter/mapping/crystal_mapping/tower_map_purecrystal_185cm_EEEMCcarbon.txt";
} else if (G4EEMCH::SETTING::USECUSTOMMAPUPDATED){
mapping_eemc_1 << getenv("CALIBRATIONROOT") << "/CrystalCalorimeter/mapping/crystal_mapping/tower_map_purecrystal_185cm_updatedGeo.txt";
} else if (G4EEMCH::SETTING::USEHYBRID && !G4EEMCH::SETTING::USECEMCGeo)
mapping_eemc_1 << getenv("CALIBRATIONROOT") << "/CrystalCalorimeter/mapping/crystal_mapping/tower_map_crystal_200cm_SciGlassBarrel.txt";
else if (G4EEMCH::SETTING::USEHYBRID && G4EEMCH::SETTING::USECEMCGeo)
mapping_eemc_1 << getenv("CALIBRATIONROOT") << "/CrystalCalorimeter/mapping/crystal_mapping/tower_map_crystal_200cm_CEMCBarrel.txt";
Expand All @@ -119,7 +133,6 @@ void EEMCHSetup(PHG4Reco *g4Reco)
cout << "setting EEMC crystal mapping: " << mapping_eemc_1.str() << endl;
eemc_crystal->set_string_param("mappingtower", mapping_eemc_1.str());
eemc_crystal->OverlapCheck(OverlapCheck);
// eemc_crystal->OverlapCheck(true);

g4Reco->registerSubsystem(eemc_crystal);

Expand All @@ -143,7 +156,6 @@ void EEMCHSetup(PHG4Reco *g4Reco)
eemc_glass->SetAbsorberActive();

eemc_glass->set_string_param("mappingtower", mapping_eemc_2.str());

eemc_glass->OverlapCheck(OverlapCheck);
g4Reco->registerSubsystem(eemc_glass);

Expand All @@ -161,7 +173,16 @@ void EEMCH_Towers()
Fun4AllServer *se = Fun4AllServer::instance();

ostringstream mapping_eemc_1, mapping_eemc_2;
if (G4EEMCH::SETTING::USEHYBRID && !G4EEMCH::SETTING::USECEMCGeo)

if(G4EEMCH::SETTING::USECUSTOMMAPNOCARBON){
mapping_eemc_1 << getenv("CALIBRATIONROOT") << "/CrystalCalorimeter/mapping/crystal_mapping/tower_map_purecrystal_185_noCarbon.txt";
} else if (G4EEMCH::SETTING::USECUSTOMMAP30CM){
mapping_eemc_1 << getenv("CALIBRATIONROOT") << "/CrystalCalorimeter/mapping/crystal_mapping/tower_map_purecrystal_185_30cm.txt";
} else if (G4EEMCH::SETTING::USECUSTOMMAPCARBON){
mapping_eemc_1 << getenv("CALIBRATIONROOT") << "/CrystalCalorimeter/mapping/crystal_mapping/tower_map_purecrystal_185cm_EEEMCcarbon.txt";
} else if (G4EEMCH::SETTING::USECUSTOMMAPUPDATED){
mapping_eemc_1 << getenv("CALIBRATIONROOT") << "/CrystalCalorimeter/mapping/crystal_mapping/tower_map_purecrystal_185cm_updatedGeo.txt";
} else if (G4EEMCH::SETTING::USEHYBRID && !G4EEMCH::SETTING::USECEMCGeo)
mapping_eemc_1 << getenv("CALIBRATIONROOT") << "/CrystalCalorimeter/mapping/crystal_mapping/tower_map_crystal_200cm_SciGlassBarrel.txt";
else if (G4EEMCH::SETTING::USEHYBRID && G4EEMCH::SETTING::USECEMCGeo)
mapping_eemc_1 << getenv("CALIBRATIONROOT") << "/CrystalCalorimeter/mapping/crystal_mapping/tower_map_crystal_200cm_CEMCBarrel.txt";
Expand Down
45 changes: 35 additions & 10 deletions common/G4_EventEvaluator.C
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ R__LOAD_LIBRARY(libeiceval.so)
namespace Enable
{
// use Enable::EVENT_EVAL = true; in your macro
bool EVENT_EVAL = false;
bool EVENT_EVAL_DO_HEPMC = false;
bool EVENT_EVAL_DO_EVT_LVL = false;
bool EVENT_EVAL = false;
bool EVENT_EVAL_DO_HEPMC = false;
bool EVENT_EVAL_DO_EVT_LVL = false;
bool EVENT_EVAL_DO_HITS = false;
bool EVENT_EVAL_DO_HITS_ABSORBER = false;
bool EVENT_EVAL_DO_HITS_CALO = false;
bool EVENT_EVAL_DO_HITS_BLACKHOLE = false;
} // namespace Enable

namespace EVENT_EVALUATOR
Expand All @@ -32,26 +36,47 @@ void Event_Eval(const std::string &filename)
if (Enable::TRACKING)
{
eval->set_do_TRACKS(true);
eval->set_do_HITS(true);
if (Enable::EVENT_EVAL_DO_HITS) {
std::cout << "Enabled hits in event eval.\n";
eval->set_do_HITS(true);
if (Enable::EVENT_EVAL_DO_HITS_ABSORBER) {
std::cout << "Enabled absorber hits in event eval.\n";
eval->set_do_HITS_ABSORBER(true);
}
if (Enable::EVENT_EVAL_DO_HITS_CALO) {
std::cout << "Enabled calorimeter hits in event eval.\n";
eval->set_do_HITS_CALO(true);
}
if (Enable::BLACKHOLE_SAVEHITS && Enable::EVENT_EVAL_DO_HITS_BLACKHOLE) eval->set_do_BLACKHOLE(true);
}

eval->set_do_PROJECTIONS(true);
if (G4TRACKING::DISPLACED_VERTEX) eval->set_do_VERTEX(true);
if (Enable::DIRC_RECO or Enable::mRICH_RECO or Enable::RICH_RECO) eval->set_do_PID_LogLikelihood(true);
}
if (Enable::CEMC_CLUSTER) eval->set_do_CEMC(true);
if (Enable::EEMC_CLUSTER || Enable::EEMCH_CLUSTER) eval->set_do_EEMC(true);
if (Enable::FEMC_CLUSTER) eval->set_do_FEMC(true);
if (Enable::HCALIN_CLUSTER) eval->set_do_HCALIN(true);
if (Enable::HCALOUT_CLUSTER) eval->set_do_HCALOUT(true);
if (Enable::FHCAL_CLUSTER) eval->set_do_FHCAL(true);
// set calorimeter Infos
if (Enable::CEMC) eval->set_do_CEMC(true);
if (Enable::EEMC || Enable::EEMCH) eval->set_do_EEMC(true);
if (Enable::EEMCH && G4EEMCH::SETTING::USEHYBRID) eval->set_do_EEMCG(true);
if (Enable::FEMC) eval->set_do_FEMC(true);
if (Enable::EHCAL) eval->set_do_EHCAL(true);
if (Enable::HCALIN) eval->set_do_HCALIN(true);
if (Enable::HCALOUT) eval->set_do_HCALOUT(true);
if (Enable::FHCAL) eval->set_do_FHCAL(true);
if (Enable::FHCAL_CLUSTER || Enable::FEMC_CLUSTER || Enable::EEMC_CLUSTER) eval->set_do_CLUSTERS(true);
if (Enable::DRCALO) eval->set_do_DRCALO(true);
if (Enable::LFHCAL) eval->set_do_LFHCAL(true);
if (Enable::BECAL) eval->set_do_BECAL(true);
if (Enable::EHCAL) eval->set_do_EHCAL(true);

// storing MC event info
eval->set_do_MCPARTICLES(true);
eval->set_do_HEPMC(Enable::EVENT_EVAL_DO_HEPMC);
eval->set_do_store_event_level_info(Enable::EVENT_EVAL_DO_EVT_LVL);

// storing geometry
eval->set_do_GEOMETRY(true);

se->registerSubsystem(eval);

return;
Expand Down
28 changes: 16 additions & 12 deletions common/G4_LFHCAL.C
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace G4LFHCAL
// from LFHcal/mapping/towerMap_LFHCAL_v005.txt
double Gz0 = 400.;
double Gdz = 100.;
double outer_radius = 262.;
double outer_radius = 265.;
enum enu_FHcal_clusterizer
{
kFHcalGraphClusterizer,
Expand All @@ -55,13 +55,14 @@ namespace G4LFHCAL
//enu_FHcal_clusterizer FHcal_clusterizer = kFHcalGraphClusterizer;
namespace SETTING
{
bool FullEtaAcc = false;
bool HC2x = false;
bool asymmetric = true;
bool wDR = false;
bool FwdSquare = false;
bool FwdConfig = false;
bool longer = true;
bool FullEtaAcc = false;
bool HC2x = false;
bool asymmetric = true;
bool wDR = false;
bool FwdSquare = false;
bool FwdConfig = false;
bool longer = true;
bool tailcatcher = true;
} // namespace SETTING
} // namespace G4LFHCAL

Expand Down Expand Up @@ -102,9 +103,12 @@ TString GetMappingFile(){
else if (G4LFHCAL::SETTING::asymmetric)
{
if (Enable::IP6){
if (G4LFHCAL::SETTING::longer)
mappinFileName += "/LFHcal/mapping/towerMap_LFHCAL_IP6-asymmetric-long.txt";
else
if (G4LFHCAL::SETTING::longer){
if (G4LFHCAL::SETTING::tailcatcher)
mappinFileName += "/LFHcal/mapping/towerMap_LFHCAL_IP6-asymmetric-long-tailcatcher.txt";
else
mappinFileName += "/LFHcal/mapping/towerMap_LFHCAL_IP6-asymmetric-long.txt";
} else
mappinFileName += "/LFHcal/mapping/towerMap_LFHCAL_IP6-asymmetric.txt";
} else {
if (G4LFHCAL::SETTING::longer)
Expand Down Expand Up @@ -162,7 +166,7 @@ void LFHCALSetup(PHG4Reco *g4Reco)
fhcal->SetTowerMappingFile(mapping_fhcal_s.str());
fhcal->OverlapCheck(OverlapCheck);
fhcal->SetActive();
fhcal->SetDetailed(true);
//fhcal->SetDetailed(true);
fhcal->SuperDetector("LFHCAL");
if (AbsorberActive) fhcal->SetAbsorberActive();

Expand Down
Loading

0 comments on commit b732898

Please sign in to comment.