1010// or submit itself to any jurisdiction.
1111//
1212// *+-+*+-+*+-+*+-+*+-+*+-+*
13- // Lambdakzero PID
13+ // Strangeness TOF PID
1414// *+-+*+-+*+-+*+-+*+-+*+-+*
1515//
1616// / \author Nicolò Jacazio
@@ -162,23 +162,23 @@ struct strangenesstofpid {
162162
163163 // for n-sigma calibration
164164 bool nSigmaCalibLoaded;
165- TList* nSigmaCalibObjects;
166- TH1 *hMeanPosLaPi, *hSigmaPosLaPi;
167- TH1 *hMeanPosLaPr, *hSigmaPosLaPr;
168- TH1 *hMeanNegLaPi, *hSigmaNegLaPi;
169- TH1 *hMeanNegLaPr, *hSigmaNegLaPr;
170- TH1 *hMeanPosK0Pi, *hSigmaPosK0Pi;
171- TH1 *hMeanNegK0Pi, *hSigmaNegK0Pi;
172- TH1 *hMeanPosXiPi, *hSigmaPosXiPi;
173- TH1 *hMeanPosXiPr, *hSigmaPosXiPr;
174- TH1 *hMeanNegXiPi, *hSigmaNegXiPi;
175- TH1 *hMeanNegXiPr, *hSigmaNegXiPr;
176- TH1 *hMeanBachXiPi, *hSigmaBachXiPi;
177- TH1 *hMeanPosOmPi, *hSigmaPosOmPi;
178- TH1 *hMeanPosOmPr, *hSigmaPosOmPr;
179- TH1 *hMeanNegOmPi, *hSigmaNegOmPi;
180- TH1 *hMeanNegOmPr, *hSigmaNegOmPr;
181- TH1 *hMeanBachOmKa, *hSigmaBachOmKa;
165+ TList* nSigmaCalibObjects = nullptr ;
166+ TH1 *hMeanPosLaPi = nullptr , *hSigmaPosLaPi = nullptr ;
167+ TH1 *hMeanPosLaPr = nullptr , *hSigmaPosLaPr = nullptr ;
168+ TH1 *hMeanNegLaPi = nullptr , *hSigmaNegLaPi = nullptr ;
169+ TH1 *hMeanNegLaPr = nullptr , *hSigmaNegLaPr = nullptr ;
170+ TH1 *hMeanPosK0Pi = nullptr , *hSigmaPosK0Pi = nullptr ;
171+ TH1 *hMeanNegK0Pi = nullptr , *hSigmaNegK0Pi = nullptr ;
172+ TH1 *hMeanPosXiPi = nullptr , *hSigmaPosXiPi = nullptr ;
173+ TH1 *hMeanPosXiPr = nullptr , *hSigmaPosXiPr = nullptr ;
174+ TH1 *hMeanNegXiPi = nullptr , *hSigmaNegXiPi = nullptr ;
175+ TH1 *hMeanNegXiPr = nullptr , *hSigmaNegXiPr = nullptr ;
176+ TH1 *hMeanBachXiPi = nullptr , *hSigmaBachXiPi = nullptr ;
177+ TH1 *hMeanPosOmPi = nullptr , *hSigmaPosOmPi = nullptr ;
178+ TH1 *hMeanPosOmPr = nullptr , *hSigmaPosOmPr = nullptr ;
179+ TH1 *hMeanNegOmPi = nullptr , *hSigmaNegOmPi = nullptr ;
180+ TH1 *hMeanNegOmPr = nullptr , *hSigmaNegOmPr = nullptr ;
181+ TH1 *hMeanBachOmKa = nullptr , *hSigmaBachOmKa = nullptr ;
182182
183183 int mRunNumber ;
184184 float d_bz;
@@ -191,7 +191,7 @@ struct strangenesstofpid {
191191 kNEnums };
192192
193193 // / function to calculate track length of this track up to a certain segment of a detector
194- // / to be used internally in another funcrtion that calculates length until it finds the proper one
194+ // / to be used internally in another function that calculates length until it finds the proper one
195195 // / warning: this could be optimised further for speed
196196 // / \param track the input track
197197 // / \param x1 x of the first point of the detector segment
@@ -1169,7 +1169,13 @@ struct strangenesstofpid {
11691169 return ;
11701170 }
11711171 auto firstTOFPID = dauTrackTOFPIDs.rawIteratorAt (0 );
1172- bool isNewTOFFOrmat = firstTOFPID.straCollisionId () < 0 ? false : true ;
1172+ bool isNewTOFFormat = firstTOFPID.straCollisionId () < 0 ? false : true ;
1173+
1174+ LOGF (info, " Processing derived data. Is this the new TOF info format? %i" , isNewTOFFormat);
1175+
1176+ if (!isNewTOFFormat && calculationMethod.value > 0 ) {
1177+ LOGF (fatal, " Using the old derived data format with the new calculation method is not viable due to lack of needed info! Crashing." );
1178+ }
11731179
11741180 // Fire up CCDB with first collision in record. If no collisions, bypass
11751181 if (useCustomRunNumber || collisions.size () < 1 ) {
@@ -1182,7 +1188,7 @@ struct strangenesstofpid {
11821188 // hold indices
11831189 std::vector<int > tofIndices (dauTrackTable.size (), -1 );
11841190
1185- if (isNewTOFFOrmat ) {
1191+ if (isNewTOFFormat ) {
11861192 // re-index
11871193 for (const auto & dauTrackTOFPID : dauTrackTOFPIDs) {
11881194 tofIndices[dauTrackTOFPID.dauTrackExtraId ()] = dauTrackTOFPID.globalIndex ();
0 commit comments