#include <TestTrackViewer.h>
Collaboration diagram for Atlfast::TestTrackViewer:
Public Methods | |
TestTrackViewer (const std::string &name, ISvcLocator *pSvcLocator) | |
Standard Athena-Algorithm Constructor. | |
virtual | ~TestTrackViewer () |
Default Constructor. | |
StatusCode | initialize () |
Standard Athena-Algorithm method. | |
StatusCode | execute () |
Standard Athena-Algorithm method. | |
StatusCode | finalize () |
Standard Athena-Algorithm method. | |
Private Methods | |
void | testViewer (MsgStream &, std::vector< Track * > &) |
Private Attributes | |
std::string | m_trackLocation |
location within the TES to find collections of Atlfast output objects | |
int | m_nevents |
int | m_ntracks |
TesIO * | m_tesIO |
Definition at line 66 of file TestTrackViewer.h.
|
Standard Athena-Algorithm Constructor.
Definition at line 42 of file TestTrackViewer.cxx. References m_trackLocation.
00044 : Algorithm( name, pSvcLocator ){ 00045 00046 // Setting the parameter defaults. 00047 m_trackLocation = "/Event/AtlfastTracks"; 00048 declareProperty( "TrackLocation", m_trackLocation ) ; 00049 00050 } |
|
Default Constructor.
Definition at line 53 of file TestTrackViewer.cxx.
00053 {
00054 MsgStream log( messageService(), name() ) ;
00055 log << MSG::INFO << "Destructor called" << endreq;
00056 }
|
|
Standard Athena-Algorithm method.
Definition at line 63 of file TestTrackViewer.cxx. References m_nevents, m_ntracks, m_tesIO, and m_trackLocation.
00063 { 00064 00065 // We must here instantiate items which can only be made after 00066 // any job options have been set 00067 00068 MsgStream log( messageService(), name() ) ; 00069 log << MSG::DEBUG << "Initialising" << endreq; 00070 HeaderPrinter hp("TestTrackViewer:",log); 00071 hp.add( "TrackLocation ", m_trackLocation ) ; 00072 hp.print(); 00073 00074 m_nevents = 0; 00075 m_ntracks = 0; 00076 // m_tesIO = new TesIO(eventDataService()); 00077 m_tesIO = new TesIO(); 00078 00079 return StatusCode::SUCCESS ; 00080 } |
|
Standard Athena-Algorithm method.
Definition at line 102 of file TestTrackViewer.cxx. References m_nevents, m_tesIO, m_trackLocation, and testViewer().
00102 { 00103 00104 //................................ 00105 // make a message logging stream 00106 00107 MsgStream log( messageService(), name() ) ; 00108 ++m_nevents; 00109 00110 00111 //......................................................... 00112 // This is how you extract the things you want to look at. 00113 // Look at the userguide for details of ReconstructedParticle, Cell 00114 // and Cluster classes 00115 std::vector<Track*> tracks; 00116 if(!m_tesIO->copy<TrackCollection >(tracks, m_trackLocation)){ 00117 log << MSG::DEBUG 00118 << "No Tracks found in TES at " 00119 << m_trackLocation 00120 << endreq ; 00121 }else{ 00122 log << MSG::DEBUG 00123 << "No. of Tracks found in TES = " 00124 << tracks.size() 00125 << endreq ; 00126 } 00127 00128 //......................................................... 00129 // Here are example things you might do 00130 00131 00132 if( tracks.size() ) this->testViewer( log, tracks ) ; 00133 00134 return StatusCode::SUCCESS ; 00135 00136 } |
|
Standard Athena-Algorithm method.
Definition at line 87 of file TestTrackViewer.cxx. References m_nevents, and m_ntracks.
|
|
Definition at line 144 of file TestTrackViewer.cxx. References m_ntracks, and AtlfAna::ITrackParameterView::trackParameters(). Referenced by execute().
00145 { 00146 00147 log << MSG::DEBUG << "Starting track view tester" << endreq ; 00148 00149 00150 00151 // traverse collection of particles 00152 std::vector<Track*>::const_iterator track; 00153 00154 for( track = tracks.begin(); track < tracks.end(); ++track ){ 00155 00156 log << MSG::DEBUG << *track << endreq; 00157 ++m_ntracks; 00158 TrackTrajectory traj = (*track)->trajectory(); 00159 AtlfAna::AtlfTrackViewer trackViewer(*track); 00160 AtlfAna::ITrackParameterView& parameterView = trackViewer; 00161 log<<MSG::DEBUG<<parameterView.trackParameters()<<endl; 00162 const ITrackParameters& tp = parameterView.trackParameters(); 00163 double eps = 0.0000001; 00164 TrackParameters testParam = (*track)->trajectory().parameters(); 00165 assert(abs( tp.eta()-testParam.eta() ) < eps); 00166 assert(abs( tp.phi()-testParam.phi() ) < eps); 00167 assert(abs( tp.cotTheta()-testParam.cotTheta() ) < eps); 00168 assert(abs( tp.impactParameter()-testParam.impactParameter() ) < eps); 00169 assert(abs( tp.zPerigee()-testParam.zPerigee() ) < eps); 00170 assert(abs( tp.invPtCharge()-testParam.invPtCharge() ) < eps); 00171 00172 } 00173 00174 } |
|
location within the TES to find collections of Atlfast output objects
Definition at line 106 of file TestTrackViewer.h. Referenced by execute(), initialize(), and TestTrackViewer(). |
|
Definition at line 107 of file TestTrackViewer.h. Referenced by execute(), finalize(), and initialize(). |
|
Definition at line 108 of file TestTrackViewer.h. Referenced by finalize(), initialize(), and testViewer(). |
|
Definition at line 109 of file TestTrackViewer.h. Referenced by execute(), and initialize(). |