1 #ifndef MACRO_G4CEMCSPACAL_C
2 #define MACRO_G4CEMCSPACAL_C
21 #include <caloreco/RawClusterBuilderGraph.h>
22 #include <caloreco/RawClusterBuilderTemplate.h>
23 #include <caloreco/RawClusterPositionCorrection.h>
24 #include <caloreco/RawTowerCalibration.h>
25 #include <qa_modules/QAG4SimulationCalorimeter.h>
35 R__LOAD_LIBRARY(libcalo_reco.so)
36 R__LOAD_LIBRARY(libg4calo.so)
37 R__LOAD_LIBRARY(libg4detectors.so)
38 R__LOAD_LIBRARY(libg4eval.so)
39 R__LOAD_LIBRARY(libqa_modules.so)
109 <<
"G4_CEmc_Spacal.C::CEmc - Fatal Error - unrecognized SPACAL configuration #"
123 double emc_inner_radius = 95.;
124 double cemcthickness = 12.7;
125 double emc_outer_radius = emc_inner_radius + cemcthickness;
127 if (radius > emc_inner_radius)
129 cout <<
"inconsistency: pstof outer radius: " << radius
130 <<
" larger than emc inner radius: " << emc_inner_radius
138 cout <<
"G4_CEmc_Spacal.C::CEmc() - expect radius < " << emc_inner_radius - 1.5 -
no_overlapp <<
" to install SPACAL" << endl;
169 cout <<
"layer discrepancy, current layer " << ilayer
173 radius += cemcthickness;
202 double emc_inner_radius = 92;
206 double emc_outer_radius = emc_inner_radius + cemcthickness;
207 assert(emc_outer_radius < 116);
209 if (radius > emc_inner_radius)
211 cout <<
"inconsistency: preshower radius+thickness: " << radius
212 <<
" larger than emc inner radius: " << emc_inner_radius << endl;
217 radius = emc_inner_radius;
262 cemc->
SetCalibrationFileDir(
string(getenv(
"CALIBRATIONROOT")) +
string(
"/CEMC/Geometry_2018ProjTilted/"));
275 cout <<
"layer discrepancy, current layer " << ilayer
279 radius += cemcthickness;
299 const double radius = 95;
300 cemc_cells->
cellsize(
i, 2 * M_PI / 256. * radius, 2 * M_PI / 256. * radius);
310 string(getenv(
"CALIBRATIONROOT")) +
string(
"/CEMC/LightCollection/Prototype3Module.xml"),
311 "data_grid_light_guide_efficiency",
"data_grid_fiber_trans");
316 cout <<
"G4_CEmc_Spacal.C::CEmc - Fatal Error - unrecognized SPACAL configuration #"
337 double sampling_fraction = 1;
340 sampling_fraction = 0.0234335;
347 sampling_fraction = 2
e-02;
352 <<
"G4_CEmc_Spacal.C::CEMC_Towers - Fatal Error - unrecognized SPACAL configuration #"
358 const double photoelectron_per_GeV = 500;
372 string(getenv(
"CALIBRATIONROOT")) +
string(
"/CEMC/TowerCalibCombinedParams_2020/"));
404 string(getenv(
"CALIBRATIONROOT")) +
string(
"/CEMC/TowerCalibCombinedParams_2020/"));
413 cout <<
"G4_CEmc_Spacal.C::CEMC_Towers - Fatal Error - unrecognized SPACAL configuration #"
436 emc_prof +=
"/EmcProfile/CEMCprof_Thresh30MeV.root";
449 cout <<
"CEMC_Clusters - unknown clusterizer setting!" << endl;
455 clusterCorrection->Get_eclus_CalibrationParameters().ReadFromFile(
"CEMC_RECALIB",
"xml", 0, 0,
457 string(getenv(
"CALIBRATIONROOT")) +
string(
"/CEMC/PositionRecalibration_EMCal_9deg_tilt/"));
459 clusterCorrection->Get_ecore_CalibrationParameters().ReadFromFile(
"CEMC_ECORE_RECALIB",
"xml", 0, 0,
461 string(getenv(
"CALIBRATIONROOT")) +
string(
"/CEMC/PositionRecalibration_EMCal_9deg_tilt/"));