Skip to content

Commit 78e4af0

Browse files
authored
[PWGJE,EMCAL-670] Add option to use Run2 alignment (#11892)
1 parent cec4bc8 commit 78e4af0

File tree

1 file changed

+4
-18
lines changed

1 file changed

+4
-18
lines changed

PWGJE/TableProducer/emcalCorrectionTask.cxx

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ struct EmcalCorrectionTask {
112112
Configurable<bool> applyCellTimeCorrection{"applyCellTimeCorrection", true, "apply a correction to the cell time for data and MC: Shift both average cell times to 0 and smear MC time distribution to fit data better. For MC requires isMC to be true"};
113113
Configurable<float> trackMinPt{"trackMinPt", 0.3, "Minimum pT for tracks to perform track matching, to reduce computing time. Tracks below a certain pT will be loopers anyway."};
114114
Configurable<bool> fillQA{"fillQA", false, "Switch to turn on QA histograms."};
115+
Configurable<bool> useCCDBAlignment{"useCCDBAlignment", false, "EXPERTS ONLY! Switch to use the alignment object stored in CCDB instead of using the default alignment from the global geometry object."};
115116

116117
// Require EMCAL cells (CALO type 1)
117118
Filter emccellfilter = aod::calo::caloType == selectedCellType;
@@ -166,6 +167,9 @@ struct EmcalCorrectionTask {
166167
if (!geometry) {
167168
LOG(error) << "Failure accessing geometry";
168169
}
170+
if (useCCDBAlignment.value) {
171+
geometry->SetMisalMatrixFromCcdb();
172+
}
169173

170174
// read all the cluster definitions specified in the options
171175
if (clusterDefinitions->length()) {
@@ -350,12 +354,6 @@ struct EmcalCorrectionTask {
350354

351355
fillQAHistogram(cellsBC);
352356

353-
// TODO: Helpful for now, but should be removed.
354-
LOG(debug) << "Converted EMCAL cells";
355-
for (const auto& cell : cellsBC) {
356-
LOG(debug) << cell.getTower() << ": E: " << cell.getEnergy() << ", time: " << cell.getTimeStamp() << ", type: " << cell.getType();
357-
}
358-
359357
LOG(debug) << "Converted cells. Contains: " << cellsBC.size() << ". Originally " << cellsInBC.size() << ". About to run clusterizer.";
360358
// this is a test
361359
// Run the clusterizers
@@ -482,12 +480,6 @@ struct EmcalCorrectionTask {
482480

483481
fillQAHistogram(cellsBC);
484482

485-
// TODO: Helpful for now, but should be removed.
486-
LOG(debug) << "Converted EMCAL cells";
487-
for (const auto& cell : cellsBC) {
488-
LOG(debug) << cell.getTower() << ": E: " << cell.getEnergy() << ", time: " << cell.getTimeStamp() << ", type: " << cell.getType();
489-
}
490-
491483
LOG(debug) << "Converted cells. Contains: " << cellsBC.size() << ". Originally " << cellsInBC.size() << ". About to run clusterizer.";
492484
// this is a test
493485
// Run the clusterizers
@@ -597,12 +589,6 @@ struct EmcalCorrectionTask {
597589

598590
fillQAHistogram(cellsBC);
599591

600-
// TODO: Helpful for now, but should be removed.
601-
LOG(debug) << "Converted EMCAL cells";
602-
for (const auto& cell : cellsBC) {
603-
LOG(debug) << cell.getTower() << ": E: " << cell.getEnergy() << ", time: " << cell.getTimeStamp() << ", type: " << cell.getType();
604-
}
605-
606592
LOG(debug) << "Converted cells. Contains: " << cellsBC.size() << ". Originally " << cellsInBC.size() << ". About to run clusterizer.";
607593

608594
// this is a test

0 commit comments

Comments
 (0)