28 (
const std::string&
t,
const std::string&
n,
const IInterface*
p)
93 data.i_spforseed =
data.l_spforseed.begin();
103 if (!prd_to_track_map.
isValid()) {
106 prd_to_track_map_cptr = prd_to_track_map.
cptr();
114 if (spacepointsPixel.isValid()) {
121 if (prd_to_track_map_cptr &&
isUsed(sp,*prd_to_track_map_cptr))
continue;
125 int ir =
static_cast<int>(sps->
radius()*irstep);
126 if (
ir>irmax)
ir = irmax;
127 data.r_Sorted[
ir].push_back(sps);
141 if (spacepointsSCT.isValid()) {
148 if (prd_to_track_map_cptr &&
isUsed(sp,*prd_to_track_map_cptr))
continue;
152 int ir =
static_cast<int>(sps->
radius()*irstep);
153 if (
ir>irmax)
ir = irmax;
154 data.r_Sorted[
ir].push_back(sps);
171 const std::vector<IdentifierHash>& vPixel,
const std::vector<IdentifierHash>& vSCT)
const{
174 data.trigger =
false;
177 data.i_spforseed =
data.l_spforseed.begin();
187 if (!prd_to_track_map.
isValid()) {
190 prd_to_track_map_cptr = prd_to_track_map.
cptr();
195 if (
m_pixel && !vPixel.empty()) {
198 if (spacepointsPixel.isValid()) {
202 const auto *
w = spacepointsPixel->indexFindPtr(
l);
203 if (
w==
nullptr)
continue;
207 if (prd_to_track_map_cptr &&
isUsed(sp,*prd_to_track_map_cptr))
continue;
211 int ir =
static_cast<int>(sps->
radius()*irstep);
212 if (
ir>irmax)
ir = irmax;
213 data.r_Sorted[
ir].push_back(sps);
224 if (
m_sct && !vSCT.empty()) {
227 if (spacepointsSCT.isValid()) {
231 const auto *
w = spacepointsSCT->indexFindPtr(
l);
232 if (
w==
nullptr)
continue;
236 if (prd_to_track_map_cptr &&
isUsed(sp,*prd_to_track_map_cptr))
continue;
238 int ir =
static_cast<int>(sps->
radius()*irstep);
239 if (
ir>irmax)
ir = irmax;
240 data.r_Sorted[
ir].push_back(sps);
257 const std::vector<IdentifierHash>& vPixel,
const std::vector<IdentifierHash>& vSCT,
273 if (lv.begin()!=lv.end())
mode = 1;
277 data.i_seede =
data.l_seeds.begin();
305 if (lv.begin()!=lv.end())
mode = 3;
309 data.i_seede =
data.l_seeds.begin();
343 if (lv.begin()!=lv.end())
mode = 6;
347 data.i_seede =
data.l_seeds.begin();
384 std::string
s2;
for (
int i=0;
i<
n; ++
i)
s2.append(
" ");
s2.append(
"|");
386 std::string
s3;
for (
int i=0;
i<
n; ++
i)
s3.append(
" ");
s3.append(
"|");
388 std::string
s4;
for (
int i=0;
i<
n; ++
i)
s4.append(
" ");
s4.append(
"|");
390 std::string s5;
for (
int i=0;
i<
n; ++
i) s5.append(
" "); s5.append(
"|");
392 out<<
"|---------------------------------------------------------------------|"
406 <<std::setw(12)<<
m_sct
408 out<<
"| Use PRD-to-track assoc.?| "
414 out<<
"| maxSizeSP | "
417 out<<
"| pTmin (mev) | "
418 <<std::setw(12)<<std::setprecision(5)<<
m_ptmin
420 out<<
"| pTmax (mev) | "
421 <<std::setw(12)<<std::setprecision(5)<<
m_ptmax
424 <<std::setw(12)<<std::setprecision(5)<<
m_etamax
426 out<<
"| max radius SP | "
427 <<std::setw(12)<<std::setprecision(5)<<
m_r_rmax
429 out<<
"| radius step | "
430 <<std::setw(12)<<std::setprecision(5)<<
m_r_rstep
432 out<<
"| min Z-vertex position | "
433 <<std::setw(12)<<std::setprecision(5)<<
m_zmin
435 out<<
"| max Z-vertex position | "
436 <<std::setw(12)<<std::setprecision(5)<<
m_zmax
438 out<<
"| min radius first SP(3) | "
439 <<std::setw(12)<<std::setprecision(5)<<
m_r1min
441 out<<
"| min radius second SP(3) | "
442 <<std::setw(12)<<std::setprecision(5)<<
m_r2min
444 out<<
"| min radius last SP(3) | "
445 <<std::setw(12)<<std::setprecision(5)<<
m_r3min
447 out<<
"| max radius first SP(3) | "
448 <<std::setw(12)<<std::setprecision(4)<<
m_r1max
450 out<<
"| max radius second SP(3) | "
451 <<std::setw(12)<<std::setprecision(5)<<
m_r2max
453 out<<
"| max radius last SP(3) | "
454 <<std::setw(12)<<std::setprecision(5)<<
m_r3max
456 out<<
"| min space points dR | "
457 <<std::setw(12)<<std::setprecision(5)<<
m_drmin
459 out<<
"| max space points dR | "
460 <<std::setw(12)<<std::setprecision(5)<<
m_drmax
462 out<<
"| max dZ impact | "
463 <<std::setw(12)<<std::setprecision(5)<<
m_dzver
465 out<<
"| max dZ/dR impact | "
466 <<std::setw(12)<<std::setprecision(5)<<
m_dzdrver
468 out<<
"| max impact | "
469 <<std::setw(12)<<std::setprecision(5)<<
m_diver
471 out<<
"|---------------------------------------------------------------------|"
473 out<<
"| Beam X center | "
474 <<std::setw(12)<<std::setprecision(5)<<
data.xbeam[0]
476 out<<
"| Beam Y center | "
477 <<std::setw(12)<<std::setprecision(5)<<
data.ybeam[0]
479 out<<
"| Beam Z center | "
480 <<std::setw(12)<<std::setprecision(5)<<
data.zbeam[0]
482 out<<
"| Beam X-axis direction | "
483 <<std::setw(12)<<std::setprecision(5)<<
data.xbeam[1]
484 <<std::setw(12)<<std::setprecision(5)<<
data.xbeam[2]
485 <<std::setw(12)<<std::setprecision(5)<<
data.xbeam[3]
487 out<<
"| Beam Y-axis direction | "
488 <<std::setw(12)<<std::setprecision(5)<<
data.ybeam[1]
489 <<std::setw(12)<<std::setprecision(5)<<
data.ybeam[2]
490 <<std::setw(12)<<std::setprecision(5)<<
data.ybeam[3]
492 out<<
"| Beam Z-axis direction | "
493 <<std::setw(12)<<std::setprecision(5)<<
data.zbeam[1]
494 <<std::setw(12)<<std::setprecision(5)<<
data.zbeam[2]
495 <<std::setw(12)<<std::setprecision(5)<<
data.zbeam[3]
497 out<<
"|---------------------------------------------------------------------|"
508 out<<
"|---------------------------------------------------------------------|"
511 <<std::setw(12)<<
data.ns
513 out<<
"| data.nsaz | "
514 <<std::setw(12)<<
data.nsaz
517 <<std::setw(12)<<
data.l_seeds.size()
519 out<<
"|---------------------------------------------------------------------|"
530 if (
data.endlist)
return;
532 data.i_seede =
data.l_seeds.begin();
535 }
else if (
data.mode==2 ||
data.mode==3) {
537 }
else if (
data.mode==5 ||
data.mode==6) {
551 unsigned int s1 =
data.l_vertex.size();
552 unsigned int s2 = lV.size();
554 if (s1==0 &&
s2==0)
return false;
556 data.l_vertex.clear();
559 data.l_vertex.insert(
static_cast<float>(
v.position().z()));
586 const float sFmax =
static_cast<float>(NFmax )/
pi2;
587 const float sFmin = 100./60.;
590 else if (
m_sF < sFmin)
m_sF = sFmin;
597 int fb =
f-1;
if (fb<0 ) fb=
m_fNmax;
665 double tx =
std::tan(beamSpotHandle->beamTilt(0));
666 double ty =
std::tan(beamSpotHandle->beamTilt(1));
668 double ph = std::atan2(ty,
tx);
669 double th = std::acos(1.
f/std::sqrt(1.
f+
tx*
tx+ty*ty));
675 data.xbeam[0] =
static_cast<float>(cb.x());
676 data.xbeam[1] =
static_cast<float>(
cost*cosp*cosp+sinp*sinp);
677 data.xbeam[2] =
static_cast<float>(
cost*sinp*cosp-sinp*cosp);
678 data.xbeam[3] = -
static_cast<float>(sint*cosp );
680 data.ybeam[0] =
static_cast<float>(cb.y());
681 data.ybeam[1] =
static_cast<float>(
cost*cosp*sinp-sinp*cosp);
682 data.ybeam[2] =
static_cast<float>(
cost*sinp*sinp+cosp*cosp);
683 data.ybeam[3] = -
static_cast<float>(sint*sinp );
685 data.zbeam[0] =
static_cast<float>(cb.z());
686 data.zbeam[1] =
static_cast<float>(sint*cosp);
687 data.zbeam[2] =
static_cast<float>(sint*sinp);
688 data.zbeam[3] =
static_cast<float>(
cost);
713 if (!
data.r_map[
i])
continue;
722 int f =
static_cast<int>(
F*
m_sF);
732 Z< 250.?
z=5:Z< 450.?
z=6:Z< 925.?
z=7:Z< 1400.?
z=8:Z< 2500.?
z=9:
z=10;
734 Z>-250.?
z=5:Z>-450.?
z=4:Z>-925.?
z=3:Z>-1400.?
z=2:Z>-2500.?
z=1:
z= 0;
738 data.rfz_Sorted[
n].push_back(
r);
741 data.r_Sorted[
i].clear();
754 for (
int i=0;
i!=
data.nr; ++
i) {
757 data.r_Sorted[
n].clear();
760 for (
int i=0;
i!=
data.nrfz; ++
i) {
761 int n =
data.rfz_index[
i];
763 data.rfz_Sorted[
n].clear();
788 if (
data.nsaz<3)
return;
791 double f[3], gP[3] ={10.,10.,0.};
798 if (fieldCondObj ==
nullptr) {
802 fieldCondObj->getInitializedCache (fieldCache);
812 const int ZI[
SizeZ]= {5,6,7,8,9,10,4,3,2,1,0};
826 if (!
data.rfz_map[
a])
continue;
830 if (!
data.rfz_map[an])
continue;
831 rb [NB] =
data.rfz_Sorted[an].begin();
832 rbe[NB++] =
data.rfz_Sorted[an].end();
836 if (!
data.rfz_map[an])
continue;
837 rt [NT] =
data.rfz_Sorted[an].begin();
838 rte[NT++] =
data.rfz_Sorted[an].end();
861 int NB,
int NT,
int& nseed,
float K)
const
864 const float COF = 134*.07*9.;
865 const float COFP = 134*.2*9.;
875 for (; r0!=rbe[0]; ++r0) {
877 data.mapOneSeeds.erase(
data.mapOneSeeds.begin(),
data.mapOneSeeds.end());
879 float R = (*r0)->radius();
884 if ((*r0)->spacepoint->clusterList().second)
pix =
false;
886 float X = (*r0)->x();
887 float Y = (*r0)->y();
888 float Z = (*r0)->z();
893 for (
int i=0;
i!=NB; ++
i) {
894 for (
r=
rb[
i];
r!=rbe[
i]; ++
r) {
895 float Rb =(*r)->radius();
905 if (dR>
m_drmax || (*r)->sur()==sur0)
continue;
907 if ( !
pix && !(*r)->spacepoint->clusterList().second)
continue;
909 float dx =
X-(*r)->x();
910 float dy =
Y-(*r)->y();
911 float dZ = Z-(*r)->z();
929 for (
int i=0;
i!=NT; ++
i) {
930 for (
r=rt[
i];
r!=rte[
i]; ++
r) {
931 float Rt =(*r)->radius();
939 if ((*r)->sur()==sur0)
continue;
941 float dx =
X-(*r)->x();
942 float dy =
Y-(*r)->y();
943 float dZ = (*r)->z()-Z;
957 if (!(Nt-Nb))
continue;
959 float covr0 = (*r0)->covr ();
960 float covz0 = (*r0)->covz ();
964 for (
int i=0;
i!=Nt; ++
i) {
967 float dz =
data.SP[
i]->z()-Z;
970 float r2 = 1.f/(
x*
x+
y*
y);
971 float dr = std::sqrt(r2);
983 for (
int b=Nb-1;
b>=0; --
b) {
985 for (
int t=Nb;
t!=Nt; ++
t) {
987 if (!
data.SP[
t]->spacepoint->clusterList().second) cof = COFP;
995 if (dU == 0.)
continue;
999 float S = std::sqrt(
S2);
1000 float BK = std::abs(B*K);
1002 if (dT > 0. && dT > (BK*BK/
S2)*cof*SA)
continue;
1004 float Im = std::abs((
A-B*R)*R);
1010 nseed +=
data.mapOneSeeds.size();
1031 data.OneSeeds[
data.nOneSeeds].erase();
1035 data.OneSeeds[
data.nOneSeeds].setZVertex(
static_cast<double>(
z));
1036 data.mapOneSeeds.insert(std::make_pair(
q, &(
data.OneSeeds[
data.nOneSeeds])));
1039 std::multimap<float,InDet::SiSpacePointsSeed*>::reverse_iterator
1040 l =
data.mapOneSeeds.rbegin();
1041 if ((*l).first <=
q)
return;
1048 s->setZVertex(
static_cast<double>(
z));
1050 i =
data.mapOneSeeds.insert(std::make_pair(
q,
s));
1051 for (++
i;
i!=
data.mapOneSeeds.end(); ++
i) {
1052 if ((*i).second==
s) {
1053 data.mapOneSeeds.erase(
i);
1067 if (
data.i_seed==
data.i_seede)
return nullptr;
1069 return &(*
data.i_seed++);
1075 if (Zv < m_zmin || Zv >
m_zmax)
return false;
1077 if (
data.l_vertex.empty())
return true;
1080 for (
const float&
v :
data.l_vertex) {
1081 float dZ = std::abs(
v-Zv);
1082 if (dZ<dZmin) dZmin=dZ;
1099 if (
data.i_spforseed!=
data.l_spforseed.end()) {
1100 sps = &(*
data.i_spforseed++);
1103 data.l_spforseed.emplace_back(sp,
r);
1104 sps = &(
data.l_spforseed.back());
1105 data.i_spforseed =
data.l_spforseed.end();
1120 if (
data.i_seede!=
data.l_seeds.end()) {
1125 s->setZVertex(
static_cast<double>(
z));
1141 if (
data.i_seede!=
data.l_seeds.end()) {
1147 s->setZVertex(
static_cast<double>(
z));
1161 l =
data.mapOneSeeds.begin(),
1162 le =
data.mapOneSeeds.end ();
1164 for (;
l!=le; ++
l) {
1165 if (
data.i_seede!=
data.l_seeds.end()) {
1169 data.l_seeds.emplace_back(*(*l).second);
1176 data.initialize(EventData::ToolType::LowMomentum,