Skip to content
Snippets Groups Projects
Commit 9ee09a1b authored by Volker Friese's avatar Volker Friese Committed by Sergey Gorbunov
Browse files

Corrected syntax in iterator loop. Aligned doxygen comments.

parent c5582998
No related branches found
No related tags found
1 merge request!1619First version of V0 trigger algorithm
......@@ -4,6 +4,8 @@
#include "V0Trigger.h"
#include <iterator>
namespace cbm::algo
{
......@@ -14,7 +16,7 @@ namespace cbm::algo
Result result;
for (auto trackIter1 = tracks.begin(); trackIter1 != tracks.end(); trackIter1++) {
for (auto trackIter2 = trackIter1++; trackIter2 != tracks.end(); trackIter2++) {
for (auto trackIter2 = std::next(trackIter1); trackIter2 != tracks.end(); trackIter2++) {
// Check track time difference
float time1 = trackIter1->fParFirst.GetTime();
......
......@@ -14,8 +14,8 @@ namespace cbm::algo
{
/** @struct V0TriggerConfig
** @brief Configuration (cut values) for the V0Trigger class
**/
** @brief Configuration (cut values) for the V0Trigger class
**/
struct V0TriggerConfig {
double cutTime{}; /// Maximum time difference of tracks
double cutZ{}; /// Minimum z position at closest approach
......@@ -24,15 +24,24 @@ namespace cbm::algo
/** @struct V0TriggerMoniData
** @brief Monitoring information for the algorithm V0Trigger
**/
** @brief Monitoring information for the algorithm V0Trigger
**/
struct V0TriggerMoniData {
size_t errTracksUnsorted{0};
size_t numTrackPairs{0};
size_t numTrackPairsWithinTimeCut{0};
};
/** @class V0Trigger
** @brief Trigger class for secondary two-track vertices in mCBM
** @author Volker Friese <v.friese@gsi.de>
** @date 1 February 2024
**
** The class takes an array of tracks and searches for track pairs close in time and with a point of closest approach (PCA)
** outside of the target area. Tracks are assumed to be straight lines, in the absence of a magnetic field as in mCBM.
** The class returns a list of trigger times corresponding to track pairs satisfying the selection criteria:
** Maximum time difference, minimum z of PCA, maximum distance at PCA.
**/
class V0Trigger {
public:
......@@ -59,14 +68,14 @@ namespace cbm::algo
private:
/** @brief Calculation of closest approach of two tracks (straight lines)
** @param track1 Parameters of first track
** @param track2 Parameters of second track
** @return (z position, distance)
**
** The closest approach is defined at the z position where the transverse distance of the tracks (in the x-y plane) is minimal.
** This is not strictly the minimal distance in 3-d space, which is mathematically and computationally more involved.
** It should be a good criterion for the purpose of finding displaced vertices.
**/
** @param track1 Parameters of first track
** @param track2 Parameters of second track
** @return (z position, distance)
**
** The closest approach is defined at the z position where the transverse distance of the tracks (in the x-y plane) is minimal.
** This is not strictly the minimal distance in 3-d space, which is mathematically and computationally more involved.
** It should be a good criterion for the purpose of finding displaced vertices.
**/
std::pair<double, double> CalcPCA(const TrackParam& track1, const TrackParam& track2) const;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment