66 if (not vsoaHandleCPU
or not vsoaHandleGPU) {
68 if (not vsoaHandleCPU) {
69 out <<
"reference (cpu) tracks not found; ";
71 if (not vsoaHandleGPU) {
72 out <<
"target (gpu) tracks not found; ";
74 out <<
"the comparison will not run.";
78 auto const& vsoaCPU = *vsoaHandleCPU->get();
79 int nVerticesCPU = vsoaCPU.nvFinal;
80 auto const& vsoaGPU = *vsoaHandleGPU->get();
81 int nVerticesGPU = vsoaGPU.nvFinal;
84 float x0 = 0., y0 = 0., z0 = 0.,
dxdz = 0.,
dydz = 0.;
85 if (!bsHandle.isValid()) {
86 edm::LogWarning(
"PixelVertexProducer") <<
"No beamspot found. returning vertexes with (0,0,Z) ";
96 for (
int ivc = 0; ivc < nVerticesCPU; ivc++) {
97 auto sic = vsoaCPU.sortInd[ivc];
98 auto zc = vsoaCPU.zv[sic];
99 auto xc = x0 +
dxdz * zc;
100 auto yc = y0 +
dydz * zc;
103 auto ndofCPU = vsoaCPU.ndof[sic];
104 auto chi2CPU = vsoaCPU.chi2[sic];
110 for (
int ivg = 0; ivg < nVerticesGPU; ivg++) {
111 auto sig = vsoaGPU.sortInd[ivg];
112 auto zgc = vsoaGPU.zv[sig] + z0;
122 if (closestVtxidx == notFound)
125 auto zg = vsoaGPU.zv[closestVtxidx];
126 auto xg = x0 +
dxdz * zg;
127 auto yg = y0 +
dydz * zg;
129 auto ndofGPU = vsoaGPU.ndof[closestVtxidx];
130 auto chi2GPU = vsoaGPU.chi2[closestVtxidx];
137 hptv2_->
Fill(vsoaCPU.ptv2[sic], vsoaGPU.ptv2[closestVtxidx]);
double z0() const
z coordinate
const edm::EDGetTokenT< ZVertexHeterogeneous > tokenSoAVertexGPU_
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
MonitorElement * hnVertex_
double dydz() const
dydz slope
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
Abs< T >::type abs(const T &t)
double dxdz() const
dxdz slope
MonitorElement * hchi2oNdof_
static const GlobalPoint notFound(0, 0, 0)
const edm::EDGetTokenT< ZVertexHeterogeneous > tokenSoAVertexCPU_
double y0() const
y coordinate
Log< level::Warning, false > LogWarning
const edm::EDGetTokenT< reco::BeamSpot > tokenBeamSpot_
double x0() const
x coordinate