![]() |
ATLAS Offline Software
|
#include <Resolutions.h>
Public Member Functions | |
| Resolutions (const std::string &name, ToolHandle< GenericMonitoringTool > *m=0) | |
| Constructor this method should be an enum of "allowed" methods. | |
| virtual | ~Resolutions ()=default |
| Destructor. | |
| void | initialize () |
| Book the histograms. | |
| void | finalize () |
| Finalize resolution and bias histograms should be called from the calling montools stop() method. | |
| void | execute (const TrackAnalysisStore &collections) const |
| this can be over ridden if need be | |
| void | method (unsigned m=0) |
| unsigned | method () const |
| const std::string & | name () const |
| generic utilities, just in case | |
| ToolHandle< GenericMonitoringTool > * | monTool () |
| mon tool | |
| const ToolHandle< GenericMonitoringTool > * | monTool () const |
| void | set_monTool (ToolHandle< GenericMonitoringTool > *m) |
| do we need / should we have this specific setter ?? | |
| std::string | realPath (const std::string &tag="") |
| This is a horrific function, has to get ALL the histograms, just to be able to work out how to get the actual path to the histograms for this tool - there simply MUST be a better way ... | |
| bool | msgLvl (const MSG::Level lvl) const |
| Test the output level. | |
| MsgStream & | msg () const |
| The standard message stream. | |
| MsgStream & | msg (const MSG::Level lvl) const |
| The standard message stream. | |
| void | setLevel (MSG::Level lvl) |
| Change the current logging level. | |
Static Public Member Functions | |
| template<typename Derived> | |
| static std::unique_ptr< IPlotBase > | create (const std::string &name, ToolHandle< GenericMonitoringTool > *m) |
| factory creation mathod | |
Protected Member Functions | |
| void | copyHist (TH1 *hsrc, TH1 *hdest, bool copyoverflow=true) const |
| resolution porocessing stuff these don't really even need to be class functions, they could be simply utility functions | |
| void | getHist (const std::string &hname, TH1 *hsrc) |
| void | getHist (ServiceHandle< ITHistSvc > &histsvc, const std::string &hname, TH1 *hsrc) const |
| void | processResolution (const std::string &path, bool writeflag=false) |
| void | processResolution (ServiceHandle< ITHistSvc > &histsvc, const std::string &path, bool writeflag=false) const |
| virtual ServiceHandle< ITHistSvc > & | histSvc () |
| we may well need these at some point ... | |
Protected Attributes | |
| const std::string & | m_name |
| ToolHandle< GenericMonitoringTool > * | m_monTool |
Private Types | |
| enum | Param { INCLUSIVE , PT , ETA , D0 , Z0 , QOVERP , QOVERPT , THETA , PHI , Z0SIN , NPARAMS , NPARAMSOUT = 3 } |
Private Member Functions | |
| void | getTrackParameters (const TrackView &p, std::array< float, NPARAMS > ¶ms, std::array< float, NPARAMS > &errors) const |
| get the track parameters | |
| void | initMessaging () const |
| Initialize our message level and MessageSvc. | |
Private Attributes | |
| std::string | m_paramName [NPARAMS] |
| unsigned int | m_method |
| probably will eventually no longer need these | |
| TIDA::Histogram< float > | m_pull [NPARAMS] |
| TIDA::Histogram< float > | m_res [NPARAMS] |
| TIDA::Histogram< float > | m_sigma [NPARAMS] |
| TIDA::Histogram< float > | m_significance [NPARAMS] |
| TIDA::Histogram2D< float > | m_corr [NPARAMS] |
| TIDA::Histogram< float > | m_resHelper [NPARAMS][NPARAMSOUT] |
| TIDA::Histogram< float > | m_reswidth [NPARAMS][NPARAMSOUT] |
| TIDA::Histogram< float > | m_resmean [NPARAMS][NPARAMSOUT] |
| TIDA::Histogram< float > | m_pullHelper [NPARAMS][NPARAMSOUT] |
| TIDA::Histogram< float > | m_pullwidth [NPARAMS][NPARAMSOUT] |
| TIDA::Histogram< float > | m_pullmean [NPARAMS][NPARAMSOUT] |
| TIDA::Histogram2D< float > | m_resolution_vs_pt [NPARAMS] |
| like the res{Helper,width,mean} plots above but actually make some sense | |
| TIDA::Histogram2D< float > | m_resolution_vs_eta [NPARAMS] |
| TIDA::Histogram2D< float > | m_resolution_vs_z0 [NPARAMS] |
| std::string | m_nm |
| Message source name. | |
| boost::thread_specific_ptr< MsgStream > | m_msg_tls |
| MsgStream instance (a std::cout like with print-out levels). | |
| std::atomic< IMessageSvc * > | m_imsg { nullptr } |
| MessageSvc pointer. | |
| std::atomic< MSG::Level > | m_lvl { MSG::NIL } |
| Current logging level. | |
| std::atomic_flag m_initialized | ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
| Messaging initialized (initMessaging). | |
Definition at line 32 of file Resolutions.h.
|
private |
| IDTPM2::Resolutions::Resolutions | ( | const std::string & | name, |
| ToolHandle< GenericMonitoringTool > * | m = 0 ) |
Constructor this method should be an enum of "allowed" methods.
NB: no point making this an actual athena configurable class - better to make it an internal class of some global histogram class - although independent, then class HistogramDriver { ... } can containe any number of IHistogramFiller* and call them itself.
then the python for the HistogramDriver can have separate functions to book the relevant histograms, so we can do function HistogramDriver_build: ... histogramFiller.filler = { filler1, filler2 }
and so on, and these become functions that create histograms and for the c++ code it can loop over the fillers, and call their histogram bookers itself. The only issue, is in the use of histogram creating functions from the GenericMonTool: maybe we pass in the HistogramDriver so that they can used the histogram creators from there, or else they would need to begime GenericMonTools themselves. That would actually be more complicted, since to add a new tool, you would need to implement an entire new generic MonTool, but to add a helper class for the HistogramDriver, all you would need to do would be to add a basic python class which creates the histograms with a provided function, so less boiler plate, with simpler, and more flexible code. local include(s)
Definition at line 56 of file Resolutions.cxx.
|
virtualdefault |
Destructor.
|
protectedinherited |
resolution porocessing stuff these don't really even need to be class functions, they could be simply utility functions
Definition at line 20 of file IPlotBase.cxx.
|
inlinestaticinherited |
factory creation mathod
Definition at line 50 of file IPlotBase.h.
|
virtual |
this can be over ridden if need be
all the IDTPM fillers take a "weight". Where does this "weight" come from ? do we even need it ? double weight = 1;
— reference and test tracks —
don't actually need these here, as we are explicitly iterating over the matched pairs to avoid all the lookups
track matcher just loop over the matched tracks from here ...
we can get all the matches pairs directly ...
then can just iterate over the match pairs rather than look anything up ...
this "fill a vector, then for the tools from the vector" approach is quite nasty would it be better to define the array once outside the loop and over write ? More denagerous, but faster, better still to just use a vector<float> anyway then we can clear() for each track
this is why I don't like this NPARAMS enum appraoch - now you have to start indexing from 1, rather than 0, so you need to know about the enum stucture, really the loop should be for ( unsigned i=PT ; i<NPARAMS ; i++ )
nope, should test is testError!=0 and only fill the pulls etc if the error is set to a non-zero value, than can also be used for truth particles, jets, clusers etc
do we really want the significance for eg phi ? ie phi/dphi ? clealy we only want the significance for valiables that might have a resolution comparable to the actual values
this isn't the residual, we really need 1/testP[i] - 1/refP[i]; but is testP[i] = 1/qpt, then just testP[i]-refP[i] is what we should be using, this
why do we only have the residuals and pulls vs "inclusive", "eta" and "pt" ?? surely we ALSO want these vs, z0, d0 and (for confirmation) vs phi but then we would ALSO want them versus the number of tracks, number of vertices, and also versus <mu>
Implements IDTPM2::IPlotBase.
Definition at line 118 of file Resolutions.cxx.
|
virtual |
Finalize resolution and bias histograms should be called from the calling montools stop() method.
finalize NB: actually this CAN'T be called from finalize, since if we create and histograms in the finalize() and register them with the HistSvc for some reason athena crashes in the clean up, even if we setDirectory(0) on the histograms, so all the finalisation processing much take place in the stop() method so this has to be called indirectly by the algoritm stop()
Implements IDTPM2::IPlotBase.
Definition at line 244 of file Resolutions.cxx.
|
inlineprotectedinherited |
Definition at line 88 of file IPlotBase.h.
|
protectedinherited |
Definition at line 42 of file IPlotBase.cxx.
|
private |
get the track parameters
parameters
do we really want to store such a value ? in the wrapper, we will likely calculate it inside the function so it is no less helpfull to calculate it explicitly
no point testing for all these if it is not a track particle uncertainties
for the time being ...
Definition at line 288 of file Resolutions.cxx.
|
inlineprotectedvirtualinherited |
we may well need these at some point ...
this method is dangerous - should not be used anywhere except finalise or stop
Definition at line 105 of file IPlotBase.h.
|
virtual |
Book the histograms.
!!!! ARGH !! NO WAY !!!
corr ? correlation ???
loop all vs variables
not even sure what these histograms are for ... resolutions
pulls
pull helper ???
Implements IDTPM2::IPlotBase.
Definition at line 65 of file Resolutions.cxx.
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
|
inline |
Definition at line 56 of file Resolutions.h.
|
inline |
Definition at line 54 of file Resolutions.h.
|
inlineinherited |
mon tool
Definition at line 71 of file IPlotBase.h.
|
inlineinherited |
Definition at line 73 of file IPlotBase.h.
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 167 of file AthMessaging.h.
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 182 of file AthMessaging.h.
|
inlineinherited |
Test the output level.
| lvl | The message level to test against |
| true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
|
inlineinherited |
|
inlineprotectedinherited |
Definition at line 89 of file IPlotBase.h.
|
protectedinherited |
process the histogramss NB: might be better if instead of adding the 2D histogram and then copying the 1D hjistograms back, we passed in the 1D histogram pointers and filled them directly in the Resplot
use the provides 1D, maan, sigme histograms etc would like to do this ...
use the provides 1D, maan, sigme histograms etc
Definition at line 49 of file IPlotBase.cxx.
|
inherited |
This is a horrific function, has to get ALL the histograms, just to be able to work out how to get the actual path to the histograms for this tool - there simply MUST be a better way ...
can add on our "fixed" histogram "Vertex" domain
Definition at line 86 of file IPlotBase.cxx.
|
inlineinherited |
do we need / should we have this specific setter ??
Definition at line 76 of file IPlotBase.h.
|
inherited |
Change the current logging level.
Use this rather than msg().setLevel() for proper operation with MT.
Definition at line 28 of file AthMessaging.cxx.
|
mutableprivateinherited |
Messaging initialized (initMessaging).
Definition at line 141 of file AthMessaging.h.
|
private |
Definition at line 101 of file Resolutions.h.
|
mutableprivateinherited |
|
mutableprivateinherited |
|
private |
probably will eventually no longer need these
Definition at line 93 of file Resolutions.h.
|
protectedinherited |
Definition at line 116 of file IPlotBase.h.
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels).
Definition at line 132 of file AthMessaging.h.
|
protectedinherited |
Definition at line 114 of file IPlotBase.h.
|
privateinherited |
Message source name.
Definition at line 129 of file AthMessaging.h.
|
private |
Definition at line 82 of file Resolutions.h.
|
private |
Definition at line 97 of file Resolutions.h.
|
private |
Definition at line 107 of file Resolutions.h.
|
private |
Definition at line 109 of file Resolutions.h.
|
private |
Definition at line 108 of file Resolutions.h.
|
private |
Definition at line 98 of file Resolutions.h.
|
private |
Definition at line 103 of file Resolutions.h.
|
private |
Definition at line 105 of file Resolutions.h.
|
private |
Definition at line 114 of file Resolutions.h.
|
private |
like the res{Helper,width,mean} plots above but actually make some sense
Definition at line 113 of file Resolutions.h.
|
private |
Definition at line 115 of file Resolutions.h.
|
private |
Definition at line 104 of file Resolutions.h.
|
private |
Definition at line 99 of file Resolutions.h.
|
private |
Definition at line 100 of file Resolutions.h.