Skip to content

Commit 62b69d2

Browse files
Add missing changes
1 parent c9ed006 commit 62b69d2

1 file changed

Lines changed: 21 additions & 4 deletions

File tree

PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,28 @@ struct strangenesstofpid {
152152

153153
// CCDB options
154154
struct : ConfigurableGroup {
155-
std::string prefix = "ccdb";
155+
// std::string prefix = "ccdb";
156156
Configurable<std::string> ccdburl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
157157
Configurable<std::string> grpPath{"grpPath", "GLO/GRP/GRP", "Path of the grp file"};
158158
Configurable<std::string> grpmagPath{"grpmagPath", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object"};
159159
Configurable<std::string> lutPath{"lutPath", "GLO/Param/MatLUT", "Path of the Lut parametrization"};
160160
Configurable<std::string> nSigmaPath{"nSigmaPath", "Users/d/ddobrigk/stratof", "Path of information for n-sigma calculation"};
161161
Configurable<std::string> mVtxPath{"mVtxPath", "GLO/Calib/MeanVertex", "Path of the mean vertex file"};
162+
// necessary for TOFResponse
163+
Configurable<std::string> grpLhcIfPath{"ccdb-path-grplhcif", "GLO/Config/GRPLHCIF", "Path on the CCDB for the GRPLHCIF object"};
164+
Configurable<int64_t> timestamp{"ccdb-timestamp", -1, "timestamp of the object"};
165+
Configurable<std::string> timeShiftCCDBPathPos{"timeShiftCCDBPathPos", "Analysis/PID/TOFOffsetPos", "Path of the TOF time shift vs eta for pos. tracks. If empty none is taken"};
166+
Configurable<std::string> timeShiftCCDBPathNeg{"timeShiftCCDBPathNeg", "Analysis/PID/TOFOffsetNeg", "Path of the TOF time shift vs eta for neg. tracks. If empty none is taken"};
167+
Configurable<std::string> timeShiftCCDBPathPosMC{"timeShiftCCDBPathPosMC", "", "Path of the TOF time shift for MC vs eta for pos. tracks. If empty none is taken"};
168+
Configurable<std::string> timeShiftCCDBPathNegMC{"timeShiftCCDBPathNegMC", "", "Path of the TOF time shift for MC vs eta for neg. tracks. If empty none is taken"};
169+
Configurable<std::string> paramFileName{"paramFileName", "", "Path to the parametrization object. If empty the parametrization is not taken from file"};
170+
Configurable<std::string> parametrizationPath{"parametrizationPath", "TOF/Calib/Params", "Path of the TOF parametrization on the CCDB or in the file, if the paramFileName is not empty"};
171+
Configurable<std::string> reconstructionPass{"reconstructionPass", "metadata", {"Apass to use when fetching the calibration tables. Empty (default) does not check for any pass. Use `metadata` to fetch it from the AO2D metadata. Otherwise it will override the metadata."}};
172+
Configurable<std::string> reconstructionPassDefault{"reconstructionPassDefault", "unanchored", {"Default pass to get if the standard one is not found"}};
173+
Configurable<bool> fatalOnPassNotAvailable{"fatalOnPassNotAvailable", false, "Flag to throw a fatal if the pass is not available in the retrieved CCDB object"};
174+
Configurable<bool> enableTimeDependentResponse{"enableTimeDependentResponse", true, "Flag to use the collision timestamp to fetch the PID Response"};
175+
Configurable<int> collisionSystem{"collisionSystem", -1, "Collision system: -1 (autoset), 0 (pp), 1 (PbPb), 2 (XeXe), 3 (pPb)"};
176+
Configurable<bool> autoSetProcessFunctions{"autoSetProcessFunctions", true, "Flag to autodetect the process functions to use"};
162177
} ccdbConfigurations;
163178

164179
// manual
@@ -445,7 +460,8 @@ struct strangenesstofpid {
445460
ccdb->setFatalWhenNull(false);
446461

447462
LOGF(info, "intializing TOFResponse");
448-
mTOFResponse->initSetup(ccdb, initContext);
463+
std::string taskName = initContext.services().get<o2::framework::DeviceSpec const>().name;
464+
mTOFResponse->initSetup(ccdb, initContext, taskName);
449465

450466
// per event
451467
histos.add("hCandidateCounter", "hCandidateCounter", kTH1F, {{500, -0.5f, 499.5f}});
@@ -467,6 +483,7 @@ struct strangenesstofpid {
467483
histos.add("h2dTOFSignalCascadeBachelor", "h2dTOFSignalCascadeBachelor", kTH2F, {axes.axisTimeLong, axes.axisBCshift});
468484

469485
histos.add("hCollisionTimes", "hCollisionTimes", kTH1F, {{2000, -1000.0f, 1000.0f}});
486+
histos.add("hCollisionTimesError", "hCollisionTimesError", kTH1F, {{2000, -1000.0f, 1000.0f}});
470487

471488
// measured vs expected total time QA
472489
if (doQA) {
@@ -1897,12 +1914,12 @@ struct strangenesstofpid {
18971914

18981915
for (const auto& collision : collisions) {
18991916
histos.fill(HIST("hCollisionTimes"), collision.eventTime());
1917+
histos.fill(HIST("hCollisionTimesError"), collision.eventTimeErr());
19001918
}
19011919

19021920
// auto-determine if using old format
19031921
if (dauTrackTOFPIDs.size() != 0) {
1904-
auto firstTOFPID = dauTrackTOFPIDs.rawIteratorAt(0);
1905-
isNewTOFFormat = firstTOFPID.straCollisionId() < 0 ? false : true;
1922+
isNewTOFFormat = dauTrackTable.size() == dauTrackTOFPIDs.size() ? false : true;
19061923
}
19071924

19081925
if (!isNewTOFFormat && calculationMethod.value > 0) {

0 commit comments

Comments
 (0)