98 steering_file.close();
104 ntp =
new TNtuple(
"ntp",
"HF ntuple",
"event:trkid:layer:nsilicon:ntpc:nclus:trkrid:sector:side:subsurf:phi:glbl0:glbl1:glbl2:glbl3:glbl4:glbl5:sensx:sensy:sensz:normx:normy:normz:sensxideal:sensyideal:senszideal:normxideal:normyideal:normzideal:xglobideal:yglobideal:zglobideal:R:X0:Y0:Zs:Z0:xglob:yglob:zglob:xfit:yfit:zfit:pcax:pcay:pcaz:tangx:tangy:tangz:X:Y:fitX:fitY:dXdR:dXdX0:dXdY0:dXdZs:dXdZ0:dXdalpha:dXdbeta:dXdgamma:dXdx:dXdy:dXdz:dYdR:dYdX0:dYdY0:dYdZs:dYdZ0:dYdalpha:dYdbeta:dYdgamma:dYdx:dYdy:dYdz");
106 track_ntp =
new TNtuple(
"track_ntp",
"HF track ntuple",
"track_id:residual_x:residual_y:residualxsigma:residualysigma:dXdR:dXdX0:dXdY0:dXdZs:dXdZ0:dXdx:dXdy:dXdz:dYdR:dYdX0:dYdY0:dYdZs:dYdZ0:dYdx:dYdy:dYdz:xvtx:yvtx:zvtx:event_zvtx:track_phi:perigee_phi");
112 std::cout <<
"HelicalFitter::InitRun: Surface groupings are mvtx " <<
mvtx_grp <<
" intt " <<
intt_grp <<
" tpc " <<
tpc_grp <<
" mms " <<
mms_grp << std::endl;
113 std::cout <<
" possible groupings are:" << std::endl
164 unsigned int maxtracks = 0;
165 unsigned int nsilicon = 0;
166 unsigned int ntpc = 0;
167 unsigned int nclus = 0;
168 std::vector<std::vector<Acts::Vector3>> cumulative_global_vec;
169 std::vector<std::vector<TrkrDefs::cluskey>> cumulative_cluskey_vec;
170 std::vector<std::vector<float>> cumulative_fitpars_vec;
171 std::vector<Acts::Vector3> cumulative_vertex;
172 std::vector<TrackSeed> cumulative_someseed;
173 std::vector<SvtxTrack_v4> cumulative_newTrack;
178 for(
unsigned int trackid = 0; trackid < maxtracks; ++trackid)
183 if(!tracklet) {
continue; }
185 std::vector<Acts::Vector3> global_vec;
186 std::vector<TrkrDefs::cluskey> cluskey_vec;
197 if(fitpars.size() == 0)
continue;
200 { std::cout <<
" Track " << trackid <<
" radius " << fitpars[0] <<
" X0 " << fitpars[1]<<
" Y0 " << fitpars[2]
201 <<
" zslope " << fitpars[3] <<
" Z0 " << fitpars[4] << std::endl; }
213 ntpc = cluskey_vec.size();
215 if(nsilicon < 3)
continue;
216 auto trackseed = std::make_unique<TrackSeed_v1>();
217 for(
auto& ckey : cluskey_vec)
222 trackseed->insert_cluster_key(ckey);
231 if(fitpars.size() == 0)
continue;
234 { std::cout <<
" Full track " << trackid <<
" radius " << fitpars[0] <<
" X0 " << fitpars[1]<<
" Y0 " << fitpars[2]
235 <<
" zslope " << fitpars[3] <<
" Z0 " << fitpars[4] << std::endl; }
239 nsilicon = cluskey_vec.size();
243 ntpc = cluskey_vec.size();
257 for(
auto& ckey : cluskey_vec)
261 someseed.
set_X0(fitpars[1]);
262 someseed.
set_Y0(fitpars[2]);
263 someseed.
set_Z0(fitpars[4]);
274 nclus = ntpc+nsilicon;
279 if(
Verbosity() > 1) { std::cout <<
" reject this track, ntpc = " << ntpc << std::endl; }
284 if(
Verbosity() > 1) { std::cout <<
" reject this track, nsilicon = " << nsilicon << std::endl; }
288 cumulative_global_vec.push_back(global_vec);
289 cumulative_cluskey_vec.push_back(cluskey_vec);
290 cumulative_vertex.push_back(track_vtx);
291 cumulative_fitpars_vec.push_back(fitpars);
292 cumulative_someseed.push_back(someseed);
293 cumulative_newTrack.push_back(newTrack);
303 unsigned int accepted_tracks = cumulative_fitpars_vec.size();
306 for(
unsigned int trackid = 0; trackid < accepted_tracks; ++trackid)
308 xsum += cumulative_vertex[trackid][0];
309 ysum += cumulative_vertex[trackid][1];
310 zsum += cumulative_vertex[trackid][2];
312 Acts::Vector3 averageVertex (xsum/accepted_tracks,ysum/accepted_tracks,zsum/accepted_tracks);
314 for(
unsigned int trackid = 0; trackid < accepted_tracks; ++trackid)
316 auto global_vec = cumulative_global_vec[trackid];
317 auto cluskey_vec = cumulative_cluskey_vec[trackid];
318 auto fitpars = cumulative_fitpars_vec[trackid];
319 auto someseed = cumulative_someseed[trackid];
320 auto newTrack = cumulative_newTrack[trackid];
325 for(
unsigned int ivec=0;ivec<global_vec.size(); ++ivec)
327 auto global = global_vec[ivec];
328 auto cluskey = cluskey_vec[ivec];
330 if(!cluster) {
continue;}
349 auto xloc = cluster->getLocalX();
350 auto zloc = cluster->getLocalY();
355 Acts::Vector2 residual(xloc - fitpoint_local(0), zloc - fitpoint_local(1));
358 float phi = atan2(global(1), global(0));
361 svtxstate.
set_x(fitpoint(0));
362 svtxstate.set_y(fitpoint(1));
363 svtxstate.set_z(fitpoint(2));
365 svtxstate.set_px(someseed.get_p() * tangent.second.x());
366 svtxstate.set_py(someseed.get_p() * tangent.second.y());
367 svtxstate.set_pz(someseed.get_p() * tangent.second.z());
368 newTrack.insert_state(&svtxstate);
373 std::cout <<
" layer " << layer << std::endl
374 <<
" cluster global " << global(0) <<
" " << global(1) <<
" " << global(2) << std::endl
375 <<
" fitpoint " << fitpoint(0) <<
" " << fitpoint(1) <<
" " << fitpoint(2) << std::endl
376 <<
" fitpoint_local " << fitpoint_local(0) <<
" " << fitpoint_local(1) <<
" " << fitpoint_local(2) << std::endl
377 <<
" cluster local x " << cluster->getLocalX() <<
" cluster local y " << cluster->getLocalY() << std::endl
378 <<
" cluster global to local x " << loc_check(0) <<
" local y " << loc_check(1) <<
" local z " << loc_check(2) << std::endl
379 <<
" cluster local residual x " << residual(0) <<
" cluster local residual y " <<residual(1) << std::endl;
385 std::cout <<
"Transform is:" << std::endl;
386 std::cout << transform.matrix() << std::endl;
391 std::cout <<
" layer " << layer <<
" sector " << sector <<
" side " << side <<
" subsurf " << cluster->getSubSurfKey() << std::endl
392 <<
" cluster global " << global(0) <<
" " << global(1) <<
" " << global(2) << std::endl
393 <<
" fitpoint " << fitpoint(0) <<
" " << fitpoint(1) <<
" " << fitpoint(2) << std::endl
394 <<
" fitpoint_local " << fitpoint_local(0) <<
" " << fitpoint_local(1) <<
" " << fitpoint_local(2) << std::endl
395 <<
" cluster local x " << cluster->getLocalX() <<
" cluster local y " << cluster->getLocalY() << std::endl
396 <<
" cluster global to local x " << loc_check(0) <<
" local y " << loc_check(1) <<
" local z " << loc_check(2) << std::endl
397 <<
" cluster local residual x " << residual(0) <<
" cluster local residual y " <<residual(1) << std::endl;
402 if(isnan(clus_sigma(0)) || isnan(clus_sigma(1))) {
continue; }
409 else if(layer > 2 && layer < 7)
433 auto alignmentstate = std::make_unique<SvtxAlignmentState_v1>();
434 alignmentstate->set_residual(residual);
435 alignmentstate->set_cluster_key(
cluskey);
437 SvtxAlignmentState::GlobalMatrix::Zero();
439 SvtxAlignmentState::LocalMatrix::Zero();
442 svtxloc(0,
i) = lcl_derivativeX[
i];
443 svtxloc(1,
i) = lcl_derivativeY[
i];
447 svtxglob(0,
i) = glbl_derivativeX[
i];
448 svtxglob(1,
i) = glbl_derivativeY[
i];
451 alignmentstate->set_local_derivative_matrix(svtxloc);
452 alignmentstate->set_global_derivative_matrix(svtxglob);
454 statevec.push_back(alignmentstate.release());
465 glbl_derivativeX[
i] = 0;
466 glbl_derivativeY[
i] = 0;
474 glbl_derivativeX[
i] = 0;
475 glbl_derivativeY[
i] = 0;
486 glbl_derivativeX[
i] = 0;
487 glbl_derivativeY[
i] = 0;
516 unsigned int subsurf = cluster->getSubSurfKey();
522 else if(layer >2 && layer < 7)
527 float ntp_data[75] = {
528 (float)
event, (
float) trackid,
529 (float) layer, (
float) nsilicon, (float) ntpc, (
float) nclus, (float) trkrid, (
float) sector, (float) side,
530 (
float) subsurf,
phi,
531 (float) glbl_label[0], (
float) glbl_label[1], (float) glbl_label[2], (
float) glbl_label[3], (float) glbl_label[4], (
float) glbl_label[5],
532 (float) sensorCenter(0), (float) sensorCenter(1), (float) sensorCenter(2),
533 (float) sensorNormal(0), (float) sensorNormal(1), (float) sensorNormal(2),
534 (float) ideal_center(0), (float) ideal_center(1), (float) ideal_center(2),
535 (float) ideal_norm(0), (float) ideal_norm(1), (float) ideal_norm(2),
536 (float) ideal_glob(0), (float) ideal_glob(1), (float) ideal_glob(2),
537 (float) fitpars[0], (
float) fitpars[1], (float) fitpars[2], (
float) fitpars[3], (float) fitpars[4],
538 (
float) global(0), (float) global(1), (float) global(2),
539 (float) fitpoint(0), (float) fitpoint(1), (float) fitpoint(2),
540 (float) helix_pca(0), (float) helix_pca(1), (float) helix_pca(2),
541 (float) helix_tangent(0), (float) helix_tangent(1), (float) helix_tangent(2),
542 xloc,zloc, (float) fitpoint_local(0), (float) fitpoint_local(1),
543 lcl_derivativeX[0],lcl_derivativeX[1],lcl_derivativeX[2],lcl_derivativeX[3],lcl_derivativeX[4],
544 glbl_derivativeX[0],glbl_derivativeX[1],glbl_derivativeX[2],glbl_derivativeX[3],glbl_derivativeX[4],glbl_derivativeX[5],
545 lcl_derivativeY[0],lcl_derivativeY[1],lcl_derivativeY[2],lcl_derivativeY[3],lcl_derivativeY[4],
546 glbl_derivativeY[0],glbl_derivativeY[1],glbl_derivativeY[2],glbl_derivativeY[3],glbl_derivativeY[4],glbl_derivativeY[5] };
552 for(
int i=0;
i<34;++
i)
554 std::cout << ntp_data[
i] <<
" " ;
556 std::cout << std::endl;
561 if(residual(0) > 0.2)
continue;
562 if(residual(1) > 0.2)
continue;
564 if( !isnan(residual(0)) && clus_sigma(0) < 1.0)
566 _mille->
mille(AlignmentDefs::NLC,lcl_derivativeX,AlignmentDefs::NGL,glbl_derivativeX,glbl_label,residual(0), errinf*clus_sigma(0));
568 if(!isnan(residual(1)) && clus_sigma(1) < 1.0 && trkrid !=
TrkrDefs::inttId)
570 _mille->
mille(AlignmentDefs::NLC, lcl_derivativeY,AlignmentDefs::NGL,glbl_derivativeY,glbl_label,residual(1), errinf*clus_sigma(1));
586 get_dca(newTrack,dca3dxy,dca3dz,dca3dxysigma,dca3dzsigma,event_vtx);
594 float glblvtx_derivativeX[3];
595 float glblvtx_derivativeY[3];
602 std::cout <<
"vertex info for track " << trackid <<
" with charge " << newTrack.get_charge() << std::endl;
604 std::cout <<
"vertex is " << event_vtx.transpose() << std::endl;
605 std::cout <<
"vertex residuals " << vtx_residual.transpose()
607 std::cout <<
"local derivatives " << std::endl;
609 std::cout << lclvtx_derivativeX[
i] <<
", ";
610 std::cout << std::endl;
612 std::cout << lclvtx_derivativeY[
i] <<
", ";
613 std::cout <<
"global vtx derivaties " << std::endl;
614 for(
int i=0;
i<3;
i++) std::cout << glblvtx_derivativeX[
i] <<
", ";
615 std::cout << std::endl;
616 for(
int i=0;
i<3;
i++) std::cout << glblvtx_derivativeY[
i] <<
", ";
620 if(fabs(newTrack.get_z() - event_vtx(2)) > 0.2)
continue;
621 if(fabs(newTrack.get_x()) > 0.2)
continue;
622 if(fabs(newTrack.get_y()) > 0.2)
continue;
624 if(!isnan(vtx_residual(0)))
628 if(!isnan(vtx_residual(1)))
636 Acts::Vector3 mom(newTrack.get_px(),newTrack.get_py(),newTrack.get_pz());
638 float perigee_phi = atan2(
r(1),
r(0));
639 float track_phi = atan2(newTrack.get_py(), newTrack.get_px());
641 float ntp_data[30] = {(float) trackid,(
float) vtx_residual(0),(float) vtx_residual(1),(float)
vtx_sigma(0),(float)
vtx_sigma(1),
642 lclvtx_derivativeX[0],lclvtx_derivativeX[1],lclvtx_derivativeX[2],lclvtx_derivativeX[3],lclvtx_derivativeX[4],
643 glblvtx_derivativeX[0],glblvtx_derivativeX[1],glblvtx_derivativeX[2],
644 lclvtx_derivativeY[0],lclvtx_derivativeY[1],lclvtx_derivativeY[2],lclvtx_derivativeY[3],lclvtx_derivativeY[4],
645 glblvtx_derivativeY[0],glblvtx_derivativeY[1],glblvtx_derivativeY[2],
646 newTrack.get_x(), newTrack.get_y(), newTrack.get_z(),(float) event_vtx(2),track_phi, perigee_phi};
653 std::cout <<
"vtx_residual xy: " << vtx_residual(0)<<
" vtx_residual z: " << vtx_residual(1) <<
" vtx_sigma xy: " <<
vtx_sigma(0) <<
" vtx_sigma z: " <<
vtx_sigma(1) << std::endl;
654 std::cout <<
"track_x" << newTrack.get_x()<<
"track_y" << newTrack.get_y()<<
"track_z" << newTrack.get_z()<<std::endl;
673 sensorNormal /= sensorNormal.norm();
693 sensorNormal /= sensorNormal.norm();
699 tangent = line.second;
726 float d = (sensor_center - PCA).dot(sensor_normal) / tangent.dot(sensor_normal);
793 std::cerr <<
"DST node is missing, quitting" << std::endl;
794 throw std::runtime_error(
"Failed to find DST node in PHActsTrkFitter::createNodes");
805 m_trackmap = findNode::getClass<SvtxTrackMap>(topNode,
"HelicalFitterTrackMap");
813 m_alignmentmap = findNode::getClass<SvtxAlignmentStateMap>(topNode,
"HelicalFitterAlignmentStateMap");
832 cerr <<
PHWHERE <<
" ERROR: Can't find SiliconTrackSeedContainer " << endl;
843 _cluster_map = findNode::getClass<TrkrClusterContainer>(topNode,
"TRKR_CLUSTER");
846 std::cout <<
PHWHERE <<
" ERROR: Can't find node TRKR_CLUSTER" << std::endl;
850 _tGeometry = findNode::getClass<ActsGeometry>(topNode,
"ActsGeometry");
853 std::cout <<
PHWHERE <<
"Error, can't find acts tracking geometry" << std::endl;
872 Acts::Vector3 pca = posref + ( (global - posref).dot(tangent) ) * tangent;
882 double zdriftlength = cluster->
getLocalY() * drift_velocity;
883 double surfCenterZ = 52.89;
884 double zloc = surfCenterZ - zdriftlength;
886 if(side == 0) zloc = -zloc;
918 auto key = *clusIter;
922 std::cout <<
"Failed to get cluster with key " << key << std::endl;
928 if(!
surf) {
continue; }
932 if(layer == 7 || layer == 22 || layer == 23 || layer == 38 || layer == 39) {
continue;}
934 cluskey_vec.push_back(key);
948 double clusRadius = sqrt(global[0]*global[0] + global[1]*global[1]);
950 double phierror = sqrt(para_errors.first);
951 double zerror = sqrt(para_errors.second);
952 clus_sigma(1) = zerror;
953 clus_sigma(0) = phierror;
962 std::vector<float> temp_fitpars;
964 std::vector<float> fitpars_delta;
965 fitpars_delta.push_back(0.1);
966 fitpars_delta.push_back(0.1);
967 fitpars_delta.push_back(0.1);
968 fitpars_delta.push_back(0.1);
969 fitpars_delta.push_back(0.1);
971 for(
unsigned int ip = 0; ip < fitpars.size(); ++ip)
973 temp_fitpars.push_back(fitpars[ip]);
977 if(
Verbosity() > 1) std::cout <<
"Call get_helix_tangent for best fit fitpars" << std::endl;
978 std::pair<Acts::Vector3, Acts::Vector3> tangent =
get_helix_tangent(fitpars, global);
986 for(
unsigned int ip = 0; ip < fitpars.size(); ++ip)
989 for(
int ipm = 0; ipm < 2; ++ipm)
991 temp_fitpars[ip] = fitpars[ip];
992 float deltapm = pow(-1.0, ipm);
993 temp_fitpars[ip] += deltapm * fitpars_delta[ip];
996 intersection_delta[ipm] = temp_intersection - intersection;
998 Acts::Vector3 average_intersection_delta = (intersection_delta[0] - intersection_delta[1]) / (2 * fitpars_delta[ip]);
1001 {std::cout <<
" average_intersection_delta / delta " << average_intersection_delta(0) <<
" " << average_intersection_delta(1) <<
" " << average_intersection_delta(2) << std::endl;}
1005 lcl_derivativeX[ip] = average_intersection_delta.dot(projX);
1006 lcl_derivativeY[ip] = average_intersection_delta.dot(projY);
1008 {std::cout <<
" layer " << layer <<
" ip " << ip <<
" derivativeX " << lcl_derivativeX[ip] <<
" "
1009 <<
" derivativeY " << lcl_derivativeY[ip] << std::endl;}
1011 temp_fitpars[ip] = fitpars[ip];
1019 std::vector<float> temp_fitpars;
1022 std::vector<float> fitpars_delta;
1023 fitpars_delta.push_back(0.1);
1024 fitpars_delta.push_back(0.1);
1025 fitpars_delta.push_back(0.1);
1026 fitpars_delta.push_back(0.1);
1027 fitpars_delta.push_back(0.1);
1029 for(
unsigned int ip = 0; ip < fitpars.size(); ++ip)
1031 temp_fitpars.push_back(fitpars[ip]);
1035 if(
Verbosity() > 1) {std::cout <<
"Call get_helix_tangent for best fit fitpars" << std::endl;}
1040 for(
unsigned int ip = 0; ip < fitpars.size(); ++ip)
1045 for(
int ipm = 0; ipm < 2; ++ipm)
1047 temp_fitpars[ip] = fitpars[ip];
1048 float deltapm = pow(-1.0, ipm);
1049 temp_fitpars[ip] += deltapm * fitpars_delta[ip];
1052 paperPerturb[ipm] = temp_track_vtx;
1056 localPerturb[ipm] = localtemp_track_vtx ;
1060 std::cout <<
"vtx local parameter " << ip <<
" with ipm " << ipm <<
" deltapm " << deltapm <<
" :" << std::endl;
1061 std::cout<<
" fitpars "<< fitpars[ip]<<
" temp_fitpars "<<temp_fitpars[ip]<<std::endl;
1062 std::cout <<
" localtmp_track_vtx: "<< localtemp_track_vtx<<std::endl;
1069 Acts::Vector3 average_vtxX = (paperPerturb[0] - paperPerturb[1]) / (2 * fitpars_delta[ip]);
1070 Acts::Vector3 average_vtxY = (paperPerturb[0] - paperPerturb[1]) / (2 * fitpars_delta[ip]);
1075 lcl_derivativeX[ip] = average_vtxX.dot(projX);
1076 lcl_derivativeY[ip] = average_vtxY.dot(projY);
1078 temp_fitpars[ip] = fitpars[ip];
1089 std::pair<Acts::Vector3, Acts::Vector3> tangent =
get_helix_tangent(fitpars, global);
1095 glbl_derivativeX[3] = unitx.dot(projX);
1096 glbl_derivativeX[4] = unity.dot(projX);
1097 glbl_derivativeX[5] = unitz.dot(projX);
1099 glbl_derivativeY[3] = unitx.dot(projY);
1100 glbl_derivativeY[4] = unity.dot(projY);
1101 glbl_derivativeY[5] = unitz.dot(projY);
1119 glbl_derivativeX[0] = (unitx.cross(OM)).dot(projX);
1120 glbl_derivativeX[1] = (unity.cross(OM)).dot(projX);
1121 glbl_derivativeX[2] = (unitz.cross(OM)).dot(projX);
1123 glbl_derivativeY[0] = (unitx.cross(OM)).dot(projY);
1124 glbl_derivativeY[1] = (unity.cross(OM)).dot(projY);
1125 glbl_derivativeY[2] = (unitz.cross(OM)).dot(projY);
1130 for(
int ip=0;ip<6;++ip)
1132 std::cout <<
" layer " << layer <<
" ip " << ip <<
" glbl_derivativeX " << glbl_derivativeX[ip] <<
" "
1133 <<
" glbl_derivativeY " << glbl_derivativeY[ip] << std::endl;
1154 glbl_derivativeX[0] = unitx.dot(projX);
1155 glbl_derivativeX[1] = unity.dot(projX);
1156 glbl_derivativeX[2] = unitz.dot(projX);
1157 glbl_derivativeY[0] = unitx.dot(projY);
1158 glbl_derivativeY[1] = unity.dot(projY);
1159 glbl_derivativeY[2] = unitz.dot(projY);
1167 for(
int i = 0;
i<3;++
i)
1169 glbl_derivativeX[
i] *= -1.0;
1170 glbl_derivativeY[
i] *= -1.0;
1191 Acts::Vector3 X = (xglob-sensorCenter) / (xglob-sensorCenter).norm();
1192 Acts::Vector3 Y = (yglob-sensorCenter) / (yglob-sensorCenter).norm();
1194 projX = X - (tanvec.dot(X) / tanvec.dot(Z)) * Z;
1195 projY = Y - (tanvec.dot(Y) / tanvec.dot(Z)) * Z;
1204 tanvec /= tanvec.norm();
1205 normal /= normal.norm();
1216 projX = X - (tanvec.dot(X) / tanvec.dot(normal)) * normal;
1217 projY = Y - (tanvec.dot(Y) / tanvec.dot(normal)) * normal;
1242 std::pair pair = std::make_pair(layer,clamshell);
1264 std::pair<unsigned int, unsigned int> pair = std::make_pair(layer, param);
1274 std::pair<unsigned int, unsigned int> pair = std::make_pair(layer, param);
1281 unsigned int subsector = region * 24 + side * 12 + sector;
1289 unsigned int subsector = region * 24 + side * 12 + sector;
1299 for(
unsigned int iclus=0;iclus<cluskey_vec.size();++iclus)
1301 auto cluskey = cluskey_vec[iclus];
1302 auto global = global_vec[iclus];
1309 global_vec[iclus] = global;
1316 float phi = atan2(vtx(1),vtx(0));
1317 float r = vtx(0)/cos(phi);
1318 float test_r = sqrt(vtx(0)*vtx(0)+vtx(1)*vtx(1));
1322 std::cout <<
"my method position: " << vtx << std::endl;
1323 std::cout <<
"r " << r <<
" phi: " << phi*180/M_PI<<
" test_r"<< test_r << std::endl;
1335 track_vtx -= event_vertex;
1338 for(
int i = 0;
i < 3; ++
i)
1340 for(
int j = 0;
j < 3; ++
j)
1348 float phi = atan2(
r(1),
r(0));
1352 rot(0,0) = cos(phi);
1353 rot(0,1) = -sin(phi);
1355 rot(1,0) = sin(phi);
1356 rot(1,1) = cos(phi);
1361 rot_T = rot.transpose();
1367 dca3dxysigma = sqrt(rotCov(0,0));
1368 dca3dzsigma = sqrt(rotCov(2,2));
1372 std::cout <<
" momentum X z: "<<r<<
" phi: " << phi*180/M_PI << std::endl;
1373 std::cout <<
"dca3dxy " << dca3dxy <<
" dca3dz: " << dca3dz <<
" pos_R(1): "<<pos_R(1)<<
" dca3dxysigma " << dca3dxysigma <<
" dca3dzsigma " << dca3dzsigma << std::endl;
1383 track_vtx -= event_vertex;
1386 float phi = atan2(
r(1),
r(0));
1390 rot(0,0) = cos(phi);
1391 rot(0,1) = -sin(phi);
1393 rot(1,0) = sin(phi);
1394 rot(1,1) = cos(phi);
1399 rot_T = rot.transpose();
1405 std::cout <<
" momentum X z: "<<r<<
" phi: " << phi*180/M_PI << std::endl;
1406 std::cout <<
" pos_R(0): "<<pos_R(0)<<
" pos_R(1): "<<pos_R(1) << std::endl;
1414 PCA -= event_vertex;
1417 float phi = atan2(
r(1),
r(0));
1421 rot(0,0) = cos(phi);
1422 rot(0,1) = -sin(phi);
1424 rot(1,0) = sin(phi);
1425 rot(1,1) = cos(phi);
1430 rot_T = rot.transpose();
1436 std::cout <<
" momentum X z: "<<r<<
" phi: " << phi*180/M_PI << std::endl;
1437 std::cout <<
" pos_R(0): "<<pos_R(0)<<
" pos_R(1): "<<pos_R(1) << std::endl;
1452 float phi = atan2(
r(1),
r(0));
1456 rot(0,0) = cos(phi);
1457 rot(0,1) = -sin(phi);
1459 rot(1,0) = sin(phi);
1460 rot(1,1) = cos(phi);
1466 rot_T = rot.transpose();
1472 std::cout <<
" momentum X z: "<<r<<
" phi: " << phi*180/M_PI << std::endl;
1473 std::cout <<
" pos_R(0): "<<pos_R(0)<<
" pos_R(1): "<<pos_R(1)<<
"pos_R(2): "<<pos_R(2) << std::endl;