5 #include "GaudiKernel/MsgStream.h"
6 #include "GaudiKernel/DataSvc.h"
7 #include "GaudiKernel/SmartDataPtr.h"
25 using HepGeom::Point3D;
96 return StatusCode::FAILURE;
103 if ( !prdCollection.
isValid() ){
105 return StatusCode::FAILURE;
123 return StatusCode::SUCCESS;
132 if(
m_events<=0)
return StatusCode::SUCCESS;
134 std::cout<<
"|-----------------------------------------------------------------------------------|"
136 std::cout<<
"| TrackSegmentValidation statistics"<<std::endl;
141 std::cout<<
"|-----------------------------------------------------------------------------------|"
143 std::cout<<
"| TRT Particles >0.9 >0.75 >0.50 >0.25 <=0.25 |"
145 std::cout<<
"|-----------------------------------------------------------------------------------|"
150 <<std::setw(13)<<std::setprecision(5)<<
ef[0]
151 <<std::setw(13)<<std::setprecision(5)<<
ef[1]
152 <<std::setw(13)<<std::setprecision(5)<<
ef[2]
153 <<std::setw(13)<<std::setprecision(5)<<
ef[3]
154 <<std::setw(13)<<std::setprecision(5)<<
ef[4]<<
" |"
156 std::cout<<
"|-----------------------------------------------------------------------------------|"
159 return StatusCode::SUCCESS;
166 MsgStream& InDet::operator <<
176 std::ostream& InDet::operator <<
201 out<<
"|----------------------------------------------------------------"
202 <<
"----------------------------------------------------|"
205 std::string s1;
for(
int i=0;
i<
n; ++
i) s1.append(
" "); s1.append(
"|");
207 std::string
s2;
for(
int i=0;
i<
n; ++
i)
s2.append(
" ");
s2.append(
"|");
209 std::string
s3;
for(
int i=0;
i<
n; ++
i)
s3.append(
" ");
s3.append(
"|");
218 <<std::setw(14)<<std::setprecision(5)<<
m_pTmin
221 out<<
"| rapidity cut | "
222 <<std::setw(14)<<std::setprecision(5)<<
m_rapcut
225 out<<
"| min Radius | "
226 <<std::setw(14)<<std::setprecision(5)<<
m_rmin
229 out<<
"| max Radius | "
230 <<std::setw(14)<<std::setprecision(5)<<
m_rmax
233 out<<
"| Min. number drift circles for generated segment | "
234 <<std::setw(14)<<std::setprecision(5)<<
m_dccut
237 out<<
"|----------------------------------------------------------------"
238 <<
"----------------------------------------------------|"
250 out<<
"|---------------------------------------------------------------------|"
252 out<<
"| TRT Drift Circles | "
255 out<<
"| Good TRT particles size | "
258 out<<
"| Number good kine segments | "
261 out<<
"|---------------------------------------------------------------------|"
294 InDet::TRT_DriftCircleContainer::const_iterator
w = trtcontainer->begin();
295 InDet::TRT_DriftCircleContainer::const_iterator we = trtcontainer->end ();
299 InDet::TRT_DriftCircleCollection::const_iterator
c = (*w)->begin();
300 InDet::TRT_DriftCircleCollection::const_iterator ce = (*w)->end ();
306 std::list<int> lk =
kine((*
c), prdCollection );
307 if(
int(lk.size())==0)
continue;
309 for(ik=lk.begin();ik!=ike;++ik){
312 bool isThere =
false;
315 if((*ik)==(*ii)) isThere =
true;
341 if((*ii)==(*dc).first) ndc++;
370 int KINE[200],NKINE[200];
371 for(
int i=0;
i<200;++
i){
372 KINE[
i] =0; NKINE[
i] = 0;
377 for(; iseg != isegEnd; ++ iseg) {
390 if(!trtcircle)
continue;
393 if(!RawDataClus)
continue;
395 std::list<PRD_MultiTruthCollection::const_iterator> lk =
kinpart(RawDataClus, prdCollection );
396 if (
int(lk.size())==0)
continue;
400 for(ik=lk.begin(); ik!=ike; ++ik){
405 for(
int n=0;
n!=NK; ++
n) {
421 for(
int n=0;
n!=NK; ++
n) {
443 int n = (*im).second;
448 if((*t).first!=
k)
break;
449 if((*t).second >
m)
m = (*t).second;
452 double rd = (
double)
m/
n;
if(rd>0.9)
d = 0;
453 else if(rd > 0.75)
d=1;
454 else if(rd > 0.50)
d=2;
455 else if(rd > 0.25)
d=3;
456 else if(rd <= 0.25)
d=4;
471 std::list<PRD_MultiTruthCollection::const_iterator>
mc =
findTruth(
d,
find, prdCollection );
474 for(imc=
mc.begin();imc!=imce;++imc){
478 if(!pa || !pa->production_vertex())
continue;
482 int pdg = pa->pdg_id();
488 double pt = pa->momentum().perp();
493 double t = std::abs(pa->momentum().pz())/
pt;
498 Point3D<double>
v(pa->production_vertex()->position().x(),
499 pa->production_vertex()->position().y(),
500 pa->production_vertex()->position().z());
501 double r = sqrt(
v.x()*
v.x()+
v.y()*
v.y());
502 if( r < m_rmin || r >
m_rmax)
continue;
518 std::list<PRD_MultiTruthCollection::const_iterator> lk;
520 std::list<PRD_MultiTruthCollection::const_iterator>
mc =
findTruth(
d,
find, prdCollection );
524 for(imc=
mc.begin();imc!=imce;++imc){
529 if(!pa || !pa->production_vertex())
continue;
533 int pdg = pa->pdg_id();
539 double pt = pa->momentum().perp();
545 double t = std::abs(pa->momentum().pz())/
pt;
550 Point3D<double>
v(pa->production_vertex()->position().x(),
551 pa->production_vertex()->position().y(),
552 pa->production_vertex()->position().z());
553 double r = sqrt(
v.x()*
v.x()+
v.y()*
v.y());
554 if( r < m_rmin || r >
m_rmax)
continue;
556 lk.push_back((*imc));
572 if((*k).first!= K)
return false;
573 if(
d->detectorElement()==(*k).second->detectorElement())
return true;
581 std::list<PRD_MultiTruthCollection::const_iterator>
585 std::list<PRD_MultiTruthCollection::const_iterator>
mc;
587 auto r = prdCollection->equal_range(
d->identify());
588 for(
auto i =
r.first;
i !=
r.second &&
i != prdCollection->end(); ++
i){
592 if (
mc.empty()) Q =
false;