11 #include <g4hough/SvtxVertexMap.h>
12 #include <g4hough/SvtxVertex.h>
13 #include <g4hough/SvtxTrackMap.h>
14 #include <g4hough/SvtxTrack.h>
32 _inner_layer_mask(0x7),
33 _truept_dptoverpt(NULL),
35 _truept_particles_leaving7Hits(NULL),
36 _truept_particles_recoWithExactHits(NULL),
37 _truept_particles_recoWithin1Hit(NULL),
38 _truept_particles_recoWithin2Hits(NULL),
39 _truept_particles_recoWithExactInnerHits(NULL),
40 _truept_particles_recoWithin1InnerHit(NULL),
41 _truept_particles_recoWithin2InnerHits(NULL),
42 _truept_particles_recoWithin3Percent(NULL),
43 _truept_particles_recoWithin4Percent(NULL),
44 _truept_particles_recoWithin5Percent(NULL),
45 _recopt_tracks_all(NULL),
46 _recopt_tracks_recoWithExactHits(NULL),
47 _recopt_tracks_recoWithin1Hit(NULL),
48 _recopt_tracks_recoWithin2Hits(NULL),
49 _recopt_tracks_recoWithExactInnerHits(NULL),
50 _recopt_tracks_recoWithin1InnerHit(NULL),
51 _recopt_tracks_recoWithin2InnerHits(NULL),
52 _recopt_tracks_recoWithin3Percent(NULL),
53 _recopt_tracks_recoWithin4Percent(NULL),
54 _recopt_tracks_recoWithin5Percent(NULL),
55 _recopt_quality(NULL),
59 _truept_quality_particles_recoWithin4Percent(NULL),
60 _recopt_quality_tracks_all(NULL),
61 _recopt_quality_tracks_recoWithin4Percent(NULL) {
80 "truept_particles_leaving7Hits",
84 "truept_particles_recoWithExactHits",
88 "truept_particles_recoWithin1Hit",
92 "truept_particles_recoWithin2Hits",
96 "truept_particles_recoWithExactInnerHits",
100 "truept_particles_recoWithin1InnerHit",
104 "truept_particles_recoWithin2InnerHits",
109 "truept_particles_recoWithin3Percent",
113 "truept_particles_recoWithin4Percent",
117 "truept_particles_recoWithin5Percent",
125 "recopt_tracks_recoWithExactHits",
129 "recopt_tracks_recoWithin1Hit",
133 "recopt_tracks_recoWithin2Hits",
137 "recopt_tracks_recoWithExactInnerHits",
141 "recopt_tracks_recoWithin1InnerHit",
145 "recopt_tracks_recoWithin2InnerHits",
149 "recopt_tracks_recoWithin3Percent",
153 "recopt_tracks_recoWithin4Percent",
157 "recopt_tracks_recoWithin5Percent",
178 "truept_quality_particles_recoWithin4Percent",
183 "recopt_quality_tracks_all",
188 "recopt_quality_tracks_recoWithin4Percent",
245 cerr <<
PHWHERE <<
" ERROR: Can't find G4TruthInfo" << endl;
249 SvtxTrackMap* trackmap = findNode::getClass<SvtxTrackMap>(topNode,
"SvtxTrackMap");
251 cerr <<
PHWHERE <<
" ERROR: Can't find SvtxTrackMap" << endl;
255 SvtxVertexMap* vertexmap = findNode::getClass<SvtxVertexMap>(topNode,
"SvtxVertexMap");
257 cerr <<
PHWHERE <<
" ERROR: Can't find SvtxVertexMap" << endl;
271 iter != range.second;
274 if (trutheval->
get_embed(g4particle) <= 0)
continue;
276 std::set<PHG4Hit*> g4hits = trutheval->
all_truth_hits(g4particle);
279 float truept = sqrt(pow(g4particle->
get_px(),2)+pow(g4particle->
get_py(),2));
287 if (!track) {
continue;}
290 float recopt = track->
get_pt();
292 unsigned int ndiff = abs((
int)nfromtruth-(
int)
_nlayers);
305 unsigned int ninnerhitsfromtruth = 0;
306 unsigned int ninnerlayers = 0;
307 for (
unsigned int i = 0;
i < 32; ++
i) {
308 ninnerhitsfromtruth += (0x1 & (innerhits >>
i));
312 ndiff = abs((
int)ninnerhitsfromtruth-(
int)ninnerlayers);
323 float diff = fabs(recopt-truept)/truept;
339 iter != trackmap->
end();
343 float recopt = track->
get_pt();
346 float truept = sqrt(pow(g4particle->
get_px(),2)+pow(g4particle->
get_py(),2));
348 if (trutheval->
get_embed(g4particle) > 0) {
361 unsigned int ndiff = abs((
int)nfromtruth-(
int)
_nlayers);
374 unsigned int ninnerhitsfromtruth = 0;
375 unsigned int ninnerlayers = 0;
376 for (
unsigned int i = 0;
i < 32; ++
i) {
377 ninnerhitsfromtruth += (0x1 & (innerhits >>
i));
381 ndiff = abs((
int)ninnerhitsfromtruth-(
int)ninnerlayers);
392 float diff = fabs(recopt-truept)/truept;
408 unsigned int maxtracks = 0;
410 iter != vertexmap->
end();