You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: PWGJE/TableProducer/emcalCorrectionTask.cxx
+36-5Lines changed: 36 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -87,6 +87,7 @@ struct EmcalCorrectionTask {
87
87
Configurable<float> exoticCellInCrossMinAmplitude{"exoticCellInCrossMinAmplitude", 0.1, "Minimum energy of cells in cross, if lower not considered in cross"};
88
88
Configurable<bool> useWeightExotic{"useWeightExotic", false, "States if weights should be used for exotic cell cut"};
89
89
Configurable<bool> isMC{"isMC", false, "States if run over MC"};
90
+
Configurable<int> applyCellTimeShift{"applyCellTimeShift", 0, "apply shift to the cell time; 0 = off; 1 = const shift; 2 = eta-dependent shift"};
// This has to be done to shift the cell time in MC (which is not calibrated to 0 due to the flight time of the particles to the EMCal surface (~15ns))
795
+
floatgetCellTimeShift(constint16_t cellID)
796
+
{
797
+
if (isMC) {
798
+
if (applyCellTimeShift == 1) { // constant shift
799
+
LOG(debug) << "shift the cell time by 15ns";
800
+
return -15.f; // roughly calculated by assuming particles travel with v=c (photons) and EMCal is 4.4m away from vertex
801
+
} elseif (applyCellTimeShift == 2) { // eta dependent shift ( as larger eta values are further away from collision point)
802
+
// Use distance between vertex and EMCal (at eta = 0) and distance on EMCal surface (cell size times column) to calculate distance to cell
803
+
// 0.2 is cell size in m (0.06) divided by the speed of light in m/ns (0.3)
804
+
// 47.5 is the "middle" of the EMCal (2*48 cells in one column)
805
+
float timeCol = 0.2f * (geometry->GlobalCol(cellID) - 47.5f); // calculate time to get to specific column
806
+
float time = -sqrt(215.f + timeCol * timeCol); // 215 is 14.67ns^2 (time it takes to get the cell at eta = 0)
807
+
LOG(debug) << "shift the cell time by " << time << " applyCellTimeShift " << applyCellTimeShift;
0 commit comments