124 if (clippedValPtr) *clippedValPtr=clippedValue ;
139 <<
" out of range (" <<
getMin() <<
" - " <<
getMax() <<
")" << endl ;
173 inRange(newValue,0,&clipValue) ;
218 return frame(cmdList) ;
230 pc.defineDouble(
"min",
"Range",0,
getMin()) ;
231 pc.defineDouble(
"max",
"Range",1,
getMax()) ;
232 pc.defineInt(
"nbins",
"Bins",0,
getBins()) ;
233 pc.defineString(
"rangeName",
"RangeWithName",0,
"") ;
234 pc.defineString(
"name",
"Name",0,
"") ;
235 pc.defineString(
"title",
"Title",0,
"") ;
236 pc.defineMutex(
"Range",
"RangeWithName",
"AutoRange") ;
237 pc.defineObject(
"rangeData",
"AutoRange",0,0) ;
238 pc.defineDouble(
"rangeMargin",
"AutoRange",0,0.1) ;
239 pc.defineInt(
"rangeSym",
"AutoRange",0,0) ;
242 pc.process(cmdList) ;
249 if (
pc.hasProcessed(
"Range")) {
250 xmin =
pc.getDouble(
"min") ;
251 xmax =
pc.getDouble(
"max") ;
256 }
else if (
pc.hasProcessed(
"RangeWithName")) {
257 const char* rangeName=
pc.getString(
"rangeName",0,
kTRUE) ;
260 }
else if (
pc.hasProcessed(
"AutoRange")) {
263 if (
pc.getInt(
"rangeSym")==0) {
275 xmin = dmean-ddelta ;
276 xmax = dmean+ddelta ;
285 Int_t nbins =
pc.getInt(
"nbins") ;
287 const char* title =
pc.getString(
"title",0,
kTRUE) ;
311 return new RooPlot(*
this,xlo,xhi,nbins);
341 coutE(
InputArguments) <<
"RooAbsRealLValue::frame(" <<
GetName() <<
") ERROR: empty fit range, must specify plot range" << endl ;
345 coutE(
InputArguments) <<
"RooAbsRealLValue::frame(" <<
GetName() <<
") ERROR: open ended fit range, must specify plot range" << endl ;
366 coutE(
InputArguments) <<
"RooAbsRealLValue::frame(" <<
GetName() <<
") ERROR: empty fit range, must specify plot range" << endl ;
370 coutE(
InputArguments) <<
"RooAbsRealLValue::frame(" <<
GetName() <<
") ERROR: open ended fit range, must specify plot range" << endl ;
395 os <<
indent <<
"--- RooAbsRealLValue ---" << endl;
398 os <<
indent <<
" Fit range is [ ";
400 os <<
getMin() << unit <<
" , ";
406 os <<
getMax() << unit <<
" ]" << endl;
409 os <<
"+INF ]" << endl;
442 if (ibin<0 || ibin>=
numBins(rangeName)) {
444 <<
" is out of range (0," <<
getBins(rangeName)-1 <<
")" << endl ;
550 return createHistogram(
name,
l) ;
569 pc.defineObject(
"xbinning",
"Binning",0,0) ;
570 pc.defineString(
"xbinningName",
"BinningName",0,
"") ;
571 pc.defineInt(
"nxbins",
"BinningSpec",0) ;
572 pc.defineDouble(
"xlo",
"BinningSpec",0,0) ;
573 pc.defineDouble(
"xhi",
"BinningSpec",1,0) ;
575 pc.defineObject(
"yvar",
"YVar",0,0) ;
576 pc.defineObject(
"ybinning",
"YVar::Binning",0,0) ;
577 pc.defineString(
"ybinningName",
"YVar::BinningName",0,
"") ;
578 pc.defineInt(
"nybins",
"YVar::BinningSpec",0) ;
579 pc.defineDouble(
"ylo",
"YVar::BinningSpec",0,0) ;
580 pc.defineDouble(
"yhi",
"YVar::BinningSpec",1,0) ;
582 pc.defineObject(
"zvar",
"ZVar",0,0) ;
583 pc.defineObject(
"zbinning",
"ZVar::Binning",0,0) ;
584 pc.defineString(
"zbinningName",
"ZVar::BinningName",0,
"") ;
585 pc.defineInt(
"nzbins",
"ZVar::BinningSpec",0) ;
586 pc.defineDouble(
"zlo",
"ZVar::BinningSpec",0,0) ;
587 pc.defineDouble(
"zhi",
"ZVar::BinningSpec",1,0) ;
589 pc.defineString(
"axisLabel",
"AxisLabel",0,
"Events") ;
591 pc.defineDependency(
"ZVar",
"YVar") ;
594 pc.process(cmdList) ;
600 const char* axisLabel =
pc.getString(
"axisLabel") ;
607 if (
pc.hasProcessed(
"Binning")) {
609 }
else if (
pc.hasProcessed(
"BinningName")) {
611 }
else if (
pc.hasProcessed(
"BinningSpec")) {
615 ownBinning[0] =
kTRUE ;
620 if (
pc.hasProcessed(
"YVar")) {
623 if (
pc.hasProcessed(
"YVar::Binning")) {
625 }
else if (
pc.hasProcessed(
"YVar::BinningName")) {
627 }
else if (
pc.hasProcessed(
"YVar::BinningSpec")) {
631 ownBinning[1] =
kTRUE ;
637 if (
pc.hasProcessed(
"ZVar")) {
640 if (
pc.hasProcessed(
"ZVar::Binning")) {
642 }
else if (
pc.hasProcessed(
"ZVar::BinningName")) {
644 }
else if (
pc.hasProcessed(
"ZVar::BinningSpec")) {
648 ownBinning[2] =
kTRUE ;
657 if (ownBinning[0])
delete binning[0] ;
658 if (ownBinning[1])
delete binning[1] ;
659 if (ownBinning[2])
delete binning[2] ;
678 <<
") ERROR: fit range empty or open ended, must explicitly specify range" << endl ;
734 if ((!xlo && xhi) || (xlo && !xhi)) {
736 <<
") ERROR must specify either no range, or both limits" << endl ;
746 Int_t *nBins2 = nBins;
752 <<
") ERROR: fit range empty or open ended, must explicitly specify range" << endl ;
757 <<
") ERROR: fit range of " << yvar.
GetName() <<
" empty or open ended, must explicitly specify range" << endl ;
764 xlo_fit[1] = yvar.
getMin() ;
765 xhi_fit[1] = yvar.
getMax() ;
773 nbins_fit[1] = yvar.
getBins() ;
808 if ((!xlo && xhi) || (xlo && !xhi)) {
810 <<
") ERROR must specify either no range, or both limits" << endl ;
820 Int_t* nBins2 = nBins;
825 <<
") ERROR: fit range empty or open ended, must explicitly specify range" << endl ;
830 <<
") ERROR: fit range of " << yvar.
GetName() <<
" empty or open ended, must explicitly specify range" << endl ;
835 <<
") ERROR: fit range of " << zvar.
GetName() <<
" empty or open ended, must explicitly specify range" << endl ;
842 xlo_fit[1] = yvar.
getMin() ;
843 xhi_fit[1] = yvar.
getMax() ;
845 xlo_fit[2] = zvar.
getMin() ;
846 xhi_fit[2] = zvar.
getMax() ;
854 nbins_fit[1] = yvar.
getBins() ;
855 nbins_fit[2] = zvar.
getBins() ;
894 if (bin[0])
delete bin[0] ;
895 if (bin[1])
delete bin[1] ;
896 if (bin[2])
delete bin[2] ;
913 if(dim < 1 || dim > 3) {
924 for(index= 0; index < dim; index++) {
935 histTitle.
Prepend(
"Histogram of ");
941 if (bins[0]->isUniform()) {
950 if (bins[0]->isUniform() && bins[1]->isUniform()) {
961 if (bins[0]->isUniform() && bins[1]->isUniform() && bins[2]->isUniform()) {
980 for(index= 0; index < dim; index++) {
999 if((0 != tAxisLabel) && (0 != strlen(tAxisLabel))) {
1000 TString axisTitle(tAxisLabel);
1001 axisTitle.
Append(
" / ( ");
1002 for(
Int_t index2= 0; index2 < dim; index2++) {
1004 if(index2 > 0) axisTitle.
Append(
" x ");
1006 if(strlen(xyz[index2]->
getUnit())) {
static void indent(ostringstream &buf, int indent_level)
char * Form(const char *fmt,...)
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
RooAbsBinning is the abstract base class for RooRealVar binning definitions This class defines the in...
virtual Double_t * array() const =0
virtual Double_t highBound() const =0
virtual Double_t binCenter(Int_t bin) const =0
virtual Double_t lowBound() const =0
virtual Double_t averageBinWidth() const =0
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
Bool_t getRange(RooRealVar &var, Double_t &lowest, Double_t &highest, Double_t marginFrac=0, Bool_t symMode=kFALSE) const
Fill Doubles 'lowest' and 'highest' with the lowest and highest value of observable 'var' in this dat...
Double_t moment(RooRealVar &var, Double_t order, const char *cutSpec=0, const char *cutRange=0) const
Calculate moment of requested order.
Abstract base class for objects that are lvalues, i.e.
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
virtual Double_t getMax(const char *name=0) const
Get maximum of currently defined range.
Bool_t hasMax(const char *name=0) const
Check if variable has an upper bound.
void copyCache(const RooAbsArg *source, Bool_t valueOnly=kFALSE, Bool_t setValDirty=kTRUE)
Copy cache of another RooAbsArg to our cache.
virtual const RooAbsBinning & getBinning(const char *name=0, Bool_t verbose=kTRUE, Bool_t createOnTheFly=kFALSE) const =0
Retrive binning configuration with given name or default binning.
virtual Bool_t isValidReal(Double_t value, Bool_t printError=kFALSE) const
Check if given value is valid.
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Structure printing.
virtual void setBin(Int_t ibin, const char *rangeName=0)
Set value to center of bin 'ibin' of binning 'rangeName' (or of default binning if no range is specif...
virtual void setVal(Double_t value)=0
virtual Int_t numBins(const char *rangeName=0) const
virtual Bool_t readFromStream(std::istream &is, Bool_t compact, Bool_t verbose=kFALSE)
Read object contents from given stream.
virtual void randomize(const char *rangeName=0)
Set a new value sampled from a uniform distribution over the fit range.
RooPlot * frame() const
Create a new RooPlot on the heap with a drawing frame initialized for this object,...
TH1 * createHistogram(const char *name, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none()) const
virtual void writeToStream(std::ostream &os, Bool_t compact) const
Write object contents to given stream.
virtual Bool_t inRange(const char *name) const
Check if current value is inside range with given name.
virtual Bool_t isJacobianOK(const RooArgSet &depList) const
virtual Int_t getBins(const char *name=0) const
Get number of bins of currently defined range.
virtual void setValFast(Double_t value)
RooAbsRealLValue & operator=(const RooAbsRealLValue &)=default
Bool_t hasMin(const char *name=0) const
Check if variable has a lower bound.
virtual ~RooAbsRealLValue()
Destructor.
virtual Double_t getMin(const char *name=0) const
Get miniminum of currently defined range.
Bool_t fitRangeOKForPlotting() const
Check if fit range is usable as plot range, i.e.
virtual void setBinFast(Int_t ibin, const RooAbsBinning &binning)
Set value to center of bin 'ibin' of binning 'rangeName' (or of default binning if no range is specif...
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
TString getTitle(Bool_t appendUnit=kFALSE) const
Return this variable's title string.
virtual void copyCache(const RooAbsArg *source, Bool_t valueOnly=kFALSE, Bool_t setValDirty=kTRUE)
Copy the cached value of another RooAbsArg to our cache.
TString _unit
Value storage for batches of events.
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Structure printing.
Double_t getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
const Text_t * getUnit() const
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooAbsArg * at(Int_t idx) const
Return object at given index, or nullptr if index is out of range.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooCmdArg is a named container for two doubles, two integers two object points and three string point...
Class RooCmdConfig is a configurable parser for RooCmdArg named arguments.
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
virtual void Add(TObject *arg)
static Int_t isInfinite(Double_t x)
Return true if x is infinite by RooNumBer internal specification.
A RooPlot is a plot frame and a container for graphics objects within that frame.
void SetTitle(const char *name)
Set the title of the RooPlot to 'title'.
void SetName(const char *name)
Set the name of the RooPlot to 'name'.
static Double_t uniform(TRandom *generator=randomGenerator())
Return a number uniformly distributed from (0,1)
RooRealVar represents a variable that can be changed from the outside.
RooTreeData is the abstract base class for data collection that use a TTree as internal storage mecha...
1-D histogram with a float per channel (see TH1 documentation)}
virtual void SetXTitle(const char *title)
virtual void SetZTitle(const char *title)
virtual void SetYTitle(const char *title)
2-D histogram with a float per channel (see TH1 documentation)}
3-D histogram with a float per channel (see TH1 documentation)}
virtual const char * GetName() const
Returns name of object.
Mother of all ROOT objects.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
const char * Data() const
TString & Prepend(const char *cs)
TString & Append(const char *cs)
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
static constexpr double pc