Inheritance diagram for VtxValsTool:


Public Member Functions | |
| VtxValsTool (const std::string &type, const std::string &name, const IInterface *parent) | |
| virtual | ~VtxValsTool () |
| StatusCode | initialize () |
| StatusCode | calculate () |
| calculate all values; implemented by each XxxValsTool | |
Private Attributes | |
| int | VTX_numVertices |
| float | VTX_xdir |
| float | VTX_ydir |
| float | VTX_zdir |
| float | VTX_Phi |
| float | VTX_Theta |
| float | VTX_Sxx |
| float | VTX_Sxy |
| float | VTX_Syy |
| float | VTX_ThetaErr |
| float | VTX_PhiErr |
| float | VTX_x0 |
| float | VTX_y0 |
| float | VTX_z0 |
| float | VTX_Angle |
| float | VTX_DOCA |
| float | VTX_Head_Sep |
| float | VTX_S1 |
| float | VTX_S2 |
| float | VTX_Quality |
| float | VTX_Chisq |
| float | VTX_AddedRL |
| float | VTX_Status |
| float | VTX2_transDoca |
| float | VTX2_longDoca |
| float | VTX2_xdir |
| float | VTX2_ydir |
| float | VTX2_zdir |
| float | VTX2_Phi |
| float | VTX2_Theta |
| float | VTX2_x0 |
| float | VTX2_y0 |
| float | VTX2_z0 |
| float | VTX2_Angle |
| float | VTX2_DOCA |
| float | VTX2_Head_Sep |
| float | VTX2_Status |
| float | VTXN_xdir |
| float | VTXN_ydir |
| float | VTXN_zdir |
| float | VTXN_Sxx |
| float | VTXN_Sxy |
| float | VTXN_Syy |
| float | VTXN_ChgWt |
| float | VTXN_NeutWt |
| float | VTXN1_xdir |
| float | VTXN1_ydir |
| float | VTXN1_zdir |
| float | VTXN1_Sxx |
| float | VTXN1_Sxy |
| float | VTXN1_Syy |
| float | VTXN1_ChgWt |
| float | VTXN1_NeutWt |
Definition at line 50 of file VtxValsTool.cxx.
|
||||||||||||||||
|
Definition at line 137 of file VtxValsTool.cxx.
00140 : ValBase( type, name, parent ) 00141 { 00142 // Declare additional interface 00143 declareInterface<IValsTool>(this); 00144 } |
|
|
Definition at line 58 of file VtxValsTool.cxx.
00058 { }
|
|
|
calculate all values; implemented by each XxxValsTool
Reimplemented from ValBase. Definition at line 332 of file VtxValsTool.cxx. References Doca::arcLenRay1(), Doca::docaOfPoint(), ValBase::m_pEventSvc, VTX2_Angle, VTX2_DOCA, VTX2_Head_Sep, VTX2_longDoca, VTX2_Status, VTX2_transDoca, VTX2_x0, VTX2_xdir, VTX2_y0, VTX2_ydir, VTX2_z0, VTX2_zdir, VTX_AddedRL, VTX_Angle, VTX_Chisq, VTX_DOCA, VTX_Head_Sep, VTX_numVertices, VTX_Phi, VTX_PhiErr, VTX_Quality, VTX_S1, VTX_S2, VTX_Status, VTX_Sxx, VTX_Sxy, VTX_Syy, VTX_Theta, VTX_ThetaErr, VTX_x0, VTX_xdir, VTX_y0, VTX_ydir, VTX_z0, VTX_zdir, VTXN1_ChgWt, VTXN1_NeutWt, VTXN1_Sxx, VTXN1_Sxy, VTXN1_Syy, VTXN1_xdir, VTXN1_ydir, VTXN1_zdir, VTXN_ChgWt, VTXN_NeutWt, VTXN_Sxx, VTXN_Sxy, VTXN_Syy, VTXN_xdir, VTXN_ydir, and VTXN_zdir.
00333 {
00334 StatusCode sc = StatusCode::SUCCESS;
00335
00336 // Recover Track associated info.
00337 SmartDataPtr<Event::TkrTrackCol>
00338 pTracks(m_pEventSvc,EventModel::TkrRecon::TkrTrackCol);
00339 SmartDataPtr<Event::TkrVertexCol>
00340 pVerts(m_pEventSvc,EventModel::TkrRecon::TkrVertexCol);
00341
00342 if(!pVerts) return sc;
00343
00344 VTX_numVertices = (int) pVerts->size();
00345
00346 // Get the first Vertex - First track of first vertex = Best Track
00347 Event::TkrVertexConPtr pVtxr = pVerts->begin();
00348 if(pVtxr == pVerts->end()) return sc;
00349
00350 Event::TkrVertex* gamma = *pVtxr++;
00351 SmartRefVector<Event::TkrTrack>::const_iterator pTrack1 = gamma->getTrackIterBegin();
00352 const Event::TkrTrack* track_1 = *pTrack1;
00353
00354 int nParticles = gamma->getNumTracks();
00355
00356 Point x0 = gamma->getPosition();
00357 Vector t0 = gamma->getDirection();
00358
00359 VTX_xdir = t0.x();
00360 VTX_ydir = t0.y();
00361 VTX_zdir = t0.z();
00362
00363 VTX_Phi = (-t0).phi();
00364 if (VTX_Phi<0.0f) VTX_Phi += static_cast<float>(2*M_PI);
00365 VTX_Theta = (-t0).theta();
00366
00367 const Event::TkrTrackParams& VTX_Cov = gamma->getVertexParams();
00368 VTX_Sxx = VTX_Cov.getxSlpxSlp();
00369 VTX_Sxy = VTX_Cov.getxSlpySlp();
00370 VTX_Syy = VTX_Cov.getySlpySlp();
00371 double sinPhi = sin(VTX_Phi);
00372 double cosPhi = cos(VTX_Phi);
00373 VTX_ThetaErr = t0.z()*t0.z()*sqrt(std::max(0.0, cosPhi*cosPhi*VTX_Sxx +
00374 2.*sinPhi*cosPhi*VTX_Sxy + sinPhi*sinPhi*VTX_Syy));
00375 VTX_PhiErr = (-t0.z())*sqrt(std::max(0.0, sinPhi*sinPhi*VTX_Sxx -
00376 2.*sinPhi*cosPhi*VTX_Sxy + cosPhi*cosPhi*VTX_Syy));
00377 //VTX_ErrAsym = fabs(VTX_Sxy/(VTX_Sxx + VTX_Syy));
00378 //VTX_CovDet = sqrt(std::max(0.0f,VTX_Sxx*VTX_Syy-VTX_Sxy*VTX_Sxy))*VTX_zdir*VTX_zdir;
00379
00380
00381
00382 VTX_x0 = x0.x();
00383 VTX_y0 = x0.y();
00384 VTX_z0 = x0.z();
00385
00386 VTX_Status = gamma->getStatusBits();
00387
00388 // Get the first track location and direction
00389 Point x1 = track_1->front()->getPoint(Event::TkrTrackHit::SMOOTHED);
00390 Vector t1 = track_1->front()->getDirection(Event::TkrTrackHit::SMOOTHED);
00391
00392 // Check if there is a second track in the event. This track may not be
00393 // associated with the first track to form the first vertex.
00394
00395 double cost1t2, t1t2;
00396 Point x2H;
00397
00398 if(nParticles > 1) {
00399 pTrack1++;
00400 const Event::TkrTrack* track_2 = *pTrack1;
00401
00402 Point x2 = track_2->front()->getPoint(Event::TkrTrackHit::SMOOTHED);
00403 Vector t2 = track_2->front()->getDirection(Event::TkrTrackHit::SMOOTHED);
00404
00405 x2H = x2 + ((x1.z()-x2.z())/t2.z()) * t2;
00406
00407 VTX_Head_Sep = (x1-x2H).magnitude();
00408
00409 double cost1t2 = t1*t2;
00410 double t1t2 = acos(cost1t2);
00411 VTX_Angle = t1t2;
00412 VTX_DOCA = gamma->getDOCA();
00413 VTX_S1 = gamma->getTkr1ArcLen();
00414 VTX_S2 = gamma->getTkr2ArcLen();
00415
00416 // Set a rogue value here in case this is a single
00417 if(VTX_xdir == t1.x() && VTX_ydir == t1.y()) VTX_Angle = -.1f;
00418
00419 VTX_Quality = gamma->getQuality();
00420 VTX_Chisq = gamma->getChiSquare();
00421 VTX_AddedRL = gamma->getAddedRadLen();
00422 }
00423
00424 if(pVerts->size()>1) {
00425 Event::TkrVertex* vtx2 = *pVtxr++;
00426
00427 if(!(vtx2->getStatusBits()& Event::TkrVertex::NEUTRALVTX)) {
00428
00429 Point x2 = vtx2->getPosition();
00430 Vector t2 = vtx2->getDirection();
00431 VTX2_Status = vtx2->getStatusBits();
00432
00433 VTX2_xdir = t2.x();
00434 VTX2_ydir = t2.y();
00435 VTX2_zdir = t2.z();
00436
00437 VTX2_x0 = x2.x();
00438 VTX2_y0 = x2.y();
00439 VTX2_z0 = x2.z();
00440
00441 Doca vtx0(x0, t0);
00442 VTX2_transDoca = vtx0.docaOfPoint(x2);
00443 VTX2_longDoca = vtx0.arcLenRay1();
00444
00445 pTrack1 = vtx2->getTrackIterBegin();
00446 nParticles = vtx2->getNumTracks();
00447 const Event::TkrTrack* track_1a = *pTrack1;
00448 // Get the first track location and direction
00449 Point x1 = track_1a->front()->getPoint(Event::TkrTrackHit::SMOOTHED);
00450 Vector t1 = track_1a->front()->getDirection(Event::TkrTrackHit::SMOOTHED);
00451 if(nParticles > 1) {
00452 pTrack1++;
00453 const Event::TkrTrack* track_2a = *pTrack1;
00454
00455 x2 = track_2a->front()->getPoint(Event::TkrTrackHit::SMOOTHED);
00456 t2 = track_2a->front()->getDirection(Event::TkrTrackHit::SMOOTHED);
00457
00458 x2H = x2 + ((x1.z()-x2.z())/t2.z()) * t2;
00459
00460 VTX2_Head_Sep = (x1-x2H).magnitude();
00461
00462 cost1t2 = t1*t2;
00463 t1t2 = acos(cost1t2);
00464 VTX2_Angle = t1t2;
00465 VTX2_DOCA = vtx2->getDOCA();
00466
00467 // Set a rogue value here in case this is a single
00468 if(VTX2_xdir == t1.x() && VTX2_ydir == t1.y()) VTX2_Angle = -.1f;
00469 }
00470 }}
00471
00472 //Neutral Vertex section
00473 Event::TkrVertexConPtr pVtxN = pVerts->begin();
00474 Event::TkrVertex* vtxN;
00475 bool VTX_Set = false;
00476 for(; pVtxN != pVerts->end(); pVtxN++)
00477 {
00478 vtxN = *pVtxN;
00479 const Event::TkrTrackParams& VTXN_Cov = vtxN->getVertexParams();
00480 if(vtxN->getStatusBits()& Event::TkrVertex::NEUTRALVTX) {
00481 Vector tN = vtxN->getDirection();
00482 float chrg_wt = vtxN->getTkr1ArcLen();
00483 float neut_wt = vtxN->getTkr2ArcLen();
00484
00485 if(vtxN->getStatusBits()& Event::TkrVertex::ONETKRVTX){
00486 if(!VTX_Set) {
00487 VTXN_xdir = tN.x();
00488 VTXN_ydir = tN.y();
00489 VTXN_zdir = tN.z();
00490 VTXN_Sxx = VTXN_Cov.getxSlpxSlp();
00491 VTXN_Sxy = VTXN_Cov.getxSlpySlp();
00492 VTXN_Syy = VTXN_Cov.getySlpySlp();
00493 VTXN_ChgWt = chrg_wt;
00494 VTXN_NeutWt = neut_wt;
00495 VTX_Set = true;
00496 }
00497 VTXN1_xdir = tN.x();
00498 VTXN1_ydir = tN.y();
00499 VTXN1_zdir = tN.z();
00500 VTXN1_Sxx = VTXN_Cov.getxSlpxSlp();
00501 VTXN1_Sxy = VTXN_Cov.getxSlpySlp();
00502 VTXN1_Syy = VTXN_Cov.getySlpySlp();
00503 VTXN1_ChgWt = chrg_wt;
00504 VTXN1_NeutWt = neut_wt;
00505 } else {
00506 VTXN_xdir = tN.x();
00507 VTXN_ydir = tN.y();
00508 VTXN_zdir = tN.z();
00509 VTXN_Sxx = VTXN_Cov.getxSlpxSlp();
00510 VTXN_Sxy = VTXN_Cov.getxSlpySlp();
00511 VTXN_Syy = VTXN_Cov.getySlpySlp();
00512 VTXN_ChgWt = chrg_wt;
00513 VTXN_NeutWt = neut_wt;
00514 VTX_Set = true;
00515 } } }
00516
00517 return sc;
00518 }
|
|
|
Reimplemented from ValBase. Definition at line 236 of file VtxValsTool.cxx. References ValBase::addItem(), ValBase::initialize(), VTX2_Angle, VTX2_DOCA, VTX2_Head_Sep, VTX2_longDoca, VTX2_Status, VTX2_transDoca, VTX2_x0, VTX2_xdir, VTX2_y0, VTX2_ydir, VTX2_z0, VTX2_zdir, VTX_AddedRL, VTX_Angle, VTX_Chisq, VTX_DOCA, VTX_Head_Sep, VTX_numVertices, VTX_Phi, VTX_PhiErr, VTX_Quality, VTX_S1, VTX_S2, VTX_Status, VTX_Sxx, VTX_Sxy, VTX_Syy, VTX_Theta, VTX_ThetaErr, VTX_x0, VTX_xdir, VTX_y0, VTX_ydir, VTX_z0, VTX_zdir, VTXN1_ChgWt, VTXN1_NeutWt, VTXN1_Sxx, VTXN1_Sxy, VTXN1_Syy, VTXN1_xdir, VTXN1_ydir, VTXN1_zdir, VTXN_ChgWt, VTXN_NeutWt, VTXN_Sxx, VTXN_Sxy, VTXN_Syy, VTXN_xdir, VTXN_ydir, VTXN_zdir, and ValBase::zeroVals().
00237 {
00238 StatusCode sc = StatusCode::SUCCESS;
00239
00240 MsgStream log(msgSvc(), name());
00241
00242 if( ValBase::initialize().isFailure()) return StatusCode::FAILURE;
00243
00244 // get the services
00245
00246 if( serviceLocator() ) {
00247 } else {
00248 return StatusCode::FAILURE;
00249 }
00250
00251 // load up the map
00252
00253 // Pair reconstruction
00254 addItem("VtxNumVertices", &VTX_numVertices);
00255 addItem("VtxXDir", &VTX_xdir);
00256 addItem("VtxYDir", &VTX_ydir);
00257 addItem("VtxZDir", &VTX_zdir);
00258 addItem("VtxPhi", &VTX_Phi);
00259 addItem("VtxTheta", &VTX_Theta);
00260
00261 addItem("VtxThetaErr", &VTX_ThetaErr);
00262 addItem("VtxPhiErr", &VTX_PhiErr);
00263 addItem("VtxSXX", &VTX_Sxx);
00264 addItem("VtxSXY", &VTX_Sxy);
00265 addItem("VtxSYY", &VTX_Syy);
00266
00267 /* in case we want this later
00268 <tr><td> VtxErrAsym
00269 <td>F<td> Tkr1SXY/(Tkr1SXX + Tkr1SYY)
00270 <tr><td> VtxCovDet
00271 <td>F<td> Determinant of the error matrix,
00272 but normalized to remove the dependence on cos(theta)
00273 */
00274 //addItem("VtxErrAsym", &VTX_ErrAsym);
00275 //addItem("VtxCovDet", &VTX_CovDet);
00276
00277
00278 addItem("VtxX0", &VTX_x0);
00279 addItem("VtxY0", &VTX_y0);
00280 addItem("VtxZ0", &VTX_z0);
00281
00282 addItem("VtxAngle", &VTX_Angle);
00283 addItem("VtxDOCA", &VTX_DOCA);
00284 addItem("VtxHeadSep", &VTX_Head_Sep);
00285 addItem("VtxStatus", &VTX_Status);
00286 addItem("VtxQuality", &VTX_Quality);
00287 addItem("VtxChisq", &VTX_Chisq);
00288
00289 addItem("VtxS1", &VTX_S1);
00290 addItem("VtxS2", &VTX_S2);
00291 addItem("VtxAddedRL", &VTX_AddedRL);
00292
00293 addItem("Vtx2TransDoca", &VTX2_transDoca);
00294 addItem("Vtx2LongDoca", &VTX2_longDoca);
00295
00296 addItem("Vtx2XDir", &VTX2_xdir);
00297 addItem("Vtx2YDir", &VTX2_ydir);
00298 addItem("Vtx2ZDir", &VTX2_zdir);
00299 addItem("Vtx2X0", &VTX2_x0);
00300 addItem("Vtx2Y0", &VTX2_y0);
00301 addItem("Vtx2Z0", &VTX2_z0);
00302
00303 addItem("Vtx2Angle", &VTX2_Angle);
00304 addItem("Vtx2DOCA", &VTX2_DOCA);
00305 addItem("Vtx2HeadSep", &VTX2_Head_Sep);
00306 addItem("Vtx2Status", &VTX2_Status);
00307
00308 addItem("VtxNeutXDir" , &VTXN_xdir);
00309 addItem("VtxNeutYDir" , &VTXN_ydir);
00310 addItem("VtxNeutZDir" , &VTXN_zdir);
00311 addItem("VtxNeutSXX", &VTXN_Sxx);
00312 addItem("VtxNeutSXY", &VTXN_Sxy);
00313 addItem("VtxNeutSYY", &VTXN_Syy);
00314 addItem("VtxNeutChgWt", &VTXN_ChgWt);
00315 addItem("VtxNeutNeutWt", &VTXN_NeutWt);
00316
00317 addItem("VtxNeut1XDir" , &VTXN1_xdir);
00318 addItem("VtxNeut1YDir" , &VTXN1_ydir);
00319 addItem("VtxNeut1ZDir" , &VTXN1_zdir);
00320 addItem("VtxNeut1SXX", &VTXN1_Sxx);
00321 addItem("VtxNeut1SXY", &VTXN1_Sxy);
00322 addItem("VtxNeut1SYY", &VTXN1_Syy);
00323 addItem("VtxNeut1ChgWt", &VTXN1_ChgWt);
00324 addItem("VtxNeut1NeutWt", &VTXN1_NeutWt);
00325
00326 zeroVals();
00327
00328 return sc;
00329 }
|
|
|
Definition at line 106 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 107 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 108 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 96 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 101 of file VtxValsTool.cxx. |
|
|
Definition at line 109 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 102 of file VtxValsTool.cxx. |
|
|
Definition at line 95 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 103 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 98 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 104 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 99 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 105 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 100 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 92 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 83 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 91 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 84 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 85 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 67 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 71 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 77 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 90 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 87 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 88 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 93 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 73 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 74 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 75 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 72 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 76 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 80 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 68 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 81 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 69 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 82 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 70 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 128 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 129 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 125 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 126 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 127 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 121 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 122 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 123 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 118 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 119 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 115 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 116 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 117 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 111 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 112 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
|
|
Definition at line 113 of file VtxValsTool.cxx. Referenced by calculate(), and initialize(). |
1.3.3