Skip to content

Commit

Permalink
Minor, technical fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
osschar authored and mmasciov committed Oct 15, 2024
1 parent 6e8ce43 commit 62bccea
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 74 deletions.
6 changes: 6 additions & 0 deletions RecoTracker/MkFit/test/dumpMkFitGeometryPhase2.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import Configuration.Geometry.defaultPhase2ConditionsEra_cff as _settings
_PH2_GLOBAL_TAG, _PH2_ERA = _settings.get_era_and_conditions(_settings.DEFAULT_VERSION)

# No era in Fireworks/Geom reco dumper
process = cms.Process('DUMP', _PH2_ERA, trackingMkFit)

# import of standard configurations
Expand All @@ -19,9 +20,14 @@
process.load('Configuration.StandardSequences.MagneticField_cff')
process.load('Configuration.StandardSequences.Reconstruction_cff')
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')

from Configuration.AlCa.GlobalTag import GlobalTag
process.GlobalTag = GlobalTag(process.GlobalTag, _PH2_GLOBAL_TAG, '')

# In Fireworks/Geom reco dumper:
# from Configuration.AlCa.autoCond import autoCond
# process.GlobalTag.globaltag = autoCond['phase2_realistic']

process.MessageLogger.cerr.threshold = "INFO"
process.MessageLogger.cerr.MkFitGeometryESProducer = dict(limit=-1)

Expand Down
63 changes: 4 additions & 59 deletions RecoTracker/MkFitCore/src/KalmanUtilsMPlex.cc
Original file line number Diff line number Diff line change
Expand Up @@ -403,66 +403,11 @@ namespace {
}
}

/*
inline void RotateResidualsOnPlane(const MPlex2H& R, //prj
const MPlexHV& A, //res_glo
MPlex2V& B) //res_loc
{
// typedef float T;
// const idx_t N = NN;
// const T* a = A.fArray;
// ASSUME_ALIGNED(a, 64);
// T* b = B.fArray;
// ASSUME_ALIGNED(b, 64);
// const T* r = R.fArray;
// ASSUME_ALIGNED(r, 64);
#pragma omp simd
for (int n = 0; n < NN; ++n) {
B(n, 0, 0) = R(n, 0, 0) * A(n, 0, 0) + R(n, 0, 1) * A(n, 1, 0) + R(n, 0, 2) * A(n, 2, 0);
B(n, 1, 0) = R(n, 1, 0) * A(n, 0, 0) + R(n, 1, 1) * A(n, 1, 0) + R(n, 1, 2) * A(n, 2, 0);
}
}
inline void RotateResidualsOnPlane(const MPlex2H& R, //prj
const MPlexLV& A, //res_glo
MPlex2V& B) //res_loc
{
// typedef float T;
// const idx_t N = NN;
// const T* a = A.fArray;
// ASSUME_ALIGNED(a, 64);
// T* b = B.fArray;
// ASSUME_ALIGNED(b, 64);
// const T* r = R.fArray;
// ASSUME_ALIGNED(r, 64);
#pragma omp simd
for (int n = 0; n < NN; ++n) {
B(n, 0, 0) = R(n, 0, 0) * A(n, 0, 0) + R(n, 0, 1) * A(n, 1, 0) + R(n, 0, 2) * A(n, 2, 0);
B(n, 1, 0) = R(n, 1, 0) * A(n, 0, 0) + R(n, 1, 1) * A(n, 1, 0) + R(n, 1, 2) * A(n, 2, 0);
}
}
*/

template <class T1, class T2>
inline void RotateResidualsOnPlane(const T1& R, //prj
const T2& A, //res_glo
MPlex2V& B) //res_loc
template <typename T1, typename T2>
void RotateResidualsOnPlane(const T1& R, //prj - at least MPlex_2_3
const T2& A, //res_glo - at least MPlex_3_1 (vector)
MPlex2V& B) //res_loc - fixed as MPlex_2_1 (vector)
{
// typedef float T;
// const idx_t N = NN;

// const T* a = A.fArray;
// ASSUME_ALIGNED(a, 64);
// T* b = B.fArray;
// ASSUME_ALIGNED(b, 64);
// const T* r = R.fArray;
// ASSUME_ALIGNED(r, 64);

#pragma omp simd
for (int n = 0; n < NN; ++n) {
B(n, 0, 0) = R(n, 0, 0) * A(n, 0, 0) + R(n, 0, 1) * A(n, 1, 0) + R(n, 0, 2) * A(n, 2, 0);
Expand Down
2 changes: 1 addition & 1 deletion RecoTracker/MkFitCore/src/MiniPropagators.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "Matrix.h"

namespace mkfit {
class ModuleInfo;
struct ModuleInfo;
}

namespace mkfit::mini_propagators {
Expand Down
19 changes: 5 additions & 14 deletions RecoTracker/MkFitCore/src/MkFinder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1010,8 +1010,6 @@ namespace mkfit {
float new_q, new_phi, new_ddphi, new_ddq;
bool prop_fail;

//X bool dumpehit = false;

if (L.is_barrel()) {
const Hit &hit = L.refHit(hi_orig);
unsigned int mid = hit.detIDinLayer();
Expand Down Expand Up @@ -1049,8 +1047,7 @@ namespace mkfit {

new_phi = vdt::fast_atan2f(mp_s.y, mp_s.x);
new_ddphi = cdist(std::abs(new_phi - L.hit_phi(hi)));

bool dqdphi_presel = new_ddq < 3.5f*(B.dq_track[itrack] + DDQ_PRESEL_FAC * L.hit_q_half_length(hi)) &&
bool dqdphi_presel = new_ddq < B.dq_track[itrack] + DDQ_PRESEL_FAC * L.hit_q_half_length(hi) &&
new_ddphi < B.dphi_track[itrack] + DDPHI_PRESEL_FAC * 0.0123f;

// clang-format off
Expand Down Expand Up @@ -1090,14 +1087,6 @@ namespace mkfit {
});
ci.hmi.back().ic2list.reset(); // zero initialize

//X if (dumpehit) {
// printf("Was a %s hit. presel=%d q-presel=%d phi-presel=%d, q_hl=%.3f, track_dq=%.3f\n",
// (sim_lbl == hit_lbl) ? "GOOD" : "BAD", dqdphi_presel,
// new_ddq < B.dq_track[itrack] + DDQ_PRESEL_FAC * L.hit_q_half_length(hi),
// new_ddphi < B.dphi_track[itrack] + DDPHI_PRESEL_FAC * 0.0123f,
// L.hit_q_half_length(hi), B.dq_track[itrack]);
//X }

bool new_dec = dqdphi_presel && !prop_fail;
++ci.n_all_hits;
if (sim_lbl == hit_lbl) {
Expand Down Expand Up @@ -1481,9 +1470,11 @@ namespace mkfit {
isStripQCompatible(itrack, layer_of_hits.is_barrel(), m_Err[iP], propPar, m_msErr, m_msPar);

//rescale strip charge to track parameters and reapply the cut
isCompatible &= passStripChargePCMfromTrack(
if (isCompatible && layer_of_hits.layer_info().has_charge()) {
isCompatible = passStripChargePCMfromTrack(
itrack, layer_of_hits.is_barrel(), charge_pcm[itrack], Hit::minChargePerCM(), propPar, m_msErr);
}
}
}
// Select only SiStrip hits with cluster size < maxClusterSize
if (!layer_of_hits.is_pixel()) {
if (layer_of_hits.refHit(m_XHitArr.At(itrack, hit_cnt, 0)).spanRows() >=
Expand Down

0 comments on commit 62bccea

Please sign in to comment.