127 if (clippedValPtr) *clippedValPtr=clippedValue ;
142 <<
" out of range (" <<
getMin() <<
" - " <<
getMax() <<
")" << endl ;
176 inRange(newValue,0,&clipValue) ;
218 cmdList.
Add(const_cast<RooCmdArg*>(&arg1)) ; cmdList.
Add(const_cast<RooCmdArg*>(&arg2)) ;
219 cmdList.
Add(const_cast<RooCmdArg*>(&arg3)) ; cmdList.
Add(const_cast<RooCmdArg*>(&arg4)) ;
220 cmdList.
Add(const_cast<RooCmdArg*>(&arg5)) ; cmdList.
Add(const_cast<RooCmdArg*>(&arg6)) ;
221 cmdList.
Add(const_cast<RooCmdArg*>(&arg7)) ; cmdList.
Add(const_cast<RooCmdArg*>(&arg8)) ;
223 return frame(cmdList) ;
235 pc.defineDouble(
"min",
"Range",0,
getMin()) ;
236 pc.defineDouble(
"max",
"Range",1,
getMax()) ;
237 pc.defineInt(
"nbins",
"Bins",0,
getBins()) ;
238 pc.defineString(
"rangeName",
"RangeWithName",0,
"") ;
239 pc.defineString(
"name",
"Name",0,
"") ;
240 pc.defineString(
"title",
"Title",0,
"") ;
241 pc.defineMutex(
"Range",
"RangeWithName",
"AutoRange") ;
242 pc.defineObject(
"rangeData",
"AutoRange",0,0) ;
243 pc.defineDouble(
"rangeMargin",
"AutoRange",0,0.1) ;
244 pc.defineInt(
"rangeSym",
"AutoRange",0,0) ;
247 pc.process(cmdList) ;
254 if (
pc.hasProcessed(
"Range")) {
255 xmin =
pc.getDouble(
"min") ;
256 xmax =
pc.getDouble(
"max") ;
261 }
else if (
pc.hasProcessed(
"RangeWithName")) {
262 const char* rangeName=
pc.getString(
"rangeName",0,
kTRUE) ;
265 }
else if (
pc.hasProcessed(
"AutoRange")) {
268 if (
pc.getInt(
"rangeSym")==0) {
280 xmin = dmean-ddelta ;
281 xmax = dmean+ddelta ;
290 Int_t nbins =
pc.getInt(
"nbins") ;
292 const char* title =
pc.getString(
"title",0,
kTRUE) ;
316 return new RooPlot(*
this,xlo,xhi,nbins);
346 coutE(
InputArguments) <<
"RooAbsRealLValue::frame(" <<
GetName() <<
") ERROR: empty fit range, must specify plot range" << endl ;
350 coutE(
InputArguments) <<
"RooAbsRealLValue::frame(" <<
GetName() <<
") ERROR: open ended fit range, must specify plot range" << endl ;
371 coutE(
InputArguments) <<
"RooAbsRealLValue::frame(" <<
GetName() <<
") ERROR: empty fit range, must specify plot range" << endl ;
375 coutE(
InputArguments) <<
"RooAbsRealLValue::frame(" <<
GetName() <<
") ERROR: open ended fit range, must specify plot range" << endl ;
400 os << indent <<
"--- RooAbsRealLValue ---" << endl;
402 if(!unit.IsNull()) unit.Prepend(
' ');
403 os << indent <<
" Fit range is [ ";
405 os <<
getMin() << unit <<
" , ";
411 os <<
getMax() << unit <<
" ]" << endl;
414 os <<
"+INF ]" << endl;
447 if (ibin<0 || ibin>=
numBins(rangeName)) {
449 <<
" is out of range (0," <<
getBins(rangeName)-1 <<
")" << endl ;
555 return createHistogram(
name,
l) ;
574 pc.defineObject(
"xbinning",
"Binning",0,0) ;
575 pc.defineString(
"xbinningName",
"BinningName",0,
"") ;
576 pc.defineInt(
"nxbins",
"BinningSpec",0) ;
577 pc.defineDouble(
"xlo",
"BinningSpec",0,0) ;
578 pc.defineDouble(
"xhi",
"BinningSpec",1,0) ;
580 pc.defineObject(
"yvar",
"YVar",0,0) ;
581 pc.defineObject(
"ybinning",
"YVar::Binning",0,0) ;
582 pc.defineString(
"ybinningName",
"YVar::BinningName",0,
"") ;
583 pc.defineInt(
"nybins",
"YVar::BinningSpec",0) ;
584 pc.defineDouble(
"ylo",
"YVar::BinningSpec",0,0) ;
585 pc.defineDouble(
"yhi",
"YVar::BinningSpec",1,0) ;
587 pc.defineObject(
"zvar",
"ZVar",0,0) ;
588 pc.defineObject(
"zbinning",
"ZVar::Binning",0,0) ;
589 pc.defineString(
"zbinningName",
"ZVar::BinningName",0,
"") ;
590 pc.defineInt(
"nzbins",
"ZVar::BinningSpec",0) ;
591 pc.defineDouble(
"zlo",
"ZVar::BinningSpec",0,0) ;
592 pc.defineDouble(
"zhi",
"ZVar::BinningSpec",1,0) ;
594 pc.defineString(
"axisLabel",
"AxisLabel",0,
"Events") ;
596 pc.defineDependency(
"ZVar",
"YVar") ;
599 pc.process(cmdList) ;
605 const char* axisLabel =
pc.getString(
"axisLabel") ;
612 if (
pc.hasProcessed(
"Binning")) {
614 }
else if (
pc.hasProcessed(
"BinningName")) {
616 }
else if (
pc.hasProcessed(
"BinningSpec")) {
620 ownBinning[0] =
kTRUE ;
625 if (
pc.hasProcessed(
"YVar")) {
628 if (
pc.hasProcessed(
"YVar::Binning")) {
630 }
else if (
pc.hasProcessed(
"YVar::BinningName")) {
632 }
else if (
pc.hasProcessed(
"YVar::BinningSpec")) {
636 ownBinning[1] =
kTRUE ;
642 if (
pc.hasProcessed(
"ZVar")) {
645 if (
pc.hasProcessed(
"ZVar::Binning")) {
647 }
else if (
pc.hasProcessed(
"ZVar::BinningName")) {
649 }
else if (
pc.hasProcessed(
"ZVar::BinningSpec")) {
653 ownBinning[2] =
kTRUE ;
662 if (ownBinning[0])
delete binning[0] ;
663 if (ownBinning[1])
delete binning[1] ;
664 if (ownBinning[2])
delete binning[2] ;
683 <<
") ERROR: fit range empty or open ended, must explicitly specify range" << endl ;
739 if ((!xlo && xhi) || (xlo && !xhi)) {
741 <<
") ERROR must specify either no range, or both limits" << endl ;
751 Int_t *nBins2 = nBins;
757 <<
") ERROR: fit range empty or open ended, must explicitly specify range" << endl ;
762 <<
") ERROR: fit range of " << yvar.
GetName() <<
" empty or open ended, must explicitly specify range" << endl ;
769 xlo_fit[1] = yvar.
getMin() ;
770 xhi_fit[1] = yvar.
getMax() ;
778 nbins_fit[1] = yvar.
getBins() ;
813 if ((!xlo && xhi) || (xlo && !xhi)) {
815 <<
") ERROR must specify either no range, or both limits" << endl ;
825 Int_t* nBins2 = nBins;
830 <<
") ERROR: fit range empty or open ended, must explicitly specify range" << endl ;
835 <<
") ERROR: fit range of " << yvar.
GetName() <<
" empty or open ended, must explicitly specify range" << endl ;
840 <<
") ERROR: fit range of " << zvar.
GetName() <<
" empty or open ended, must explicitly specify range" << endl ;
847 xlo_fit[1] = yvar.
getMin() ;
848 xhi_fit[1] = yvar.
getMax() ;
850 xlo_fit[2] = zvar.
getMin() ;
851 xhi_fit[2] = zvar.
getMax() ;
859 nbins_fit[1] = yvar.
getBins() ;
860 nbins_fit[2] = zvar.
getBins() ;
899 if (bin[0])
delete bin[0] ;
900 if (bin[1])
delete bin[1] ;
901 if (bin[2])
delete bin[2] ;
918 if(dim < 1 || dim > 3) {
924 TString histName(
name);
925 histName.Append(
"_");
929 for(index= 0; index < dim; index++) {
936 histName.Append(
"_");
937 histName.Append(arg->
GetName());
939 TString histTitle(histName);
940 histTitle.Prepend(
"Histogram of ");
946 if (bins[0]->isUniform()) {
947 histogram=
new TH1F(histName.Data(), histTitle.Data(),
950 histogram=
new TH1F(histName.Data(), histTitle.Data(),
955 if (bins[0]->isUniform() && bins[1]->
isUniform()) {
956 histogram=
new TH2F(histName.Data(), histTitle.Data(),
960 histogram=
new TH2F(histName.Data(), histTitle.Data(),
967 histogram=
new TH3F(histName.Data(), histTitle.Data(),
972 histogram=
new TH3F(histName.Data(), histTitle.Data(),
985 for(index= 0; index < dim; index++) {
1004 if((0 != tAxisLabel) && (0 != strlen(tAxisLabel))) {
1005 TString axisTitle(tAxisLabel);
1006 axisTitle.Append(
" / ( ");
1007 for(
Int_t index2= 0; index2 < dim; index2++) {
1009 if(index2 > 0) axisTitle.Append(
" x ");
1010 axisTitle.Append(
Form(
"%g",delta));
1011 if(strlen(xyz[index2]->
getUnit())) {
1012 axisTitle.Append(
" ");
1013 axisTitle.Append(xyz[index2]->
getUnit());
1016 axisTitle.Append(
" )");
virtual Bool_t isUniform() const
virtual Double_t getMin(const char *name=0) const
virtual void SetZTitle(const char *title)
virtual const char * GetName() const
Returns name of object.
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 ~RooAbsRealLValue()
Destructor.
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
Bool_t hasMin(const char *name=0) const
virtual void setValFast(Double_t value)
virtual Double_t getMax(const char *name=0) const
const Text_t * getUnit() const
virtual void randomize(const char *rangeName=0)
Set a new value sampled from a uniform distribution over the fit range.
void SetName(const char *name)
Set the name of the RooPlot to 'name'.
3-D histogram with a float per channel (see TH1 documentation)}
virtual Int_t numBins(const char *rangeName=0) const
Double_t getVal(const RooArgSet *set=0) const
THist< 1, float, THistStatContent, THistStatUncertainty > TH1F
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Structure printing.
Bool_t hasMax(const char *name=0) const
TString getTitle(Bool_t appendUnit=kFALSE) const
Return this variable's title string.
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Structure printing.
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 SetYTitle(const char *title)
static Int_t isInfinite(Double_t x)
Return true if x is infinite by RooNumBer internal specification.
void SetTitle(const char *name)
Set the title of the RooPlot to 'title'.
virtual void writeToStream(std::ostream &os, Bool_t compact) const
Write object contents to given stream.
virtual void copyCache(const RooAbsArg *source, Bool_t valueOnly=kFALSE, Bool_t setValDirty=kTRUE)
Copy the cached value of another RooAbsArg to our cache.
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...
virtual Bool_t readFromStream(std::istream &is, Bool_t compact, Bool_t verbose=kFALSE)
Read object contents from given stream.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
Bool_t fitRangeOKForPlotting() const
Check if fit range is usable as plot range, i.e.
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 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...
RooPlot * frame() const
Create a new RooPlot on the heap with a drawing frame initialized for this object, but no plot contents.
virtual Double_t highBound() const =0
virtual RooAbsArg & operator=(const RooAbsReal &other)
Assignment operator from other RooAbsReal.
RooRealVar represents a fundamental (non-derived) real valued object.
virtual void Add(TObject *arg)
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
virtual Bool_t isValidReal(Double_t value, Bool_t printError=kFALSE) const
Check if given value is valid.
RooAbsArg * at(Int_t idx) const
2-D histogram with a float per channel (see TH1 documentation)}
char * Form(const char *fmt,...)
virtual const RooAbsBinning & getBinning(const char *name=0, Bool_t verbose=kTRUE, Bool_t createOnTheFly=kFALSE) const =0
virtual Double_t lowBound() const =0
Class RooCmdConfig is a configurable parser for RooCmdArg named arguments.
virtual void setVal(Double_t value)=0
A RooPlot is a plot frame and a container for graphics objects within that frame. ...
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
virtual Bool_t isJacobianOK(const RooArgSet &depList) const
RooAbsBinning is the abstract base class for RooRealVar binning definitions This class defines the in...
static Double_t uniform(TRandom *generator=randomGenerator())
Return a number uniformly distributed from (0,1)
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
virtual Double_t binCenter(Int_t bin) const =0
Double_t moment(RooRealVar &var, Double_t order, const char *cutSpec=0, const char *cutRange=0) const
Calculate moment < (X - <X>)^n > where n = order.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
virtual Bool_t inRange(const char *name) const
Check if current value is inside range with given name.
THist< 3, float, THistStatContent, THistStatUncertainty > TH3F
Mother of all ROOT objects.
virtual void SetXTitle(const char *title)
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
void copyCache(const RooAbsArg *source, Bool_t valueOnly=kFALSE, Bool_t setValDirty=kTRUE)
Copy cache of another RooAbsArg to our cache.
static constexpr double pc
virtual Double_t * array() const =0
virtual Int_t getBins(const char *name=0) const
Abstract base class for objects that are lvalues, i.e.
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
virtual Double_t averageBinWidth() const =0
THist< 2, float, THistStatContent, THistStatUncertainty > TH2F
RooCmdArg is a named container for two doubles, two integers two object points and three string point...