27 (
const std::string&
t,
const std::string&
n,
const IInterface*
p)
89 data.i_spforseed =
data.l_spforseed.begin();
92 float errorsc[4] = {16.,16.,100.,16.};
98 if (!prd_to_track_map.
isValid()) {
101 prd_to_track_map_cptr=prd_to_track_map.
cptr();
109 if (spacepointsPixel.isValid()) {
116 if (prd_to_track_map_cptr &&
isUsed(sp,*prd_to_track_map_cptr))
continue;
118 int ir =
static_cast<int>((sp->globalPosition().y()+
m_r_rmax)*irstep);
120 data.r_Sorted[
ir].push_back(sps);
134 if (spacepointsSCT.isValid()) {
141 if (prd_to_track_map_cptr &&
isUsed(sp,*prd_to_track_map_cptr))
continue;
143 int ir =
static_cast<int>((sp->globalPosition().y()+
m_r_rmax)*irstep);
145 data.r_Sorted[
ir].push_back(sps);
158 if (spacepointsOverlap.isValid()) {
164 if (prd_to_track_map_cptr &&
isUsed(sp, *prd_to_track_map_cptr))
continue;
166 int ir =
static_cast<int>((sp->globalPosition().y()+
m_r_rmax)*irstep);
168 data.r_Sorted[
ir].push_back(sps);
185 const std::vector<IdentifierHash>& vPixel,
const std::vector<IdentifierHash>& vSCT)
const
191 data.i_spforseed =
data.l_spforseed.begin();
194 float errorsc[4] = {16.,16.,100.,16.};
200 if (!prd_to_track_map.
isValid()) {
203 prd_to_track_map_cptr = prd_to_track_map.
cptr();
208 if (
m_pixel && !vPixel.empty()) {
211 if (spacepointsPixel.isValid()) {
215 const auto *
w = spacepointsPixel->indexFindPtr(
l);
216 if (
w==
nullptr)
continue;
220 if (prd_to_track_map_cptr &&
isUsed(sp,*prd_to_track_map_cptr))
continue;
222 int ir =
static_cast<int>((sp->globalPosition().y()+
m_r_rmax)*irstep);
224 data.r_Sorted[
ir].push_back(sps);
235 if (
m_sct && !vSCT.empty()) {
238 if (spacepointsSCT.isValid()) {
243 const auto *
w = spacepointsSCT->indexFindPtr(
l);
244 if (
w==
nullptr)
continue;
248 if (prd_to_track_map_cptr &&
isUsed(sp,*prd_to_track_map_cptr))
continue;
250 int ir =
static_cast<int>((sp->globalPosition().y()+
m_r_rmax)*irstep);
252 data.r_Sorted[
ir].push_back(sps);
269 const std::vector<IdentifierHash>& vPixel,
const std::vector<IdentifierHash>& vSCT,
const IRoiDescriptor&)
const
284 if (lv.begin()!=lv.end())
mode = 1;
287 data.l_seeds_map.erase(
data.l_seeds_map.begin(),
data.l_seeds_map.end());
301 data.i_seed_map =
data.l_seeds_map.begin();
302 data.i_seede_map =
data.l_seeds_map.end ();
320 if (lv.begin()!=lv.end())
mode = 3;
323 data.l_seeds_map.erase(
data.l_seeds_map.begin(),
data.l_seeds_map.end());
331 data.endlist = true ;
337 data.i_seed_map =
data.l_seeds_map.begin();
338 data.i_seede_map =
data.l_seeds_map.end ();
362 if (lv.begin()!=lv.end())
mode = 6;
370 data.endlist = true ;
376 data.i_seed_map =
data.l_seeds_map.begin();
377 data.i_seede_map =
data.l_seeds_map.end ();
404 std::string
s2;
for (
int i=0;
i<
n; ++
i)
s2.append(
" ");
s2.append(
"|");
406 std::string
s3;
for (
int i=0;
i<
n; ++
i)
s3.append(
" ");
s3.append(
"|");
408 std::string
s4;
for (
int i=0;
i<
n; ++
i)
s4.append(
" ");
s4.append(
"|");
411 out<<
"|---------------------------------------------------------------------|"
423 <<std::setw(12)<<
m_sct
428 out<<
"| maxSizeSP | "
431 out<<
"| pTmin (mev) | "
432 <<std::setw(12)<<std::setprecision(5)<<
m_ptmin
435 <<std::setw(12)<<std::setprecision(5)<<
m_etamax
437 out<<
"| max radius SP | "
438 <<std::setw(12)<<std::setprecision(5)<<
m_r_rmax
440 out<<
"| radius step | "
441 <<std::setw(12)<<std::setprecision(5)<<
m_r_rstep
443 out<<
"| min space points dR | "
444 <<std::setw(12)<<std::setprecision(5)<<
m_drmin
446 out<<
"| max space points dR | "
447 <<std::setw(12)<<std::setprecision(5)<<
m_drmax
449 out<<
"|---------------------------------------------------------------------|"
460 out<<
"|---------------------------------------------------------------------|"
463 <<std::setw(12)<<
data.ns
465 out<<
"| data.nsaz | "
466 <<std::setw(12)<<
data.nsaz
469 <<std::setw(12)<<
data.l_seeds_map.size()
471 out<<
"|---------------------------------------------------------------------|"
494 const float sFmax =
static_cast<float>(NFmax)/
pi2;
495 const float sFmin = 50./60.;
499 else if (
m_sF < sFmin)
m_sF = sFmin;
506 int fb =
f-1;
if (fb<0 ) fb=
m_fNmax;
582 if (!
data.r_map[
i])
continue;
593 data.rf_Sorted[
f].push_back(
r);
601 Z< 250.?
z=5:Z< 450.?
z=6:Z< 925.?
z=7:Z< 1400.?
z=8:Z< 2500.?
z=9:
z=10;
603 Z>-250.?
z=5:Z>-450.?
z=4:Z>-925.?
z=3:Z>-1400.?
z=2:Z>-2500.?
z=1:
z= 0;
607 data.rfz_Sorted[
n].push_back(
r);
610 data.r_Sorted[
i].clear();
623 for (
int i=0;
i<
data.nr; ++
i) {
626 data.r_Sorted[
n].erase(
data.r_Sorted[
n].begin(),
data.r_Sorted[
n].end());
629 for (
int i=0;
i>
data.nrf; ++
i) {
632 data.rf_Sorted[
n].erase(
data.rf_Sorted[
n].begin(),
data.rf_Sorted[
n].end());
635 for (
int i=0;
i<
data.nrfz; ++
i) {
636 int n =
data.rfz_index[
i];
638 data.rfz_Sorted[
n].erase(
data.rfz_Sorted[
n].begin(),
data.rfz_Sorted[
n].end());
664 if (
data.nsaz<3)
return;
668 double f[3], gP[3] ={10.,10.,0.};
674 if (fieldCondObj ==
nullptr) {
678 fieldCondObj->getInitializedCache (fieldCache);
687 float ipt = 100000000.;
690 const int ZI[
SizeZ]= {5,6,7,8,9,10,4,3,2,1,0};
703 if (!
data.rfz_map[
a])
continue;
708 if (!
data.rfz_map[an])
continue;
709 rb [NB] =
data.rfz_Sorted[an].begin();
710 rbe[NB++] =
data.rfz_Sorted[an].end();
714 if (!
data.rfz_map[an])
continue;
715 rt [NT] =
data.rfz_Sorted[an].begin();
716 rte[NT++] =
data.rfz_Sorted[an].end();
732 float ipt = 100000000.;
734 const int ZI[
SizeZ]= {5,6,7,8,9,10,4,3,2,1,0};
747 if (!
data.rfz_map[
a])
continue;
751 if (!
data.rfz_map[an])
continue;
752 rb [NB] =
data.rfz_Sorted[an].begin();
753 rbe[NB++] =
data.rfz_Sorted[an].end();
757 if (!
data.rfz_map[an])
continue;
758 rt [NT] =
data.rfz_Sorted[an].begin();
759 rte[NT++] =
data.rfz_Sorted[an].end();
778 int NB,
int NT,
float K,
float ipt)
const
780 const float COF = 134*.05*9.;
783 if (!
data.endlist) {r0 =
data.rMin;
data.endlist =
true;}
787 for (; r0!=rbe[0]; ++r0) {
789 if ((*r0)->spacepoint->clusterList().second)
pix =
false;
790 float R = (*r0)->radius();
792 float X = (*r0)->x() ;
793 float Y = (*r0)->y() ;
794 float Z = (*r0)->z() ;
797 float covr0 = (*r0)->covr ();
798 float covz0 = (*r0)->covz ();
803 for (
int i=0;
i<NB; ++
i) {
804 for (
r=
rb[
i];
r!=rbe[
i]; ++
r) {
805 float dy = (*r)->y()-
Y ;
807 if (-
dy >
m_drmax || (*r)->sur()==sur0)
continue;
809 if (!
pix && !(*r)->spacepoint->clusterList().second)
continue;
810 if (
pix && (*r)->spacepoint->clusterList().second)
continue;
812 float dx = (*r)->x()-
X;
813 float dz = (*r)->z()-Z;
817 float r2 = 1.f/(
x*
x+
y*
y);
818 float dr = std::sqrt(r2);
826 data.Er[Nb] = (covz0+
data.SP[Nb]->covz()+
data.Tz[Nb]*
data.Tz[Nb]*(covr0+
data.SP[Nb]->covr()))*r2;
838 for (
int i=0;
i<NT; ++
i) {
839 for (
r=rt[
i];
r!=rte[
i]; ++
r) {
840 float dy = (*r)->y()-
Y ;
843 if ((*r)->sur()==sur0)
continue;
845 if (
pix && (*r)->spacepoint->clusterList().second)
continue;
846 if (!
pix && !(*r)->spacepoint->clusterList().second)
continue;
848 float dx = (*r)->x()-
X;
849 float dz = (*r)->z()-Z;
853 float r2 = 1.f/(
x*
x+
y*
y);
854 float dr = std::sqrt(r2);
861 data.Er[Nt] = (covz0+
data.SP[Nt]->covz()+
data.Tz[Nt]*
data.Tz[Nt]*(covr0+
data.SP[Nt]->covr()))*r2;
869 if (!(Nt-Nb))
continue;
873 for (
int b=Nb-1;
b>=0; --
b) {
875 for (
int t=Nb;
t<Nt; ++
t) {
879 if ( dT > 0. && dT > (ipt*ipt)*COF*SA )
continue;
880 float dU =
data.U[
t]-
data.U[
b];
if (dU == 0.)
continue;
884 float S = std::sqrt(
S2) ;
885 float BK = std::abs(B*K) ;
886 if (BK > ipt*
S) continue ;
887 dT -= ((BK*BK)*COF*SA/
S2) ;
888 if (dT > 0.) continue ;
907 int NB,
int NT,
float ipt)
const
909 const float COF = 134*.05*9.;
910 const float dFcut = .96 ;
913 if (!
data.endlist) {r0 =
data.rMin;
data.endlist =
true;}
917 for (; r0!=rbe[0]; ++r0) {
919 if ((*r0)->spacepoint->clusterList().second)
pix =
false;
921 float X = (*r0)->x() ;
922 float Y = (*r0)->y() ;
923 float Z = (*r0)->z() ;
924 float covr0 = (*r0)->covr ();
925 float covz0 = (*r0)->covz ();
931 for (
int i=0;
i<NB; ++
i) {
932 for (
r=
rb[
i];
r!=rbe[
i]; ++
r) {
933 float dy =
Y-(*r)->y() ;
935 if (
dy >
m_drmax || (*r)->sur()==sur0)
continue;
937 if (!
pix && !(*r)->spacepoint->clusterList().second)
continue;
938 if (
pix && (*r)->spacepoint->clusterList().second)
continue;
940 float dx =
X-(*r)->x();
941 float dz = Z-(*r)->z();
943 float dr = std::sqrt(r2);
950 data.Er[Nb] = (covz0+
data.SP[Nb]->covz()+
data.Tz[Nb]*
data.Tz[Nb]*(covr0+
data.SP[Nb]->covr()))*r2;
962 for (
int i=0;
i<NT; ++
i) {
963 for (
r=rt[
i];
r!=rte[
i]; ++
r) {
964 float dy = (*r)->y()-
Y ;
967 if ((*r)->sur()==sur0)
continue;
969 if (
pix && (*r)->spacepoint->clusterList().second)
continue;
970 if (!
pix && !(*r)->spacepoint->clusterList().second)
continue;
972 float dx = (*r)->x()-
X;
973 float dz = (*r)->z()-Z;
975 float dr = std::sqrt(r2);
982 data.Er[Nt] = (covz0+
data.SP[Nt]->covz()+
data.Tz[Nt]*
data.Tz[Nt]*(covr0+
data.SP[Nt]->covr()))*r2;
990 if (!(Nt-Nb))
continue;
994 for (
int b=Nb-1;
b>=0; --
b) {
996 for (
int t=Nb;
t<Nt; ++
t) {
1000 if (dF < dFcut)
continue;
1007 dT -= (ipt*ipt)*COF*SA ;
1008 if ( dT > 0. ) continue ;
1026 if (
data.i_seed_map==
data.i_seede_map)
return nullptr;
1045 if (
data.i_spforseed!=
data.l_spforseed.end()) {
1046 sps = &(*
data.i_spforseed++);
1049 data.l_spforseed.emplace_back(sp,
r);
1050 sps = &(
data.l_spforseed.back());
1051 data.i_spforseed =
data.l_spforseed.end();
1071 if (
data.i_spforseed!=
data.l_spforseed.end()) {
1072 sps = &(*
data.i_spforseed++);
1075 data.l_spforseed.emplace_back(sp,
r,
sc);
1076 sps = &(
data.l_spforseed.back());
1077 data.i_spforseed =
data.l_spforseed.end();
1090 const float&
z)
const
1096 data.seeds[
data.nseeds].setZVertex(0.);
1097 data.l_seeds_map.insert(std::make_pair(
z, &(
data.seeds[
data.nseeds])));
1100 std::multimap<float,InDet::SiSpacePointsSeed*>::reverse_iterator
l =
data.l_seeds_map.rbegin();
1101 if ((*l).first <=
z)
return;
1103 data.l_seeds_map.erase((*l).first);
1109 data.l_seeds_map.insert(std::make_pair(
z,
s));
1127 data.seeds[
data.nseeds].setZVertex(0.);
1128 data.l_seeds_map.insert(std::make_pair(
z, &(
data.seeds[
data.nseeds])));
1131 std::multimap<float,InDet::SiSpacePointsSeed*>::reverse_iterator
l =
data.l_seeds_map.rbegin();
1132 if ((*l).first <=
z)
return;
1134 data.l_seeds_map.erase((*l).first);
1141 data.l_seeds_map.insert(std::make_pair(
z,
s));
1146 data.initialize(EventData::ToolType::Cosmic,