CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 MeasurementTracker *, const Propagator *, const Chi2MeasurementEstimatorBase *, const TransientTrackingRecHitBuilder *)
 
 CkfDebugger (edm::EventSetup const &es)
 
void countSeed ()
 
void deleteHitAssociator ()
 
void fillSeedHist (CTTRHp h1, CTTRHp h2, TrajectoryStateOnSurface t)
 
void printSimHits (const edm::Event &iEvent)
 
 ~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
 
const PropagatortheForwardPropagator
 
const GeometricSearchTrackertheGeomSearchTracker
 
const MagneticFieldtheMagField
 
const MeasurementTrackertheMeasurementTracker
 
NavigationSchool const * theNavSchool
 
const TrackerTopologytheTopo
 
const TrackerGeometrytheTrackerGeom
 
const
TransientTrackingRecHitBuilder
theTTRHBuilder
 
int totchi2gt30
 
int totSeeds
 

Detailed Description

Definition at line 43 of file CkfDebugger.h.

Member Typedef Documentation

Definition at line 70 of file CkfDebugger.h.

Definition at line 71 of file CkfDebugger.h.

Constructor & Destructor Documentation

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

Definition at line 37 of file CkfDebugger.cc.

References chi2gt30, chi2gt30delta, chi2gt30deltaSeed, chi2ls30, det_not_found, dump, dump2, dump3, dump4, dump5, dump6, file, edm::EventSetup::get(), 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, i, 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, edm::ESHandle< class >::product(), propagation, seedWithDelta, simple_hit_not_found, theMagField, theNavSchool, theTopo, theTrackerGeom, indexGen::title, totchi2gt30, and patCandidatesForDimuonsSequences_cff::tracker.

37  :totSeeds(0)
38 {
39  file = new TFile("out.root","recreate");
40  hchi2seedAll = new TH1F("hchi2seedAll","hchi2seedAll",2000,0,200);
41  hchi2seedProb = new TH1F("hchi2seedProb","hchi2seedProb",2000,0,200);
42 
44  es.get<TrackerDigiGeometryRecord>().get(tracker);
45  theTrackerGeom = &(*tracker);
46 
48  es.get<IdealMagneticFieldRecord>().get(theField);
49  theMagField = &(*theField);
50 
51  //Retrieve tracker topology from geometry
53  es.get<IdealGeometryRecord>().get(tTopoHand);
54  theTopo=tTopoHand.product();
55 
57  es.get<NavigationSchoolRecord>().get("SimpleNavigationSchool", nav);
58  theNavSchool = nav.product();
59 
60  for (int i=0; i!=17; i++){
61  dump.push_back(0);
62  }
63 
64  std::stringstream title;
65  for (int i=0; i!=6; i++)
66  for (int j=0; j!=9; j++){
67  if (i==0 && j>2) break;
68  if (i==1 && j>1) break;
69  if (i==2 && j>3) break;
70  if (i==3 && j>2) break;
71  if (i==4 && j>5) break;
72  if (i==5 && j>8) break;
73  dump2[pair<int,int>(i,j)]=0;
74  dump3[pair<int,int>(i,j)]=0;
75  dump4[pair<int,int>(i,j)]=0;
76  dump5[pair<int,int>(i,j)]=0;
77  dump6[pair<int,int>(i,j)]=0;
78  title.str("");
79  title << "pullX_" << i+1 << "-" << j+1 << "_sh-rh";
80  hPullX_shrh[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
81  title.str("");
82  title << "pullY_" << i+1 << "-" << j+1 << "_sh-rh";
83  hPullY_shrh[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
84  title.str("");
85  title << "pullX_" << i+1 << "-" << j+1 << "_sh-st";
86  hPullX_shst[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
87  title.str("");
88  title << "pullY_" << i+1 << "-" << j+1 << "_sh-st";
89  hPullY_shst[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
90  title.str("");
91  title << "pullX_" << i+1 << "-" << j+1 << "_st-rh";
92  hPullX_strh[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
93  title.str("");
94  title << "pullY_" << i+1 << "-" << j+1 << "_st-rh";
95  hPullY_strh[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
96  title.str("");
97  title << "PullGP_X_" << i+1 << "-" << j+1 << "_sh-st";
98  hPullGP_X_shst[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
99  title.str("");
100  title << "PullGP_Y_" << i+1 << "-" << j+1 << "_sh-st";
101  hPullGP_Y_shst[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
102  title.str("");
103  title << "PullGP_Z_" << i+1 << "-" << j+1 << "_sh-st";
104  hPullGP_Z_shst[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
105  if ( ((i==2||i==4)&&(j==0||j==1)) || (i==3||i==5) ){
106  title.str("");
107  title << "pullM_" << i+1 << "-" << j+1 << "_sh-rh";
108  hPullM_shrh[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
109  title.str("");
110  title << "pullS_" << i+1 << "-" << j+1 << "_sh-rh";
111  hPullS_shrh[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
112  title.str("");
113  title << "pullM_" << i+1 << "-" << j+1 << "_sh-st";
114  hPullM_shst[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
115  title.str("");
116  title << "pullS_" << i+1 << "-" << j+1 << "_sh-st";
117  hPullS_shst[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
118  title.str("");
119  title << "pullM_" << i+1 << "-" << j+1 << "_st-rh";
120  hPullM_strh[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
121  title.str("");
122  title << "pullS_" << i+1 << "-" << j+1 << "_st-rh";
123  hPullS_strh[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
124  }
125  }
126 
127  hPullGPXvsGPX_shst = new TH2F("PullGPXvsGPX_shst","PullGPXvsGPX_shst",1000,-50,50,100,-50,50);
128  hPullGPXvsGPY_shst = new TH2F("PullGPXvsGPY_shst","PullGPXvsGPY_shst",1000,-50,50,100,-50,50);
129  hPullGPXvsGPZ_shst = new TH2F("PullGPXvsGPZ_shst","PullGPXvsGPZ_shst",1000,-50,50,200,-100,100);
130  hPullGPXvsGPr_shst = new TH2F("PullGPXvsGPr_shst","PullGPXvsGPr_shst",1000,-50,50,300,-150,150);
131  hPullGPXvsGPeta_shst = new TH2F("PullGPXvsGPeta_shst","PullGPXvsGPeta_shst",1000,-50,50,50,-2.5,2.5);
132  hPullGPXvsGPphi_shst = new TH2F("PullGPXvsGPphi_shst","PullGPXvsGPphi_shst",1000,-50,50,63,0,6.3);
133 
134  seedWithDelta=0;
135  problems=0;
136  no_sim_hit=0;
137  no_layer=0;
138  layer_not_found=0;
139  det_not_found=0;
140  chi2gt30=0;
141  chi2gt30delta=0;
143  chi2ls30=0;
145  no_component=0;
151  propagation=0;
152  other=0;
153  totchi2gt30=0;
154 }
int i
Definition: DBlmapReader.cc:9
std::map< std::string, TH1F * > hPullS_shrh
Definition: CkfDebugger.h:213
const TrackerTopology * theTopo
Definition: CkfDebugger.h:107
std::map< std::string, TH1F * > hPullY_shst
Definition: CkfDebugger.h:208
std::map< std::pair< int, int >, int > dump6
Definition: CkfDebugger.h:200
TH2F * hPullGPXvsGPeta_shst
Definition: CkfDebugger.h:227
const MagneticField * theMagField
Definition: CkfDebugger.h:100
std::map< std::string, TH1F * > hPullGP_Z_shst
Definition: CkfDebugger.h:221
std::map< std::string, TH1F * > hPullY_strh
Definition: CkfDebugger.h:210
std::map< std::string, TH1F * > hPullM_shrh
Definition: CkfDebugger.h:212
std::map< std::string, TH1F * > hPullX_shst
Definition: CkfDebugger.h:207
int partner_det_not_fuond
Definition: CkfDebugger.h:245
int det_not_found
Definition: CkfDebugger.h:235
int seedWithDelta
Definition: CkfDebugger.h:230
std::map< std::string, TH1F * > hPullM_shst
Definition: CkfDebugger.h:214
int matched_not_found
Definition: CkfDebugger.h:243
std::map< std::string, TH1F * > hPullGP_Y_shst
Definition: CkfDebugger.h:220
int matched_not_associated
Definition: CkfDebugger.h:244
int only_one_component
Definition: CkfDebugger.h:242
TH2F * hPullGPXvsGPr_shst
Definition: CkfDebugger.h:226
int glued_det_not_fuond
Definition: CkfDebugger.h:246
TH1F * hchi2seedAll
Definition: CkfDebugger.h:203
int j
Definition: DBlmapReader.cc:9
TH2F * hPullGPXvsGPY_shst
Definition: CkfDebugger.h:224
std::map< std::string, TH1F * > hPullX_shrh
Definition: CkfDebugger.h:205
std::map< std::string, TH1F * > hPullGP_X_shst
Definition: CkfDebugger.h:219
int chi2gt30deltaSeed
Definition: CkfDebugger.h:238
std::map< std::string, TH1F * > hPullM_strh
Definition: CkfDebugger.h:216
std::map< std::string, TH1F * > hPullS_shst
Definition: CkfDebugger.h:215
int simple_hit_not_found
Definition: CkfDebugger.h:240
std::map< std::pair< int, int >, int > dump2
Definition: CkfDebugger.h:196
T const * product() const
Definition: ESHandle.h:86
std::map< std::string, TH1F * > hPullS_strh
Definition: CkfDebugger.h:217
TFile * file
Definition: CkfDebugger.h:202
const TrackerGeometry * theTrackerGeom
Definition: CkfDebugger.h:99
NavigationSchool const * theNavSchool
Definition: CkfDebugger.h:108
std::map< std::string, TH1F * > hPullY_shrh
Definition: CkfDebugger.h:206
TH2F * hPullGPXvsGPX_shst
Definition: CkfDebugger.h:223
std::map< std::string, TH1F * > hPullX_strh
Definition: CkfDebugger.h:209
int layer_not_found
Definition: CkfDebugger.h:234
int no_component
Definition: CkfDebugger.h:241
TH2F * hPullGPXvsGPZ_shst
Definition: CkfDebugger.h:225
std::vector< int > dump
Definition: CkfDebugger.h:195
std::map< std::pair< int, int >, int > dump5
Definition: CkfDebugger.h:199
TH1F * hchi2seedProb
Definition: CkfDebugger.h:203
std::map< std::pair< int, int >, int > dump4
Definition: CkfDebugger.h:198
TH2F * hPullGPXvsGPphi_shst
Definition: CkfDebugger.h:228
int chi2gt30delta
Definition: CkfDebugger.h:237
std::map< std::pair< int, int >, int > dump3
Definition: CkfDebugger.h:197
CkfDebugger::~CkfDebugger ( )

Definition at line 1059 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, i, 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, indexGen::title, totchi2gt30, and totSeeds.

1059  {
1060  for (int it=0; it!=((int)(dump.size())); it++)
1061  edm::LogVerbatim("CkfDebugger") << "dump " << it << " " << dump[it] ;
1062 
1063  edm::LogVerbatim("CkfDebugger") ;
1064  edm::LogVerbatim("CkfDebugger") << "seedWithDelta=" << ((double)seedWithDelta/totSeeds) ;
1065  edm::LogVerbatim("CkfDebugger") << "problems=" << ((double)problems/totSeeds) ;
1066  edm::LogVerbatim("CkfDebugger") << "no_sim_hit=" << ((double)no_sim_hit/totSeeds) ;
1067  edm::LogVerbatim("CkfDebugger") << "no_layer=" << ((double)no_layer/totSeeds) ;
1068  edm::LogVerbatim("CkfDebugger") << "layer_not_found=" << ((double)layer_not_found/totSeeds) ;
1069  edm::LogVerbatim("CkfDebugger") << "det_not_found=" << ((double)det_not_found/totSeeds) ;
1070  edm::LogVerbatim("CkfDebugger") << "chi2gt30=" << ((double)chi2gt30/totSeeds) ;
1071  edm::LogVerbatim("CkfDebugger") << "chi2gt30deltaSeed=" << ((double)chi2gt30deltaSeed/totSeeds) ;
1072  edm::LogVerbatim("CkfDebugger") << "chi2gt30delta=" << ((double)chi2gt30delta/totSeeds) ;
1073  edm::LogVerbatim("CkfDebugger") << "chi2ls30=" << ((double)chi2ls30/totSeeds) ;
1074  edm::LogVerbatim("CkfDebugger") << "simple_hit_not_found=" << ((double)simple_hit_not_found/totSeeds) ;
1075  edm::LogVerbatim("CkfDebugger") << "no_component=" << ((double)no_component/totSeeds) ;
1076  edm::LogVerbatim("CkfDebugger") << "only_one_component=" << ((double)only_one_component/totSeeds) ;
1077  edm::LogVerbatim("CkfDebugger") << "matched_not_found=" << ((double)matched_not_found/totSeeds) ;
1078  edm::LogVerbatim("CkfDebugger") << "matched_not_associated=" << ((double)matched_not_associated/totSeeds) ;
1079  edm::LogVerbatim("CkfDebugger") << "partner_det_not_fuond=" << ((double)partner_det_not_fuond/totSeeds) ;
1080  edm::LogVerbatim("CkfDebugger") << "glued_det_not_fuond=" << ((double)glued_det_not_fuond/totSeeds) ;
1081  edm::LogVerbatim("CkfDebugger") << "propagation=" << ((double)propagation/totSeeds) ;
1082  edm::LogVerbatim("CkfDebugger") << "other=" << ((double)other/totSeeds) ;
1083  edm::LogVerbatim("CkfDebugger") << "totchi2gt30=" << ((double)totchi2gt30/totSeeds) ;
1084  edm::LogVerbatim("CkfDebugger") << "totSeeds=" << totSeeds ;
1085  edm::LogVerbatim("CkfDebugger") ;
1086 
1087  edm::LogVerbatim("CkfDebugger") << "layer navigation problems:" ;
1088  for (int i=0; i!=6; i++)
1089  for (int j=0; j!=9; j++){
1090  if (i==0 && j>2) break;
1091  if (i==1 && j>1) break;
1092  if (i==2 && j>3) break;
1093  if (i==3 && j>2) break;
1094  if (i==4 && j>5) break;
1095  if (i==5 && j>8) break;
1096  edm::LogVerbatim("CkfDebugger") << "det=" << i+1 << " lay=" << j+1 << " " << dump2[pair<int,int>(i,j)] ;
1097  }
1098  edm::LogVerbatim("CkfDebugger") << "\nlayer with hit having chi2>30:" ;
1099  for (int i=0; i!=6; i++)
1100  for (int j=0; j!=9; j++){
1101  if (i==0 && j>2) break;
1102  if (i==1 && j>1) break;
1103  if (i==2 && j>3) break;
1104  if (i==3 && j>2) break;
1105  if (i==4 && j>5) break;
1106  if (i==5 && j>8) break;
1107  edm::LogVerbatim("CkfDebugger") << "det=" << i+1 << " lay=" << j+1 << " " << dump3[pair<int,int>(i,j)] ;
1108  }
1109  edm::LogVerbatim("CkfDebugger") << "\nlayer with hit having chi2>30 for delta rays:" ;
1110  for (int i=0; i!=6; i++)
1111  for (int j=0; j!=9; j++){
1112  if (i==0 && j>2) break;
1113  if (i==1 && j>1) break;
1114  if (i==2 && j>3) break;
1115  if (i==3 && j>2) break;
1116  if (i==4 && j>5) break;
1117  if (i==5 && j>8) break;
1118  edm::LogVerbatim("CkfDebugger") << "det=" << i+1 << " lay=" << j+1 << " " << dump5[pair<int,int>(i,j)] ;
1119  }
1120  edm::LogVerbatim("CkfDebugger") << "\nlayer with det not found:" ;
1121  for (int i=0; i!=6; i++)
1122  for (int j=0; j!=9; j++){
1123  if (i==0 && j>2) break;
1124  if (i==1 && j>1) break;
1125  if (i==2 && j>3) break;
1126  if (i==3 && j>2) break;
1127  if (i==4 && j>5) break;
1128  if (i==5 && j>8) break;
1129  edm::LogVerbatim("CkfDebugger") << "det=" << i+1 << " lay=" << j+1 << " " << dump4[pair<int,int>(i,j)] ;
1130  }
1131  edm::LogVerbatim("CkfDebugger") << "\nlayer with correct RecHit after missing Sim Hit:" ;
1132  for (int i=0; i!=6; i++)
1133  for (int j=0; j!=9; j++){
1134  if (i==0 && j>2) break;
1135  if (i==1 && j>1) break;
1136  if (i==2 && j>3) break;
1137  if (i==3 && j>2) break;
1138  if (i==4 && j>5) break;
1139  if (i==5 && j>8) break;
1140  edm::LogVerbatim("CkfDebugger") << "det=" << i+1 << " lay=" << j+1 << " " << dump6[pair<int,int>(i,j)] ;
1141  }
1142  hchi2seedAll->Write();
1143  hchi2seedProb->Write();
1144  std::stringstream title;
1145  for (int i=0; i!=6; i++)
1146  for (int j=0; j!=9; j++){
1147  if (i==0 && j>2) break;
1148  if (i==1 && j>1) break;
1149  if (i==2 && j>3) break;
1150  if (i==3 && j>2) break;
1151  if (i==4 && j>5) break;
1152  if (i==5 && j>8) break;
1153  title.str("");
1154  title << "pullX_" << i+1 << "-" << j+1 << "_sh-rh";
1155  hPullX_shrh[title.str()]->Write();
1156  title.str("");
1157  title << "pullY_" << i+1 << "-" << j+1 << "_sh-rh";
1158  hPullY_shrh[title.str()]->Write();
1159  title.str("");
1160  title << "pullX_" << i+1 << "-" << j+1 << "_sh-st";
1161  hPullX_shst[title.str()]->Write();
1162  title.str("");
1163  title << "pullY_" << i+1 << "-" << j+1 << "_sh-st";
1164  hPullY_shst[title.str()]->Write();
1165  title.str("");
1166  title << "pullX_" << i+1 << "-" << j+1 << "_st-rh";
1167  hPullX_strh[title.str()]->Write();
1168  title.str("");
1169  title << "pullY_" << i+1 << "-" << j+1 << "_st-rh";
1170  hPullY_strh[title.str()]->Write();
1171  title.str("");
1172  title << "PullGP_X_" << i+1 << "-" << j+1 << "_sh-st";
1173  hPullGP_X_shst[title.str()]->Write();
1174  title.str("");
1175  title << "PullGP_Y_" << i+1 << "-" << j+1 << "_sh-st";
1176  hPullGP_Y_shst[title.str()]->Write();
1177  title.str("");
1178  title << "PullGP_Z_" << i+1 << "-" << j+1 << "_sh-st";
1179  hPullGP_Z_shst[title.str()]->Write();
1180  if ( ((i==2||i==4)&&(j==0||j==1)) || (i==3||i==5) ){
1181  title.str("");
1182  title << "pullM_" << i+1 << "-" << j+1 << "_sh-rh";
1183  hPullM_shrh[title.str()]->Write();
1184  title.str("");
1185  title << "pullS_" << i+1 << "-" << j+1 << "_sh-rh";
1186  hPullS_shrh[title.str()]->Write();
1187  title.str("");
1188  title << "pullM_" << i+1 << "-" << j+1 << "_sh-st";
1189  hPullM_shst[title.str()]->Write();
1190  title.str("");
1191  title << "pullS_" << i+1 << "-" << j+1 << "_sh-st";
1192  hPullS_shst[title.str()]->Write();
1193  title.str("");
1194  title << "pullM_" << i+1 << "-" << j+1 << "_st-rh";
1195  hPullM_strh[title.str()]->Write();
1196  title.str("");
1197  title << "pullS_" << i+1 << "-" << j+1 << "_st-rh";
1198  hPullS_strh[title.str()]->Write();
1199  }
1200  }
1201  hPullGPXvsGPX_shst->Write();
1202  hPullGPXvsGPY_shst->Write();
1203  hPullGPXvsGPZ_shst->Write();
1204  hPullGPXvsGPr_shst->Write();
1205  hPullGPXvsGPeta_shst->Write();
1206  hPullGPXvsGPphi_shst->Write();
1207 
1208  //file->Write();
1209  file->Close();
1210 }
int i
Definition: DBlmapReader.cc:9
std::map< std::string, TH1F * > hPullS_shrh
Definition: CkfDebugger.h:213
std::map< std::string, TH1F * > hPullY_shst
Definition: CkfDebugger.h:208
std::map< std::pair< int, int >, int > dump6
Definition: CkfDebugger.h:200
TH2F * hPullGPXvsGPeta_shst
Definition: CkfDebugger.h:227
std::map< std::string, TH1F * > hPullGP_Z_shst
Definition: CkfDebugger.h:221
std::map< std::string, TH1F * > hPullY_strh
Definition: CkfDebugger.h:210
std::map< std::string, TH1F * > hPullM_shrh
Definition: CkfDebugger.h:212
std::map< std::string, TH1F * > hPullX_shst
Definition: CkfDebugger.h:207
int partner_det_not_fuond
Definition: CkfDebugger.h:245
int det_not_found
Definition: CkfDebugger.h:235
int seedWithDelta
Definition: CkfDebugger.h:230
std::map< std::string, TH1F * > hPullM_shst
Definition: CkfDebugger.h:214
int matched_not_found
Definition: CkfDebugger.h:243
std::map< std::string, TH1F * > hPullGP_Y_shst
Definition: CkfDebugger.h:220
int matched_not_associated
Definition: CkfDebugger.h:244
int only_one_component
Definition: CkfDebugger.h:242
TH2F * hPullGPXvsGPr_shst
Definition: CkfDebugger.h:226
int glued_det_not_fuond
Definition: CkfDebugger.h:246
TH1F * hchi2seedAll
Definition: CkfDebugger.h:203
int j
Definition: DBlmapReader.cc:9
TH2F * hPullGPXvsGPY_shst
Definition: CkfDebugger.h:224
std::map< std::string, TH1F * > hPullX_shrh
Definition: CkfDebugger.h:205
std::map< std::string, TH1F * > hPullGP_X_shst
Definition: CkfDebugger.h:219
int chi2gt30deltaSeed
Definition: CkfDebugger.h:238
std::map< std::string, TH1F * > hPullM_strh
Definition: CkfDebugger.h:216
std::map< std::string, TH1F * > hPullS_shst
Definition: CkfDebugger.h:215
int simple_hit_not_found
Definition: CkfDebugger.h:240
std::map< std::pair< int, int >, int > dump2
Definition: CkfDebugger.h:196
std::map< std::string, TH1F * > hPullS_strh
Definition: CkfDebugger.h:217
TFile * file
Definition: CkfDebugger.h:202
std::map< std::string, TH1F * > hPullY_shrh
Definition: CkfDebugger.h:206
TH2F * hPullGPXvsGPX_shst
Definition: CkfDebugger.h:223
std::map< std::string, TH1F * > hPullX_strh
Definition: CkfDebugger.h:209
int layer_not_found
Definition: CkfDebugger.h:234
int no_component
Definition: CkfDebugger.h:241
TH2F * hPullGPXvsGPZ_shst
Definition: CkfDebugger.h:225
std::vector< int > dump
Definition: CkfDebugger.h:195
std::map< std::pair< int, int >, int > dump5
Definition: CkfDebugger.h:199
TH1F * hchi2seedProb
Definition: CkfDebugger.h:203
std::map< std::pair< int, int >, int > dump4
Definition: CkfDebugger.h:198
TH2F * hPullGPXvsGPphi_shst
Definition: CkfDebugger.h:228
int chi2gt30delta
Definition: CkfDebugger.h:237
std::map< std::pair< int, int >, int > dump3
Definition: CkfDebugger.h:197

Member Function Documentation

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

Definition at line 197 of file CkfDebugger.cc.

References analyseRecHitExistance(), analyseRecHitNotFound(), TrackerHitAssociator::associateHit(), begin, TransientTrackingRecHitBuilder::build(), TrajectoryStateOnSurface::cartesianError(), 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, HLT_25ns14e33_v1_cff::estimator, 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, 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(), GeomDet::position(), CartesianTrajectoryError::position(), position(), LocalTrajectoryError::positionError(), problems, PSimHit::processType(), Propagator::propagate(), HLT_25ns14e33_v1_cff::propagator, TrajectoryMeasurement::recHit(), query::result, alignCSCRings::s, seedWithDelta, mathSSE::sqrt(), GeomDet::surface(), TrajectoryStateOnSurface::surface(), edmStreamStallGrapher::t, testSeed(), theChi2, theForwardPropagator, theGeomSearchTracker, theMeasurementTracker, theTTRHBuilder, indexGen::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().

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

Definition at line 680 of file CkfDebugger.cc.

References associated(), 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, MeasurementExtractor::measuredError(), MeasurementExtractor::measuredParameters(), no_component, only_one_component, other, partner_det_not_fuond, StripSubdetector::partnerDetId(), MeasurementDet::position(), position(), Propagator::propagate(), propagation, pSimHit(), dttmaxenums::R, alignCSCRings::r, MeasurementDet::recHits(), HLT_50ns_5e33_v3_cff::recHits, query::result, simple_hit_not_found, DetId::subdetId(), GeomDet::surface(), MeasurementDet::surface(), theChi2, theForwardPropagator, theMagField, theMeasurementTracker, PSimHit::trackId(), and detailsBasic3DVector::y.

Referenced by analyseCompatibleMeasurements().

681 {
682  LogTrace("CkfDebugger") << "now in analyseRecHitExistance" ;
683 
684 #if 0
685  std::pair<CTTRHp, double> result;
686 
687  const MeasurementDet* simHitDet = theMeasurementTracker->idToDet( DetId( sh.detUnitId()));
688  TSOS simHitState = TSOSFromSimHitFactory()(sh, *det(&sh), *theMagField);
689  MeasurementDet::RecHitContainer recHits = simHitDet->recHits( simHitState);//take all hits from det
690 
691  //check if the hit is not present or is a problem of association
692  TSOS firstDetState = theForwardPropagator->propagate( startingState, det(&sh)->surface());
693  if (!firstDetState.isValid()) {
694  edm::LogVerbatim("CkfDebugger") << "CkfDebugger: propagation failed from state " << startingState << " to first det surface "
695  << position(&sh) ;
696  propagation++;
697  return std::pair<CTTRHp, double>((CTTRHp)(0),-1);
698  }
699 
700  bool found = false;
701  for ( MeasurementDet::RecHitContainer::const_iterator rh = recHits.begin(); rh != recHits.end(); rh++) {
702  if ( associated( *rh, sh)) {
703  found = true;
704  result = std::pair<CTTRHp, double>(*rh,theChi2->estimate( firstDetState, **rh).second);
705  edm::LogVerbatim("CkfDebugger") << "CkfDebugger: A RecHit associated to the correct Simhit exists at lpos "
706  << (**rh).localPosition()
707  << " gpos " << (**rh).globalPosition()
708  << " layer " << layer((**rh).det())
709  << " subdet " << (**rh).det()->geographicalId().subdetId()
710  << " Chi2 " << theChi2->estimate( firstDetState, **rh).second;
711  }
712  }
713  if (!found) {
714  edm::LogVerbatim("CkfDebugger") << "CkfDebugger: there is no RecHit associated to the correct SimHit." ;
715  edm::LogVerbatim("CkfDebugger") << " There are " << recHits.size() << " RecHits in the simHit DetUnit" ;
716  edm::LogVerbatim("CkfDebugger") << "SH GP=" << position(&sh) << " subdet=" << det(&sh)->geographicalId().subdetId()
717  << " layer=" << layer(det(&sh)) ;
718  int y=0;
719  for (MeasurementDet::RecHitContainer::const_iterator rh = recHits.begin(); rh != recHits.end(); rh++)
720  edm::LogVerbatim("CkfDebugger") << "RH#" << y++ << " GP=" << (**rh).globalPosition() << " subdet=" << (**rh).det()->geographicalId().subdetId()
721  << " layer=" << layer((**rh).det()) ;
722  for ( MeasurementDet::RecHitContainer::const_iterator rh = recHits.begin(); rh != recHits.end(); rh++) {
723  edm::LogVerbatim("CkfDebugger") << "Non-associated RecHit at pos " << (**rh).localPosition() ;
724  }
725  }
726 
727  bool found2 = false;
728  const PSimHit* sh2;
729  StripSubdetector subdet( det(&sh)->geographicalId());
730  if (!subdet.glued()) {
731  edm::LogVerbatim("CkfDebugger") << "The DetUnit is not part of a GluedDet" ;
732  if (found) {
733  if (result.second>30){
734  LogTrace("CkfDebugger") << "rh->parameters()=" << result.first->parameters() ;
735  LogTrace("CkfDebugger") << "rh->parametersError()=" << result.first->parametersError() ;
736  MeasurementExtractor me(firstDetState);
737  AlgebraicVector r(result.first->parameters() - me.measuredParameters(*result.first));
738  LogTrace("CkfDebugger") << "me.measuredParameters(**rh)=" << me.measuredParameters(*result.first) ;
739  LogTrace("CkfDebugger") << "me.measuredError(**rh)=" << me.measuredError(*result.first) ;
740  AlgebraicSymMatrix R(result.first->parametersError() + me.measuredError(*result.first));
741  LogTrace("CkfDebugger") << "r=" << r ;
742  LogTrace("CkfDebugger") << "R=" << R ;
743  int ierr;
744  R.invert(ierr);
745  LogTrace("CkfDebugger") << "R(-1)=" << R ;
746  LogTrace("CkfDebugger") << "chi2=" << R.similarity(r) ;
747  }
748  return result;
749  }
750  else {
752  return std::pair<CTTRHp, double>((CTTRHp)(0),-8);//not found (is not a glued det)
753  }
754  } else {
755  edm::LogVerbatim("CkfDebugger") << "The DetUnit is part of a GluedDet" ;
756  DetId partnerDetId = DetId( subdet.partnerDetId());
757 
758  sh2 = pSimHit( sh.trackId(), partnerDetId);
759  if (sh2 == 0) {
760  edm::LogVerbatim("CkfDebugger") << "Partner DetUnit does not have a SimHit from the same track" ;
761  if (found) {
762  //projected rec hit
763  TrackingRecHitProjector<ProjectedRecHit2D> proj;
764  DetId gid = gluedId( subdet);
765  const MeasurementDet* gluedDet = theMeasurementTracker->idToDet( gid);
766  TSOS gluedTSOS = theForwardPropagator->propagate(startingState, gluedDet->geomDet().surface());
767  CTTRHp projHit = proj.project( *result.first,gluedDet->geomDet(),gluedTSOS).get();
768  //LogTrace("CkfDebugger") << proj.project( *result.first,gluedDet->geomDet(),gluedTSOS)->parameters() ;
769  //LogTrace("CkfDebugger") << projHit->parametersError() ;
770  double chi2 = theChi2->estimate(gluedTSOS, *proj.project( *result.first,gluedDet->geomDet(),gluedTSOS)).second;
771  return std::pair<CTTRHp, double>(projHit,chi2);
772  }
773  }
774  else {
775  edm::LogVerbatim("CkfDebugger") << "Partner DetUnit has a good SimHit at gpos " << position(sh2)
776  << " lpos " << sh2->localPosition() ;
777  //}
778 
779  const MeasurementDet* partnerDet = theMeasurementTracker->idToDet( partnerDetId);
780  if (partnerDet == 0) {
781  edm::LogVerbatim("CkfDebugger") << "Partner measurementDet not found!!!" ;
783  return std::pair<CTTRHp, double>((CTTRHp)(0),-3);
784  }
785  TSOS simHitState2 = TSOSFromSimHitFactory()(*sh2, *det(sh2), *theMagField);
786  MeasurementDet::RecHitContainer recHits2 = partnerDet->recHits( simHitState2);
787 
788  TSOS secondDetState = theForwardPropagator->propagate( startingState, det(sh2)->surface());
789  if (!secondDetState.isValid()) {
790  edm::LogVerbatim("CkfDebugger") << "CkfDebugger: propagation failed from state " << startingState << " to second det surface "
791  << position(sh2) ;
792  propagation++;
793  return std::pair<CTTRHp, double>((CTTRHp)(0),-1);
794  }
795 
796  for ( MeasurementDet::RecHitContainer::const_iterator rh = recHits2.begin(); rh != recHits2.end(); rh++) {
797  if ( associated( *rh, *sh2)) {
798  found2 = true;
799  edm::LogVerbatim("CkfDebugger") << "CkfDebugger: A RecHit associated to the correct Simhit exists at lpos "
800  << (**rh).localPosition()
801  << " gpos " << (**rh).globalPosition()
802  << " Chi2 " << theChi2->estimate( secondDetState, **rh).second
803  ;
804  }
805  }
806  if (!found2) {
807  edm::LogVerbatim("CkfDebugger") << "CkfDebugger: there is no RecHit associated to the correct SimHit." ;
808  LogTrace("CkfDebugger") << " There are " << recHits.size() << " RecHits in the simHit DetUnit" ;
809  for ( MeasurementDet::RecHitContainer::const_iterator rh = recHits.begin(); rh != recHits.end(); rh++) {
810  LogTrace("CkfDebugger") << "Non-associated RecHit at pos " << (**rh).localPosition() ;
811  }
812  }
813  }
814  }
815 
817  if (found && found2) {
818  // look in the glued det
819  DetId gid = gluedId( subdet);
820  const MeasurementDet* gluedDet = theMeasurementTracker->idToDet( gid);
821  if ( gluedDet == 0) {
822  edm::LogVerbatim("CkfDebugger") << "CkfDebugger ERROR: glued MeasurementDet not found!" ;
824  return std::pair<CTTRHp, double>((CTTRHp)(0),-4);
825  }
826 
827  TSOS gluedDetState = theForwardPropagator->propagate( startingState, gluedDet->surface());
828  if (!gluedDetState.isValid()) {
829  edm::LogVerbatim("CkfDebugger") << "CkfDebugger: propagation failed from state " << startingState << " to det surface "
830  << gluedDet->position() ;
831  propagation++;
832  return std::pair<CTTRHp, double>((CTTRHp)(0),-1);
833  }
834 
835  gluedHits = gluedDet->recHits( gluedDetState);
836  edm::LogVerbatim("CkfDebugger") << "CkfDebugger: the GluedDet returned " << gluedHits.size() << " hits" ;
837  if (gluedHits.size()==0){
838  edm::LogVerbatim("CkfDebugger") << "Found and associated mono and stereo recHits but not matched!!!" ;
840  return std::pair<CTTRHp, double>((CTTRHp)(0),-5);
841  }
842  bool found3 = false;
843  for ( MeasurementDet::RecHitContainer::const_iterator rh = gluedHits.begin(); rh != gluedHits.end(); rh++) {
844  if ( associated( *rh, sh) && associated( *rh, *sh2)) {
845  double chi2 = theChi2->estimate(gluedDetState, **rh).second;
846  edm::LogVerbatim("CkfDebugger") << "Matched hit at lpos " << (**rh).localPosition()
847  << " gpos " << (**rh).globalPosition()
848  << " has Chi2 " << chi2
849  ;
850  result = std::pair<CTTRHp, double>(&**rh,chi2);
851  found3 = true;
852  if (chi2>30){
853  LogTrace("CkfDebugger") << "rh->parameters()=" << (*rh)->parameters() ;
854  LogTrace("CkfDebugger") << "rh->parametersError()=" << (*rh)->parametersError() ;
855  MeasurementExtractor me(gluedDetState);
856  AlgebraicVector r((*rh)->parameters() - me.measuredParameters(**rh));
857  LogTrace("CkfDebugger") << "me.measuredParameters(**rh)=" << me.measuredParameters(**rh) ;
858  LogTrace("CkfDebugger") << "me.measuredError(**rh)=" << me.measuredError(**rh) ;
859  AlgebraicSymMatrix R((*rh)->parametersError() + me.measuredError(**rh));
860  LogTrace("CkfDebugger") << "r=" << r ;
861  LogTrace("CkfDebugger") << "R=" << R ;
862  int ierr;
863  R.invert(ierr);
864  LogTrace("CkfDebugger") << "R(-1)=" << R ;
865  LogTrace("CkfDebugger") << "chi2=" << R.similarity(r) ;
866  }
867  break;
868  }
869  }
870  if (found3) return result;
871  else {
872  edm::LogVerbatim("CkfDebugger") << "Found and associated mono and stereo recHits. Matched found but not associated!!!" ;
874  return std::pair<CTTRHp, double>((CTTRHp)(0),-6);
875  }
876  }
877  else if ( (found && !found2) || (!found && found2) ) {
878  edm::LogVerbatim("CkfDebugger") << "Only one component is found" ;
880  return std::pair<CTTRHp, double>((CTTRHp)(0),-7);
881  }
882  else {
883  edm::LogVerbatim("CkfDebugger") << "No component is found" ;
884  no_component++;
885  return std::pair<CTTRHp, double>((CTTRHp)(0),-2);
886  }
887  other++;
888 #endif
889  return std::pair<CTTRHp, double>((CTTRHp)(0),0);//other
890 }
virtual FreeTrajectoryState propagate(const FreeTrajectoryState &ftsStart, const GlobalPoint &pDest) const final
Definition: Propagator.h:119
const MeasurementTracker * theMeasurementTracker
Definition: CkfDebugger.h:105
const MagneticField * theMagField
Definition: CkfDebugger.h:100
virtual const GeomDet & geomDet() const
const Surface & surface() const
int partner_det_not_fuond
Definition: CkfDebugger.h:245
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:40
const MeasurementEstimator * theChi2
Definition: CkfDebugger.h:102
int matched_not_found
Definition: CkfDebugger.h:243
int matched_not_associated
Definition: CkfDebugger.h:244
bool associated(CTTRHp rechit, const PSimHit &sh) const
Definition: CkfDebugger.cc:614
int only_one_component
Definition: CkfDebugger.h:242
tuple result
Definition: query.py:137
int glued_det_not_fuond
Definition: CkfDebugger.h:246
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:77
TransientTrackingRecHit::ConstRecHitPointer CTTRHp
Definition: CkfDebugger.h:39
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const =0
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
#define LogTrace(id)
const Surface::PositionType & position() const
virtual RecHitContainer recHits(const TrajectoryStateOnSurface &, const MeasurementTrackerEvent &) const =0
const Propagator * theForwardPropagator
Definition: CkfDebugger.h:103
Definition: DetId.h:18
CLHEP::HepVector AlgebraicVector
int simple_hit_not_found
Definition: CkfDebugger.h:240
TrackingRecHit::ConstRecHitContainer RecHitContainer
const GeomDetUnit * det(const PSimHit *sh) const
Definition: CkfDebugger.h:149
CLHEP::HepSymMatrix AlgebraicSymMatrix
unsigned int trackId() const
Definition: PSimHit.h:102
int no_component
Definition: CkfDebugger.h:241
const PSimHit * pSimHit(unsigned int tkId, DetId detId)
Definition: CkfDebugger.cc:892
int layer(const GeomDet *det)
Definition: CkfDebugger.h:151
Global3DPoint position(const PSimHit *sh) const
Definition: CkfDebugger.h:146
DetId gluedId(const DetId &du)
unsigned int detUnitId() const
Definition: PSimHit.h:93
int CkfDebugger::analyseRecHitNotFound ( const Trajectory traj,
CTTRHp  correctRecHit 
)
private

Definition at line 904 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(), run_regression::test, theChi2, theForwardPropagator, theGeomSearchTracker, theNavSchool, and TrajectoryMeasurement::updatedState().

Referenced by analyseCompatibleMeasurements().

905 {
906  unsigned int correctDetId = correctRecHit->det()->geographicalId().rawId();
907  int correctLayId = layer(correctRecHit->det());
908  LogTrace("CkfDebugger") << "correct layer id=" << correctLayId ;
909 
910  TSOS currentState( traj.lastMeasurement().updatedState() );
911  std::vector<const DetLayer*> nl = theNavSchool->nextLayers(*traj.lastLayer(),*currentState.freeState(),traj.direction() );
912  if (nl.empty()) {
913  edm::LogVerbatim("CkfDebugger") << "no compatible layers" ;
914  no_layer++;return 2;
915  }
916 
917  TkLayerLess lless;//FIXME - was lless(traj.direction())
918  const DetLayer* detLayer = 0;
919  bool navLayerAfter = false;
920  bool test = false;
921  for (std::vector<const DetLayer*>::iterator il = nl.begin(); il != nl.end(); il++) {
922  if ( dynamic_cast<const BarrelDetLayer*>(*il) ){
923  const BarrelDetLayer* pbl = dynamic_cast<const BarrelDetLayer*>(*il);
924  LogTrace("CkfDebugger") << "pbl->specificSurface().bounds().length()=" << pbl->specificSurface().bounds().length() ;
925  LogTrace("CkfDebugger") << "pbl->specificSurface().bounds().width()=" << pbl->specificSurface().bounds().width() ;
926  }
927  int layId = layer(((*(*il)->basicComponents().begin())));
928  LogTrace("CkfDebugger") << " subdet=" << (*(*il)->basicComponents().begin())->geographicalId().subdetId() << "layer id=" << layId ;
929  if (layId==correctLayId) {
930  test = true;
931  detLayer = &**il;
932  break;
933  }
934  if ( lless( *il, theGeomSearchTracker->detLayer(correctRecHit->det()->geographicalId()) ))
935  navLayerAfter = true; //it is enough that only one layer is after the correct one?
936  }
937 
938  if (test) {
939  edm::LogVerbatim("CkfDebugger") << "correct layer taken into account. layer id: " << correctLayId ;
940  } else if (navLayerAfter){
941  edm::LogVerbatim("CkfDebugger")<< "SimHit layer after the layers returned by Navigation.";
942  edm::LogVerbatim("CkfDebugger")<< "Probably a missing SimHit." ;
943  edm::LogVerbatim("CkfDebugger")<< "check: " << (correctRecHit->det()->geographicalId().subdetId()) << " " << (layer(correctRecHit->det()));
944  dump6[pair<int,int>((correctRecHit->det()->geographicalId().subdetId()-1),(layer(correctRecHit->det()))-1)]++;
945  no_sim_hit++;return 16;
946  }
947  else {
948  edm::LogVerbatim("CkfDebugger") << "correct layer NOT taken into account. correct layer id: " << correctLayId ;
949  layer_not_found++;
950  return 3;
951  }
952 
954  std::vector<DetWithState> compatDets = detLayer->compatibleDets(currentState,*theForwardPropagator,*theChi2);
955  // LogTrace("CkfDebugger") << "DEBUGGER" ;
956  // LogTrace("CkfDebugger") << "runned compatDets." ;
957  // LogTrace("CkfDebugger") << "started from the following TSOS:" ;
958  // LogTrace("CkfDebugger") << currentState ;
959  // LogTrace("CkfDebugger") << "number of dets found=" << compatDets.size() ;
960  // for (std::vector<DetWithState>::iterator det=compatDets.begin();det!=compatDets.end();det++){
961  // unsigned int detId = det->first->geographicalId().rawId();
962  // LogTrace("CkfDebugger") << "detId=" << detId ;
963  // }
964  bool test2 = false;
965  for (std::vector<DetWithState>::iterator det=compatDets.begin();det!=compatDets.end();det++){
966  unsigned int detId = det->first->geographicalId().rawId();
967  // LogTrace("CkfDebugger") << "detId=" << detId
968  // << "\ncorrectRecHit->det()->geographicalId().rawId()=" << correctRecHit->det()->geographicalId().rawId()
969  // << "\ngluedId(correctRecHit->det()->geographicalId()).rawId()=" << gluedId(correctRecHit->det()->geographicalId()).rawId()
970  // ;
971  if (detId==gluedId(correctRecHit->det()->geographicalId()).rawId()) {
972  test2=true;
973  break;
974  }
975  }
976 
977  if (test2){
978  edm::LogVerbatim("CkfDebugger") << "correct det taken into account. correctDetId is: " << correctDetId
979  << ". please check chi2." ;
980  return 5;
981  }
982  else {
983  edm::LogVerbatim("CkfDebugger") << "correct det NOT taken into account. correctDetId: " << correctDetId ;
984  det_not_found++;return 4;
985  }
986 
987 }
std::map< std::pair< int, int >, int > dump6
Definition: CkfDebugger.h:200
const GeometricSearchTracker * theGeomSearchTracker
Definition: CkfDebugger.h:101
int det_not_found
Definition: CkfDebugger.h:235
virtual std::vector< DetWithState > compatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
const MeasurementEstimator * theChi2
Definition: CkfDebugger.h:102
PropagationDirection const & direction() const
Definition: Trajectory.cc:118
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
TrajectoryMeasurement const & lastMeasurement() const
Definition: Trajectory.h:181
const DetLayer * detLayer(const DetId &id) const
obsolete method. Use idToLayer() instead.
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:77
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
#define LogTrace(id)
const Propagator * theForwardPropagator
Definition: CkfDebugger.h:103
std::vector< const DetLayer * > nextLayers(const DetLayer &detLayer, Args &&...args) const
NavigationDirection.
virtual const BoundCylinder & specificSurface() const
Extension of the interface.
const GeomDetUnit * det(const PSimHit *sh) const
Definition: CkfDebugger.h:149
NavigationSchool const * theNavSchool
Definition: CkfDebugger.h:108
const DetLayer * lastLayer() const
Redundant method, returns the layer of lastMeasurement() .
Definition: Trajectory.h:294
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
int layer_not_found
Definition: CkfDebugger.h:234
TrajectoryStateOnSurface const & updatedState() const
int layer(const GeomDet *det)
Definition: CkfDebugger.h:151
DetId gluedId(const DetId &du)
bool CkfDebugger::associated ( CTTRHp  rechit,
const PSimHit sh 
) const
private

Definition at line 614 of file CkfDebugger.cc.

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

Referenced by analyseRecHitExistance(), and correctMeas().

615 {
616  LogTrace("CkfDebugger") << "now in associated" ;
617 
618  if (!rechit->isValid()) return false;
619  // LogTrace("CkfDebugger") << "rec hit valid" ;
620  const std::vector<PSimHit>& pSimHitVec = hitAssociator->associateHit(*rechit->hit());
621  // LogTrace("CkfDebugger") << "size=" << pSimHitVec.size() ;
622  for (std::vector<PSimHit>::const_iterator shit=pSimHitVec.begin();shit!=pSimHitVec.end();shit++){
623  //const GeomDetUnit* detUnit = theTrackerGeom->idToDetUnit( DetId(shit->detUnitId()));
624  // LogTrace("CkfDebugger") << "pSimHit.timeOfFlight()=" << pSimHit.timeOfFlight()
625  // << " pSimHit.pabs()=" << pSimHit.pabs() << " GP=" << position(&pSimHit);
626  // LogTrace("CkfDebugger") << "(*shit).timeOfFlight()=" << (*shit).timeOfFlight()
627  // << " (*shit).pabs()=" << (*shit).pabs() << " GP=" << detUnit->toGlobal( shit->localPosition());
628  if ( ( fabs((*shit).timeOfFlight()-pSimHit.timeOfFlight())<1e-9 ) &&
629  ( fabs((*shit).pabs()-pSimHit.pabs())<1e-9 ) ) return true;
630  }
631  return false;
632 }
float timeOfFlight() const
Definition: PSimHit.h:69
TrackerHitAssociator * hitAssociator
Definition: CkfDebugger.h:104
float pabs() const
fast and more accurate access to momentumAtEntry().mag()
Definition: PSimHit.h:63
#define LogTrace(id)
std::vector< PSimHit > associateHit(const TrackingRecHit &thit) const
const PSimHit * pSimHit(unsigned int tkId, DetId detId)
Definition: CkfDebugger.cc:892
int CkfDebugger::assocTrackId ( CTTRHp  rechit) const
private

Definition at line 511 of file CkfDebugger.cc.

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

Referenced by correctMeas().

512 {
513  LogTrace("CkfDebugger") << "now in assocTrackId" ;
514 
515  if (!rechit->hit()->isValid()) {
516  return -1;
517  }
518 
519  std::vector<SimHitIdpr> ids = hitAssociator->associateHitId(*rechit->hit());
520  if (ids.size()!=0) {
521  return ids[0].first;//FIXME if size>1!!
522  }
523  else {
524  return -1;
525  }
526 }
TrackerHitAssociator * hitAssociator
Definition: CkfDebugger.h:104
#define LogTrace(id)
std::vector< SimHitIdpr > associateHitId(const TrackingRecHit &thit) const
template<unsigned int D>
std::pair<double,double> CkfDebugger::computePulls ( CTTRHp  recHit,
TSOS  startingState 
)
inlineprivate

Definition at line 157 of file CkfDebugger.h.

References LogTrace, MeasurementExtractor::measuredError(), MeasurementExtractor::measuredParameters(), Propagator::propagate(), dttmaxenums::R, alignCSCRings::r, mathSSE::sqrt(), TrajectoryStateOnSurface::surface(), and theForwardPropagator.

Referenced by analyseCompatibleMeasurements().

157  {
158  typedef typename AlgebraicROOTObject<D>::Vector VecD;
159  typedef typename AlgebraicROOTObject<D,D>::SymMatrix SMatDD;
160  TSOS detState = theForwardPropagator->propagate(startingState,recHit->det()->surface());
161  LogTrace("CkfDebugger") << "parameters=" << recHit->parameters() ;
162  LogTrace("CkfDebugger") << "parametersError=" << recHit->parametersError() ;
163  MeasurementExtractor me(detState);
164  VecD r = asSVector<D>(recHit->parameters()) - me.measuredParameters<D>(*recHit);
165  LogTrace("CkfDebugger") << "me.measuredParameters=" << me.measuredParameters<D>(*recHit) ;
166  LogTrace("CkfDebugger") << "me.measuredError=" << me.measuredError<D>(*recHit) ;
167  SMatDD R = asSMatrix<D>(recHit->parametersError()) + me.measuredError<D>(*recHit);
168  LogTrace("CkfDebugger") << "r=" << r ;
169  LogTrace("CkfDebugger") << "R=" << R ;
170  R.Invert();
171  LogTrace("CkfDebugger") << "R(-1)=" << R ;
172  LogTrace("CkfDebugger") << "chi2=" << ROOT::Math::Similarity(r,R) ;
173  double pullX=(-r[0])*sqrt(R(0,0));
174  double r_1 = 0;
175  if ( VecD::Dim() >= 2 )
176  {
177  r_1 = r[1];
178  }
179  double pullY=(-r_1)*sqrt(R(1,1));
180  LogTrace("CkfDebugger") << "pullX=" << pullX ;
181  LogTrace("CkfDebugger") << "pullY=" << pullY ;
182  return std::pair<double,double>(pullX,pullY);
183  }
virtual FreeTrajectoryState propagate(const FreeTrajectoryState &ftsStart, const GlobalPoint &pDest) const final
Definition: Propagator.h:119
ROOT::Math::SMatrix< double, D1, D1, ROOT::Math::MatRepSym< double, D1 > > SymMatrix
const SurfaceType & surface() const
T sqrt(T t)
Definition: SSEVec.h:48
#define LogTrace(id)
const Propagator * theForwardPropagator
Definition: CkfDebugger.h:103
ROOT::Math::SVector< double, D1 > Vector
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:150
std::pair<double,double> CkfDebugger::computePulls ( CTTRHp  recHit,
TSOS  startingState 
)
inlineprivate

Definition at line 184 of file CkfDebugger.h.

References edm::hlt::Exception.

184  {
185  switch (recHit->dimension()) {
186  case 1: return computePulls<1>(recHit,startingState);
187  case 2: return computePulls<2>(recHit,startingState);
188  case 3: return computePulls<3>(recHit,startingState);
189  case 4: return computePulls<4>(recHit,startingState);
190  case 5: return computePulls<5>(recHit,startingState);
191  }
192  throw cms::Exception("CkfDebugger error: rechit of dimension not 1,2,3,4,5");
193  }
bool CkfDebugger::correctMeas ( const TM tm,
const PSimHit correctHit 
) const
private

Definition at line 634 of file CkfDebugger.cc.

References associated(), TrackerHitAssociator::associateHitId(), assocTrackId(), AlCaHLTBitMon_QueryRunRegistry::comp, hitAssociator, j, LogTrace, TrajectoryMeasurement::recHit(), run_regression::test, and PSimHit::trackId().

Referenced by analyseCompatibleMeasurements().

635 {
636  LogTrace("CkfDebugger") << "now in correctMeas" ;
637  CTTRHp recHit = tm.recHit();
638  if (recHit->isValid()) LogTrace("CkfDebugger") << "hit at position:" << recHit->globalPosition() ;
639  TransientTrackingRecHit::RecHitContainer comp = recHit->transientHits();
640  if (comp.empty()) {
641  // LogTrace("CkfDebugger") << "comp.empty()==true" ;
642  return associated( recHit, *correctHit);
643  }
644  else {
645  for (TransientTrackingRecHit::RecHitContainer::const_iterator ch=comp.begin();
646  ch!=comp.end(); ++ch) {
647  if ( associated( recHit, *correctHit)) {
648  // check if the other components are associated to the same trackId
649  for (TransientTrackingRecHit::RecHitContainer::const_iterator ch2=comp.begin();
650  ch2!=comp.end(); ++ch2) {
651  if (ch2 == ch) continue;
653  // LogTrace("CkfDebugger") << "correctHit->trackId()=" << correctHit->trackId() ;
654  bool test=true;
655  std::vector<SimHitIdpr> ids = hitAssociator->associateHitId(*(*ch2)->hit());
656  for (std::vector<SimHitIdpr>::iterator j=ids.begin();j!=ids.end();j++){
657  // LogTrace("CkfDebugger") << "j=" <<j->first;
658  if (correctHit->trackId()==j->first) {
659  test=false;
660  // LogTrace("CkfDebugger") << correctHit->trackId()<< " " <<j->first;
661  }
662  }
663  if (assocTrackId( *ch2) != ((int)( correctHit->trackId())) ) {LogTrace("CkfDebugger") << "returning false 1" ;/*return false;*/}//fixme
664  if (test) {
665  // LogTrace("CkfDebugger") << "returning false 2" ;
666  return false; // not all components from same simtrack
667  }
668  // if (assocTrackId( **ch2) != ((int)( correctHit->trackId())) ) {
669  // return false; // not all components from same simtrack
670  // }
671  }
672  return true; // if all components from same simtrack
673  }
674  }
675  return false;
676  }
677 }
std::vector< ConstRecHitPointer > RecHitContainer
bool associated(CTTRHp rechit, const PSimHit &sh) const
Definition: CkfDebugger.cc:614
int assocTrackId(CTTRHp rechit) const
Definition: CkfDebugger.cc:511
int j
Definition: DBlmapReader.cc:9
TrackerHitAssociator * hitAssociator
Definition: CkfDebugger.h:104
TransientTrackingRecHit::ConstRecHitPointer CTTRHp
Definition: CkfDebugger.h:39
#define LogTrace(id)
std::vector< SimHitIdpr > associateHitId(const TrackingRecHit &thit) const
unsigned int trackId() const
Definition: PSimHit.h:102
bool CkfDebugger::correctTrajectory ( const Trajectory traj,
unsigned int &  trajId 
) const
private

Definition at line 469 of file CkfDebugger.cc.

References TrackerHitAssociator::associateHit(), TrackerHitAssociator::associateHitId(), goodSimHit(), hitAssociator, i, j, LogTrace, and run_regression::test.

Referenced by analyseCompatibleMeasurements().

470 {
471  LogTrace("CkfDebugger") << "now in correctTrajectory" ;
472  Trajectory::RecHitContainer hits = traj.recHits();
473 
474  std::vector<SimHitIdpr> currentTrackId = hitAssociator->associateHitId(*hits.front()->hit());
475  if (currentTrackId.size() == 0) return false;
476 
477  for (Trajectory::RecHitContainer::const_iterator rh=hits.begin(); rh!=hits.end(); ++rh) {
478 
479  //if invalid hit exit
480  if (!(*rh)->hit()->isValid()) {
481  //LogTrace("CkfDebugger") << "invalid hit" ;
482  return false;
483  }
484 
485  //if hits from deltas exit
486  bool nogoodhit = true;
487  std::vector<PSimHit> assSimHits = hitAssociator->associateHit(*(*rh)->hit());
488  for (std::vector<PSimHit>::iterator shit=assSimHits.begin();shit!=assSimHits.end();shit++){
489  if (goodSimHit(*shit)) nogoodhit=false;
490  }
491  if (nogoodhit) return false;
492 
493  //all hits must be associated to the same sim track
494  bool test = true;
495  std::vector<SimHitIdpr> nextTrackId = hitAssociator->associateHitId(*(*rh)->hit());
496  for (std::vector<SimHitIdpr>::iterator i=currentTrackId.begin();i!=currentTrackId.end();i++){
497  for (std::vector<SimHitIdpr>::iterator j=nextTrackId.begin();j!=nextTrackId.end();j++){
498  if (i->first == j->first) test = false;
499  //LogTrace("CkfDebugger") << "valid " << *i << " " << *j ;
500  trajId = j->first;
501  }
502  }
503  if (test) {/*LogTrace("CkfDebugger") << "returning false" ;*/return false;}
504  // std::vector<PSimHit*> simTrackHits = idHitsMap[trajId];
505  // if (!goodSimHit(simTrackHits.))
506  }
507  //LogTrace("CkfDebugger") << "returning true" ;
508  return true;
509 }
int i
Definition: DBlmapReader.cc:9
int j
Definition: DBlmapReader.cc:9
TrackerHitAssociator * hitAssociator
Definition: CkfDebugger.h:104
#define LogTrace(id)
ConstRecHitContainer RecHitContainer
Definition: Trajectory.h:48
std::vector< SimHitIdpr > associateHitId(const TrackingRecHit &thit) const
bool goodSimHit(const PSimHit &sh) const
Definition: CkfDebugger.cc:607
std::vector< PSimHit > associateHit(const TrackingRecHit &thit) const
void CkfDebugger::countSeed ( )
inline

Definition at line 51 of file CkfDebugger.h.

References totSeeds.

Referenced by cms::CkfDebugTrackCandidateMaker::countSeedsDebugger().

51 {totSeeds++;}
void CkfDebugger::deleteHitAssociator ( )
inline

Definition at line 65 of file CkfDebugger.h.

References hitAssociator.

Referenced by cms::CkfDebugTrackCandidateMaker::deleteAssocDebugger().

65  {
66  delete hitAssociator;
67  }
TrackerHitAssociator * hitAssociator
Definition: CkfDebugger.h:104
const GeomDetUnit* CkfDebugger::det ( const PSimHit sh) const
inlineprivate

Definition at line 149 of file CkfDebugger.h.

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

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

149 {return theTrackerGeom->idToDetUnit(DetId(sh->detUnitId()));};
virtual const TrackerGeomDet * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: DetId.h:18
const TrackerGeometry * theTrackerGeom
Definition: CkfDebugger.h:99
unsigned int detUnitId() const
Definition: PSimHit.h:93
void CkfDebugger::dumpSimHit ( const SimHit hit) const
private

Definition at line 185 of file CkfDebugger.cc.

References CkfDebugger::SimHit::globalPosition(), CkfDebugger::SimHit::pabs(), CkfDebugger::SimHit::particleType(), PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), and CkfDebugger::SimHit::trackId().

Referenced by printSimHits().

186 {
187  GlobalPoint pos = hit.globalPosition();
188  edm::LogVerbatim("CkfDebugger") << "SimHit pos" << pos
189  << " r=" << pos.perp() << " phi=" << pos.phi()
190  << " trackId=" << hit.trackId()
191  << " particleType=" << hit.particleType()
192  << " pabs=" << hit.pabs()
193  << " processType=" << hit. processType();
194 }
T perp() const
Definition: PV3DBase.h:72
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
void CkfDebugger::fillSeedHist ( CTTRHp  h1,
CTTRHp  h2,
TrajectoryStateOnSurface  t 
)
inline

Definition at line 53 of file CkfDebugger.h.

References hchi2seedAll, and testSeed().

Referenced by CkfDebugTrajectoryBuilder::fillSeedHistoDebugger().

53  {
54  //edm::LogVerbatim("CkfDebugger") << "CkfDebugger::fillSeedHist";
55  hchi2seedAll->Fill( testSeed(h1,h2,t) );
56  }
double testSeed(CTTRHp, CTTRHp, TrajectoryStateOnSurface)
Definition: CkfDebugger.cc:989
TH1F * hchi2seedAll
Definition: CkfDebugger.h:203
bool CkfDebugger::goodSimHit ( const PSimHit sh) const
private

Definition at line 607 of file CkfDebugger.cc.

References PSimHit::pabs().

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

608 {
609  if (sh.pabs() > 0.9) return true; // GeV, reject delta rays from association
610  else return false;
611 }
float pabs() const
fast and more accurate access to momentumAtEntry().mag()
Definition: PSimHit.h:63
bool CkfDebugger::hasDelta ( const PSimHit correctHit)
inlineprivate

Definition at line 135 of file CkfDebugger.h.

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

Referenced by analyseCompatibleMeasurements(), and testSeed().

135  {
136  bool delta = false;
137  for (std::vector<PSimHit>::iterator isim = hitAssociator->SimHitMap[correctHit->detUnitId()].begin();
138  isim != hitAssociator->SimHitMap[correctHit->detUnitId()].end(); ++isim){
139 /* edm::LogVerbatim("CkfDebugger") << "SimHit on this det at pos="<< position(&*isim) */
140 /* << " det=" << isim->detUnitId() << " process=" << isim->processType() ; */
141  if (isim->processType() == 9) delta = true;
142  }
143  return delta;
144  }
dbl * delta
Definition: mlp_gen.cc:36
TrackerHitAssociator * hitAssociator
Definition: CkfDebugger.h:104
unsigned int detUnitId() const
Definition: PSimHit.h:93
int CkfDebugger::layer ( const GeomDet det)
inlineprivate

Definition at line 151 of file CkfDebugger.h.

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

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

151  {
152  //return ((int)(((det->geographicalId().rawId() >>16) & 0xF)));
153  return theTopo->layer(det->geographicalId());
154  }
const TrackerTopology * theTopo
Definition: CkfDebugger.h:107
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:77
unsigned int layer(const DetId &id) const
vector< const PSimHit * > CkfDebugger::nextCorrectHits ( const Trajectory traj,
unsigned int &  trajId 
)
private

Definition at line 529 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(), query::result, DetId::subdetId(), theTrackerGeom, PSimHit::timeOfFlight(), and GeomDet::toGlobal().

Referenced by analyseCompatibleMeasurements().

530 {
531  std::vector<const PSimHit*> result;
532  // find the component of the RecHit at largest distance from origin (FIXME: should depend on propagation direction)
533  LogTrace("CkfDebugger") << "now in nextCorrectHits" ;
535  TransientTrackingRecHit::RecHitContainer comp = lastRecHit->transientHits();
536  if (!comp.empty()) {
537  float maxR = 0;
538  for (TransientTrackingRecHit::RecHitContainer::const_iterator ch=comp.begin();
539  ch!=comp.end(); ++ch) {
540  if ((*ch)->globalPosition().mag() > maxR) lastRecHit = *ch;
541  maxR = (*ch)->globalPosition().mag();
542  }
543  }
544  edm::LogVerbatim("CkfDebugger") << "CkfDebugger: lastRecHit is at gpos " << lastRecHit->globalPosition()
545  << " layer " << layer((lastRecHit->det()))
546  << " subdet " << lastRecHit->det()->geographicalId().subdetId() ;
547 
548  //find the simHits associated to the recHit
549  const std::vector<PSimHit>& pSimHitVec = hitAssociator->associateHit(*lastRecHit->hit());
550  for (std::vector<PSimHit>::const_iterator shit=pSimHitVec.begin();shit!=pSimHitVec.end();shit++){
551  const GeomDetUnit* detUnit = theTrackerGeom->idToDetUnit( DetId(shit->detUnitId()));
552  LogTrace("CkfDebugger") << "from hitAssociator SimHits are at GP=" << detUnit->toGlobal( shit->localPosition())
553  << " traId=" << shit->trackId() << " particleType " << shit->particleType()
554  << " pabs=" << shit->pabs() << " detUnitId=" << shit->detUnitId() << " layer " << layer((det(&*shit)))
555  << " subdet " << det(&*shit)->geographicalId().subdetId() ;
556  }
557 
558  //choose the simHit from the same track that has the highest tof
559  const PSimHit * lastPSH = 0;
560  if (!pSimHitVec.empty()) {
561  float maxTOF = 0;
562  for (std::vector<PSimHit>::const_iterator ch=pSimHitVec.begin(); ch!=pSimHitVec.end(); ++ch) {
563  if ( ( ch->trackId()== trajId) && (ch->timeOfFlight() > maxTOF) && ( goodSimHit(*ch) )) {
564  lastPSH = &*ch;
565  maxTOF = lastPSH->timeOfFlight();
566  }
567  }
568  }
569  else return result;//return empty vector: no more hits on the sim track
570  if (lastPSH == 0) return result; //return empty vector: no more good hits on the sim track
571  edm::LogVerbatim("CkfDebugger") << "CkfDebugger: corresponding SimHit is at gpos " << position(&*lastPSH) ;
572 
573  //take the simHits on the simTrack that are in the nextLayer (could be > 1 if overlap or matched)
574  std::vector<PSimHit*> trackHits = idHitsMap[trajId];
575  if (fabs((double)(trackHits.back()->detUnitId()-lastPSH->detUnitId()))<1 ) return result;//end of sim track
576  std::vector<PSimHit*>::iterator currentIt = trackHits.end();
577  for (std::vector<PSimHit*>::iterator it=trackHits.begin();
578  it!=trackHits.end();it++){
579  if (goodSimHit(**it) && //good hit
580  ( lastPSH->timeOfFlight()<(*it)->timeOfFlight() ) && //greater tof
581  //( fabs((double)((*it)->detUnitId()-(lastPSH->detUnitId()) ))>1) && //not components of the same matched hit
582  ( (det(lastPSH)->geographicalId().subdetId()!=det(*it)->geographicalId().subdetId()) ||
583  (layer(det(lastPSH))!=layer(det(*it)) ) ) //change layer or detector(tib,tob,...)
584  ){
585  edm::LogVerbatim("CkfDebugger") << "Next good PSimHit is at gpos " << position(*it) ;
586  result.push_back(*it);
587  currentIt = it;
588  break;
589  }
590  }
591  bool samelayer = true;
592  if (currentIt!=(trackHits.end()-1) && currentIt!=trackHits.end()) {
593  for (std::vector<PSimHit*>::iterator nextIt = currentIt; (samelayer && nextIt!=trackHits.end()) ;nextIt++){
594  if (goodSimHit(**nextIt)){
595  if ( (det(*nextIt)->geographicalId().subdetId()==det(*currentIt)->geographicalId().subdetId()) &&
596  (layer(det(*nextIt))==layer(det(*currentIt)) ) ) {
597  result.push_back(*nextIt);
598  }
599  else samelayer = false;
600  }
601  }
602  }
603 
604  return result;
605 }
virtual const TrackerGeomDet * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
ConstRecHitPointer const & recHit() const
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:52
std::vector< ConstRecHitPointer > RecHitContainer
float timeOfFlight() const
Definition: PSimHit.h:69
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
TrajectoryMeasurement const & lastMeasurement() const
Definition: Trajectory.h:181
tuple result
Definition: query.py:137
TrackerHitAssociator * hitAssociator
Definition: CkfDebugger.h:104
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:77
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
#define LogTrace(id)
Definition: DetId.h:18
const TrackerGeometry * theTrackerGeom
Definition: CkfDebugger.h:99
const GeomDetUnit * det(const PSimHit *sh) const
Definition: CkfDebugger.h:149
bool goodSimHit(const PSimHit &sh) const
Definition: CkfDebugger.cc:607
std::vector< PSimHit > associateHit(const TrackingRecHit &thit) const
int layer(const GeomDet *det)
Definition: CkfDebugger.h:151
Global3DPoint position(const PSimHit *sh) const
Definition: CkfDebugger.h:146
std::map< unsigned int, std::vector< PSimHit * > > idHitsMap
Definition: CkfDebugger.h:110
unsigned int detUnitId() const
Definition: PSimHit.h:93
Global3DPoint CkfDebugger::position ( const PSimHit sh) const
inlineprivate

Definition at line 146 of file CkfDebugger.h.

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

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

146  {
148  };
virtual const TrackerGeomDet * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:52
Local3DPoint localPosition() const
Definition: PSimHit.h:44
Definition: DetId.h:18
const TrackerGeometry * theTrackerGeom
Definition: CkfDebugger.h:99
unsigned int detUnitId() const
Definition: PSimHit.h:93
void CkfDebugger::printSimHits ( const edm::Event iEvent)

Definition at line 156 of file CkfDebugger.cc.

References dumpSimHit(), hitAssociator, edm::EventBase::id(), idHitsMap, TrackerGeometry::idToDetUnit(), python.multivaluedict::map(), TrackerHitAssociator::SimHitMap, python.multivaluedict::sort(), and theTrackerGeom.

Referenced by cms::CkfDebugTrackCandidateMaker::printHitsDebugger().

157 {
158  edm::LogVerbatim("CkfDebugger") << "\nEVENT #" << iEvent.id();
159 
160  hitAssociator = new TrackerHitAssociator(iEvent);//delete deleteHitAssociator() in TrackCandMaker.cc
161 
162  std::map<unsigned int, std::vector<PSimHit> >& theHitsMap = hitAssociator->SimHitMap;
163  idHitsMap.clear();
164 
165  for (std::map<unsigned int, std::vector<PSimHit> >::iterator it=theHitsMap.begin();
166  it!=theHitsMap.end();it++){
167  for (std::vector<PSimHit>::iterator isim = it->second.begin();
168  isim != it->second.end(); ++isim){
169  idHitsMap[isim->trackId()].push_back(&*isim);
170  }
171  }
172 
173  for (std::map<unsigned int,std::vector<PSimHit*> >::iterator it=idHitsMap.begin();
174  it!=idHitsMap.end();it++){
175  sort(it->second.begin(),it->second.end(),less_mag());
176  for (std::vector<PSimHit*>::iterator isim = it->second.begin();
177  isim != it->second.end(); ++isim){
178  const GeomDetUnit* detUnit = theTrackerGeom->idToDetUnit( DetId((*isim)->detUnitId()));
179  dumpSimHit(SimHit( (*isim), detUnit));
180  }
181  }
182 
183 }
virtual const TrackerGeomDet * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
void dumpSimHit(const SimHit &hit) const
Definition: CkfDebugger.cc:185
TrackerHitAssociator * hitAssociator
Definition: CkfDebugger.h:104
Definition: DetId.h:18
const TrackerGeometry * theTrackerGeom
Definition: CkfDebugger.h:99
edm::EventID id() const
Definition: EventBase.h:60
std::map< unsigned int, std::vector< PSimHit * > > idHitsMap
Definition: CkfDebugger.h:110
const PSimHit * CkfDebugger::pSimHit ( unsigned int  tkId,
DetId  detId 
)
private

Definition at line 892 of file CkfDebugger.cc.

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

Referenced by analyseRecHitExistance().

893 {
894  for (std::vector<PSimHit*>::iterator shi=idHitsMap[tkId].begin(); shi!=idHitsMap[tkId].end(); ++shi) {
895  if ( (*shi)->detUnitId() == detId.rawId() &&
896  //(shi)->trackId() == tkId &&
897  goodSimHit(**shi) ) {
898  return (*shi);
899  }
900  }
901  return 0;
902 }
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
#define begin
Definition: vmac.h:30
bool goodSimHit(const PSimHit &sh) const
Definition: CkfDebugger.cc:607
std::map< unsigned int, std::vector< PSimHit * > > idHitsMap
Definition: CkfDebugger.h:110
double CkfDebugger::testSeed ( CTTRHp  recHit1,
CTTRHp  recHit2,
TrajectoryStateOnSurface  state 
)
private

Definition at line 989 of file CkfDebugger.cc.

References TrackerHitAssociator::associateHit(), hasDelta(), hitAssociator, TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localParameters(), PSimHit::localPosition(), LogTrace, PV3DBase< T, PVType, FrameType >::mag(), LocalTrajectoryError::matrix(), PSimHit::momentumAtEntry(), dttmaxenums::R, findQualityFiles::v, LocalTrajectoryParameters::vector(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by analyseCompatibleMeasurements(), and fillSeedHist().

989  {
990  //edm::LogVerbatim("CkfDebugger") << "CkfDebugger::testSeed";
991  //test Deltas
992  const std::vector<PSimHit>& pSimHitVec1 = hitAssociator->associateHit(*recHit1->hit());
993  const std::vector<PSimHit>& pSimHitVec2 = hitAssociator->associateHit(*recHit2->hit());
994 
995  if ( pSimHitVec1.size()==0 || pSimHitVec2.size()==0 || hasDelta(&(*pSimHitVec1.begin())) || hasDelta(&(*pSimHitVec2.begin())) ) {
996  edm::LogVerbatim("CkfDebugger") << "Seed has delta or problems" ;
997  return -1;
998  }
999 
1000  // LogTrace("CkfDebugger") << "state=\n" << state ;
1001  // double stlp1 = state.localParameters().vector()[0];
1002  // double stlp2 = state.localParameters().vector()[1];
1003  // double stlp3 = state.localParameters().vector()[2];
1004  // double stlp4 = state.localParameters().vector()[3];
1005  // double stlp5 = state.localParameters().vector()[4];
1006 
1007  if (pSimHitVec2.size()!=0) {
1008  const PSimHit& simHit = *pSimHitVec2.begin();
1009 
1010  double shlp1 = -1/simHit.momentumAtEntry().mag();
1011  double shlp2 = simHit.momentumAtEntry().x()/simHit.momentumAtEntry().z();
1012  double shlp3 = simHit.momentumAtEntry().y()/simHit.momentumAtEntry().z();
1013  double shlp4 = simHit.localPosition().x();
1014  double shlp5 = simHit.localPosition().y();
1016  v[0] = shlp1;
1017  v[1] = shlp2;
1018  v[2] = shlp3;
1019  v[3] = shlp4;
1020  v[4] = shlp5;
1021 
1022  // LogTrace("CkfDebugger") << "simHit.localPosition()=" << simHit.localPosition() ;
1023  // LogTrace("CkfDebugger") << "simHit.momentumAtEntry()=" << simHit.momentumAtEntry() ;
1024  // LogTrace("CkfDebugger") << "recHit2->localPosition()=" << recHit2->localPosition() ;
1025  // LogTrace("CkfDebugger") << "recHit2->localPositionError()=" << recHit2->localPositionError() ;
1026  // LogTrace("CkfDebugger") << "state.localPosition()=" << state.localPosition() ;
1027  // LogTrace("CkfDebugger") << "state.localError().positionError()=" << state.localError().positionError() ;
1028 
1029  // LogTrace("CkfDebugger") << "pullx(sh-rh)=" << (simHit.localPosition().x()-recHit2->localPosition().x())/sqrt(recHit2->localPositionError().xx()) ;
1030  // LogTrace("CkfDebugger") << "pullx(sh-st)=" << (simHit.localPosition().x()-state.localPosition().x())/sqrt(state.localError().positionError().xx()) ;
1031  // LogTrace("CkfDebugger") << "pullx(st-rh)=" << (state.localPosition().x()-recHit2->localPosition().x())/
1032  // sqrt(recHit2->localPositionError().xx()+state.localError().positionError().xx()) ;
1033 
1034  // LogTrace("CkfDebugger") << "local parameters" ;
1035  // LogTrace("CkfDebugger") << left;
1036  // LogTrace("CkfDebugger") << setw(15) << stlp1 << setw(15) << shlp1 << setw(15) << sqrt(state.localError().matrix()[0][0])
1037  // << setw(15) << (stlp1-shlp1)/stlp1 << setw(15) << (stlp1-shlp1)/sqrt(state.localError().matrix()[0][0]) ;
1038  // LogTrace("CkfDebugger") << setw(15) << stlp2 << setw(15) << shlp2 << setw(15) << sqrt(state.localError().matrix()[1][1])
1039  // << setw(15) << (stlp2-shlp2)/stlp2 << setw(15) << (stlp2-shlp2)/sqrt(state.localError().matrix()[1][1]) ;
1040  // LogTrace("CkfDebugger") << setw(15) << stlp3 << setw(15) << shlp3 << setw(15) << sqrt(state.localError().matrix()[2][2])
1041  // << setw(15) << (stlp3-shlp3)/stlp3 << setw(15) << (stlp3-shlp3)/sqrt(state.localError().matrix()[2][2]) ;
1042  // LogTrace("CkfDebugger") << setw(15) << stlp4 << setw(15) << shlp4 << setw(15) << sqrt(state.localError().matrix()[3][3])
1043  // << setw(15) << (stlp4-shlp4)/stlp4 << setw(15) << (stlp4-shlp4)/sqrt(state.localError().matrix()[3][3]) ;
1044  // LogTrace("CkfDebugger") << setw(15) << stlp5 << setw(15) << shlp5 << setw(15) << sqrt(state.localError().matrix()[4][4]) <<
1045  // setw(15) << (stlp5-shlp5)/stlp5 << setw(15) << (stlp5-shlp5)/sqrt(state.localError().matrix()[4][4]) ;
1046 
1048  R.Invert();
1049  double chi2 = ROOT::Math::Similarity(v-state.localParameters().vector(), R);
1050  LogTrace("CkfDebugger") << "chi2=" << chi2 ;
1051  return chi2;
1052  }
1053 
1054  return 0;//fixme
1055 
1056 }
bool hasDelta(const PSimHit *correctHit)
Definition: CkfDebugger.h:135
const LocalTrajectoryParameters & localParameters() const
LocalVector momentumAtEntry() const
The momentum of the track that produced the hit, at entry point.
Definition: PSimHit.h:47
T y() const
Definition: PV3DBase.h:63
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
AlgebraicVector5 vector() const
T mag() const
Definition: PV3DBase.h:67
Local3DPoint localPosition() const
Definition: PSimHit.h:44
T z() const
Definition: PV3DBase.h:64
TrackerHitAssociator * hitAssociator
Definition: CkfDebugger.h:104
const AlgebraicSymMatrix55 & matrix() const
const LocalTrajectoryError & localError() const
#define LogTrace(id)
ROOT::Math::SVector< double, 5 > AlgebraicVector5
std::vector< PSimHit > associateHit(const TrackingRecHit &thit) const
T x() const
Definition: PV3DBase.h:62

Member Data Documentation

int CkfDebugger::chi2gt30
private

Definition at line 236 of file CkfDebugger.h.

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

int CkfDebugger::chi2gt30delta
private

Definition at line 237 of file CkfDebugger.h.

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

int CkfDebugger::chi2gt30deltaSeed
private

Definition at line 238 of file CkfDebugger.h.

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

int CkfDebugger::chi2ls30
private

Definition at line 239 of file CkfDebugger.h.

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

int CkfDebugger::det_not_found
private

Definition at line 235 of file CkfDebugger.h.

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

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

Definition at line 195 of file CkfDebugger.h.

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

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

Definition at line 196 of file CkfDebugger.h.

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

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

Definition at line 197 of file CkfDebugger.h.

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

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

Definition at line 198 of file CkfDebugger.h.

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

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

Definition at line 199 of file CkfDebugger.h.

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

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

Definition at line 200 of file CkfDebugger.h.

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

TFile* CkfDebugger::file
private

Definition at line 202 of file CkfDebugger.h.

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

int CkfDebugger::glued_det_not_fuond
private

Definition at line 246 of file CkfDebugger.h.

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

TH1F* CkfDebugger::hchi2seedAll
private

Definition at line 203 of file CkfDebugger.h.

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

TH1F * CkfDebugger::hchi2seedProb
private

Definition at line 203 of file CkfDebugger.h.

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

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

Definition at line 219 of file CkfDebugger.h.

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

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

Definition at line 220 of file CkfDebugger.h.

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

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

Definition at line 221 of file CkfDebugger.h.

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

TH2F* CkfDebugger::hPullGPXvsGPeta_shst
private

Definition at line 227 of file CkfDebugger.h.

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

TH2F* CkfDebugger::hPullGPXvsGPphi_shst
private

Definition at line 228 of file CkfDebugger.h.

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

TH2F* CkfDebugger::hPullGPXvsGPr_shst
private

Definition at line 226 of file CkfDebugger.h.

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

TH2F* CkfDebugger::hPullGPXvsGPX_shst
private

Definition at line 223 of file CkfDebugger.h.

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

TH2F* CkfDebugger::hPullGPXvsGPY_shst
private

Definition at line 224 of file CkfDebugger.h.

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

TH2F* CkfDebugger::hPullGPXvsGPZ_shst
private

Definition at line 225 of file CkfDebugger.h.

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

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

Definition at line 212 of file CkfDebugger.h.

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

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

Definition at line 214 of file CkfDebugger.h.

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

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

Definition at line 216 of file CkfDebugger.h.

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

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

Definition at line 213 of file CkfDebugger.h.

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

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

Definition at line 215 of file CkfDebugger.h.

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

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

Definition at line 217 of file CkfDebugger.h.

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

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

Definition at line 205 of file CkfDebugger.h.

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

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

Definition at line 207 of file CkfDebugger.h.

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

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

Definition at line 209 of file CkfDebugger.h.

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

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

Definition at line 206 of file CkfDebugger.h.

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

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

Definition at line 208 of file CkfDebugger.h.

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

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

Definition at line 210 of file CkfDebugger.h.

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

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

Definition at line 110 of file CkfDebugger.h.

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

int CkfDebugger::layer_not_found
private

Definition at line 234 of file CkfDebugger.h.

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

int CkfDebugger::matched_not_associated
private

Definition at line 244 of file CkfDebugger.h.

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

int CkfDebugger::matched_not_found
private

Definition at line 243 of file CkfDebugger.h.

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

int CkfDebugger::no_component
private

Definition at line 241 of file CkfDebugger.h.

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

int CkfDebugger::no_layer
private

Definition at line 233 of file CkfDebugger.h.

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

int CkfDebugger::no_sim_hit
private

Definition at line 232 of file CkfDebugger.h.

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

int CkfDebugger::only_one_component
private

Definition at line 242 of file CkfDebugger.h.

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

int CkfDebugger::other
private

Definition at line 248 of file CkfDebugger.h.

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

int CkfDebugger::partner_det_not_fuond
private

Definition at line 245 of file CkfDebugger.h.

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

int CkfDebugger::problems
private

Definition at line 231 of file CkfDebugger.h.

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

int CkfDebugger::propagation
private

Definition at line 247 of file CkfDebugger.h.

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

int CkfDebugger::seedWithDelta
private

Definition at line 230 of file CkfDebugger.h.

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

int CkfDebugger::simple_hit_not_found
private

Definition at line 240 of file CkfDebugger.h.

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

const MeasurementEstimator* CkfDebugger::theChi2
private
const Propagator* CkfDebugger::theForwardPropagator
private
const GeometricSearchTracker* CkfDebugger::theGeomSearchTracker
private

Definition at line 101 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), and analyseRecHitNotFound().

const MagneticField* CkfDebugger::theMagField
private

Definition at line 100 of file CkfDebugger.h.

Referenced by analyseRecHitExistance(), and CkfDebugger().

const MeasurementTracker* CkfDebugger::theMeasurementTracker
private

Definition at line 105 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), and analyseRecHitExistance().

NavigationSchool const* CkfDebugger::theNavSchool
private

Definition at line 108 of file CkfDebugger.h.

Referenced by analyseRecHitNotFound(), and CkfDebugger().

const TrackerTopology* CkfDebugger::theTopo
private

Definition at line 107 of file CkfDebugger.h.

Referenced by CkfDebugger(), and layer().

const TrackerGeometry* CkfDebugger::theTrackerGeom
private

Definition at line 99 of file CkfDebugger.h.

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

const TransientTrackingRecHitBuilder* CkfDebugger::theTTRHBuilder
private

Definition at line 106 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements().

int CkfDebugger::totchi2gt30
private

Definition at line 249 of file CkfDebugger.h.

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

int CkfDebugger::totSeeds
private

Definition at line 251 of file CkfDebugger.h.

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