28 (
const std::string&
t,
const std::string&
n,
const IInterface*
p)
55 return StatusCode::FAILURE;
63 return StatusCode::FAILURE;
72 return StatusCode::FAILURE;
84 return StatusCode::FAILURE;
97 return StatusCode::FAILURE;
112 }
else if (
m_patternName ==
"SiSpacePointsSeedMaker_HeavyIon" ) {
115 }
else if (
m_patternName ==
"SiSpacePointsSeedMaker_LowMomentum") {
117 }
else if (
m_patternName ==
"SiSpacePointsSeedMaker_BeamGas" ) {
119 }
else if (
m_patternName ==
"SiSpacePointsSeedMaker_ForwardTracks" ) {
121 }
else if (
m_patternName ==
"SiSpacePointsSeedMaker_LargeD0" ) {
123 }
else if (
m_patternName ==
"SiSpacePointsSeedMaker_ITkConversionTracks") {
140 return StatusCode::FAILURE;
144 ATH_MSG_DEBUG(
"No. of cut values smaller than eta bins. Extending size..." );
149 if (
pt < 20.)
pt = 20.;
177 return StatusCode::SUCCESS;
186 MsgStream &
out =
msg(MSG::INFO);
187 out <<
"::finalize() -- statistics:" <<std::endl;
200 out<<
"|----------------------|--------------|--------------|--------------|--------------|--------------|"
202 out<<
"| Kind of seed | PPP | PPS | PSS | SSS | ALL |"
204 out<<
"|----------------------|--------------|--------------|--------------|--------------|--------------|"
206 out<<
"| Input seeds | "
207 <<std::setw(12)<<m_totalInputSeeds[0]<<
" | "
208 <<std::setw(12)<<m_totalInputSeeds[1]<<
" | "
209 <<std::setw(12)<<m_totalInputSeeds[2]<<
" | "
210 <<std::setw(12)<<m_totalInputSeeds[3]<<
" | "
211 <<std::setw(12)<<(m_totalInputSeeds[0]+m_totalInputSeeds[1]+m_totalInputSeeds[2]+m_totalInputSeeds[3])
214 out<<
"| No track parameters | "
215 <<std::setw(12)<<m_totalNoTrackPar[0]<<
" | "
216 <<std::setw(12)<<m_totalNoTrackPar[1]<<
" | "
217 <<std::setw(12)<<m_totalNoTrackPar[2]<<
" | "
218 <<std::setw(12)<<m_totalNoTrackPar[3]<<
" | "
219 <<std::setw(12)<<(m_totalNoTrackPar[0]+m_totalNoTrackPar[1]+ m_totalNoTrackPar[2]+m_totalNoTrackPar[3])
222 out<<
"| Used seeds | "
223 <<std::setw(12)<<m_totalUsedSeeds[0]<<
" | "
224 <<std::setw(12)<<m_totalUsedSeeds[1]<<
" | "
225 <<std::setw(12)<<m_totalUsedSeeds[2]<<
" | "
226 <<std::setw(12)<<m_totalUsedSeeds[3]<<
" | "
227 <<std::setw(12)<<(m_totalUsedSeeds[0]+m_totalUsedSeeds[1]+ m_totalUsedSeeds[2]+m_totalUsedSeeds[3])
230 out<<
"| Used seeds brem | "
231 <<std::setw(12)<<m_totalBremSeeds[0]<<
" | "
232 <<std::setw(12)<<m_totalBremSeeds[1]<<
" | "
233 <<std::setw(12)<<m_totalBremSeeds[2]<<
" | "
234 <<std::setw(12)<<m_totalBremSeeds[3]<<
" | "
235 <<std::setw(12)<<(m_totalBremSeeds[0]+m_totalBremSeeds[1]+m_totalBremSeeds[2]+m_totalBremSeeds[3])
238 double tdetsize = 0.;
241 tdetsize+= m_deSize[
i];
242 goodseed+= m_totalUsedSeeds[
i];
243 if(m_totalUsedSeeds[
i] > 0.) m_deSize[
i]= m_deSize[
i]/m_totalUsedSeeds[
i];
245 if(goodseed > 0) tdetsize/=
double(goodseed);
247 out<<
"| Det elements in road | "
248 <<std::setw(12)<<std::setprecision(4)<<m_deSize[0]<<
" | "
249 <<std::setw(12)<<std::setprecision(5)<<m_deSize[1]<<
" | "
250 <<std::setw(12)<<std::setprecision(5)<<m_deSize[2]<<
" | "
251 <<std::setw(12)<<std::setprecision(5)<<m_deSize[3]<<
" | "
252 <<std::setw(12)<<std::setprecision(5)<<tdetsize
256 out<<
"| Two clusters on DE | "
257 <<std::setw(12)<<m_twoClusters[0]<<
" | "
258 <<std::setw(12)<<m_twoClusters[1]<<
" | "
259 <<std::setw(12)<<m_twoClusters[2]<<
" | "
260 <<std::setw(12)<<m_twoClusters[3]<<
" | "
261 <<std::setw(12)<<(m_twoClusters[0]+m_twoClusters[1]+m_twoClusters[2]+m_twoClusters[3])
264 out<<
"| Wrong DE road | "
265 <<std::setw(12)<<m_wrongRoad[0]<<
" | "
266 <<std::setw(12)<<m_wrongRoad[1]<<
" | "
267 <<std::setw(12)<<m_wrongRoad[2]<<
" | "
268 <<std::setw(12)<<m_wrongRoad[3]<<
" | "
269 <<std::setw(12)<<(m_wrongRoad[0]+m_wrongRoad[1]+m_wrongRoad[2]+m_wrongRoad[3])
272 out<<
"| Wrong initialization | "
273 <<std::setw(12)<<m_wrongInit[0]<<
" | "
274 <<std::setw(12)<<m_wrongInit[1]<<
" | "
275 <<std::setw(12)<<m_wrongInit[2]<<
" | "
276 <<std::setw(12)<<m_wrongInit[3]<<
" | "
277 <<std::setw(12)<<(m_wrongInit[0]+m_wrongInit[1]+m_wrongInit[2]+m_wrongInit[3])
280 out<<
"| Can not find track | "
281 <<std::setw(12)<<m_noTrack[0]<<
" | "
282 <<std::setw(12)<<m_noTrack[1]<<
" | "
283 <<std::setw(12)<<m_noTrack[2]<<
" | "
284 <<std::setw(12)<<m_noTrack[3]<<
" | "
285 <<std::setw(12)<<(m_noTrack[0]+m_noTrack[1]+m_noTrack[2]+m_noTrack[3])
288 out<<
"| It is not new track | "
289 <<std::setw(12)<<m_notNewTrack[0]<<
" | "
290 <<std::setw(12)<<m_notNewTrack[1]<<
" | "
291 <<std::setw(12)<<m_notNewTrack[2]<<
" | "
292 <<std::setw(12)<<m_notNewTrack[3]<<
" | "
293 <<std::setw(12)<<(m_notNewTrack[0]+m_notNewTrack[1]+m_notNewTrack[2]+m_notNewTrack[3])
296 out<<
"| Attempts brem model | "
297 <<std::setw(12)<<m_bremAttempt[0]<<
" | "
298 <<std::setw(12)<<m_bremAttempt[1]<<
" | "
299 <<std::setw(12)<<m_bremAttempt[2]<<
" | "
300 <<std::setw(12)<<m_bremAttempt[3]<<
" | "
301 <<std::setw(12)<<(m_bremAttempt[0]+m_bremAttempt[1]+m_bremAttempt[2]+m_bremAttempt[3])
304 out<<
"| Output tracks | "
305 <<std::setw(12)<<m_outputTracks[0]<<
" | "
306 <<std::setw(12)<<m_outputTracks[1]<<
" | "
307 <<std::setw(12)<<m_outputTracks[2]<<
" | "
308 <<std::setw(12)<<m_outputTracks[3]<<
" | "
309 <<std::setw(12)<<(m_outputTracks[0]+m_outputTracks[1]+m_outputTracks[2]+m_outputTracks[3])
312 out<<
"| Output extra tracks | "
313 <<std::setw(12)<<m_extraTracks[0]<<
" | "
314 <<std::setw(12)<<m_extraTracks[1]<<
" | "
315 <<std::setw(12)<<m_extraTracks[2]<<
" | "
316 <<std::setw(12)<<m_extraTracks[3]<<
" | "
317 <<std::setw(12)<<(m_extraTracks[0]+m_extraTracks[1]+m_extraTracks[2]+m_extraTracks[3])
320 out<<
"| Output tracks brem | "
321 <<std::setw(12)<<m_bremTracks[0]<<
" | "
322 <<std::setw(12)<<m_bremTracks[1]<<
" | "
323 <<std::setw(12)<<m_bremTracks[2]<<
" | "
324 <<std::setw(12)<<m_bremTracks[3]<<
" | "
325 <<std::setw(12)<<(m_bremTracks[0]+m_bremTracks[1]+m_bremTracks[2]+m_bremTracks[3])
328 out<<
"|----------------------|--------------|--------------|--------------|--------------|--------------|--------------|"
330 out<<
"| Seeds with track | "
331 <<std::setw(12)<<m_seedsWithTrack[0]<<
" | "
332 <<std::setw(12)<<m_seedsWithTrack[1]<<
" | "
333 <<std::setw(12)<<m_seedsWithTrack[2]<<
" | "
334 <<std::setw(12)<<m_seedsWithTrack[3]<<
" | "
335 <<std::setw(12)<<(m_seedsWithTrack[0]+m_seedsWithTrack[1]+m_seedsWithTrack[2]+m_seedsWithTrack[3])
336 <<
" | Number seeds |"<<std::endl;
337 out<<
"|----------------------|--------------|--------------|--------------|--------------|--------------|--------------|"
340 std::vector<std::pair<int,std::string>> rapidityTablePrint;
342 rapidityTablePrint.emplace_back(0,std::string(
"| Track/Used 0.0-0.5 | "));
343 rapidityTablePrint.emplace_back(1,std::string(
"| 0.5-1.0 | "));
344 rapidityTablePrint.emplace_back(2,std::string(
"| 1.0-1.5 | "));
345 rapidityTablePrint.emplace_back(3,std::string(
"| 1.5-2.0 | "));
346 rapidityTablePrint.emplace_back(4,std::string(
"| 2.0-2.5 | "));
347 rapidityTablePrint.emplace_back(5,std::string(
"| 2.5-3.0 | "));
348 rapidityTablePrint.emplace_back(6,std::string(
"| 3.0-3.5 | "));
349 rapidityTablePrint.emplace_back(7,std::string(
"| 3.5-4.0 | "));
354 std::array<double,SiCombinatorialTrackFinderData_xk::kNSeedTypes+1>
pu{};
357 double totalUsedSeedsEta = 0.;
361 if(m_usedSeedsEta[j][
i]!=0.)
pu[j]=m_seedsWithTracksEta[j][
i]/m_usedSeedsEta[j][
i];
362 totalUsedSeedsEta += m_usedSeedsEta[j][
i];
366 if(totalUsedSeedsEta!=0.) {
376 out<<rapidityTablePrint.at(
i).second;
377 out<<std::setw(12)<<std::setprecision(4)<<
pu[0]<<
" | "
378 <<std::setw(12)<<std::setprecision(4)<<
pu[1]<<
" | "
379 <<std::setw(12)<<std::setprecision(4)<<
pu[2]<<
" | "
380 <<std::setw(12)<<std::setprecision(4)<<
pu[3]<<
" | "
381 <<std::setw(12)<<std::setprecision(4)<<
pu[4]<<
" | "
382 <<std::setw(12)<<
static_cast<int>(m_seedsWithTracksEta[0][
i])+
static_cast<int>(m_seedsWithTracksEta[1][
i])+
static_cast<int>(m_seedsWithTracksEta[2][
i])+
static_cast<int>(m_seedsWithTracksEta[3][
i])
387 out<<
"|----------------------|--------------|--------------|--------------|--------------|--------------|--------------|"
409 std::string
s4;
for (
int i=0;
i<
n; ++
i)
s4.append(
" ");
s4.append(
"|");
411 std::string fieldmode[9] ={
"NoField" ,
"ConstantField",
"SolenoidalField",
412 "ToroidalField" ,
"Grid3DField" ,
"RealisticField" ,
413 "UndefinedField",
"AthenaField" ,
"?????" };
422 fieldCondObj->getInitializedCache(fieldCache);
428 if (mode<0 || mode>8 )
mode = 8;
430 n = 62-fieldmode[
mode].size();
431 std::string
s3;
for (
int i=0;
i<
n; ++
i)
s3.append(
" ");
s3.append(
"|");
434 std::string s6;
for (
int i=0;
i<
n; ++
i) s6.append(
" "); s6.append(
"|");
436 out<<
"|----------------------------------------------------------------------"
437 <<
"-------------------|"
439 out<<
"| Tool for road builder | "<<
m_roadmaker .type() <<s6<<std::endl;
441 out<<
"| Use association tool ? | "
444 out<<
"| Magnetic field mode | "<<fieldmode[
mode] <<
s3<<std::endl;
447 out<<
"| Min pT of track (MeV) | "<<std::setw(12)<<std::setprecision(5)<<
m_pTmin
449 out<<
"| Max Xi2 for cluster | "<<std::setw(12)<<std::setprecision(5)<<
m_xi2max
451 out<<
"| Max Xi2 for outlayer | "<<std::setw(12)<<std::setprecision(5)<<
m_xi2maxNoAdd
453 out<<
"| Max Xi2 for link | "<<std::setw(12)<<std::setprecision(5)<<
m_xi2maxlink
455 out<<
"| Min number of clusters | "<<std::setw(12)<<
m_nclusmin
463 out<<
"|----------------------------------------------------------------------"
464 <<
"-------------------|"
476 out<<
"|---------------------------------------------------------------------|"
478 out<<
"| Number input seeds | "<<std::setw(12)<<
data.inputseeds()
480 out<<
"| Number good seeds | "<<std::setw(12)<<
data.goodseeds()
482 out<<
"| Number output tracks | "<<std::setw(12)<<
data.findtracks()
484 out<<
"|---------------------------------------------------------------------|"
497 data.xybeam()[0] = 0.;
498 data.xybeam()[1] = 0.;
501 if (beamSpotHandle.isValid()) {
502 data.xybeam()[0] = beamSpotHandle->beamPos()[0];
503 data.xybeam()[1] = beamSpotHandle->beamPos()[1];
523 data.inputseeds() = 0;
524 data.goodseeds() = 0;
525 data.findtracks() = 0;
535 data.setCaloClusterROIEM(*calo_rois);
544 data.setCaloClusterROIHad(*calo_rois);
558 bool simpleTrack =
true;
572 data.inputseeds() = 0;
573 data.goodseeds() = 0;
574 data.findtracks() = 0;
593 data.clusterTrack().clear();
603 for(
int r = 0;
r != 8; ++
r) {
624 m_deSize[K] = m_deSize[K] +
data.summaryStatAll()[
kDESize][K];
653 std::list<Trk::Track*> tracks;
655 if (!
data.pix() && !
data.sct())
return tracks;
658 bool isGoodSeed{
true};
672 if (fieldCondObj ==
nullptr) {
676 fieldCondObj->getInitializedCache (fieldCache);
679 std::unique_ptr<Trk::TrackParameters> Tp =
nullptr;
682 m_seedtrack->executeSiSPSeedSegments(
data.conversionData(), Tp.get(), isGoodSeed, Sp);
704 std::vector<const InDetDD::SiDetectorElement*> DE;
712 if(road_length == 0)
return tracks;
720 if (
static_cast<int>(DE.size()) <
m_nclusmin) {
729 std::vector<Amg::Vector3D> Gp;
739 if(newTrack !=
nullptr) tracks.push_back(newTrack);
746 tracks =
m_tracksfinder->getTracksWithBrem(
data.combinatorialData(), *Tp, Sp, Gp, DE,
data.clusterTrack(),
false,ctx);
752 tracks =
m_tracksfinder->getTracksWithBrem(
data.combinatorialData(), *Tp, Sp, Gp, DE,
data.clusterTrack(),
true,ctx);
758 std::array<bool,SiCombinatorialTrackFinderData_xk::kNCombStats>
inf{0,0,0,0,0,0};
760 for (
size_t p =0;
p<
inf.size(); ++
p){
768 while (
t!=tracks.end()) {
779 data.findtracks() += tracks.size();
781 if(!tracks.empty()) {
800 std::list<Trk::Track*> tracks;
801 if (!
data.pix() && !
data.sct())
return tracks;
810 if (fieldCondObj ==
nullptr) {
814 fieldCondObj->getInitializedCache (fieldCache);
818 std::vector<const InDetDD::SiDetectorElement*> DE;
824 if (
static_cast<int>(DE.size()) <
m_nclusmin)
return tracks;
828 std::vector<const Trk::SpacePoint*> Sp;
833 tracks =
m_tracksfinder->getTracksWithBrem(
data.combinatorialData(), Tp, Sp, Gp, DE,
data.clusterTrack(),
false,ctx);
835 tracks =
m_tracksfinder->getTracksWithBrem(
data.combinatorialData(), Tp, Sp, Gp, DE,
data.clusterTrack(),
true,ctx);
842 while (
t!=tracks.end()) {
851 data.findtracks() += tracks.size();
863 const std::vector<const Trk::SpacePoint*>& theSeed,
864 const EventContext& ctx)
const
867 if (theSeed.size() < 3)
return nullptr;
869 std::vector<const Trk::SpacePoint*> SP;
873 unsigned int middleIdx = theSeed.size() == 3 ? 1 : theSeed.size()/2;
874 SP = {theSeed[0], theSeed[middleIdx], theSeed.back()};
878 SP = {theSeed[theSeed.size() - 3], theSeed[theSeed.size() - 2], theSeed.back()};
882 unsigned int middleIdx = theSeed.size() == 3 ? 0 : theSeed.size()/2;
883 unsigned int quarterIdx = theSeed.size() == 3 ? 1 : 3*theSeed.size()/4;
884 SP = {theSeed[middleIdx], theSeed[quarterIdx], theSeed.back()};
888 SP = {theSeed[0], theSeed[theSeed.size() - 2], theSeed.back()};
892 SP = {theSeed[0], theSeed[1], theSeed[2]};
898 if (!
cl)
return nullptr;
902 if (!pla)
return nullptr;
913 double x1 =
p1[0]-x0;
914 double y1 =
p1[1]-y0;
915 double x2 =
p2[0]-x0;
916 double y2 =
p2[1]-y0;
917 double z2 =
p2[2]-
z0;
929 double u2 = (
a*
x2+
b*
y2)*r2 ;
934 double A =
v2/(u2-u1) ;
935 double B = 2.*(
v2-
A*u2) ;
936 double C = B/sqrt(1.+
A*
A) ;
937 double T = z2*sqrt(r2)/(1.+.04*C*C*
rn);
939 T = std::abs(C) > 1.e-6 ? (z2*C)/asin(C*sqrt(
rn)) : z2/sqrt(
rn);
945 double Ax[3] = {Tp(0,0),Tp(1,0),Tp(2,0)};
947 double Ay[3] = {Tp(0,1),Tp(1,1),Tp(2,1)};
949 double D [3] = {Tp(0,3),Tp(1,3),Tp(2,3)};
951 double d[3] = {x0-D[0],y0-D[1],
z0-D[2]};
953 data.par()[0] =
d[0]*Ax[0]+
d[1]*Ax[1]+
d[2]*Ax[2];
954 data.par()[1] =
d[0]*Ay[0]+
d[1]*Ay[1]+
d[2]*Ay[2];
965 double H[3],gP[3] ={x0,y0,
z0};
970 if (fabs(
H[2])>.0001) {
974 data.par()[3] = atan2(1.,T) ;
976 data.par()[5] = -C/(300.*
H[2]) ;
982 data.par()[3] = atan2(1.,T) ;
990 data.par()[3] = atan2(1.,T) ;
994 double pTm =
pTmin(SP[0]->eta());
998 if(std::abs(
data.par()[5])*pTm > 1)
return nullptr;
1000 else if(std::abs(
data.par()[5])*
m_pTmin > 1.1)
return nullptr;
1003 data.par()[4] =
data.par()[5]/sqrt(1.+T*T);
1004 data.par()[6] = x0 ;
1005 data.par()[7] = y0 ;
1041 else trackquality.
setIntCut(
"UseAssociationTool",0);
1043 else trackquality.
setIntCut(
"CosmicTrack" ,0);
1044 if (simpleTrack) trackquality.
setIntCut(
"SimpleTrack" ,1);
1045 else trackquality.
setIntCut(
"SimpleTrack" ,0);
1047 else trackquality.
setIntCut(
"doMultiTracksProd" ,0);
1058 return trackquality;
1066 std::vector<const InDetDD::SiDetectorElement*>& DE)
1069 while (
d!=DE.end()) {
1070 if ((*d)->isPixel()) {
1075 }
else if (!
data.sct()) {
1094 std::multiset<const Trk::Track*> trackseed;
1095 std::multimap<const Trk::PrepRawData*,const Trk::Track*>::const_iterator iter_clusterOnTrack,iter_clusterOnTrackEnd =
data.clusterTrack().end();
1106 for (iter_clusterOnTrack =
data.clusterTrack().find(prd); iter_clusterOnTrack!=iter_clusterOnTrackEnd; ++iter_clusterOnTrack) {
1107 if ((*iter_clusterOnTrack).first!=prd)
break;
1109 trackseed.insert((*iter_clusterOnTrack).second);
1114 prd = spacePoint->clusterList().second;
1118 for (iter_clusterOnTrack =
data.clusterTrack().find(prd); iter_clusterOnTrack!=iter_clusterOnTrackEnd; ++iter_clusterOnTrack) {
1119 if ((*iter_clusterOnTrack).first!=prd)
break;
1120 trackseed.insert((*iter_clusterOnTrack).second);
1128 if(trackseed.size() <
n)
return true;
1139 size_t clustersOnCurrent = 1;
1143 if(
track != currentTrack) {
1144 currentTrack =
track;
1145 clustersOnCurrent = 1;
1150 if(++clustersOnCurrent ==
n)
return false;
1153 return clustersOnCurrent!=
n;
1164 if(Sp.size()!=3)
return 0;
1166 std::vector<const Trk::SpacePoint*>::const_iterator
s=Sp.begin(),
se=Sp.end();
1169 for(;
s!=
se; ++
s) {
if((*s)->clusterList().second) ++
n;}
1175 if(Sp.size() < 2)
return 0;
1177 Amg::Vector3D delta_sp = Sp[0]->globalPosition() - Sp[1]->globalPosition();
1178 float eta = 2*std::abs(delta_sp.eta());
1194 for (;
m!=me; ++
m) {
1196 if (prd)
data.clusterTrack().insert(std::make_pair(prd, Tr));
1207 std::multimap<const Trk::PrepRawData*,const Trk::Track*>::const_iterator
1208 ti,
t[100],te =
data.clusterTrack().end();
1216 for (;
m!=me; ++
m) {
1221 t [
n] =
data.clusterTrack().find(prd[
n]);
1222 if (
t[
n]==te)
return true;
1227 if (!
n)
return true;
1230 for (
int i=0;
i!=
n; ++
i) {
1232 for (ti=
t[
i]; ti!=te; ++ti) {
1233 if ( (*ti).first != prd[
i] )
break;
1234 int ncl = (*ti).second->measurementsOnTrack()->size();
1235 if (ncl > nclmax) nclmax = ncl;
1237 if (nclt > nclmax)
return true;
1248 double*
p0,
double*
p1,
double*
p2)
const
1252 p0[0] = s0.globalPosition().x();
1253 p0[1] = s0.globalPosition().y();
1254 p0[2] = s0.globalPosition().z();
1256 p1[0] = s1.globalPosition().x();
1257 p1[1] = s1.globalPosition().y();
1258 p1[2] = s1.globalPosition().z();
1260 p2[0] =
s2.globalPosition().x();
1261 p2[1] =
s2.globalPosition().y();
1262 p2[2] =
s2.globalPosition().z();
1265 if (!s0.clusterList().second && !s1.clusterList().second && !
s2.clusterList().second)
return true;
1268 double dir0[3],dir1[3],dir2[3];
1300 std::pair<Amg::Vector3D,Amg::Vector3D>
e0
1303 localPos =
c1->localPosition();
1304 std::pair<Amg::Vector3D,Amg::Vector3D>
e1
1309 double a0[3] = {
e0.second.x()-
e0.first.x(),
e0.second.y()-
e0.first.y(),
e0.second.z()-
e0.first.z()};
1310 double a1[3] = {
e1.second.x()-
e1.first.x(),
e1.second.y()-
e1.first.y(),
e1.second.z()-
e1.first.z()};
1312 double dr[3] = {
e1.first .x()-
e0.first.x(),
e1.first .y()-
e0.first.y(),
e1.first .z()-
e0.first.z()};
1319 double u[3] = {a1[1]*
dir[2]-a1[2]*
dir[1],a1[2]*
dir[0]-a1[0]*
dir[2],a1[0]*
dir[1]-a1[1]*
dir[0]};
1331 double du =
a0[0]*
u[0]+
a0[1]*
u[1]+
a0[2]*
u[2];
1334 if (du==0. )
return false;
1342 double s0 = (
dr[0]*
u[0]+
dr[1]*
u[1]+
dr[2]*
u[2])/du;
1347 double s1 = (
dr[0]*
v[0]+
dr[1]*
v[1]+
dr[2]*
v[2])/du;
1353 if (s0 < -d0 || s0 > 1.+
d0 || s1 < -d0 || s1 > 1.+
d0)
return false;
1357 p[0] =
e0.first.x()+s0*
a0[0];
1358 p[1] =
e0.first.y()+s0*
a0[1];
1359 p[2] =
e0.first.z()+s0*
a0[2];
1370 if (!
data.caloClusterROIEM())
return false;
1373 double F =
data.par()[2] ;
1376 double Z =
data.par()[8] ;
1386 if (!
data.caloClusterROIHad())
return false;
1388 double F =
data.par()[2] ;
1391 double Z =
data.par()[8] ;
1404 (
const double*
p0,
const double*
p1,
const double*
p2,
double*
d0,
double*
d1,
double*
d2)
1407 double x01 =
p1[0]-
p0[0] ;
1408 double y01 =
p1[1]-
p0[1] ;
1409 double x02 =
p2[0]-
p0[0] ;
1410 double y02 =
p2[1]-
p0[1] ;
1417 double d01 = x01*x01+y01*y01 ;
1418 double x1 = sqrt(d01) ;
1419 double u01 = 1./
x1 ;
1420 double a = x01*u01 ;
1421 double b = y01*u01 ;
1423 double x2 =
a*x02+
b*y02 ;
1425 double y2 =
a*y02-
b*x02 ;
1430 double u02 =
x2/d02 ;
1431 double v02 =
y2/d02 ;
1436 double A0 = v02 /(u02-u01) ;
1437 double B0 = 2.*(v02-A0*u02) ;
1445 double C2 = (1.-B0*
y2) ;
1446 double S2 = (A0+B0*
x2) ;
1448 double T = (
p2[2]-
p0[2])/sqrt(d02);
1449 double sinTheta = 1./sqrt(1.+T*T) ;
1450 double cosTheta = sinTheta*T ;
1451 double sinThetaCosAlpha = sinTheta / sqrt(1.+A0*A0) ;
1452 double Sa = sinThetaCosAlpha*
a ;
1453 double Sb = sinThetaCosAlpha*
b ;
1469 d2[0] = Sa*C2-Sb*
S2;
1479 double aeta = std::abs(eta);