Skip to content

Commit 194a196

Browse files
authored
Merge c3f4229 into sapling-pr-archive-ktf
2 parents f8216c9 + c3f4229 commit 194a196

File tree

73 files changed

+1771
-1024
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1771
-1024
lines changed

CCDB/include/CCDB/CcdbApi.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,11 @@ class CcdbApi //: public DatabaseInterface
348348
TObject* retrieveFromTFile(std::string const& path, std::map<std::string, std::string> const& metadata, long timestamp,
349349
std::map<std::string, std::string>* headers, std::string const& etag,
350350
const std::string& createdNotAfter, const std::string& createdNotBefore) const;
351+
void loadFileToMemory(std::vector<char>& dest, std::string const& path,
352+
std::map<std::string, std::string> const& metadata, long timestamp,
353+
std::map<std::string, std::string>* headers, std::string const& etag,
354+
const std::string& createdNotAfter, const std::string& createdNotBefore, bool considerSnapshot = true) const;
355+
351356
#if !defined(__CINT__) && !defined(__MAKECINT__) && !defined(__ROOTCLING__) && !defined(__CLING__)
352357
typedef struct RequestContext {
353358
o2::pmr::vector<char>& dest;

CCDB/src/CcdbApi.cxx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1870,6 +1870,21 @@ void CcdbApi::saveSnapshot(RequestContext& requestContext) const
18701870
}
18711871
}
18721872

1873+
void CcdbApi::loadFileToMemory(std::vector<char>& dest, std::string const& path,
1874+
std::map<std::string, std::string> const& metadata, long timestamp,
1875+
std::map<std::string, std::string>* headers, std::string const& etag,
1876+
const std::string& createdNotAfter, const std::string& createdNotBefore, bool considerSnapshot) const
1877+
{
1878+
o2::pmr::vector<char> destP;
1879+
destP.reserve(dest.size());
1880+
loadFileToMemory(destP, path, metadata, timestamp, headers, etag, createdNotAfter, createdNotBefore, considerSnapshot);
1881+
dest.clear();
1882+
dest.reserve(destP.size());
1883+
for (const auto c : destP) {
1884+
dest.push_back(c);
1885+
}
1886+
}
1887+
18731888
void CcdbApi::loadFileToMemory(o2::pmr::vector<char>& dest, std::string const& path,
18741889
std::map<std::string, std::string> const& metadata, long timestamp,
18751890
std::map<std::string, std::string>* headers, std::string const& etag,

Common/DCAFitter/include/DCAFitter/DCAFitterN.h

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,13 @@ class DCAFitterN
324324
pnt[2] = tr.getZ();
325325
}
326326

327+
GPUdi() void clearLogThrottlers()
328+
{
329+
mLoggerBadCov.clear();
330+
mLoggerBadInv.clear();
331+
mLoggerBadProp.clear();
332+
}
333+
327334
void setBadCovPolicy(BadCovPolicy v) { mBadCovPolicy = v; }
328335
BadCovPolicy getBadCovPolicy() const { return mBadCovPolicy; }
329336

@@ -1084,10 +1091,16 @@ template <int N, typename... Args>
10841091
GPUd() void DCAFitterN<N, Args...>::print() const
10851092
{
10861093
#ifndef GPUCA_GPUCODE_DEVICE
1087-
LOG(info) << N << "-prong vertex fitter in " << (mUseAbsDCA ? "abs." : "weighted") << " distance minimization mode";
1088-
LOG(info) << "Bz: " << mBz << " MaxIter: " << mMaxIter << " MaxChi2: " << mMaxChi2;
1094+
LOG(info) << N << "-prong vertex fitter in " << (mUseAbsDCA ? "abs." : "weighted") << " distance minimization mode, collinear tracks mode: " << (mIsCollinear ? "ON" : "OFF");
1095+
LOG(info) << "Bz: " << mBz << " MaxIter: " << mMaxIter << " MaxChi2: " << mMaxChi2 << " MatCorrType: " << int(mMatCorr);
10891096
LOG(info) << "Stopping condition: Max.param change < " << mMinParamChange << " Rel.Chi2 change > " << mMinRelChi2Change;
10901097
LOG(info) << "Discard candidates for : Rvtx > " << getMaxR() << " DZ between tracks > " << mMaxDZIni;
1098+
LOG(info) << "PropagateToPCA:" << mPropagateToPCA << " WeightedFinalPCA:" << mWeightedFinalPCA << " UsePropagator:" << mUsePropagator << " RefitWithMatCorr:" << mRefitWithMatCorr;
1099+
std::string rep{};
1100+
for (int i = 0; i < mCrossings.nDCA; i++) {
1101+
rep += fmt::format("seed{}:{}/{} ", i, mTrPropDone[i], mPropFailed[i]);
1102+
}
1103+
LOG(info) << "Last call: NCand:" << mCurHyp << " from " << mCrossings.nDCA << " seeds, prop.done/failed: " << rep;
10911104
#else
10921105
if (mUseAbsDCA) {
10931106
printf("%d-prong vertex fitter in abs. distance minimization mode\n", N);

Common/DCAFitter/test/testDCAFitterN.cxx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ BOOST_AUTO_TEST_CASE(DCAFitterNProngs)
238238
BOOST_CHECK(meanDA < 0.1);
239239
BOOST_CHECK(meanDAW < 0.1);
240240
BOOST_CHECK(meanDW < 0.1);
241+
ft.print();
241242
}
242243

243244
// 2 prongs vertices with collinear tracks (gamma conversion)
@@ -316,6 +317,7 @@ BOOST_AUTO_TEST_CASE(DCAFitterNProngs)
316317
BOOST_CHECK(meanDA < 2.1);
317318
BOOST_CHECK(meanDAW < 2.1);
318319
BOOST_CHECK(meanDW < 2.1);
320+
ft.print();
319321
}
320322

321323
// 2 prongs vertices with one of charges set to 0: Helix : Line
@@ -394,6 +396,7 @@ BOOST_AUTO_TEST_CASE(DCAFitterNProngs)
394396
BOOST_CHECK(meanDA < 0.1);
395397
BOOST_CHECK(meanDAW < 0.1);
396398
BOOST_CHECK(meanDW < 0.1);
399+
ft.print();
397400
}
398401

399402
// 2 prongs vertices with both of charges set to 0: Line : Line
@@ -471,6 +474,7 @@ BOOST_AUTO_TEST_CASE(DCAFitterNProngs)
471474
BOOST_CHECK(meanDA < 0.1);
472475
BOOST_CHECK(meanDAW < 0.1);
473476
BOOST_CHECK(meanDW < 0.1);
477+
ft.print();
474478
}
475479

476480
// 3 prongs vertices
@@ -547,8 +551,8 @@ BOOST_AUTO_TEST_CASE(DCAFitterNProngs)
547551
BOOST_CHECK(meanDA < 0.1);
548552
BOOST_CHECK(meanDAW < 0.1);
549553
BOOST_CHECK(meanDW < 0.1);
554+
ft.print();
550555
}
551-
552556
outStream.Close();
553557
}
554558

Common/Topologies/o2prototype_topology.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ The following parameters need adjustment when extending the FLP-EPN configuratio
7474
</decltask>
7575

7676
<decltask id="tracker">
77-
<exe reachable="true">$ALICEO2_INSTALL_DIR/bin/aliceHLTWrapper Tracker_%collectionIndex%_%taskIndex% 1 --dds --poll-period 100 --input type=pull,size=5000,method=connect,property=EPNReceiverOutputAddress,count=1 --output type=push,size=500,method=bind,property=TrackingOutputAddress,min-port=48000 --library libAliHLTTPC.so --component TPCCATracker --run 167808 --parameter '-GlobalTracking -allowGPU -GPUHelperThreads 4 -loglevel=0x7c'</exe>
77+
<exe reachable="true">$ALICEO2_INSTALL_DIR/bin/aliceHLTWrapper Tracker_%collectionIndex%_%taskIndex% 1 --dds --poll-period 100 --input type=pull,size=5000,method=connect,property=EPNReceiverOutputAddress,count=1 --output type=push,size=500,method=bind,property=TrackingOutputAddress,min-port=48000 --library libAliHLTTPC.so --component TPCCATracker --run 167808 --parameter '-GlobalTracking -allowGPU -loglevel=0x7c'</exe>
7878
<!-- <requirement></requirement> -->
7979
<properties>
8080
<id access="read">EPNReceiverOutputAddress</id>

Detectors/MUON/MCH/Align/src/AlignmentSpec.cxx

Lines changed: 44 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,21 @@ class AlignmentTask
208208

209209
auto doEvaluation = ic.options().get<bool>("do-evaluation");
210210
mAlign.SetDoEvaluation(doEvaluation);
211+
211212
// Variation range for parameters
212-
mAlign.SetAllowedVariation(0, 2.0);
213-
mAlign.SetAllowedVariation(1, 0.3);
214-
mAlign.SetAllowedVariation(2, 0.002);
215-
mAlign.SetAllowedVariation(3, 2.0);
213+
auto AllowX = ic.options().get<float>("variation-x");
214+
auto AllowY = ic.options().get<float>("variation-y");
215+
auto AllowPhi = ic.options().get<float>("variation-phi");
216+
auto AllowZ = ic.options().get<float>("variation-z");
217+
mAlign.SetAllowedVariation(0, AllowX);
218+
mAlign.SetAllowedVariation(1, AllowY);
219+
mAlign.SetAllowedVariation(2, AllowPhi);
220+
mAlign.SetAllowedVariation(3, AllowZ);
221+
222+
// Sigma XY
223+
auto SigmaX = ic.options().get<float>("sigma-x");
224+
auto SigmaY = ic.options().get<float>("sigma-y");
225+
mAlign.SetSigmaXY(SigmaX, SigmaY);
216226

217227
// Configuration for track fitter
218228
const auto& trackerParam = TrackerParam::Instance();
@@ -223,14 +233,28 @@ class AlignmentTask
223233
mImproveCutChi2 = 2. * trackerParam.sigmaCutForImprovement * trackerParam.sigmaCutForImprovement;
224234

225235
// Fix chambers
226-
auto input_fixchambers = ic.options().get<string>("fix-chamber");
227-
std::stringstream string_chambers(input_fixchambers);
228-
string_chambers >> std::ws;
229-
while (string_chambers.good()) {
230-
string substr;
231-
std::getline(string_chambers, substr, ',');
232-
LOG(info) << Form("%s%d", "Fixing chamber: ", std::stoi(substr));
233-
mAlign.FixChamber(std::stoi(substr));
236+
TString chambersString = ic.options().get<string>("fix-chamber");
237+
std::unique_ptr<TObjArray> objArray(chambersString.Tokenize(","));
238+
if (objArray->GetEntries() > 0) {
239+
for (int iVar = 0; iVar < objArray->GetEntries(); ++iVar) {
240+
LOG(info) << Form("%s%d", "Fixing chamber: ", std::stoi(objArray->At(iVar)->GetName()));
241+
mAlign.FixChamber(std::stoi(objArray->At(iVar)->GetName()));
242+
}
243+
}
244+
245+
// Fix DEs
246+
TString DEString = ic.options().get<string>("fix-de");
247+
TString MaskDEString = ic.options().get<string>("mask-fix-de");
248+
std::unique_ptr<TObjArray> objArrayDE(DEString.Tokenize(","));
249+
std::unique_ptr<TObjArray> objArrayMask(MaskDEString.Tokenize(","));
250+
if (objArrayDE->GetEntries() > 0) {
251+
if (objArrayDE->GetEntries() != objArrayMask->GetEntries()) {
252+
LOG(fatal) << "Inconsistent size of DEs and Masks!";
253+
}
254+
for (int iVar = 0; iVar < objArrayDE->GetEntries(); ++iVar) {
255+
LOG(info) << Form("%s%d%s%d", "Fixing DE: ", std::stoi(objArrayDE->At(iVar)->GetName()), " with mask: ", std::stoi(objArrayMask->At(iVar)->GetName()));
256+
mAlign.FixDetElem(std::stoi(objArrayDE->At(iVar)->GetName()), std::stoi(objArrayMask->At(iVar)->GetName()));
257+
}
234258
}
235259

236260
doMatched = ic.options().get<bool>("matched");
@@ -902,6 +926,14 @@ o2::framework::DataProcessorSpec getAlignmentSpec(bool disableCCDB)
902926
{"matched", VariantType::Bool, false, {"Switch for using MCH-MID matched tracks"}},
903927
{"fix-chamber", VariantType::String, "", {"Chamber fixing, ex 1,2,3"}},
904928
{"use-record", VariantType::Bool, false, {"Option for directly using record in alignment if provided"}},
929+
{"variation-x", VariantType::Float, 2.0, {"Allowed variation for x axis in cm"}},
930+
{"variation-y", VariantType::Float, 0.3, {"Allowed variation for y axis in cm"}},
931+
{"variation-phi", VariantType::Float, 0.002, {"Allowed variation for phi axis in rad"}},
932+
{"variation-z", VariantType::Float, 2.0, {"Allowed variation for z axis in cm"}},
933+
{"sigma-x", VariantType::Float, 1000.0, {"Sigma cut along X"}},
934+
{"sigma-y", VariantType::Float, 1000.0, {"Sigma cut along Y"}},
935+
{"fix-de", VariantType::String, "", {"DE fixing, ex 101,1019"}},
936+
{"mask-fix-de", VariantType::String, "", {"Mask for DE d.o.f fixing, ex 0,2,4"}},
905937
{"output", VariantType::String, "Alignment", {"Option for name of output file"}}}};
906938
}
907939

Detectors/MUON/MCH/Mapping/Impl4/src/GenCathodeSegmentationCreatorForSegType0.cxx

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -272,12 +272,12 @@ CathodeSegmentation* createSegType0(bool isBendingPlane)
272272
/* 1BG */ {3, 16, {61, 9, 63, 14, 7, 8, 58, 62, 21, 54, 19, 60, 5, 12, 56, 2, 6, 55, 44, 51, 0, 11, 4, 46, 35, 36, 42, 17, 33, 15, 23, 32, 20, 24, 43, 22, 49, 25, 45, 27, 28, 47, 53, 41, 29, 30, 31, 40}},
273273
/* 1BH */ {3, 16, {7, 9, 63, 61, 62, 60, 19, 21, 16, 58, 56, 57, 12, 6, 55, 54, 52, 0, 51, 48, 46, 2, 4, 42, 44, 13, 35, 11, 34, 33, 17, 32, 20, 23, 22, 43, 25, 47, 45, 49, 50, 27, 31, 29, -1, 40, 30, -1}},
274274
/* 1BI */ {2, 16, {7, 9, 61, 62, 19, 21, 58, 56, 12, 6, 54, 52, 51, 48, 2, 4, 44, 13, 11, 34, 17, 32, 23, 22, 25, 47, 49, 50, 31, 29, 40, 30}},
275-
/* 1BG */
276-
{1,
277-
16,
278-
{59, 16, 57, 10, 52, 1, 48, 3, 13, 34, 18, 37, 38, 26, 50, 39}}},
275+
/* 1BG */ {1, 16, {59, 16, 57, 10, 52, 1, 48, 3, 13, 34, 18, 37, 38, 26, 50, 39}}},
279276
/* PS */
280-
{{0.63, 0.42}, {0.84, 0.42}, {1.26, 0.42}, {2.52, 0.42}}};
277+
{{0.63, 0.42},
278+
{0.84, 0.42},
279+
{1.26, 0.42},
280+
{2.52, 0.42}}};
281281
} else {
282282
return new CathodeSegmentation{
283283
0,
@@ -515,8 +515,7 @@ CathodeSegmentation* createSegType0(bool isBendingPlane)
515515
{1267, 14, 3, -0.3149999976, 85.88999939}},
516516
/* PGT */
517517
{/* 1NA */ {4, 16, {59, 63, 9, 61, 16, 8, 7, 14, 57, 21, 62, 58, 10, 60, 19, 54, 0, 56, 12, 5, 52, 55, 6, 51, 3, 1, 2, 11, 48, 4, 46, 44, 42, 13, 15, 17, 18, 36, 20, 35, 34, 33, 23, 32, 22, 37, 25, 38, 24, 26, 43, 28, 45, 27, 49, 47, 29, 50, 31, 30, 41, 40, 39, 53}},
518-
/* 1NB */
519-
{13, 6, {-1, -1, -1, -1, -1, 1, 6, -1, -1, -1, -1, -1, -1, -1, -1, 15, 4, 51, 42, 48, 3, 10, 56, 60, 8, 62, -1, 18, 34, 20, 22, 33, 44, 13, 52, 55, 16, 21, 63, 26, 38, 40, 41, 53, 45, 37, 36, 46, 0, 57, 59, 9, 29, 50, 30, 39, 31, 47, 24, 35, 11, 2, 12, 19, 7, 49, 27, 28, 25, 43, 23, 32, 17, 5, 54, 14, 58, 61}},
518+
/* 1NB */ {13, 6, {-1, -1, -1, -1, -1, 1, 6, -1, -1, -1, -1, -1, -1, -1, -1, 15, 4, 51, 42, 48, 3, 10, 56, 60, 8, 62, -1, 18, 34, 20, 22, 33, 44, 13, 52, 55, 16, 21, 63, 26, 38, 40, 41, 53, 45, 37, 36, 46, 0, 57, 59, 9, 29, 50, 30, 39, 31, 47, 24, 35, 11, 2, 12, 19, 7, 49, 27, 28, 25, 43, 23, 32, 17, 5, 54, 14, 58, 61}},
520519
/* 1NC */ {10, 14, {-1, -1, -1, -1, -1, -1, -1, -1, 9, -1, -1, -1, -1, -1, -1, -1, -1, 63, 7, -1, -1, -1, -1, -1, -1, -1, 8, 62, 60, -1, -1, -1, -1, -1, -1, 21, 61, 59, 19, -1, -1, -1, -1, -1, 16, 56, 14, 58, 12, -1, -1, -1, -1, 57, 55, 6, 54, 1, 0, -1, -1, 10, 5, 3, 52, 2, 51, 4, 48, -1, 11, 46, 13, 44, 36, 18, 17, 42, 15, -1, 20, 23, 22, 24, 37, 38, 33, 34, 35, -1, -1, -1, -1, -1, -1, -1, 26, 25, 32, -1, -1, -1, -1, -1, -1, -1, 45, 27, 43, -1, -1, -1, -1, -1, -1, -1, 29, 47, 28, -1, -1, -1, -1, -1, -1, -1, 49, 30, 50, 31, -1, -1, -1, -1, -1, -1, 53, 41, 40, 39}},
521520
/* 1ND */ {9, 21, {-1, -1, -1, -1, -1, -1, -1, -1, 9, -1, -1, -1, -1, -1, -1, -1, -1, 7, -1, -1, -1, -1, -1, -1, -1, 63, 62, -1, -1, -1, -1, -1, -1, -1, 8, 61, -1, -1, -1, -1, -1, -1, -1, 21, 19, -1, -1, -1, -1, -1, -1, 60, 14, 58, -1, -1, -1, -1, -1, -1, 10, 6, 54, -1, -1, -1, -1, -1, 16, 1, 2, 51, -1, -1, -1, -1, -1, 12, 48, 13, -1, -1, -1, -1, -1, 59, 5, 11, 18, -1, -1, -1, -1, -1, 55, 46, 36, 20, -1, -1, -1, -1, 56, 52, 44, 22, 24, -1, -1, -1, -1, 0, 15, 33, 26, 43, -1, -1, -1, 57, 17, 23, 45, 28, 30, -1, -1, -1, 34, 37, 27, 49, 39, 40, -1, -1, 4, 35, 38, 29, -1, -1, -1, -1, 3, 42, 32, 25, 31, -1, -1, -1, -1, -1, -1, -1, -1, 53, -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, -1, -1, -1, -1, -1, -1, 50, -1, -1, -1, -1, -1, -1, -1, -1, 47, -1, -1, -1, -1}},
522521
/* 1NE */ {8, 8, {8, 62, 63, 9, 7, 21, 19, 14, 56, 16, 59, 60, 61, 58, 57, 12, 3, 1, 55, 10, 6, 54, 0, 5, 13, 46, 48, 4, 2, 52, 51, 11, 20, 18, 36, 42, 44, 15, 17, 35, 37, 22, 33, 34, 23, 32, 24, 25, 38, 26, 45, 27, 43, 28, 47, 49, 29, 30, 50, 41, 31, 53, 39, 40}},
@@ -529,14 +528,13 @@ CathodeSegmentation* createSegType0(bool isBendingPlane)
529528
/* 1NL */ {5, 18, {-1, -1, 9, 62, 7, -1, -1, 63, 60, 61, -1, -1, 8, 21, 19, -1, -1, 16, 59, 14, -1, -1, 56, 58, 57, -1, -1, 10, 12, 6, -1, -1, 55, 54, 5, -1, -1, 1, 2, 0, -1, -1, 3, 51, 52, -1, 4, 48, 46, 11, -1, 13, 42, 15, 44, -1, 18, 34, 20, 17, -1, 36, 33, 32, 35, -1, 22, 38, 25, 23, -1, 26, 29, 27, 24, 37, 47, 30, 49, 43, 45, 50, 41, 39, 28, -1, -1, 53, 40, 31}},
530529
/* 1NM */ {5, 15, {-1, 8, -1, -1, -1, -1, 60, 63, 9, 7, -1, 56, 16, 62, 61, -1, 10, 14, 19, 21, -1, 6, 57, 58, 59, -1, 1, 55, 54, 12, -1, 3, 52, 0, 5, -1, 4, 48, 51, 2, 46, 13, 15, 44, 11, 42, 18, 34, 36, 17, 37, 24, 22, 20, 35, 45, 27, 26, 32, 23, 30, 49, 29, 38, 33, 53, 31, 50, 28, 25, 41, 39, 40, 47, 43}},
531530
/* 1NN */ {5, 14, {8, 62, 63, 9, -1, 60, 21, 61, 7, -1, 58, 16, 59, 19, -1, 14, 57, 56, 12, -1, 10, 54, 6, 0, 5, 55, 1, 52, 2, 51, 3, 4, 48, 11, 46, 13, 15, 42, 44, 17, 36, 18, 20, 35, 23, 34, 33, 22, 32, 24, 37, 38, 26, 25, 43, 27, 45, 47, 28, 49, -1, 29, 30, 31, 53, -1, 50, 41, 40, 39}},
532-
/* 1NG */
533-
{16,
534-
1,
535-
{41, 50, 38, 26, 45, 47, 29, 30, 53, 27, 43, 28, 49, 31, 39, 40}},
536-
/* 1NH */
537-
{12, 1, {41, 50, 38, 26, 45, 47, 29, 30, 53, 27, 43, 28}}},
531+
/* 1NG */ {16, 1, {41, 50, 38, 26, 45, 47, 29, 30, 53, 27, 43, 28, 49, 31, 39, 40}},
532+
/* 1NH */ {12, 1, {41, 50, 38, 26, 45, 47, 29, 30, 53, 27, 43, 28}}},
538533
/* PS */
539-
{{0.63, 0.42}, {0.63, 0.84}, {0.63, 1.68}, {0.63, 3.36}}};
534+
{{0.63, 0.42},
535+
{0.63, 0.84},
536+
{0.63, 1.68},
537+
{0.63, 3.36}}};
540538
}
541539
}
542540
class CathodeSegmentationCreatorRegisterCreateSegType0

0 commit comments

Comments
 (0)