20 const char *cfilepath =
filepath.c_str();
21 fout =
new TFile(cfilepath,
"recreate");
22 ntp_residuals =
new TNtuple(
"ntp_residuals",
"Seed Residuals",
"seed_id:layer:dphi:dz:x:y:z:pt:px:py:pz:crossing:isSilicon:isTpc");
42 _tracks = findNode::getClass<SvtxTrackMap>(topNode,
"SvtxTrackMap");
45 std::cerr <<
PHWHERE <<
"No SvtxTrackMap on node tree, exiting." << std::endl;
48 _tpc_seeds = findNode::getClass<TrackSeedContainer>(topNode,
"TpcTrackSeedContainer");
51 std::cerr <<
PHWHERE <<
" ERROR: Can't find TpcTrackSeedContainer " << std::endl;
54 _si_seeds = findNode::getClass<TrackSeedContainer>(topNode,
"SiliconTrackSeedContainer");
57 std::cerr <<
PHWHERE <<
" ERROR: Can't find SiliconTrackSeedContainer" << std::endl;
60 _clusters = findNode::getClass<TrkrClusterContainer>(topNode,
"TRKR_CLUSTER");
63 std::cerr <<
PHWHERE <<
" ERROR: Can't find TRKR_CLUSTER" << std::endl;
66 tGeometry = findNode::getClass<ActsGeometry>(topNode,
"ActsGeometry");
69 std::cerr <<
PHWHERE <<
"No acts tracking geometry, can't proceed" << std::endl;
85 std::cout <<
"processing tpc seed " <<
id << std::endl;
96 std::cout <<
"processing si seed " <<
id << std::endl;
99 std::cout <<
"done" << std::endl;
110 std::vector<Acts::Vector3> clusterPositions;
111 std::vector<TrkrDefs::cluskey> clusterKeys;
118 float pz = seed->
get_pz();
121 for (
size_t i = 0;
i < clusterPositions.size();
i++)
127 float pca_phi = atan2(pca(1), pca(0));
128 float dphi = cluster_phi - pca_phi;
131 dphi = 2 * M_PI -
dphi;
135 dphi = 2 * M_PI +
dphi;
139 ntp_residuals->Fill(seed_id, layer, dphi, dz,
position(0),
position(1),
position(2), pt, px, py, pz, crossing, !isTpc, isTpc);