diff --git a/reco/L1/CbmL1.cxx b/reco/L1/CbmL1.cxx index 2a98ca32f83ec95145dc9d997365f6b1199cc01b..78abe8256f4785fc766a510187a7ff1b254ad781 100644 --- a/reco/L1/CbmL1.cxx +++ b/reco/L1/CbmL1.cxx @@ -212,14 +212,14 @@ InitStatus CbmL1::Init() if (L1Algo::TrackingMode::kGlobal == fTrackingMode) { //at the moment trd2d tracking only - fUseMVD = 0; - fUseSTS = 0; + fUseMVD = 1; + fUseSTS = 1; fUseMUCH = 0; fUseTRD = 1; fUseTOF = 0; fInitManager.DevSetUseOfOriginalField(); - fInitManager.DevSetIgnoreHitSearchAreas(true); + //fInitManager.DevSetIgnoreHitSearchAreas(true); //fInitManager.DevSetIsMatchDoubletsViaMc(true); //fInitManager.DevSetIsMatchTripletsViaMc(true); fInitManager.SetMaxTripletPerDoublets(1000); @@ -635,6 +635,8 @@ InitStatus CbmL1::Init() // TODO: Need to provide a selection: default iterations input (these hard-coded ones), input from file or input // from running macro (S.Zharko) auto trackingIterFastPrim = L1CAIteration("FastPrimIter"); + trackingIterFastPrim.SetMinNhits(4); + trackingIterFastPrim.SetMinNhitsStation0(3); trackingIterFastPrim.SetTrackChi2Cut(10.f); trackingIterFastPrim.SetTripletChi2Cut(23.4450f); // = 7.815 * 3; // prob = 0.05 trackingIterFastPrim.SetDoubletChi2Cut(7.56327f); // = 1.3449 * 2.f / 3.f; // prob = 0.1 @@ -645,12 +647,12 @@ InitStatus CbmL1::Init() trackingIterFastPrim.SetMaxSlope(2.748f); trackingIterFastPrim.SetMaxDZ(0); trackingIterFastPrim.SetTargetPosSigmaXY(1, 1); - trackingIterFastPrim.SetMinLevelTripletStart(0); trackingIterFastPrim.SetPrimaryFlag(true); - trackingIterFastPrim.SetSuppressGhostFlag(false); trackingIterFastPrim.SetExtendTracksFlag(true); auto trackingIterAllPrim = L1CAIteration("AllPrimIter"); + trackingIterAllPrim.SetMinNhits(4); + trackingIterAllPrim.SetMinNhitsStation0(3); trackingIterAllPrim.SetTrackChi2Cut(10.f); trackingIterAllPrim.SetTripletChi2Cut(23.4450f); trackingIterAllPrim.SetDoubletChi2Cut(7.56327f); @@ -661,12 +663,12 @@ InitStatus CbmL1::Init() trackingIterAllPrim.SetMaxSlope(2.748f); trackingIterAllPrim.SetMaxDZ(0.1); trackingIterAllPrim.SetTargetPosSigmaXY(1, 1); - trackingIterAllPrim.SetMinLevelTripletStart(0); trackingIterAllPrim.SetPrimaryFlag(true); - trackingIterAllPrim.SetSuppressGhostFlag(false); trackingIterAllPrim.SetExtendTracksFlag(true); auto trackingIterFastPrim2 = L1CAIteration("FastPrim2Iter"); + trackingIterFastPrim2.SetMinNhits(4); + trackingIterFastPrim2.SetMinNhitsStation0(4); trackingIterFastPrim2.SetTrackChi2Cut(10.f); trackingIterFastPrim2.SetTripletChi2Cut(21.1075f); trackingIterFastPrim2.SetDoubletChi2Cut(7.56327f); @@ -677,12 +679,12 @@ InitStatus CbmL1::Init() trackingIterFastPrim2.SetMaxSlope(2.748f); trackingIterFastPrim2.SetMaxDZ(0); trackingIterFastPrim2.SetTargetPosSigmaXY(5, 5); - trackingIterFastPrim2.SetMinLevelTripletStart(0); trackingIterFastPrim2.SetPrimaryFlag(true); - trackingIterFastPrim2.SetSuppressGhostFlag(true); trackingIterFastPrim2.SetExtendTracksFlag(true); auto trackingIterAllSec = L1CAIteration("AllSecIter"); + trackingIterAllSec.SetMinNhits(4); + trackingIterAllSec.SetMinNhitsStation0(4); trackingIterAllSec.SetTrackChi2Cut(10.f); trackingIterAllSec.SetTripletChi2Cut(18.7560f); // = 6.252 * 3; // prob = 0.1 trackingIterAllSec.SetDoubletChi2Cut(7.56327f); @@ -693,12 +695,12 @@ InitStatus CbmL1::Init() trackingIterAllSec.SetMaxSlope(2.748f); trackingIterAllSec.SetMaxDZ(0.1); trackingIterAllSec.SetTargetPosSigmaXY(10, 10); - trackingIterAllSec.SetMinLevelTripletStart(1); trackingIterAllSec.SetPrimaryFlag(false); - trackingIterAllSec.SetSuppressGhostFlag(true); trackingIterAllSec.SetExtendTracksFlag(true); auto trackingIterFastPrimJump = L1CAIteration("FastPrimJumpIter"); + trackingIterFastPrimJump.SetMinNhits(4); + trackingIterFastPrimJump.SetMinNhitsStation0(4); trackingIterFastPrimJump.SetTrackChi2Cut(10.f); trackingIterFastPrimJump.SetTripletChi2Cut(21.1075f); // prob = 0.01 trackingIterFastPrimJump.SetDoubletChi2Cut(7.56327f); @@ -709,13 +711,13 @@ InitStatus CbmL1::Init() trackingIterFastPrimJump.SetMaxSlope(2.748f); trackingIterFastPrimJump.SetMaxDZ(0); trackingIterFastPrimJump.SetTargetPosSigmaXY(5, 5); - trackingIterFastPrimJump.SetMinLevelTripletStart(0); trackingIterFastPrimJump.SetPrimaryFlag(true); - trackingIterFastPrimJump.SetSuppressGhostFlag(true); trackingIterFastPrimJump.SetJumpedFlag(true); trackingIterFastPrimJump.SetExtendTracksFlag(true); auto trackingIterAllPrimJump = L1CAIteration("AllPrimJumpIter"); + trackingIterAllPrimJump.SetMinNhits(4); + trackingIterAllPrimJump.SetMinNhitsStation0(4); trackingIterAllPrimJump.SetTrackChi2Cut(10.f); trackingIterAllPrimJump.SetTripletChi2Cut(18.7560f); trackingIterAllPrimJump.SetDoubletChi2Cut(7.56327f); @@ -726,13 +728,13 @@ InitStatus CbmL1::Init() trackingIterAllPrimJump.SetMaxSlope(2.748f); trackingIterAllPrimJump.SetMaxDZ(0.1); trackingIterAllPrimJump.SetTargetPosSigmaXY(5, 5); - trackingIterAllPrimJump.SetMinLevelTripletStart(0); trackingIterAllPrimJump.SetPrimaryFlag(true); - trackingIterAllPrimJump.SetSuppressGhostFlag(true); trackingIterAllPrimJump.SetJumpedFlag(true); trackingIterAllPrimJump.SetExtendTracksFlag(true); auto trackingIterAllSecJump = L1CAIteration("AllSecJumpIter"); + trackingIterAllSecJump.SetMinNhits(4); + trackingIterAllSecJump.SetMinNhitsStation0(4); trackingIterAllSecJump.SetTrackChi2Cut(10.f); trackingIterAllSecJump.SetTripletChi2Cut(21.1075f); trackingIterAllSecJump.SetDoubletChi2Cut(7.56327f); @@ -742,14 +744,14 @@ InitStatus CbmL1::Init() trackingIterAllSecJump.SetMaxSlopePV(1.5f); trackingIterAllSecJump.SetMaxSlope(2.748f); trackingIterAllSecJump.SetMaxDZ(0.1); - trackingIterAllSecJump.SetMinLevelTripletStart(1); trackingIterAllSecJump.SetTargetPosSigmaXY(10, 10); trackingIterAllSecJump.SetPrimaryFlag(false); - trackingIterAllSecJump.SetSuppressGhostFlag(true); trackingIterAllSecJump.SetJumpedFlag(true); trackingIterAllSecJump.SetExtendTracksFlag(true); auto trackingIterAllPrimE = L1CAIteration("AllPrimEIter"); + trackingIterAllPrimE.SetMinNhits(4); + trackingIterAllPrimE.SetMinNhitsStation0(3); trackingIterAllPrimE.SetTrackChi2Cut(10.f); trackingIterAllPrimE.SetTripletChi2Cut(23.4450f); trackingIterAllPrimE.SetDoubletChi2Cut(7.56327f); @@ -760,13 +762,13 @@ InitStatus CbmL1::Init() trackingIterAllPrimE.SetMaxSlope(2.748f); trackingIterAllPrimE.SetMaxDZ(0.1); trackingIterAllPrimE.SetTargetPosSigmaXY(1, 1); - trackingIterAllPrimE.SetMinLevelTripletStart(0); trackingIterAllPrimE.SetPrimaryFlag(true); trackingIterAllPrimE.SetElectronFlag(true); - trackingIterAllPrimE.SetSuppressGhostFlag(false); trackingIterAllPrimE.SetExtendTracksFlag(true); auto trackingIterAllSecE = L1CAIteration("AllSecEIter"); + trackingIterAllSecE.SetMinNhits(4); + trackingIterAllSecE.SetMinNhitsStation0(4); trackingIterAllSecE.SetTrackChi2Cut(10.f); trackingIterAllSecE.SetTripletChi2Cut(18.7560f); trackingIterAllSecE.SetDoubletChi2Cut(7.56327f); @@ -776,25 +778,33 @@ InitStatus CbmL1::Init() trackingIterAllSecE.SetMaxSlopePV(1.5f); trackingIterAllSecE.SetMaxSlope(2.748f); trackingIterAllSecE.SetMaxDZ(0.1); - trackingIterAllSecE.SetMinLevelTripletStart(1); trackingIterAllSecE.SetTargetPosSigmaXY(10, 10); trackingIterAllSecE.SetPrimaryFlag(false); trackingIterAllSecE.SetElectronFlag(true); - trackingIterAllSecE.SetSuppressGhostFlag(false); trackingIterAllSecE.SetExtendTracksFlag(true); // Select default track finder if (L1Algo::TrackingMode::kMcbm == fTrackingMode) { + + trackingIterFastPrim.SetMinNhits(4); + trackingIterFastPrim.SetMinNhitsStation0(4); + + trackingIterAllSecE.SetMinNhits(4); + trackingIterAllSecE.SetMinNhitsStation0(4); trackingIterAllPrim.SetMaxInvMom(1. / 0.1); trackingIterAllPrimE.SetMaxInvMom(1. / 0.1); trackingIterAllSecE.SetMaxInvMom(1. / 0.1); + trackingIterAllSecJump.SetMinNhits(4); + trackingIterAllSecJump.SetMinNhitsStation0(4); trackingIterFastPrim.SetMaxInvMom(1.0 / 0.3); trackingIterAllSec.SetMaxInvMom(1.0 / 0.3); trackingIterFastPrimJump.SetMaxInvMom(1.0 / 0.3); trackingIterAllPrimJump.SetMaxInvMom(1.0 / 0.3); trackingIterAllSecJump.SetMaxInvMom(1.0 / 0.3); + trackingIterAllSec.SetMinNhits(4); + trackingIterAllSec.SetMinNhitsStation0(4); trackingIterFastPrim.SetExtendTracksFlag(false); trackingIterAllPrim.SetExtendTracksFlag(false); trackingIterAllPrimJump.SetExtendTracksFlag(false); @@ -814,26 +824,28 @@ InitStatus CbmL1::Init() auto globalIterPrimFast = L1CAIteration("globalIterPrimFast"); { auto& it = globalIterPrimFast; - it.SetTrackChi2Cut(10 * 7.f); //10.f - it.SetTripletChi2Cut(10 * 2 * 23.4450f); // = 7.815 * 3; // prob = 0.05 - it.SetDoubletChi2Cut(10 * 4. * 7.56327f); // = 1.3449 * 2.f / 3.f; // prob = 0.1 - it.SetPickGather(10 * 3.0f); - it.SetPickNeighbour(10 * 4.0f); - it.SetMaxInvMom(10 * 1.0 / 0.05); //(1.0 / 0.5); - it.SetMaxSlopePV(10 * .5f); - it.SetMaxSlope(10 * .5f); - it.SetMaxDZ(10 * 0.05); - it.SetTargetPosSigmaXY(10 * 1., 10 * 1.); //(1, 1); - it.SetMinLevelTripletStart(0); + it.SetMinNhits(3); + it.SetMinNhitsStation0(3); + it.SetTrackChi2Cut(7.f); //10.f + it.SetTripletChi2Cut(23.4450f); // = 7.815 * 3; // prob = 0.05 + it.SetDoubletChi2Cut(7.56327f); // = 1.3449 * 2.f / 3.f; // prob = 0.1 + it.SetPickGather(3.0f); + it.SetPickNeighbour(4.0f); + it.SetMaxInvMom(1.0 / 0.1); //(1.0 / 0.5); + it.SetMaxSlopePV(.1f); + it.SetMaxSlope(.5f); + it.SetMaxDZ(0.05); + it.SetTargetPosSigmaXY(1., 1.); //(1, 1); //it.SetPrimaryFlag(true); it.SetExtendTracksFlag(true); it.SetPrimaryFlag(false); //it.SetExtendTracksFlag(false); //it.SetFirstStationIndex(11); - it.SetSuppressGhostFlag(false); } auto trd2dIter2 = L1CAIteration("Trd2dIter2"); + trd2dIter2.SetMinNhits(3); + trd2dIter2.SetMinNhitsStation0(3); trd2dIter2.SetTrackChi2Cut(7.f); //10.f trd2dIter2.SetTripletChi2Cut(2 * 23.4450f); // = 7.815 * 3; // prob = 0.05 trd2dIter2.SetDoubletChi2Cut(4. * 7.56327f); // = 1.3449 * 2.f / 3.f; // prob = 0.1 @@ -844,7 +856,6 @@ InitStatus CbmL1::Init() trd2dIter2.SetMaxSlope(.5f); trd2dIter2.SetMaxDZ(0.05); trd2dIter2.SetTargetPosSigmaXY(8 * 10, 6 * 10); //(1, 1); - trd2dIter2.SetMinLevelTripletStart(0); trd2dIter2.SetPrimaryFlag(false); trd2dIter2.SetExtendTracksFlag(true); //trd2dIter2.SetFirstStationIndex(12); @@ -852,10 +863,9 @@ InitStatus CbmL1::Init() // Initialize CA track finder iterations sequence fInitManager.SetCAIterationsNumberCrosscheck(1); - //trackingIterFastPrim.SetExtendTracksFlag(true); //fInitManager.PushBackCAIteration(trackingIterFastPrim); - //fInitManager.PushBackCAIteration(globalIterPrimFast); - fInitManager.PushBackCAIteration(trd2dIter2); + fInitManager.PushBackCAIteration(globalIterPrimFast); + //fInitManager.PushBackCAIteration(trd2dIter2); /* fInitManager.SetCAIterationsNumberCrosscheck(5); fInitManager.PushBackCAIteration(trackingIterFastPrim); @@ -1761,4 +1771,4 @@ double CbmL1::boundedGaus(double sigma) x = gRandom->Gaus(0., sigma); } while (fabs(x) > 3.5 * sigma); return x; -} \ No newline at end of file +} diff --git a/reco/L1/L1Algo/L1CAIteration.cxx b/reco/L1/L1Algo/L1CAIteration.cxx index 766f1ff113584829a1db6dbf55cea666dace1a65..2239687a2b81cd381242b80eb2196253d6f01bed 100644 --- a/reco/L1/L1Algo/L1CAIteration.cxx +++ b/reco/L1/L1Algo/L1CAIteration.cxx @@ -27,7 +27,7 @@ L1CAIteration::L1CAIteration(const std::string& name) : fName(name) {} bool L1CAIteration::Check() const { constexpr float kMaxFloat = std::numeric_limits<float>::max(); - bool res = true; + bool res = true; // TODO: SZh 06.10.2022: These values should be tuned. At the moment the std::numeric_limits<T>::max value is used for // debug purposes. In future, these values will be strengthened. res = this->CheckValueLimits<float>("track_chi2_cut", fTrackChi2Cut, 0.f, kMaxFloat) && res; @@ -39,7 +39,8 @@ bool L1CAIteration::Check() const res = this->CheckValueLimits<float>("max_slope_pv", fMaxSlopePV, 0.f, kMaxFloat) && res; res = this->CheckValueLimits<float>("max_slope", fMaxSlope, 0.f, kMaxFloat) && res; res = this->CheckValueLimits<float>("max_dz", fMaxDZ, 0.f, kMaxFloat) && res; - res = this->CheckValueLimits<int>("min_start_triplet_lvl", fMinLevelTripletStart, 0, kMaxNstations) && res; + res = this->CheckValueLimits<int>("min_n_hits", fMinNhits, 3, kMaxNstations) && res; + res = this->CheckValueLimits<int>("min_n_hits_sta_0", fMinNhitsStation0, 3, kMaxNstations) && res; res = this->CheckValueLimits<int>("first_station_index", fFirstStationIndex, 0, kMaxNstations) && res; res = this->CheckValueLimits<float>("target_pos_sigma_x", fTargetPosSigmaX, 0.f, kMaxFloat) && res; res = this->CheckValueLimits<float>("target_pos_sigma_y", fTargetPosSigmaY, 0.f, kMaxFloat) && res; @@ -75,7 +76,8 @@ std::string L1CAIteration::ToString(int indentLevel) const aStream << indent << indCh << "Are tracks created from triplets: " << fIsTrackFromTriplets << '\n'; aStream << indent << indCh << "Are tracks extended with unused hits : " << fIfExtendTracks << '\n'; aStream << indent << indCh << "Are hits skip in triplets building: " << fIfJumped << '\n'; - aStream << indent << indCh << "Ghost suppression in tracks cand. selection :" << fIfSuppressGhost << '\n'; + aStream << indent << indCh << "Min n hits : " << fMinNhits << '\n'; + aStream << indent << indCh << "Min n hits for trscs at station 0: " << fMinNhitsStation0 << '\n'; aStream << indent << indCh << "Track chi2 cut: " << fTrackChi2Cut << '\n'; aStream << indent << indCh << "Triplet chi2 cut: " << fTripletChi2Cut << '\n'; aStream << indent << indCh << "Doublet chi2 cut: " << fDoubletChi2Cut << '\n'; @@ -87,7 +89,6 @@ std::string L1CAIteration::ToString(int indentLevel) const aStream << indent << indCh << "Max DZ: " << fMaxDZ << '\n'; aStream << indent << indCh << "Target position sigma X [cm]: " << fTargetPosSigmaX << '\n'; aStream << indent << indCh << "Target position sigma Y [cm]: " << fTargetPosSigmaY << '\n'; - aStream << indent << indCh << "Min level for triplet start: " << fMinLevelTripletStart << '\n'; aStream << indent << indCh << "First tracking station index: " << fFirstStationIndex; return aStream.str(); diff --git a/reco/L1/L1Algo/L1CAIteration.h b/reco/L1/L1Algo/L1CAIteration.h index 1123e303b385052b2aeb08d5c5002b07cecf2b9b..dabec209a6c83a1198f9f8c09f9adddf039f5940 100644 --- a/reco/L1/L1Algo/L1CAIteration.h +++ b/reco/L1/L1Algo/L1CAIteration.h @@ -80,9 +80,6 @@ public: /// 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; } @@ -95,8 +92,11 @@ public: /// Checks flag: true - only primary tracks are searched, false - [all or only secondary?] bool GetPrimaryFlag() const { return fIsPrimary; } - /// Sets flag: true - skip track candidates with level = 0 - bool GetSuppressGhostFlag() const { return fIfSuppressGhost; } + /// Gets min n hits + int GetMinNhits() const { return fMinNhits; } + + /// Gets min n hits for tracks that start on station 0 + int GetMinNhitsStation0() const { return fMinNhitsStation0; } /// Gets sigma target position in X direction [cm] float GetTargetPosSigmaX() const { return fTargetPosSigmaX; } @@ -154,9 +154,6 @@ public: /// 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; } @@ -170,7 +167,11 @@ public: void SetPrimaryFlag(bool flag) { fIsPrimary = flag; } /// Sets flag: true - skip track candidates with level = 0 - void SetSuppressGhostFlag(bool flag) { fIfSuppressGhost = flag; } + void SetMinNhits(int val) { fMinNhits = val; } + + /// Sets min n hits for tracks that start on station 0 + void SetMinNhitsStation0(int val) { fMinNhitsStation0 = val; } + /// Sets sigma of target positions in XY plane /// \param sigmaX Sigma value in X direction [cm] @@ -201,7 +202,7 @@ public: private: /** Basic fields **/ - std::string fName {""}; ///< Iteration name + std::string fName {""}; ///< Iteration name /** Track finder dependent cuts **/ // TODO: Iteratively change the literals to floats (S.Zharko) @@ -219,8 +220,6 @@ private: float fMaxDZ = 0.f; ///< Correction for accounting overlaping and iff z [cm] 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 int fFirstStationIndex = 0; ///< First station, used for tracking bool fIsPrimary = false; ///< Flag: true - only primary tracks are searched for @@ -240,10 +239,8 @@ private: bool fIfExtendTracks = false; ///< Flag: true - extends track candidates with unused hits bool fIfJumped = false; ///< Flag: true - find triplets with skip station - /// \brief Flag to suppress ghost tracks on the stage of track candidates selection - /// If the flag is true, three-hit tracks with level = 0 will be skip. This helps to reduce ghost tracks - /// under conditions of high hits density - bool fIfSuppressGhost = false; + int fMinNhits = 3; ///< min n hits on the tracks + int fMinNhitsStation0 = 3; ///< min n hits for tracks that start on station 0 /// Serialization method, used to save L1Hit objects into binary or text file in a defined order friend class boost::serialization::access; @@ -262,14 +259,14 @@ private: ar& fMaxDZ; ar& fTargetPosSigmaX; ar& fTargetPosSigmaY; - ar& fMinLevelTripletStart; ar& fFirstStationIndex; ar& fIsPrimary; ar& fIsElectron; ar& fIsTrackFromTriplets; ar& fIfExtendTracks; ar& fIfJumped; - ar& fIfSuppressGhost; + ar& fMinNhits; + ar& fMinNhitsStation0; } /// Checks, if a particular value lies within selected limits. In case of fail throws std::logic_error diff --git a/reco/L1/L1Algo/L1CATrackFinder.cxx b/reco/L1/L1Algo/L1CATrackFinder.cxx index c2f2b94cce47042d48152ffdbd2e2d321e7fcee9..840c2de26dd7c4bc323818e868408fc83ffabe2e 100644 --- a/reco/L1/L1Algo/L1CATrackFinder.cxx +++ b/reco/L1/L1Algo/L1CATrackFinder.cxx @@ -2053,8 +2053,8 @@ void L1Algo::CATrackFinder() ///= = ///==================================================================== - int min_level = - caIteration.GetMinLevelTripletStart(); // min level to start triplet. So min track length = min_level+3. + // min level to start triplet. So min track length = min_level+3. + int min_level = std::min(caIteration.GetMinNhits(), caIteration.GetMinNhitsStation0()) - 3; // TODO: SZh 04.10.2022: Why this fatal error is called? // NOTE: This line was wrapped into TRACKS_FROM_TRIPLETS ifdef @@ -2119,15 +2119,12 @@ void L1Algo::CATrackFinder() // if (!fpCurrentIteration->GetTrackFromTripletsFlag()) { // ghost suppression !!! - - if (fpCurrentIteration->GetSuppressGhostFlag()) { - if (first_trip.GetLevel() == 0) - continue; //ghost suppression//find track with 3 hits only if it was created from a chain of triplets, but not from only one triplet + int nHits = 3 + first_trip.GetLevel(); + if ((*vHitsUnused)[first_trip.GetLHit()].iSt == 0) { + if (nHits < fpCurrentIteration->GetMinNhitsStation0()) { continue; } } - - if (kGlobal != fTrackingMode && kMcbm != fTrackingMode) { - if ((firstTripletLevel == 0) && ((*vHitsUnused)[first_trip.GetLHit()].iSt != 0)) - continue; // ghost supression // collect only MAPS tracks-triplets CHECK!!! + else { + if (nHits < fpCurrentIteration->GetMinNhits()) { continue; } } } diff --git a/reco/L1/L1Algo/L1ConfigRW.cxx b/reco/L1/L1Algo/L1ConfigRW.cxx index 4222d112255c6594dceb371473b98ea6ea6b33d1..9a57f57063f151f4679f08c90014f169a517ef86 100644 --- a/reco/L1/L1Algo/L1ConfigRW.cxx +++ b/reco/L1/L1Algo/L1ConfigRW.cxx @@ -73,13 +73,13 @@ void L1ConfigRW::ReadCAIterations(const YAML::Node& node) caIter.SetTargetPosSigmaXY(input["target_pos_sigma_x"].as<float>(caIter.GetTargetPosSigmaX()), input["target_pos_sigma_y"].as<float>(caIter.GetTargetPosSigmaY())); caIter.SetFirstStationIndex(input["first_station_index"].as<int>(caIter.GetFirstStationIndex())); - caIter.SetMinLevelTripletStart(input["min_start_triplet_lvl"].as<int>(caIter.GetMinLevelTripletStart())); caIter.SetPrimaryFlag(input["is_primary"].as<bool>(caIter.GetPrimaryFlag())); caIter.SetElectronFlag(input["is_electron"].as<bool>(caIter.GetElectronFlag())); caIter.SetTrackFromTripletsFlag(input["is_track_from_triplets"].as<bool>(caIter.GetTrackFromTripletsFlag())); caIter.SetExtendTracksFlag(input["if_extend_tracks"].as<bool>(caIter.GetExtendTracksFlag())); caIter.SetJumpedFlag(input["is_jumped"].as<bool>(caIter.GetJumpedFlag())); - caIter.SetSuppressGhostFlag(input["if_suppress_ghost"].as<bool>(caIter.GetSuppressGhostFlag())); + caIter.SetMinNhits(input["min_n_hits"].as<bool>(caIter.GetMinNhits())); + caIter.SetMinNhitsStation0(input["min_n_hits_sta_0"].as<bool>(caIter.GetMinNhitsStation0())); if (fVerbose > 3) { LOG(info) << "L1 config:\n" << caIter.ToString(1); } fpInitManager->PushBackCAIteration(caIter); } diff --git a/reco/L1/L1Algo/L1TrackFitter.cxx b/reco/L1/L1Algo/L1TrackFitter.cxx index 16aa33fba77aa0cf20583165d6805f36dace762c..2991c9fa72dec989bcf00e3d5292a6e074ec4a38 100644 --- a/reco/L1/L1Algo/L1TrackFitter.cxx +++ b/reco/L1/L1Algo/L1TrackFitter.cxx @@ -599,7 +599,7 @@ void L1Algo::L1KFTrackFitter() } } - const L1TrackPar &Tf = fit.fTr; + const L1TrackPar& Tf = fit.fTr; for (int iVec = 0; iVec < nTracks_SIMD; iVec++) { t[iVec]->TFirst[0] = Tf.x[iVec];