Loading [MathJax]/extensions/tex2jax.js
Go to the documentation of this file.
21 #include "AIDA/IHistogram1D.h"
59 static int nCalls( 0 );
70 const double gauss( Gauss() );
71 const double flat( Flat() );
72 const double expo( Expo() );
73 const double breit( Breit() );
74 const double poisson( Poisson() );
75 const double binom( Binom() );
80 plot1D(
gauss,
"Gaussian mean=0, sigma=1", -5, 5, 100 );
83 plot1D( expo, 101,
"Exponential", 0, 5, 100 );
84 plot1D( breit, 102,
"Breit", -5, 5, 100 );
87 plot1D( poisson,
"poisson",
"Poisson", -5, 5, 100 );
90 plot1D( binom,
"subdir1/bino",
"Binominal", -5, 5, 100 );
91 plot1D( binom,
"subdir2/bino",
"Binominal", -5, 5, 100 );
94 plot2D( flat,
gauss,
"Gaussian V Flat", -5, 5, -5, 5 );
95 plot2D( flat, expo,
"Exponential V Flat", -5, 5, 0, 5 );
98 plot2D( poisson, binom,
"binVpois",
"Binom V poisson", -5, 5, -5, 5 );
99 plot2D( poisson, expo,
"expoVpois",
"Expo V poisson", -5, 5, -5, 5 );
102 plot3D(
gauss, expo, breit,
"3D plot AutoID", -5, 5, 0, 5, -5, 5 );
105 plot3D(
gauss, expo, breit,
"3d",
"3D plot ForcedID", -5, 5, 0, 5, -5, 5 );
109 profile1D(
gauss, expo,
"Expo V Gauss 1DProf s", -5, 5, 50,
"s" );
111 profile1D( flat,
gauss,
"Gauss V Flat 1DProf S", -10, 10, 10,
"s" );
112 profile1D( flat,
gauss,
"Gauss V Flat 1DProf, with limits-I", -10, 10, 10,
"", 0, 5 );
113 profile1D( flat,
gauss,
"Gauss V Flat 1DProf, with limits-I s", -10, 10, 10,
"s", 0, 5 );
114 profile1D( flat,
gauss,
"Gauss V Flat 1DProf, with limits-II", -10, 10, 10,
"", -5, 0 );
115 profile1D( flat,
gauss,
"Gauss V Flat 1DProf, with limits-II s", -10, 10, 10,
"s", -5, 0 );
118 profile2D(
gauss, expo, poisson,
"2dprof",
"2D profile1", -5, 5, 0, 5 );
119 profile2D(
gauss, expo, poisson, 321,
"2D profile2", -5, 5, 0, 5 );
127 plot1D( flat,
"varBinning/x",
"1D Variable Binning", edgesX );
129 plot2D( flat,
gauss,
"varBinning/y",
"2D Variable Binning", edgesX, edgesY );
131 plot3D( flat,
gauss, expo,
"varBinning/z",
"3D Variable Binning", edgesX, edgesY, edgesZ );
133 profile1D( flat,
gauss,
"varBinning/a",
"1D Profile Variable Binning", edgesX );
135 profile2D( flat,
gauss, expo,
"varBinning/b",
"2D Profile Variable Binning", edgesX, edgesY );
146 static IHistogram1D*
test( 0 );
147 if ( 0 == nCalls ) {
test =
histoSvc()->book(
"OldStyle/1112",
"Old Style Histo", 100, -5, 5 ); }
148 if ( nCalls > 0 )
chronoSvc()->chronoStart(
"1DOldStyle" );
150 if ( nCalls > 0 )
chronoSvc()->chronoStop(
"1DOldStyle" );
153 if ( nCalls > 0 )
chronoSvc()->chronoStart(
"1DAutoID" );
155 if ( nCalls > 0 )
chronoSvc()->chronoStop(
"1DAutoID" );
158 if ( nCalls > 0 )
chronoSvc()->chronoStart(
"1DForcedNumericID" );
159 plot1D(
gauss, 1111,
"Forced Numeric ID time test", -5, 5, 100 );
160 if ( nCalls > 0 )
chronoSvc()->chronoStop(
"1DForcedNumericID" );
163 if ( nCalls > 0 )
chronoSvc()->chronoStart(
"1DForcedAlphaID" );
164 plot1D(
gauss,
"test1",
"Forced Alpha ID time test", -5, 5, 100 );
165 if ( nCalls > 0 )
chronoSvc()->chronoStop(
"1DForcedAlphaID" );
167 if ( 0 == nCalls )
Print(
"Filling Histograms...... Please be patient !" ).
ignore();
AIDA::IHistogram3D * plot3D(const double valueX, const double valueY, const double valueZ, const std::string &title, const double lowX, const double highX, const double lowY, const double highY, const double lowZ, const double highZ, const unsigned long binsX=10, const unsigned long binsY=10, const unsigned long binsZ=10, const double weight=1.0) const
fill the 3D histogram (book on demand)
AIDA::IHistogram1D * plot1D(const double value, const std::string &title, const double low, const double high, const unsigned long bins=100, const double weight=1.0) const
fill the 1D histogram (book on demand)
SmartIF< IRndmGenSvc > & randSvc() const
The standard RandomGen service, Return a pointer to the service if present.
SmartIF< IHistogramSvc > & histoSvc() const
The standard histogram service.
StatusCode initialize() override
Algorithm initialization.
Parameters for the flat random number generation within boundaries [minimum, maximum].
AIDA::IHistogram2D * plot2D(const double valueX, const double valueY, const std::string &title, const double lowX, const double highX, const double lowY, const double highY, const unsigned long binsX=50, const unsigned long binsY=50, const double weight=1.0) const
fill the 2D histogram (book on demand)
StatusCode finalize() override
Algorithm finalization.
SmartIF< IChronoStatSvc > & chronoSvc() const
The standard Chrono & Stat service, Return a pointer to the service if present.
StatusCode execute() override
Algorithm execution.
Parameters for the Gauss random number generation.
Random number accessor This small class encapsulates the use of the random number generator.
~GaudiHistoAlgorithm() override
Destructor.
StatusCode Print(std::string_view msg, const StatusCode st=StatusCode::SUCCESS, const MSG::Level lev=MSG::INFO) const
Print the message and return with the given StatusCode.
Parameters for the BreitWigner distributed random number generation.
AIDA::IProfile1D * profile1D(const double valueX, const double valueY, const std::string &title, const double lowX, const double highX, const unsigned long binsX=100, const std::string &opt="", const double lowY=-std::numeric_limits< double >::max(), const double highY=std::numeric_limits< double >::max(), const double weight=1.0) const
fill the 1D profile histogram (book on demand)
const StatusCode & ignore() const
Allow discarding a StatusCode without warning.
constexpr static const auto SUCCESS
#define DECLARE_COMPONENT(type)
Parameters for the Gauss random number generation.
AIDA::IProfile2D * profile2D(const double valueX, const double valueY, const double valueZ, const std::string &title, const double lowX, const double highX, const double lowY, const double highY, const unsigned long binsX=50, const unsigned long binsY=50, const double weight=1.0) const
fill the 2D profile histogram (book on demand)
Parameters for the Poisson distributed random number generation with a given mean.
StatusCode finalize() override
standard finalization method
StatusCode initialize() override
standard initialization method
Parameters for the Binomial distributed random number generation.