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 GeomDetUnit *det)
 
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
 
const TrackerGeometrytheTrackerGeom
 
const
TransientTrackingRecHitBuilder
theTTRHBuilder
 
int totchi2gt30
 
int totSeeds
 

Detailed Description

Definition at line 48 of file CkfDebugger.h.

Member Typedef Documentation

Definition at line 75 of file CkfDebugger.h.

Definition at line 76 of file CkfDebugger.h.

Constructor & Destructor Documentation

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

Definition at line 35 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, propagation, seedWithDelta, simple_hit_not_found, theMagField, theTrackerGeom, indexGen::title, totchi2gt30, and patCandidatesForDimuonsSequences_cff::tracker.

35  :totSeeds(0)
36 {
37  file = new TFile("out.root","recreate");
38  hchi2seedAll = new TH1F("hchi2seedAll","hchi2seedAll",2000,0,200);
39  hchi2seedProb = new TH1F("hchi2seedProb","hchi2seedProb",2000,0,200);
40 
42  es.get<TrackerDigiGeometryRecord>().get(tracker);
43  theTrackerGeom = &(*tracker);
44 
46  es.get<IdealMagneticFieldRecord>().get(theField);
47  theMagField = &(*theField);
48 
49  for (int i=0; i!=17; i++){
50  dump.push_back(0);
51  }
52 
53  std::stringstream title;
54  for (int i=0; i!=6; i++)
55  for (int j=0; j!=9; j++){
56  if (i==0 && j>2) break;
57  if (i==1 && j>1) break;
58  if (i==2 && j>3) break;
59  if (i==3 && j>2) break;
60  if (i==4 && j>5) break;
61  if (i==5 && j>8) break;
62  dump2[pair<int,int>(i,j)]=0;
63  dump3[pair<int,int>(i,j)]=0;
64  dump4[pair<int,int>(i,j)]=0;
65  dump5[pair<int,int>(i,j)]=0;
66  dump6[pair<int,int>(i,j)]=0;
67  title.str("");
68  title << "pullX_" << i+1 << "-" << j+1 << "_sh-rh";
69  hPullX_shrh[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
70  title.str("");
71  title << "pullY_" << i+1 << "-" << j+1 << "_sh-rh";
72  hPullY_shrh[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
73  title.str("");
74  title << "pullX_" << i+1 << "-" << j+1 << "_sh-st";
75  hPullX_shst[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
76  title.str("");
77  title << "pullY_" << i+1 << "-" << j+1 << "_sh-st";
78  hPullY_shst[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
79  title.str("");
80  title << "pullX_" << i+1 << "-" << j+1 << "_st-rh";
81  hPullX_strh[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
82  title.str("");
83  title << "pullY_" << i+1 << "-" << j+1 << "_st-rh";
84  hPullY_strh[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
85  title.str("");
86  title << "PullGP_X_" << i+1 << "-" << j+1 << "_sh-st";
87  hPullGP_X_shst[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
88  title.str("");
89  title << "PullGP_Y_" << i+1 << "-" << j+1 << "_sh-st";
90  hPullGP_Y_shst[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
91  title.str("");
92  title << "PullGP_Z_" << i+1 << "-" << j+1 << "_sh-st";
93  hPullGP_Z_shst[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
94  if ( ((i==2||i==4)&&(j==0||j==1)) || (i==3||i==5) ){
95  title.str("");
96  title << "pullM_" << i+1 << "-" << j+1 << "_sh-rh";
97  hPullM_shrh[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
98  title.str("");
99  title << "pullS_" << i+1 << "-" << j+1 << "_sh-rh";
100  hPullS_shrh[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
101  title.str("");
102  title << "pullM_" << i+1 << "-" << j+1 << "_sh-st";
103  hPullM_shst[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
104  title.str("");
105  title << "pullS_" << i+1 << "-" << j+1 << "_sh-st";
106  hPullS_shst[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
107  title.str("");
108  title << "pullM_" << i+1 << "-" << j+1 << "_st-rh";
109  hPullM_strh[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
110  title.str("");
111  title << "pullS_" << i+1 << "-" << j+1 << "_st-rh";
112  hPullS_strh[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
113  }
114  }
115 
116  hPullGPXvsGPX_shst = new TH2F("PullGPXvsGPX_shst","PullGPXvsGPX_shst",1000,-50,50,100,-50,50);
117  hPullGPXvsGPY_shst = new TH2F("PullGPXvsGPY_shst","PullGPXvsGPY_shst",1000,-50,50,100,-50,50);
118  hPullGPXvsGPZ_shst = new TH2F("PullGPXvsGPZ_shst","PullGPXvsGPZ_shst",1000,-50,50,200,-100,100);
119  hPullGPXvsGPr_shst = new TH2F("PullGPXvsGPr_shst","PullGPXvsGPr_shst",1000,-50,50,300,-150,150);
120  hPullGPXvsGPeta_shst = new TH2F("PullGPXvsGPeta_shst","PullGPXvsGPeta_shst",1000,-50,50,50,-2.5,2.5);
121  hPullGPXvsGPphi_shst = new TH2F("PullGPXvsGPphi_shst","PullGPXvsGPphi_shst",1000,-50,50,63,0,6.3);
122 
123  seedWithDelta=0;
124  problems=0;
125  no_sim_hit=0;
126  no_layer=0;
127  layer_not_found=0;
128  det_not_found=0;
129  chi2gt30=0;
130  chi2gt30delta=0;
132  chi2ls30=0;
134  no_component=0;
140  propagation=0;
141  other=0;
142  totchi2gt30=0;
143 }
int i
Definition: DBlmapReader.cc:9
std::map< std::string, TH1F * > hPullS_shrh
Definition: CkfDebugger.h:234
std::map< std::string, TH1F * > hPullY_shst
Definition: CkfDebugger.h:229
std::map< std::pair< int, int >, int > dump6
Definition: CkfDebugger.h:221
TH2F * hPullGPXvsGPeta_shst
Definition: CkfDebugger.h:248
const MagneticField * theMagField
Definition: CkfDebugger.h:105
std::map< std::string, TH1F * > hPullGP_Z_shst
Definition: CkfDebugger.h:242
std::map< std::string, TH1F * > hPullY_strh
Definition: CkfDebugger.h:231
std::map< std::string, TH1F * > hPullM_shrh
Definition: CkfDebugger.h:233
std::map< std::string, TH1F * > hPullX_shst
Definition: CkfDebugger.h:228
int partner_det_not_fuond
Definition: CkfDebugger.h:266
int det_not_found
Definition: CkfDebugger.h:256
int seedWithDelta
Definition: CkfDebugger.h:251
std::map< std::string, TH1F * > hPullM_shst
Definition: CkfDebugger.h:235
int matched_not_found
Definition: CkfDebugger.h:264
std::map< std::string, TH1F * > hPullGP_Y_shst
Definition: CkfDebugger.h:241
int matched_not_associated
Definition: CkfDebugger.h:265
int only_one_component
Definition: CkfDebugger.h:263
TH2F * hPullGPXvsGPr_shst
Definition: CkfDebugger.h:247
int glued_det_not_fuond
Definition: CkfDebugger.h:267
TH1F * hchi2seedAll
Definition: CkfDebugger.h:224
int j
Definition: DBlmapReader.cc:9
TH2F * hPullGPXvsGPY_shst
Definition: CkfDebugger.h:245
std::map< std::string, TH1F * > hPullX_shrh
Definition: CkfDebugger.h:226
std::map< std::string, TH1F * > hPullGP_X_shst
Definition: CkfDebugger.h:240
int chi2gt30deltaSeed
Definition: CkfDebugger.h:259
std::map< std::string, TH1F * > hPullM_strh
Definition: CkfDebugger.h:237
std::map< std::string, TH1F * > hPullS_shst
Definition: CkfDebugger.h:236
int simple_hit_not_found
Definition: CkfDebugger.h:261
std::map< std::pair< int, int >, int > dump2
Definition: CkfDebugger.h:217
std::map< std::string, TH1F * > hPullS_strh
Definition: CkfDebugger.h:238
TFile * file
Definition: CkfDebugger.h:223
const TrackerGeometry * theTrackerGeom
Definition: CkfDebugger.h:104
std::map< std::string, TH1F * > hPullY_shrh
Definition: CkfDebugger.h:227
TH2F * hPullGPXvsGPX_shst
Definition: CkfDebugger.h:244
std::map< std::string, TH1F * > hPullX_strh
Definition: CkfDebugger.h:230
int layer_not_found
Definition: CkfDebugger.h:255
int no_component
Definition: CkfDebugger.h:262
TH2F * hPullGPXvsGPZ_shst
Definition: CkfDebugger.h:246
std::vector< int > dump
Definition: CkfDebugger.h:216
std::map< std::pair< int, int >, int > dump5
Definition: CkfDebugger.h:220
TH1F * hchi2seedProb
Definition: CkfDebugger.h:224
std::map< std::pair< int, int >, int > dump4
Definition: CkfDebugger.h:219
TH2F * hPullGPXvsGPphi_shst
Definition: CkfDebugger.h:249
int chi2gt30delta
Definition: CkfDebugger.h:258
std::map< std::pair< int, int >, int > dump3
Definition: CkfDebugger.h:218
CkfDebugger::~CkfDebugger ( )

Definition at line 1046 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.

1046  {
1047  for (int it=0; it!=((int)(dump.size())); it++)
1048  edm::LogVerbatim("CkfDebugger") << "dump " << it << " " << dump[it] ;
1049 
1050  edm::LogVerbatim("CkfDebugger") ;
1051  edm::LogVerbatim("CkfDebugger") << "seedWithDelta=" << ((double)seedWithDelta/totSeeds) ;
1052  edm::LogVerbatim("CkfDebugger") << "problems=" << ((double)problems/totSeeds) ;
1053  edm::LogVerbatim("CkfDebugger") << "no_sim_hit=" << ((double)no_sim_hit/totSeeds) ;
1054  edm::LogVerbatim("CkfDebugger") << "no_layer=" << ((double)no_layer/totSeeds) ;
1055  edm::LogVerbatim("CkfDebugger") << "layer_not_found=" << ((double)layer_not_found/totSeeds) ;
1056  edm::LogVerbatim("CkfDebugger") << "det_not_found=" << ((double)det_not_found/totSeeds) ;
1057  edm::LogVerbatim("CkfDebugger") << "chi2gt30=" << ((double)chi2gt30/totSeeds) ;
1058  edm::LogVerbatim("CkfDebugger") << "chi2gt30deltaSeed=" << ((double)chi2gt30deltaSeed/totSeeds) ;
1059  edm::LogVerbatim("CkfDebugger") << "chi2gt30delta=" << ((double)chi2gt30delta/totSeeds) ;
1060  edm::LogVerbatim("CkfDebugger") << "chi2ls30=" << ((double)chi2ls30/totSeeds) ;
1061  edm::LogVerbatim("CkfDebugger") << "simple_hit_not_found=" << ((double)simple_hit_not_found/totSeeds) ;
1062  edm::LogVerbatim("CkfDebugger") << "no_component=" << ((double)no_component/totSeeds) ;
1063  edm::LogVerbatim("CkfDebugger") << "only_one_component=" << ((double)only_one_component/totSeeds) ;
1064  edm::LogVerbatim("CkfDebugger") << "matched_not_found=" << ((double)matched_not_found/totSeeds) ;
1065  edm::LogVerbatim("CkfDebugger") << "matched_not_associated=" << ((double)matched_not_associated/totSeeds) ;
1066  edm::LogVerbatim("CkfDebugger") << "partner_det_not_fuond=" << ((double)partner_det_not_fuond/totSeeds) ;
1067  edm::LogVerbatim("CkfDebugger") << "glued_det_not_fuond=" << ((double)glued_det_not_fuond/totSeeds) ;
1068  edm::LogVerbatim("CkfDebugger") << "propagation=" << ((double)propagation/totSeeds) ;
1069  edm::LogVerbatim("CkfDebugger") << "other=" << ((double)other/totSeeds) ;
1070  edm::LogVerbatim("CkfDebugger") << "totchi2gt30=" << ((double)totchi2gt30/totSeeds) ;
1071  edm::LogVerbatim("CkfDebugger") << "totSeeds=" << totSeeds ;
1072  edm::LogVerbatim("CkfDebugger") ;
1073 
1074  edm::LogVerbatim("CkfDebugger") << "layer navigation problems:" ;
1075  for (int i=0; i!=6; i++)
1076  for (int j=0; j!=9; j++){
1077  if (i==0 && j>2) break;
1078  if (i==1 && j>1) break;
1079  if (i==2 && j>3) break;
1080  if (i==3 && j>2) break;
1081  if (i==4 && j>5) break;
1082  if (i==5 && j>8) break;
1083  edm::LogVerbatim("CkfDebugger") << "det=" << i+1 << " lay=" << j+1 << " " << dump2[pair<int,int>(i,j)] ;
1084  }
1085  edm::LogVerbatim("CkfDebugger") << "\nlayer with hit having chi2>30:" ;
1086  for (int i=0; i!=6; i++)
1087  for (int j=0; j!=9; j++){
1088  if (i==0 && j>2) break;
1089  if (i==1 && j>1) break;
1090  if (i==2 && j>3) break;
1091  if (i==3 && j>2) break;
1092  if (i==4 && j>5) break;
1093  if (i==5 && j>8) break;
1094  edm::LogVerbatim("CkfDebugger") << "det=" << i+1 << " lay=" << j+1 << " " << dump3[pair<int,int>(i,j)] ;
1095  }
1096  edm::LogVerbatim("CkfDebugger") << "\nlayer with hit having chi2>30 for delta rays:" ;
1097  for (int i=0; i!=6; i++)
1098  for (int j=0; j!=9; j++){
1099  if (i==0 && j>2) break;
1100  if (i==1 && j>1) break;
1101  if (i==2 && j>3) break;
1102  if (i==3 && j>2) break;
1103  if (i==4 && j>5) break;
1104  if (i==5 && j>8) break;
1105  edm::LogVerbatim("CkfDebugger") << "det=" << i+1 << " lay=" << j+1 << " " << dump5[pair<int,int>(i,j)] ;
1106  }
1107  edm::LogVerbatim("CkfDebugger") << "\nlayer with det not found:" ;
1108  for (int i=0; i!=6; i++)
1109  for (int j=0; j!=9; j++){
1110  if (i==0 && j>2) break;
1111  if (i==1 && j>1) break;
1112  if (i==2 && j>3) break;
1113  if (i==3 && j>2) break;
1114  if (i==4 && j>5) break;
1115  if (i==5 && j>8) break;
1116  edm::LogVerbatim("CkfDebugger") << "det=" << i+1 << " lay=" << j+1 << " " << dump4[pair<int,int>(i,j)] ;
1117  }
1118  edm::LogVerbatim("CkfDebugger") << "\nlayer with correct RecHit after missing Sim Hit:" ;
1119  for (int i=0; i!=6; i++)
1120  for (int j=0; j!=9; j++){
1121  if (i==0 && j>2) break;
1122  if (i==1 && j>1) break;
1123  if (i==2 && j>3) break;
1124  if (i==3 && j>2) break;
1125  if (i==4 && j>5) break;
1126  if (i==5 && j>8) break;
1127  edm::LogVerbatim("CkfDebugger") << "det=" << i+1 << " lay=" << j+1 << " " << dump6[pair<int,int>(i,j)] ;
1128  }
1129  hchi2seedAll->Write();
1130  hchi2seedProb->Write();
1131  std::stringstream title;
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  title.str("");
1141  title << "pullX_" << i+1 << "-" << j+1 << "_sh-rh";
1142  hPullX_shrh[title.str()]->Write();
1143  title.str("");
1144  title << "pullY_" << i+1 << "-" << j+1 << "_sh-rh";
1145  hPullY_shrh[title.str()]->Write();
1146  title.str("");
1147  title << "pullX_" << i+1 << "-" << j+1 << "_sh-st";
1148  hPullX_shst[title.str()]->Write();
1149  title.str("");
1150  title << "pullY_" << i+1 << "-" << j+1 << "_sh-st";
1151  hPullY_shst[title.str()]->Write();
1152  title.str("");
1153  title << "pullX_" << i+1 << "-" << j+1 << "_st-rh";
1154  hPullX_strh[title.str()]->Write();
1155  title.str("");
1156  title << "pullY_" << i+1 << "-" << j+1 << "_st-rh";
1157  hPullY_strh[title.str()]->Write();
1158  title.str("");
1159  title << "PullGP_X_" << i+1 << "-" << j+1 << "_sh-st";
1160  hPullGP_X_shst[title.str()]->Write();
1161  title.str("");
1162  title << "PullGP_Y_" << i+1 << "-" << j+1 << "_sh-st";
1163  hPullGP_Y_shst[title.str()]->Write();
1164  title.str("");
1165  title << "PullGP_Z_" << i+1 << "-" << j+1 << "_sh-st";
1166  hPullGP_Z_shst[title.str()]->Write();
1167  if ( ((i==2||i==4)&&(j==0||j==1)) || (i==3||i==5) ){
1168  title.str("");
1169  title << "pullM_" << i+1 << "-" << j+1 << "_sh-rh";
1170  hPullM_shrh[title.str()]->Write();
1171  title.str("");
1172  title << "pullS_" << i+1 << "-" << j+1 << "_sh-rh";
1173  hPullS_shrh[title.str()]->Write();
1174  title.str("");
1175  title << "pullM_" << i+1 << "-" << j+1 << "_sh-st";
1176  hPullM_shst[title.str()]->Write();
1177  title.str("");
1178  title << "pullS_" << i+1 << "-" << j+1 << "_sh-st";
1179  hPullS_shst[title.str()]->Write();
1180  title.str("");
1181  title << "pullM_" << i+1 << "-" << j+1 << "_st-rh";
1182  hPullM_strh[title.str()]->Write();
1183  title.str("");
1184  title << "pullS_" << i+1 << "-" << j+1 << "_st-rh";
1185  hPullS_strh[title.str()]->Write();
1186  }
1187  }
1188  hPullGPXvsGPX_shst->Write();
1189  hPullGPXvsGPY_shst->Write();
1190  hPullGPXvsGPZ_shst->Write();
1191  hPullGPXvsGPr_shst->Write();
1192  hPullGPXvsGPeta_shst->Write();
1193  hPullGPXvsGPphi_shst->Write();
1194 
1195  //file->Write();
1196  file->Close();
1197 }
int i
Definition: DBlmapReader.cc:9
std::map< std::string, TH1F * > hPullS_shrh
Definition: CkfDebugger.h:234
std::map< std::string, TH1F * > hPullY_shst
Definition: CkfDebugger.h:229
std::map< std::pair< int, int >, int > dump6
Definition: CkfDebugger.h:221
TH2F * hPullGPXvsGPeta_shst
Definition: CkfDebugger.h:248
std::map< std::string, TH1F * > hPullGP_Z_shst
Definition: CkfDebugger.h:242
std::map< std::string, TH1F * > hPullY_strh
Definition: CkfDebugger.h:231
std::map< std::string, TH1F * > hPullM_shrh
Definition: CkfDebugger.h:233
std::map< std::string, TH1F * > hPullX_shst
Definition: CkfDebugger.h:228
int partner_det_not_fuond
Definition: CkfDebugger.h:266
int det_not_found
Definition: CkfDebugger.h:256
int seedWithDelta
Definition: CkfDebugger.h:251
std::map< std::string, TH1F * > hPullM_shst
Definition: CkfDebugger.h:235
int matched_not_found
Definition: CkfDebugger.h:264
std::map< std::string, TH1F * > hPullGP_Y_shst
Definition: CkfDebugger.h:241
int matched_not_associated
Definition: CkfDebugger.h:265
int only_one_component
Definition: CkfDebugger.h:263
TH2F * hPullGPXvsGPr_shst
Definition: CkfDebugger.h:247
int glued_det_not_fuond
Definition: CkfDebugger.h:267
TH1F * hchi2seedAll
Definition: CkfDebugger.h:224
int j
Definition: DBlmapReader.cc:9
TH2F * hPullGPXvsGPY_shst
Definition: CkfDebugger.h:245
std::map< std::string, TH1F * > hPullX_shrh
Definition: CkfDebugger.h:226
std::map< std::string, TH1F * > hPullGP_X_shst
Definition: CkfDebugger.h:240
int chi2gt30deltaSeed
Definition: CkfDebugger.h:259
std::map< std::string, TH1F * > hPullM_strh
Definition: CkfDebugger.h:237
std::map< std::string, TH1F * > hPullS_shst
Definition: CkfDebugger.h:236
int simple_hit_not_found
Definition: CkfDebugger.h:261
std::map< std::pair< int, int >, int > dump2
Definition: CkfDebugger.h:217
std::map< std::string, TH1F * > hPullS_strh
Definition: CkfDebugger.h:238
TFile * file
Definition: CkfDebugger.h:223
std::map< std::string, TH1F * > hPullY_shrh
Definition: CkfDebugger.h:227
TH2F * hPullGPXvsGPX_shst
Definition: CkfDebugger.h:244
std::map< std::string, TH1F * > hPullX_strh
Definition: CkfDebugger.h:230
int layer_not_found
Definition: CkfDebugger.h:255
int no_component
Definition: CkfDebugger.h:262
TH2F * hPullGPXvsGPZ_shst
Definition: CkfDebugger.h:246
std::vector< int > dump
Definition: CkfDebugger.h:216
std::map< std::pair< int, int >, int > dump5
Definition: CkfDebugger.h:220
TH1F * hchi2seedProb
Definition: CkfDebugger.h:224
std::map< std::pair< int, int >, int > dump4
Definition: CkfDebugger.h:219
TH2F * hPullGPXvsGPphi_shst
Definition: CkfDebugger.h:249
int chi2gt30delta
Definition: CkfDebugger.h:258
std::map< std::pair< int, int >, int > dump3
Definition: CkfDebugger.h:218

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 186 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, 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, 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(), LargeD0_PixelPairStep_cff::propagator, TrajectoryMeasurement::recHit(), query::result, alignCSCRings::s, seedWithDelta, mathSSE::sqrt(), GeomDet::surface(), TrajectoryStateOnSurface::surface(), lumiQTWidget::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().

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

Definition at line 669 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(), trackerHitRTTI::proj, TrackingRecHitProjector< ResultingHit >::project(), Propagator::propagate(), propagation, pSimHit(), dttmaxenums::R, alignCSCRings::r, MeasurementDet::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().

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

References BoundSurface::bounds(), GeometricSearchDet::compatibleDets(), det(), det_not_found, GeometricSearchTracker::detLayer(), Trajectory::direction(), dump6, GeomDet::geographicalId(), gluedId(), Trajectory::lastLayer(), Trajectory::lastMeasurement(), layer(), layer_not_found, Bounds::length(), LogTrace, DetLayer::nextLayers(), no_layer, no_sim_hit, DetId::rawId(), BarrelDetLayer::specificSurface(), run_regression::test, theChi2, theForwardPropagator, theGeomSearchTracker, TrajectoryMeasurement::updatedState(), and Bounds::width().

Referenced by analyseCompatibleMeasurements().

892 {
893  unsigned int correctDetId = correctRecHit->det()->geographicalId().rawId();
894  int correctLayId = layer(correctRecHit->det());
895  LogTrace("CkfDebugger") << "correct layer id=" << correctLayId ;
896 
897  TSOS currentState( traj.lastMeasurement().updatedState() );
898  std::vector<const DetLayer*> nl = traj.lastLayer()->nextLayers( *currentState.freeState(),traj.direction() );
899  if (nl.empty()) {
900  edm::LogVerbatim("CkfDebugger") << "no compatible layers" ;
901  no_layer++;return 2;
902  }
903 
904  TkLayerLess lless;//FIXME - was lless(traj.direction())
905  const DetLayer* detLayer = 0;
906  bool navLayerAfter = false;
907  bool test = false;
908  for (std::vector<const DetLayer*>::iterator il = nl.begin(); il != nl.end(); il++) {
909  if ( dynamic_cast<const BarrelDetLayer*>(*il) ){
910  const BarrelDetLayer* pbl = dynamic_cast<const BarrelDetLayer*>(*il);
911  LogTrace("CkfDebugger") << "pbl->specificSurface().bounds().length()=" << pbl->specificSurface().bounds().length() ;
912  LogTrace("CkfDebugger") << "pbl->specificSurface().bounds().width()=" << pbl->specificSurface().bounds().width() ;
913  }
914  int layId = layer(((*(*il)->basicComponents().begin())));
915  LogTrace("CkfDebugger") << " subdet=" << (*(*il)->basicComponents().begin())->geographicalId().subdetId() << "layer id=" << layId ;
916  if (layId==correctLayId) {
917  test = true;
918  detLayer = &**il;
919  break;
920  }
921  if ( lless( *il, theGeomSearchTracker->detLayer(correctRecHit->det()->geographicalId()) ))
922  navLayerAfter = true; //it is enough that only one layer is after the correct one?
923  }
924 
925  if (test) {
926  edm::LogVerbatim("CkfDebugger") << "correct layer taken into account. layer id: " << correctLayId ;
927  } else if (navLayerAfter){
928  edm::LogVerbatim("CkfDebugger")<< "SimHit layer after the layers returned by Navigation.";
929  edm::LogVerbatim("CkfDebugger")<< "Probably a missing SimHit." ;
930  edm::LogVerbatim("CkfDebugger")<< "check: " << (correctRecHit->det()->geographicalId().subdetId()) << " " << (layer(correctRecHit->det()));
931  dump6[pair<int,int>((correctRecHit->det()->geographicalId().subdetId()-1),(layer(correctRecHit->det()))-1)]++;
932  no_sim_hit++;return 16;
933  }
934  else {
935  edm::LogVerbatim("CkfDebugger") << "correct layer NOT taken into account. correct layer id: " << correctLayId ;
936  layer_not_found++;
937  return 3;
938  }
939 
941  std::vector<DetWithState> compatDets = detLayer->compatibleDets(currentState,*theForwardPropagator,*theChi2);
942  // LogTrace("CkfDebugger") << "DEBUGGER" ;
943  // LogTrace("CkfDebugger") << "runned compatDets." ;
944  // LogTrace("CkfDebugger") << "started from the following TSOS:" ;
945  // LogTrace("CkfDebugger") << currentState ;
946  // LogTrace("CkfDebugger") << "number of dets found=" << compatDets.size() ;
947  // for (std::vector<DetWithState>::iterator det=compatDets.begin();det!=compatDets.end();det++){
948  // unsigned int detId = det->first->geographicalId().rawId();
949  // LogTrace("CkfDebugger") << "detId=" << detId ;
950  // }
951  bool test2 = false;
952  for (std::vector<DetWithState>::iterator det=compatDets.begin();det!=compatDets.end();det++){
953  unsigned int detId = det->first->geographicalId().rawId();
954  // LogTrace("CkfDebugger") << "detId=" << detId
955  // << "\ncorrectRecHit->det()->geographicalId().rawId()=" << correctRecHit->det()->geographicalId().rawId()
956  // << "\ngluedId(correctRecHit->det()->geographicalId()).rawId()=" << gluedId(correctRecHit->det()->geographicalId()).rawId()
957  // ;
958  if (detId==gluedId(correctRecHit->det()->geographicalId()).rawId()) {
959  test2=true;
960  break;
961  }
962  }
963 
964  if (test2){
965  edm::LogVerbatim("CkfDebugger") << "correct det taken into account. correctDetId is: " << correctDetId
966  << ". please check chi2." ;
967  return 5;
968  }
969  else {
970  edm::LogVerbatim("CkfDebugger") << "correct det NOT taken into account. correctDetId: " << correctDetId ;
971  det_not_found++;return 4;
972  }
973 
974 }
std::map< std::pair< int, int >, int > dump6
Definition: CkfDebugger.h:221
virtual float length() const =0
const GeometricSearchTracker * theGeomSearchTracker
Definition: CkfDebugger.h:106
virtual std::vector< const DetLayer * > nextLayers(NavigationDirection direction) const
Definition: DetLayer.cc:35
int det_not_found
Definition: CkfDebugger.h:256
virtual std::vector< DetWithState > compatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
const MeasurementEstimator * theChi2
Definition: CkfDebugger.h:107
PropagationDirection const & direction() const
Definition: Trajectory.cc:195
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
int layer(const GeomDetUnit *det)
Definition: CkfDebugger.h:154
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:72
TrajectoryStateOnSurface updatedState() const
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
#define LogTrace(id)
const Propagator * theForwardPropagator
Definition: CkfDebugger.h:108
const Bounds & bounds() const
Definition: BoundSurface.h:89
virtual const BoundCylinder & specificSurface() const
Extension of the interface.
const GeomDetUnit * det(const PSimHit *sh) const
Definition: CkfDebugger.h:152
const DetLayer * lastLayer() const
Redundant method, returns the layer of lastMeasurement() .
Definition: Trajectory.h:284
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
int layer_not_found
Definition: CkfDebugger.h:255
virtual float width() const =0
DetId gluedId(const DetId &du)
bool CkfDebugger::associated ( CTTRHp  rechit,
const PSimHit sh 
) const
private

Definition at line 603 of file CkfDebugger.cc.

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

Referenced by analyseRecHitExistance(), and correctMeas().

604 {
605  LogTrace("CkfDebugger") << "now in associated" ;
606 
607  if (!rechit->isValid()) return false;
608  // LogTrace("CkfDebugger") << "rec hit valid" ;
609  const std::vector<PSimHit>& pSimHitVec = hitAssociator->associateHit(*rechit->hit());
610  // LogTrace("CkfDebugger") << "size=" << pSimHitVec.size() ;
611  for (std::vector<PSimHit>::const_iterator shit=pSimHitVec.begin();shit!=pSimHitVec.end();shit++){
612  //const GeomDetUnit* detUnit = theTrackerGeom->idToDetUnit( DetId(shit->detUnitId()));
613  // LogTrace("CkfDebugger") << "pSimHit.timeOfFlight()=" << pSimHit.timeOfFlight()
614  // << " pSimHit.pabs()=" << pSimHit.pabs() << " GP=" << position(&pSimHit);
615  // LogTrace("CkfDebugger") << "(*shit).timeOfFlight()=" << (*shit).timeOfFlight()
616  // << " (*shit).pabs()=" << (*shit).pabs() << " GP=" << detUnit->toGlobal( shit->localPosition());
617  if ( ( fabs((*shit).timeOfFlight()-pSimHit.timeOfFlight())<1e-9 ) &&
618  ( fabs((*shit).pabs()-pSimHit.pabs())<1e-9 ) ) return true;
619  }
620  return false;
621 }
float timeOfFlight() const
Definition: PSimHit.h:69
TrackerHitAssociator * hitAssociator
Definition: CkfDebugger.h:109
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 PSimHit * pSimHit(unsigned int tkId, DetId detId)
Definition: CkfDebugger.cc:879
int CkfDebugger::assocTrackId ( CTTRHp  rechit) const
private

Definition at line 500 of file CkfDebugger.cc.

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

Referenced by correctMeas().

501 {
502  LogTrace("CkfDebugger") << "now in assocTrackId" ;
503 
504  if (!rechit->hit()->isValid()) {
505  return -1;
506  }
507 
508  std::vector<SimHitIdpr> ids = hitAssociator->associateHitId(*rechit->hit());
509  if (ids.size()!=0) {
510  return ids[0].first;//FIXME if size>1!!
511  }
512  else {
513  return -1;
514  }
515 }
std::vector< SimHitIdpr > associateHitId(const TrackingRecHit &thit)
TrackerHitAssociator * hitAssociator
Definition: CkfDebugger.h:109
#define LogTrace(id)
template<unsigned int D>
std::pair<double,double> CkfDebugger::computePulls ( CTTRHp  recHit,
TSOS  startingState 
)
inlineprivate

Definition at line 178 of file CkfDebugger.h.

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

Referenced by analyseCompatibleMeasurements().

178  {
179  typedef typename AlgebraicROOTObject<D>::Vector VecD;
180  typedef typename AlgebraicROOTObject<D,D>::SymMatrix SMatDD;
181  TSOS detState = theForwardPropagator->propagate(startingState,recHit->det()->surface());
182  LogTrace("CkfDebugger") << "parameters=" << recHit->parameters() ;
183  LogTrace("CkfDebugger") << "parametersError=" << recHit->parametersError() ;
184  MeasurementExtractor me(detState);
185  VecD r = asSVector<D>(recHit->parameters()) - me.measuredParameters<D>(*recHit);
186  LogTrace("CkfDebugger") << "me.measuredParameters=" << me.measuredParameters<D>(*recHit) ;
187  LogTrace("CkfDebugger") << "me.measuredError=" << me.measuredError<D>(*recHit) ;
188  SMatDD R = asSMatrix<D>(recHit->parametersError()) + me.measuredError<D>(*recHit);
189  LogTrace("CkfDebugger") << "r=" << r ;
190  LogTrace("CkfDebugger") << "R=" << R ;
191  R.Invert();
192  LogTrace("CkfDebugger") << "R(-1)=" << R ;
193  LogTrace("CkfDebugger") << "chi2=" << ROOT::Math::Similarity(r,R) ;
194  double pullX=(-r[0])*sqrt(R(0,0));
195  double r_1 = 0;
196  if ( VecD::Dim() >= 2 )
197  {
198  r_1 = r[1];
199  }
200  double pullY=(-r_1)*sqrt(R(1,1));
201  LogTrace("CkfDebugger") << "pullX=" << pullX ;
202  LogTrace("CkfDebugger") << "pullY=" << pullY ;
203  return std::pair<double,double>(pullX,pullY);
204  }
ROOT::Math::SMatrix< double, D1, D1, ROOT::Math::MatRepSym< double, D1 > > SymMatrix
T sqrt(T t)
Definition: SSEVec.h:46
#define LogTrace(id)
virtual TrajectoryStateOnSurface propagate(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:12
const Propagator * theForwardPropagator
Definition: CkfDebugger.h:108
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 205 of file CkfDebugger.h.

References edm::hlt::Exception.

205  {
206  switch (recHit->dimension()) {
207  case 1: return computePulls<1>(recHit,startingState);
208  case 2: return computePulls<2>(recHit,startingState);
209  case 3: return computePulls<3>(recHit,startingState);
210  case 4: return computePulls<4>(recHit,startingState);
211  case 5: return computePulls<5>(recHit,startingState);
212  }
213  throw cms::Exception("CkfDebugger error: rechit of dimension not 1,2,3,4,5");
214  }
bool CkfDebugger::correctMeas ( const TM tm,
const PSimHit correctHit 
) const
private

Definition at line 623 of file CkfDebugger.cc.

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

Referenced by analyseCompatibleMeasurements().

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

Definition at line 458 of file CkfDebugger.cc.

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

Referenced by analyseCompatibleMeasurements().

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

Definition at line 56 of file CkfDebugger.h.

References totSeeds.

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

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

Definition at line 70 of file CkfDebugger.h.

References hitAssociator.

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

70  {
71  delete hitAssociator;
72  }
TrackerHitAssociator * hitAssociator
Definition: CkfDebugger.h:109
const GeomDetUnit* CkfDebugger::det ( const PSimHit sh) const
inlineprivate

Definition at line 152 of file CkfDebugger.h.

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

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

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

Definition at line 174 of file CkfDebugger.cc.

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

Referenced by printSimHits().

175 {
176  GlobalPoint pos = hit.globalPosition();
177  edm::LogVerbatim("CkfDebugger") << "SimHit pos" << pos
178  << " r=" << pos.perp() << " phi=" << pos.phi()
179  << " trackId=" << hit.trackId()
180  << " particleType=" << hit.particleType()
181  << " pabs=" << hit.pabs()
182  << " processType=" << hit. processType();
183 }
T perp() const
Definition: PV3DBase.h:71
Geom::Phi< T > phi() const
Definition: PV3DBase.h:68
void CkfDebugger::fillSeedHist ( CTTRHp  h1,
CTTRHp  h2,
TrajectoryStateOnSurface  t 
)
inline

Definition at line 58 of file CkfDebugger.h.

References hchi2seedAll, and testSeed().

Referenced by CkfDebugTrajectoryBuilder::fillSeedHistoDebugger().

58  {
59  //edm::LogVerbatim("CkfDebugger") << "CkfDebugger::fillSeedHist";
60  hchi2seedAll->Fill( testSeed(h1,h2,t) );
61  }
double testSeed(CTTRHp, CTTRHp, TrajectoryStateOnSurface)
Definition: CkfDebugger.cc:976
TH1F * hchi2seedAll
Definition: CkfDebugger.h:224
bool CkfDebugger::goodSimHit ( const PSimHit sh) const
private

Definition at line 596 of file CkfDebugger.cc.

References PSimHit::pabs().

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

597 {
598  if (sh.pabs() > 0.9) return true; // GeV, reject delta rays from association
599  else return false;
600 }
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 138 of file CkfDebugger.h.

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

Referenced by analyseCompatibleMeasurements(), and testSeed().

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

Definition at line 154 of file CkfDebugger.h.

References GeomDet::geographicalId().

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

154  {
155  //return ((int)(((det->geographicalId().rawId() >>16) & 0xF)));
156  DetId id=det->geographicalId();
157  if (id.subdetId()==3) return ((TIBDetId)(id)).layer();
158  if (id.subdetId()==5) return ((TOBDetId)(id)).layer();
159  if (id.subdetId()==1) return ((PXBDetId)(id)).layer();
160  if (id.subdetId()==4) return ((TIDDetId)(id)).wheel();
161  if (id.subdetId()==6) return ((TECDetId)(id)).wheel();
162  if (id.subdetId()==2) return ((PXFDetId)(id)).disk();
163  return 0;
164  }
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:72
Definition: DetId.h:20
int CkfDebugger::layer ( const GeomDet det)
inlineprivate

Definition at line 165 of file CkfDebugger.h.

References GeomDet::geographicalId().

Referenced by geometryXMLparser.DTAlignable::index(), and geometryXMLparser.CSCAlignable::index().

165  {
166  //return ((int)(((det->geographicalId().rawId() >>16) & 0xF)));
167  DetId id=det->geographicalId();
168  if (id.subdetId()==3) return ((TIBDetId)(id)).layer();
169  if (id.subdetId()==5) return ((TOBDetId)(id)).layer();
170  if (id.subdetId()==1) return ((PXBDetId)(id)).layer();
171  if (id.subdetId()==4) return ((TIDDetId)(id)).wheel();
172  if (id.subdetId()==6) return ((TECDetId)(id)).wheel();
173  if (id.subdetId()==2) return ((PXFDetId)(id)).disk();
174  return 0;
175  }
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:72
Definition: DetId.h:20
vector< const PSimHit * > CkfDebugger::nextCorrectHits ( const Trajectory traj,
unsigned int &  trajId 
)
private

Definition at line 518 of file CkfDebugger.cc.

References TrackerHitAssociator::associateHit(), 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().

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

Definition at line 149 of file CkfDebugger.h.

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

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

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

Definition at line 145 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().

146 {
147  edm::LogVerbatim("CkfDebugger") << "\nEVENT #" << iEvent.id();
148 
149  hitAssociator = new TrackerHitAssociator(iEvent);//delete deleteHitAssociator() in TrackCandMaker.cc
150 
151  std::map<unsigned int, std::vector<PSimHit> >& theHitsMap = hitAssociator->SimHitMap;
152  idHitsMap.clear();
153 
154  for (std::map<unsigned int, std::vector<PSimHit> >::iterator it=theHitsMap.begin();
155  it!=theHitsMap.end();it++){
156  for (std::vector<PSimHit>::iterator isim = it->second.begin();
157  isim != it->second.end(); ++isim){
158  idHitsMap[isim->trackId()].push_back(&*isim);
159  }
160  }
161 
162  for (std::map<unsigned int,std::vector<PSimHit*> >::iterator it=idHitsMap.begin();
163  it!=idHitsMap.end();it++){
164  sort(it->second.begin(),it->second.end(),less_mag());
165  for (std::vector<PSimHit*>::iterator isim = it->second.begin();
166  isim != it->second.end(); ++isim){
167  const GeomDetUnit* detUnit = theTrackerGeom->idToDetUnit( DetId((*isim)->detUnitId()));
168  dumpSimHit(SimHit( (*isim), detUnit));
169  }
170  }
171 
172 }
void dumpSimHit(const SimHit &hit) const
Definition: CkfDebugger.cc:174
TrackerHitAssociator * hitAssociator
Definition: CkfDebugger.h:109
Definition: DetId.h:20
virtual const GeomDetUnit * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
const TrackerGeometry * theTrackerGeom
Definition: CkfDebugger.h:104
edm::EventID id() const
Definition: EventBase.h:56
std::map< unsigned int, std::vector< PSimHit * > > idHitsMap
Definition: CkfDebugger.h:113
const PSimHit * CkfDebugger::pSimHit ( unsigned int  tkId,
DetId  detId 
)
private

Definition at line 879 of file CkfDebugger.cc.

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

Referenced by analyseRecHitExistance().

880 {
881  for (std::vector<PSimHit*>::iterator shi=idHitsMap[tkId].begin(); shi!=idHitsMap[tkId].end(); ++shi) {
882  if ( (*shi)->detUnitId() == detId.rawId() &&
883  //(shi)->trackId() == tkId &&
884  goodSimHit(**shi) ) {
885  return (*shi);
886  }
887  }
888  return 0;
889 }
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
#define begin
Definition: vmac.h:31
bool goodSimHit(const PSimHit &sh) const
Definition: CkfDebugger.cc:596
std::map< unsigned int, std::vector< PSimHit * > > idHitsMap
Definition: CkfDebugger.h:113
double CkfDebugger::testSeed ( CTTRHp  recHit1,
CTTRHp  recHit2,
TrajectoryStateOnSurface  state 
)
private

Definition at line 976 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, v, LocalTrajectoryParameters::vector(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by analyseCompatibleMeasurements(), and fillSeedHist().

976  {
977  //edm::LogVerbatim("CkfDebugger") << "CkfDebugger::testSeed";
978  //test Deltas
979  const std::vector<PSimHit>& pSimHitVec1 = hitAssociator->associateHit(*recHit1->hit());
980  const std::vector<PSimHit>& pSimHitVec2 = hitAssociator->associateHit(*recHit2->hit());
981 
982  if ( pSimHitVec1.size()==0 || pSimHitVec2.size()==0 || hasDelta(&(*pSimHitVec1.begin())) || hasDelta(&(*pSimHitVec2.begin())) ) {
983  edm::LogVerbatim("CkfDebugger") << "Seed has delta or problems" ;
984  return -1;
985  }
986 
987  // LogTrace("CkfDebugger") << "state=\n" << state ;
988  // double stlp1 = state.localParameters().vector()[0];
989  // double stlp2 = state.localParameters().vector()[1];
990  // double stlp3 = state.localParameters().vector()[2];
991  // double stlp4 = state.localParameters().vector()[3];
992  // double stlp5 = state.localParameters().vector()[4];
993 
994  if (pSimHitVec2.size()!=0) {
995  const PSimHit& simHit = *pSimHitVec2.begin();
996 
997  double shlp1 = -1/simHit.momentumAtEntry().mag();
998  double shlp2 = simHit.momentumAtEntry().x()/simHit.momentumAtEntry().z();
999  double shlp3 = simHit.momentumAtEntry().y()/simHit.momentumAtEntry().z();
1000  double shlp4 = simHit.localPosition().x();
1001  double shlp5 = simHit.localPosition().y();
1003  v[0] = shlp1;
1004  v[1] = shlp2;
1005  v[2] = shlp3;
1006  v[3] = shlp4;
1007  v[4] = shlp5;
1008 
1009  // LogTrace("CkfDebugger") << "simHit.localPosition()=" << simHit.localPosition() ;
1010  // LogTrace("CkfDebugger") << "simHit.momentumAtEntry()=" << simHit.momentumAtEntry() ;
1011  // LogTrace("CkfDebugger") << "recHit2->localPosition()=" << recHit2->localPosition() ;
1012  // LogTrace("CkfDebugger") << "recHit2->localPositionError()=" << recHit2->localPositionError() ;
1013  // LogTrace("CkfDebugger") << "state.localPosition()=" << state.localPosition() ;
1014  // LogTrace("CkfDebugger") << "state.localError().positionError()=" << state.localError().positionError() ;
1015 
1016  // LogTrace("CkfDebugger") << "pullx(sh-rh)=" << (simHit.localPosition().x()-recHit2->localPosition().x())/sqrt(recHit2->localPositionError().xx()) ;
1017  // LogTrace("CkfDebugger") << "pullx(sh-st)=" << (simHit.localPosition().x()-state.localPosition().x())/sqrt(state.localError().positionError().xx()) ;
1018  // LogTrace("CkfDebugger") << "pullx(st-rh)=" << (state.localPosition().x()-recHit2->localPosition().x())/
1019  // sqrt(recHit2->localPositionError().xx()+state.localError().positionError().xx()) ;
1020 
1021  // LogTrace("CkfDebugger") << "local parameters" ;
1022  // LogTrace("CkfDebugger") << left;
1023  // LogTrace("CkfDebugger") << setw(15) << stlp1 << setw(15) << shlp1 << setw(15) << sqrt(state.localError().matrix()[0][0])
1024  // << setw(15) << (stlp1-shlp1)/stlp1 << setw(15) << (stlp1-shlp1)/sqrt(state.localError().matrix()[0][0]) ;
1025  // LogTrace("CkfDebugger") << setw(15) << stlp2 << setw(15) << shlp2 << setw(15) << sqrt(state.localError().matrix()[1][1])
1026  // << setw(15) << (stlp2-shlp2)/stlp2 << setw(15) << (stlp2-shlp2)/sqrt(state.localError().matrix()[1][1]) ;
1027  // LogTrace("CkfDebugger") << setw(15) << stlp3 << setw(15) << shlp3 << setw(15) << sqrt(state.localError().matrix()[2][2])
1028  // << setw(15) << (stlp3-shlp3)/stlp3 << setw(15) << (stlp3-shlp3)/sqrt(state.localError().matrix()[2][2]) ;
1029  // LogTrace("CkfDebugger") << setw(15) << stlp4 << setw(15) << shlp4 << setw(15) << sqrt(state.localError().matrix()[3][3])
1030  // << setw(15) << (stlp4-shlp4)/stlp4 << setw(15) << (stlp4-shlp4)/sqrt(state.localError().matrix()[3][3]) ;
1031  // LogTrace("CkfDebugger") << setw(15) << stlp5 << setw(15) << shlp5 << setw(15) << sqrt(state.localError().matrix()[4][4]) <<
1032  // setw(15) << (stlp5-shlp5)/stlp5 << setw(15) << (stlp5-shlp5)/sqrt(state.localError().matrix()[4][4]) ;
1033 
1035  R.Invert();
1036  double chi2 = ROOT::Math::Similarity(v-state.localParameters().vector(), R);
1037  LogTrace("CkfDebugger") << "chi2=" << chi2 ;
1038  return chi2;
1039  }
1040 
1041  return 0;//fixme
1042 
1043 }
bool hasDelta(const PSimHit *correctHit)
Definition: CkfDebugger.h:138
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:62
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
AlgebraicVector5 vector() const
T mag() const
Definition: PV3DBase.h:66
Local3DPoint localPosition() const
Definition: PSimHit.h:44
T z() const
Definition: PV3DBase.h:63
TrackerHitAssociator * hitAssociator
Definition: CkfDebugger.h:109
const AlgebraicSymMatrix55 & matrix() const
const LocalTrajectoryError & localError() const
#define LogTrace(id)
ROOT::Math::SVector< double, 5 > AlgebraicVector5
std::vector< PSimHit > associateHit(const TrackingRecHit &thit)
T x() const
Definition: PV3DBase.h:61
mathSSE::Vec4< T > v

Member Data Documentation

int CkfDebugger::chi2gt30
private

Definition at line 257 of file CkfDebugger.h.

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

int CkfDebugger::chi2gt30delta
private

Definition at line 258 of file CkfDebugger.h.

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

int CkfDebugger::chi2gt30deltaSeed
private

Definition at line 259 of file CkfDebugger.h.

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

int CkfDebugger::chi2ls30
private

Definition at line 260 of file CkfDebugger.h.

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

int CkfDebugger::det_not_found
private

Definition at line 256 of file CkfDebugger.h.

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

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

Definition at line 216 of file CkfDebugger.h.

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

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

Definition at line 217 of file CkfDebugger.h.

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

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

Definition at line 218 of file CkfDebugger.h.

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

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

Definition at line 219 of file CkfDebugger.h.

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

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

Definition at line 220 of file CkfDebugger.h.

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

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

Definition at line 221 of file CkfDebugger.h.

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

TFile* CkfDebugger::file
private

Definition at line 223 of file CkfDebugger.h.

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

int CkfDebugger::glued_det_not_fuond
private

Definition at line 267 of file CkfDebugger.h.

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

TH1F* CkfDebugger::hchi2seedAll
private

Definition at line 224 of file CkfDebugger.h.

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

TH1F * CkfDebugger::hchi2seedProb
private

Definition at line 224 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 240 of file CkfDebugger.h.

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

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

Definition at line 241 of file CkfDebugger.h.

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

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

Definition at line 242 of file CkfDebugger.h.

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

TH2F* CkfDebugger::hPullGPXvsGPeta_shst
private

Definition at line 248 of file CkfDebugger.h.

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

TH2F* CkfDebugger::hPullGPXvsGPphi_shst
private

Definition at line 249 of file CkfDebugger.h.

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

TH2F* CkfDebugger::hPullGPXvsGPr_shst
private

Definition at line 247 of file CkfDebugger.h.

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

TH2F* CkfDebugger::hPullGPXvsGPX_shst
private

Definition at line 244 of file CkfDebugger.h.

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

TH2F* CkfDebugger::hPullGPXvsGPY_shst
private

Definition at line 245 of file CkfDebugger.h.

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

TH2F* CkfDebugger::hPullGPXvsGPZ_shst
private

Definition at line 246 of file CkfDebugger.h.

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

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

Definition at line 233 of file CkfDebugger.h.

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

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

Definition at line 235 of file CkfDebugger.h.

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

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

Definition at line 237 of file CkfDebugger.h.

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

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

Definition at line 234 of file CkfDebugger.h.

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

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

Definition at line 236 of file CkfDebugger.h.

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

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

Definition at line 238 of file CkfDebugger.h.

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

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

Definition at line 226 of file CkfDebugger.h.

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

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

Definition at line 228 of file CkfDebugger.h.

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

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

Definition at line 230 of file CkfDebugger.h.

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

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

Definition at line 227 of file CkfDebugger.h.

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

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

Definition at line 229 of file CkfDebugger.h.

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

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

Definition at line 231 of file CkfDebugger.h.

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

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

Definition at line 113 of file CkfDebugger.h.

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

int CkfDebugger::layer_not_found
private

Definition at line 255 of file CkfDebugger.h.

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

int CkfDebugger::matched_not_associated
private

Definition at line 265 of file CkfDebugger.h.

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

int CkfDebugger::matched_not_found
private

Definition at line 264 of file CkfDebugger.h.

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

int CkfDebugger::no_component
private

Definition at line 262 of file CkfDebugger.h.

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

int CkfDebugger::no_layer
private

Definition at line 254 of file CkfDebugger.h.

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

int CkfDebugger::no_sim_hit
private

Definition at line 253 of file CkfDebugger.h.

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

int CkfDebugger::only_one_component
private

Definition at line 263 of file CkfDebugger.h.

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

int CkfDebugger::other
private

Definition at line 269 of file CkfDebugger.h.

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

int CkfDebugger::partner_det_not_fuond
private

Definition at line 266 of file CkfDebugger.h.

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

int CkfDebugger::problems
private

Definition at line 252 of file CkfDebugger.h.

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

int CkfDebugger::propagation
private

Definition at line 268 of file CkfDebugger.h.

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

int CkfDebugger::seedWithDelta
private

Definition at line 251 of file CkfDebugger.h.

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

int CkfDebugger::simple_hit_not_found
private

Definition at line 261 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 106 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), and analyseRecHitNotFound().

const MagneticField* CkfDebugger::theMagField
private

Definition at line 105 of file CkfDebugger.h.

Referenced by analyseRecHitExistance(), and CkfDebugger().

const MeasurementTracker* CkfDebugger::theMeasurementTracker
private

Definition at line 110 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements(), and analyseRecHitExistance().

const TrackerGeometry* CkfDebugger::theTrackerGeom
private

Definition at line 104 of file CkfDebugger.h.

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

const TransientTrackingRecHitBuilder* CkfDebugger::theTTRHBuilder
private

Definition at line 111 of file CkfDebugger.h.

Referenced by analyseCompatibleMeasurements().

int CkfDebugger::totchi2gt30
private

Definition at line 270 of file CkfDebugger.h.

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

int CkfDebugger::totSeeds
private

Definition at line 272 of file CkfDebugger.h.

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