#include <ReconstructedParticleDumper.h>
Collaboration diagram for Atlfast::ReconstructedParticleDumper:
Public Methods | |
ReconstructedParticleDumper (const std::string &name, ISvcLocator *pSvcLocator) | |
virtual | ~ReconstructedParticleDumper () |
virtual StatusCode | initialize () |
virtual StatusCode | execute () |
virtual StatusCode | finalize () |
Private Attributes | |
TesIO * | m_tesIO |
bool | m_writePDG |
bool | m_writeFourVector |
bool | m_writeEta |
bool | m_writePhi |
bool | m_writePt |
bool | m_writeEt |
bool | m_writeMt |
bool | m_writeTruth |
std::string | m_inputLocation |
|
Definition at line 29 of file ReconstructedParticleDumper.cxx.
00030 : Algorithm( name, pSvcLocator ){ 00031 00032 00033 // Default paths for entities in the TES 00034 m_inputLocation = "/Event/Atlfast/ReconstructedParticle"; 00035 00036 m_writePDG = true; 00037 m_writeFourVector = true; 00038 m_writeEta = true; 00039 m_writePhi = true; 00040 m_writePt = true; 00041 m_writeEt = false; 00042 m_writeMt = false; 00043 m_writeTruth = true; 00044 00045 declareProperty( "InputLocation", m_inputLocation ) ; 00046 00047 declareProperty( "WritePDG", m_writePDG ); 00048 declareProperty( "WriteFourVector", m_writeFourVector ); 00049 declareProperty( "WriteEta", m_writeEta ); 00050 declareProperty( "WritePhi", m_writePhi ); 00051 declareProperty( "WritePt", m_writePt ); 00052 declareProperty( "WriteEt", m_writeEt ); 00053 declareProperty( "WriteMt", m_writeMt ); 00054 declareProperty( "WriteTruth", m_writeTruth ); 00055 00056 } |
|
Definition at line 59 of file ReconstructedParticleDumper.cxx.
00059 {} |
|
Definition at line 66 of file ReconstructedParticleDumper.cxx. References m_tesIO.
00066 { 00067 //MsgStream log( messageService(), name() ) ; 00068 00069 // .. put any initialisation in here... 00070 00071 // will need to build an appropriate smearer object here 00072 // when tools become avialble we will instead just pass an appropriate 00073 // tool via job options 00074 00075 // m_tesIO = new TesIO(eventDataService()); 00076 m_tesIO = new TesIO(); 00077 00078 return StatusCode::SUCCESS ; 00079 } |
|
Definition at line 97 of file ReconstructedParticleDumper.cxx. References m_inputLocation, and m_tesIO.
00097 { 00098 //................................ 00099 // make a message logging stream 00100 00101 MsgStream log( messageService(), name() ) ; 00102 00103 //............................. 00104 // Make some locals stores which be used to keep pointers to 00105 // all of the entities from the event store which are needed by 00106 // this algorithm. These are all local and are typedefed in this class 00107 00108 //t_reconstructedParticleCollection myParticles ; 00109 //............................... 00110 // Extract the input particles which are to be tested for isolation. 00111 00112 00113 std::vector<ReconstructedParticle*> particles; 00114 if(!m_tesIO->copy<ReconstructedParticleCollection > 00115 (particles, m_inputLocation)){ 00116 log << MSG::INFO 00117 << "No reconstructed particles in TES at " 00118 << m_inputLocation 00119 << endreq ; 00120 return StatusCode::FAILURE ; 00121 } 00122 log << MSG::INFO << particles.size() 00123 << " Reconstructed particles retrieved from TES at " 00124 << m_inputLocation 00125 << endreq; 00126 00127 00128 00129 int count = 0; 00130 std::vector<ReconstructedParticle*>::const_iterator particle = 00131 particles.begin(); 00132 for (; particle != particles.end(); ++particle) { 00133 count++; 00134 log << MSG::INFO << count; 00135 if (m_writePDG) { 00136 log << " PDG " << (*particle)->pdg_id(); 00137 } 00138 if (m_writeFourVector) { 00139 log << " px " << (*particle)->momentum().px() 00140 << " py " << (*particle)->momentum().py() 00141 << " pz " << (*particle)->momentum().pz() 00142 << " e " << (*particle)->momentum().e(); 00143 } 00144 if (m_writeEta) { 00145 log << " eta " << (*particle)->eta(); 00146 } 00147 if (m_writePhi) { 00148 log << " phi " << (*particle)->phi(); 00149 } 00150 if (m_writePt) { 00151 log << " pt " << (*particle)->pT(); 00152 } 00153 if (m_writeEt) { 00154 log << " et " << (*particle)->eT(); 00155 } 00156 if (m_writeMt) { 00157 log << " mt " << (*particle)->mT(); 00158 } 00159 if (m_writeTruth) { 00160 log << " MC truth " << (*particle)->truth()->momentum(); 00161 } 00162 00163 log << endreq; 00164 00165 // Now print any associations 00166 IAssociationManager* ia = *particle; 00167 Cluster c; 00168 log << " it has " << ia->associations( c ).size() 00169 << " associated clusters " << endreq; 00170 } 00171 00172 return StatusCode::SUCCESS; 00173 } |
|
Definition at line 85 of file ReconstructedParticleDumper.cxx.
00085 { 00086 // .. put any finalisation in here... 00087 00088 return StatusCode::SUCCESS ; 00089 } |
|
Definition at line 82 of file ReconstructedParticleDumper.h. Referenced by execute(), and initialize(). |
|
Definition at line 88 of file ReconstructedParticleDumper.h. |
|
Definition at line 89 of file ReconstructedParticleDumper.h. |
|
Definition at line 90 of file ReconstructedParticleDumper.h. |
|
Definition at line 91 of file ReconstructedParticleDumper.h. |
|
Definition at line 92 of file ReconstructedParticleDumper.h. |
|
Definition at line 93 of file ReconstructedParticleDumper.h. |
|
Definition at line 94 of file ReconstructedParticleDumper.h. |
|
Definition at line 95 of file ReconstructedParticleDumper.h. |
|
Definition at line 103 of file ReconstructedParticleDumper.h. Referenced by execute(). |