Skip to content
Snippets Groups Projects
Commit 2c1ae3a0 authored by Sergei Zharko's avatar Sergei Zharko
Browse files

L1Algo: fMinLevelTripletStart iteration added

parent 57917b9a
No related branches found
No related tags found
1 merge request!831L1Algo: updates (geometry and iterations initialization)
......@@ -1117,6 +1117,7 @@ InitStatus CbmL1::Init()
trackingIterFastPrim.SetMaxSlope(2.748f);
trackingIterFastPrim.SetMaxDZ(0);
trackingIterFastPrim.SetTargetPosSigmaXY(1, 1);
trackingIterFastPrim.SetMinLevelTripletStart(0);
trackingIterFastPrim.SetPrimary(true);
auto trackingIterAllPrim = L1CAIteration("AllPrimIter");
......@@ -1130,6 +1131,7 @@ InitStatus CbmL1::Init()
trackingIterAllPrim.SetMaxSlope(2.748f);
trackingIterAllPrim.SetMaxDZ(0.1);
trackingIterAllPrim.SetTargetPosSigmaXY(1, 1);
trackingIterAllPrim.SetMinLevelTripletStart(0);
trackingIterAllPrim.SetPrimary(true);
auto trackingIterFastPrim2 = L1CAIteration("FastPrim2Iter");
......@@ -1143,6 +1145,7 @@ InitStatus CbmL1::Init()
trackingIterFastPrim2.SetMaxSlope(2.748f);
trackingIterFastPrim2.SetMaxDZ(0);
trackingIterFastPrim2.SetTargetPosSigmaXY(5, 5);
trackingIterFastPrim2.SetMinLevelTripletStart(0);
trackingIterFastPrim2.SetPrimary(true);
auto trackingIterAllSec = L1CAIteration("AllSecIter");
......@@ -1156,6 +1159,7 @@ InitStatus CbmL1::Init()
trackingIterAllSec.SetMaxSlope(2.748f);
trackingIterAllSec.SetMaxDZ(0.1);
trackingIterAllSec.SetTargetPosSigmaXY(10, 10);
trackingIterAllSec.SetMinLevelTripletStart(1);
trackingIterAllSec.SetPrimary(false);
auto trackingIterFastPrimJump = L1CAIteration("FastPrimJumpIter");
......@@ -1169,6 +1173,7 @@ InitStatus CbmL1::Init()
trackingIterFastPrimJump.SetMaxSlope(2.748f);
trackingIterFastPrimJump.SetMaxDZ(0);
trackingIterFastPrimJump.SetTargetPosSigmaXY(5, 5);
trackingIterFastPrimJump.SetMinLevelTripletStart(0);
trackingIterFastPrimJump.SetPrimary(true);
auto trackingIterAllPrimJump = L1CAIteration("AllPrimJumpIter");
......@@ -1182,6 +1187,7 @@ InitStatus CbmL1::Init()
trackingIterAllPrimJump.SetMaxSlope(2.748f);
trackingIterAllPrimJump.SetMaxDZ(0.1);
trackingIterAllPrimJump.SetTargetPosSigmaXY(5, 5);
trackingIterAllPrimJump.SetMinLevelTripletStart(0);
trackingIterAllPrimJump.SetPrimary(true);
auto trackingIterAllSecJump = L1CAIteration("AllSecJumpIter");
......@@ -1194,6 +1200,7 @@ InitStatus CbmL1::Init()
trackingIterAllSecJump.SetMaxSlopePV(1.5f);
trackingIterAllSecJump.SetMaxSlope(2.748f);
trackingIterAllSecJump.SetMaxDZ(0.1);
trackingIterAllSecJump.SetMinLevelTripletStart(1);
trackingIterAllSecJump.SetTargetPosSigmaXY(10, 10);
auto trackingIterAllPrimE = L1CAIteration("AllPrimEIter");
......@@ -1207,6 +1214,7 @@ InitStatus CbmL1::Init()
trackingIterAllPrimE.SetMaxSlope(2.748f);
trackingIterAllPrimE.SetMaxDZ(0.1);
trackingIterAllPrimE.SetTargetPosSigmaXY(1, 1);
trackingIterAllPrimE.SetMinLevelTripletStart(0);
trackingIterAllPrimE.SetPrimary(true);
auto trackingIterAllSecE = L1CAIteration("AllSecEIter");
......@@ -1219,6 +1227,7 @@ InitStatus CbmL1::Init()
trackingIterAllSecE.SetMaxSlopePV(1.5f);
trackingIterAllSecE.SetMaxSlope(2.748f);
trackingIterAllSecE.SetMaxDZ(0.1);
trackingIterAllSecE.SetMinLevelTripletStart(1);
trackingIterAllSecE.SetTargetPosSigmaXY(10, 10);
// Select default track finder
......
......@@ -285,7 +285,7 @@ public:
int fNThreads {0};
bool fUseHitErrors {true};
bool fMissingHits {0};
bool fMissingHits {0}; ///< TODO ???
TrackingMode fTrackingMode {kSts};
fvec EventTime[L1Parameters::kMaxNthreads][L1Parameters::kMaxNthreads] {{0}};
......
......@@ -37,6 +37,7 @@ L1CAIteration::L1CAIteration(const L1CAIteration& other) noexcept
, fMaxDZ(other.fMaxDZ)
, fTargetPosSigmaX(other.fTargetPosSigmaX)
, fTargetPosSigmaY(other.fTargetPosSigmaY)
, fMinLevelTripletStart(other.fMinLevelTripletStart)
{
LOG(debug) << "L1CAIteration: Copy constructor called: " << &other << " was copied into " << this;
}
......@@ -116,6 +117,7 @@ void L1CAIteration::Swap(L1CAIteration& other) noexcept
std::swap(fMaxDZ, other.fMaxDZ);
std::swap(fTargetPosSigmaX, other.fTargetPosSigmaX);
std::swap(fTargetPosSigmaY, other.fTargetPosSigmaY);
std::swap(fMinLevelTripletStart, other.fMinLevelTripletStart);
}
//
//----------------------------------------------------------------------------------------------------------------------
......@@ -138,7 +140,8 @@ std::string L1CAIteration::ToString(int indentLevel) const
aStream << indent << indentChar << "Max slope: " << fMaxSlope << '\n';
aStream << indent << indentChar << "Max DZ: " << fMaxDZ << '\n';
aStream << indent << indentChar << "Target position sigma X [cm]: " << fTargetPosSigmaX << '\n';
aStream << indent << indentChar << "Target position sigma Y [cm]: " << fTargetPosSigmaY;
aStream << indent << indentChar << "Target position sigma Y [cm]: " << fTargetPosSigmaY << '\n';
aStream << indent << indentChar << "Min level for triplet start: " << fMinLevelTripletStart;
return aStream.str();
}
......@@ -15,6 +15,8 @@
#include <bitset>
#include <string>
// TODO: discuss the border conditions for the parameters. Implement them (S.Zharko)
// Implementation: use tuples for boundary conditions of the parameters
/// Class L1CAIteration describes L1 Track finder iteration.
/// Each iteration utilizes special physics cuts and run condition to find tracks of a particular
/// class (e.g., fast primary tracks or secondary electron tracks). Hits associated with tracks
......@@ -57,6 +59,8 @@ public:
float GetMaxSlope() const { return fMaxSlope; }
/// Gets max slope (tx\ty) in primary vertex
float GetMaxSlopePV() const { return fMaxSlopePV; }
/// Gets min level of the triplet start
int GetMinLevelTripletStart() const { return fMinLevelTripletStart; }
/// Gets the name of the iteration
const std::string& GetName() const { return fName; }
/// Gets size of region [TODO: units??] to attach new hits to the created track
......@@ -88,6 +92,8 @@ public:
void SetMaxSlope(float input) { fMaxSlope = input; }
/// Sets max slope (tx\ty) in primary vertex
void SetMaxSlopePV(float input) { fMaxSlopePV = input; }
/// Sets min level of the triplet start
void SetMinLevelTripletStart(int input) { fMinLevelTripletStart = input; }
/// Sets name of the iteration
void SetName(const std::string& name) { fName = name; }
/// Sets size of region [TODO: units??] to attach new hits to the created track
......@@ -121,17 +127,19 @@ private:
// NOTE: For each new cut one should not forget to create a setter and a getter, insert the value
// initialization in the copy constructor and the Swap operator as well as a string repre-
// sentation to the ToString method (S.Zharko)
float fTrackChi2Cut {10.f}; ///> track chi2 upper cut
float fTripletChi2Cut {21.1075f}; ///> triplet chi2 upper cut
float fDoubletChi2Cut {11.3449 * 2.f / 3.f}; ///> doublet chi2 upper cut
float fPickGather {3.0}; ///> size of region to attach new hits to the created track [TODO: units??]
float fPickNeighbour {5.0}; ///> min value of dp/dp_error, for which two tiplets are neighbours
float fMaxInvMom {1.0 / 0.5}; ///> max considered q/p for tracks
float fMaxSlopePV {1.1}; ///> max slope (tx\ty) in primary vertex
float fMaxSlope {2.748}; ///> max slope (tx\ty) in 3D hit position of a triplet
float fTrackChi2Cut {10.f}; ///> Track chi2 upper cut
float fTripletChi2Cut {21.1075f}; ///> Triplet chi2 upper cut
float fDoubletChi2Cut {11.3449 * 2.f / 3.f}; ///> Doublet chi2 upper cut
float fPickGather {3.0}; ///> Size of region to attach new hits to the created track [TODO: units??]
float fPickNeighbour {5.0}; ///> Min value of dp/dp_error, for which two tiplets are neighbours
float fMaxInvMom {1.0 / 0.5}; ///> Max considered q/p for tracks
float fMaxSlopePV {1.1}; ///> Max slope (tx\ty) in primary vertex
float fMaxSlope {2.748}; ///> Max slope (tx\ty) in 3D hit position of a triplet
float fMaxDZ {0.f}; ///> Correction for accounting overlaping and iff z [TODO: units??]
float fTargetPosSigmaX {0}; ///> Constraint on target position in X direction [cm]
float fTargetPosSigmaY {0}; ///> Constraint on target position in Y direction [cm]
int fMinLevelTripletStart {0}; ///> Min level for starting a triplet. Track length = fMinLevelTripletStart + 3
// ^ TODO: invent more proper name
};
#endif // L1CAIteration_h
......@@ -325,7 +325,6 @@ inline void L1Algo::f11( /// input 1st stage of singlet search
else
L1Extrapolate0(T, zl, fld0);
for (int ista = 0; ista <= istal - 1; ista++) {
if constexpr (L1Parameters::kIfUseRadLengthTable) {
fit.L1AddMaterial(T, fRadThick[ista].GetRadThick(T.x, T.y), fMaxInvMom, 1);
......@@ -1775,7 +1774,6 @@ void L1Algo::CATrackFinder()
// ---- Loop over Track Finder iterations ----------------------------------------------------------------//
L1ASSERT(0, fNFindIterations == fParameters.CAIterationsContainer().size());
isec = 0; // TODO: temporary! (S.Zharko)
std::cout << "\033[1;31mfNThreads\033[0m = " << fNThreads << '\n';
for (const auto& caIteration : fParameters.CAIterationsContainer()) // all finder
{
std::cout << "CA Track Finder Iteration!!" << isec << '\n';
......@@ -2125,12 +2123,13 @@ void L1Algo::CATrackFinder()
// cout<<"---- Collect track candidates. ----"<<endl;
// #endif
int min_level = 0; // min level for start triplet. So min track length = min_level+3.
int min_level = caIteration.GetMinLevelTripletStart(); // min level for start triplet. So min track length = min_level+3.
// if (isec == kFastPrimJumpIter) min_level = 1;
if ((isec == kAllSecIter) || (isec == kAllSecEIter) || (isec == kAllSecJumpIter))
min_level = 1; // only the long low momentum tracks
//if ((isec == kAllSecIter) || (isec == kAllSecEIter) || (isec == kAllSecJumpIter))
// min_level = 1; // only the long low momentum tracks
#ifdef TRACKS_FROM_TRIPLETS
LOG(FATAL) << "L1CATrackFinder: min_level undefined in " << __FILE__ << " : " << __LINE__;
if (isec == TRACKS_FROM_TRIPLETS_ITERATION) min_level = 0;
#endif
......
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