#include <StandardHistogramMaker.h>
Collaboration diagram for Atlfast::StandardHistogramMaker:
Definition at line 64 of file StandardHistogramMaker.h.
|
Definition at line 32 of file StandardHistogramMaker.cxx.
00033 : Algorithm( name, pSvcLocator ) 00034 { 00035 00036 00037 00038 00039 // Default paths for entities in the TES 00040 m_electronLocation = "/Event/Electrons"; 00041 m_photonLocation = "/Event/Photons"; 00042 m_isolatedElectronLocation = "/Event/IsolatedElectrons"; 00043 m_isolatedPhotonLocation = "/Event/IsolatedPhotons"; 00044 m_cellLocation = "/Event/AtlfastCells"; 00045 m_clusterLocation = "/Event/Clusters"; 00046 m_mcTruthLocation = "/Event/McEventCollection"; 00047 00048 00049 // Defaults for which sets of histograms to do 00050 m_doElectronHistograms = true; 00051 m_doPhotonHistograms = true; 00052 m_doIsolatedElectronHistograms = true; 00053 m_doIsolatedPhotonHistograms = true; 00054 m_doCellHistograms = true; 00055 m_doClusterHistograms = true; 00056 00057 00058 // Default number at which to start the histograms 00059 m_histStart = 0; 00060 00061 declareProperty( "ElectronLocation", m_electronLocation ) ; 00062 declareProperty( "PhotonLocation", m_photonLocation ); 00063 declareProperty( "IsolatedElectronLocation", m_isolatedElectronLocation ); 00064 declareProperty( "IsolatedPhotonLocation", m_isolatedPhotonLocation ); 00065 declareProperty( "CellLocation", m_cellLocation ); 00066 declareProperty( "ClusterLocation", m_clusterLocation ); 00067 declareProperty( "McTruthLocation", m_mcTruthLocation ); 00068 00069 declareProperty( "DoElectronHistograms",m_doElectronHistograms ); 00070 declareProperty( "DoPhotonHistograms", m_doPhotonHistograms ); 00071 declareProperty( "DoIsolatedElectronHistograms",m_doIsolatedElectronHistograms ); 00072 declareProperty( "DoIsolatedPhotonHistograms",m_doIsolatedPhotonHistograms ); 00073 declareProperty( "DoCellHistograms",m_doCellHistograms ); 00074 declareProperty( "DoClusterHistograms",m_doClusterHistograms ); 00075 00076 declareProperty( "HistogramStart", m_histStart ); 00077 00078 00079 } |
|
Definition at line 80 of file StandardHistogramMaker.cxx.
00080 {} |
|
Definition at line 86 of file StandardHistogramMaker.cxx. References bookCellHistograms(), bookClusterHistograms(), bookElectronHistograms(), bookIsolatedElectronHistograms(), bookIsolatedPhotonHistograms(), bookPhotonHistograms(), m_histStart, m_nHist, and m_tesIO.
00087 { 00088 // .. put any initialisation in here... 00089 MsgStream log(messageService(), name()); 00090 log << MSG::DEBUG << "in initialize()" << endreq; 00091 00092 m_nHist = m_histStart; 00093 if ( m_doElectronHistograms ) bookElectronHistograms(); 00094 if ( m_doPhotonHistograms ) bookPhotonHistograms(); 00095 if ( m_doIsolatedElectronHistograms ) bookIsolatedElectronHistograms(); 00096 if ( m_doIsolatedPhotonHistograms ) bookIsolatedPhotonHistograms(); 00097 if ( m_doCellHistograms ) bookCellHistograms(); 00098 if ( m_doClusterHistograms ) bookClusterHistograms(); 00099 00100 log << MSG::DEBUG << "Booked histograms OK" << endreq; 00101 // m_tesIO = new TesIO(eventDataService()); 00102 m_tesIO = new TesIO(); 00103 return StatusCode::SUCCESS ; 00104 } |
|
Definition at line 125 of file StandardHistogramMaker.cxx. References fillCellHistograms(), fillClusterHistograms(), fillElectronHistograms(), fillIsolatedElectronHistograms(), fillIsolatedPhotonHistograms(), and fillPhotonHistograms().
00126 { 00127 00128 //................................ 00129 // make a message logging stream 00130 00131 MsgStream log( messageService(), name() ) ; 00132 log << MSG::DEBUG << "Executing " << endreq; 00133 00134 if ( m_doElectronHistograms ) fillElectronHistograms(); 00135 if ( m_doPhotonHistograms ) fillPhotonHistograms(); 00136 if ( m_doIsolatedElectronHistograms ) fillIsolatedElectronHistograms(); 00137 if ( m_doIsolatedPhotonHistograms ) fillIsolatedPhotonHistograms(); 00138 if ( m_doCellHistograms ) fillCellHistograms(); 00139 if ( m_doClusterHistograms ) fillClusterHistograms(); 00140 00141 return StatusCode::SUCCESS ; 00142 } |
|
Definition at line 112 of file StandardHistogramMaker.cxx.
00113 { 00114 // .. put any finalisation in here... 00115 return StatusCode::SUCCESS ; 00116 } |
|
Definition at line 147 of file StandardHistogramMaker.cxx. References m_h_electronMultiplicity, m_h_electronPt, and m_nHist. Referenced by initialize().
00147 { 00148 MsgStream log( messageService(), name() ); 00149 log << MSG::DEBUG << "Booking electron histograms" << endreq; 00150 00151 // first increment the histogram count 00152 m_nHist++; 00153 // then book the histogram 00154 m_h_electronMultiplicity = 00155 histoSvc()->book("/stat/simple/",m_nHist,"Electron Multiplicity",20,0.0,20.0); 00156 // or be a C++ guru and do both at once 00157 m_h_electronPt = 00158 histoSvc()->book("/stat/simple/",++m_nHist,"Electron Pt",100,0.0,1000.0); 00159 00160 //MC truth electrons 00161 00162 00163 return; 00164 } |
|
Definition at line 168 of file StandardHistogramMaker.cxx. References m_h_photonMultiplicity, m_h_photonPt, and m_nHist. Referenced by initialize().
00168 { 00169 MsgStream log( messageService(), name() ); 00170 log << MSG::DEBUG << "Booking photon histograms" << endreq; 00171 00172 m_h_photonMultiplicity = 00173 histoSvc()->book("/stat/simple/",++m_nHist,"Photon Multiplicity",100,0.0,100.0); 00174 // or be a C++ guru and do both at once 00175 m_h_photonPt = 00176 histoSvc()->book("/stat/simple/",++m_nHist,"Photon Pt",100,0.0,1000.0); 00177 return; 00178 } |
|
Definition at line 182 of file StandardHistogramMaker.cxx. References m_h_isolatedElectronMultiplicity, m_h_isolatedElectronPt, and m_nHist. Referenced by initialize().
00182 { 00183 MsgStream log( messageService(), name() ); 00184 log << MSG::DEBUG << "Booking isolated electron histograms" << endreq; 00185 00186 m_h_isolatedElectronMultiplicity = 00187 histoSvc()->book("/stat/simple/",++m_nHist,"Isolated Electron Multiplicity",10,0.0,10.0); 00188 // or be a C++ guru and do both at once 00189 m_h_isolatedElectronPt = 00190 histoSvc()->book("/stat/simple/",++m_nHist,"Isolated Electron Pt",100,0.0,1000.0); 00191 return; 00192 } |
|
Definition at line 196 of file StandardHistogramMaker.cxx. References m_h_isolatedPhotonMultiplicity, m_h_isolatedPhotonPt, and m_nHist. Referenced by initialize().
00196 { 00197 MsgStream log( messageService(), name() ); 00198 log << MSG::DEBUG << "Booking isolated photon histograms" << endreq; 00199 00200 m_h_isolatedPhotonMultiplicity = 00201 histoSvc()->book("/stat/simple/",++m_nHist,"Isolated Photon Multiplicity",20,0.0,20.0); 00202 // or be a C++ guru and do both at once 00203 m_h_isolatedPhotonPt = 00204 histoSvc()->book("/stat/simple/",++m_nHist,"Isolated Photon Pt",100,0.0,1000.0); 00205 return; 00206 } |
|
Definition at line 210 of file StandardHistogramMaker.cxx. References m_h_cellMultiplicity, m_h_cellPt, and m_nHist. Referenced by initialize().
00210 { 00211 MsgStream log( messageService(), name() ); 00212 log << MSG::DEBUG << "Booking Cell histograms" << endreq; 00213 00214 m_h_cellMultiplicity = 00215 histoSvc()->book("/stat/simple/",++m_nHist,"Cell Multiplicity",200,0.0,4000.0); 00216 // or be a C++ guru and do both at once 00217 m_h_cellPt = 00218 histoSvc()->book("/stat/simple/",++m_nHist,"Cell Pt",100,0.0,1000.0); 00219 return; 00220 } |
|
Definition at line 224 of file StandardHistogramMaker.cxx. References m_h_clusterMultiplicity, m_h_clusterPt, and m_nHist. Referenced by initialize().
00224 { 00225 MsgStream log( messageService(), name() ); 00226 log << MSG::DEBUG << "Booking Cluster histograms" << endreq; 00227 00228 m_h_clusterMultiplicity = 00229 histoSvc()->book("/stat/simple/",++m_nHist,"Cluster Multiplicity",10,0.0,10.0); 00230 // or be a C++ guru and do both at once 00231 m_h_clusterPt = 00232 histoSvc()->book("/stat/simple/",++m_nHist,"Cluster Pt",100,0.0,1000.0); 00233 return; 00234 } |
|
Definition at line 240 of file StandardHistogramMaker.cxx. References m_electronLocation, m_h_electronMultiplicity, m_h_electronPt, and m_tesIO. Referenced by execute().
00240 { 00241 00242 MsgStream log( messageService(), name() ) ; 00243 log << MSG::DEBUG << "Fillin Electron Histograms " << endreq; 00244 std::vector<ReconstructedParticle*> amyElectrons; 00245 if(!m_tesIO-> 00246 copy<ReconstructedParticleCollection >(amyElectrons, m_electronLocation)){ 00247 log << MSG::DEBUG << "no electrons found in the TES. This is probably normal" << endreq; 00248 // fill any histograms that have meaning in the absence of electrons 00249 m_h_electronMultiplicity->fill(0.0,1.0); 00250 } else { 00251 // fill all electron histograms 00252 m_h_electronMultiplicity->fill(float(amyElectrons.size()),1.0); 00253 std::vector<ReconstructedParticle*>::const_iterator iter = amyElectrons.begin(); 00254 for (; iter != amyElectrons.end(); ++iter) { 00255 m_h_electronPt->fill(float( (*iter)->pT()), 1.0); 00256 } 00257 } 00258 return; 00259 } |
|
Definition at line 264 of file StandardHistogramMaker.cxx. References m_h_photonMultiplicity, m_h_photonPt, m_photonLocation, and m_tesIO. Referenced by execute().
00264 { 00265 00266 MsgStream log( messageService(), name() ) ; 00267 log << MSG::DEBUG << "Fillins Photon Histograms " << endreq; 00268 std::vector<ReconstructedParticle*> amyPhotons; 00269 if(!m_tesIO->copy<ReconstructedParticleCollection > 00270 (amyPhotons, m_photonLocation)){ 00271 log << MSG::DEBUG << "no photons found in the TES. This is probably normal" << endreq; 00272 // fill any histograms that have meaning in the absence of photons 00273 m_h_photonMultiplicity->fill(0.0,1.0); 00274 } else { 00275 // fill all photon histograms 00276 m_h_photonMultiplicity->fill(float(amyPhotons.size()),1.0); 00277 std::vector<ReconstructedParticle*>::const_iterator iter = amyPhotons.begin(); 00278 for (; iter != amyPhotons.end(); ++iter) { 00279 m_h_photonPt->fill(float( (*iter)->pT()), 1.0); 00280 } 00281 } 00282 return; 00283 } |
|
Definition at line 285 of file StandardHistogramMaker.cxx. References m_h_isolatedElectronMultiplicity, m_h_isolatedElectronPt, m_isolatedElectronLocation, and m_tesIO. Referenced by execute().
00285 { 00286 00287 MsgStream log( messageService(), name() ) ; 00288 log << MSG::DEBUG << "Filling Isolated Electron Histograms " << endreq; 00289 std::vector<ReconstructedParticle*> amyElectrons; 00290 if(!m_tesIO->copy<ReconstructedParticleCollection > 00291 (amyElectrons, m_isolatedElectronLocation)){ 00292 log << MSG::DEBUG << "no electrons found in the TES. This is probably normal" << endreq; 00293 // fill any histograms that have meaning in the absence of electrons 00294 m_h_isolatedElectronMultiplicity->fill(0.0,1.0); 00295 } else { 00296 // fill all electron histograms 00297 m_h_isolatedElectronMultiplicity->fill(float(amyElectrons.size()),1.0); 00298 std::vector<ReconstructedParticle*>::const_iterator iter = amyElectrons.begin(); 00299 for (; iter != amyElectrons.end(); ++iter) { 00300 m_h_isolatedElectronPt->fill(float( (*iter)->pT()), 1.0); 00301 } 00302 } 00303 return; 00304 } |
|
Definition at line 308 of file StandardHistogramMaker.cxx. References m_h_isolatedPhotonMultiplicity, m_h_isolatedPhotonPt, m_isolatedPhotonLocation, and m_tesIO. Referenced by execute().
00308 { 00309 00310 MsgStream log( messageService(), name() ) ; 00311 log << MSG::DEBUG << "Filling isolated Photon Histograms " << endreq; 00312 std::vector<ReconstructedParticle*> amyPhotons; 00313 if(!m_tesIO->copy<ReconstructedParticleCollection > 00314 (amyPhotons, m_isolatedPhotonLocation)){ 00315 log << MSG::DEBUG << "no photons found in the TES. This is probably normal" << endreq; 00316 // fill any histograms that have meaning in the absence of photons 00317 m_h_isolatedPhotonMultiplicity->fill(0.0,1.0); 00318 } else { 00319 // fill all photon histograms 00320 m_h_isolatedPhotonMultiplicity->fill(float(amyPhotons.size()),1.0); 00321 std::vector<ReconstructedParticle*>::const_iterator iter = amyPhotons.begin(); 00322 for (; iter != amyPhotons.end(); ++iter) { 00323 m_h_isolatedPhotonPt->fill(float( (*iter)->pT()), 1.0); 00324 } 00325 } 00326 return; 00327 } |
|
Definition at line 331 of file StandardHistogramMaker.cxx. Referenced by execute().
00331 { 00332 00333 MsgStream log( messageService(), name() ) ; 00334 log << MSG::DEBUG << "Filling Cell Histograms, currently empty " << endreq; 00335 00336 return; 00337 } |
|
Definition at line 340 of file StandardHistogramMaker.cxx. Referenced by execute().
00340 { 00341 00342 MsgStream log( messageService(), name() ) ; 00343 log << MSG::DEBUG << "Filling Cluster Histograms, currently empty " << endreq; 00344 00345 return; 00346 } |
|
Definition at line 111 of file StandardHistogramMaker.h. Referenced by fillElectronHistograms(), fillIsolatedElectronHistograms(), fillIsolatedPhotonHistograms(), fillPhotonHistograms(), and initialize(). |
|
Definition at line 118 of file StandardHistogramMaker.h. Referenced by fillElectronHistograms(). |
|
Definition at line 119 of file StandardHistogramMaker.h. Referenced by fillIsolatedElectronHistograms(). |
|
Definition at line 120 of file StandardHistogramMaker.h. Referenced by fillPhotonHistograms(). |
|
Definition at line 121 of file StandardHistogramMaker.h. Referenced by fillIsolatedPhotonHistograms(). |
|
Definition at line 122 of file StandardHistogramMaker.h. |
|
Definition at line 123 of file StandardHistogramMaker.h. |
|
Definition at line 124 of file StandardHistogramMaker.h. |
|
Definition at line 131 of file StandardHistogramMaker.h. |
|
Definition at line 132 of file StandardHistogramMaker.h. |
|
Definition at line 133 of file StandardHistogramMaker.h. |
|
Definition at line 134 of file StandardHistogramMaker.h. |
|
Definition at line 135 of file StandardHistogramMaker.h. |
|
Definition at line 136 of file StandardHistogramMaker.h. |
|
Definition at line 143 of file StandardHistogramMaker.h. Referenced by bookElectronHistograms(), and fillElectronHistograms(). |
|
Definition at line 144 of file StandardHistogramMaker.h. Referenced by bookElectronHistograms(), and fillElectronHistograms(). |
|
Definition at line 147 of file StandardHistogramMaker.h. Referenced by bookIsolatedElectronHistograms(), and fillIsolatedElectronHistograms(). |
|
Definition at line 148 of file StandardHistogramMaker.h. Referenced by bookIsolatedElectronHistograms(), and fillIsolatedElectronHistograms(). |
|
Definition at line 151 of file StandardHistogramMaker.h. Referenced by bookPhotonHistograms(), and fillPhotonHistograms(). |
|
Definition at line 152 of file StandardHistogramMaker.h. Referenced by bookPhotonHistograms(), and fillPhotonHistograms(). |
|
Definition at line 155 of file StandardHistogramMaker.h. Referenced by bookIsolatedPhotonHistograms(), and fillIsolatedPhotonHistograms(). |
|
Definition at line 156 of file StandardHistogramMaker.h. Referenced by bookIsolatedPhotonHistograms(), and fillIsolatedPhotonHistograms(). |
|
Definition at line 159 of file StandardHistogramMaker.h. Referenced by bookCellHistograms(). |
|
Definition at line 160 of file StandardHistogramMaker.h. Referenced by bookCellHistograms(). |
|
Definition at line 163 of file StandardHistogramMaker.h. Referenced by bookClusterHistograms(). |
|
Definition at line 164 of file StandardHistogramMaker.h. Referenced by bookClusterHistograms(). |
|
Definition at line 168 of file StandardHistogramMaker.h. Referenced by initialize(). |
|
Definition at line 170 of file StandardHistogramMaker.h. Referenced by bookCellHistograms(), bookClusterHistograms(), bookElectronHistograms(), bookIsolatedElectronHistograms(), bookIsolatedPhotonHistograms(), bookPhotonHistograms(), and initialize(). |