diff --git a/RecoTracker/MkFit/BuildFile.xml b/RecoTracker/MkFit/BuildFile.xml
index 177da9dffc6df..7c1e113bb9cad 100644
--- a/RecoTracker/MkFit/BuildFile.xml
+++ b/RecoTracker/MkFit/BuildFile.xml
@@ -3,7 +3,8 @@
-
+
+
diff --git a/RecoTracker/MkFit/plugins/BuildFile.xml b/RecoTracker/MkFit/plugins/BuildFile.xml
index 6967de7612951..c993b66b41afa 100644
--- a/RecoTracker/MkFit/plugins/BuildFile.xml
+++ b/RecoTracker/MkFit/plugins/BuildFile.xml
@@ -29,7 +29,6 @@
-
diff --git a/RecoTracker/MkFit/plugins/MkFitEventOfHitsProducer.cc b/RecoTracker/MkFit/plugins/MkFitEventOfHitsProducer.cc
index ea23319cdbf4b..e3b800314a2a0 100644
--- a/RecoTracker/MkFit/plugins/MkFitEventOfHitsProducer.cc
+++ b/RecoTracker/MkFit/plugins/MkFitEventOfHitsProducer.cc
@@ -25,9 +25,9 @@
#include "RecoTracker/Record/interface/TrackerRecoGeometryRecord.h"
// mkFit includes
-#include "mkFit/HitStructures.h"
-#include "mkFit/MkStdSeqs.h"
-#include "LayerNumberConverter.h"
+#include "RecoTracker/MkFitCore/interface/HitStructures.h"
+#include "RecoTracker/MkFitCMS/interface/MkStdSeqs.h"
+#include "RecoTracker/MkFitCMS/interface/LayerNumberConverter.h"
class MkFitEventOfHitsProducer : public edm::global::EDProducer<> {
public:
@@ -95,7 +95,7 @@ void MkFitEventOfHitsProducer::produce(edm::StreamID iID, edm::Event& iEvent, co
const auto& mkFitGeom = iSetup.getData(mkFitGeomToken_);
auto eventOfHits = std::make_unique(mkFitGeom.trackerInfo());
- mkfit::StdSeq::Cmssw_LoadHits_Begin(*eventOfHits, {&pixelHits.hits(), &stripHits.hits()});
+ mkfit::StdSeq::cmssw_LoadHits_Begin(*eventOfHits, {&pixelHits.hits(), &stripHits.hits()});
if (usePixelQualityDB_ || useStripStripQualityDB_) {
std::vector deadvectors(mkFitGeom.layerNumberConverter().nLayers());
@@ -168,16 +168,16 @@ void MkFitEventOfHitsProducer::produce(edm::StreamID iID, edm::Event& iEvent, co
}
}
}
- mkfit::StdSeq::LoadDeads(*eventOfHits, deadvectors);
+ mkfit::StdSeq::loadDeads(*eventOfHits, deadvectors);
}
fill(iEvent.get(pixelClusterIndexToHitToken_).hits(), *eventOfHits, mkFitGeom);
fill(iEvent.get(stripClusterIndexToHitToken_).hits(), *eventOfHits, mkFitGeom);
- mkfit::StdSeq::Cmssw_LoadHits_End(*eventOfHits);
+ mkfit::StdSeq::cmssw_LoadHits_End(*eventOfHits);
auto const bs = iEvent.get(beamSpotToken_);
- eventOfHits->SetBeamSpot(
+ eventOfHits->setBeamSpot(
mkfit::BeamSpot(bs.x0(), bs.y0(), bs.z0(), bs.sigmaZ(), bs.BeamWidthX(), bs.BeamWidthY(), bs.dxdz(), bs.dydz()));
iEvent.emplace(putToken_, std::move(eventOfHits));
@@ -190,7 +190,7 @@ void MkFitEventOfHitsProducer::fill(const std::vector& hi
const auto* hit = hits[i];
if (hit != nullptr) {
const auto ilay = mkFitGeom.mkFitLayerNumber(hit->geographicalId());
- eventOfHits[ilay].RegisterHit(i);
+ eventOfHits[ilay].registerHit(i);
}
}
}
diff --git a/RecoTracker/MkFit/plugins/MkFitGeometryESProducer.cc b/RecoTracker/MkFit/plugins/MkFitGeometryESProducer.cc
index 04d25b3f8bbac..65ec712382df5 100644
--- a/RecoTracker/MkFit/plugins/MkFitGeometryESProducer.cc
+++ b/RecoTracker/MkFit/plugins/MkFitGeometryESProducer.cc
@@ -13,9 +13,9 @@
#include "createPhase1TrackerGeometry.h"
// mkFit includes
-#include "ConfigWrapper.h"
-#include "TrackerInfo.h"
-#include "mkFit/IterationConfig.h"
+#include "RecoTracker/MkFitCore/interface/ConfigWrapper.h"
+#include "RecoTracker/MkFitCore/interface/TrackerInfo.h"
+#include "RecoTracker/MkFitCore/interface/IterationConfig.h"
#include
diff --git a/RecoTracker/MkFit/plugins/MkFitIterationConfigESProducer.cc b/RecoTracker/MkFit/plugins/MkFitIterationConfigESProducer.cc
index 5f876e95bfff0..a1f134a3ef3a6 100644
--- a/RecoTracker/MkFit/plugins/MkFitIterationConfigESProducer.cc
+++ b/RecoTracker/MkFit/plugins/MkFitIterationConfigESProducer.cc
@@ -6,10 +6,10 @@
#include "RecoTracker/MkFit/interface/MkFitGeometry.h"
// mkFit includes
-#include "Track.h"
-#include "TrackerInfo.h"
-#include "mkFit/HitStructures.h"
-#include "mkFit/IterationConfig.h"
+#include "RecoTracker/MkFitCore/interface/Track.h"
+#include "RecoTracker/MkFitCore/interface/TrackerInfo.h"
+#include "RecoTracker/MkFitCore/interface/HitStructures.h"
+#include "RecoTracker/MkFitCore/interface/IterationConfig.h"
namespace {
using namespace mkfit;
@@ -26,7 +26,7 @@ namespace {
const bool z_dir_pos = S.pz() > 0;
const auto &hot = S.getLastHitOnTrack();
- const float eta = eoh[hot.layer].GetHit(hot.index).eta();
+ const float eta = eoh[hot.layer].refHit(hot.index).eta();
// Region to be defined by propagation / intersection tests
TrackerInfo::EtaRegion reg;
@@ -42,39 +42,39 @@ namespace {
constexpr int tecp1_id = 27;
constexpr int tecn1_id = 54;
- const LayerInfo &tib1 = trk_info.m_layers[tib1_id];
- const LayerInfo &tob1 = trk_info.m_layers[tob1_id];
+ const LayerInfo &tib1 = trk_info.layer(tib1_id);
+ const LayerInfo &tob1 = trk_info.layer(tob1_id);
- const LayerInfo &tecp1 = trk_info.m_layers[tecp1_id];
- const LayerInfo &tecn1 = trk_info.m_layers[tecn1_id];
+ const LayerInfo &tecp1 = trk_info.layer(tecp1_id);
+ const LayerInfo &tecn1 = trk_info.layer(tecn1_id);
const LayerInfo &tec_first = z_dir_pos ? tecp1 : tecn1;
const float maxR = S.maxReachRadius();
float z_at_maxr;
- bool can_reach_outer_brl = S.canReachRadius(outer_brl.m_rout);
+ bool can_reach_outer_brl = S.canReachRadius(outer_brl.rout());
float z_at_outer_brl;
bool misses_first_tec;
if (can_reach_outer_brl) {
- z_at_outer_brl = S.zAtR(outer_brl.m_rout);
+ z_at_outer_brl = S.zAtR(outer_brl.rout());
if (z_dir_pos)
- misses_first_tec = z_at_outer_brl < tec_first.m_zmin;
+ misses_first_tec = z_at_outer_brl < tec_first.zmin();
else
- misses_first_tec = z_at_outer_brl > tec_first.m_zmax;
+ misses_first_tec = z_at_outer_brl > tec_first.zmax();
} else {
z_at_maxr = S.zAtR(maxR);
if (z_dir_pos)
- misses_first_tec = z_at_maxr < tec_first.m_zmin;
+ misses_first_tec = z_at_maxr < tec_first.zmin();
else
- misses_first_tec = z_at_maxr > tec_first.m_zmax;
+ misses_first_tec = z_at_maxr > tec_first.zmax();
}
if (misses_first_tec) {
reg = TrackerInfo::Reg_Barrel;
} else {
- if ((S.canReachRadius(tib1.m_rin) && tib1.is_within_z_limits(S.zAtR(tib1.m_rin))) ||
- (S.canReachRadius(tob1.m_rin) && tob1.is_within_z_limits(S.zAtR(tob1.m_rin)))) {
+ if ((S.canReachRadius(tib1.rin()) && tib1.is_within_z_limits(S.zAtR(tib1.rin()))) ||
+ (S.canReachRadius(tob1.rin()) && tob1.is_within_z_limits(S.zAtR(tob1.rin())))) {
reg = z_dir_pos ? TrackerInfo::Reg_Transition_Pos : TrackerInfo::Reg_Transition_Neg;
} else {
reg = z_dir_pos ? TrackerInfo::Reg_Endcap_Pos : TrackerInfo::Reg_Endcap_Neg;
@@ -101,26 +101,26 @@ namespace {
constexpr int tecp1_id = 27;
constexpr int tecn1_id = 54;
- const LayerInfo &tib1 = trk_info.m_layers[tib1_id];
- const LayerInfo &tob1 = trk_info.m_layers[tob1_id];
+ const LayerInfo &tib1 = trk_info.layer(tib1_id);
+ const LayerInfo &tob1 = trk_info.layer(tob1_id);
- const LayerInfo &tidp1 = trk_info.m_layers[tidp1_id];
- const LayerInfo &tidn1 = trk_info.m_layers[tidn1_id];
+ const LayerInfo &tidp1 = trk_info.layer(tidp1_id);
+ const LayerInfo &tidn1 = trk_info.layer(tidn1_id);
- const LayerInfo &tecp1 = trk_info.m_layers[tecp1_id];
- const LayerInfo &tecn1 = trk_info.m_layers[tecn1_id];
+ const LayerInfo &tecp1 = trk_info.layer(tecp1_id);
+ const LayerInfo &tecn1 = trk_info.layer(tecn1_id);
// Merge first two layers to account for mono/stereo coverage.
// TrackerInfo could hold joint limits for sub-detectors.
- const auto &L = trk_info.m_layers;
- const float tidp_rin = std::min(L[tidp1_id].m_rin, L[tidp1_id + 1].m_rin);
- const float tidp_rout = std::max(L[tidp1_id].m_rout, L[tidp1_id + 1].m_rout);
- const float tecp_rin = std::min(L[tecp1_id].m_rin, L[tecp1_id + 1].m_rin);
- const float tecp_rout = std::max(L[tecp1_id].m_rout, L[tecp1_id + 1].m_rout);
- const float tidn_rin = std::min(L[tidn1_id].m_rin, L[tidn1_id + 1].m_rin);
- const float tidn_rout = std::max(L[tidn1_id].m_rout, L[tidn1_id + 1].m_rout);
- const float tecn_rin = std::min(L[tecn1_id].m_rin, L[tecn1_id + 1].m_rin);
- const float tecn_rout = std::max(L[tecn1_id].m_rout, L[tecn1_id + 1].m_rout);
+ const auto &L = trk_info;
+ const float tidp_rin = std::min(L[tidp1_id].rin(), L[tidp1_id + 1].rin());
+ const float tidp_rout = std::max(L[tidp1_id].rout(), L[tidp1_id + 1].rout());
+ const float tecp_rin = std::min(L[tecp1_id].rin(), L[tecp1_id + 1].rin());
+ const float tecp_rout = std::max(L[tecp1_id].rout(), L[tecp1_id + 1].rout());
+ const float tidn_rin = std::min(L[tidn1_id].rin(), L[tidn1_id + 1].rin());
+ const float tidn_rout = std::max(L[tidn1_id].rout(), L[tidn1_id + 1].rout());
+ const float tecn_rin = std::min(L[tecn1_id].rin(), L[tecn1_id + 1].rin());
+ const float tecn_rout = std::max(L[tecn1_id].rout(), L[tecn1_id + 1].rout());
// Bias towards more aggressive transition-region assignemnts.
// With current tunning it seems to make things a bit worse.
@@ -153,7 +153,7 @@ namespace {
const Track &S = in_seeds[i];
const auto &hot = S.getLastHitOnTrack();
- const float eta = eoh[hot.layer].GetHit(hot.index).eta();
+ const float eta = eoh[hot.layer].refHit(hot.index).eta();
// Region to be defined by propagation / intersection tests
TrackerInfo::EtaRegion reg;
@@ -165,14 +165,14 @@ namespace {
const float maxR = S.maxReachRadius();
if (z_dir_pos) {
- const bool in_tib = barrel_pos_check(S, maxR, tib1.m_rin, tib1.m_zmax);
- const bool in_tob = barrel_pos_check(S, maxR, tob1.m_rin, tob1.m_zmax);
+ const bool in_tib = barrel_pos_check(S, maxR, tib1.rin(), tib1.zmax());
+ const bool in_tob = barrel_pos_check(S, maxR, tob1.rin(), tob1.zmax());
if (!in_tib && !in_tob) {
reg = TrackerInfo::Reg_Endcap_Pos;
} else {
- const bool in_tid = endcap_pos_check(S, maxR, tidp_rout, tidp_rin, tidp1.m_zmin - tid_z_extra);
- const bool in_tec = endcap_pos_check(S, maxR, tecp_rout, tecp_rin, tecp1.m_zmin - tec_z_extra);
+ const bool in_tid = endcap_pos_check(S, maxR, tidp_rout, tidp_rin, tidp1.zmin() - tid_z_extra);
+ const bool in_tec = endcap_pos_check(S, maxR, tecp_rout, tecp_rin, tecp1.zmin() - tec_z_extra);
if (!in_tid && !in_tec) {
reg = TrackerInfo::Reg_Barrel;
@@ -181,14 +181,14 @@ namespace {
}
}
} else {
- const bool in_tib = barrel_neg_check(S, maxR, tib1.m_rin, tib1.m_zmin);
- const bool in_tob = barrel_neg_check(S, maxR, tob1.m_rin, tob1.m_zmin);
+ const bool in_tib = barrel_neg_check(S, maxR, tib1.rin(), tib1.zmin());
+ const bool in_tob = barrel_neg_check(S, maxR, tob1.rin(), tob1.zmin());
if (!in_tib && !in_tob) {
reg = TrackerInfo::Reg_Endcap_Neg;
} else {
- const bool in_tid = endcap_neg_check(S, maxR, tidn_rout, tidn_rin, tidn1.m_zmax + tid_z_extra);
- const bool in_tec = endcap_neg_check(S, maxR, tecn_rout, tecn_rin, tecn1.m_zmax + tec_z_extra);
+ const bool in_tid = endcap_neg_check(S, maxR, tidn_rout, tidn_rin, tidn1.zmax() + tid_z_extra);
+ const bool in_tec = endcap_neg_check(S, maxR, tecn_rout, tecn_rin, tecn1.zmax() + tec_z_extra);
if (!in_tid && !in_tec) {
reg = TrackerInfo::Reg_Barrel;
@@ -233,7 +233,8 @@ void MkFitIterationConfigESProducer::fillDescriptions(edm::ConfigurationDescript
std::unique_ptr MkFitIterationConfigESProducer::produce(
const TrackerRecoGeometryRecord &iRecord) {
- auto it_conf = mkfit::ConfigJson_Load_File(configFile_);
+ mkfit::ConfigJson cj;
+ auto it_conf = cj.load_File(configFile_);
it_conf->m_partition_seeds = partitionSeeds1;
return it_conf;
}
diff --git a/RecoTracker/MkFit/plugins/MkFitOutputConverter.cc b/RecoTracker/MkFit/plugins/MkFitOutputConverter.cc
index ba8e36e248a88..c2b3d8781c546 100644
--- a/RecoTracker/MkFit/plugins/MkFitOutputConverter.cc
+++ b/RecoTracker/MkFit/plugins/MkFitOutputConverter.cc
@@ -37,9 +37,9 @@
#include "RecoTracker/Record/interface/TrackerRecoGeometryRecord.h"
// mkFit indludes
-#include "LayerNumberConverter.h"
-#include "Track.h"
-#include "mkFit/HitStructures.h"
+#include "RecoTracker/MkFitCMS/interface/LayerNumberConverter.h"
+#include "RecoTracker/MkFitCore/interface/Track.h"
+#include "RecoTracker/MkFitCore/interface/HitStructures.h"
namespace {
template
diff --git a/RecoTracker/MkFit/plugins/MkFitProducer.cc b/RecoTracker/MkFit/plugins/MkFitProducer.cc
index af2b7856db16c..721a3310f0f7c 100644
--- a/RecoTracker/MkFit/plugins/MkFitProducer.cc
+++ b/RecoTracker/MkFit/plugins/MkFitProducer.cc
@@ -18,11 +18,11 @@
#include "RecoTracker/Record/interface/TrackerRecoGeometryRecord.h"
// mkFit includes
-#include "ConfigWrapper.h"
-#include "LayerNumberConverter.h"
-#include "mkFit/buildtestMPlex.h"
-#include "mkFit/IterationConfig.h"
-#include "mkFit/MkBuilderWrapper.h"
+#include "RecoTracker/MkFitCore/interface/ConfigWrapper.h"
+#include "RecoTracker/MkFitCMS/interface/LayerNumberConverter.h"
+#include "RecoTracker/MkFitCMS/interface/runFunctions.h"
+#include "RecoTracker/MkFitCore/interface/IterationConfig.h"
+#include "RecoTracker/MkFitCore/interface/MkBuilderWrapper.h"
// TBB includes
#include "oneapi/tbb/task_arena.h"
@@ -54,7 +54,6 @@ class MkFitProducer : public edm::global::EDProducer mkFitGeomToken_;
const edm::ESGetToken mkFitIterConfigToken_;
const edm::EDPutTokenT putToken_;
- std::function buildFunction_;
const float minGoodStripCharge_;
const bool seedCleaning_;
const bool backwardFitInCMSSW_;
@@ -101,7 +100,7 @@ MkFitProducer::MkFitProducer(edm::ParameterSet const& iConfig)
// TODO: what to do when we have multiple instances of MkFitProducer in a job?
mkfit::MkBuilderWrapper::populate();
- mkfit::ConfigWrapper::initializeForCMSSW(mkFitSilent_);
+ mkfit::ConfigWrapper::initializeForCMSSW();
}
void MkFitProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
@@ -134,12 +133,9 @@ void MkFitProducer::fillDescriptions(edm::ConfigurationDescriptions& description
}
std::unique_ptr MkFitProducer::beginStream(edm::StreamID iID) const {
- return std::make_unique();
+ return std::make_unique(mkFitSilent_);
}
-namespace {
- std::once_flag geometryFlag;
-}
void MkFitProducer::produce(edm::StreamID iID, edm::Event& iEvent, const edm::EventSetup& iSetup) const {
const auto& pixelHits = iEvent.get(pixelHitsToken_);
const auto& stripHits = iEvent.get(stripHitsToken_);
@@ -180,13 +176,6 @@ void MkFitProducer::produce(edm::StreamID iID, edm::Event& iEvent, const edm::Ev
stripClusterChargeCut(iEvent.get(stripClusterChargeToken_), stripMask);
}
- // Initialize the number of layers, has to be done exactly once in
- // the whole program.
- // TODO: the mechanism needs to be improved...
- std::call_once(geometryFlag, [nlayers = mkFitGeom.layerNumberConverter().nLayers()]() {
- mkfit::ConfigWrapper::setNTotalLayers(nlayers);
- });
-
// seeds need to be mutable because of the possible cleaning
auto seeds_mutable = seeds.seeds();
mkfit::TrackVec tracks;
diff --git a/RecoTracker/MkFit/plugins/MkFitSeedConverter.cc b/RecoTracker/MkFit/plugins/MkFitSeedConverter.cc
index fb427aa22d2ce..4f908c42cf094 100644
--- a/RecoTracker/MkFit/plugins/MkFitSeedConverter.cc
+++ b/RecoTracker/MkFit/plugins/MkFitSeedConverter.cc
@@ -31,8 +31,8 @@
#include "Math/SMatrix.h"
// mkFit includes
-#include "LayerNumberConverter.h"
-#include "Track.h"
+#include "RecoTracker/MkFitCMS/interface/LayerNumberConverter.h"
+#include "RecoTracker/MkFitCore/interface/Track.h"
class MkFitSeedConverter : public edm::global::EDProducer<> {
public:
diff --git a/RecoTracker/MkFit/plugins/convertHits.h b/RecoTracker/MkFit/plugins/convertHits.h
index f016b43b0fb0a..6560f50e208e6 100644
--- a/RecoTracker/MkFit/plugins/convertHits.h
+++ b/RecoTracker/MkFit/plugins/convertHits.h
@@ -17,8 +17,8 @@
#include "Math/SMatrix.h"
// mkFit includes
-#include "Hit.h"
-#include "mkFit/HitStructures.h"
+#include "RecoTracker/MkFitCore/interface/Hit.h"
+#include "RecoTracker/MkFitCore/interface/HitStructures.h"
namespace mkfit {
template
diff --git a/RecoTracker/MkFit/plugins/createPhase1TrackerGeometry.cc b/RecoTracker/MkFit/plugins/createPhase1TrackerGeometry.cc
index 9d795d48a4584..2c67582307b46 100644
--- a/RecoTracker/MkFit/plugins/createPhase1TrackerGeometry.cc
+++ b/RecoTracker/MkFit/plugins/createPhase1TrackerGeometry.cc
@@ -2,9 +2,8 @@
// Phase1 tracker geometry
//-------------------
-#include "Config.h"
-#include "Debug.h"
-#include "TrackerInfo.h"
+#include "RecoTracker/MkFitCore/interface/Config.h"
+#include "RecoTracker/MkFitCore/interface/TrackerInfo.h"
#include
@@ -16,20 +15,6 @@ namespace {
namespace mkfit {
void createPhase1TrackerGeometry(TrackerInfo &ti, bool verbose) {
- // TODO: these writes to global variables need to be removed
- Config::nTotalLayers = 18 + 2 * 27;
-
- Config::useCMSGeom = true;
-
- Config::finding_requires_propagation_to_hit_pos = true;
- Config::finding_inter_layer_pflags = PropagationFlags(PF_use_param_b_field | PF_apply_material);
- Config::finding_intra_layer_pflags = PropagationFlags(PF_none);
- Config::backward_fit_pflags = PropagationFlags(PF_use_param_b_field | PF_apply_material);
- Config::forward_fit_pflags = PropagationFlags(PF_use_param_b_field | PF_apply_material);
- Config::seed_fit_pflags = PropagationFlags(PF_none);
- Config::pca_prop_pflags = PropagationFlags(PF_none);
-
- ti.set_eta_regions(0.9, 1.7, 2.45, false);
ti.create_layers(18, 27, 27);
createPhase1TrackerGeometryAutoGen(ti);
@@ -38,8 +23,8 @@ namespace mkfit {
printf("==========================================================================================\n");
printf("Phase1 tracker -- Create_TrackerInfo finished\n");
printf("==========================================================================================\n");
- for (auto &i : ti.m_layers)
- i.print_layer();
+ for (int ii = 0; ii < ti.n_layers(); ++ii)
+ ti.layer(ii).print_layer();
printf("==========================================================================================\n");
}
}
diff --git a/RecoTracker/MkFit/plugins/createPhase1TrackerGeometryAutoGen.acc b/RecoTracker/MkFit/plugins/createPhase1TrackerGeometryAutoGen.acc
index 68229b38d0f7f..8989440b6958d 100644
--- a/RecoTracker/MkFit/plugins/createPhase1TrackerGeometryAutoGen.acc
+++ b/RecoTracker/MkFit/plugins/createPhase1TrackerGeometryAutoGen.acc
@@ -2,847 +2,649 @@ void createPhase1TrackerGeometryAutoGen(TrackerInfo &ti) {
// PIXB
{
- LayerInfo &obj = ti.m_layers[0];
- obj.m_layer_type = LayerInfo::Barrel;
+ LayerInfo &obj = ti.layer_nc(0);
+ obj.set_layer_type(LayerInfo::Barrel);
obj.set_limits(2.720, 3.390, -26.700, 26.700);
- obj.m_propagate_to = obj.r_mean();
- obj.set_next_layers(1, 18, 45);
- obj.m_q_bin = 2.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.r_mean());
+ obj.set_q_bin(2.000);
obj.m_is_pixb_lyr = true;
- obj.m_is_seed_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[1];
- obj.m_layer_type = LayerInfo::Barrel;
+ LayerInfo &obj = ti.layer_nc(1);
+ obj.set_layer_type(LayerInfo::Barrel);
obj.set_limits(6.560, 7.270, -26.700, 26.700);
- obj.m_propagate_to = obj.r_mean();
- obj.set_next_layers(2, 18, 45);
- obj.m_q_bin = 2.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.r_mean());
+ obj.set_q_bin(2.000);
obj.m_is_pixb_lyr = true;
- obj.m_is_seed_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[2];
- obj.m_layer_type = LayerInfo::Barrel;
+ LayerInfo &obj = ti.layer_nc(2);
+ obj.set_layer_type(LayerInfo::Barrel);
obj.set_limits(10.690, 11.360, -26.700, 26.700);
- obj.m_propagate_to = obj.r_mean();
- obj.set_next_layers(3, 18, 45);
- obj.m_q_bin = 2.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.r_mean());
+ obj.set_q_bin(2.000);
obj.m_is_pixb_lyr = true;
- obj.m_is_seed_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[3];
- obj.m_layer_type = LayerInfo::Barrel;
+ LayerInfo &obj = ti.layer_nc(3);
+ obj.set_layer_type(LayerInfo::Barrel);
obj.set_limits(15.800, 16.460, -26.700, 26.690);
- obj.m_propagate_to = obj.r_mean();
- obj.set_next_layers(4, 21, 48);
- obj.m_q_bin = 2.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.r_mean());
+ obj.set_q_bin(2.000);
obj.m_is_pixb_lyr = true;
- obj.m_is_seed_lyr = true;
}
// TIB
{
- LayerInfo &obj = ti.m_layers[4];
- obj.m_layer_type = LayerInfo::Barrel;
+ LayerInfo &obj = ti.layer_nc(4);
+ obj.set_layer_type(LayerInfo::Barrel);
obj.set_limits(23.450, 27.880, -66.670, 63.930);
- obj.m_propagate_to = obj.r_mean();
- obj.set_next_layers(5, 21, 48);
- obj.m_q_bin = 6.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.r_mean());
+ obj.set_q_bin(6.000);
obj.m_is_tib_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[5];
- obj.m_layer_type = LayerInfo::Barrel;
+ LayerInfo &obj = ti.layer_nc(5);
+ obj.set_layer_type(LayerInfo::Barrel);
obj.set_limits(23.450, 27.880, -66.670, 63.930);
- obj.m_propagate_to = obj.r_mean();
- obj.set_next_layers(6, 21, 48);
- obj.m_q_bin = 6.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = true;
+ obj.set_propagate_to(obj.r_mean());
+ obj.set_q_bin(6.000);
+ obj.set_is_stereo(true);
obj.m_is_tib_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[6];
- obj.m_layer_type = LayerInfo::Barrel;
+ LayerInfo &obj = ti.layer_nc(6);
+ obj.set_layer_type(LayerInfo::Barrel);
obj.set_limits(31.830, 36.240, -65.890, 66.670);
- obj.m_propagate_to = obj.r_mean();
- obj.set_next_layers(7, 21, 48);
- obj.m_q_bin = 6.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.r_mean());
+ obj.set_q_bin(6.000);
obj.m_is_tib_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[7];
- obj.m_layer_type = LayerInfo::Barrel;
+ LayerInfo &obj = ti.layer_nc(7);
+ obj.set_layer_type(LayerInfo::Barrel);
obj.set_limits(31.830, 36.240, -65.890, 66.670);
- obj.m_propagate_to = obj.r_mean();
- obj.set_next_layers(8, 21, 48);
- obj.m_q_bin = 6.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = true;
+ obj.set_propagate_to(obj.r_mean());
+ obj.set_q_bin(6.000);
+ obj.set_is_stereo(true);
obj.m_is_tib_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[8];
- obj.m_layer_type = LayerInfo::Barrel;
+ LayerInfo &obj = ti.layer_nc(8);
+ obj.set_layer_type(LayerInfo::Barrel);
obj.set_limits(39.880, 44.040, -66.400, 65.240);
- obj.m_propagate_to = obj.r_mean();
- obj.set_next_layers(9, 21, 48);
- obj.m_q_bin = 6.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.r_mean());
+ obj.set_q_bin(6.000);
obj.m_is_tib_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[9];
- obj.m_layer_type = LayerInfo::Barrel;
+ LayerInfo &obj = ti.layer_nc(9);
+ obj.set_layer_type(LayerInfo::Barrel);
obj.set_limits(47.810, 51.980, -66.400, 66.400);
- obj.m_propagate_to = obj.r_mean();
- obj.set_next_layers(10, 27, 54);
- obj.m_q_bin = 6.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.r_mean());
+ obj.set_q_bin(6.000);
obj.m_is_tib_lyr = true;
}
// TOB
{
- LayerInfo &obj = ti.m_layers[10];
- obj.m_layer_type = LayerInfo::Barrel;
+ LayerInfo &obj = ti.layer_nc(10);
+ obj.set_layer_type(LayerInfo::Barrel);
obj.set_limits(58.410, 63.430, -108.710, 108.710);
- obj.m_propagate_to = obj.r_mean();
- obj.set_next_layers(11, 27, 54);
- obj.m_q_bin = 9.500;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.r_mean());
+ obj.set_q_bin(9.500);
obj.m_is_tib_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[11];
- obj.m_layer_type = LayerInfo::Barrel;
+ LayerInfo &obj = ti.layer_nc(11);
+ obj.set_layer_type(LayerInfo::Barrel);
obj.set_limits(58.410, 63.430, -108.710, 108.710);
- obj.m_propagate_to = obj.r_mean();
- obj.set_next_layers(12, 27, 54);
- obj.m_q_bin = 9.500;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = true;
+ obj.set_propagate_to(obj.r_mean());
+ obj.set_q_bin(9.500);
+ obj.set_is_stereo(true);
obj.m_is_tib_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[12];
- obj.m_layer_type = LayerInfo::Barrel;
+ LayerInfo &obj = ti.layer_nc(12);
+ obj.set_layer_type(LayerInfo::Barrel);
obj.set_limits(66.810, 71.740, -108.700, 108.710);
- obj.m_propagate_to = obj.r_mean();
- obj.set_next_layers(13, 27, 54);
- obj.m_q_bin = 9.500;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.r_mean());
+ obj.set_q_bin(9.500);
obj.m_is_tib_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[13];
- obj.m_layer_type = LayerInfo::Barrel;
+ LayerInfo &obj = ti.layer_nc(13);
+ obj.set_layer_type(LayerInfo::Barrel);
obj.set_limits(66.810, 71.740, -108.700, 108.710);
- obj.m_propagate_to = obj.r_mean();
- obj.set_next_layers(14, 27, 54);
- obj.m_q_bin = 9.500;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = true;
+ obj.set_propagate_to(obj.r_mean());
+ obj.set_q_bin(9.500);
+ obj.set_is_stereo(true);
obj.m_is_tib_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[14];
- obj.m_layer_type = LayerInfo::Barrel;
+ LayerInfo &obj = ti.layer_nc(14);
+ obj.set_layer_type(LayerInfo::Barrel);
obj.set_limits(76.040, 80.090, -108.300, 108.290);
- obj.m_propagate_to = obj.r_mean();
- obj.set_next_layers(15, 27, 54);
- obj.m_q_bin = 9.500;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.r_mean());
+ obj.set_q_bin(9.500);
obj.m_is_tib_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[15];
- obj.m_layer_type = LayerInfo::Barrel;
+ LayerInfo &obj = ti.layer_nc(15);
+ obj.set_layer_type(LayerInfo::Barrel);
obj.set_limits(84.840, 88.880, -108.290, 108.300);
- obj.m_propagate_to = obj.r_mean();
- obj.set_next_layers(16, 27, 54);
- obj.m_q_bin = 9.500;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.r_mean());
+ obj.set_q_bin(9.500);
obj.m_is_tib_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[16];
- obj.m_layer_type = LayerInfo::Barrel;
+ LayerInfo &obj = ti.layer_nc(16);
+ obj.set_layer_type(LayerInfo::Barrel);
obj.set_limits(94.540, 98.570, -108.290, 108.290);
- obj.m_propagate_to = obj.r_mean();
- obj.set_next_layers(17, 27, 54);
- obj.m_q_bin = 9.500;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.r_mean());
+ obj.set_q_bin(9.500);
obj.m_is_tib_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[17];
- obj.m_layer_type = LayerInfo::Barrel;
+ LayerInfo &obj = ti.layer_nc(17);
+ obj.set_layer_type(LayerInfo::Barrel);
obj.set_limits(106.040, 110.060, -108.290, 108.290);
- obj.m_propagate_to = obj.r_mean();
- obj.set_next_layers(-1, -1, -1);
- obj.m_q_bin = 9.500;
- obj.m_is_outer = true;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.r_mean());
+ obj.set_q_bin(9.500);
obj.m_is_tib_lyr = true;
}
// PIXE +/-
{
- LayerInfo &obj = ti.m_layers[18];
- obj.m_layer_type = LayerInfo::EndCapPos;
+ LayerInfo &obj = ti.layer_nc(18);
+ obj.set_layer_type(LayerInfo::EndCapPos);
obj.set_limits(4.590, 16.090, 29.440, 35.210);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(4, 19, -1);
- obj.m_q_bin = 1.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(1.000);
obj.m_is_pixe_lyr = true;
- obj.m_is_seed_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[45];
- obj.m_layer_type = LayerInfo::EndCapNeg;
+ LayerInfo &obj = ti.layer_nc(45);
+ obj.set_layer_type(LayerInfo::EndCapNeg);
obj.set_limits(4.590, 16.090, -35.200, -29.440);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(4, -1, 46);
- obj.m_q_bin = 1.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(1.000);
obj.m_is_pixe_lyr = true;
- obj.m_is_seed_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[19];
- obj.m_layer_type = LayerInfo::EndCapPos;
+ LayerInfo &obj = ti.layer_nc(19);
+ obj.set_layer_type(LayerInfo::EndCapPos);
obj.set_limits(4.590, 16.090, 36.940, 42.700);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(4, 20, -1);
- obj.m_q_bin = 1.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(1.000);
obj.m_is_pixe_lyr = true;
- obj.m_is_seed_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[46];
- obj.m_layer_type = LayerInfo::EndCapNeg;
+ LayerInfo &obj = ti.layer_nc(46);
+ obj.set_layer_type(LayerInfo::EndCapNeg);
obj.set_limits(4.590, 16.090, -42.700, -36.940);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(4, -1, 47);
- obj.m_q_bin = 1.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(1.000);
obj.m_is_pixe_lyr = true;
- obj.m_is_seed_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[20];
- obj.m_layer_type = LayerInfo::EndCapPos;
+ LayerInfo &obj = ti.layer_nc(20);
+ obj.set_layer_type(LayerInfo::EndCapPos);
obj.set_limits(4.590, 16.090, 46.450, 52.200);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(4, 21, -1);
- obj.m_q_bin = 1.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(1.000);
obj.m_is_pixe_lyr = true;
- obj.m_is_seed_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[47];
- obj.m_layer_type = LayerInfo::EndCapNeg;
+ LayerInfo &obj = ti.layer_nc(47);
+ obj.set_layer_type(LayerInfo::EndCapNeg);
obj.set_limits(4.590, 16.090, -52.210, -46.450);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(4, -1, 48);
- obj.m_q_bin = 1.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(1.000);
obj.m_is_pixe_lyr = true;
- obj.m_is_seed_lyr = true;
}
// TID +/-
{
- LayerInfo &obj = ti.m_layers[21];
- obj.m_layer_type = LayerInfo::EndCapPos;
+ LayerInfo &obj = ti.layer_nc(21);
+ obj.set_layer_type(LayerInfo::EndCapPos);
obj.set_limits(22.980, 50.440, 74.350, 84.050);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(10, 22, -1);
- obj.m_q_bin = 5.500;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(5.500);
obj.m_is_tid_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[48];
- obj.m_layer_type = LayerInfo::EndCapNeg;
+ LayerInfo &obj = ti.layer_nc(48);
+ obj.set_layer_type(LayerInfo::EndCapNeg);
obj.set_limits(22.980, 50.440, -84.050, -74.350);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(10, -1, 49);
- obj.m_q_bin = 5.500;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(5.500);
obj.m_is_tid_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[22];
- obj.m_layer_type = LayerInfo::EndCapPos;
+ LayerInfo &obj = ti.layer_nc(22);
+ obj.set_layer_type(LayerInfo::EndCapPos);
obj.set_limits(22.800, 42.000, 74.350, 84.050);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(10, 23, -1);
- obj.m_q_bin = 5.500;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = true;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(5.500);
+ obj.set_is_stereo(true);
obj.m_is_tid_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[49];
- obj.m_layer_type = LayerInfo::EndCapNeg;
+ LayerInfo &obj = ti.layer_nc(49);
+ obj.set_layer_type(LayerInfo::EndCapNeg);
obj.set_limits(22.800, 42.000, -84.050, -74.350);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(10, -1, 50);
- obj.m_q_bin = 5.500;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = true;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(5.500);
+ obj.set_is_stereo(true);
obj.m_is_tid_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[23];
- obj.m_layer_type = LayerInfo::EndCapPos;
+ LayerInfo &obj = ti.layer_nc(23);
+ obj.set_layer_type(LayerInfo::EndCapPos);
obj.set_limits(22.980, 50.440, 87.300, 97.000);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(10, 24, -1);
- obj.m_q_bin = 5.500;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(5.500);
obj.m_is_tid_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[50];
- obj.m_layer_type = LayerInfo::EndCapNeg;
+ LayerInfo &obj = ti.layer_nc(50);
+ obj.set_layer_type(LayerInfo::EndCapNeg);
obj.set_limits(22.980, 50.440, -97.000, -87.300);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(10, -1, 51);
- obj.m_q_bin = 5.500;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(5.500);
obj.m_is_tid_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[24];
- obj.m_layer_type = LayerInfo::EndCapPos;
+ LayerInfo &obj = ti.layer_nc(24);
+ obj.set_layer_type(LayerInfo::EndCapPos);
obj.set_limits(22.800, 42.000, 87.300, 97.000);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(10, 25, -1);
- obj.m_q_bin = 5.500;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = true;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(5.500);
+ obj.set_is_stereo(true);
obj.m_is_tid_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[51];
- obj.m_layer_type = LayerInfo::EndCapNeg;
+ LayerInfo &obj = ti.layer_nc(51);
+ obj.set_layer_type(LayerInfo::EndCapNeg);
obj.set_limits(22.800, 42.000, -97.000, -87.300);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(10, -1, 52);
- obj.m_q_bin = 5.500;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = true;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(5.500);
+ obj.set_is_stereo(true);
obj.m_is_tid_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[25];
- obj.m_layer_type = LayerInfo::EndCapPos;
+ LayerInfo &obj = ti.layer_nc(25);
+ obj.set_layer_type(LayerInfo::EndCapPos);
obj.set_limits(22.980, 50.440, 100.250, 109.950);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(10, 26, -1);
- obj.m_q_bin = 5.500;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(5.500);
obj.m_is_tid_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[52];
- obj.m_layer_type = LayerInfo::EndCapNeg;
+ LayerInfo &obj = ti.layer_nc(52);
+ obj.set_layer_type(LayerInfo::EndCapNeg);
obj.set_limits(22.980, 50.440, -109.950, -100.250);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(10, -1, 53);
- obj.m_q_bin = 5.500;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(5.500);
obj.m_is_tid_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[26];
- obj.m_layer_type = LayerInfo::EndCapPos;
+ LayerInfo &obj = ti.layer_nc(26);
+ obj.set_layer_type(LayerInfo::EndCapPos);
obj.set_limits(22.800, 42.000, 100.250, 109.950);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(10, 27, -1);
- obj.m_q_bin = 5.500;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = true;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(5.500);
+ obj.set_is_stereo(true);
obj.m_is_tid_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[53];
- obj.m_layer_type = LayerInfo::EndCapNeg;
+ LayerInfo &obj = ti.layer_nc(53);
+ obj.set_layer_type(LayerInfo::EndCapNeg);
obj.set_limits(22.800, 42.000, -109.950, -100.250);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(10, -1, 54);
- obj.m_q_bin = 5.500;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = true;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(5.500);
+ obj.set_is_stereo(true);
obj.m_is_tid_lyr = true;
}
// TEC +/-
{
- LayerInfo &obj = ti.m_layers[27];
- obj.m_layer_type = LayerInfo::EndCapPos;
+ LayerInfo &obj = ti.layer_nc(27);
+ obj.set_layer_type(LayerInfo::EndCapPos);
obj.set_limits(23.370, 109.390, 126.380, 137.390);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, 28, -1);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
obj.m_is_tec_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[54];
- obj.m_layer_type = LayerInfo::EndCapNeg;
+ LayerInfo &obj = ti.layer_nc(54);
+ obj.set_layer_type(LayerInfo::EndCapNeg);
obj.set_limits(23.360, 109.400, -137.390, -126.380);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, -1, 55);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
obj.m_is_tec_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[28];
- obj.m_layer_type = LayerInfo::EndCapPos;
+ LayerInfo &obj = ti.layer_nc(28);
+ obj.set_layer_type(LayerInfo::EndCapPos);
obj.set_limits(23.300, 76.100, 126.380, 137.390);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, 29, -1);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = true;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
+ obj.set_is_stereo(true);
obj.m_is_tec_lyr = true;
obj.set_r_hole_range(42.000, 59.900);
}
{
- LayerInfo &obj = ti.m_layers[55];
- obj.m_layer_type = LayerInfo::EndCapNeg;
+ LayerInfo &obj = ti.layer_nc(55);
+ obj.set_layer_type(LayerInfo::EndCapNeg);
obj.set_limits(23.300, 76.100, -137.390, -126.380);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, -1, 56);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = true;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
+ obj.set_is_stereo(true);
obj.m_is_tec_lyr = true;
obj.set_r_hole_range(42.000, 59.900);
}
{
- LayerInfo &obj = ti.m_layers[29];
- obj.m_layer_type = LayerInfo::EndCapPos;
+ LayerInfo &obj = ti.layer_nc(29);
+ obj.set_layer_type(LayerInfo::EndCapPos);
obj.set_limits(23.360, 109.410, 140.380, 151.390);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, 30, -1);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
obj.m_is_tec_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[56];
- obj.m_layer_type = LayerInfo::EndCapNeg;
+ LayerInfo &obj = ti.layer_nc(56);
+ obj.set_layer_type(LayerInfo::EndCapNeg);
obj.set_limits(23.360, 109.390, -151.420, -140.380);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, -1, 57);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
obj.m_is_tec_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[30];
- obj.m_layer_type = LayerInfo::EndCapPos;
+ LayerInfo &obj = ti.layer_nc(30);
+ obj.set_layer_type(LayerInfo::EndCapPos);
obj.set_limits(23.300, 76.100, 140.380, 151.390);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, 31, -1);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = true;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
+ obj.set_is_stereo(true);
obj.m_is_tec_lyr = true;
obj.set_r_hole_range(42.000, 59.900);
}
{
- LayerInfo &obj = ti.m_layers[57];
- obj.m_layer_type = LayerInfo::EndCapNeg;
+ LayerInfo &obj = ti.layer_nc(57);
+ obj.set_layer_type(LayerInfo::EndCapNeg);
obj.set_limits(23.300, 76.100, -151.420, -140.380);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, -1, 58);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = true;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
+ obj.set_is_stereo(true);
obj.m_is_tec_lyr = true;
obj.set_r_hole_range(42.000, 59.900);
}
{
- LayerInfo &obj = ti.m_layers[31];
- obj.m_layer_type = LayerInfo::EndCapPos;
+ LayerInfo &obj = ti.layer_nc(31);
+ obj.set_layer_type(LayerInfo::EndCapPos);
obj.set_limits(23.360, 109.390, 154.380, 165.390);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, 32, -1);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
obj.m_is_tec_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[58];
- obj.m_layer_type = LayerInfo::EndCapNeg;
+ LayerInfo &obj = ti.layer_nc(58);
+ obj.set_layer_type(LayerInfo::EndCapNeg);
obj.set_limits(23.360, 109.390, -165.390, -154.380);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, -1, 59);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
obj.m_is_tec_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[32];
- obj.m_layer_type = LayerInfo::EndCapPos;
+ LayerInfo &obj = ti.layer_nc(32);
+ obj.set_layer_type(LayerInfo::EndCapPos);
obj.set_limits(23.300, 76.100, 154.380, 165.390);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, 33, -1);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = true;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
+ obj.set_is_stereo(true);
obj.m_is_tec_lyr = true;
obj.set_r_hole_range(42.000, 59.900);
}
{
- LayerInfo &obj = ti.m_layers[59];
- obj.m_layer_type = LayerInfo::EndCapNeg;
+ LayerInfo &obj = ti.layer_nc(59);
+ obj.set_layer_type(LayerInfo::EndCapNeg);
obj.set_limits(23.300, 76.100, -165.390, -154.380);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, -1, 60);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = true;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
+ obj.set_is_stereo(true);
obj.m_is_tec_lyr = true;
obj.set_r_hole_range(42.000, 59.900);
}
{
- LayerInfo &obj = ti.m_layers[33];
- obj.m_layer_type = LayerInfo::EndCapPos;
+ LayerInfo &obj = ti.layer_nc(33);
+ obj.set_layer_type(LayerInfo::EndCapPos);
obj.set_limits(32.110, 109.400, 168.380, 179.380);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, 34, -1);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
obj.m_is_tec_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[60];
- obj.m_layer_type = LayerInfo::EndCapNeg;
+ LayerInfo &obj = ti.layer_nc(60);
+ obj.set_layer_type(LayerInfo::EndCapNeg);
obj.set_limits(32.110, 109.390, -179.390, -168.380);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, -1, 61);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
obj.m_is_tec_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[34];
- obj.m_layer_type = LayerInfo::EndCapPos;
+ LayerInfo &obj = ti.layer_nc(34);
+ obj.set_layer_type(LayerInfo::EndCapPos);
obj.set_limits(31.600, 75.900, 168.380, 179.380);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, 35, -1);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = true;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
+ obj.set_is_stereo(true);
obj.m_is_tec_lyr = true;
obj.set_r_hole_range(42.100, 59.700);
}
{
- LayerInfo &obj = ti.m_layers[61];
- obj.m_layer_type = LayerInfo::EndCapNeg;
+ LayerInfo &obj = ti.layer_nc(61);
+ obj.set_layer_type(LayerInfo::EndCapNeg);
obj.set_limits(31.600, 75.900, -179.390, -168.380);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, -1, 62);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = true;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
+ obj.set_is_stereo(true);
obj.m_is_tec_lyr = true;
obj.set_r_hole_range(42.100, 59.700);
}
{
- LayerInfo &obj = ti.m_layers[35];
- obj.m_layer_type = LayerInfo::EndCapPos;
+ LayerInfo &obj = ti.layer_nc(35);
+ obj.set_layer_type(LayerInfo::EndCapPos);
obj.set_limits(32.110, 109.390, 182.370, 193.390);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, 36, -1);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
obj.m_is_tec_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[62];
- obj.m_layer_type = LayerInfo::EndCapNeg;
+ LayerInfo &obj = ti.layer_nc(62);
+ obj.set_layer_type(LayerInfo::EndCapNeg);
obj.set_limits(32.110, 109.390, -193.380, -182.380);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, -1, 63);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
obj.m_is_tec_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[36];
- obj.m_layer_type = LayerInfo::EndCapPos;
+ LayerInfo &obj = ti.layer_nc(36);
+ obj.set_layer_type(LayerInfo::EndCapPos);
obj.set_limits(31.600, 75.900, 182.370, 193.390);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, 37, -1);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = true;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
+ obj.set_is_stereo(true);
obj.m_is_tec_lyr = true;
obj.set_r_hole_range(42.100, 59.700);
}
{
- LayerInfo &obj = ti.m_layers[63];
- obj.m_layer_type = LayerInfo::EndCapNeg;
+ LayerInfo &obj = ti.layer_nc(63);
+ obj.set_layer_type(LayerInfo::EndCapNeg);
obj.set_limits(31.600, 75.900, -193.380, -182.380);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, -1, 64);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = true;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
+ obj.set_is_stereo(true);
obj.m_is_tec_lyr = true;
obj.set_r_hole_range(42.100, 59.700);
}
{
- LayerInfo &obj = ti.m_layers[37];
- obj.m_layer_type = LayerInfo::EndCapPos;
+ LayerInfo &obj = ti.layer_nc(37);
+ obj.set_layer_type(LayerInfo::EndCapPos);
obj.set_limits(32.110, 109.390, 199.870, 210.880);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, 38, -1);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
obj.m_is_tec_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[64];
- obj.m_layer_type = LayerInfo::EndCapNeg;
+ LayerInfo &obj = ti.layer_nc(64);
+ obj.set_layer_type(LayerInfo::EndCapNeg);
obj.set_limits(32.110, 109.390, -210.880, -199.870);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, -1, 65);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
obj.m_is_tec_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[38];
- obj.m_layer_type = LayerInfo::EndCapPos;
+ LayerInfo &obj = ti.layer_nc(38);
+ obj.set_layer_type(LayerInfo::EndCapPos);
obj.set_limits(31.600, 75.900, 199.870, 210.880);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, 39, -1);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = true;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
+ obj.set_is_stereo(true);
obj.m_is_tec_lyr = true;
obj.set_r_hole_range(42.100, 59.700);
}
{
- LayerInfo &obj = ti.m_layers[65];
- obj.m_layer_type = LayerInfo::EndCapNeg;
+ LayerInfo &obj = ti.layer_nc(65);
+ obj.set_layer_type(LayerInfo::EndCapNeg);
obj.set_limits(31.600, 75.900, -210.880, -199.870);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, -1, 66);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = true;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
+ obj.set_is_stereo(true);
obj.m_is_tec_lyr = true;
obj.set_r_hole_range(42.100, 59.700);
}
{
- LayerInfo &obj = ti.m_layers[39];
- obj.m_layer_type = LayerInfo::EndCapPos;
+ LayerInfo &obj = ti.layer_nc(39);
+ obj.set_layer_type(LayerInfo::EndCapPos);
obj.set_limits(39.200, 109.390, 218.870, 229.860);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, 40, -1);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
obj.m_is_tec_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[66];
- obj.m_layer_type = LayerInfo::EndCapNeg;
+ LayerInfo &obj = ti.layer_nc(66);
+ obj.set_layer_type(LayerInfo::EndCapNeg);
obj.set_limits(39.200, 109.390, -229.860, -218.870);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, -1, 67);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
obj.m_is_tec_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[40];
- obj.m_layer_type = LayerInfo::EndCapPos;
+ LayerInfo &obj = ti.layer_nc(40);
+ obj.set_layer_type(LayerInfo::EndCapPos);
obj.set_limits(59.900, 75.900, 218.870, 229.860);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, 41, -1);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = true;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
+ obj.set_is_stereo(true);
obj.m_is_tec_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[67];
- obj.m_layer_type = LayerInfo::EndCapNeg;
+ LayerInfo &obj = ti.layer_nc(67);
+ obj.set_layer_type(LayerInfo::EndCapNeg);
obj.set_limits(59.900, 75.900, -229.860, -218.870);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, -1, 68);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = true;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
+ obj.set_is_stereo(true);
obj.m_is_tec_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[41];
- obj.m_layer_type = LayerInfo::EndCapPos;
+ LayerInfo &obj = ti.layer_nc(41);
+ obj.set_layer_type(LayerInfo::EndCapPos);
obj.set_limits(39.200, 109.400, 239.370, 250.360);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, 42, -1);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
obj.m_is_tec_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[68];
- obj.m_layer_type = LayerInfo::EndCapNeg;
+ LayerInfo &obj = ti.layer_nc(68);
+ obj.set_layer_type(LayerInfo::EndCapNeg);
obj.set_limits(39.200, 109.400, -250.360, -239.370);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, -1, 69);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
obj.m_is_tec_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[42];
- obj.m_layer_type = LayerInfo::EndCapPos;
+ LayerInfo &obj = ti.layer_nc(42);
+ obj.set_layer_type(LayerInfo::EndCapPos);
obj.set_limits(59.900, 75.900, 239.370, 250.360);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, 43, -1);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = true;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
+ obj.set_is_stereo(true);
obj.m_is_tec_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[69];
- obj.m_layer_type = LayerInfo::EndCapNeg;
+ LayerInfo &obj = ti.layer_nc(69);
+ obj.set_layer_type(LayerInfo::EndCapNeg);
obj.set_limits(59.900, 75.900, -250.360, -239.370);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, -1, 70);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = true;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
+ obj.set_is_stereo(true);
obj.m_is_tec_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[43];
- obj.m_layer_type = LayerInfo::EndCapPos;
+ LayerInfo &obj = ti.layer_nc(43);
+ obj.set_layer_type(LayerInfo::EndCapPos);
obj.set_limits(50.410, 109.400, 260.870, 271.870);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, 44, -1);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
obj.m_is_tec_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[70];
- obj.m_layer_type = LayerInfo::EndCapNeg;
+ LayerInfo &obj = ti.layer_nc(70);
+ obj.set_layer_type(LayerInfo::EndCapNeg);
obj.set_limits(50.410, 109.390, -271.880, -260.870);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, -1, 71);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = false;
- obj.m_is_stereo_lyr = false;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
obj.m_is_tec_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[44];
- obj.m_layer_type = LayerInfo::EndCapPos;
+ LayerInfo &obj = ti.layer_nc(44);
+ obj.set_layer_type(LayerInfo::EndCapPos);
obj.set_limits(59.900, 75.900, 260.870, 271.870);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, -1, -1);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = true;
- obj.m_is_stereo_lyr = true;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
+ obj.set_is_stereo(true);
obj.m_is_tec_lyr = true;
}
{
- LayerInfo &obj = ti.m_layers[71];
- obj.m_layer_type = LayerInfo::EndCapNeg;
+ LayerInfo &obj = ti.layer_nc(71);
+ obj.set_layer_type(LayerInfo::EndCapNeg);
obj.set_limits(59.900, 75.900, -271.880, -260.870);
- obj.m_propagate_to = obj.z_mean();
- obj.set_next_layers(-1, -1, -1);
- obj.m_q_bin = 10.000;
- obj.m_is_outer = true;
- obj.m_is_stereo_lyr = true;
+ obj.set_propagate_to(obj.z_mean());
+ obj.set_q_bin(10.000);
+ obj.set_is_stereo(true);
obj.m_is_tec_lyr = true;
}
}
diff --git a/RecoTracker/MkFit/src/ES_MkFitIterationConfig.cc b/RecoTracker/MkFit/src/ES_MkFitIterationConfig.cc
index 9ba5e5559c1ad..3562947eb5264 100644
--- a/RecoTracker/MkFit/src/ES_MkFitIterationConfig.cc
+++ b/RecoTracker/MkFit/src/ES_MkFitIterationConfig.cc
@@ -1,3 +1,3 @@
-#include "mkFit/IterationConfig.h"
+#include "RecoTracker/MkFitCore/interface/IterationConfig.h"
#include "FWCore/Utilities/interface/typelookup.h"
TYPELOOKUP_DATA_REG(mkfit::IterationConfig);
diff --git a/RecoTracker/MkFit/src/MkFitEventOfHits.cc b/RecoTracker/MkFit/src/MkFitEventOfHits.cc
index 72b6c98345dae..1070d692ad862 100644
--- a/RecoTracker/MkFit/src/MkFitEventOfHits.cc
+++ b/RecoTracker/MkFit/src/MkFitEventOfHits.cc
@@ -1,7 +1,7 @@
#include "RecoTracker/MkFit/interface/MkFitEventOfHits.h"
// mkFit includes
-#include "mkFit/HitStructures.h"
+#include "RecoTracker/MkFitCore/interface/HitStructures.h"
MkFitEventOfHits::MkFitEventOfHits() = default;
MkFitEventOfHits::MkFitEventOfHits(std::unique_ptr eoh) : eventOfHits_(std::move(eoh)) {}
diff --git a/RecoTracker/MkFit/src/MkFitGeometry.cc b/RecoTracker/MkFit/src/MkFitGeometry.cc
index 35616f90b902b..3bfb51ecfcca6 100644
--- a/RecoTracker/MkFit/src/MkFitGeometry.cc
+++ b/RecoTracker/MkFit/src/MkFitGeometry.cc
@@ -5,8 +5,8 @@
#include "RecoTracker/TkDetLayers/interface/GeometricSearchTracker.h"
#include "RecoTracker/MkFit/interface/MkFitGeometry.h"
-#include "LayerNumberConverter.h"
-#include "TrackerInfo.h"
+#include "RecoTracker/MkFitCMS/interface/LayerNumberConverter.h"
+#include "RecoTracker/MkFitCore/interface/TrackerInfo.h"
namespace {
bool isPlusSide(const TrackerTopology& ttopo, DetId detid) {
diff --git a/RecoTracker/MkFit/src/MkFitHitWrapper.cc b/RecoTracker/MkFit/src/MkFitHitWrapper.cc
index ebef4972f777b..3bf8ddb6cfade 100644
--- a/RecoTracker/MkFit/src/MkFitHitWrapper.cc
+++ b/RecoTracker/MkFit/src/MkFitHitWrapper.cc
@@ -2,8 +2,8 @@
#include "RecoTracker/MkFit/interface/MkFitHitWrapper.h"
// mkFit includes
-#include "Hit.h"
-#include "mkFit/HitStructures.h"
+#include "RecoTracker/MkFitCore/interface/Hit.h"
+#include "RecoTracker/MkFitCore/interface/HitStructures.h"
MkFitHitWrapper::MkFitHitWrapper() = default;
MkFitHitWrapper::~MkFitHitWrapper() = default;
diff --git a/RecoTracker/MkFit/src/MkFitOutputWrapper.cc b/RecoTracker/MkFit/src/MkFitOutputWrapper.cc
index 7ad4b457c10dc..f94dd46c59ffa 100644
--- a/RecoTracker/MkFit/src/MkFitOutputWrapper.cc
+++ b/RecoTracker/MkFit/src/MkFitOutputWrapper.cc
@@ -1,7 +1,7 @@
#include "RecoTracker/MkFit/interface/MkFitOutputWrapper.h"
// mkFit includes
-#include "Track.h"
+#include "RecoTracker/MkFitCore/interface/Track.h"
MkFitOutputWrapper::MkFitOutputWrapper() = default;
diff --git a/RecoTracker/MkFit/src/MkFitSeedWrapper.cc b/RecoTracker/MkFit/src/MkFitSeedWrapper.cc
index 22964e21df56d..cdb6e87a7cf55 100644
--- a/RecoTracker/MkFit/src/MkFitSeedWrapper.cc
+++ b/RecoTracker/MkFit/src/MkFitSeedWrapper.cc
@@ -1,7 +1,7 @@
#include "RecoTracker/MkFit/interface/MkFitSeedWrapper.h"
// mkFit includes
-#include "Track.h"
+#include "RecoTracker/MkFitCore/interface/Track.h"
MkFitSeedWrapper::MkFitSeedWrapper() = default;
diff --git a/RecoTracker/MkFitCMS/BuildFile.xml b/RecoTracker/MkFitCMS/BuildFile.xml
new file mode 100644
index 0000000000000..9ab03be951b1e
--- /dev/null
+++ b/RecoTracker/MkFitCMS/BuildFile.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/RecoTracker/MkFitCMS/interface/LayerNumberConverter.h b/RecoTracker/MkFitCMS/interface/LayerNumberConverter.h
new file mode 100644
index 0000000000000..5528318dec468
--- /dev/null
+++ b/RecoTracker/MkFitCMS/interface/LayerNumberConverter.h
@@ -0,0 +1,116 @@
+#ifndef RecoTracker_MkFitCMS_interface_LayerNumberConverter_h
+#define RecoTracker_MkFitCMS_interface_LayerNumberConverter_h
+
+namespace mkfit {
+
+ enum struct TkLayout { phase0 = 0, phase1 = 1 };
+
+ class LayerNumberConverter {
+ public:
+ LayerNumberConverter(TkLayout layout) : lo_(layout) {}
+ unsigned int nLayers() const {
+ if (lo_ == TkLayout::phase0)
+ return 69;
+ if (lo_ == TkLayout::phase1)
+ return 72;
+ return 10;
+ }
+ int convertLayerNumber(int det, int lay, bool useMatched, int isStereo, bool posZ) const {
+ if (det == 1 || det == 3 || det == 5) {
+ return convertBarrelLayerNumber(det, lay, useMatched, isStereo);
+ } else {
+ int disk = convertDiskNumber(det, lay, useMatched, isStereo);
+ if (disk < 0)
+ return -1;
+
+ int lOffset = 0;
+ if (lo_ == TkLayout::phase1)
+ lOffset = 1;
+ disk += 17 + lOffset;
+ if (!posZ)
+ disk += 25 + 2 * lOffset;
+ return disk;
+ }
+ return -1;
+ }
+
+ int convertBarrelLayerNumber(int cmsswdet, int cmsswlay, bool useMatched, int isStereo) const {
+ int lOffset = 0;
+ if (lo_ == TkLayout::phase1)
+ lOffset = 1;
+ if (cmsswdet == 2 || cmsswdet == 4 || cmsswdet == 6)
+ return -1; //FPIX, TID, TEC
+ if (cmsswdet == 1)
+ return cmsswlay - 1; //BPIX
+ if (useMatched) {
+ //TIB
+ if (cmsswdet == 3) {
+ if (cmsswlay == 1 && isStereo == -1)
+ return 3 + lOffset;
+ else if (cmsswlay == 2 && isStereo == -1)
+ return 4 + lOffset;
+ else if (cmsswlay == 3 && isStereo == 0)
+ return 5 + lOffset;
+ else if (cmsswlay == 4 && isStereo == 0)
+ return 6 + lOffset;
+ }
+ //TOB
+ else if (cmsswdet == 5) {
+ if (cmsswlay == 1 && isStereo == -1)
+ return 7 + lOffset;
+ else if (cmsswlay == 2 && isStereo == -1)
+ return 8 + lOffset;
+ else if (cmsswlay >= 3 && cmsswlay <= 6 && isStereo == 0)
+ return 6 + cmsswlay + lOffset;
+ }
+ return -1;
+ } else {
+ //TIB
+ if (cmsswdet == 3) {
+ if ((cmsswlay == 1 || cmsswlay == 2) && (isStereo == 0 || isStereo == 1)) {
+ return 1 + cmsswlay * 2 + isStereo + lOffset;
+ } else if (cmsswlay == 3 && isStereo == 0)
+ return 7 + lOffset;
+ else if (cmsswlay == 4 && isStereo == 0)
+ return 8 + lOffset;
+ }
+ //TOB
+ else if (cmsswdet == 5) {
+ if ((cmsswlay == 1 || cmsswlay == 2) && (isStereo == 0 || isStereo == 1)) {
+ return 7 + cmsswlay * 2 + isStereo + lOffset;
+ } else if (cmsswlay >= 3 && cmsswlay <= 6 && isStereo == 0)
+ return 10 + cmsswlay + lOffset;
+ }
+ return -1;
+ }
+ }
+ int convertDiskNumber(int cmsswdet, int cmsswdisk, bool useMatched, int isStereo) const {
+ if (cmsswdet == 1 || cmsswdet == 3 || cmsswdet == 5)
+ return -1; //BPIX, TIB, TOB
+ if (cmsswdet == 2)
+ return cmsswdisk - 1; //FPIX
+ int lOffset = 0;
+ if (lo_ == TkLayout::phase1)
+ lOffset = 1;
+ if (useMatched) {
+ return -1;
+ } else {
+ if ((isStereo != 0 && isStereo != 1) || cmsswdisk < 1)
+ return -1;
+ //TID
+ if (cmsswdet == 4 && cmsswdisk <= 3)
+ return cmsswdisk * 2 + isStereo + lOffset;
+ //TEC
+ else if (cmsswdet == 6 && cmsswdisk <= 9)
+ return 6 + cmsswdisk * 2 + isStereo + lOffset;
+ return -1;
+ }
+ }
+
+ private:
+ TkLayout lo_;
+ };
+
+} // end namespace mkfit
+
+#endif
diff --git a/RecoTracker/MkFitCMS/interface/MkStdSeqs.h b/RecoTracker/MkFitCMS/interface/MkStdSeqs.h
new file mode 100644
index 0000000000000..5b57e32ac17b3
--- /dev/null
+++ b/RecoTracker/MkFitCMS/interface/MkStdSeqs.h
@@ -0,0 +1,138 @@
+#ifndef RecoTracker_MkFitCMS_interface_MkStdSeqs_h
+#define RecoTracker_MkFitCMS_interface_MkStdSeqs_h
+
+#include "RecoTracker/MkFitCore/interface/Config.h"
+#include "RecoTracker/MkFitCore/interface/Hit.h"
+#include "RecoTracker/MkFitCore/interface/Track.h"
+#include "RecoTracker/MkFitCore/interface/TrackerInfo.h"
+
+namespace mkfit {
+
+ class EventOfHits;
+ class IterationConfig;
+ class TrackerInfo;
+
+ namespace StdSeq {
+
+ void loadDeads(EventOfHits &eoh, const std::vector &deadvectors);
+
+ void cmssw_LoadHits_Begin(EventOfHits &eoh, const std::vector &orig_hitvectors);
+ void cmssw_LoadHits_End(EventOfHits &eoh);
+
+ // Not used anymore. Left here if we want to experiment again with
+ // COPY_SORTED_HITS in class LayerOfHits.
+ void cmssw_Map_TrackHitIndices(const EventOfHits &eoh, TrackVec &seeds);
+ void cmssw_ReMap_TrackHitIndices(const EventOfHits &eoh, TrackVec &out_tracks);
+
+ int clean_cms_seedtracks_iter(TrackVec *seed_ptr, const IterationConfig &itrcfg, const BeamSpot &bspot);
+
+ void find_duplicates(TrackVec &tracks);
+ void remove_duplicates(TrackVec &tracks);
+
+ void find_duplicates_sharedhits(TrackVec &tracks, const float fraction);
+ void find_duplicates_sharedhits_pixelseed(TrackVec &tracks,
+ const float fraction,
+ const float drth_central,
+ const float drth_obarrel,
+ const float drth_forward);
+
+ // quality filter for n hits with seed hit "penalty" for strip-based seeds
+ // this implicitly separates triplets and doublet seeds with glued layers
+ template
+ bool qfilter_n_hits(const TRACK &t, int nMinHits) {
+ int seedHits = t.getNSeedHits();
+ int seedReduction = (seedHits <= 5) ? 2 : 3;
+ return t.nFoundHits() - seedReduction >= nMinHits;
+ }
+
+ // simple hit-count quality filter; used with pixel-based seeds
+ template
+ bool qfilter_n_hits_pixseed(const TRACK &t, int nMinHits) {
+ return t.nFoundHits() >= nMinHits;
+ }
+
+ // layer-dependent quality filter
+ template
+ bool qfilter_n_layers(const TRACK &t, const BeamSpot &bspot, const TrackerInfo &trk_inf) {
+ int enhits = t.nHitsByTypeEncoded(trk_inf);
+ int npixhits = t.nPixelDecoded(enhits);
+ int enlyrs = t.nLayersByTypeEncoded(trk_inf);
+ int npixlyrs = t.nPixelDecoded(enlyrs);
+ int nmatlyrs = t.nTotMatchDecoded(enlyrs);
+ int llyr = t.getLastFoundHitLyr();
+ int lplyr = t.getLastFoundPixelHitLyr();
+ float invpt = t.invpT();
+ float invptmin = 1.43; // min 1/pT (=1/0.7) for full filter on (npixhits<=3 .or. npixlyrs<=3)
+ float d0BS = t.d0BeamSpot(bspot.x, bspot.y);
+ float d0_max = 0.1; // 1 mm
+
+ bool endsInsidePix = (llyr == 2 || llyr == 18 || llyr == 45);
+ bool lastInsidePix = ((0 <= lplyr && lplyr < 3) || (18 <= lplyr && lplyr < 20) || (45 <= lplyr && lplyr < 47));
+ return !(((npixhits <= 3 || npixlyrs <= 3) && endsInsidePix &&
+ (invpt < invptmin || (invpt >= invptmin && std::abs(d0BS) > d0_max))) ||
+ ((npixlyrs <= 3 && nmatlyrs <= 6) && lastInsidePix && llyr != lplyr && std::abs(d0BS) > d0_max));
+ }
+
+ /// quality filter tuned for pixelLess iteration during forward search
+ template
+ bool qfilter_pixelLessFwd(const TRACK &t, const BeamSpot &bspot, const TrackerInfo &tk_info) {
+ float d0BS = t.d0BeamSpot(bspot.x, bspot.y);
+ float d0_max = 0.05; // 0.5 mm
+
+ int encoded;
+ encoded = t.nLayersByTypeEncoded(tk_info);
+ int nLyrs = t.nTotMatchDecoded(encoded);
+ encoded = t.nHitsByTypeEncoded(tk_info);
+ int nHits = t.nTotMatchDecoded(encoded);
+
+ int seedReduction = (t.getNSeedHits() <= 5) ? 2 : 3;
+
+ float invpt = t.invpT();
+ float invptmin = 1.11; // =1/0.9
+
+ float thetasym = std::abs(t.theta() - Const::PIOver2);
+ float thetasymmin = 1.11; // -> |eta|=1.45
+
+ return (((t.nFoundHits() - seedReduction >= 4 && invpt < invptmin) ||
+ (t.nFoundHits() - seedReduction >= 3 && invpt > invptmin && thetasym <= thetasymmin) ||
+ (t.nFoundHits() - seedReduction >= 4 && invpt > invptmin && thetasym > thetasymmin)) &&
+ !((nLyrs <= 4 || nHits <= 4) && std::abs(d0BS) > d0_max && invpt < invptmin));
+ }
+
+ /// quality filter tuned for pixelLess iteration during backward search
+ template
+ bool qfilter_pixelLessBkwd(const TRACK &t, const BeamSpot &bspot, const TrackerInfo &tk_info) {
+ float d0BS = t.d0BeamSpot(bspot.x, bspot.y);
+ float d0_max = 0.1; // 1 mm
+
+ int encoded;
+ encoded = t.nLayersByTypeEncoded(tk_info);
+ int nLyrs = t.nTotMatchDecoded(encoded);
+ encoded = t.nHitsByTypeEncoded(tk_info);
+ int nHits = t.nTotMatchDecoded(encoded);
+
+ float invpt = t.invpT();
+ float invptmin = 1.11; // =1/0.9
+
+ float thetasym = std::abs(t.theta() - Const::PIOver2);
+ float thetasymmin_l = 0.80; // -> |eta|=0.9
+ float thetasymmin_h = 1.11; // -> |eta|=1.45
+
+ return !(
+ ((nLyrs <= 3 || nHits <= 3)) ||
+ ((nLyrs <= 4 || nHits <= 4) && (invpt < invptmin || (thetasym > thetasymmin_l && std::abs(d0BS) > d0_max))) ||
+ ((nLyrs <= 6 || nHits <= 6) && (invpt > invptmin && thetasym > thetasymmin_h && std::abs(d0BS) > d0_max)));
+ }
+
+ template
+ bool qfilter_nan_n_silly(const TRACK &t) {
+ return !(t.hasNanNSillyValues());
+ }
+
+ void find_and_remove_duplicates(TrackVec &tracks, const IterationConfig &itconf);
+
+ } // namespace StdSeq
+
+} // namespace mkfit
+
+#endif
diff --git a/RecoTracker/MkFitCMS/interface/runFunctions.h b/RecoTracker/MkFitCMS/interface/runFunctions.h
new file mode 100644
index 0000000000000..e36d60be08c89
--- /dev/null
+++ b/RecoTracker/MkFitCMS/interface/runFunctions.h
@@ -0,0 +1,26 @@
+#ifndef RecoTracker_MkFitCMS_interface_runFunctions_h
+#define RecoTracker_MkFitCMS_interface_runFunctions_h
+
+#include "RecoTracker/MkFitCore/interface/Track.h"
+
+#include "RecoTracker/MkFitCore/interface/HitStructures.h"
+
+namespace mkfit {
+
+ class IterationConfig;
+ class MkBuilder;
+
+ // nullptr is a valid mask ... means no mask for these layers.
+ void run_OneIteration(const TrackerInfo &trackerInfo,
+ const IterationConfig &itconf,
+ const EventOfHits &eoh,
+ const std::vector *> &hit_masks,
+ MkBuilder &builder,
+ TrackVec &seeds,
+ TrackVec &out_tracks,
+ bool do_seed_clean,
+ bool do_backward_fit,
+ bool do_remove_duplicates);
+
+} // end namespace mkfit
+#endif
diff --git a/RecoTracker/MkFitCMS/src/MkStdSeqs.cc b/RecoTracker/MkFitCMS/src/MkStdSeqs.cc
new file mode 100644
index 0000000000000..3a6ad20c5dfdb
--- /dev/null
+++ b/RecoTracker/MkFitCMS/src/MkStdSeqs.cc
@@ -0,0 +1,579 @@
+#include "RecoTracker/MkFitCMS/interface/MkStdSeqs.h"
+
+#include "RecoTracker/MkFitCore/interface/HitStructures.h"
+#include "RecoTracker/MkFitCore/interface/IterationConfig.h"
+
+#include "RecoTracker/MkFitCore/interface/binnor.h"
+
+#include "oneapi/tbb/parallel_for.h"
+
+namespace mkfit {
+
+ namespace StdSeq {
+
+ //=========================================================================
+ // Hit processing
+ //=========================================================================
+
+ void loadDeads(EventOfHits &eoh, const std::vector &deadvectors) {
+ for (size_t il = 0; il < deadvectors.size(); il++) {
+ eoh.suckInDeads(int(il), deadvectors[il]);
+ }
+ }
+
+ // Loading hits in CMSSW from two "large multi-layer vectors".
+ // orig_hitvectors[0] - pixels,
+ // orig_hitvectors[1] - strips.
+
+ void cmssw_LoadHits_Begin(EventOfHits &eoh, const std::vector &orig_hitvectors) {
+ eoh.reset();
+ for (int i = 0; i < eoh.nLayers(); ++i) {
+ auto &&l = eoh[i];
+ l.beginRegistrationOfHits(*orig_hitvectors[l.is_pix_lyr() ? 0 : 1]);
+ }
+ }
+
+ // Loop with LayerOfHits::registerHit(int idx) - it takes Hit out of original HitVec to
+ // extract phi, r/z, and calculate qphifines
+ //
+ // Something like what is done in MkFitInputConverter::convertHits
+ //
+ // Problem is I don't know layers for each large-vector;
+ // Also, layer is calculated for each detset when looping over the HitCollection
+
+ void cmssw_LoadHits_End(EventOfHits &eoh) {
+ for (int i = 0; i < eoh.nLayers(); ++i) {
+ auto &&l = eoh[i];
+ l.endRegistrationOfHits(false);
+ }
+ }
+
+ //=========================================================================
+ // Hit-index mapping / remapping
+ //=========================================================================
+
+ void cmssw_Map_TrackHitIndices(const EventOfHits &eoh, TrackVec &seeds) {
+ for (auto &&track : seeds) {
+ for (int i = 0; i < track.nTotalHits(); ++i) {
+ const int hitidx = track.getHitIdx(i);
+ const int hitlyr = track.getHitLyr(i);
+ if (hitidx >= 0) {
+ const auto &loh = eoh[hitlyr];
+ track.setHitIdx(i, loh.getHitIndexFromOriginal(hitidx));
+ }
+ }
+ }
+ }
+
+ void cmssw_ReMap_TrackHitIndices(const EventOfHits &eoh, TrackVec &out_tracks) {
+ for (auto &&track : out_tracks) {
+ for (int i = 0; i < track.nTotalHits(); ++i) {
+ const int hitidx = track.getHitIdx(i);
+ const int hitlyr = track.getHitLyr(i);
+ if (hitidx >= 0) {
+ const auto &loh = eoh[hitlyr];
+ track.setHitIdx(i, loh.getOriginalHitIndex(hitidx));
+ }
+ }
+ }
+ }
+
+ //=========================================================================
+ // Seed cleaning (multi-iter)
+ //=========================================================================
+ int clean_cms_seedtracks_iter(TrackVec *seed_ptr, const IterationConfig &itrcfg, const BeamSpot &bspot) {
+ const float etamax_brl = Config::c_etamax_brl;
+ const float dpt_common = Config::c_dpt_common;
+
+ const float dzmax_bh = itrcfg.m_params.c_dzmax_bh;
+ const float drmax_bh = itrcfg.m_params.c_drmax_bh;
+ const float dzmax_eh = itrcfg.m_params.c_dzmax_eh;
+ const float drmax_eh = itrcfg.m_params.c_drmax_eh;
+ const float dzmax_bl = itrcfg.m_params.c_dzmax_bl;
+ const float drmax_bl = itrcfg.m_params.c_drmax_bl;
+ const float dzmax_el = itrcfg.m_params.c_dzmax_el;
+ const float drmax_el = itrcfg.m_params.c_drmax_el;
+
+ const float ptmin_hpt = itrcfg.m_params.c_ptthr_hpt;
+
+ const float dzmax2_inv_bh = 1.f / (dzmax_bh * dzmax_bh);
+ const float drmax2_inv_bh = 1.f / (drmax_bh * drmax_bh);
+ const float dzmax2_inv_eh = 1.f / (dzmax_eh * dzmax_eh);
+ const float drmax2_inv_eh = 1.f / (drmax_eh * drmax_eh);
+ const float dzmax2_inv_bl = 1.f / (dzmax_bl * dzmax_bl);
+ const float drmax2_inv_bl = 1.f / (drmax_bl * drmax_bl);
+ const float dzmax2_inv_el = 1.f / (dzmax_el * dzmax_el);
+ const float drmax2_inv_el = 1.f / (drmax_el * drmax_el);
+
+ // Merge hits from overlapping seeds?
+ // For now always true, we require extra hits after seed.
+ const bool merge_hits = true; // itrcfg.merge_seed_hits_during_cleaning();
+
+ if (seed_ptr == nullptr)
+ return 0;
+ TrackVec &seeds = *seed_ptr;
+
+ const int ns = seeds.size();
+#ifdef DEBUG
+ std::cout << "before seed cleaning " << seeds.size() << std::endl;
+#endif
+ TrackVec cleanSeedTracks;
+ cleanSeedTracks.reserve(ns);
+ std::vector writetrack(ns, true);
+
+ const float invR1GeV = 1.f / Config::track1GeVradius;
+
+ std::vector nHits(ns);
+ std::vector charge(ns);
+ std::vector oldPhi(ns);
+ std::vector pos2(ns);
+ std::vector eta(ns);
+ std::vector ctheta(ns);
+ std::vector invptq(ns);
+ std::vector pt(ns);
+ std::vector x(ns);
+ std::vector y(ns);
+ std::vector z(ns);
+ std::vector d0(ns);
+ int i1, i2; //for the sorting
+
+ for (int ts = 0; ts < ns; ts++) {
+ const Track &tk = seeds[ts];
+ nHits[ts] = tk.nFoundHits();
+ charge[ts] = tk.charge();
+ oldPhi[ts] = tk.momPhi();
+ pos2[ts] = std::pow(tk.x(), 2) + std::pow(tk.y(), 2);
+ eta[ts] = tk.momEta();
+ ctheta[ts] = 1.f / std::tan(tk.theta());
+ invptq[ts] = tk.charge() * tk.invpT();
+ pt[ts] = tk.pT();
+ x[ts] = tk.x();
+ y[ts] = tk.y();
+ z[ts] = tk.z();
+ d0[ts] = tk.d0BeamSpot(bspot.x, bspot.y);
+ }
+
+ for (int ts = 0; ts < ns; ts++) {
+ if (not writetrack[ts])
+ continue; // Note: this speed up prevents transitive masking (possibly marginal gain).
+
+ const float oldPhi1 = oldPhi[ts];
+ const float pos2_first = pos2[ts];
+ const float eta1 = eta[ts];
+ const float pt1 = pt[ts];
+ const float invptq_first = invptq[ts];
+
+ // To study some more details -- need EventOfHits for this
+ int n_ovlp_hits_added = 0;
+
+ for (int tss = ts + 1; tss < ns; tss++) {
+ const float pt2 = pt[tss];
+
+ ////// Always require charge consistency. If different charge is assigned, do not remove seed-track
+ if (charge[tss] != charge[ts])
+ continue;
+
+ const float thisDPt = std::abs(pt2 - pt1);
+ ////// Require pT consistency between seeds. If dpT is large, do not remove seed-track.
+ if (thisDPt > dpt_common * (pt1))
+ continue;
+
+ const float eta2 = eta[tss];
+ const float deta2 = std::pow(eta1 - eta2, 2);
+
+ const float oldPhi2 = oldPhi[tss];
+
+ const float pos2_second = pos2[tss];
+ const float thisDXYSign05 = pos2_second > pos2_first ? -0.5f : 0.5f;
+
+ const float thisDXY = thisDXYSign05 * sqrt(std::pow(x[ts] - x[tss], 2) + std::pow(y[ts] - y[tss], 2));
+
+ const float invptq_second = invptq[tss];
+
+ const float newPhi1 = oldPhi1 - thisDXY * invR1GeV * invptq_first;
+ const float newPhi2 = oldPhi2 + thisDXY * invR1GeV * invptq_second;
+
+ const float dphi = cdist(std::abs(newPhi1 - newPhi2));
+
+ const float dr2 = deta2 + dphi * dphi;
+
+ const float thisDZ = z[ts] - z[tss] - thisDXY * (ctheta[ts] + ctheta[tss]);
+ const float dz2 = thisDZ * thisDZ;
+
+ ////// Reject tracks within dR-dz elliptical window.
+ ////// Adaptive thresholds, based on observation that duplicates are more abundant at large pseudo-rapidity and low track pT
+ bool overlapping = false;
+ if (std::abs(eta1) < etamax_brl) {
+ if (pt1 > ptmin_hpt) {
+ if (dz2 * dzmax2_inv_bh + dr2 * drmax2_inv_bh < 1.0f)
+ overlapping = true;
+ } else {
+ if (dz2 * dzmax2_inv_bl + dr2 * drmax2_inv_bl < 1.0f)
+ overlapping = true;
+ }
+ } else {
+ if (pt1 > ptmin_hpt) {
+ if (dz2 * dzmax2_inv_eh + dr2 * drmax2_inv_eh < 1.0f)
+ overlapping = true;
+ } else {
+ if (dz2 * dzmax2_inv_el + dr2 * drmax2_inv_el < 1.0f)
+ overlapping = true;
+ }
+ }
+
+ if (overlapping) {
+ //Mark tss as a duplicate
+ i1 = ts;
+ i2 = tss;
+ if (d0[tss] > d0[ts])
+ writetrack[tss] = false;
+ else {
+ writetrack[ts] = false;
+ i2 = ts;
+ i1 = tss;
+ }
+ // Add hits from tk2 to the seed we are keeping.
+ // NOTE: We have a limit in Track::Status for the number of seed hits.
+ // There is a check at entry and after adding of a new hit.
+ Track &tk = seeds[i1];
+ if (merge_hits && tk.nTotalHits() < Track::Status::kMaxSeedHits) {
+ const Track &tk2 = seeds[i2];
+ //We are not actually fitting to the extra hits; use chi2 of 0
+ float fakeChi2 = 0.0;
+
+ for (int j = 0; j < tk2.nTotalHits(); ++j) {
+ int hitidx = tk2.getHitIdx(j);
+ int hitlyr = tk2.getHitLyr(j);
+ if (hitidx >= 0) {
+ bool unique = true;
+ for (int i = 0; i < tk.nTotalHits(); ++i) {
+ if ((hitidx == tk.getHitIdx(i)) && (hitlyr == tk.getHitLyr(i))) {
+ unique = false;
+ break;
+ }
+ }
+ if (unique) {
+ tk.addHitIdx(tk2.getHitIdx(j), tk2.getHitLyr(j), fakeChi2);
+ ++n_ovlp_hits_added;
+ if (tk.nTotalHits() >= Track::Status::kMaxSeedHits)
+ break;
+ }
+ }
+ }
+ }
+ if (n_ovlp_hits_added > 0)
+ tk.sortHitsByLayer();
+ }
+ } //end of inner loop over tss
+
+ if (writetrack[ts]) {
+ cleanSeedTracks.emplace_back(seeds[ts]);
+ }
+ }
+
+ seeds.swap(cleanSeedTracks);
+
+#ifdef DEBUG
+ {
+ const int ns2 = seeds.size();
+ printf("Number of CMS seeds before %d --> after %d cleaning\n", ns, ns2);
+
+ for (int it = 0; it < ns2; it++) {
+ const Track &ss = seeds[it];
+ printf(" %3i q=%+i pT=%7.3f eta=% 7.3f nHits=%i label=% i\n",
+ it,
+ ss.charge(),
+ ss.pT(),
+ ss.momEta(),
+ ss.nFoundHits(),
+ ss.label());
+ }
+ }
+#endif
+
+#ifdef DEBUG
+ std::cout << "AFTER seed cleaning " << seeds.size() << std::endl;
+#endif
+
+ return seeds.size();
+ }
+
+ //=========================================================================
+ // Duplicate cleaning
+ //=========================================================================
+
+ void find_duplicates(TrackVec &tracks) {
+ const auto ntracks = tracks.size();
+ float eta1, phi1, pt1, deta, dphi, dr2;
+
+ if (ntracks == 0) {
+ return;
+ }
+ for (auto itrack = 0U; itrack < ntracks - 1; itrack++) {
+ auto &track = tracks[itrack];
+ using Algo = TrackBase::TrackAlgorithm;
+ auto const algo = track.algorithm();
+ if (algo == Algo::pixelLessStep || algo == Algo::tobTecStep)
+ continue;
+ eta1 = track.momEta();
+ phi1 = track.momPhi();
+ pt1 = track.pT();
+ for (auto jtrack = itrack + 1; jtrack < ntracks; jtrack++) {
+ auto &track2 = tracks[jtrack];
+ if (track.label() == track2.label())
+ continue;
+ if (track.algoint() != track2.algoint())
+ continue;
+
+ deta = std::abs(track2.momEta() - eta1);
+ if (deta > Config::maxdEta)
+ continue;
+
+ dphi = std::abs(squashPhiMinimal(phi1 - track2.momPhi()));
+ if (dphi > Config::maxdPhi)
+ continue;
+
+ float maxdR = Config::maxdR;
+ float maxdRSquared = maxdR * maxdR;
+ if (std::abs(eta1) > 2.5f)
+ maxdRSquared *= 16.0f;
+ else if (std::abs(eta1) > 1.44f)
+ maxdRSquared *= 9.0f;
+ dr2 = dphi * dphi + deta * deta;
+ if (dr2 < maxdRSquared) {
+ //Keep track with best score
+ if (track.score() > track2.score())
+ track2.setDuplicateValue(true);
+ else
+ track.setDuplicateValue(true);
+ continue;
+ } else {
+ if (pt1 == 0)
+ continue;
+ if (track2.pT() == 0)
+ continue;
+
+ if (std::abs((1 / track2.pT()) - (1 / pt1)) < Config::maxdPt) {
+ if (Config::useHitsForDuplicates) {
+ float numHitsShared = 0;
+ for (int ihit2 = 0; ihit2 < track2.nTotalHits(); ihit2++) {
+ const int hitidx2 = track2.getHitIdx(ihit2);
+ const int hitlyr2 = track2.getHitLyr(ihit2);
+ if (hitidx2 >= 0) {
+ auto const it = std::find_if(track.beginHitsOnTrack(),
+ track.endHitsOnTrack(),
+ [&hitidx2, &hitlyr2](const HitOnTrack &element) {
+ return (element.index == hitidx2 && element.layer == hitlyr2);
+ });
+ if (it != track.endHitsOnTrack())
+ numHitsShared++;
+ }
+ }
+
+ float fracHitsShared = numHitsShared / std::min(track.nFoundHits(), track2.nFoundHits());
+ //Only remove one of the tracks if they share at least X% of the hits (denominator is the shorter track)
+ if (fracHitsShared < Config::minFracHitsShared)
+ continue;
+ }
+ //Keep track with best score
+ if (track.score() > track2.score())
+ track2.setDuplicateValue(true);
+ else
+ track.setDuplicateValue(true);
+ } //end of if dPt
+ } //end of else
+ } //end of loop over track2
+ } //end of loop over track1
+ }
+
+ void remove_duplicates(TrackVec &tracks) {
+ tracks.erase(std::remove_if(tracks.begin(), tracks.end(), [](auto track) { return track.getDuplicateValue(); }),
+ tracks.end());
+ }
+
+ //=========================================================================
+ // SHARED HITS DUPLICATE CLEANING
+ //=========================================================================
+
+ void find_duplicates_sharedhits(TrackVec &tracks, const float fraction) {
+ const auto ntracks = tracks.size();
+
+ std::vector ctheta(ntracks);
+ for (auto itrack = 0U; itrack < ntracks; itrack++) {
+ auto &trk = tracks[itrack];
+ ctheta[itrack] = 1.f / std::tan(trk.theta());
+ }
+
+ for (auto itrack = 0U; itrack < ntracks; itrack++) {
+ auto &trk = tracks[itrack];
+ auto phi1 = trk.momPhi();
+ auto ctheta1 = ctheta[itrack];
+
+ for (auto jtrack = itrack + 1; jtrack < ntracks; jtrack++) {
+ auto &track2 = tracks[jtrack];
+ auto sharedCount = 0;
+ auto sharedFirst = 0;
+
+ auto dctheta = std::abs(ctheta[jtrack] - ctheta1);
+ if (dctheta > 1.)
+ continue;
+
+ auto dphi = std::abs(squashPhiMinimal(phi1 - track2.momPhi()));
+ if (dphi > 1.)
+ continue;
+
+ for (int i = 0; i < trk.nTotalHits(); ++i) {
+ if (trk.getHitIdx(i) < 0)
+ continue;
+ const int a = trk.getHitLyr(i);
+ const int b = trk.getHitIdx(i);
+ for (int j = 0; j < track2.nTotalHits(); ++j) {
+ if (track2.getHitIdx(j) < 0)
+ continue;
+ const int c = track2.getHitLyr(j);
+ const int d = track2.getHitIdx(j);
+ if (a == c && b == d)
+ sharedCount += 1;
+ if (a == c && b == d && j == 0 && i == 0)
+ sharedFirst += 1;
+ }
+ }
+ if ((sharedCount - sharedFirst) >=
+ ((std::min(trk.nFoundHits(), track2.nFoundHits()) - sharedFirst) * (fraction))) {
+ if (trk.score() > track2.score())
+ track2.setDuplicateValue(true);
+ else
+ trk.setDuplicateValue(true);
+ }
+ }
+ }
+ tracks.erase(std::remove_if(tracks.begin(), tracks.end(), [](auto track) { return track.getDuplicateValue(); }),
+ tracks.end());
+ }
+
+ void find_duplicates_sharedhits_pixelseed(TrackVec &tracks,
+ const float fraction,
+ const float drth_central,
+ const float drth_obarrel,
+ const float drth_forward) {
+ const auto ntracks = tracks.size();
+
+ std::vector ctheta(ntracks);
+ for (auto itrack = 0U; itrack < ntracks; itrack++) {
+ auto &trk = tracks[itrack];
+ ctheta[itrack] = 1.f / std::tan(trk.theta());
+ }
+
+ float phi1, invpt1, dctheta, ctheta1, dphi, dr2;
+ for (auto itrack = 0U; itrack < ntracks; itrack++) {
+ auto &trk = tracks[itrack];
+ phi1 = trk.momPhi();
+ invpt1 = trk.invpT();
+ ctheta1 = ctheta[itrack];
+ for (auto jtrack = itrack + 1; jtrack < ntracks; jtrack++) {
+ auto &track2 = tracks[jtrack];
+ if (trk.label() == track2.label())
+ continue;
+
+ dctheta = std::abs(ctheta[jtrack] - ctheta1);
+
+ if (dctheta > Config::maxdcth)
+ continue;
+
+ dphi = std::abs(squashPhiMinimal(phi1 - track2.momPhi()));
+
+ if (dphi > Config::maxdphi)
+ continue;
+
+ float maxdRSquared = drth_central * drth_central;
+ if (std::abs(ctheta1) > Config::maxcth_fw)
+ maxdRSquared = drth_forward * drth_forward;
+ else if (std::abs(ctheta1) > Config::maxcth_ob)
+ maxdRSquared = drth_obarrel * drth_obarrel;
+ dr2 = dphi * dphi + dctheta * dctheta;
+ if (dr2 < maxdRSquared) {
+ //Keep track with best score
+ if (trk.score() > track2.score())
+ track2.setDuplicateValue(true);
+ else
+ trk.setDuplicateValue(true);
+ continue;
+ }
+
+ if (std::abs(track2.invpT() - invpt1) > Config::maxd1pt)
+ continue;
+
+ auto sharedCount = 0;
+ auto sharedFirst = 0;
+ const auto minFoundHits = std::min(trk.nFoundHits(), track2.nFoundHits());
+
+ for (int i = 0; i < trk.nTotalHits(); ++i) {
+ if (trk.getHitIdx(i) < 0)
+ continue;
+ const int a = trk.getHitLyr(i);
+ const int b = trk.getHitIdx(i);
+ for (int j = 0; j < track2.nTotalHits(); ++j) {
+ if (track2.getHitIdx(j) < 0)
+ continue;
+ const int c = track2.getHitLyr(j);
+ const int d = track2.getHitIdx(j);
+
+ //this is to count once shared matched hits (may be done more properly...)
+ if (a == c && b == d)
+ sharedCount += 1;
+ if (j == 0 && i == 0 && a == c && b == d)
+ sharedFirst += 1;
+
+ if ((sharedCount - sharedFirst) >= ((minFoundHits - sharedFirst) * fraction))
+ continue;
+ }
+ if ((sharedCount - sharedFirst) >= ((minFoundHits - sharedFirst) * fraction))
+ continue;
+ }
+
+ //selection here - 11percent fraction of shared hits to label a duplicate
+ if ((sharedCount - sharedFirst) >= ((minFoundHits - sharedFirst) * fraction)) {
+ if (trk.score() > track2.score())
+ track2.setDuplicateValue(true);
+ else
+ trk.setDuplicateValue(true);
+ }
+ }
+ } //end loop one over tracks
+
+ //removal here
+ tracks.erase(std::remove_if(tracks.begin(), tracks.end(), [](auto track) { return track.getDuplicateValue(); }),
+ tracks.end());
+ }
+
+ //=========================================================================
+ //
+ //=========================================================================
+
+ void find_and_remove_duplicates(TrackVec &tracks, const IterationConfig &itconf) {
+#ifdef DEBUG
+ std::cout << " find_and_remove_duplicates: input track size " << tracks.size() << std::endl;
+#endif
+ if (itconf.m_requires_quality_filter && !(itconf.m_requires_dupclean_tight)) {
+ find_duplicates_sharedhits(tracks, itconf.m_params.fracSharedHits);
+ } else if (itconf.m_requires_dupclean_tight) {
+ find_duplicates_sharedhits_pixelseed(tracks,
+ itconf.m_params.fracSharedHits,
+ itconf.m_params.drth_central,
+ itconf.m_params.drth_obarrel,
+ itconf.m_params.drth_forward);
+ } else {
+ find_duplicates(tracks);
+ remove_duplicates(tracks);
+ }
+
+#ifdef DEBUG
+ std::cout << " find_and_remove_duplicates: output track size " << tracks.size() << std::endl;
+ for (auto const &tk : tracks) {
+ std::cout << tk.parameters() << std::endl;
+ }
+#endif
+ }
+
+ } // namespace StdSeq
+} // namespace mkfit
diff --git a/RecoTracker/MkFitCMS/src/runFunctions.cc b/RecoTracker/MkFitCMS/src/runFunctions.cc
new file mode 100644
index 0000000000000..c9dede55ac499
--- /dev/null
+++ b/RecoTracker/MkFitCMS/src/runFunctions.cc
@@ -0,0 +1,114 @@
+#include "RecoTracker/MkFitCMS/interface/runFunctions.h"
+#include "RecoTracker/MkFitCore/interface/MkBuilder.h"
+#include "RecoTracker/MkFitCMS/interface/MkStdSeqs.h"
+
+#include "oneapi/tbb/parallel_for.h"
+
+#include
+
+namespace mkfit {
+
+ //==============================================================================
+ // run_OneIteration
+ //
+ // One-stop function for running track building from CMSSW.
+ //==============================================================================
+
+ struct IterationMaskIfcCmssw : public IterationMaskIfcBase {
+ const TrackerInfo &m_trk_info;
+ const std::vector *> &m_mask_vector;
+
+ IterationMaskIfcCmssw(const TrackerInfo &ti, const std::vector *> &maskvec)
+ : m_trk_info(ti), m_mask_vector(maskvec) {}
+
+ const std::vector *get_mask_for_layer(int layer) const override {
+ return m_trk_info.layer(layer).is_pix_lyr() ? m_mask_vector[0] : m_mask_vector[1];
+ }
+ };
+
+ void run_OneIteration(const TrackerInfo &trackerInfo,
+ const IterationConfig &itconf,
+ const EventOfHits &eoh,
+ const std::vector *> &hit_masks,
+ MkBuilder &builder,
+ TrackVec &seeds,
+ TrackVec &out_tracks,
+ bool do_seed_clean,
+ bool do_backward_fit,
+ bool do_remove_duplicates) {
+ IterationMaskIfcCmssw it_mask_ifc(trackerInfo, hit_masks);
+
+ MkJob job({trackerInfo, itconf, eoh, &it_mask_ifc});
+
+ builder.begin_event(&job, nullptr, __func__);
+
+ if (do_seed_clean) {
+ // Seed cleaning not done on pixelLess / tobTec iters
+ if (itconf.m_requires_dupclean_tight)
+ StdSeq::clean_cms_seedtracks_iter(&seeds, itconf, eoh.refBeamSpot());
+ }
+
+ // Check nans in seeds -- this should not be needed when Slava fixes
+ // the track parameter coordinate transformation.
+ builder.seed_post_cleaning(seeds);
+
+ if (itconf.m_requires_seed_hit_sorting) {
+ for (auto &s : seeds)
+ s.sortHitsByLayer(); // sort seed hits for the matched hits (I hope it works here)
+ }
+
+ builder.find_tracks_load_seeds(seeds);
+
+ builder.findTracksCloneEngine();
+
+ using Algo = TrackBase::TrackAlgorithm;
+ if (itconf.m_requires_quality_filter && Algo(itconf.m_track_algorithm) != Algo::detachedTripletStep) {
+ if (Algo(itconf.m_track_algorithm) == Algo::pixelPairStep) {
+ builder.filter_comb_cands([&](const TrackCand &t) { return StdSeq::qfilter_n_hits_pixseed(t, 3); });
+ } else if (Algo(itconf.m_track_algorithm) == Algo::pixelLessStep) {
+ builder.filter_comb_cands(
+ [&](const TrackCand &t) { return StdSeq::qfilter_pixelLessFwd(t, eoh.refBeamSpot(), trackerInfo); });
+ } else {
+ builder.filter_comb_cands(
+ [&](const TrackCand &t) { return StdSeq::qfilter_n_hits(t, itconf.m_params.minHitsQF); });
+ }
+ }
+
+ if (do_backward_fit) {
+ if (itconf.m_backward_search) {
+ builder.compactifyHitStorageForBestCand(itconf.m_backward_drop_seed_hits, itconf.m_backward_fit_min_hits);
+ }
+
+ builder.backwardFit();
+
+ if (itconf.m_backward_search) {
+ builder.beginBkwSearch();
+ builder.findTracksCloneEngine(SteeringParams::IT_BkwSearch);
+ builder.endBkwSearch();
+ }
+
+ if (itconf.m_requires_quality_filter && (Algo(itconf.m_track_algorithm) == Algo::detachedTripletStep ||
+ Algo(itconf.m_track_algorithm) == Algo::pixelLessStep)) {
+ if (Algo(itconf.m_track_algorithm) == Algo::detachedTripletStep) {
+ builder.filter_comb_cands(
+ [&](const TrackCand &t) { return StdSeq::qfilter_n_layers(t, eoh.refBeamSpot(), trackerInfo); });
+ } else if (Algo(itconf.m_track_algorithm) == Algo::pixelLessStep) {
+ builder.filter_comb_cands(
+ [&](const TrackCand &t) { return StdSeq::qfilter_pixelLessBkwd(t, eoh.refBeamSpot(), trackerInfo); });
+ }
+ }
+ }
+
+ builder.filter_comb_cands([&](const TrackCand &t) { return StdSeq::qfilter_nan_n_silly(t); });
+
+ builder.export_best_comb_cands(out_tracks, true);
+
+ if (do_remove_duplicates) {
+ StdSeq::find_and_remove_duplicates(out_tracks, itconf);
+ }
+
+ builder.end_event();
+ builder.release_memory();
+ }
+
+} // end namespace mkfit
diff --git a/RecoTracker/MkFitCMS/standalone/Geoms/CMS-2017.cc b/RecoTracker/MkFitCMS/standalone/Geoms/CMS-2017.cc
new file mode 100644
index 0000000000000..4dc7529961699
--- /dev/null
+++ b/RecoTracker/MkFitCMS/standalone/Geoms/CMS-2017.cc
@@ -0,0 +1,7 @@
+//-------------------
+// CMS 2017 geometry
+//-------------------
+
+// Redirect to external geometry creator function.
+
+#include "mkfit-geom-cms-2017/CMS-2017.cc"
diff --git a/RecoTracker/MkFitCMS/standalone/Geoms/Makefile b/RecoTracker/MkFitCMS/standalone/Geoms/Makefile
new file mode 100644
index 0000000000000..b4897929bea6c
--- /dev/null
+++ b/RecoTracker/MkFitCMS/standalone/Geoms/Makefile
@@ -0,0 +1,48 @@
+include ${SADIR}/Makefile.config
+
+CPPEXTRA := ${USER_CPPFLAGS} ${DEFS} -I${SRCDIR} -I../mkFit-external
+LDEXTRA := ${USER_LDFLAGS}
+
+CPPFLAGS := ${CPPEXTRA} ${CPPFLAGS}
+CXXFLAGS += -fPIC ${USER_CXXFLAGS}
+LDFLAGS += ${LDEXTRA}
+
+CPPFLAGS_NO_ROOT := ${CPPEXTRA} ${CPPFLAGS_NO_ROOT}
+
+.PHONY: all clean distclean echo
+
+SRCS := ${SACMS}/Geoms/CMS-2017.cc
+SRCB := $(notdir ${SRCS})
+DEPS := $(SRCB:.cc=.d)
+OBJS := $(SRCB:.cc=.o)
+
+TGTS := $(basename ${OBJS})
+TGTS := $(addprefix ../, $(addsuffix .so, ${TGTS}))
+
+vpath %.cc ${SACMS}/Geoms
+
+all: ${TGTS}
+
+%.o: %.cc %.d
+ ${CXX} ${CPPFLAGS} ${CXXFLAGS} ${VEC_HOST} -c -o $@ $<
+
+%.d: %.cc
+ ${MAKEDEPEND} -o $@ $<
+
+../%.so: %.o
+ ${CXX} -shared -L.. -lMicCore -o $@ $<
+
+ifeq ($(filter clean distclean, ${MAKECMDGOALS}),)
+include ${DEPS}
+endif
+
+clean:
+ -rm -f *.so *.o *.om *.d *.optrpt
+
+distclean: clean
+ -rm -f ${TGTS}
+
+echo:
+ @echo SRCS = ${SRCS}
+ @echo DEPS = ${DEPS}
+ @echo OBJS = ${OBJS}
diff --git a/RecoTracker/MkFitCMS/standalone/Makefile b/RecoTracker/MkFitCMS/standalone/Makefile
new file mode 100644
index 0000000000000..af7eacfca8507
--- /dev/null
+++ b/RecoTracker/MkFitCMS/standalone/Makefile
@@ -0,0 +1,73 @@
+include ${SADIR}/Makefile.config
+
+CPPFLAGS := -I. -I${SRCDIR} -I../mkFit-external ${CPPFLAGS}
+
+CMS_DIR := ${SRCDIR}/RecoTracker/MkFitCMS
+
+LIB_CMS := ../libMicCMS.so
+MAIN := ../mkFit
+WRMEMF := ../writeMemoryFile
+
+TGTS := ${LIB_CMS} ${MAIN} ${WRMEMF}
+
+.PHONY: all clean distclean
+
+all: ${TGTS}
+
+SRCS := $(wildcard ${CMS_DIR}/src/*.cc) $(wildcard ${SACMS}/*.cc) ${SACMS}/tkNtuple/WriteMemoryFile.cc
+SRCB := $(notdir ${SRCS})
+DEPS := $(SRCB:.cc=.d)
+OBJS := $(SRCB:.cc=.o)
+
+CMS_OBJS := $(filter-out mkFit.o WriteMemoryFile.o, ${OBJS})
+
+vpath %.cc ${CMS_DIR}/src ${SACMS} ${SACMS}/tkNtuple
+
+ifeq ($(filter clean-local clean distclean, ${MAKECMDGOALS}),)
+include ${DEPS}
+endif
+
+clean-local:
+ -rm -f ${TGTS} *.d *.o *.om *.so
+ -rm -rf main.dSYM
+ -rm -rf plotting/*.so plotting/*.d plotting/*.pcm
+
+clean: clean-local
+
+distclean: clean-local
+ -rm -f *.optrpt
+ -rm -f ${TGTS}
+
+${LIB_CMS}: ${CMS_OBJS}
+ @mkdir -p $(@D)
+ ${CXX} ${CXXFLAGS} ${VEC_HOST} ${CMS_OBJS} -shared -o $@ ${LDFLAGS_HOST} ${LDFLAGS}
+
+${MAIN}: ${LIB_CMS} mkFit.o
+ ${CXX} ${CXXFLAGS} ${VEC_HOST} ${LDFLAGS} mkFit.o -o $@ ${LDFLAGS_HOST} -ltbb -L.. -lMicCore -lMicCMS -Wl,-rpath=.
+
+${WRMEMF}: WriteMemoryFile.o
+ ${CXX} ${CXXFLAGS} ${LDFLAGS} $^ -o $@ ${LDFLAGS_HOST} -ltbb -L.. -lMicCore -Wl,-rpath=.
+
+${OBJS}: %.o: %.cc %.d
+ ${CXX} ${CPPFLAGS} ${CXXFLAGS} ${VEC_HOST} -c -o $@ $<
+
+%.d: %.cc
+ ${MAKEDEPEND} -o $@ $<
+
+echo:
+ @echo "CXX=${CXX}"
+ @echo SRCS = ${SRCS}
+ @echo DEPS = ${DEPS}
+ @echo OBJS = ${OBJS}
+
+echo_cc_defs:
+ ${CXX} -dM -E -mavx2 - < /dev/null
+
+echo-srcs:
+ @echo ${SRCS}
+
+echo-flags:
+ @echo "CPPFLAGS=${CPPFLAGS}"
+
+echo-tbb:
+ @echo "TBB_GCC=${TBB_GCC}, TBB_PREFIX=${TBB_PREFIX}, TBB_ROOT=${TBB_ROOT}"
diff --git a/RecoTracker/MkFitCMS/standalone/MkStandaloneSeqs.cc b/RecoTracker/MkFitCMS/standalone/MkStandaloneSeqs.cc
new file mode 100644
index 0000000000000..cee972d963b9b
--- /dev/null
+++ b/RecoTracker/MkFitCMS/standalone/MkStandaloneSeqs.cc
@@ -0,0 +1,404 @@
+#include "RecoTracker/MkFitCMS/standalone/MkStandaloneSeqs.h"
+#include "RecoTracker/MkFitCMS/interface/MkStdSeqs.h"
+
+#include "RecoTracker/MkFitCore/interface/HitStructures.h"
+#include "RecoTracker/MkFitCore/standalone/Event.h"
+
+#include "RecoTracker/MkFitCore/src/Debug.h"
+
+#include "oneapi/tbb/parallel_for.h"
+
+namespace mkfit {
+
+ namespace StdSeq {
+
+ //=========================================================================
+ // Hit processing
+ //=========================================================================
+
+ void loadHitsAndBeamSpot(Event &ev, EventOfHits &eoh) {
+ eoh.reset();
+
+ // fill vector of hits in each layer
+ // XXXXMT: Does it really makes sense to multi-thread this?
+ tbb::parallel_for(tbb::blocked_range(0, ev.layerHits_.size()), [&](const tbb::blocked_range &layers) {
+ for (int ilay = layers.begin(); ilay < layers.end(); ++ilay) {
+ eoh.suckInHits(ilay, ev.layerHits_[ilay]);
+ }
+ });
+ eoh.setBeamSpot(ev.beamSpot_);
+ }
+
+ void handle_duplicates(Event *event) {
+ // Mark tracks as duplicates; if within CMSSW, remove duplicate tracks from fit or candidate track collection
+ if (Config::removeDuplicates) {
+ if (Config::quality_val || Config::sim_val || Config::cmssw_val) {
+ find_duplicates(event->candidateTracks_);
+ if (Config::backwardFit)
+ find_duplicates(event->fitTracks_);
+ }
+ // For the MEIF benchmarks and the stress tests, no validation flags are set so we will enter this block
+ else {
+ // Only care about the candidate tracks here; no need to run the duplicate removal on both candidate and fit tracks
+ find_duplicates(event->candidateTracks_);
+ }
+ }
+ }
+
+ //=========================================================================
+ // Random stuff
+ //=========================================================================
+
+ void dump_simtracks(Event *event) {
+ // Ripped out of MkBuilder::begin_event, ifdefed under DEBUG
+
+ std::vector