CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes
CkfDebugger Class Reference

#include <CkfDebugger.h>

Classes

class  SimHit
 

Public Member Functions

bool analyseCompatibleMeasurements (const Trajectory &, const std::vector< TrajectoryMeasurement > &, const MeasurementTrackerEvent *, const Propagator *, const Chi2MeasurementEstimatorBase *, const TransientTrackingRecHitBuilder *)
 
 CkfDebugger (edm::ConsumesCollector iC)
 
void countSeed ()
 
void deleteHitAssociator ()
 
void fillSeedHist (CTTRHp h1, CTTRHp h2, TrajectoryStateOnSurface t)
 
void printSimHits (const edm::Event &iEvent)
 
void setConditions (edm::EventSetup const &es)
 
 ~CkfDebugger ()
 

Private Types

typedef TrajectoryMeasurement TM
 
typedef TrajectoryStateOnSurface TSOS
 

Private Member Functions

std::pair< CTTRHp, double > analyseRecHitExistance (const PSimHit &sh, const TSOS &startingState)
 
int analyseRecHitNotFound (const Trajectory &, CTTRHp)
 
bool associated (CTTRHp rechit, const PSimHit &sh) const
 
int assocTrackId (CTTRHp rechit) const
 
template<unsigned int D>
std::pair< double, double > computePulls (CTTRHp recHit, TSOS startingState)
 
std::pair< double, double > computePulls (CTTRHp recHit, TSOS startingState)
 
bool correctMeas (const TM &tm, const PSimHit *correctHit) const
 
bool correctTrajectory (const Trajectory &, unsigned int &) const
 
const GeomDetUnitdet (const PSimHit *sh) const
 
void dumpSimHit (const SimHit &hit) const
 
bool goodSimHit (const PSimHit &sh) const
 
bool hasDelta (const PSimHit *correctHit)
 
int layer (const GeomDet *det)
 
std::vector< const PSimHit * > nextCorrectHits (const Trajectory &, unsigned int &)
 
Global3DPoint position (const PSimHit *sh) const
 
const PSimHitpSimHit (unsigned int tkId, DetId detId)
 
double testSeed (CTTRHp, CTTRHp, TrajectoryStateOnSurface)
 

Private Attributes

int chi2gt30
 
int chi2gt30delta
 
int chi2gt30deltaSeed
 
int chi2ls30
 
int det_not_found
 
std::vector< int > dump
 
std::map< std::pair< int, int >, int > dump2
 
std::map< std::pair< int, int >, int > dump3
 
std::map< std::pair< int, int >, int > dump4
 
std::map< std::pair< int, int >, int > dump5
 
std::map< std::pair< int, int >, int > dump6
 
TFile * file
 
int glued_det_not_fuond
 
TH1F * hchi2seedAll
 
TH1F * hchi2seedProb
 
TrackerHitAssociatorhitAssociator
 
std::map< std::string, TH1F * > hPullGP_X_shst
 
std::map< std::string, TH1F * > hPullGP_Y_shst
 
std::map< std::string, TH1F * > hPullGP_Z_shst
 
TH2F * hPullGPXvsGPeta_shst
 
TH2F * hPullGPXvsGPphi_shst
 
TH2F * hPullGPXvsGPr_shst
 
TH2F * hPullGPXvsGPX_shst
 
TH2F * hPullGPXvsGPY_shst
 
TH2F * hPullGPXvsGPZ_shst
 
std::map< std::string, TH1F * > hPullM_shrh
 
std::map< std::string, TH1F * > hPullM_shst
 
std::map< std::string, TH1F * > hPullM_strh
 
std::map< std::string, TH1F * > hPullS_shrh
 
std::map< std::string, TH1F * > hPullS_shst
 
std::map< std::string, TH1F * > hPullS_strh
 
std::map< std::string, TH1F * > hPullX_shrh
 
std::map< std::string, TH1F * > hPullX_shst
 
std::map< std::string, TH1F * > hPullX_strh
 
std::map< std::string, TH1F * > hPullY_shrh
 
std::map< std::string, TH1F * > hPullY_shst
 
std::map< std::string, TH1F * > hPullY_strh
 
std::map< unsigned int, std::vector< PSimHit * > > idHitsMap
 
int layer_not_found
 
int matched_not_associated
 
int matched_not_found
 
int no_component
 
int no_layer
 
int no_sim_hit
 
int only_one_component
 
int other
 
int partner_det_not_fuond
 
int problems
 
int propagation
 
int seedWithDelta
 
int simple_hit_not_found
 
const MeasurementEstimatortheChi2
 
edm::ESGetToken< MagneticField, IdealMagneticFieldRecordtheFieldToken
 
const PropagatortheForwardPropagator
 
const GeometricSearchTrackertheGeomSearchTracker
 
const MagneticFieldtheMagField
 
const MeasurementTrackerEventtheMeasurementTracker
 
NavigationSchool const * theNavSchool
 
edm::ESGetToken< NavigationSchool, NavigationSchoolRecordtheNavToken
 
const TrackerTopologytheTopo
 
edm::ESGetToken< TrackerTopology, IdealGeometryRecordtheTopoHandToken
 
const TrackerGeometrytheTrackerGeom
 
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordtheTrackerToken
 
const TransientTrackingRecHitBuildertheTTRHBuilder
 
int totchi2gt30
 
int totSeeds
 
TrackerHitAssociator::Config trackerHitAssociatorConfig_
 

Detailed Description

Definition at line 48 of file CkfDebugger.h.

Member Typedef Documentation

◆ TM

Definition at line 75 of file CkfDebugger.h.

◆ TSOS

Definition at line 76 of file CkfDebugger.h.

Constructor & Destructor Documentation

◆ CkfDebugger()

CkfDebugger::CkfDebugger ( edm::ConsumesCollector  iC)

Definition at line 41 of file CkfDebugger.cc.

45  theNavToken(iC.esConsumes(edm::ESInputTag("", "SimpleNavigationSchool"))),
47  totSeeds(0) {}
TrackerHitAssociator::Config trackerHitAssociatorConfig_
Definition: CkfDebugger.h:111
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > theFieldToken
Definition: CkfDebugger.h:107
edm::ESGetToken< NavigationSchool, NavigationSchoolRecord > theNavToken
Definition: CkfDebugger.h:109
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > theTrackerToken
Definition: CkfDebugger.h:106
edm::ESGetToken< TrackerTopology, IdealGeometryRecord > theTopoHandToken
Definition: CkfDebugger.h:108
def move(src, dest)
Definition: eostools.py:511

◆ ~CkfDebugger()

CkfDebugger::~CkfDebugger ( )

Definition at line 1092 of file CkfDebugger.cc.

References chi2gt30, chi2gt30delta, chi2gt30deltaSeed, chi2ls30, det_not_found, dump, dump2, dump3, dump4, dump5, dump6, file, glued_det_not_fuond, hchi2seedAll, hchi2seedProb, hPullGP_X_shst, hPullGP_Y_shst, hPullGP_Z_shst, hPullGPXvsGPeta_shst, hPullGPXvsGPphi_shst, hPullGPXvsGPr_shst, hPullGPXvsGPX_shst, hPullGPXvsGPY_shst, hPullGPXvsGPZ_shst, hPullM_shrh, hPullM_shst, hPullM_strh, hPullS_shrh, hPullS_shst, hPullS_strh, hPullX_shrh, hPullX_shst, hPullX_strh, hPullY_shrh, hPullY_shst, hPullY_strh, mps_fire::i, createfilelist::int, dqmiolumiharvest::j, layer_not_found, matched_not_associated, matched_not_found, no_component, no_layer, no_sim_hit, only_one_component, other, partner_det_not_fuond, problems, propagation, seedWithDelta, simple_hit_not_found, runGCPTkAlMap::title, totchi2gt30, and totSeeds.

1092  {
1093  for (int it = 0; it != ((int)(dump.size())); it++)
1094  edm::LogVerbatim("CkfDebugger") << "dump " << it << " " << dump[it];
1095 
1096  edm::LogVerbatim("CkfDebugger");
1097  edm::LogVerbatim("CkfDebugger") << "seedWithDelta=" << ((double)seedWithDelta / totSeeds);
1098  edm::LogVerbatim("CkfDebugger") << "problems=" << ((double)problems / totSeeds);
1099  edm::LogVerbatim("CkfDebugger") << "no_sim_hit=" << ((double)no_sim_hit / totSeeds);
1100  edm::LogVerbatim("CkfDebugger") << "no_layer=" << ((double)no_layer / totSeeds);
1101  edm::LogVerbatim("CkfDebugger") << "layer_not_found=" << ((double)layer_not_found / totSeeds);
1102  edm::LogVerbatim("CkfDebugger") << "det_not_found=" << ((double)det_not_found / totSeeds);
1103  edm::LogVerbatim("CkfDebugger") << "chi2gt30=" << ((double)chi2gt30 / totSeeds);
1104  edm::LogVerbatim("CkfDebugger") << "chi2gt30deltaSeed=" << ((double)chi2gt30deltaSeed / totSeeds);
1105  edm::LogVerbatim("CkfDebugger") << "chi2gt30delta=" << ((double)chi2gt30delta / totSeeds);
1106  edm::LogVerbatim("CkfDebugger") << "chi2ls30=" << ((double)chi2ls30 / totSeeds);
1107  edm::LogVerbatim("CkfDebugger") << "simple_hit_not_found=" << ((double)simple_hit_not_found / totSeeds);
1108  edm::LogVerbatim("CkfDebugger") << "no_component=" << ((double)no_component / totSeeds);
1109  edm::LogVerbatim("CkfDebugger") << "only_one_component=" << ((double)only_one_component / totSeeds);
1110  edm::LogVerbatim("CkfDebugger") << "matched_not_found=" << ((double)matched_not_found / totSeeds);
1111  edm::LogVerbatim("CkfDebugger") << "matched_not_associated=" << ((double)matched_not_associated / totSeeds);
1112  edm::LogVerbatim("CkfDebugger") << "partner_det_not_fuond=" << ((double)partner_det_not_fuond / totSeeds);
1113  edm::LogVerbatim("CkfDebugger") << "glued_det_not_fuond=" << ((double)glued_det_not_fuond / totSeeds);
1114  edm::LogVerbatim("CkfDebugger") << "propagation=" << ((double)propagation / totSeeds);
1115  edm::LogVerbatim("CkfDebugger") << "other=" << ((double)other / totSeeds);
1116  edm::LogVerbatim("CkfDebugger") << "totchi2gt30=" << ((double)totchi2gt30 / totSeeds);
1117  edm::LogVerbatim("CkfDebugger") << "totSeeds=" << totSeeds;
1118  edm::LogVerbatim("CkfDebugger");
1119 
1120  edm::LogVerbatim("CkfDebugger") << "layer navigation problems:";
1121  for (int i = 0; i != 6; i++)
1122  for (int j = 0; j != 9; j++) {
1123  if (i == 0 && j > 2)
1124  break;
1125  if (i == 1 && j > 1)
1126  break;
1127  if (i == 2 && j > 3)
1128  break;
1129  if (i == 3 && j > 2)
1130  break;
1131  if (i == 4 && j > 5)
1132  break;
1133  if (i == 5 && j > 8)
1134  break;
1135  edm::LogVerbatim("CkfDebugger") << "det=" << i + 1 << " lay=" << j + 1 << " " << dump2[pair<int, int>(i, j)];
1136  }
1137  edm::LogVerbatim("CkfDebugger") << "\nlayer with hit having chi2>30:";
1138  for (int i = 0; i != 6; i++)
1139  for (int j = 0; j != 9; j++) {
1140  if (i == 0 && j > 2)
1141  break;
1142  if (i == 1 && j > 1)
1143  break;
1144  if (i == 2 && j > 3)
1145  break;
1146  if (i == 3 && j > 2)
1147  break;
1148  if (i == 4 && j > 5)
1149  break;
1150  if (i == 5 && j > 8)
1151  break;
1152  edm::LogVerbatim("CkfDebugger") << "det=" << i + 1 << " lay=" << j + 1 << " " << dump3[pair<int, int>(i, j)];
1153  }
1154  edm::LogVerbatim("CkfDebugger") << "\nlayer with hit having chi2>30 for delta rays:";
1155  for (int i = 0; i != 6; i++)
1156  for (int j = 0; j != 9; j++) {
1157  if (i == 0 && j > 2)
1158  break;
1159  if (i == 1 && j > 1)
1160  break;
1161  if (i == 2 && j > 3)
1162  break;
1163  if (i == 3 && j > 2)
1164  break;
1165  if (i == 4 && j > 5)
1166  break;
1167  if (i == 5 && j > 8)
1168  break;
1169  edm::LogVerbatim("CkfDebugger") << "det=" << i + 1 << " lay=" << j + 1 << " " << dump5[pair<int, int>(i, j)];
1170  }
1171  edm::LogVerbatim("CkfDebugger") << "\nlayer with det not found:";
1172  for (int i = 0; i != 6; i++)
1173  for (int j = 0; j != 9; j++) {
1174  if (i == 0 && j > 2)
1175  break;
1176  if (i == 1 && j > 1)
1177  break;
1178  if (i == 2 && j > 3)
1179  break;
1180  if (i == 3 && j > 2)
1181  break;
1182  if (i == 4 && j > 5)
1183  break;
1184  if (i == 5 && j > 8)
1185  break;
1186  edm::LogVerbatim("CkfDebugger") << "det=" << i + 1 << " lay=" << j + 1 << " " << dump4[pair<int, int>(i, j)];
1187  }
1188  edm::LogVerbatim("CkfDebugger") << "\nlayer with correct RecHit after missing Sim Hit:";
1189  for (int i = 0; i != 6; i++)
1190  for (int j = 0; j != 9; j++) {
1191  if (i == 0 && j > 2)
1192  break;
1193  if (i == 1 && j > 1)
1194  break;
1195  if (i == 2 && j > 3)
1196  break;
1197  if (i == 3 && j > 2)
1198  break;
1199  if (i == 4 && j > 5)
1200  break;
1201  if (i == 5 && j > 8)
1202  break;
1203  edm::LogVerbatim("CkfDebugger") << "det=" << i + 1 << " lay=" << j + 1 << " " << dump6[pair<int, int>(i, j)];
1204  }
1205  hchi2seedAll->Write();
1206  hchi2seedProb->Write();
1207  std::stringstream title;
1208  for (int i = 0; i != 6; i++)
1209  for (int j = 0; j != 9; j++) {
1210  if (i == 0 && j > 2)
1211  break;
1212  if (i == 1 && j > 1)
1213  break;
1214  if (i == 2 && j > 3)
1215  break;
1216  if (i == 3 && j > 2)
1217  break;
1218  if (i == 4 && j > 5)
1219  break;
1220  if (i == 5 && j > 8)
1221  break;
1222  title.str("");
1223  title << "pullX_" << i + 1 << "-" << j + 1 << "_sh-rh";
1224  hPullX_shrh[title.str()]->Write();
1225  title.str("");
1226  title << "pullY_" << i + 1 << "-" << j + 1 << "_sh-rh";
1227  hPullY_shrh[title.str()]->Write();
1228  title.str("");
1229  title << "pullX_" << i + 1 << "-" << j + 1 << "_sh-st";
1230  hPullX_shst[title.str()]->Write();
1231  title.str("");
1232  title << "pullY_" << i + 1 << "-" << j + 1 << "_sh-st";
1233  hPullY_shst[title.str()]->Write();
1234  title.str("");
1235  title << "pullX_" << i + 1 << "-" << j + 1 << "_st-rh";
1236  hPullX_strh[title.str()]->Write();
1237  title.str("");
1238  title << "pullY_" << i + 1 << "-" << j + 1 << "_st-rh";
1239  hPullY_strh[title.str()]->Write();
1240  title.str("");
1241  title << "PullGP_X_" << i + 1 << "-" << j + 1 << "_sh-st";
1242  hPullGP_X_shst[title.str()]->Write();
1243  title.str("");
1244  title << "PullGP_Y_" << i + 1 << "-" << j + 1 << "_sh-st";
1245  hPullGP_Y_shst[title.str()]->Write();
1246  title.str("");
1247  title << "PullGP_Z_" << i + 1 << "-" << j + 1 << "_sh-st";
1248  hPullGP_Z_shst[title.str()]->Write();
1249  if (((i == 2 || i == 4) && (j == 0 || j == 1)) || (i == 3 || i == 5)) {
1250  title.str("");
1251  title << "pullM_" << i + 1 << "-" << j + 1 << "_sh-rh";
1252  hPullM_shrh[title.str()]->Write();
1253  title.str("");
1254  title << "pullS_" << i + 1 << "-" << j + 1 << "_sh-rh";
1255  hPullS_shrh[title.str()]->Write();
1256  title.str("");
1257  title << "pullM_" << i + 1 << "-" << j + 1 << "_sh-st";
1258  hPullM_shst[title.str()]->Write();
1259  title.str("");
1260  title << "pullS_" << i + 1 << "-" << j + 1 << "_sh-st";
1261  hPullS_shst[title.str()]->Write();
1262  title.str("");
1263  title << "pullM_" << i + 1 << "-" << j + 1 << "_st-rh";
1264  hPullM_strh[title.str()]->Write();
1265  title.str("");
1266  title << "pullS_" << i + 1 << "-" << j + 1 << "_st-rh";
1267  hPullS_strh[title.str()]->Write();
1268  }
1269  }
1270  hPullGPXvsGPX_shst->Write();
1271  hPullGPXvsGPY_shst->Write();
1272  hPullGPXvsGPZ_shst->Write();
1273  hPullGPXvsGPr_shst->Write();
1274  hPullGPXvsGPeta_shst->Write();
1275  hPullGPXvsGPphi_shst->Write();
1276 
1277  //file->Write();
1278  file->Close();
1279 }
Log< level::Info, true > LogVerbatim
std::map< std::string, TH1F * > hPullM_shst
Definition: CkfDebugger.h:228
std::map< std::string, TH1F * > hPullS_strh
Definition: CkfDebugger.h:231
std::map< std::string, TH1F * > hPullX_shrh
Definition: CkfDebugger.h:219
TH2F * hPullGPXvsGPeta_shst
Definition: CkfDebugger.h:241
std::map< std::pair< int, int >, int > dump6
Definition: CkfDebugger.h:214
std::map< std::pair< int, int >, int > dump3
Definition: CkfDebugger.h:211
int partner_det_not_fuond
Definition: CkfDebugger.h:259
int det_not_found
Definition: CkfDebugger.h:249
std::map< std::pair< int, int >, int > dump2
Definition: CkfDebugger.h:210
int seedWithDelta
Definition: CkfDebugger.h:244
int matched_not_found
Definition: CkfDebugger.h:257
std::map< std::pair< int, int >, int > dump4
Definition: CkfDebugger.h:212
int matched_not_associated
Definition: CkfDebugger.h:258
std::map< std::string, TH1F * > hPullS_shrh
Definition: CkfDebugger.h:227
int only_one_component
Definition: CkfDebugger.h:256
TH2F * hPullGPXvsGPr_shst
Definition: CkfDebugger.h:240
int glued_det_not_fuond
Definition: CkfDebugger.h:260
TH1F * hchi2seedAll
Definition: CkfDebugger.h:217
TH2F * hPullGPXvsGPY_shst
Definition: CkfDebugger.h:238
std::map< std::string, TH1F * > hPullY_shrh
Definition: CkfDebugger.h:220
int chi2gt30deltaSeed
Definition: CkfDebugger.h:252
std::map< std::string, TH1F * > hPullX_shst
Definition: CkfDebugger.h:221
int simple_hit_not_found
Definition: CkfDebugger.h:254
std::map< std::string, TH1F * > hPullGP_Y_shst
Definition: CkfDebugger.h:234
TFile * file
Definition: CkfDebugger.h:216
std::map< std::string, TH1F * > hPullM_shrh
Definition: CkfDebugger.h:226
std::map< std::pair< int, int >, int > dump5
Definition: CkfDebugger.h:213
TH2F * hPullGPXvsGPX_shst
Definition: CkfDebugger.h:237
std::map< std::string, TH1F * > hPullGP_Z_shst
Definition: CkfDebugger.h:235
std::map< std::string, TH1F * > hPullX_strh
Definition: CkfDebugger.h:223
int layer_not_found
Definition: CkfDebugger.h:248
int no_component
Definition: CkfDebugger.h:255
TH2F * hPullGPXvsGPZ_shst
Definition: CkfDebugger.h:239
std::vector< int > dump
Definition: CkfDebugger.h:209
std::map< std::string, TH1F * > hPullS_shst
Definition: CkfDebugger.h:229
std::map< std::string, TH1F * > hPullY_shst
Definition: CkfDebugger.h:222
std::map< std::string, TH1F * > hPullM_strh
Definition: CkfDebugger.h:230
TH1F * hchi2seedProb
Definition: CkfDebugger.h:217
std::map< std::string, TH1F * > hPullY_strh
Definition: CkfDebugger.h:224
TH2F * hPullGPXvsGPphi_shst
Definition: CkfDebugger.h:242
int chi2gt30delta
Definition: CkfDebugger.h:251
std::map< std::string, TH1F * > hPullGP_X_shst
Definition: CkfDebugger.h:233

Member Function Documentation

◆ analyseCompatibleMeasurements()

bool CkfDebugger::analyseCompatibleMeasurements ( const Trajectory traj,
const std::vector< TrajectoryMeasurement > &  meas,
const MeasurementTrackerEvent aMeasurementTracker,
const Propagator propagator,
const Chi2MeasurementEstimatorBase estimator,
const TransientTrackingRecHitBuilder aTTRHBuilder 
)

Definition at line 196 of file CkfDebugger.cc.

References analyseRecHitExistance(), analyseRecHitNotFound(), TrackerHitAssociator::associateHit(), TransientTrackingRecHitBuilder::build(), TrajectoryStateOnSurface::cartesianError(), hltPixelTracks_cff::chi2, chi2gt30, chi2gt30delta, chi2gt30deltaSeed, chi2ls30, computePulls(), correctMeas(), correctTrajectory(), GlobalErrorBase< T, ErrorWeightType >::cxx(), GlobalErrorBase< T, ErrorWeightType >::cyy(), GlobalErrorBase< T, ErrorWeightType >::czz(), det(), PSimHit::detUnitId(), dump, dump2, dump3, dump4, dump5, PV3DBase< T, PVType, FrameType >::eta(), Trajectory::firstMeasurement(), TrajectoryStateOnSurface::globalPosition(), hasDelta(), hchi2seedProb, hitAssociator, hPullGP_X_shst, hPullGP_Y_shst, hPullGP_Z_shst, hPullGPXvsGPeta_shst, hPullGPXvsGPphi_shst, hPullGPXvsGPr_shst, hPullGPXvsGPX_shst, hPullGPXvsGPY_shst, hPullGPXvsGPZ_shst, hPullM_shrh, hPullM_shst, hPullM_strh, hPullS_shrh, hPullS_shst, hPullS_strh, hPullX_shrh, hPullX_shst, hPullX_strh, hPullY_shrh, hPullY_shst, hPullY_strh, mps_fire::i, Trajectory::lastMeasurement(), layer(), TrajectoryStateOnSurface::localError(), PSimHit::localPosition(), TrajectoryStateOnSurface::localPosition(), LogTrace, visualization-live-secondInstance_cfg::m, PV3DBase< T, PVType, FrameType >::mag(), Trajectory::measurements(), nextCorrectHits(), PV3DBase< T, PVType, FrameType >::phi(), CartesianTrajectoryError::position(), GeomDet::position(), position(), LocalTrajectoryError::positionError(), problems, PSimHit::processType(), Propagator::propagate(), TrackCandidateProducer_cfi::propagator, TrajectoryMeasurement::recHit(), mps_fire::result, alignCSCRings::s, seedWithDelta, mathSSE::sqrt(), GeomDet::surface(), TrajectoryStateOnSurface::surface(), submitPVValidationJobs::t, testSeed(), theChi2, theForwardPropagator, theGeomSearchTracker, theMeasurementTracker, theTTRHBuilder, runGCPTkAlMap::title, totchi2gt30, TrajectoryMeasurement::updatedState(), PV3DBase< T, PVType, FrameType >::x(), LocalError::xx(), PV3DBase< T, PVType, FrameType >::y(), LocalError::yy(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by CkfDebugTrajectoryBuilder::analyzeMeasurementsDebugger().

201  {
202  LogTrace("CkfDebugger") << "\nnow in analyseCompatibleMeasurements";
203  LogTrace("CkfDebugger") << "number of input hits:" << meas.size();
204  for (std::vector<TrajectoryMeasurement>::const_iterator tmpIt = meas.begin(); tmpIt != meas.end(); tmpIt++) {
205  if (tmpIt->recHit()->isValid())
206  LogTrace("CkfDebugger") << "valid hit at position:" << tmpIt->recHit()->globalPosition();
207  }
209  theChi2 = estimator;
210  theMeasurementTracker = aMeasurementTracker;
211  theGeomSearchTracker = theMeasurementTracker->geometricSearchTracker();
212  theTTRHBuilder = aTTRHBuilder;
213  unsigned int trajId = 0;
214  if (!correctTrajectory(traj, trajId)) {
215  LogTrace("CkfDebugger") << "trajectory not correct";
216  return true;
217  } // only correct trajectories analysed
218  LogTrace("CkfDebugger") << "correct trajectory";
219 
220  if (traj.measurements().size() == 2) {
221  if (testSeed(traj.firstMeasurement().recHit(),
222  traj.lastMeasurement().recHit(),
223  traj.lastMeasurement().updatedState()) == -1) {
224  LogTrace("CkfDebugger") << "Seed has delta";
225  seedWithDelta++;
226  return false; //true;//false?
227  }
228  }
229 
230  //const PSimHit* correctHit = nextCorrectHit(traj, trajId);
231  //if ( correctHit == 0) return true; // no more simhits on this track
232  std::vector<const PSimHit*> correctHits = nextCorrectHits(traj, trajId);
233  if (correctHits.empty())
234  return true; // no more simhits on this track
235 
236  for (std::vector<const PSimHit*>::iterator corHit = correctHits.begin(); corHit != correctHits.end(); corHit++) {
237  for (std::vector<TM>::const_iterator i = meas.begin(); i != meas.end(); i++) {
238  if (correctMeas(*i, *corHit)) {
239  LogTrace("CkfDebugger") << "Correct hit found at position " << i - meas.begin();
240  return true;
241  }
242  }
243  }
244 
245  //debug why the first hit in correctHits is not found
246  //FIXME should loop over all hits
247  const PSimHit* correctHit = *(correctHits.begin());
248 
249  // correct hit not found
250  edm::LogVerbatim("CkfDebugger") << std::endl
251  << "CkfDebugger: problem found: correct hit not found by findCompatibleMeasurements";
252  edm::LogVerbatim("CkfDebugger") << "The correct hit position is " << position(correctHit) << " lp "
253  << correctHit->localPosition();
254  edm::LogVerbatim("CkfDebugger") << "The size of the meas vector is " << meas.size();
255  dump[0]++;
256  problems++;
257 
258  for (std::vector<TM>::const_iterator i = meas.begin(); i != meas.end(); i++) {
259  edm::LogVerbatim("CkfDebugger") << "Is the hit valid? " << i->recHit()->isValid();
260  if (i->recHit()->isValid()) {
261  edm::LogVerbatim("CkfDebugger") << "RecHit at " << i->recHit()->globalPosition() << " layer "
262  << ((i->recHit()->det()->geographicalId().rawId() >> 16) & 0xF) << " subdet "
263  << i->recHit()->det()->geographicalId().subdetId() << " Chi2 " << i->estimate();
264  } else if (i->recHit()->det() == nullptr) {
265  edm::LogVerbatim("CkfDebugger") << "Invalid RecHit returned with zero Det pointer";
266  } else if (i->recHit()->det() == det(correctHit)) {
267  edm::LogVerbatim("CkfDebugger") << "Invalid hit returned in correct Det";
268  } else {
269  edm::LogVerbatim("CkfDebugger") << "Invalid hit returned in Det at gpos " << i->recHit()->det()->position()
270  << " correct Det is at " << det(correctHit)->position();
271  }
272  }
273 
274  //Look if the correct RecHit exists
275  std::pair<CTTRHp, double> correctRecHit = analyseRecHitExistance(*correctHit, traj.lastMeasurement().updatedState());
276  if (correctRecHit.first == nullptr) {
277  //the hit does not exist or is uncorrectly matched
278  if (fabs(correctRecHit.second - 0) < 0.01) {
279  dump[1]++;
280  } //other
281  if (fabs(correctRecHit.second + 1) < 0.01) {
282  dump[8]++;
283  } //propagation
284  if (fabs(correctRecHit.second + 2) < 0.01) {
285  dump[9]++;
286  } //No component is found
287  if (fabs(correctRecHit.second + 3) < 0.01) {
288  dump[10]++;
289  } //Partner measurementDet not found
290  if (fabs(correctRecHit.second + 4) < 0.01) {
291  dump[11]++;
292  } //glued MeasurementDet not found
293  if (fabs(correctRecHit.second + 5) < 0.01) {
294  dump[12]++;
295  } //matched not found
296  if (fabs(correctRecHit.second + 6) < 0.01) {
297  dump[13]++;
298  } //Matched not associated
299  if (fabs(correctRecHit.second + 7) < 0.01) {
300  dump[14]++;
301  } //Only one component is found
302  if (fabs(correctRecHit.second + 8) < 0.01) {
303  dump[15]++;
304  } //not found (is not a glued det)
305  } else {
306  //the hit exists: why wasn't it found?
307  int result = analyseRecHitNotFound(traj, correctRecHit.first);
308  if (result == 5) {
309  if (correctRecHit.second > 30) {
310  edm::LogVerbatim("CkfDebugger") << "Outling RecHit at pos=" << correctRecHit.first->globalPosition()
311  << " from SimHit at pos=" << position(correctHit)
312  << " det=" << correctHit->detUnitId()
313  << " process=" << correctHit->processType();
314  if (hasDelta(correctHit)) {
315  edm::LogVerbatim("CkfDebugger") << "there are deltas on this det";
316  chi2gt30delta++;
317  dump5[pair<int, int>((correctRecHit.first->det()->geographicalId().subdetId() - 1),
318  (layer(correctRecHit.first->det())) - 1)]++;
319  } else {
320  edm::LogVerbatim("CkfDebugger") << "no deltas on this det";
321  dump[5]++;
322  chi2gt30++;
323  dump3[pair<int, int>((correctRecHit.first->det()->geographicalId().subdetId() - 1),
324  (layer(correctRecHit.first->det())) - 1)]++;
325  CTTRHp h1 = traj.measurements()[0].recHit();
326  CTTRHp h2 = traj.measurements()[1].recHit();
327  TSOS t = traj.measurements()[1].updatedState();
328  double chi2 = testSeed(h1, h2, t);
329  if (chi2 == -1) {
330  edm::LogVerbatim("CkfDebugger") << "there were deltas in the seed";
332  } else {
333  hchi2seedProb->Fill(chi2);
334  edm::LogVerbatim("CkfDebugger") << "no deltas in the seed. What is wrong?";
335 
337  correctRecHit.first->det()->surface());
338  TSOS simDetState =
340 
341  if (true /*detState.globalMomentum().y()>0*/) {
342  int subdetId = correctRecHit.first->det()->geographicalId().subdetId();
343  int layerId = layer(correctRecHit.first->det());
344 
345  LogTrace("CkfDebugger") << "position(correctHit)=" << position(correctHit);
346  LogTrace("CkfDebugger") << "correctRecHit.first->globalPosition()="
347  << correctRecHit.first->globalPosition();
348  LogTrace("CkfDebugger") << "detState.globalPosition()=" << detState.globalPosition();
349  LogTrace("CkfDebugger") << "simDetState.globalPosition()=" << simDetState.globalPosition();
350 
351  LogTrace("CkfDebugger") << "correctHit->localPosition()=" << correctHit->localPosition();
352  LogTrace("CkfDebugger") << "correctRecHit.first->localPosition()="
353  << correctRecHit.first->localPosition();
354  LogTrace("CkfDebugger") << "correctRecHit.first->localPositionError()="
355  << correctRecHit.first->localPositionError();
356  LogTrace("CkfDebugger") << "detState.localPosition()=" << detState.localPosition();
357  LogTrace("CkfDebugger") << "detState.localError().positionError()="
358  << detState.localError().positionError();
359  LogTrace("CkfDebugger") << "simDetState.localPosition()=" << simDetState.localPosition();
360  LogTrace("CkfDebugger") << "simDetState.localError().positionError()="
361  << simDetState.localError().positionError();
362  double pullx_shrh = (correctHit->localPosition().x() - correctRecHit.first->localPosition().x()) /
363  sqrt(correctRecHit.first->localPositionError().xx());
364  double pully_shrh = 0;
365  if (correctRecHit.first->localPositionError().yy() != 0)
366  pully_shrh = (correctHit->localPosition().y() - correctRecHit.first->localPosition().y()) /
367  sqrt(correctRecHit.first->localPositionError().yy());
368  double pullx_shst = (correctHit->localPosition().x() - simDetState.localPosition().x()) /
369  sqrt(simDetState.localError().positionError().xx());
370  double pully_shst = (correctHit->localPosition().y() - simDetState.localPosition().y()) /
371  sqrt(simDetState.localError().positionError().yy());
372 
373  LogTrace("CkfDebugger") << "pullx(sh-rh)=" << pullx_shrh;
374  LogTrace("CkfDebugger") << "pully(sh-rh)=" << pully_shrh;
375  LogTrace("CkfDebugger") << "pullx(sh-st)=" << pullx_shst;
376  LogTrace("CkfDebugger") << "pully(sh-st)=" << pully_shst;
377 
378  LogTrace("CkfDebugger") << "pullx(st-rh)="
379  << (detState.localPosition().x() - correctRecHit.first->localPosition().x()) /
380  sqrt(correctRecHit.first->localPositionError().xx() +
381  detState.localError().positionError().xx());
382 
383  std::pair<double, double> pulls = computePulls(correctRecHit.first, detState);
384  if (subdetId > 0 && subdetId < 7 && layerId > 0 && layerId < 10) {
385  stringstream title;
386  title.str("");
387  title << "pullX_" << subdetId << "-" << layerId << "_sh-rh";
388  hPullX_shrh[title.str()]->Fill(pullx_shrh);
389  title.str("");
390  title << "pullY_" << subdetId << "-" << layerId << "_sh-rh";
391  hPullY_shrh[title.str()]->Fill(pully_shrh);
392  title.str("");
393  title << "pullX_" << subdetId << "-" << layerId << "_sh-st";
394  hPullX_shst[title.str()]->Fill(pullx_shst);
395  title.str("");
396  title << "pullY_" << subdetId << "-" << layerId << "_sh-st";
397  hPullY_shst[title.str()]->Fill(pully_shst);
398  title.str("");
399  title << "pullX_" << subdetId << "-" << layerId << "_st-rh";
400  hPullX_strh[title.str()]->Fill(pulls.first);
401  title.str("");
402  title << "pullY_" << subdetId << "-" << layerId << "_st-rh";
403  hPullY_strh[title.str()]->Fill(pulls.second);
404 
405  GlobalPoint shGPos = position(correctHit);
406  GlobalPoint stGPos = simDetState.globalPosition();
407  GlobalError stGPosErr = simDetState.cartesianError().position();
408  double pullGPx = (shGPos.x() - stGPos.x()) / sqrt(stGPosErr.cxx());
409  title.str("");
410  title << "PullGP_X_" << subdetId << "-" << layerId << "_sh-st";
411  hPullGP_X_shst[title.str()]->Fill(pullGPx);
412  title.str("");
413  title << "PullGP_Y_" << subdetId << "-" << layerId << "_sh-st";
414  hPullGP_Y_shst[title.str()]->Fill((shGPos.y() - stGPos.y()) / sqrt(stGPosErr.cyy()));
415  title.str("");
416  title << "PullGP_Z_" << subdetId << "-" << layerId << "_sh-st";
417  hPullGP_Z_shst[title.str()]->Fill((shGPos.z() - stGPos.z()) / sqrt(stGPosErr.czz()));
418 
419  if (subdetId == 3 && layerId == 1) {
420  hPullGPXvsGPX_shst->Fill(pullGPx, shGPos.x());
421  hPullGPXvsGPY_shst->Fill(pullGPx, shGPos.y());
422  hPullGPXvsGPZ_shst->Fill(pullGPx, shGPos.z());
423  hPullGPXvsGPr_shst->Fill(pullGPx, shGPos.mag());
424  hPullGPXvsGPeta_shst->Fill(pullGPx, shGPos.eta());
425  hPullGPXvsGPphi_shst->Fill(pullGPx, shGPos.phi());
426  }
427  if (dynamic_cast<const SiStripMatchedRecHit2D*>(correctRecHit.first->hit())) {
428  LogTrace("CkfDebugger") << "MONO HIT";
429  auto m = dynamic_cast<const SiStripMatchedRecHit2D*>(correctRecHit.first->hit())->monoHit();
430  CTTRHp tMonoHit = theTTRHBuilder->build(&m);
431  const PSimHit sMonoHit = *(hitAssociator->associateHit(*tMonoHit->hit()).begin());
433  tMonoHit->det()->surface());
434  double pullM_shrh = (sMonoHit.localPosition().x() - tMonoHit->localPosition().x()) /
435  sqrt(tMonoHit->localPositionError().xx());
436  double pullM_shst = (sMonoHit.localPosition().x() - monoState.localPosition().x()) /
437  sqrt(monoState.localError().positionError().xx());
438  std::pair<double, double> pullsMono = computePulls(tMonoHit, monoState);
439  title.str("");
440  title << "pullM_" << subdetId << "-" << layerId << "_sh-rh";
441  hPullM_shrh[title.str()]->Fill(pullM_shrh);
442  title.str("");
443  title << "pullM_" << subdetId << "-" << layerId << "_sh-st";
444  hPullM_shst[title.str()]->Fill(pullM_shst);
445  title.str("");
446  title << "pullM_" << subdetId << "-" << layerId << "_st-rh";
447  hPullM_strh[title.str()]->Fill(pullsMono.first);
448 
449  LogTrace("CkfDebugger") << "STEREO HIT";
450  auto s = dynamic_cast<const SiStripMatchedRecHit2D*>(correctRecHit.first->hit())->stereoHit();
451  CTTRHp tStereoHit = theTTRHBuilder->build(&s);
452  const PSimHit sStereoHit = *(hitAssociator->associateHit(*tStereoHit->hit()).begin());
454  tStereoHit->det()->surface());
455  double pullS_shrh = (sStereoHit.localPosition().x() - tStereoHit->localPosition().x()) /
456  sqrt(tStereoHit->localPositionError().xx());
457  double pullS_shst = (sStereoHit.localPosition().x() - stereoState.localPosition().x()) /
458  sqrt(stereoState.localError().positionError().xx());
459  std::pair<double, double> pullsStereo = computePulls(tStereoHit, stereoState);
460  title.str("");
461  title << "pullS_" << subdetId << "-" << layerId << "_sh-rh";
462  hPullS_shrh[title.str()]->Fill(pullS_shrh);
463  title.str("");
464  title << "pullS_" << subdetId << "-" << layerId << "_sh-st";
465  hPullS_shst[title.str()]->Fill(pullS_shst);
466  title.str("");
467  title << "pullS_" << subdetId << "-" << layerId << "_st-rh";
468  hPullS_strh[title.str()]->Fill(pullsStereo.first);
469  }
470  } else
471  edm::LogVerbatim("CkfDebugger")
472  << "unexpected result: wrong det or layer id " << subdetId << " " << layerId << " "
473  << correctRecHit.first->det()->geographicalId().rawId();
474  }
475  }
476  }
477  } else {
478  edm::LogVerbatim("CkfDebugger") << "unexpected result " << correctRecHit.second;
479  dump[6]++;
480  chi2ls30++;
481  }
482  } else
483  dump[result]++;
484  if (result == 3) {
485  dump2[pair<int, int>((correctRecHit.first->det()->geographicalId().subdetId() - 1),
486  (layer(correctRecHit.first->det())) - 1)]++;
487  }
488  if (result == 4) {
489  dump4[pair<int, int>((correctRecHit.first->det()->geographicalId().subdetId() - 1),
490  (layer(correctRecHit.first->det())) - 1)]++;
491  }
492  if (correctRecHit.second > 30) {
493  dump[7]++;
494  totchi2gt30++;
495  }
496  }
497  return false;
498 }
Log< level::Info, true > LogVerbatim
std::map< std::string, TH1F * > hPullM_shst
Definition: CkfDebugger.h:228
bool hasDelta(const PSimHit *correctHit)
Definition: CkfDebugger.h:143
std::pair< CTTRHp, double > analyseRecHitExistance(const PSimHit &sh, const TSOS &startingState)
Definition: CkfDebugger.cc:713
std::map< std::string, TH1F * > hPullS_strh
Definition: CkfDebugger.h:231
const LocalTrajectoryError & localError() const
std::map< std::string, TH1F * > hPullX_shrh
Definition: CkfDebugger.h:219
unsigned int detUnitId() const
Definition: PSimHit.h:97
TH2F * hPullGPXvsGPeta_shst
Definition: CkfDebugger.h:241
std::pair< double, double > computePulls(CTTRHp recHit, TSOS startingState)
Definition: CkfDebugger.h:167
T z() const
Definition: PV3DBase.h:61
const TransientTrackingRecHitBuilder * theTTRHBuilder
Definition: CkfDebugger.h:114
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
const GeometricSearchTracker * theGeomSearchTracker
Definition: CkfDebugger.h:103
T eta() const
Definition: PV3DBase.h:73
const MeasurementTrackerEvent * theMeasurementTracker
Definition: CkfDebugger.h:113
std::map< std::pair< int, int >, int > dump3
Definition: CkfDebugger.h:211
Global3DPoint position(const PSimHit *sh) const
Definition: CkfDebugger.h:156
std::vector< const PSimHit * > nextCorrectHits(const Trajectory &, unsigned int &)
Definition: CkfDebugger.cc:561
LocalError positionError() const
const SurfaceType & surface() const
bool correctMeas(const TM &tm, const PSimHit *correctHit) const
Definition: CkfDebugger.cc:667
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
std::map< std::pair< int, int >, int > dump2
Definition: CkfDebugger.h:210
int seedWithDelta
Definition: CkfDebugger.h:244
TrajectoryMeasurement const & lastMeasurement() const
Definition: Trajectory.h:150
const CartesianTrajectoryError cartesianError() const
const MeasurementEstimator * theChi2
Definition: CkfDebugger.h:104
bool correctTrajectory(const Trajectory &, unsigned int &) const
Definition: CkfDebugger.cc:500
#define LogTrace(id)
DataContainer const & measurements() const
Definition: Trajectory.h:178
const GeomDetUnit * det(const PSimHit *sh) const
Definition: CkfDebugger.h:159
float yy() const
Definition: LocalError.h:24
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
int analyseRecHitNotFound(const Trajectory &, CTTRHp)
Definition: CkfDebugger.cc:935
GlobalPoint globalPosition() const
double testSeed(CTTRHp, CTTRHp, TrajectoryStateOnSurface)
std::map< std::pair< int, int >, int > dump4
Definition: CkfDebugger.h:212
std::map< std::string, TH1F * > hPullS_shrh
Definition: CkfDebugger.h:227
std::vector< PSimHit > associateHit(const TrackingRecHit &thit) const
const GlobalError position() const
Position error submatrix.
T sqrt(T t)
Definition: SSEVec.h:19
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
unsigned short processType() const
Definition: PSimHit.h:120
TH2F * hPullGPXvsGPr_shst
Definition: CkfDebugger.h:240
T mag() const
Definition: PV3DBase.h:64
TrackerHitAssociator * hitAssociator
Definition: CkfDebugger.h:112
TH2F * hPullGPXvsGPY_shst
Definition: CkfDebugger.h:238
TransientTrackingRecHit::ConstRecHitPointer CTTRHp
Definition: CkfDebugger.h:44
std::map< std::string, TH1F * > hPullY_shrh
Definition: CkfDebugger.h:220
const Propagator * theForwardPropagator
Definition: CkfDebugger.h:105
int chi2gt30deltaSeed
Definition: CkfDebugger.h:252
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
std::map< std::string, TH1F * > hPullX_shst
Definition: CkfDebugger.h:221
Local3DPoint localPosition() const
Definition: PSimHit.h:52
std::map< std::string, TH1F * > hPullGP_Y_shst
Definition: CkfDebugger.h:234
const Surface::PositionType & position() const
The position (origin of the R.F.)
Definition: GeomDet.h:43
TrajectoryStateOnSurface const & updatedState() const
std::map< std::string, TH1F * > hPullM_shrh
Definition: CkfDebugger.h:226
TrajectoryMeasurement const & firstMeasurement() const
Definition: Trajectory.h:166
std::map< std::pair< int, int >, int > dump5
Definition: CkfDebugger.h:213
TH2F * hPullGPXvsGPX_shst
Definition: CkfDebugger.h:237
std::map< std::string, TH1F * > hPullGP_Z_shst
Definition: CkfDebugger.h:235
std::map< std::string, TH1F * > hPullX_strh
Definition: CkfDebugger.h:223
TH2F * hPullGPXvsGPZ_shst
Definition: CkfDebugger.h:239
std::vector< int > dump
Definition: CkfDebugger.h:209
std::map< std::string, TH1F * > hPullS_shst
Definition: CkfDebugger.h:229
int layer(const GeomDet *det)
Definition: CkfDebugger.h:161
std::map< std::string, TH1F * > hPullY_shst
Definition: CkfDebugger.h:222
std::map< std::string, TH1F * > hPullM_strh
Definition: CkfDebugger.h:230
float xx() const
Definition: LocalError.h:22
TH1F * hchi2seedProb
Definition: CkfDebugger.h:217
std::map< std::string, TH1F * > hPullY_strh
Definition: CkfDebugger.h:224
TH2F * hPullGPXvsGPphi_shst
Definition: CkfDebugger.h:242
ConstRecHitPointer const & recHit() const
int chi2gt30delta
Definition: CkfDebugger.h:251
std::map< std::string, TH1F * > hPullGP_X_shst
Definition: CkfDebugger.h:233

◆ analyseRecHitExistance()

pair< CTTRHp, double > CkfDebugger::analyseRecHitExistance ( const PSimHit sh,
const TSOS startingState 
)
private

Definition at line 713 of file CkfDebugger.cc.

References associated(), hltPixelTracks_cff::chi2, det(), PSimHit::detUnitId(), MeasurementEstimator::estimate(), newFWLiteAna::found, GeomDet::geographicalId(), MeasurementDet::geomDet(), StripSubdetector::glued(), glued_det_not_fuond, gluedId(), TrajectoryStateOnSurface::isValid(), layer(), LogTrace, matched_not_associated, matched_not_found, hlt_dqm_clientPB-live_cfg::me, no_component, only_one_component, other, partner_det_not_fuond, StripSubdetector::partnerDetId(), MeasurementDet::position(), position(), amptDefault_cfi::proj, Propagator::propagate(), propagation, pSimHit(), dttmaxenums::R, alignCSCRings::r, FastTrackerRecHitMaskProducer_cfi::recHits, MeasurementDet::recHits(), mps_fire::result, simple_hit_not_found, DetId::subdetId(), GeomDet::surface(), MeasurementDet::surface(), theChi2, theForwardPropagator, theMagField, theMeasurementTracker, PSimHit::trackId(), and y.

Referenced by analyseCompatibleMeasurements().

713  {
714  LogTrace("CkfDebugger") << "now in analyseRecHitExistance";
715 
716 #if 0
717  std::pair<CTTRHp, double> result;
718 
719  const MeasurementDet* simHitDet = theMeasurementTracker->idToDet( DetId( sh.detUnitId()));
720  TSOS simHitState = TSOSFromSimHitFactory()(sh, *det(&sh), *theMagField);
721  MeasurementDet::RecHitContainer recHits = simHitDet->recHits( simHitState);//take all hits from det
722 
723  //check if the hit is not present or is a problem of association
724  TSOS firstDetState = theForwardPropagator->propagate( startingState, det(&sh)->surface());
725  if (!firstDetState.isValid()) {
726  edm::LogVerbatim("CkfDebugger") << "CkfDebugger: propagation failed from state " << startingState << " to first det surface "
727  << position(&sh) ;
728  propagation++;
729  return std::pair<CTTRHp, double>((CTTRHp)(0),-1);
730  }
731 
732  bool found = false;
733  for ( MeasurementDet::RecHitContainer::const_iterator rh = recHits.begin(); rh != recHits.end(); rh++) {
734  if ( associated( *rh, sh)) {
735  found = true;
736  result = std::pair<CTTRHp, double>(*rh,theChi2->estimate( firstDetState, **rh).second);
737  edm::LogVerbatim("CkfDebugger") << "CkfDebugger: A RecHit associated to the correct Simhit exists at lpos "
738  << (**rh).localPosition()
739  << " gpos " << (**rh).globalPosition()
740  << " layer " << layer((**rh).det())
741  << " subdet " << (**rh).det()->geographicalId().subdetId()
742  << " Chi2 " << theChi2->estimate( firstDetState, **rh).second;
743  }
744  }
745  if (!found) {
746  edm::LogVerbatim("CkfDebugger") << "CkfDebugger: there is no RecHit associated to the correct SimHit." ;
747  edm::LogVerbatim("CkfDebugger") << " There are " << recHits.size() << " RecHits in the simHit DetUnit" ;
748  edm::LogVerbatim("CkfDebugger") << "SH GP=" << position(&sh) << " subdet=" << det(&sh)->geographicalId().subdetId()
749  << " layer=" << layer(det(&sh)) ;
750  int y=0;
751  for (MeasurementDet::RecHitContainer::const_iterator rh = recHits.begin(); rh != recHits.end(); rh++)
752  edm::LogVerbatim("CkfDebugger") << "RH#" << y++ << " GP=" << (**rh).globalPosition() << " subdet=" << (**rh).det()->geographicalId().subdetId()
753  << " layer=" << layer((**rh).det()) ;
754  for ( MeasurementDet::RecHitContainer::const_iterator rh = recHits.begin(); rh != recHits.end(); rh++) {
755  edm::LogVerbatim("CkfDebugger") << "Non-associated RecHit at pos " << (**rh).localPosition() ;
756  }
757  }
758 
759  bool found2 = false;
760  const PSimHit* sh2;
761  StripSubdetector subdet( det(&sh)->geographicalId());
762  if (!subdet.glued()) {
763  edm::LogVerbatim("CkfDebugger") << "The DetUnit is not part of a GluedDet" ;
764  if (found) {
765  if (result.second>30){
766  LogTrace("CkfDebugger") << "rh->parameters()=" << result.first->parameters() ;
767  LogTrace("CkfDebugger") << "rh->parametersError()=" << result.first->parametersError() ;
768  MeasurementExtractor me(firstDetState);
769  AlgebraicVector r(result.first->parameters() - me.measuredParameters(*result.first));
770  LogTrace("CkfDebugger") << "me.measuredParameters(**rh)=" << me.measuredParameters(*result.first) ;
771  LogTrace("CkfDebugger") << "me.measuredError(**rh)=" << me.measuredError(*result.first) ;
772  AlgebraicSymMatrix R(result.first->parametersError() + me.measuredError(*result.first));
773  LogTrace("CkfDebugger") << "r=" << r ;
774  LogTrace("CkfDebugger") << "R=" << R ;
775  int ierr;
776  R.invert(ierr);
777  LogTrace("CkfDebugger") << "R(-1)=" << R ;
778  LogTrace("CkfDebugger") << "chi2=" << R.similarity(r) ;
779  }
780  return result;
781  }
782  else {
784  return std::pair<CTTRHp, double>((CTTRHp)(0),-8);//not found (is not a glued det)
785  }
786  } else {
787  edm::LogVerbatim("CkfDebugger") << "The DetUnit is part of a GluedDet" ;
788  DetId partnerDetId = DetId( subdet.partnerDetId());
789 
790  sh2 = pSimHit( sh.trackId(), partnerDetId);
791  if (sh2 == 0) {
792  edm::LogVerbatim("CkfDebugger") << "Partner DetUnit does not have a SimHit from the same track" ;
793  if (found) {
794  //projected rec hit
795  TrackingRecHitProjector<ProjectedRecHit2D> proj;
796  DetId gid = gluedId( subdet);
797  const MeasurementDet* gluedDet = theMeasurementTracker->idToDet( gid);
798  TSOS gluedTSOS = theForwardPropagator->propagate(startingState, gluedDet->geomDet().surface());
799  CTTRHp projHit = proj.project( *result.first,gluedDet->geomDet(),gluedTSOS).get();
800  //LogTrace("CkfDebugger") << proj.project( *result.first,gluedDet->geomDet(),gluedTSOS)->parameters() ;
801  //LogTrace("CkfDebugger") << projHit->parametersError() ;
802  double chi2 = theChi2->estimate(gluedTSOS, *proj.project( *result.first,gluedDet->geomDet(),gluedTSOS)).second;
803  return std::pair<CTTRHp, double>(projHit,chi2);
804  }
805  }
806  else {
807  edm::LogVerbatim("CkfDebugger") << "Partner DetUnit has a good SimHit at gpos " << position(sh2)
808  << " lpos " << sh2->localPosition() ;
809  //}
810 
811  const MeasurementDet* partnerDet = theMeasurementTracker->idToDet( partnerDetId);
812  if (partnerDet == 0) {
813  edm::LogVerbatim("CkfDebugger") << "Partner measurementDet not found!!!" ;
815  return std::pair<CTTRHp, double>((CTTRHp)(0),-3);
816  }
817  TSOS simHitState2 = TSOSFromSimHitFactory()(*sh2, *det(sh2), *theMagField);
818  MeasurementDet::RecHitContainer recHits2 = partnerDet->recHits( simHitState2);
819 
820  TSOS secondDetState = theForwardPropagator->propagate( startingState, det(sh2)->surface());
821  if (!secondDetState.isValid()) {
822  edm::LogVerbatim("CkfDebugger") << "CkfDebugger: propagation failed from state " << startingState << " to second det surface "
823  << position(sh2) ;
824  propagation++;
825  return std::pair<CTTRHp, double>((CTTRHp)(0),-1);
826  }
827 
828  for ( MeasurementDet::RecHitContainer::const_iterator rh = recHits2.begin(); rh != recHits2.end(); rh++) {
829  if ( associated( *rh, *sh2)) {
830  found2 = true;
831  edm::LogVerbatim("CkfDebugger") << "CkfDebugger: A RecHit associated to the correct Simhit exists at lpos "
832  << (**rh).localPosition()
833  << " gpos " << (**rh).globalPosition()
834  << " Chi2 " << theChi2->estimate( secondDetState, **rh).second
835  ;
836  }
837  }
838  if (!found2) {
839  edm::LogVerbatim("CkfDebugger") << "CkfDebugger: there is no RecHit associated to the correct SimHit." ;
840  LogTrace("CkfDebugger") << " There are " << recHits.size() << " RecHits in the simHit DetUnit" ;
841  for ( MeasurementDet::RecHitContainer::const_iterator rh = recHits.begin(); rh != recHits.end(); rh++) {
842  LogTrace("CkfDebugger") << "Non-associated RecHit at pos " << (**rh).localPosition() ;
843  }
844  }
845  }
846  }
847 
849  if (found && found2) {
850  // look in the glued det
851  DetId gid = gluedId( subdet);
852  const MeasurementDet* gluedDet = theMeasurementTracker->idToDet( gid);
853  if ( gluedDet == 0) {
854  edm::LogVerbatim("CkfDebugger") << "CkfDebugger ERROR: glued MeasurementDet not found!" ;
856  return std::pair<CTTRHp, double>((CTTRHp)(0),-4);
857  }
858 
859  TSOS gluedDetState = theForwardPropagator->propagate( startingState, gluedDet->surface());
860  if (!gluedDetState.isValid()) {
861  edm::LogVerbatim("CkfDebugger") << "CkfDebugger: propagation failed from state " << startingState << " to det surface "
862  << gluedDet->position() ;
863  propagation++;
864  return std::pair<CTTRHp, double>((CTTRHp)(0),-1);
865  }
866 
867  gluedHits = gluedDet->recHits( gluedDetState);
868  edm::LogVerbatim("CkfDebugger") << "CkfDebugger: the GluedDet returned " << gluedHits.size() << " hits" ;
869  if (gluedHits.size()==0){
870  edm::LogVerbatim("CkfDebugger") << "Found and associated mono and stereo recHits but not matched!!!" ;
872  return std::pair<CTTRHp, double>((CTTRHp)(0),-5);
873  }
874  bool found3 = false;
875  for ( MeasurementDet::RecHitContainer::const_iterator rh = gluedHits.begin(); rh != gluedHits.end(); rh++) {
876  if ( associated( *rh, sh) && associated( *rh, *sh2)) {
877  double chi2 = theChi2->estimate(gluedDetState, **rh).second;
878  edm::LogVerbatim("CkfDebugger") << "Matched hit at lpos " << (**rh).localPosition()
879  << " gpos " << (**rh).globalPosition()
880  << " has Chi2 " << chi2
881  ;
882  result = std::pair<CTTRHp, double>(&**rh,chi2);
883  found3 = true;
884  if (chi2>30){
885  LogTrace("CkfDebugger") << "rh->parameters()=" << (*rh)->parameters() ;
886  LogTrace("CkfDebugger") << "rh->parametersError()=" << (*rh)->parametersError() ;
887  MeasurementExtractor me(gluedDetState);
888  AlgebraicVector r((*rh)->parameters() - me.measuredParameters(**rh));
889  LogTrace("CkfDebugger") << "me.measuredParameters(**rh)=" << me.measuredParameters(**rh) ;
890  LogTrace("CkfDebugger") << "me.measuredError(**rh)=" << me.measuredError(**rh) ;
891  AlgebraicSymMatrix R((*rh)->parametersError() + me.measuredError(**rh));
892  LogTrace("CkfDebugger") << "r=" << r ;
893  LogTrace("CkfDebugger") << "R=" << R ;
894  int ierr;
895  R.invert(ierr);
896  LogTrace("CkfDebugger") << "R(-1)=" << R ;
897  LogTrace("CkfDebugger") << "chi2=" << R.similarity(r) ;
898  }
899  break;
900  }
901  }
902  if (found3) return result;
903  else {
904  edm::LogVerbatim("CkfDebugger") << "Found and associated mono and stereo recHits. Matched found but not associated!!!" ;
906  return std::pair<CTTRHp, double>((CTTRHp)(0),-6);
907  }
908  }
909  else if ( (found && !found2) || (!found && found2) ) {
910  edm::LogVerbatim("CkfDebugger") << "Only one component is found" ;
912  return std::pair<CTTRHp, double>((CTTRHp)(0),-7);
913  }
914  else {
915  edm::LogVerbatim("CkfDebugger") << "No component is found" ;
916  no_component++;
917  return std::pair<CTTRHp, double>((CTTRHp)(0),-2);
918  }
919  other++;
920 #endif
921  return std::pair<CTTRHp, double>((CTTRHp)(nullptr), 0); //other
922 }
Log< level::Info, true > LogVerbatim
unsigned int detUnitId() const
Definition: PSimHit.h:97
virtual const GeomDet & geomDet() const
const MagneticField * theMagField
Definition: CkfDebugger.h:102
const MeasurementTrackerEvent * theMeasurementTracker
Definition: CkfDebugger.h:113
Global3DPoint position(const PSimHit *sh) const
Definition: CkfDebugger.h:156
int partner_det_not_fuond
Definition: CkfDebugger.h:259
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
const MeasurementEstimator * theChi2
Definition: CkfDebugger.h:104
int matched_not_found
Definition: CkfDebugger.h:257
#define LogTrace(id)
const GeomDetUnit * det(const PSimHit *sh) const
Definition: CkfDebugger.h:159
const Surface::PositionType & position() const
int matched_not_associated
Definition: CkfDebugger.h:258
int only_one_component
Definition: CkfDebugger.h:256
int glued_det_not_fuond
Definition: CkfDebugger.h:260
TransientTrackingRecHit::ConstRecHitPointer CTTRHp
Definition: CkfDebugger.h:44
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
unsigned int trackId() const
Definition: PSimHit.h:106
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const =0
bool associated(CTTRHp rechit, const PSimHit &sh) const
Definition: CkfDebugger.cc:646
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
virtual RecHitContainer recHits(const TrajectoryStateOnSurface &, const MeasurementTrackerEvent &) const =0
DetId gluedId(const DetId &du)
Definition: CkfDebugger.cc:36
const Propagator * theForwardPropagator
Definition: CkfDebugger.h:105
Definition: DetId.h:17
CLHEP::HepVector AlgebraicVector
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
int simple_hit_not_found
Definition: CkfDebugger.h:254
const Surface & surface() const
TrackingRecHit::ConstRecHitContainer RecHitContainer
CLHEP::HepSymMatrix AlgebraicSymMatrix
int no_component
Definition: CkfDebugger.h:255
const PSimHit * pSimHit(unsigned int tkId, DetId detId)
Definition: CkfDebugger.cc:924
int layer(const GeomDet *det)
Definition: CkfDebugger.h:161

◆ analyseRecHitNotFound()

int CkfDebugger::analyseRecHitNotFound ( const Trajectory traj,
CTTRHp  correctRecHit 
)
private

Definition at line 935 of file CkfDebugger.cc.

References GeometricSearchDet::compatibleDets(), det(), det_not_found, GeometricSearchTracker::detLayer(), Trajectory::direction(), dump6, GeomDet::geographicalId(), gluedId(), Trajectory::lastLayer(), Trajectory::lastMeasurement(), layer(), layer_not_found, LogTrace, NavigationSchool::nextLayers(), no_layer, no_sim_hit, DetId::rawId(), BarrelDetLayer::specificSurface(), theChi2, theForwardPropagator, theGeomSearchTracker, theNavSchool, and TrajectoryMeasurement::updatedState().

Referenced by analyseCompatibleMeasurements().

935  {
936  unsigned int correctDetId = correctRecHit->det()->geographicalId().rawId();
937  int correctLayId = layer(correctRecHit->det());
938  LogTrace("CkfDebugger") << "correct layer id=" << correctLayId;
939 
940  TSOS currentState(traj.lastMeasurement().updatedState());
941  std::vector<const DetLayer*> nl =
942  theNavSchool->nextLayers(*traj.lastLayer(), *currentState.freeState(), traj.direction());
943  if (nl.empty()) {
944  edm::LogVerbatim("CkfDebugger") << "no compatible layers";
945  no_layer++;
946  return 2;
947  }
948 
949  TkLayerLess lless; //FIXME - was lless(traj.direction())
950  const DetLayer* detLayer = nullptr;
951  bool navLayerAfter = false;
952  bool test = false;
953  for (std::vector<const DetLayer*>::iterator il = nl.begin(); il != nl.end(); il++) {
954  if (dynamic_cast<const BarrelDetLayer*>(*il)) {
955  const BarrelDetLayer* pbl = dynamic_cast<const BarrelDetLayer*>(*il);
956  LogTrace("CkfDebugger") << "pbl->specificSurface().bounds().length()="
957  << pbl->specificSurface().bounds().length();
958  LogTrace("CkfDebugger") << "pbl->specificSurface().bounds().width()=" << pbl->specificSurface().bounds().width();
959  }
960  int layId = layer(((*(*il)->basicComponents().begin())));
961  LogTrace("CkfDebugger") << " subdet=" << (*(*il)->basicComponents().begin())->geographicalId().subdetId()
962  << "layer id=" << layId;
963  if (layId == correctLayId) {
964  test = true;
965  detLayer = &**il;
966  break;
967  }
968  if (lless(*il, theGeomSearchTracker->detLayer(correctRecHit->det()->geographicalId())))
969  navLayerAfter = true; //it is enough that only one layer is after the correct one?
970  }
971 
972  if (test) {
973  edm::LogVerbatim("CkfDebugger") << "correct layer taken into account. layer id: " << correctLayId;
974  } else if (navLayerAfter) {
975  edm::LogVerbatim("CkfDebugger") << "SimHit layer after the layers returned by Navigation.";
976  edm::LogVerbatim("CkfDebugger") << "Probably a missing SimHit.";
977  edm::LogVerbatim("CkfDebugger") << "check: " << (correctRecHit->det()->geographicalId().subdetId()) << " "
978  << (layer(correctRecHit->det()));
979  dump6[pair<int, int>((correctRecHit->det()->geographicalId().subdetId() - 1), (layer(correctRecHit->det())) - 1)]++;
980  no_sim_hit++;
981  return 16;
982  } else {
983  edm::LogVerbatim("CkfDebugger") << "correct layer NOT taken into account. correct layer id: " << correctLayId;
984  layer_not_found++;
985  return 3;
986  }
987 
989  std::vector<DetWithState> compatDets = detLayer->compatibleDets(currentState, *theForwardPropagator, *theChi2);
990  // LogTrace("CkfDebugger") << "DEBUGGER" ;
991  // LogTrace("CkfDebugger") << "runned compatDets." ;
992  // LogTrace("CkfDebugger") << "started from the following TSOS:" ;
993  // LogTrace("CkfDebugger") << currentState ;
994  // LogTrace("CkfDebugger") << "number of dets found=" << compatDets.size() ;
995  // for (std::vector<DetWithState>::iterator det=compatDets.begin();det!=compatDets.end();det++){
996  // unsigned int detId = det->first->geographicalId().rawId();
997  // LogTrace("CkfDebugger") << "detId=" << detId ;
998  // }
999  bool test2 = false;
1000  for (std::vector<DetWithState>::iterator det = compatDets.begin(); det != compatDets.end(); det++) {
1001  unsigned int detId = det->first->geographicalId().rawId();
1002  // LogTrace("CkfDebugger") << "detId=" << detId
1003  // << "\ncorrectRecHit->det()->geographicalId().rawId()=" << correctRecHit->det()->geographicalId().rawId()
1004  // << "\ngluedId(correctRecHit->det()->geographicalId()).rawId()=" << gluedId(correctRecHit->det()->geographicalId()).rawId()
1005  // ;
1006  if (detId == gluedId(correctRecHit->det()->geographicalId()).rawId()) {
1007  test2 = true;
1008  break;
1009  }
1010  }
1011 
1012  if (test2) {
1013  edm::LogVerbatim("CkfDebugger") << "correct det taken into account. correctDetId is: " << correctDetId
1014  << ". please check chi2.";
1015  return 5;
1016  } else {
1017  edm::LogVerbatim("CkfDebugger") << "correct det NOT taken into account. correctDetId: " << correctDetId;
1018  det_not_found++;
1019  return 4;
1020  }
1021 }
Log< level::Info, true > LogVerbatim
virtual std::vector< DetWithState > compatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
const DetLayer * lastLayer() const
Redundant method, returns the layer of lastMeasurement() .
Definition: Trajectory.h:288
const DetLayer * detLayer(const DetId &id) const
obsolete method. Use idToLayer() instead.
std::map< std::pair< int, int >, int > dump6
Definition: CkfDebugger.h:214
const GeometricSearchTracker * theGeomSearchTracker
Definition: CkfDebugger.h:103
int det_not_found
Definition: CkfDebugger.h:249
TrajectoryMeasurement const & lastMeasurement() const
Definition: Trajectory.h:150
const MeasurementEstimator * theChi2
Definition: CkfDebugger.h:104
#define LogTrace(id)
const GeomDetUnit * det(const PSimHit *sh) const
Definition: CkfDebugger.h:159
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
PropagationDirection const & direction() const
Definition: Trajectory.cc:133
std::vector< const DetLayer * > nextLayers(const DetLayer &detLayer, Args &&... args) const
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
DetId gluedId(const DetId &du)
Definition: CkfDebugger.cc:36
const Propagator * theForwardPropagator
Definition: CkfDebugger.h:105
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
virtual const BoundCylinder & specificSurface() const final
Extension of the interface.
TrajectoryStateOnSurface const & updatedState() const
NavigationSchool const * theNavSchool
Definition: CkfDebugger.h:116
int layer_not_found
Definition: CkfDebugger.h:248
int layer(const GeomDet *det)
Definition: CkfDebugger.h:161
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState

◆ associated()

bool CkfDebugger::associated ( CTTRHp  rechit,
const PSimHit sh 
) const
private

Definition at line 646 of file CkfDebugger.cc.

References TrackerHitAssociator::associateHit(), MillePedeFileConverter_cfg::e, hitAssociator, LogTrace, PSimHit::pabs(), pSimHit(), and PSimHit::timeOfFlight().

Referenced by analyseRecHitExistance(), and correctMeas().

646  {
647  LogTrace("CkfDebugger") << "now in associated";
648 
649  if (!rechit->isValid())
650  return false;
651  // LogTrace("CkfDebugger") << "rec hit valid" ;
652  const std::vector<PSimHit>& pSimHitVec = hitAssociator->associateHit(*rechit->hit());
653  // LogTrace("CkfDebugger") << "size=" << pSimHitVec.size() ;
654  for (std::vector<PSimHit>::const_iterator shit = pSimHitVec.begin(); shit != pSimHitVec.end(); shit++) {
655  //const GeomDetUnit* detUnit = theTrackerGeom->idToDetUnit( DetId(shit->detUnitId()));
656  // LogTrace("CkfDebugger") << "pSimHit.timeOfFlight()=" << pSimHit.timeOfFlight()
657  // << " pSimHit.pabs()=" << pSimHit.pabs() << " GP=" << position(&pSimHit);
658  // LogTrace("CkfDebugger") << "(*shit).timeOfFlight()=" << (*shit).timeOfFlight()
659  // << " (*shit).pabs()=" << (*shit).pabs() << " GP=" << detUnit->toGlobal( shit->localPosition());
660  if ((fabs((*shit).timeOfFlight() - pSimHit.timeOfFlight()) < 1e-9) &&
661  (fabs((*shit).pabs() - pSimHit.pabs()) < 1e-9))
662  return true;
663  }
664  return false;
665 }
#define LogTrace(id)
std::vector< PSimHit > associateHit(const TrackingRecHit &thit) const
TrackerHitAssociator * hitAssociator
Definition: CkfDebugger.h:112
float pabs() const
fast and more accurate access to momentumAtEntry().mag()
Definition: PSimHit.h:67
float timeOfFlight() const
Definition: PSimHit.h:73
const PSimHit * pSimHit(unsigned int tkId, DetId detId)
Definition: CkfDebugger.cc:924

◆ assocTrackId()

int CkfDebugger::assocTrackId ( CTTRHp  rechit) const
private

Definition at line 546 of file CkfDebugger.cc.

References TrackerHitAssociator::associateHitId(), hitAssociator, and LogTrace.

Referenced by correctMeas().

546  {
547  LogTrace("CkfDebugger") << "now in assocTrackId";
548 
549  if (!rechit->hit()->isValid()) {
550  return -1;
551  }
552 
553  std::vector<SimHitIdpr> ids = hitAssociator->associateHitId(*rechit->hit());
554  if (!ids.empty()) {
555  return ids[0].first; //FIXME if size>1!!
556  } else {
557  return -1;
558  }
559 }
std::vector< SimHitIdpr > associateHitId(const TrackingRecHit &thit) const
#define LogTrace(id)
TrackerHitAssociator * hitAssociator
Definition: CkfDebugger.h:112

◆ computePulls() [1/2]

template<unsigned int D>
std::pair<double, double> CkfDebugger::computePulls ( CTTRHp  recHit,
TSOS  startingState 
)
inlineprivate

Definition at line 167 of file CkfDebugger.h.

References LogTrace, hlt_dqm_clientPB-live_cfg::me, Propagator::propagate(), dttmaxenums::R, alignCSCRings::r, rpcPointValidation_cfi::recHit, mathSSE::sqrt(), and theForwardPropagator.

Referenced by analyseCompatibleMeasurements().

167  {
168  typedef typename AlgebraicROOTObject<D>::Vector VecD;
169  typedef typename AlgebraicROOTObject<D, D>::SymMatrix SMatDD;
170  TSOS detState = theForwardPropagator->propagate(startingState, recHit->det()->surface());
171  LogTrace("CkfDebugger") << "parameters=" << recHit->parameters();
172  LogTrace("CkfDebugger") << "parametersError=" << recHit->parametersError();
173  MeasurementExtractor me(detState);
174  VecD r = asSVector<D>(recHit->parameters()) - me.measuredParameters<D>(*recHit);
175  LogTrace("CkfDebugger") << "me.measuredParameters=" << me.measuredParameters<D>(*recHit);
176  LogTrace("CkfDebugger") << "me.measuredError=" << me.measuredError<D>(*recHit);
177  SMatDD R = asSMatrix<D>(recHit->parametersError()) + me.measuredError<D>(*recHit);
178  LogTrace("CkfDebugger") << "r=" << r;
179  LogTrace("CkfDebugger") << "R=" << R;
180  R.Invert();
181  LogTrace("CkfDebugger") << "R(-1)=" << R;
182  LogTrace("CkfDebugger") << "chi2=" << ROOT::Math::Similarity(r, R);
183  double pullX = (-r[0]) * sqrt(R(0, 0));
184  double r_1 = 0;
185  if (VecD::Dim() >= 2) {
186  r_1 = r[1];
187  }
188  double pullY = (-r_1) * sqrt(R(1, 1));
189  LogTrace("CkfDebugger") << "pullX=" << pullX;
190  LogTrace("CkfDebugger") << "pullY=" << pullY;
191  return std::pair<double, double>(pullX, pullY);
192  }
ROOT::Math::SMatrix< double, D1, D1, ROOT::Math::MatRepSym< double, D1 > > SymMatrix
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
#define LogTrace(id)
T sqrt(T t)
Definition: SSEVec.h:19
const Propagator * theForwardPropagator
Definition: CkfDebugger.h:105
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:141
ROOT::Math::SVector< double, D1 > Vector

◆ computePulls() [2/2]

std::pair<double, double> CkfDebugger::computePulls ( CTTRHp  recHit,
TSOS  startingState 
)
inlineprivate

Definition at line 193 of file CkfDebugger.h.

References Exception, and rpcPointValidation_cfi::recHit.

193  {
194  switch (recHit->dimension()) {
195  case 1:
196  return computePulls<1>(recHit, startingState);
197  case 2:
198  return computePulls<2>(recHit, startingState);
199  case 3:
200  return computePulls<3>(recHit, startingState);
201  case 4:
202  return computePulls<4>(recHit, startingState);
203  case 5:
204  return computePulls<5>(recHit, startingState);
205  }
206  throw cms::Exception("CkfDebugger error: rechit of dimension not 1,2,3,4,5");
207  }

◆ correctMeas()

bool CkfDebugger::correctMeas ( const TM tm,
const PSimHit correctHit 
) const
private

Definition at line 667 of file CkfDebugger.cc.

References associated(), TrackerHitAssociator::associateHitId(), assocTrackId(), AlCaHLTBitMon_QueryRunRegistry::comp, hitAssociator, createfilelist::int, dqmiolumiharvest::j, LogTrace, rpcPointValidation_cfi::recHit, TrajectoryMeasurement::recHit(), and PSimHit::trackId().

Referenced by analyseCompatibleMeasurements().

667  {
668  LogTrace("CkfDebugger") << "now in correctMeas";
669  const CTTRHp& recHit = tm.recHit();
670  if (recHit->isValid())
671  LogTrace("CkfDebugger") << "hit at position:" << recHit->globalPosition();
673  if (comp.empty()) {
674  // LogTrace("CkfDebugger") << "comp.empty()==true" ;
675  return associated(recHit, *correctHit);
676  } else {
677  for (TransientTrackingRecHit::RecHitContainer::const_iterator ch = comp.begin(); ch != comp.end(); ++ch) {
678  if (associated(recHit, *correctHit)) {
679  // check if the other components are associated to the same trackId
680  for (TransientTrackingRecHit::RecHitContainer::const_iterator ch2 = comp.begin(); ch2 != comp.end(); ++ch2) {
681  if (ch2 == ch)
682  continue;
684  // LogTrace("CkfDebugger") << "correctHit->trackId()=" << correctHit->trackId() ;
685  bool test = true;
686  std::vector<SimHitIdpr> ids = hitAssociator->associateHitId(*(*ch2)->hit());
687  for (std::vector<SimHitIdpr>::iterator j = ids.begin(); j != ids.end(); j++) {
688  // LogTrace("CkfDebugger") << "j=" <<j->first;
689  if (correctHit->trackId() == j->first) {
690  test = false;
691  // LogTrace("CkfDebugger") << correctHit->trackId()<< " " <<j->first;
692  }
693  }
694  if (assocTrackId(*ch2) != ((int)(correctHit->trackId()))) {
695  LogTrace("CkfDebugger") << "returning false 1"; /*return false;*/
696  } //fixme
697  if (test) {
698  // LogTrace("CkfDebugger") << "returning false 2" ;
699  return false; // not all components from same simtrack
700  }
701  // if (assocTrackId( **ch2) != ((int)( correctHit->trackId())) ) {
702  // return false; // not all components from same simtrack
703  // }
704  }
705  return true; // if all components from same simtrack
706  }
707  }
708  return false;
709  }
710 }
std::vector< SimHitIdpr > associateHitId(const TrackingRecHit &thit) const
std::vector< ConstRecHitPointer > RecHitContainer
int assocTrackId(CTTRHp rechit) const
Definition: CkfDebugger.cc:546
#define LogTrace(id)
TrackerHitAssociator * hitAssociator
Definition: CkfDebugger.h:112
TransientTrackingRecHit::ConstRecHitPointer CTTRHp
Definition: CkfDebugger.h:44
unsigned int trackId() const
Definition: PSimHit.h:106
bool associated(CTTRHp rechit, const PSimHit &sh) const
Definition: CkfDebugger.cc:646

◆ correctTrajectory()

bool CkfDebugger::correctTrajectory ( const Trajectory traj,
unsigned int &  trajId 
) const
private

Definition at line 500 of file CkfDebugger.cc.

References TrackerHitAssociator::associateHit(), TrackerHitAssociator::associateHitId(), goodSimHit(), hitAssociator, hfClusterShapes_cfi::hits, mps_fire::i, dqmiolumiharvest::j, LogTrace, and Trajectory::recHits().

Referenced by analyseCompatibleMeasurements().

500  {
501  LogTrace("CkfDebugger") << "now in correctTrajectory";
503 
504  std::vector<SimHitIdpr> currentTrackId = hitAssociator->associateHitId(*hits.front()->hit());
505  if (currentTrackId.empty())
506  return false;
507 
508  for (Trajectory::RecHitContainer::const_iterator rh = hits.begin(); rh != hits.end(); ++rh) {
509  //if invalid hit exit
510  if (!(*rh)->hit()->isValid()) {
511  //LogTrace("CkfDebugger") << "invalid hit" ;
512  return false;
513  }
514 
515  //if hits from deltas exit
516  bool nogoodhit = true;
517  std::vector<PSimHit> assSimHits = hitAssociator->associateHit(*(*rh)->hit());
518  for (std::vector<PSimHit>::iterator shit = assSimHits.begin(); shit != assSimHits.end(); shit++) {
519  if (goodSimHit(*shit))
520  nogoodhit = false;
521  }
522  if (nogoodhit)
523  return false;
524 
525  //all hits must be associated to the same sim track
526  bool test = true;
527  std::vector<SimHitIdpr> nextTrackId = hitAssociator->associateHitId(*(*rh)->hit());
528  for (std::vector<SimHitIdpr>::iterator i = currentTrackId.begin(); i != currentTrackId.end(); i++) {
529  for (std::vector<SimHitIdpr>::iterator j = nextTrackId.begin(); j != nextTrackId.end(); j++) {
530  if (i->first == j->first)
531  test = false;
532  //LogTrace("CkfDebugger") << "valid " << *i << " " << *j ;
533  trajId = j->first;
534  }
535  }
536  if (test) { /*LogTrace("CkfDebugger") << "returning false" ;*/
537  return false;
538  }
539  // std::vector<PSimHit*> simTrackHits = idHitsMap[trajId];
540  // if (!goodSimHit(simTrackHits.))
541  }
542  //LogTrace("CkfDebugger") << "returning true" ;
543  return true;
544 }
std::vector< SimHitIdpr > associateHitId(const TrackingRecHit &thit) const
#define LogTrace(id)
std::vector< PSimHit > associateHit(const TrackingRecHit &thit) const
ConstRecHitContainer recHits() const
Definition: Trajectory.h:186
TrackerHitAssociator * hitAssociator
Definition: CkfDebugger.h:112
ConstRecHitContainer RecHitContainer
Definition: Trajectory.h:42
bool goodSimHit(const PSimHit &sh) const
Definition: CkfDebugger.cc:639

◆ countSeed()

void CkfDebugger::countSeed ( )
inline

Definition at line 58 of file CkfDebugger.h.

References totSeeds.

58 { totSeeds++; }

◆ deleteHitAssociator()

void CkfDebugger::deleteHitAssociator ( )
inline

Definition at line 72 of file CkfDebugger.h.

References hitAssociator.

72 { delete hitAssociator; }
TrackerHitAssociator * hitAssociator
Definition: CkfDebugger.h:112

◆ det()

const GeomDetUnit* CkfDebugger::det ( const PSimHit sh) const
inlineprivate

Definition at line 159 of file CkfDebugger.h.

References PSimHit::detUnitId(), TrackerGeometry::idToDetUnit(), and theTrackerGeom.

Referenced by analyseCompatibleMeasurements(), analyseRecHitExistance(), analyseRecHitNotFound(), layer(), and nextCorrectHits().

159 { return theTrackerGeom->idToDetUnit(DetId(sh->detUnitId())); };
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
unsigned int detUnitId() const
Definition: PSimHit.h:97
Definition: DetId.h:17
const TrackerGeometry * theTrackerGeom
Definition: CkfDebugger.h:101

◆ dumpSimHit()

void CkfDebugger::dumpSimHit ( const SimHit hit) const
private

Definition at line 189 of file CkfDebugger.cc.

Referenced by printSimHits().

189  {
190  GlobalPoint pos = hit.globalPosition();
191  edm::LogVerbatim("CkfDebugger") << "SimHit pos" << pos << " r=" << pos.perp() << " phi=" << pos.phi()
192  << " trackId=" << hit.trackId() << " particleType=" << hit.particleType()
193  << " pabs=" << hit.pabs() << " processType=" << hit.processType();
194 }
Log< level::Info, true > LogVerbatim

◆ fillSeedHist()

void CkfDebugger::fillSeedHist ( CTTRHp  h1,
CTTRHp  h2,
TrajectoryStateOnSurface  t 
)
inline

Definition at line 60 of file CkfDebugger.h.

References hchi2seedAll, submitPVValidationJobs::t, and testSeed().

Referenced by CkfDebugTrajectoryBuilder::fillSeedHistoDebugger().

60  {
61  //edm::LogVerbatim("CkfDebugger") << "CkfDebugger::fillSeedHist";
62  hchi2seedAll->Fill(testSeed(h1, h2, t));
63  }
double testSeed(CTTRHp, CTTRHp, TrajectoryStateOnSurface)
TH1F * hchi2seedAll
Definition: CkfDebugger.h:217

◆ goodSimHit()

bool CkfDebugger::goodSimHit ( const PSimHit sh) const
private

Definition at line 639 of file CkfDebugger.cc.

References PSimHit::pabs().

Referenced by correctTrajectory(), nextCorrectHits(), and pSimHit().

639  {
640  if (sh.pabs() > 0.9)
641  return true; // GeV, reject delta rays from association
642  else
643  return false;
644 }
float pabs() const
fast and more accurate access to momentumAtEntry().mag()
Definition: PSimHit.h:67

◆ hasDelta()

bool CkfDebugger::hasDelta ( const PSimHit correctHit)
inlineprivate

Definition at line 143 of file CkfDebugger.h.

References dumpMFGeometry_cfg::delta, PSimHit::detUnitId(), hitAssociator, and TrackerHitAssociator::SimHitMap.

Referenced by analyseCompatibleMeasurements(), and testSeed().

143  {
144  bool delta = false;
145  for (std::vector<PSimHit>::iterator isim = hitAssociator->SimHitMap[correctHit->detUnitId()].begin();
146  isim != hitAssociator->SimHitMap[correctHit->detUnitId()].end();
147  ++isim) {
148  /* edm::LogVerbatim("CkfDebugger") << "SimHit on this det at pos="<< position(&*isim) */
149  /* << " det=" << isim->detUnitId() << " process=" << isim->processType() ; */
150  if (isim->processType() == 9)
151  delta = true;
152  }
153  return delta;
154  }
unsigned int detUnitId() const
Definition: PSimHit.h:97
TrackerHitAssociator * hitAssociator
Definition: CkfDebugger.h:112

◆ layer()

int CkfDebugger::layer ( const GeomDet det)
inlineprivate

Definition at line 161 of file CkfDebugger.h.

References det(), GeomDet::geographicalId(), TrackerTopology::layer(), and theTopo.

Referenced by analyseCompatibleMeasurements(), analyseRecHitExistance(), analyseRecHitNotFound(), geometryXMLparser.DTAlignable::index(), geometryXMLparser.CSCAlignable::index(), and nextCorrectHits().

161  {
162  //return ((int)(((det->geographicalId().rawId() >>16) & 0xF)));
163  return theTopo->layer(det->geographicalId());
164  }
const TrackerTopology * theTopo
Definition: CkfDebugger.h:115
unsigned int layer(const DetId &id) const
const GeomDetUnit * det(const PSimHit *sh) const
Definition: CkfDebugger.h:159
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64

◆ nextCorrectHits()

vector< const PSimHit * > CkfDebugger::nextCorrectHits ( const Trajectory traj,
unsigned int &  trajId 
)
private

Definition at line 561 of file CkfDebugger.cc.

References TrackerHitAssociator::associateHit(), AlCaHLTBitMon_QueryRunRegistry::comp, det(), PSimHit::detUnitId(), GeomDet::geographicalId(), goodSimHit(), hitAssociator, idHitsMap, TrackerGeometry::idToDetUnit(), Trajectory::lastMeasurement(), layer(), LogTrace, position(), TrajectoryMeasurement::recHit(), mps_fire::result, DetId::subdetId(), theTrackerGeom, PSimHit::timeOfFlight(), and GeomDet::toGlobal().

Referenced by analyseCompatibleMeasurements().

561  {
562  std::vector<const PSimHit*> result;
563  // find the component of the RecHit at largest distance from origin (FIXME: should depend on propagation direction)
564  LogTrace("CkfDebugger") << "now in nextCorrectHits";
566  TransientTrackingRecHit::RecHitContainer comp = lastRecHit->transientHits();
567  if (!comp.empty()) {
568  float maxR = 0;
569  for (TransientTrackingRecHit::RecHitContainer::const_iterator ch = comp.begin(); ch != comp.end(); ++ch) {
570  if ((*ch)->globalPosition().mag() > maxR)
571  lastRecHit = *ch;
572  maxR = (*ch)->globalPosition().mag();
573  }
574  }
575  edm::LogVerbatim("CkfDebugger") << "CkfDebugger: lastRecHit is at gpos " << lastRecHit->globalPosition() << " layer "
576  << layer((lastRecHit->det())) << " subdet "
577  << lastRecHit->det()->geographicalId().subdetId();
578 
579  //find the simHits associated to the recHit
580  const std::vector<PSimHit>& pSimHitVec = hitAssociator->associateHit(*lastRecHit->hit());
581  for (std::vector<PSimHit>::const_iterator shit = pSimHitVec.begin(); shit != pSimHitVec.end(); shit++) {
582  const GeomDetUnit* detUnit = theTrackerGeom->idToDetUnit(DetId(shit->detUnitId()));
583  LogTrace("CkfDebugger") << "from hitAssociator SimHits are at GP=" << detUnit->toGlobal(shit->localPosition())
584  << " traId=" << shit->trackId() << " particleType " << shit->particleType()
585  << " pabs=" << shit->pabs() << " detUnitId=" << shit->detUnitId() << " layer "
586  << layer((det(&*shit))) << " subdet " << det(&*shit)->geographicalId().subdetId();
587  }
588 
589  //choose the simHit from the same track that has the highest tof
590  const PSimHit* lastPSH = nullptr;
591  if (!pSimHitVec.empty()) {
592  float maxTOF = 0;
593  for (std::vector<PSimHit>::const_iterator ch = pSimHitVec.begin(); ch != pSimHitVec.end(); ++ch) {
594  if ((ch->trackId() == trajId) && (ch->timeOfFlight() > maxTOF) && (goodSimHit(*ch))) {
595  lastPSH = &*ch;
596  maxTOF = lastPSH->timeOfFlight();
597  }
598  }
599  } else
600  return result; //return empty vector: no more hits on the sim track
601  if (lastPSH == nullptr)
602  return result; //return empty vector: no more good hits on the sim track
603  edm::LogVerbatim("CkfDebugger") << "CkfDebugger: corresponding SimHit is at gpos " << position(&*lastPSH);
604 
605  //take the simHits on the simTrack that are in the nextLayer (could be > 1 if overlap or matched)
606  std::vector<PSimHit*> trackHits = idHitsMap[trajId];
607  if (fabs((double)(trackHits.back()->detUnitId() - lastPSH->detUnitId())) < 1)
608  return result; //end of sim track
609  std::vector<PSimHit*>::iterator currentIt = trackHits.end();
610  for (std::vector<PSimHit*>::iterator it = trackHits.begin(); it != trackHits.end(); it++) {
611  if (goodSimHit(**it) && //good hit
612  (lastPSH->timeOfFlight() < (*it)->timeOfFlight()) && //greater tof
613  //( fabs((double)((*it)->detUnitId()-(lastPSH->detUnitId()) ))>1) && //not components of the same matched hit
614  ((det(lastPSH)->geographicalId().subdetId() != det(*it)->geographicalId().subdetId()) ||
615  (layer(det(lastPSH)) != layer(det(*it)))) //change layer or detector(tib,tob,...)
616  ) {
617  edm::LogVerbatim("CkfDebugger") << "Next good PSimHit is at gpos " << position(*it);
618  result.push_back(*it);
619  currentIt = it;
620  break;
621  }
622  }
623  bool samelayer = true;
624  if (currentIt != (trackHits.end() - 1) && currentIt != trackHits.end()) {
625  for (std::vector<PSimHit*>::iterator nextIt = currentIt; (samelayer && nextIt != trackHits.end()); nextIt++) {
626  if (goodSimHit(**nextIt)) {
627  if ((det(*nextIt)->geographicalId().subdetId() == det(*currentIt)->geographicalId().subdetId()) &&
628  (layer(det(*nextIt)) == layer(det(*currentIt)))) {
629  result.push_back(*nextIt);
630  } else
631  samelayer = false;
632  }
633  }
634  }
635 
636  return result;
637 }
Log< level::Info, true > LogVerbatim
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
unsigned int detUnitId() const
Definition: PSimHit.h:97
Global3DPoint position(const PSimHit *sh) const
Definition: CkfDebugger.h:156
std::vector< ConstRecHitPointer > RecHitContainer
TrajectoryMeasurement const & lastMeasurement() const
Definition: Trajectory.h:150
#define LogTrace(id)
const GeomDetUnit * det(const PSimHit *sh) const
Definition: CkfDebugger.h:159
std::vector< PSimHit > associateHit(const TrackingRecHit &thit) const
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
TrackerHitAssociator * hitAssociator
Definition: CkfDebugger.h:112
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
Definition: DetId.h:17
const TrackerGeometry * theTrackerGeom
Definition: CkfDebugger.h:101
bool goodSimHit(const PSimHit &sh) const
Definition: CkfDebugger.cc:639
float timeOfFlight() const
Definition: PSimHit.h:73
int layer(const GeomDet *det)
Definition: CkfDebugger.h:161
std::map< unsigned int, std::vector< PSimHit * > > idHitsMap
Definition: CkfDebugger.h:118
ConstRecHitPointer const & recHit() const

◆ position()

Global3DPoint CkfDebugger::position ( const PSimHit sh) const
inlineprivate

Definition at line 156 of file CkfDebugger.h.

References PSimHit::detUnitId(), TrackerGeometry::idToDetUnit(), PSimHit::localPosition(), theTrackerGeom, and GeomDet::toGlobal().

Referenced by analyseCompatibleMeasurements(), analyseRecHitExistance(), and nextCorrectHits().

156  {
158  };
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
unsigned int detUnitId() const
Definition: PSimHit.h:97
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
Definition: DetId.h:17
Local3DPoint localPosition() const
Definition: PSimHit.h:52
const TrackerGeometry * theTrackerGeom
Definition: CkfDebugger.h:101

◆ printSimHits()

void CkfDebugger::printSimHits ( const edm::Event iEvent)

Definition at line 165 of file CkfDebugger.cc.

References a, b, dumpSimHit(), hitAssociator, idHitsMap, TrackerGeometry::idToDetUnit(), iEvent, genParticles_cff::map, TrackerHitAssociator::SimHitMap, jetUpdater_cfi::sort, theTrackerGeom, and trackerHitAssociatorConfig_.

165  {
166  edm::LogVerbatim("CkfDebugger") << "\nEVENT #" << iEvent.id();
167 
169  iEvent, trackerHitAssociatorConfig_); //delete deleteHitAssociator() in TrackCandMaker.cc
170 
171  std::map<unsigned int, std::vector<PSimHit> >& theHitsMap = hitAssociator->SimHitMap;
172  idHitsMap.clear();
173 
174  for (std::map<unsigned int, std::vector<PSimHit> >::iterator it = theHitsMap.begin(); it != theHitsMap.end(); it++) {
175  for (std::vector<PSimHit>::iterator isim = it->second.begin(); isim != it->second.end(); ++isim) {
176  idHitsMap[isim->trackId()].push_back(&*isim);
177  }
178  }
179 
180  for (std::map<unsigned int, std::vector<PSimHit*> >::iterator it = idHitsMap.begin(); it != idHitsMap.end(); it++) {
181  sort(it->second.begin(), it->second.end(), [](auto* a, auto* b) { return a->timeOfFlight() < b->timeOfFlight(); });
182  for (std::vector<PSimHit*>::iterator isim = it->second.begin(); isim != it->second.end(); ++isim) {
183  const GeomDetUnit* detUnit = theTrackerGeom->idToDetUnit(DetId((*isim)->detUnitId()));
184  dumpSimHit(SimHit((*isim), detUnit));
185  }
186  }
187 }
Log< level::Info, true > LogVerbatim
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
TrackerHitAssociator::Config trackerHitAssociatorConfig_
Definition: CkfDebugger.h:111
void dumpSimHit(const SimHit &hit) const
Definition: CkfDebugger.cc:189
int iEvent
Definition: GenABIO.cc:224
TrackerHitAssociator * hitAssociator
Definition: CkfDebugger.h:112
Definition: DetId.h:17
double b
Definition: hdecay.h:118
const TrackerGeometry * theTrackerGeom
Definition: CkfDebugger.h:101
double a
Definition: hdecay.h:119
std::map< unsigned int, std::vector< PSimHit * > > idHitsMap
Definition: CkfDebugger.h:118

◆ pSimHit()

const PSimHit * CkfDebugger::pSimHit ( unsigned int  tkId,
DetId  detId 
)
private

Definition at line 924 of file CkfDebugger.cc.

References goodSimHit(), idHitsMap, and DetId::rawId().

Referenced by analyseRecHitExistance(), and associated().

924  {
925  for (std::vector<PSimHit*>::iterator shi = idHitsMap[tkId].begin(); shi != idHitsMap[tkId].end(); ++shi) {
926  if ((*shi)->detUnitId() == detId.rawId() &&
927  //(shi)->trackId() == tkId &&
928  goodSimHit(**shi)) {
929  return (*shi);
930  }
931  }
932  return nullptr;
933 }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
bool goodSimHit(const PSimHit &sh) const
Definition: CkfDebugger.cc:639
std::map< unsigned int, std::vector< PSimHit * > > idHitsMap
Definition: CkfDebugger.h:118

◆ setConditions()

void CkfDebugger::setConditions ( edm::EventSetup const &  es)

Definition at line 49 of file CkfDebugger.cc.

References chi2gt30, chi2gt30delta, chi2gt30deltaSeed, chi2ls30, det_not_found, dump, dump2, dump3, dump4, dump5, dump6, file, edm::EventSetup::getData(), glued_det_not_fuond, hchi2seedAll, hchi2seedProb, hPullGP_X_shst, hPullGP_Y_shst, hPullGP_Z_shst, hPullGPXvsGPeta_shst, hPullGPXvsGPphi_shst, hPullGPXvsGPr_shst, hPullGPXvsGPX_shst, hPullGPXvsGPY_shst, hPullGPXvsGPZ_shst, hPullM_shrh, hPullM_shst, hPullM_strh, hPullS_shrh, hPullS_shst, hPullS_strh, hPullX_shrh, hPullX_shst, hPullX_strh, hPullY_shrh, hPullY_shst, hPullY_strh, mps_fire::i, dqmiolumiharvest::j, layer_not_found, matched_not_associated, matched_not_found, no_component, no_layer, no_sim_hit, only_one_component, other, partner_det_not_fuond, problems, propagation, seedWithDelta, simple_hit_not_found, theFieldToken, theMagField, theNavSchool, theNavToken, theTopo, theTopoHandToken, theTrackerGeom, theTrackerToken, runGCPTkAlMap::title, and totchi2gt30.

49  {
50  file = new TFile("out.root", "recreate");
51  hchi2seedAll = new TH1F("hchi2seedAll", "hchi2seedAll", 2000, 0, 200);
52  hchi2seedProb = new TH1F("hchi2seedProb", "hchi2seedProb", 2000, 0, 200);
53 
54  theTrackerGeom = &es.getData(theTrackerToken);
55 
56  theMagField = &es.getData(theFieldToken);
57 
58  //Retrieve tracker topology from geometry
59  theTopo = &es.getData(theTopoHandToken);
60 
61  theNavSchool = &es.getData(theNavToken);
62 
63  for (int i = 0; i != 17; i++) {
64  dump.push_back(0);
65  }
66 
67  std::stringstream title;
68  for (int i = 0; i != 6; i++)
69  for (int j = 0; j != 9; j++) {
70  if (i == 0 && j > 2)
71  break;
72  if (i == 1 && j > 1)
73  break;
74  if (i == 2 && j > 3)
75  break;
76  if (i == 3 && j > 2)
77  break;
78  if (i == 4 && j > 5)
79  break;
80  if (i == 5 && j > 8)
81  break;
82  dump2[pair<int, int>(i, j)] = 0;
83  dump3[pair<int, int>(i, j)] = 0;
84  dump4[pair<int, int>(i, j)] = 0;
85  dump5[pair<int, int>(i, j)] = 0;
86  dump6[pair<int, int>(i, j)] = 0;
87  title.str("");
88  title << "pullX_" << i + 1 << "-" << j + 1 << "_sh-rh";
89  hPullX_shrh[title.str()] = new TH1F(title.str().c_str(), title.str().c_str(), 1000, -50, 50);
90  title.str("");
91  title << "pullY_" << i + 1 << "-" << j + 1 << "_sh-rh";
92  hPullY_shrh[title.str()] = new TH1F(title.str().c_str(), title.str().c_str(), 1000, -50, 50);
93  title.str("");
94  title << "pullX_" << i + 1 << "-" << j + 1 << "_sh-st";
95  hPullX_shst[title.str()] = new TH1F(title.str().c_str(), title.str().c_str(), 1000, -50, 50);
96  title.str("");
97  title << "pullY_" << i + 1 << "-" << j + 1 << "_sh-st";
98  hPullY_shst[title.str()] = new TH1F(title.str().c_str(), title.str().c_str(), 1000, -50, 50);
99  title.str("");
100  title << "pullX_" << i + 1 << "-" << j + 1 << "_st-rh";
101  hPullX_strh[title.str()] = new TH1F(title.str().c_str(), title.str().c_str(), 1000, -50, 50);
102  title.str("");
103  title << "pullY_" << i + 1 << "-" << j + 1 << "_st-rh";
104  hPullY_strh[title.str()] = new TH1F(title.str().c_str(), title.str().c_str(), 1000, -50, 50);
105  title.str("");
106  title << "PullGP_X_" << i + 1 << "-" << j + 1 << "_sh-st";
107  hPullGP_X_shst[title.str()] = new TH1F(title.str().c_str(), title.str().c_str(), 1000, -50, 50);
108  title.str("");
109  title << "PullGP_Y_" << i + 1 << "-" << j + 1 << "_sh-st";
110  hPullGP_Y_shst[title.str()] = new TH1F(title.str().c_str(), title.str().c_str(), 1000, -50, 50);
111  title.str("");
112  title << "PullGP_Z_" << i + 1 << "-" << j + 1 << "_sh-st";
113  hPullGP_Z_shst[title.str()] = new TH1F(title.str().c_str(), title.str().c_str(), 1000, -50, 50);
114  if (((i == 2 || i == 4) && (j == 0 || j == 1)) || (i == 3 || i == 5)) {
115  title.str("");
116  title << "pullM_" << i + 1 << "-" << j + 1 << "_sh-rh";
117  hPullM_shrh[title.str()] = new TH1F(title.str().c_str(), title.str().c_str(), 1000, -50, 50);
118  title.str("");
119  title << "pullS_" << i + 1 << "-" << j + 1 << "_sh-rh";
120  hPullS_shrh[title.str()] = new TH1F(title.str().c_str(), title.str().c_str(), 1000, -50, 50);
121  title.str("");
122  title << "pullM_" << i + 1 << "-" << j + 1 << "_sh-st";
123  hPullM_shst[title.str()] = new TH1F(title.str().c_str(), title.str().c_str(), 1000, -50, 50);
124  title.str("");
125  title << "pullS_" << i + 1 << "-" << j + 1 << "_sh-st";
126  hPullS_shst[title.str()] = new TH1F(title.str().c_str(), title.str().c_str(), 1000, -50, 50);
127  title.str("");
128  title << "pullM_" << i + 1 << "-" << j + 1 << "_st-rh";
129  hPullM_strh[title.str()] = new TH1F(title.str().c_str(), title.str().c_str(), 1000, -50, 50);
130  title.str("");
131  title << "pullS_" << i + 1 << "-" << j + 1 << "_st-rh";
132  hPullS_strh[title.str()] = new TH1F(title.str().c_str(), title.str().c_str(), 1000, -50, 50);
133  }
134  }
135 
136  hPullGPXvsGPX_shst = new TH2F("PullGPXvsGPX_shst", "PullGPXvsGPX_shst", 1000, -50, 50, 100, -50, 50);
137  hPullGPXvsGPY_shst = new TH2F("PullGPXvsGPY_shst", "PullGPXvsGPY_shst", 1000, -50, 50, 100, -50, 50);
138  hPullGPXvsGPZ_shst = new TH2F("PullGPXvsGPZ_shst", "PullGPXvsGPZ_shst", 1000, -50, 50, 200, -100, 100);
139  hPullGPXvsGPr_shst = new TH2F("PullGPXvsGPr_shst", "PullGPXvsGPr_shst", 1000, -50, 50, 300, -150, 150);
140  hPullGPXvsGPeta_shst = new TH2F("PullGPXvsGPeta_shst", "PullGPXvsGPeta_shst", 1000, -50, 50, 50, -2.5, 2.5);
141  hPullGPXvsGPphi_shst = new TH2F("PullGPXvsGPphi_shst", "PullGPXvsGPphi_shst", 1000, -50, 50, 63, 0, 6.3);
142 
143  seedWithDelta = 0;
144  problems = 0;
145  no_sim_hit = 0;
146  no_layer = 0;
147  layer_not_found = 0;
148  det_not_found = 0;
149  chi2gt30 = 0;
150  chi2gt30delta = 0;
151  chi2gt30deltaSeed = 0;
152  chi2ls30 = 0;
154  no_component = 0;
155  only_one_component = 0;
156  matched_not_found = 0;
160  propagation = 0;
161  other = 0;
162  totchi2gt30 = 0;
163 }
std::map< std::string, TH1F * > hPullM_shst
Definition: CkfDebugger.h:228
const TrackerTopology * theTopo
Definition: CkfDebugger.h:115
std::map< std::string, TH1F * > hPullS_strh
Definition: CkfDebugger.h:231
std::map< std::string, TH1F * > hPullX_shrh
Definition: CkfDebugger.h:219
TH2F * hPullGPXvsGPeta_shst
Definition: CkfDebugger.h:241
const MagneticField * theMagField
Definition: CkfDebugger.h:102
std::map< std::pair< int, int >, int > dump6
Definition: CkfDebugger.h:214
std::map< std::pair< int, int >, int > dump3
Definition: CkfDebugger.h:211
int partner_det_not_fuond
Definition: CkfDebugger.h:259
int det_not_found
Definition: CkfDebugger.h:249
std::map< std::pair< int, int >, int > dump2
Definition: CkfDebugger.h:210
int seedWithDelta
Definition: CkfDebugger.h:244
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > theFieldToken
Definition: CkfDebugger.h:107
int matched_not_found
Definition: CkfDebugger.h:257
std::map< std::pair< int, int >, int > dump4
Definition: CkfDebugger.h:212
int matched_not_associated
Definition: CkfDebugger.h:258
std::map< std::string, TH1F * > hPullS_shrh
Definition: CkfDebugger.h:227
int only_one_component
Definition: CkfDebugger.h:256
edm::ESGetToken< NavigationSchool, NavigationSchoolRecord > theNavToken
Definition: CkfDebugger.h:109
TH2F * hPullGPXvsGPr_shst
Definition: CkfDebugger.h:240
int glued_det_not_fuond
Definition: CkfDebugger.h:260
TH1F * hchi2seedAll
Definition: CkfDebugger.h:217
TH2F * hPullGPXvsGPY_shst
Definition: CkfDebugger.h:238
std::map< std::string, TH1F * > hPullY_shrh
Definition: CkfDebugger.h:220
int chi2gt30deltaSeed
Definition: CkfDebugger.h:252
std::map< std::string, TH1F * > hPullX_shst
Definition: CkfDebugger.h:221
int simple_hit_not_found
Definition: CkfDebugger.h:254
std::map< std::string, TH1F * > hPullGP_Y_shst
Definition: CkfDebugger.h:234
TFile * file
Definition: CkfDebugger.h:216
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > theTrackerToken
Definition: CkfDebugger.h:106
const TrackerGeometry * theTrackerGeom
Definition: CkfDebugger.h:101
std::map< std::string, TH1F * > hPullM_shrh
Definition: CkfDebugger.h:226
NavigationSchool const * theNavSchool
Definition: CkfDebugger.h:116
std::map< std::pair< int, int >, int > dump5
Definition: CkfDebugger.h:213
TH2F * hPullGPXvsGPX_shst
Definition: CkfDebugger.h:237
std::map< std::string, TH1F * > hPullGP_Z_shst
Definition: CkfDebugger.h:235
std::map< std::string, TH1F * > hPullX_strh
Definition: CkfDebugger.h:223
edm::ESGetToken< TrackerTopology, IdealGeometryRecord > theTopoHandToken
Definition: CkfDebugger.h:108
int layer_not_found
Definition: CkfDebugger.h:248
int no_component
Definition: CkfDebugger.h:255
TH2F * hPullGPXvsGPZ_shst
Definition: CkfDebugger.h:239
std::vector< int > dump
Definition: CkfDebugger.h:209
std::map< std::string, TH1F * > hPullS_shst
Definition: CkfDebugger.h:229
std::map< std::string, TH1F * > hPullY_shst
Definition: CkfDebugger.h:222
std::map< std::string, TH1F * > hPullM_strh
Definition: CkfDebugger.h:230
TH1F * hchi2seedProb
Definition: CkfDebugger.h:217
std::map< std::string, TH1F * > hPullY_strh
Definition: CkfDebugger.h:224
TH2F * hPullGPXvsGPphi_shst
Definition: CkfDebugger.h:242
int chi2gt30delta
Definition: CkfDebugger.h:251
std::map< std::string, TH1F * > hPullGP_X_shst
Definition: CkfDebugger.h:233

◆ testSeed()

double CkfDebugger::testSeed ( CTTRHp  recHit1,
CTTRHp  recHit2,
TrajectoryStateOnSurface  state 
)
private

Definition at line 1023 of file CkfDebugger.cc.

References TrackerHitAssociator::associateHit(), hltPixelTracks_cff::chi2, hasDelta(), hitAssociator, LogTrace, dttmaxenums::R, rpcPointValidation_cfi::simHit, and findQualityFiles::v.

Referenced by analyseCompatibleMeasurements(), and fillSeedHist().

1023  {
1024  //edm::LogVerbatim("CkfDebugger") << "CkfDebugger::testSeed";
1025  //test Deltas
1026  const std::vector<PSimHit>& pSimHitVec1 = hitAssociator->associateHit(*recHit1->hit());
1027  const std::vector<PSimHit>& pSimHitVec2 = hitAssociator->associateHit(*recHit2->hit());
1028 
1029  if (pSimHitVec1.empty() || pSimHitVec2.empty() || hasDelta(&(*pSimHitVec1.begin())) ||
1030  hasDelta(&(*pSimHitVec2.begin()))) {
1031  edm::LogVerbatim("CkfDebugger") << "Seed has delta or problems";
1032  return -1;
1033  }
1034 
1035  // LogTrace("CkfDebugger") << "state=\n" << state ;
1036  // double stlp1 = state.localParameters().vector()[0];
1037  // double stlp2 = state.localParameters().vector()[1];
1038  // double stlp3 = state.localParameters().vector()[2];
1039  // double stlp4 = state.localParameters().vector()[3];
1040  // double stlp5 = state.localParameters().vector()[4];
1041 
1042  if (!pSimHitVec2.empty()) {
1043  const PSimHit& simHit = *pSimHitVec2.begin();
1044 
1045  double shlp1 = -1 / simHit.momentumAtEntry().mag();
1046  double shlp2 = simHit.momentumAtEntry().x() / simHit.momentumAtEntry().z();
1047  double shlp3 = simHit.momentumAtEntry().y() / simHit.momentumAtEntry().z();
1048  double shlp4 = simHit.localPosition().x();
1049  double shlp5 = simHit.localPosition().y();
1051  v[0] = shlp1;
1052  v[1] = shlp2;
1053  v[2] = shlp3;
1054  v[3] = shlp4;
1055  v[4] = shlp5;
1056 
1057  // LogTrace("CkfDebugger") << "simHit.localPosition()=" << simHit.localPosition() ;
1058  // LogTrace("CkfDebugger") << "simHit.momentumAtEntry()=" << simHit.momentumAtEntry() ;
1059  // LogTrace("CkfDebugger") << "recHit2->localPosition()=" << recHit2->localPosition() ;
1060  // LogTrace("CkfDebugger") << "recHit2->localPositionError()=" << recHit2->localPositionError() ;
1061  // LogTrace("CkfDebugger") << "state.localPosition()=" << state.localPosition() ;
1062  // LogTrace("CkfDebugger") << "state.localError().positionError()=" << state.localError().positionError() ;
1063 
1064  // LogTrace("CkfDebugger") << "pullx(sh-rh)=" << (simHit.localPosition().x()-recHit2->localPosition().x())/sqrt(recHit2->localPositionError().xx()) ;
1065  // LogTrace("CkfDebugger") << "pullx(sh-st)=" << (simHit.localPosition().x()-state.localPosition().x())/sqrt(state.localError().positionError().xx()) ;
1066  // LogTrace("CkfDebugger") << "pullx(st-rh)=" << (state.localPosition().x()-recHit2->localPosition().x())/
1067  // sqrt(recHit2->localPositionError().xx()+state.localError().positionError().xx()) ;
1068 
1069  // LogTrace("CkfDebugger") << "local parameters" ;
1070  // LogTrace("CkfDebugger") << left;
1071  // LogTrace("CkfDebugger") << setw(15) << stlp1 << setw(15) << shlp1 << setw(15) << sqrt(state.localError().matrix()[0][0])
1072  // << setw(15) << (stlp1-shlp1)/stlp1 << setw(15) << (stlp1-shlp1)/sqrt(state.localError().matrix()[0][0]) ;
1073  // LogTrace("CkfDebugger") << setw(15) << stlp2 << setw(15) << shlp2 << setw(15) << sqrt(state.localError().matrix()[1][1])
1074  // << setw(15) << (stlp2-shlp2)/stlp2 << setw(15) << (stlp2-shlp2)/sqrt(state.localError().matrix()[1][1]) ;
1075  // LogTrace("CkfDebugger") << setw(15) << stlp3 << setw(15) << shlp3 << setw(15) << sqrt(state.localError().matrix()[2][2])
1076  // << setw(15) << (stlp3-shlp3)/stlp3 << setw(15) << (stlp3-shlp3)/sqrt(state.localError().matrix()[2][2]) ;
1077  // LogTrace("CkfDebugger") << setw(15) << stlp4 << setw(15) << shlp4 << setw(15) << sqrt(state.localError().matrix()[3][3])
1078  // << setw(15) << (stlp4-shlp4)/stlp4 << setw(15) << (stlp4-shlp4)/sqrt(state.localError().matrix()[3][3]) ;
1079  // LogTrace("CkfDebugger") << setw(15) << stlp5 << setw(15) << shlp5 << setw(15) << sqrt(state.localError().matrix()[4][4]) <<
1080  // setw(15) << (stlp5-shlp5)/stlp5 << setw(15) << (stlp5-shlp5)/sqrt(state.localError().matrix()[4][4]) ;
1081 
1082  AlgebraicSymMatrix55 R = state.localError().matrix();
1083  R.Invert();
1084  double chi2 = ROOT::Math::Similarity(v - state.localParameters().vector(), R);
1085  LogTrace("CkfDebugger") << "chi2=" << chi2;
1086  return chi2;
1087  }
1088 
1089  return 0; //fixme
1090 }
Log< level::Info, true > LogVerbatim
bool hasDelta(const PSimHit *correctHit)
Definition: CkfDebugger.h:143
#define LogTrace(id)
std::vector< PSimHit > associateHit(const TrackingRecHit &thit) const
ROOT::Math::SVector< double, 5 > AlgebraicVector5
TrackerHitAssociator * hitAssociator
Definition: CkfDebugger.h:112
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55

Member Data Documentation

◆ chi2gt30

int CkfDebugger::chi2gt30
private

Definition at line 250 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), setConditions(), and ~CkfDebugger().

◆ chi2gt30delta

int CkfDebugger::chi2gt30delta
private

Definition at line 251 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), setConditions(), and ~CkfDebugger().

◆ chi2gt30deltaSeed

int CkfDebugger::chi2gt30deltaSeed
private

Definition at line 252 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), setConditions(), and ~CkfDebugger().

◆ chi2ls30

int CkfDebugger::chi2ls30
private

Definition at line 253 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), setConditions(), and ~CkfDebugger().

◆ det_not_found

int CkfDebugger::det_not_found
private

Definition at line 249 of file CkfDebugger.h.

Referenced by analyseRecHitNotFound(), setConditions(), and ~CkfDebugger().

◆ dump

std::vector<int> CkfDebugger::dump
private

Definition at line 209 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), setConditions(), and ~CkfDebugger().

◆ dump2

std::map<std::pair<int, int>, int> CkfDebugger::dump2
private

Definition at line 210 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), setConditions(), and ~CkfDebugger().

◆ dump3

std::map<std::pair<int, int>, int> CkfDebugger::dump3
private

Definition at line 211 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), setConditions(), and ~CkfDebugger().

◆ dump4

std::map<std::pair<int, int>, int> CkfDebugger::dump4
private

Definition at line 212 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), setConditions(), and ~CkfDebugger().

◆ dump5

std::map<std::pair<int, int>, int> CkfDebugger::dump5
private

Definition at line 213 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), setConditions(), and ~CkfDebugger().

◆ dump6

std::map<std::pair<int, int>, int> CkfDebugger::dump6
private

Definition at line 214 of file CkfDebugger.h.

Referenced by analyseRecHitNotFound(), setConditions(), and ~CkfDebugger().

◆ file

TFile* CkfDebugger::file
private

Definition at line 216 of file CkfDebugger.h.

Referenced by setConditions(), and ~CkfDebugger().

◆ glued_det_not_fuond

int CkfDebugger::glued_det_not_fuond
private

Definition at line 260 of file CkfDebugger.h.

Referenced by analyseRecHitExistance(), setConditions(), and ~CkfDebugger().

◆ hchi2seedAll

TH1F* CkfDebugger::hchi2seedAll
private

Definition at line 217 of file CkfDebugger.h.

Referenced by fillSeedHist(), setConditions(), and ~CkfDebugger().

◆ hchi2seedProb

TH1F * CkfDebugger::hchi2seedProb
private

Definition at line 217 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), setConditions(), and ~CkfDebugger().

◆ hitAssociator

TrackerHitAssociator* CkfDebugger::hitAssociator
private

◆ hPullGP_X_shst

std::map<std::string, TH1F*> CkfDebugger::hPullGP_X_shst
private

Definition at line 233 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), setConditions(), and ~CkfDebugger().

◆ hPullGP_Y_shst

std::map<std::string, TH1F*> CkfDebugger::hPullGP_Y_shst
private

Definition at line 234 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), setConditions(), and ~CkfDebugger().

◆ hPullGP_Z_shst

std::map<std::string, TH1F*> CkfDebugger::hPullGP_Z_shst
private

Definition at line 235 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), setConditions(), and ~CkfDebugger().

◆ hPullGPXvsGPeta_shst

TH2F* CkfDebugger::hPullGPXvsGPeta_shst
private

Definition at line 241 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), setConditions(), and ~CkfDebugger().

◆ hPullGPXvsGPphi_shst

TH2F* CkfDebugger::hPullGPXvsGPphi_shst
private

Definition at line 242 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), setConditions(), and ~CkfDebugger().

◆ hPullGPXvsGPr_shst

TH2F* CkfDebugger::hPullGPXvsGPr_shst
private

Definition at line 240 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), setConditions(), and ~CkfDebugger().

◆ hPullGPXvsGPX_shst

TH2F* CkfDebugger::hPullGPXvsGPX_shst
private

Definition at line 237 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), setConditions(), and ~CkfDebugger().

◆ hPullGPXvsGPY_shst

TH2F* CkfDebugger::hPullGPXvsGPY_shst
private

Definition at line 238 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), setConditions(), and ~CkfDebugger().

◆ hPullGPXvsGPZ_shst

TH2F* CkfDebugger::hPullGPXvsGPZ_shst
private

Definition at line 239 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), setConditions(), and ~CkfDebugger().

◆ hPullM_shrh

std::map<std::string, TH1F*> CkfDebugger::hPullM_shrh
private

Definition at line 226 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), setConditions(), and ~CkfDebugger().

◆ hPullM_shst

std::map<std::string, TH1F*> CkfDebugger::hPullM_shst
private

Definition at line 228 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), setConditions(), and ~CkfDebugger().

◆ hPullM_strh

std::map<std::string, TH1F*> CkfDebugger::hPullM_strh
private

Definition at line 230 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), setConditions(), and ~CkfDebugger().

◆ hPullS_shrh

std::map<std::string, TH1F*> CkfDebugger::hPullS_shrh
private

Definition at line 227 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), setConditions(), and ~CkfDebugger().

◆ hPullS_shst

std::map<std::string, TH1F*> CkfDebugger::hPullS_shst
private

Definition at line 229 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), setConditions(), and ~CkfDebugger().

◆ hPullS_strh

std::map<std::string, TH1F*> CkfDebugger::hPullS_strh
private

Definition at line 231 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), setConditions(), and ~CkfDebugger().

◆ hPullX_shrh

std::map<std::string, TH1F*> CkfDebugger::hPullX_shrh
private

Definition at line 219 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), setConditions(), and ~CkfDebugger().

◆ hPullX_shst

std::map<std::string, TH1F*> CkfDebugger::hPullX_shst
private

Definition at line 221 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), setConditions(), and ~CkfDebugger().

◆ hPullX_strh

std::map<std::string, TH1F*> CkfDebugger::hPullX_strh
private

Definition at line 223 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), setConditions(), and ~CkfDebugger().

◆ hPullY_shrh

std::map<std::string, TH1F*> CkfDebugger::hPullY_shrh
private

Definition at line 220 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), setConditions(), and ~CkfDebugger().

◆ hPullY_shst

std::map<std::string, TH1F*> CkfDebugger::hPullY_shst
private

Definition at line 222 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), setConditions(), and ~CkfDebugger().

◆ hPullY_strh

std::map<std::string, TH1F*> CkfDebugger::hPullY_strh
private

Definition at line 224 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), setConditions(), and ~CkfDebugger().

◆ idHitsMap

std::map<unsigned int, std::vector<PSimHit*> > CkfDebugger::idHitsMap
private

Definition at line 118 of file CkfDebugger.h.

Referenced by nextCorrectHits(), printSimHits(), and pSimHit().

◆ layer_not_found

int CkfDebugger::layer_not_found
private

Definition at line 248 of file CkfDebugger.h.

Referenced by analyseRecHitNotFound(), setConditions(), and ~CkfDebugger().

◆ matched_not_associated

int CkfDebugger::matched_not_associated
private

Definition at line 258 of file CkfDebugger.h.

Referenced by analyseRecHitExistance(), setConditions(), and ~CkfDebugger().

◆ matched_not_found

int CkfDebugger::matched_not_found
private

Definition at line 257 of file CkfDebugger.h.

Referenced by analyseRecHitExistance(), setConditions(), and ~CkfDebugger().

◆ no_component

int CkfDebugger::no_component
private

Definition at line 255 of file CkfDebugger.h.

Referenced by analyseRecHitExistance(), setConditions(), and ~CkfDebugger().

◆ no_layer

int CkfDebugger::no_layer
private

Definition at line 247 of file CkfDebugger.h.

Referenced by analyseRecHitNotFound(), setConditions(), and ~CkfDebugger().

◆ no_sim_hit

int CkfDebugger::no_sim_hit
private

Definition at line 246 of file CkfDebugger.h.

Referenced by analyseRecHitNotFound(), setConditions(), and ~CkfDebugger().

◆ only_one_component

int CkfDebugger::only_one_component
private

Definition at line 256 of file CkfDebugger.h.

Referenced by analyseRecHitExistance(), setConditions(), and ~CkfDebugger().

◆ other

int CkfDebugger::other
private

◆ partner_det_not_fuond

int CkfDebugger::partner_det_not_fuond
private

Definition at line 259 of file CkfDebugger.h.

Referenced by analyseRecHitExistance(), setConditions(), and ~CkfDebugger().

◆ problems

int CkfDebugger::problems
private

Definition at line 245 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), setConditions(), and ~CkfDebugger().

◆ propagation

int CkfDebugger::propagation
private

Definition at line 261 of file CkfDebugger.h.

Referenced by analyseRecHitExistance(), setConditions(), and ~CkfDebugger().

◆ seedWithDelta

int CkfDebugger::seedWithDelta
private

Definition at line 244 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), setConditions(), and ~CkfDebugger().

◆ simple_hit_not_found

int CkfDebugger::simple_hit_not_found
private

Definition at line 254 of file CkfDebugger.h.

Referenced by analyseRecHitExistance(), setConditions(), and ~CkfDebugger().

◆ theChi2

const MeasurementEstimator* CkfDebugger::theChi2
private

◆ theFieldToken

edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> CkfDebugger::theFieldToken
private

Definition at line 107 of file CkfDebugger.h.

Referenced by setConditions().

◆ theForwardPropagator

const Propagator* CkfDebugger::theForwardPropagator
private

◆ theGeomSearchTracker

const GeometricSearchTracker* CkfDebugger::theGeomSearchTracker
private

Definition at line 103 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), and analyseRecHitNotFound().

◆ theMagField

const MagneticField* CkfDebugger::theMagField
private

Definition at line 102 of file CkfDebugger.h.

Referenced by analyseRecHitExistance(), and setConditions().

◆ theMeasurementTracker

const MeasurementTrackerEvent* CkfDebugger::theMeasurementTracker
private

Definition at line 113 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), and analyseRecHitExistance().

◆ theNavSchool

NavigationSchool const* CkfDebugger::theNavSchool
private

Definition at line 116 of file CkfDebugger.h.

Referenced by analyseRecHitNotFound(), and setConditions().

◆ theNavToken

edm::ESGetToken<NavigationSchool, NavigationSchoolRecord> CkfDebugger::theNavToken
private

Definition at line 109 of file CkfDebugger.h.

Referenced by setConditions().

◆ theTopo

const TrackerTopology* CkfDebugger::theTopo
private

Definition at line 115 of file CkfDebugger.h.

Referenced by layer(), and setConditions().

◆ theTopoHandToken

edm::ESGetToken<TrackerTopology, IdealGeometryRecord> CkfDebugger::theTopoHandToken
private

Definition at line 108 of file CkfDebugger.h.

Referenced by setConditions().

◆ theTrackerGeom

const TrackerGeometry* CkfDebugger::theTrackerGeom
private

Definition at line 101 of file CkfDebugger.h.

Referenced by det(), nextCorrectHits(), position(), printSimHits(), and setConditions().

◆ theTrackerToken

edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> CkfDebugger::theTrackerToken
private

Definition at line 106 of file CkfDebugger.h.

Referenced by setConditions().

◆ theTTRHBuilder

const TransientTrackingRecHitBuilder* CkfDebugger::theTTRHBuilder
private

Definition at line 114 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements().

◆ totchi2gt30

int CkfDebugger::totchi2gt30
private

Definition at line 263 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), setConditions(), and ~CkfDebugger().

◆ totSeeds

int CkfDebugger::totSeeds
private

Definition at line 265 of file CkfDebugger.h.

Referenced by countSeed(), and ~CkfDebugger().

◆ trackerHitAssociatorConfig_

TrackerHitAssociator::Config CkfDebugger::trackerHitAssociatorConfig_
private

Definition at line 111 of file CkfDebugger.h.

Referenced by printSimHits().