16#ifndef ALICEO2_MATCH_COSMICS
17#define ALICEO2_MATCH_COSMICS
33#define _ALLOW_DEBUG_TREES_COSM
43class TPCFastTransformPOD;
44class GPUO2InterfaceRefit;
46namespace globaltracking
58 static constexpr int Zero = 0;
129#ifdef _ALLOW_DEBUG_TREES_COSM
147 mDebugTreeFileName =
name;
156 void updateTimeDependentParams();
158 bool refitSeedAtTime(
const TrackSeed& seed,
float timeMUS, TrackSeed& out);
159 void registerMatch(
int i,
int j,
float chi2,
float tCommon = 0.f,
float tCommonErr = -1.f,
float tofScore = -1.f,
float tCommonNoTOF = 0.f,
float tCommonErrNoTOF = -1.f);
161 const std::vector<TOFCandidate>& getTOFCandidates(
int iseed);
162 float findTOFFlightPair(
int i,
int j,
float tMinMUS,
float tMaxMUS,
float& tofTimeMUS);
163 void suppressMatch(
int partner0,
int partner1);
165 bool validateMatch(
int partner0);
166 void selectWinners();
170 std::vector<TrackSeed> mSeeds;
171 std::vector<MatchRecord> mRecords;
172 std::vector<int> mWinners;
176 float mTPCVDriftRef = -1.;
177 float mTPCVDriftCorrFact = 1.;
178 float mTPCVDrift = -1.;
179 float mTPCDriftTimeOffset = 0.;
180 float mTPCTBinMUS = 0.;
182 bool mFieldON =
true;
183 bool mUsePVInfo =
false;
187 float mITSROFrameLengthMUS = 0.;
188 float mQ2PtCutoff = 1e9;
189 float mQ2PtCutoffOppositeSides = 1e9;
190 const MatchCosmicsParams* mMatchParams =
nullptr;
193 size_t mNRefitsCommonTime = 0;
194 std::vector<int> mTOFClusterOrder;
195 std::vector<float> mTOFClusterTimeMUS;
196 std::vector<std::vector<TOFCandidate>> mSeedTOFCandidates;
197 std::vector<bool> mSeedTOFDone;
198 size_t mNTOFConfirmed = 0;
199 size_t mNTOFFallbacks = 0;
200 size_t mNSeedsNearBeam = 0;
201 size_t mNNearBeamConfirmed = 0;
202 size_t mNSeedsPVContributors = 0;
204 std::vector<o2d::TrackCosmics> mCosmicTracks;
205 std::vector<o2::MCCompLabel> mCosmicTracksLbl;
207#ifdef _ALLOW_DEBUG_TREES_COSM
208 std::unique_ptr<o2::utils::TreeStreamRedirector> mDBGOut;
209 UInt_t mDBGFlags = 0;
210 std::string mDebugTreeFileName =
"dbg_cosmics_match.root";
213 ClassDefNV(MatchCosmics, 1);
Container of the ITS/MFT clusters addressed by the composed (layer,index) ID.
Accessor for TrackParCov derived objects from multiple containers.
Global index for barrel track: provides provenance (detectors combination), index in respective array...
Configurable params for cosmics matching.
Declarations of 2D primitives.
Result of top-bottom cosmic tracks leg matching.
void setITSROFrameLengthMUS(float fums)
@ MatchTreeAll
produce matching candidates tree for all candidates
@ MatchTreeAccOnly
fill the matching candidates tree only once the cut is passed
void setUsePVInfo(bool v)
static constexpr int Validated
auto getCosmicTracksLbl() const
bool isDebugFlag(UInt_t flags) const
get debug trees flags
void setPVVetoSources(GTrackID::mask_t src)
sources whose PV contributors veto the legs they contain
void setITSDict(const o2::itsmft::TopologyDictionary *dict)
void setDebugFlag(UInt_t flag, bool on=true)
set the name of output debug file
void setTPCVDrift(const o2::tpc::VDriftCorrFact &v)
static constexpr int Reject
void setDebugTreeFileName(std::string name)
get the name of output debug file
void setSeedSources(GTrackID::mask_t src)
track sources used as legs (other loaded ones resolve PV contributors)
void setTPCCorrMaps(const o2::gpu::TPCFastTransformPOD *maph)
auto getCosmicTracks() const
void process(const o2::globaltracking::RecoContainer &data)
static constexpr int MinusOne
@ RejNoTOF
a leg kept by minSeedDCAxyTOF only, and no TOF flight pair
static constexpr int MinusTen
UInt_t getDebugFlags() const
set or unset debug stream flag
static constexpr int Zero
const std::string & getDebugTreeFileName() const
GLuint const GLchar * name
detail::Bracket< float > Bracketf_t
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
< record about matchig of 2 tracks
int next
index of eventual next record
float tofScore
score of the top / bottom TOF hit pair matching the muon's flight (tofFlightSelection; < 0: none); a ...
float tCommonErr
its 1 sigma error [mus]; < 0: not fixed, the refit uses the centre of the time-bracket overlap and th...
float tCommonErrNoTOF
tCommonErr before a TOF flight pair replaced it
float tCommon
common time [mus] fixed by z continuity of TPC-only legs on opposite TPC sides
float tCommonNoTOF
tCommon before a TOF flight pair replaced it: the refit falls back to it if the refit at the TOF time...
double timeNS
its time since the start of the TF [ns]
float dz
cluster - predicted z, the leg's z taken at its own reference time tRef [cm]
float gx
global position of the cluster [cm]
float dy
cluster - predicted y in the frame of the cluster's sector [cm]
short vtIDMax
id of the last compatible vertex
int8_t tpcSide
TPC-only seed with clusters on one side: +1 A, -1 C (z = z(t) - side*vD*(t-tRef)); 0: z absolute.
short vtIDMin
id of the 1st compatible vertex
int matchID
entry (none if MinusOne) of its match in the vector of matches
float tRef
time [mus] the z of the parameters refers to (TPC-only: the TrackTPC time0; others: bracket centre)
TBracket tBracket
bracketing time-bins
GTrackID origID
track origin id
bool nearBeam
kept by the looser minSeedDCAxyTOF cuts only: usable in TOF-confirmed pairs only
std::array< float, 3 > xyzRef
global position of the reference point before the propagation to the DCA (same-half veto)