/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

RecRpcReadout.cc
Go to the documentation of this file.
00001 #include "LafKernel/PhyEvent/RecRpcReadout.h"
00002 
00003 RecRpcReadout::~RecRpcReadout()
00004 {
00005     for ( int i = 0; i < nClusters; ++i ) {
00006         delete clusters[i];
00007     }
00008     for ( int i = 0; i < nTracks; ++i ) {
00009         delete tracks[i];
00010     }
00011 }
00012 
00013 RecRpcReadout::Cluster::Cluster(int _status, int _type, int _maxHitsInLayer, bool _is4of4,
00014         float _x, float _y, float _z, float _t, float _quality)
00015     : status(_status),
00016       type(_type),
00017       maxHitsInLayer(_maxHitsInLayer),
00018       is4of4(_is4of4),
00019       x(_x),
00020       y(_y),
00021       z(_z),
00022       t(_t),
00023       quality(_quality)
00024 {
00025 }
00026 
00027 const TVector3 RecRpcReadout::Cluster::position()
00028 {
00029     return TVector3(x, y, z);
00030 }
00031 
00032 RecRpcReadout::Track::Track(RecRpcReadout::Cluster* _start, RecRpcReadout::Cluster* _end)
00033     : start(_start),
00034       end(_end)
00035 {
00036 }
00037 
00038 const TVector3 RecRpcReadout::Track::direction()
00039 {
00040     TVector3 vDiff = end->position() - start->position();
00041     vDiff.SetMag(1.0);
00042     return vDiff;
00043 }
00044 
00045 int  RecRpcReadout::maxHitsInLayer()
00046 {
00047     int res = 0;
00048     std::vector<Cluster*>::iterator end = clusters.end();
00049     for ( std::vector<Cluster*>::iterator it = clusters.begin(); it != end; ++it ) {
00050         int _max = (*it)->maxHitsInLayer;
00051         if ( _max > res ) {
00052             res = _max;
00053         }
00054     }
00055     return res;
00056 }
00057 
00058 bool RecRpcReadout::is4of4()
00059 {
00060     std::vector<Cluster*>::iterator end = clusters.end();
00061     for ( std::vector<Cluster*>::iterator it = clusters.begin(); it != end; ++it ) {
00062         if ( (*it)->is4of4 ) return true;
00063     }
00064     return false;
00065 }
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:50:18 for LafKernel by doxygen 1.7.4