Skip to content

Commit a4b90c3

Browse files
authored
Merge branch 'AliceO2Group:dev' into fd3_digits
2 parents fe1b8f5 + b2ebc90 commit a4b90c3

139 files changed

Lines changed: 4421 additions & 1820 deletions

File tree

Some content is hidden

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

Common/Constants/include/CommonConstants/PhysicsConstants.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ enum Pdg {
6464
kJPsi = 443,
6565
kLambdaB0 = 5122,
6666
kLambdaCPlus = 4122,
67+
kLambdaCPlus2860 = 24124,
68+
kLambdaCPlus2880 = 24126,
69+
kLambdaCPlus2940 = 4125,
6770
kOmegaC0 = 4332,
6871
kK0Star892 = 313,
6972
kKPlusStar892 = 323,
@@ -131,6 +134,9 @@ constexpr double MassChiC1 = 3.51067;
131134
constexpr double MassJPsi = 3.0969;
132135
constexpr double MassLambdaB0 = 5.6196;
133136
constexpr double MassLambdaCPlus = 2.28646;
137+
constexpr double MassLambdaCPlus2860 = 2.8561;
138+
constexpr double MassLambdaCPlus2880 = 2.8816;
139+
constexpr double MassLambdaCPlus2940 = 2.9396;
134140
constexpr double MassOmegaC0 = 2.6952;
135141
constexpr double MassK0Star892 = 0.89555;
136142
constexpr double MassKPlusStar892 = 0.89167;

Common/Constants/include/CommonConstants/make_pdg_header.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ class Pdg(Enum):
122122
kJPsi = 443
123123
kLambdaB0 = 5122
124124
kLambdaCPlus = 4122
125+
kLambdaCPlus2860 = 24124
126+
kLambdaCPlus2880 = 24126
127+
kLambdaCPlus2940 = 4125
125128
kOmegaC0 = 4332
126129
kK0Star892 = 313
127130
kKPlusStar892 = 323

DataFormats/Detectors/CTP/src/CTPRateFetcher.cxx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,7 @@ double CTPRateFetcher::pileUpCorrection(double triggerRate)
233233
if (mLHCIFdata.getFillNumber() == 0) {
234234
LOG(fatal) << "No filling" << std::endl;
235235
}
236-
auto bfilling = mLHCIFdata.getBunchFilling();
237-
std::vector<int> bcs = bfilling.getFilledBCs();
238-
double nbc = bcs.size();
236+
double nbc = mLHCIFdata.getBunchFilling().getPattern().count();
239237
double nTriggersPerFilledBC = triggerRate / nbc / constants::lhc::LHCRevFreq;
240238
double mu = -std::log(1 - nTriggersPerFilledBC);
241239
return mu * nbc * constants::lhc::LHCRevFreq;

DataFormats/Detectors/ITSMFT/common/include/DataFormatsITSMFT/TopologyDictionary.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -92,67 +92,67 @@ class TopologyDictionary
9292
/// Returns the x position of the COG for the n_th element
9393
inline float getXCOG(int n) const
9494
{
95-
assert(n >= 0 || n < (int)mVectorOfIDs.size());
95+
assert(n >= 0 && n < (int)mVectorOfIDs.size());
9696
return mVectorOfIDs[n].mXCOG;
9797
}
9898
/// Returns the error on the x position of the COG for the n_th element
9999
inline float getErrX(int n) const
100100
{
101-
assert(n >= 0 || n < (int)mVectorOfIDs.size());
101+
assert(n >= 0 && n < (int)mVectorOfIDs.size());
102102
return mVectorOfIDs[n].mErrX;
103103
}
104104
/// Returns the z position of the COG for the n_th element
105105
inline float getZCOG(int n) const
106106
{
107-
assert(n >= 0 || n < (int)mVectorOfIDs.size());
107+
assert(n >= 0 && n < (int)mVectorOfIDs.size());
108108
return mVectorOfIDs[n].mZCOG;
109109
}
110110
/// Returns the error on the z position of the COG for the n_th element
111111
inline float getErrZ(int n) const
112112
{
113-
assert(n >= 0 || n < (int)mVectorOfIDs.size());
113+
assert(n >= 0 && n < (int)mVectorOfIDs.size());
114114
return mVectorOfIDs[n].mErrZ;
115115
}
116116
/// Returns the error^2 on the x position of the COG for the n_th element
117117
inline float getErr2X(int n) const
118118
{
119-
assert(n >= 0 || n < (int)mVectorOfIDs.size());
119+
assert(n >= 0 && n < (int)mVectorOfIDs.size());
120120
return mVectorOfIDs[n].mErr2X;
121121
}
122122
/// Returns the error^2 on the z position of the COG for the n_th element
123123
inline float getErr2Z(int n) const
124124
{
125-
assert(n >= 0 || n < (int)mVectorOfIDs.size());
125+
assert(n >= 0 && n < (int)mVectorOfIDs.size());
126126
return mVectorOfIDs[n].mErr2Z;
127127
}
128128
/// Returns the hash of the n_th element
129129
inline unsigned long getHash(int n) const
130130
{
131-
assert(n >= 0 || n < (int)mVectorOfIDs.size());
131+
assert(n >= 0 && n < (int)mVectorOfIDs.size());
132132
return mVectorOfIDs[n].mHash;
133133
}
134134
/// Returns the number of fired pixels of the n_th element
135135
inline int getNpixels(int n) const
136136
{
137-
assert(n >= 0 || n < (int)mVectorOfIDs.size());
137+
assert(n >= 0 && n < (int)mVectorOfIDs.size());
138138
return mVectorOfIDs[n].mNpixels;
139139
}
140140
/// Returns the frequency of the n_th element;
141141
inline double getFrequency(int n) const
142142
{
143-
assert(n >= 0 || n < (int)mVectorOfIDs.size());
143+
assert(n >= 0 && n < (int)mVectorOfIDs.size());
144144
return mVectorOfIDs[n].mFrequency;
145145
}
146146
/// Returns true if the element corresponds to a group of rare topologies
147147
inline bool isGroup(int n) const
148148
{
149-
assert(n >= 0 || n < (int)mVectorOfIDs.size());
149+
assert(n >= 0 && n < (int)mVectorOfIDs.size());
150150
return mVectorOfIDs[n].mIsGroup;
151151
}
152152
/// Returns the pattern of the topology
153153
inline const ClusterPattern& getPattern(int n) const
154154
{
155-
assert(n >= 0 || n < (int)mVectorOfIDs.size());
155+
assert(n >= 0 && n < (int)mVectorOfIDs.size());
156156
return mVectorOfIDs[n].mPattern;
157157
}
158158

DataFormats/Reconstruction/include/ReconstructionDataFormats/DCA.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,25 @@ class DCA
5454
mZ = z;
5555
}
5656

57+
GPUd() void setY(float y) { mY = y; }
58+
GPUd() void setZ(float z) { mZ = z; }
59+
GPUd() void setSigmaY2(float v) { mCov[0] = v; }
60+
GPUd() void setSigmaYZ(float v) { mCov[1] = v; }
61+
GPUd() void setSigmaZ2(float v) { mCov[2] = v; }
62+
GPUd() void addCov(const std::array<float, 3>& vadd)
63+
{
64+
mCov[0] += vadd[0];
65+
mCov[1] += vadd[1];
66+
mCov[2] += vadd[2];
67+
}
5768
GPUd() auto getY() const { return mY; }
5869
GPUd() auto getZ() const { return mZ; }
5970
GPUd() auto getR2() const { return mY * mY + mZ * mZ; }
6071
GPUd() auto getSigmaY2() const { return mCov[0]; }
6172
GPUd() auto getSigmaYZ() const { return mCov[1]; }
6273
GPUd() auto getSigmaZ2() const { return mCov[2]; }
6374
GPUd() const auto& getCovariance() const { return mCov; }
75+
GPUd() float calcChi2() const;
6476

6577
void print() const;
6678

DataFormats/Reconstruction/include/ReconstructionDataFormats/VtxTrackRef.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,17 @@ class VtxTrackRef : public RangeReference<int, int>
8080
// set the last +1 element index and finalize all references
8181
void setEnd(int end);
8282

83+
const RangeReference<int, int>& getITSGloContributors() const { return mITSGloContributors; }
84+
RangeReference<int, int>& getITSGloContributors() { return mITSGloContributors; }
85+
8386
private:
8487
using RangeReference<int, int>::RangeReference;
8588
int mVtxID = -1; // vertex ID. The reference for unassigned tracks will have it negative!
8689
std::array<int, VtxTrackIndex::Source::NSources - 1> mFirstEntrySource{0};
8790

88-
ClassDefNV(VtxTrackRef, 2);
91+
RangeReference<int, int> mITSGloContributors; // optionally filled to keep ITS parts of all contributors (including ITS-only ones)
92+
93+
ClassDefNV(VtxTrackRef, 3);
8994
};
9095

9196
std::ostream& operator<<(std::ostream& os, const o2::dataformats::VtxTrackRef& v);

DataFormats/Reconstruction/src/DCA.cxx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

12+
#include "GPUCommonMath.h"
13+
#include "CommonConstants/MathConstants.h"
1214
#include "ReconstructionDataFormats/DCA.h"
1315
#include <iostream>
1416

@@ -20,6 +22,16 @@ namespace o2
2022
namespace dataformats
2123
{
2224

25+
float DCA::calcChi2() const
26+
{
27+
// Estimate the chi2 for DCA
28+
const auto sdd = mCov[0], sdz = mCov[1], szz = mCov[2], det = sdd * szz - sdz * sdz;
29+
if (o2::gpu::CAMath::Abs(det) < o2::constants::math::Almost0) {
30+
return constants::math::VeryBig;
31+
}
32+
return (mY * (szz * mY - sdz * mZ) + mZ * (sdd * mZ - mY * sdz)) / det;
33+
}
34+
2335
std::ostream& operator<<(std::ostream& os, const o2::dataformats::DCA& d)
2436
{
2537
// stream itself

DataFormats/Reconstruction/src/VtxTrackRef.cxx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ std::string VtxTrackRef::asString(bool skipEmpty) const
3131
str += fmt::format(", N{:s} : {:d}", VtxTrackIndex::getSourceName(i), getEntriesOfSource(i));
3232
}
3333
}
34+
if (mITSGloContributors.getEntries()) {
35+
str += fmt::format("| ITScontributors: {} from {}", mITSGloContributors.getEntries(), mITSGloContributors.getFirstEntry());
36+
}
3437
return str;
3538
}
3639

Detectors/GlobalTracking/include/GlobalTracking/MatchCosmics.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,16 @@ class MatchCosmics
8383
TBracket tBracket; ///< bracketing time-bins
8484
GTrackID origID; ///< track origin id
8585
int matchID = MinusOne; ///< entry (none if MinusOne) of its match in the vector of matches
86+
short vtIDMin = -1; ///< id of the 1st compatible vertex
87+
short vtIDMax = -1; ///< id of the last compatible vertex
8688
};
8789
void setTPCCorrMaps(const o2::gpu::TPCFastTransformPOD* maph);
8890
void setTPCVDrift(const o2::tpc::VDriftCorrFact& v);
8991
void setITSROFrameLengthMUS(float fums) { mITSROFrameLengthMUS = fums; }
9092
void setITSDict(const o2::itsmft::TopologyDictionary* dict) { mITSDict = dict; }
9193
void process(const o2::globaltracking::RecoContainer& data);
9294
void setUseMC(bool mc) { mUseMC = mc; }
95+
void setUsePVInfo(bool v) { mUsePVInfo = v; }
9396
void init();
9497
void end();
9598

@@ -146,6 +149,7 @@ class MatchCosmics
146149
float mTPCTBinMUS = 0.; ///< TPC time bin duration in microseconds
147150
float mBz = 0; ///< nominal Bz
148151
bool mFieldON = true;
152+
bool mUsePVInfo = false;
149153
bool mUseMC = true;
150154
float mITSROFrameLengthMUS = 0.;
151155
float mQ2PtCutoff = 1e9;

Detectors/GlobalTracking/include/GlobalTracking/MatchCosmicsParams.h

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,28 @@
1717
#include "CommonUtils/ConfigurableParam.h"
1818
#include "CommonUtils/ConfigurableParamHelper.h"
1919
#include "DetectorsBase/Propagator.h"
20+
#include "ReconstructionDataFormats/GlobalTrackID.h"
2021

2122
namespace o2
2223
{
2324
namespace globaltracking
2425
{
2526

2627
struct MatchCosmicsParams : public o2::conf::ConfigurableParamHelper<MatchCosmicsParams> {
28+
float dcaCutChi2[o2::dataformats::GlobalTrackID::NSources] = {}; // optional (>0) chi2 cut on track DCA to any of its compatible vertices
2729
float systSigma2[o2::track::kNParams] = {0.01f, 0.01f, 1e-4f, 1e-4f, 0.f}; // extra error to be added at legs comparison
2830
float crudeNSigma2Cut[o2::track::kNParams] = {49.f, 49.f, 49.f, 49.f, 49.f};
29-
float crudeChi2Cut = 999.;
30-
float timeToleranceMUS = 0.;
31-
float maxStep = 10.;
32-
float maxSnp = 0.99;
33-
float minSeedPt = 0.10; // use only tracks above this pT (scaled with field)
34-
float nSigmaTError = 4.; // number of sigmas on track time error for matching (except for TPC which provides an interval)
31+
float crudeChi2Cut = 999.f;
32+
float timeToleranceMUS = 0.f;
33+
float maxStep = 10.f;
34+
float maxSnp = 0.99f;
35+
float minSeedPt = 0.10f; // use only tracks above this pT (scaled with field)
36+
float nSigmaTError = 4.f; // number of sigmas on track time error for matching (except for TPC which provides an interval)
37+
float tpcExtraZError2 = 1.f; // extra error^2 on the TPC-only track Z coordinate
38+
float fiducialRIP = 1.0f; // consider track having |Y@x=0|< this as passing DCA cut (if requested)
39+
float fiducialZIP = 20.f; // consider track having |Z@x=0|< this as passing DCA cut (if requested)
3540
bool allowTPCOnly = true;
41+
bool discardPVContributors = true; // used only if the global option --use-pv-info is requested
3642
o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrLUT;
3743

3844
O2ParamDef(MatchCosmicsParams, "cosmicsMatch");

0 commit comments

Comments
 (0)