| AsymptoticCalculator.h | | AsymptoticCalculator.h | |
|
| // @(#)root/roostats:$Id: AsymptoticCalculator.h 42260 2011-11-25 21:37:29Z
moneta $ | | // @(#)root/roostats:$Id: AsymptoticCalculator.h 43090 2012-02-22 13:47:01Z
moneta $ | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| #ifndef ROOSTATS_AsymptoticCalculator | | #ifndef ROOSTATS_AsymptoticCalculator | |
| #define ROOSTATS_AsymptoticCalculator | | #define ROOSTATS_AsymptoticCalculator | |
| | | | |
| skipping to change at line 40 | | skipping to change at line 40 | |
| class RooProdPdf; | | class RooProdPdf; | |
| | | | |
| namespace RooStats { | | namespace RooStats { | |
| | | | |
| class AsymptoticCalculator : public HypoTestCalculatorGeneric { | | class AsymptoticCalculator : public HypoTestCalculatorGeneric { | |
| | | | |
| public: | | public: | |
| AsymptoticCalculator( | | AsymptoticCalculator( | |
| RooAbsData &data, // need to pass non-const since RooAbsPdf::fitT
o takes a non-const data set | | RooAbsData &data, // need to pass non-const since RooAbsPdf::fitT
o takes a non-const data set | |
| const ModelConfig &altModel, | | const ModelConfig &altModel, | |
|
| const ModelConfig &nullModel | | const ModelConfig &nullModel, | |
| | | bool nominalAsimov = false | |
| ); | | ); | |
| // HypoTestCalculatorGeneric(data, altModel, nullModel, 0) | | // HypoTestCalculatorGeneric(data, altModel, nullModel, 0) | |
| // { | | // { | |
| // } | | // } | |
| | | | |
| ~AsymptoticCalculator() { | | ~AsymptoticCalculator() { | |
| } | | } | |
| | | | |
| // re-implement HypoTest computation using the asymptotic | | // re-implement HypoTest computation using the asymptotic | |
| virtual HypoTestResult *GetHypoTest() const; | | virtual HypoTestResult *GetHypoTest() const; | |
| | | | |
| // make the asimov data from the ModelConfig and list of poi - return
data set annd snapshoot of global obs | | // make the asimov data from the ModelConfig and list of poi - return
data set annd snapshoot of global obs | |
|
| static RooAbsData * MakeAsimovData( RooAbsData & data, const ModelCon | | // poiValues is the snapshot of POI used for finding the best buisanc | |
| fig & model, const RooArgSet & paramValues, RooArgSet & globObs); | | e parameter values (conditioned at these values) | |
| | | // genPoiValues is optionally a different set of POI values used for | |
| | | generating. By default the same POI are used for generating and for finding | |
| | | the nuisance parameters | |
| | | static RooAbsData * MakeAsimovData( RooAbsData & data, const ModelCon | |
| | | fig & model, const RooArgSet & poiValues, RooArgSet & globObs, const RooAr | |
| | | gSet * genPoiValues = 0); | |
| | | | |
| | | // make a nominal asimov data from the ModelConfig and parameter valu | |
| | | es | |
| | | // The parameter values (including the nunisance) could be given from | |
| | | a fit to data or be at the nominal values | |
| | | static RooAbsData * MakeAsimovData( const ModelConfig & model, const | |
| | | RooArgSet & allParamValues, RooArgSet & globObs); | |
| | | | |
| static RooAbsData * GenerateAsimovData(const RooAbsPdf & pdf, const R
ooArgSet & observables ); | | static RooAbsData * GenerateAsimovData(const RooAbsPdf & pdf, const R
ooArgSet & observables ); | |
| | | | |
| // function given the null and the alt p value - return the expected
one given the N - sigma value | | // function given the null and the alt p value - return the expected
one given the N - sigma value | |
| static double GetExpectedPValues(double pnull, double palt, double ns
igma, bool usecls ); | | static double GetExpectedPValues(double pnull, double palt, double ns
igma, bool usecls ); | |
| | | | |
| // get expected limit | | // get expected limit | |
| // static void GetExpectedLimit(double nsigma, double alpha, double &c
lsblimit, double &clslimit); | | // static void GetExpectedLimit(double nsigma, double alpha, double &c
lsblimit, double &clslimit); | |
| | | | |
| void SetOneSided(bool on) { fOneSided = on; } | | void SetOneSided(bool on) { fOneSided = on; } | |
| | | | |
| skipping to change at line 96 | | skipping to change at line 103 | |
| static double EvaluateNLL(RooAbsPdf & pdf, RooAbsData& data, const Ro
oArgSet *poiSet = 0); | | static double EvaluateNLL(RooAbsPdf & pdf, RooAbsData& data, const Ro
oArgSet *poiSet = 0); | |
| | | | |
| static void SetObsToExpected(RooProdPdf &prod, const RooArgSet &obs); | | static void SetObsToExpected(RooProdPdf &prod, const RooArgSet &obs); | |
| static void SetObsToExpected(RooPoisson &pois, const RooArgSet &obs); | | static void SetObsToExpected(RooPoisson &pois, const RooArgSet &obs); | |
| | | | |
| protected: | | protected: | |
| ClassDef(AsymptoticCalculator,1) | | ClassDef(AsymptoticCalculator,1) | |
| | | | |
| private: | | private: | |
| | | | |
|
| bool fOneSided; | | bool fOneSided; // for one sided PL test statistic | |
| | | bool fNominalAsimov; | |
| mutable int fUseQTilde; // flag to indicate if using qti
lde or not (-1 (default based on RooRealVar)), 0 false, 1 (true) | | mutable int fUseQTilde; // flag to indicate if using qti
lde or not (-1 (default based on RooRealVar)), 0 false, 1 (true) | |
| static int fgPrintLevel; // control print level (0 minimal, 1 no
rmal, 2 debug) | | static int fgPrintLevel; // control print level (0 minimal, 1 no
rmal, 2 debug) | |
| mutable double fNLLObs; | | mutable double fNLLObs; | |
| mutable double fNLLAsimov; | | mutable double fNLLAsimov; | |
| | | | |
| mutable RooAbsData * fAsimovData; // asimov data set | | mutable RooAbsData * fAsimovData; // asimov data set | |
| RooArgSet fAsimovGlobObs; // snapshot of Asimov global observables | | RooArgSet fAsimovGlobObs; // snapshot of Asimov global observables | |
| mutable RooArgSet fBestFitPoi; // snapshot of best fitted POI
values | | mutable RooArgSet fBestFitPoi; // snapshot of best fitted POI
values | |
|
| | | mutable RooArgSet fBestFitParams; // snapshot of all best fitt
ed Parameter values | |
| | | | |
| }; | | }; | |
| } | | } | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 5 change blocks. |
| 5 lines changed or deleted | | 21 lines changed or added | |
|
| HypoTestResult.h | | HypoTestResult.h | |
|
| // @(#)root/roostats:$Id: HypoTestResult.h 39928 2011-06-24 08:18:59Z monet
a $ | | // @(#)root/roostats:$Id: HypoTestResult.h 43171 2012-02-29 11:01:18Z monet
a $ | |
| // Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke, S
ven Kreiss | | // Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke, S
ven Kreiss | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| //_________________________________________________ | | //_________________________________________________ | |
| | | | |
| skipping to change at line 130 | | skipping to change at line 130 | |
| Double_t CLbError() const; | | Double_t CLbError() const; | |
| | | | |
| /// The error on the "confidence level" of the alternative hypothesis | | /// The error on the "confidence level" of the alternative hypothesis | |
| Double_t CLsplusbError() const; | | Double_t CLsplusbError() const; | |
| | | | |
| /// The error on the ratio CLs+b/CLb | | /// The error on the ratio CLs+b/CLb | |
| Double_t CLsError() const; | | Double_t CLsError() const; | |
| | | | |
| Double_t NullPValueError() const; | | Double_t NullPValueError() const; | |
| | | | |
|
| void Print(const Option_t* = "") const { | | void Print(const Option_t* = "") const; | |
| // Print out some information about the results | | | |
| // Note: use Alt/Null labels for the hypotheses here as the Null | | | |
| // might be the s+b hypothesis. | | | |
| | | | |
| cout << endl << "Results " << GetName() << ": " << endl; | | | |
| if(HasTestStatisticData() && fNullDistr) { | | | |
| cout << " - Null p-value = " << NullPValue() << " +/- " << Null | | | |
| PValueError() << endl; | | | |
| cout << " - Significance = " << Significance() << " sigma" << e | | | |
| ndl; | | | |
| } | | | |
| if(fAltDistr) | | | |
| cout << " - Number of Alt toys: " << fAltDistr->GetSize() << st | | | |
| d::endl; | | | |
| if(fNullDistr) | | | |
| cout << " - Number of Null toys: " << fNullDistr->GetSize() << | | | |
| std::endl; | | | |
| if(HasTestStatisticData()) | | | |
| cout << " - Test statistic evaluated on data: " << fTestStatist | | | |
| icData << std::endl; | | | |
| if(HasTestStatisticData() && fNullDistr) | | | |
| cout << " - CL_b: " << CLb() << " +/- " << CLbError() << std::e | | | |
| ndl; | | | |
| if(HasTestStatisticData() && fAltDistr) | | | |
| cout << " - CL_s+b: " << CLsplusb() << " +/- " << CLsplusbError | | | |
| () << std::endl; | | | |
| if(HasTestStatisticData() && fAltDistr && fNullDistr) | | | |
| cout << " - CL_s: " << CLs() << " +/- " << CLsError() << std:: | | | |
| endl; | | | |
| | | | |
| return; | | | |
| } | | | |
| | | | |
| private: | | private: | |
| void UpdatePValue(const SamplingDistribution* distr, Double_t &pvalue
, Double_t &perror, Bool_t pIsRightTail); | | void UpdatePValue(const SamplingDistribution* distr, Double_t &pvalue
, Double_t &perror, Bool_t pIsRightTail); | |
| | | | |
| protected: | | protected: | |
| | | | |
| mutable Double_t fNullPValue; // p-value for the null hypothesis (sma
ll number means disfavored) | | mutable Double_t fNullPValue; // p-value for the null hypothesis (sma
ll number means disfavored) | |
| mutable Double_t fAlternatePValue; // p-value for the alternate hypot
hesis (small number means disfavored) | | mutable Double_t fAlternatePValue; // p-value for the alternate hypot
hesis (small number means disfavored) | |
| mutable Double_t fNullPValueError; // error of p-value for the null h
ypothesis (small number means disfavored) | | mutable Double_t fNullPValueError; // error of p-value for the null h
ypothesis (small number means disfavored) | |
| mutable Double_t fAlternatePValueError; // error of p-value for the a
lternate hypothesis (small number means disfavored) | | mutable Double_t fAlternatePValueError; // error of p-value for the a
lternate hypothesis (small number means disfavored) | |
| | | | |
End of changes. 2 change blocks. |
| 34 lines changed or deleted | | 2 lines changed or added | |
|
| MarkovChain.h | | MarkovChain.h | |
|
| // @(#)root/roostats:$Id: MarkovChain.h 39391 2011-05-26 09:51:59Z moneta $ | | // @(#)root/roostats:$Id: MarkovChain.h 42988 2012-02-13 21:03:07Z wouter $ | |
| // Authors: Kevin Belasco 17/06/2009 | | // Authors: Kevin Belasco 17/06/2009 | |
| // Authors: Kyle Cranmer 17/06/2009 | | // Authors: Kyle Cranmer 17/06/2009 | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 55 | | skipping to change at line 55 | |
| public: | | public: | |
| MarkovChain(); | | MarkovChain(); | |
| MarkovChain(RooArgSet& parameters); | | MarkovChain(RooArgSet& parameters); | |
| MarkovChain(const char* name, const char* title, RooArgSet& parameter
s); | | MarkovChain(const char* name, const char* title, RooArgSet& parameter
s); | |
| | | | |
| // safely add an entry to the chain | | // safely add an entry to the chain | |
| virtual void Add(RooArgSet& entry, Double_t nllValue, Double_t weight
= 1.0); | | virtual void Add(RooArgSet& entry, Double_t nllValue, Double_t weight
= 1.0); | |
| // add an entry to the chain ONLY IF you have constructed with parame
ters | | // add an entry to the chain ONLY IF you have constructed with parame
ters | |
| // or called SetParameters | | // or called SetParameters | |
| virtual void AddFast(RooArgSet& entry, Double_t nllValue, Double_t we
ight = 1.0); | | virtual void AddFast(RooArgSet& entry, Double_t nllValue, Double_t we
ight = 1.0); | |
|
| | | // add another markov chain | |
| | | virtual void AddWithBurnIn(MarkovChain& otherChain, Int_t burnIn = 0) | |
| | | ; | |
| | | // add another markov chain | |
| | | virtual void Add(MarkovChain& otherChain, Double_t discardEntries = 0 | |
| | | .0); | |
| // set which of your parameters this chain should store | | // set which of your parameters this chain should store | |
| virtual void SetParameters(RooArgSet& parameters); | | virtual void SetParameters(RooArgSet& parameters); | |
| // get the number of steps in the chain | | // get the number of steps in the chain | |
|
| virtual Int_t Size() const { return fChain->numEntries(); } | | virtual Int_t Size() const { return fChain ? fChain->numEntries() : 0
; } | |
| // get the entry at position i | | // get the entry at position i | |
| virtual const RooArgSet* Get(Int_t i) const { return fChain->get(i);
} | | virtual const RooArgSet* Get(Int_t i) const { return fChain->get(i);
} | |
| // get the entry at the current position | | // get the entry at the current position | |
| virtual const RooArgSet* Get() const { return fChain->get(); } | | virtual const RooArgSet* Get() const { return fChain->get(); } | |
| // get the weight of the current (last indexed) entry | | // get the weight of the current (last indexed) entry | |
| virtual Double_t Weight() const; | | virtual Double_t Weight() const; | |
| // get the weight of entry at position i | | // get the weight of entry at position i | |
| virtual Double_t Weight(Int_t i) const; | | virtual Double_t Weight(Int_t i) const; | |
| // get the NLL value of entry at position i | | // get the NLL value of entry at position i | |
| virtual Double_t NLL(Int_t i) const; | | virtual Double_t NLL(Int_t i) const; | |
| | | | |
End of changes. 3 change blocks. |
| 2 lines changed or deleted | | 8 lines changed or added | |
|
| ProfileLikelihoodTestStat.h | | ProfileLikelihoodTestStat.h | |
|
| // @(#)root/roostats:$Id: ProfileLikelihoodTestStat.h 42325 2011-11-30 16:4
7:16Z moneta $ | | // @(#)root/roostats:$Id: ProfileLikelihoodTestStat.h 43017 2012-02-16 02:5
8:44Z cranmer $ | |
| // Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke | | // Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke | |
| // Additional Contributions: Giovanni Petrucciani | | // Additional Contributions: Giovanni Petrucciani | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 60 | | skipping to change at line 60 | |
| | | | |
| #include "RooMinuit.h" | | #include "RooMinuit.h" | |
| #include "RooMinimizer.h" | | #include "RooMinimizer.h" | |
| #include "Math/MinimizerOptions.h" | | #include "Math/MinimizerOptions.h" | |
| #include "TStopwatch.h" | | #include "TStopwatch.h" | |
| | | | |
| namespace RooStats { | | namespace RooStats { | |
| | | | |
| class ProfileLikelihoodTestStat : public TestStatistic{ | | class ProfileLikelihoodTestStat : public TestStatistic{ | |
| | | | |
|
| | | enum LimitType {twoSided, oneSided, oneSidedDiscovery}; | |
| | | | |
| public: | | public: | |
| ProfileLikelihoodTestStat() { | | ProfileLikelihoodTestStat() { | |
| // Proof constructor. Do not use. | | // Proof constructor. Do not use. | |
| fPdf = 0; | | fPdf = 0; | |
| fProfile = 0; | | fProfile = 0; | |
| fNll = 0; | | fNll = 0; | |
| fCachedBestFitParams = 0; | | fCachedBestFitParams = 0; | |
| fLastData = 0; | | fLastData = 0; | |
|
| fOneSided = false; | | fLimitType = twoSided; | |
| | | fSigned = false; | |
| fReuseNll = false; | | fReuseNll = false; | |
| fMinimizer=::ROOT::Math::MinimizerOptions::DefaultMinimizerType().c_
str(); | | fMinimizer=::ROOT::Math::MinimizerOptions::DefaultMinimizerType().c_
str(); | |
| fStrategy=::ROOT::Math::MinimizerOptions::DefaultStrategy(); | | fStrategy=::ROOT::Math::MinimizerOptions::DefaultStrategy(); | |
| fTolerance=TMath::Max(1.,::ROOT::Math::MinimizerOptions::DefaultTol
erance()); | | fTolerance=TMath::Max(1.,::ROOT::Math::MinimizerOptions::DefaultTol
erance()); | |
| fPrintLevel=::ROOT::Math::MinimizerOptions::DefaultPrintLevel(); | | fPrintLevel=::ROOT::Math::MinimizerOptions::DefaultPrintLevel(); | |
| | | | |
| } | | } | |
| ProfileLikelihoodTestStat(RooAbsPdf& pdf) { | | ProfileLikelihoodTestStat(RooAbsPdf& pdf) { | |
| fPdf = &pdf; | | fPdf = &pdf; | |
| fProfile = 0; | | fProfile = 0; | |
| fNll = 0; | | fNll = 0; | |
| fCachedBestFitParams = 0; | | fCachedBestFitParams = 0; | |
| fLastData = 0; | | fLastData = 0; | |
|
| fOneSided = false; | | fLimitType = twoSided; | |
| | | fSigned = false; | |
| fReuseNll = false; | | fReuseNll = false; | |
| fMinimizer=::ROOT::Math::MinimizerOptions::DefaultMinimizerType().c_
str(); | | fMinimizer=::ROOT::Math::MinimizerOptions::DefaultMinimizerType().c_
str(); | |
| fStrategy=::ROOT::Math::MinimizerOptions::DefaultStrategy(); | | fStrategy=::ROOT::Math::MinimizerOptions::DefaultStrategy(); | |
| // avoid default tolerance to be too small (1. is default in RooMini
mizer) | | // avoid default tolerance to be too small (1. is default in RooMini
mizer) | |
| fTolerance=TMath::Max(1.,::ROOT::Math::MinimizerOptions::DefaultTole
rance()); | | fTolerance=TMath::Max(1.,::ROOT::Math::MinimizerOptions::DefaultTole
rance()); | |
| fPrintLevel=::ROOT::Math::MinimizerOptions::DefaultPrintLevel(); | | fPrintLevel=::ROOT::Math::MinimizerOptions::DefaultPrintLevel(); | |
| } | | } | |
| virtual ~ProfileLikelihoodTestStat() { | | virtual ~ProfileLikelihoodTestStat() { | |
| // delete fRand; | | // delete fRand; | |
| // delete fTestStatistic; | | // delete fTestStatistic; | |
| if(fProfile) delete fProfile; | | if(fProfile) delete fProfile; | |
| if(fNll) delete fNll; | | if(fNll) delete fNll; | |
| if(fCachedBestFitParams) delete fCachedBestFitParams; | | if(fCachedBestFitParams) delete fCachedBestFitParams; | |
| } | | } | |
|
| void SetOneSided(Bool_t flag=true) {fOneSided = flag;} | | void SetOneSided(Bool_t flag=true) {fLimitType = (flag ? oneSided : tw | |
| | | oSided);} | |
| | | void SetOneSidedDiscovery(Bool_t flag=true) {fLimitType = (flag ? oneS | |
| | | idedDiscovery : twoSided);} | |
| | | void SetSigned(Bool_t flag=true) {fSigned = flag;} // +/- t_mu instea | |
| | | d of t_mu>0 with one-sided settings | |
| | | | |
| static void SetAlwaysReuseNLL(Bool_t flag) { fgAlwaysReuseNll = flag ;
} | | static void SetAlwaysReuseNLL(Bool_t flag) { fgAlwaysReuseNll = flag ;
} | |
| void SetReuseNLL(Bool_t flag) { fReuseNll = flag ; } | | void SetReuseNLL(Bool_t flag) { fReuseNll = flag ; } | |
| | | | |
| void SetMinimizer(const char* minimizer){ fMinimizer=minimizer;} | | void SetMinimizer(const char* minimizer){ fMinimizer=minimizer;} | |
| void SetStrategy(Int_t strategy){fStrategy=strategy;} | | void SetStrategy(Int_t strategy){fStrategy=strategy;} | |
| void SetTolerance(double tol){fTolerance=tol;} | | void SetTolerance(double tol){fTolerance=tol;} | |
| void SetPrintLevel(Int_t printlevel){fPrintLevel=printlevel;} | | void SetPrintLevel(Int_t printlevel){fPrintLevel=printlevel;} | |
| | | | |
| // Main interface to evaluate the test statistic on a dataset | | // Main interface to evaluate the test statistic on a dataset | |
| | | | |
| skipping to change at line 130 | | skipping to change at line 136 | |
| | | | |
| double GetMinNLL(int& status); | | double GetMinNLL(int& status); | |
| | | | |
| private: | | private: | |
| RooProfileLL* fProfile; //! | | RooProfileLL* fProfile; //! | |
| RooAbsPdf* fPdf; | | RooAbsPdf* fPdf; | |
| RooNLLVar* fNll; //! | | RooNLLVar* fNll; //! | |
| const RooArgSet* fCachedBestFitParams; | | const RooArgSet* fCachedBestFitParams; | |
| RooAbsData* fLastData; | | RooAbsData* fLastData; | |
| // Double_t fLastMLE; | | // Double_t fLastMLE; | |
|
| Bool_t fOneSided; | | LimitType fLimitType; | |
| | | Bool_t fSigned; | |
| | | | |
| static Bool_t fgAlwaysReuseNll ; | | static Bool_t fgAlwaysReuseNll ; | |
| Bool_t fReuseNll ; | | Bool_t fReuseNll ; | |
| TString fMinimizer; | | TString fMinimizer; | |
| Int_t fStrategy; | | Int_t fStrategy; | |
| Double_t fTolerance; | | Double_t fTolerance; | |
| Int_t fPrintLevel; | | Int_t fPrintLevel; | |
| | | | |
| protected: | | protected: | |
|
| ClassDef(ProfileLikelihoodTestStat,6) // implements the profile lik
elihood ratio as a test statistic to be used with several tools | | ClassDef(ProfileLikelihoodTestStat,7) // implements the profile lik
elihood ratio as a test statistic to be used with several tools | |
| }; | | }; | |
| } | | } | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 7 change blocks. |
| 6 lines changed or deleted | | 16 lines changed or added | |
|
| RooAICRegistry.h | | RooAICRegistry.h | |
| | | | |
| skipping to change at line 19 | | skipping to change at line 19 | |
| * Copyright (c) 2000-2005, Regents of the University of California
* | | * Copyright (c) 2000-2005, Regents of the University of California
* | |
| * and Stanford University. All rights reserved.
* | | * and Stanford University. All rights reserved.
* | |
| *
* | | *
* | |
| * Redistribution and use in source and binary forms,
* | | * Redistribution and use in source and binary forms,
* | |
| * with or without modification, are permitted according to the terms
* | | * with or without modification, are permitted according to the terms
* | |
| * listed in LICENSE (http://roofit.sourceforge.net/license.txt)
* | | * listed in LICENSE (http://roofit.sourceforge.net/license.txt)
* | |
| **************************************************************************
***/ | | **************************************************************************
***/ | |
| #ifndef ROO_AIC_REGISTRY | | #ifndef ROO_AIC_REGISTRY | |
| #define ROO_AIC_REGISTRY | | #define ROO_AIC_REGISTRY | |
| | | | |
|
| | | #include <vector> | |
| #include "Riosfwd.h" | | #include "Riosfwd.h" | |
| #include <assert.h> | | #include <assert.h> | |
| #include "Rtypes.h" | | #include "Rtypes.h" | |
| class RooArgSet ; | | class RooArgSet ; | |
| | | | |
|
| typedef Int_t* pInt_t ; | | | |
| typedef RooArgSet* pRooArgSet ; | | typedef RooArgSet* pRooArgSet ; | |
| | | | |
| class RooAICRegistry { | | class RooAICRegistry { | |
| | | | |
| public: | | public: | |
|
| RooAICRegistry(Int_t regSize=10) ; | | RooAICRegistry(UInt_t size = 10) ; | |
| RooAICRegistry(const RooAICRegistry& other) ; | | RooAICRegistry(const RooAICRegistry& other) ; | |
| virtual ~RooAICRegistry() ; | | virtual ~RooAICRegistry() ; | |
| | | | |
|
| Int_t store(Int_t* codeList, Int_t size, RooArgSet* set1=0, RooArgSet* se | | Int_t store(const std::vector<Int_t>& codeList, RooArgSet* set1 = 0, RooA | |
| t2=0, RooArgSet* set3=0, RooArgSet* set4=0) ; | | rgSet* set2 = 0, | |
| const Int_t* retrieve(Int_t masterCode) const ; | | RooArgSet* set3 = 0, RooArgSet* set4 = 0); | |
| const Int_t* retrieve(Int_t masterCode, pRooArgSet& set1) const ; | | const std::vector<Int_t>& retrieve(Int_t masterCode) const ; | |
| const Int_t* retrieve(Int_t masterCode, pRooArgSet& set1, pRooArgSet& set | | const std::vector<Int_t>& retrieve(Int_t masterCode, pRooArgSet& set1) c | |
| 2) const ; | | onst ; | |
| const Int_t* retrieve(Int_t masterCode, pRooArgSet& set1, pRooArgSet& set | | const std::vector<Int_t>& retrieve(Int_t masterCode, pRooArgSet& set1, p | |
| 2, pRooArgSet& set3, pRooArgSet& set4) const ; | | RooArgSet& set2) const ; | |
| | | const std::vector<Int_t>& retrieve(Int_t masterCode, pRooArgSet& set1, | |
| | | pRooArgSet& set2, pRooArgSet& set3, p | |
| | | RooArgSet& set4) const ; | |
| | | | |
| protected: | | protected: | |
| | | | |
|
| Int_t _regSize ; // Size of registry | | std::vector<std::vector<Int_t> > _clArr; //! Array of array of code | |
| Int_t* _clSize; //! Array is size of code lists | | lists | |
| pInt_t* _clArr; //! Array of array of code lists | | std::vector<pRooArgSet> _asArr1; //! Array of 1st RooArgSet pointers | |
| pRooArgSet* _asArr1; //! Array of 1st RooArgSet pointers | | std::vector<pRooArgSet> _asArr2; //! Array of 2nd RooArgSet pointers | |
| pRooArgSet* _asArr2; //! Array of 2nd RooArgSet pointers | | std::vector<pRooArgSet> _asArr3; //! Array of 3rd RooArgSet pointers | |
| pRooArgSet* _asArr3; //! Array of 3rd RooArgSet pointers | | std::vector<pRooArgSet> _asArr4; //! Array of 4th RooArgSet pointers | |
| pRooArgSet* _asArr4; //! Array of 4th RooArgSet pointers | | | |
| | | | |
|
| ClassDef(RooAICRegistry,1) // Registry for analytical integration codes | | ClassDef(RooAICRegistry,2) // Registry for analytical integration codes | |
| } ; | | } ; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 6 change blocks. |
| 18 lines changed or deleted | | 20 lines changed or added | |
|
| RooAbsAnaConvPdf.h | | RooAbsAnaConvPdf.h | |
| | | | |
| skipping to change at line 53 | | skipping to change at line 53 | |
| virtual ~RooAbsAnaConvPdf(); | | virtual ~RooAbsAnaConvPdf(); | |
| | | | |
| Int_t declareBasis(const char* expression, const RooArgList& params) ; | | Int_t declareBasis(const char* expression, const RooArgList& params) ; | |
| virtual void printMultiline(ostream& stream, Int_t contents, Bool_t verbo
se=kFALSE, TString indent= "") const ; | | virtual void printMultiline(ostream& stream, Int_t contents, Bool_t verbo
se=kFALSE, TString indent= "") const ; | |
| | | | |
| // Coefficient normalization access | | // Coefficient normalization access | |
| inline Double_t getCoefNorm(Int_t coefIdx, const RooArgSet& nset, const c
har* rangeName) const { | | inline Double_t getCoefNorm(Int_t coefIdx, const RooArgSet& nset, const c
har* rangeName) const { | |
| // Returns normalization integral for coefficient coefIdx for observabl
es nset in range rangeNae | | // Returns normalization integral for coefficient coefIdx for observabl
es nset in range rangeNae | |
| return getCoefNorm(coefIdx,&nset,rangeName) ; | | return getCoefNorm(coefIdx,&nset,rangeName) ; | |
| } | | } | |
|
| Double_t getCoefNorm(Int_t coefIdx, const RooArgSet* nset=0, const char* | | Double_t getCoefNorm(Int_t coefIdx, const RooArgSet* nset=0, const char* | |
| rangeName=0) const ; | | rangeName=0) const { | |
| | | return getCoefNorm(coefIdx,nset,RooNameReg::ptr(rangeName)); | |
| | | } | |
| | | | |
| // Analytical integration support | | // Analytical integration support | |
| virtual Int_t getAnalyticalIntegralWN(RooArgSet& allVars, RooArgSet& anal
Vars, const RooArgSet* normSet, const char* rangeName=0) const ; | | virtual Int_t getAnalyticalIntegralWN(RooArgSet& allVars, RooArgSet& anal
Vars, const RooArgSet* normSet, const char* rangeName=0) const ; | |
| virtual Double_t analyticalIntegralWN(Int_t code, const RooArgSet* normSe
t, const char* rangeName=0) const ; | | virtual Double_t analyticalIntegralWN(Int_t code, const RooArgSet* normSe
t, const char* rangeName=0) const ; | |
| | | | |
| // Coefficient Analytical integration support | | // Coefficient Analytical integration support | |
| virtual Int_t getCoefAnalyticalIntegral(Int_t coef, RooArgSet& allVars, R
ooArgSet& analVars, const char* rangeName=0) const ; | | virtual Int_t getCoefAnalyticalIntegral(Int_t coef, RooArgSet& allVars, R
ooArgSet& analVars, const char* rangeName=0) const ; | |
| virtual Double_t coefAnalyticalIntegral(Int_t coef, Int_t code, const cha
r* rangeName=0) const ; | | virtual Double_t coefAnalyticalIntegral(Int_t coef, Int_t code, const cha
r* rangeName=0) const ; | |
| virtual Bool_t forceAnalyticalInt(const RooAbsArg& dep) const ; | | virtual Bool_t forceAnalyticalInt(const RooAbsArg& dep) const ; | |
| | | | |
| virtual Double_t coefficient(Int_t basisIndex) const = 0 ; | | virtual Double_t coefficient(Int_t basisIndex) const = 0 ; | |
| virtual RooArgSet* coefVars(Int_t coefIdx) const ; | | virtual RooArgSet* coefVars(Int_t coefIdx) const ; | |
| | | | |
| virtual Bool_t isDirectGenSafe(const RooAbsArg& arg) const ; | | virtual Bool_t isDirectGenSafe(const RooAbsArg& arg) const ; | |
| | | | |
| protected: | | protected: | |
|
| | | Double_t getCoefNorm(Int_t coefIdx, const RooArgSet* nset, const TNamed*
rangeName) const ; | |
| | | | |
| Bool_t _isCopy ; | | Bool_t _isCopy ; | |
| | | | |
| virtual Double_t evaluate() const ; | | virtual Double_t evaluate() const ; | |
| | | | |
| void makeCoefVarList(RooArgList&) const ; | | void makeCoefVarList(RooArgList&) const ; | |
| | | | |
| friend class RooConvGenContext ; | | friend class RooConvGenContext ; | |
| Bool_t changeModel(const RooResolutionModel& newModel) ; | | Bool_t changeModel(const RooResolutionModel& newModel) ; | |
| virtual RooAbsGenContext* genContext(const RooArgSet &vars, const RooData
Set *prototype=0, | | virtual RooAbsGenContext* genContext(const RooArgSet &vars, const RooData
Set *prototype=0, | |
| const RooArgSet* auxProto=0, Bool_t
verbose= kFALSE) const ; | | const RooArgSet* auxProto=0, Bool_t
verbose= kFALSE) const ; | |
| | | | |
|
| // Following pointers are only used during | | RooRealProxy _model ; // Original model | |
| // construction and need not to be proxied | | RooRealProxy _convVar ; // Convolution variable | |
| RooResolutionModel* _model ; //! Original resolution model | | | |
| RooRealVar* _convVar ; //! Convolution variable | | | |
| | | | |
| RooArgSet* parseIntegrationRequest(const RooArgSet& intSet, Int_t& coefCo
de, RooArgSet* analVars=0) const ; | | RooArgSet* parseIntegrationRequest(const RooArgSet& intSet, Int_t& coefCo
de, RooArgSet* analVars=0) const ; | |
| | | | |
| const RooRealVar* convVar() const ; // Convolution variable | | const RooRealVar* convVar() const ; // Convolution variable | |
| | | | |
| RooListProxy _convSet ; // Set of (resModel (x) basisFunc)
convolution objects | | RooListProxy _convSet ; // Set of (resModel (x) basisFunc)
convolution objects | |
| RooArgList _basisList ; //! List of created basis functions | | RooArgList _basisList ; //! List of created basis functions | |
| mutable RooArgSet* _convNormSet ; //! Subset of last normalization th
at applies to convolutions | | mutable RooArgSet* _convNormSet ; //! Subset of last normalization th
at applies to convolutions | |
| mutable TIterator* _convSetIter ; //! Iterator over _convNormSet | | mutable TIterator* _convSetIter ; //! Iterator over _convNormSet | |
| | | | |
| | | | |
| skipping to change at line 113 | | skipping to change at line 114 | |
| return l ; | | return l ; | |
| } | | } | |
| | | | |
| RooArgList _coefVarList ; | | RooArgList _coefVarList ; | |
| RooArgList _normList ; | | RooArgList _normList ; | |
| } ; | | } ; | |
| mutable RooObjCacheManager _coefNormMgr ; // Coefficient normalization ma
nager | | mutable RooObjCacheManager _coefNormMgr ; // Coefficient normalization ma
nager | |
| | | | |
| mutable RooAICRegistry _codeReg ; //! Registry of analytical integratio
n codes | | mutable RooAICRegistry _codeReg ; //! Registry of analytical integratio
n codes | |
| | | | |
|
| ClassDef(RooAbsAnaConvPdf,1) // Abstract Composite Convoluted PDF | | ClassDef(RooAbsAnaConvPdf,2) // Abstract Composite Convoluted PDF | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 4 change blocks. |
| 7 lines changed or deleted | | 8 lines changed or added | |
|
| RooAbsCachedReal.h | | RooAbsCachedReal.h | |
| | | | |
| skipping to change at line 52 | | skipping to change at line 52 | |
| } | | } | |
| | | | |
| virtual Bool_t forceAnalyticalInt(const RooAbsArg& /*dep*/) const { | | virtual Bool_t forceAnalyticalInt(const RooAbsArg& /*dep*/) const { | |
| // Force all observables to be offered for internal integration | | // Force all observables to be offered for internal integration | |
| return kTRUE ; | | return kTRUE ; | |
| } | | } | |
| | | | |
| virtual Int_t getAnalyticalIntegralWN(RooArgSet& allVars, RooArgSet& anal
Vars, const RooArgSet* normSet, const char* rangeName=0) const ; | | virtual Int_t getAnalyticalIntegralWN(RooArgSet& allVars, RooArgSet& anal
Vars, const RooArgSet* normSet, const char* rangeName=0) const ; | |
| virtual Double_t analyticalIntegralWN(Int_t code, const RooArgSet* normSe
t, const char* rangeName=0) const ; | | virtual Double_t analyticalIntegralWN(Int_t code, const RooArgSet* normSe
t, const char* rangeName=0) const ; | |
| | | | |
|
| | | void disableCache(Bool_t flag) { | |
| | | // Switch to disable caching mechanism | |
| | | _disableCache = flag ; | |
| | | } | |
| | | | |
| protected: | | protected: | |
| | | | |
| class FuncCacheElem : public RooAbsCacheElement { | | class FuncCacheElem : public RooAbsCacheElement { | |
| public: | | public: | |
| FuncCacheElem(const RooAbsCachedReal& self, const RooArgSet* nset) ; | | FuncCacheElem(const RooAbsCachedReal& self, const RooArgSet* nset) ; | |
| virtual ~FuncCacheElem() {} ; | | virtual ~FuncCacheElem() {} ; | |
| | | | |
| // Cache management functions | | // Cache management functions | |
| virtual RooArgList containedArgs(Action) ; | | virtual RooArgList containedArgs(Action) ; | |
| virtual void printCompactTreeHook(std::ostream&, const char *, Int_t, I
nt_t) ; | | virtual void printCompactTreeHook(std::ostream&, const char *, Int_t, I
nt_t) ; | |
| | | | |
| skipping to change at line 90 | | skipping to change at line 95 | |
| virtual const char* binningName() const { | | virtual const char* binningName() const { | |
| // Returns name of binning to be used for cache histogram creation | | // Returns name of binning to be used for cache histogram creation | |
| return "cache" ; | | return "cache" ; | |
| } | | } | |
| virtual FuncCacheElem* createCache(const RooArgSet* nset) const ; | | virtual FuncCacheElem* createCache(const RooArgSet* nset) const ; | |
| virtual const char* inputBaseName() const = 0 ; | | virtual const char* inputBaseName() const = 0 ; | |
| virtual RooArgSet* actualObservables(const RooArgSet& nset) const = 0 ; | | virtual RooArgSet* actualObservables(const RooArgSet& nset) const = 0 ; | |
| virtual RooArgSet* actualParameters(const RooArgSet& nset) const = 0 ; | | virtual RooArgSet* actualParameters(const RooArgSet& nset) const = 0 ; | |
| virtual void fillCacheObject(FuncCacheElem& cache) const = 0 ; | | virtual void fillCacheObject(FuncCacheElem& cache) const = 0 ; | |
| | | | |
|
| mutable RooObjCacheManager _cacheMgr ; // The cache manager | | mutable RooObjCacheManager _cacheMgr ; //! The cache manager | |
| | | | |
| Int_t _ipOrder ; // Interpolation order for cache histograms | | Int_t _ipOrder ; // Interpolation order for cache histograms | |
| | | | |
| TString cacheNameSuffix(const RooArgSet& nset) const ; | | TString cacheNameSuffix(const RooArgSet& nset) const ; | |
|
| void disableCache(Bool_t flag) { | | | |
| // Switch to disable caching mechanism | | | |
| _disableCache = flag ; | | | |
| } | | | |
| | | | |
| mutable std::map<Int_t,std::pair<const RooArgSet*,const RooArgSet*> > _an
aIntMap ; //! Map for analytical integration codes | | mutable std::map<Int_t,std::pair<const RooArgSet*,const RooArgSet*> > _an
aIntMap ; //! Map for analytical integration codes | |
| | | | |
| private: | | private: | |
| | | | |
| Bool_t _disableCache ; // Flag to run object in passthrough (= non-cachin
g mode) | | Bool_t _disableCache ; // Flag to run object in passthrough (= non-cachin
g mode) | |
| | | | |
| ClassDef(RooAbsCachedReal,1) // Abstract base class for cached p.d.f.s | | ClassDef(RooAbsCachedReal,1) // Abstract base class for cached p.d.f.s | |
| }; | | }; | |
| | | | |
| | | | |
End of changes. 3 change blocks. |
| 5 lines changed or deleted | | 6 lines changed or added | |
|
| RooAbsDataStore.h | | RooAbsDataStore.h | |
| /**************************************************************************
*** | | /**************************************************************************
*** | |
| * Project: RooFit
* | | * Project: RooFit
* | |
| * Package: RooFitCore
* | | * Package: RooFitCore
* | |
|
| * File: $Id: RooAbsDataStore.h 41998 2011-11-15 10:34:40Z moneta $ | | * File: $Id: RooAbsDataStore.h 42987 2012-02-13 19:56:24Z wouter $ | |
| * Authors:
* | | * Authors:
* | |
| * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu
* | | * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu
* | |
| * DK, David Kirkby, UC Irvine, dkirkby@uci.edu
* | | * DK, David Kirkby, UC Irvine, dkirkby@uci.edu
* | |
| *
* | | *
* | |
| * Copyright (c) 2000-2005, Regents of the University of California
* | | * Copyright (c) 2000-2005, Regents of the University of California
* | |
| * and Stanford University. All rights reserved.
* | | * and Stanford University. All rights reserved.
* | |
| *
* | | *
* | |
| * Redistribution and use in source and binary forms,
* | | * Redistribution and use in source and binary forms,
* | |
| * with or without modification, are permitted according to the terms
* | | * with or without modification, are permitted according to the terms
* | |
| * listed in LICENSE (http://roofit.sourceforge.net/license.txt)
* | | * listed in LICENSE (http://roofit.sourceforge.net/license.txt)
* | |
| | | | |
| skipping to change at line 103 | | skipping to change at line 103 | |
| | | | |
| virtual Int_t defaultPrintContents(Option_t* opt) const ; | | virtual Int_t defaultPrintContents(Option_t* opt) const ; | |
| | | | |
| // Constant term optimizer interface | | // Constant term optimizer interface | |
| virtual void cacheArgs(const RooAbsArg* cacheOwner, RooArgSet& varSet, co
nst RooArgSet* nset=0) = 0 ; | | virtual void cacheArgs(const RooAbsArg* cacheOwner, RooArgSet& varSet, co
nst RooArgSet* nset=0) = 0 ; | |
| virtual const RooAbsArg* cacheOwner() = 0 ; | | virtual const RooAbsArg* cacheOwner() = 0 ; | |
| virtual void attachCache(const RooAbsArg* newOwner, const RooArgSet& cach
edVars) = 0 ; | | virtual void attachCache(const RooAbsArg* newOwner, const RooArgSet& cach
edVars) = 0 ; | |
| virtual void setArgStatus(const RooArgSet& set, Bool_t active) = 0 ; | | virtual void setArgStatus(const RooArgSet& set, Bool_t active) = 0 ; | |
| const RooArgSet& cachedVars() const { return _cachedVars ; } | | const RooArgSet& cachedVars() const { return _cachedVars ; } | |
| virtual void resetCache() = 0 ; | | virtual void resetCache() = 0 ; | |
|
| virtual void recalculateCache() {} ; | | virtual void recalculateCache(const RooArgSet* /*proj*/, Int_t /*firstEve
nt*/, Int_t /*lastEvent*/, Int_t /*stepSize*/) {} ; | |
| | | | |
| virtual void setDirtyProp(Bool_t flag) { _doDirtyProp = flag ; } | | virtual void setDirtyProp(Bool_t flag) { _doDirtyProp = flag ; } | |
| Bool_t dirtyProp() const { return _doDirtyProp ; } | | Bool_t dirtyProp() const { return _doDirtyProp ; } | |
| | | | |
| virtual void checkInit() const {} ; | | virtual void checkInit() const {} ; | |
| | | | |
| Bool_t hasFilledCache() const { return _cachedVars.getSize()>0 ; } | | Bool_t hasFilledCache() const { return _cachedVars.getSize()>0 ; } | |
| | | | |
| virtual const TTree* tree() const { return 0 ; } | | virtual const TTree* tree() const { return 0 ; } | |
| virtual void dump() {} | | virtual void dump() {} | |
| | | | |
End of changes. 2 change blocks. |
| 2 lines changed or deleted | | 2 lines changed or added | |
|
| RooAbsReal.h | | RooAbsReal.h | |
| | | | |
| skipping to change at line 161 | | skipping to change at line 161 | |
| // Create integral over observables in iset in range named rangeName wi
th integrand normalized over observables in nset while | | // Create integral over observables in iset in range named rangeName wi
th integrand normalized over observables in nset while | |
| // using specified configuration for any numeric integration | | // using specified configuration for any numeric integration | |
| return createIntegral(iset,&nset,&cfg,rangeName) ; | | return createIntegral(iset,&nset,&cfg,rangeName) ; | |
| } | | } | |
| RooAbsReal* createIntegral(const RooArgSet& iset, const RooNumIntConfig&
cfg, const char* rangeName=0) const { | | RooAbsReal* createIntegral(const RooArgSet& iset, const RooNumIntConfig&
cfg, const char* rangeName=0) const { | |
| // Create integral over observables in iset in range named rangeName us
ing specified configuration for any numeric integration | | // Create integral over observables in iset in range named rangeName us
ing specified configuration for any numeric integration | |
| return createIntegral(iset,0,&cfg,rangeName) ; | | return createIntegral(iset,0,&cfg,rangeName) ; | |
| } | | } | |
| virtual RooAbsReal* createIntegral(const RooArgSet& iset, const RooArgSet
* nset=0, const RooNumIntConfig* cfg=0, const char* rangeName=0) const ; | | virtual RooAbsReal* createIntegral(const RooArgSet& iset, const RooArgSet
* nset=0, const RooNumIntConfig* cfg=0, const char* rangeName=0) const ; | |
| | | | |
|
| | | void setParameterizeIntegral(const RooArgSet& paramVars) ; | |
| | | | |
| // Create running integrals | | // Create running integrals | |
| RooAbsReal* createRunningIntegral(const RooArgSet& iset, const RooArgSet&
nset=RooArgSet()) ; | | RooAbsReal* createRunningIntegral(const RooArgSet& iset, const RooArgSet&
nset=RooArgSet()) ; | |
| RooAbsReal* createRunningIntegral(const RooArgSet& iset, const RooCmdArg&
arg1, const RooCmdArg& arg2=RooCmdArg::none(), | | RooAbsReal* createRunningIntegral(const RooArgSet& iset, const RooCmdArg&
arg1, const RooCmdArg& arg2=RooCmdArg::none(), | |
| const RooCmdArg& arg3=RooCmdArg::none(), const RooCm
dArg& arg4=RooCmdArg::none(), | | const RooCmdArg& arg3=RooCmdArg::none(), const RooCm
dArg& arg4=RooCmdArg::none(), | |
| const RooCmdArg& arg5=RooCmdArg::none(), const RooCm
dArg& arg6=RooCmdArg::none(), | | const RooCmdArg& arg5=RooCmdArg::none(), const RooCm
dArg& arg6=RooCmdArg::none(), | |
| const RooCmdArg& arg7=RooCmdArg::none(), const RooCm
dArg& arg8=RooCmdArg::none()) ; | | const RooCmdArg& arg7=RooCmdArg::none(), const RooCm
dArg& arg8=RooCmdArg::none()) ; | |
| RooAbsReal* createIntRI(const RooArgSet& iset, const RooArgSet& nset=RooA
rgSet()) ; | | RooAbsReal* createIntRI(const RooArgSet& iset, const RooArgSet& nset=RooA
rgSet()) ; | |
| RooAbsReal* createScanRI(const RooArgSet& iset, const RooArgSet& nset, In
t_t numScanBins, Int_t intOrder) ; | | RooAbsReal* createScanRI(const RooArgSet& iset, const RooArgSet& nset, In
t_t numScanBins, Int_t intOrder) ; | |
| | | | |
| // Optimized accept/reject generator support | | // Optimized accept/reject generator support | |
| | | | |
End of changes. 1 change blocks. |
| 0 lines changed or deleted | | 2 lines changed or added | |
|
| RooAddPdf.h | | RooAddPdf.h | |
| | | | |
| skipping to change at line 59 | | skipping to change at line 59 | |
| } | | } | |
| Int_t getAnalyticalIntegralWN(RooArgSet& allVars, RooArgSet& numVars, con
st RooArgSet* normSet, const char* rangeName=0) const ; | | Int_t getAnalyticalIntegralWN(RooArgSet& allVars, RooArgSet& numVars, con
st RooArgSet* normSet, const char* rangeName=0) const ; | |
| Double_t analyticalIntegralWN(Int_t code, const RooArgSet* normSet, const
char* rangeName=0) const ; | | Double_t analyticalIntegralWN(Int_t code, const RooArgSet* normSet, const
char* rangeName=0) const ; | |
| virtual Bool_t selfNormalized() const { | | virtual Bool_t selfNormalized() const { | |
| // P.d.f is self normalized | | // P.d.f is self normalized | |
| return kTRUE ; | | return kTRUE ; | |
| } | | } | |
| | | | |
| virtual ExtendMode extendMode() const { | | virtual ExtendMode extendMode() const { | |
| // Return extended mode capabilities | | // Return extended mode capabilities | |
|
| return (_haveLastCoef || _allExtendable) ? MustBeExtended : CanNotBeExt
ended; | | return ((_haveLastCoef&&!_recursive) || _allExtendable) ? MustBeExtende
d : CanNotBeExtended; | |
| } | | } | |
| virtual Double_t expectedEvents(const RooArgSet* nset) const ; | | virtual Double_t expectedEvents(const RooArgSet* nset) const ; | |
| virtual Double_t expectedEvents(const RooArgSet& nset) const { | | virtual Double_t expectedEvents(const RooArgSet& nset) const { | |
| // Return expected number of events for extended likelihood calculation | | // Return expected number of events for extended likelihood calculation | |
| // which is the sum of all coefficients | | // which is the sum of all coefficients | |
| return expectedEvents(&nset) ; | | return expectedEvents(&nset) ; | |
| } | | } | |
| | | | |
| const RooArgList& pdfList() const { | | const RooArgList& pdfList() const { | |
| // Return list of component p.d.fs | | // Return list of component p.d.fs | |
| | | | |
| skipping to change at line 135 | | skipping to change at line 135 | |
| mutable RooAICRegistry _codeReg ; //! Registry of component analytical i
ntegration codes | | mutable RooAICRegistry _codeReg ; //! Registry of component analytical i
ntegration codes | |
| | | | |
| RooListProxy _pdfList ; // List of component PDFs | | RooListProxy _pdfList ; // List of component PDFs | |
| RooListProxy _coefList ; // List of coefficients | | RooListProxy _coefList ; // List of coefficients | |
| mutable RooArgList* _snormList ; //! List of supplemental normalization
factors | | mutable RooArgList* _snormList ; //! List of supplemental normalization
factors | |
| TIterator* _pdfIter ; //! Iterator over PDF list | | TIterator* _pdfIter ; //! Iterator over PDF list | |
| TIterator* _coefIter ; //! Iterator over coefficient list | | TIterator* _coefIter ; //! Iterator over coefficient list | |
| | | | |
| Bool_t _haveLastCoef ; // Flag indicating if last PDFs coefficient wa
s supplied in the ctor | | Bool_t _haveLastCoef ; // Flag indicating if last PDFs coefficient wa
s supplied in the ctor | |
| Bool_t _allExtendable ; // Flag indicating if all PDF components are e
xtendable | | Bool_t _allExtendable ; // Flag indicating if all PDF components are e
xtendable | |
|
| | | Bool_t _recursive ; // Flag indicating is fractions are treated re
cursively | |
| | | | |
| mutable Int_t _coefErrCount ; //! Coefficient error counter | | mutable Int_t _coefErrCount ; //! Coefficient error counter | |
| | | | |
| private: | | private: | |
| | | | |
|
| ClassDef(RooAddPdf,2) // PDF representing a sum of PDFs | | ClassDef(RooAddPdf,3) // PDF representing a sum of PDFs | |
| }; | | }; | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 3 change blocks. |
| 2 lines changed or deleted | | 3 lines changed or added | |
|
| RooBinIntegrator.h | | RooBinIntegrator.h | |
| /**************************************************************************
*** | | /**************************************************************************
*** | |
| * Project: RooFit
* | | * Project: RooFit
* | |
| * Package: RooFitCore
* | | * Package: RooFitCore
* | |
|
| * File: $Id: RooBinIntegrator.h 42153 2011-11-21 21:33:20Z wouter $ | | * File: $Id: RooBinIntegrator.h 42987 2012-02-13 19:56:24Z wouter $ | |
| * Authors:
* | | * Authors:
* | |
| * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu
* | | * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu
* | |
| * DK, David Kirkby, UC Irvine, dkirkby@uci.edu
* | | * DK, David Kirkby, UC Irvine, dkirkby@uci.edu
* | |
| *
* | | *
* | |
| * Copyright (c) 2000-2005, Regents of the University of California
* | | * Copyright (c) 2000-2005, Regents of the University of California
* | |
| * and Stanford University. All rights reserved.
* | | * and Stanford University. All rights reserved.
* | |
| *
* | | *
* | |
| * Redistribution and use in source and binary forms,
* | | * Redistribution and use in source and binary forms,
* | |
| * with or without modification, are permitted according to the terms
* | | * with or without modification, are permitted according to the terms
* | |
| * listed in LICENSE (http://roofit.sourceforge.net/license.txt)
* | | * listed in LICENSE (http://roofit.sourceforge.net/license.txt)
* | |
| | | | |
| skipping to change at line 51 | | skipping to change at line 51 | |
| | | | |
| virtual Bool_t canIntegrate1D() const { return kTRUE ; } | | virtual Bool_t canIntegrate1D() const { return kTRUE ; } | |
| virtual Bool_t canIntegrate2D() const { return kTRUE ; } | | virtual Bool_t canIntegrate2D() const { return kTRUE ; } | |
| virtual Bool_t canIntegrateND() const { return kTRUE ; } | | virtual Bool_t canIntegrateND() const { return kTRUE ; } | |
| virtual Bool_t canIntegrateOpenEnded() const { return kFALSE ; } | | virtual Bool_t canIntegrateOpenEnded() const { return kFALSE ; } | |
| | | | |
| protected: | | protected: | |
| | | | |
| friend class RooNumIntFactory ; | | friend class RooNumIntFactory ; | |
| static void registerIntegrator(RooNumIntFactory& fact) ; | | static void registerIntegrator(RooNumIntFactory& fact) ; | |
|
| | | RooBinIntegrator(const RooBinIntegrator&) ; | |
| | | | |
| // Numerical integrator workspace | | // Numerical integrator workspace | |
| mutable std::vector<Double_t> _xmin; //! Lower integration bound | | mutable std::vector<Double_t> _xmin; //! Lower integration bound | |
| mutable std::vector<Double_t> _xmax; //! Upper integration bound | | mutable std::vector<Double_t> _xmax; //! Upper integration bound | |
| std::vector<std::list<Double_t>*> _binb ; //! list of bin boundaries | | std::vector<std::list<Double_t>*> _binb ; //! list of bin boundaries | |
| mutable Int_t _numBins; //! Size of integration range | | mutable Int_t _numBins; //! Size of integration range | |
| | | | |
| Bool_t _useIntegrandLimits; // If true limits of function binding are ue
d | | Bool_t _useIntegrandLimits; // If true limits of function binding are ue
d | |
| | | | |
| Double_t* xvec(Double_t& xx) { _x[0] = xx ; return _x ; } | | Double_t* xvec(Double_t& xx) { _x[0] = xx ; return _x ; } | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 2 lines changed or added | |
|
| RooCacheManager.h | | RooCacheManager.h | |
| /**************************************************************************
*** | | /**************************************************************************
*** | |
| * Project: RooFit
* | | * Project: RooFit
* | |
| * Package: RooFitCore
* | | * Package: RooFitCore
* | |
|
| * File: $Id: RooCacheManager.h 42241 2011-11-25 13:55:30Z wouter $ | | * File: $Id: RooCacheManager.h 42987 2012-02-13 19:56:24Z wouter $ | |
| * Authors:
* | | * Authors:
* | |
| * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu
* | | * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu
* | |
| * DK, David Kirkby, UC Irvine, dkirkby@uci.edu
* | | * DK, David Kirkby, UC Irvine, dkirkby@uci.edu
* | |
| *
* | | *
* | |
| * Copyright (c) 2000-2005, Regents of the University of California
* | | * Copyright (c) 2000-2005, Regents of the University of California
* | |
| * and Stanford University. All rights reserved.
* | | * and Stanford University. All rights reserved.
* | |
| *
* | | *
* | |
| * Redistribution and use in source and binary forms,
* | | * Redistribution and use in source and binary forms,
* | |
| * with or without modification, are permitted according to the terms
* | | * with or without modification, are permitted according to the terms
* | |
| * listed in LICENSE (http://roofit.sourceforge.net/license.txt)
* | | * listed in LICENSE (http://roofit.sourceforge.net/license.txt)
* | |
| | | | |
| skipping to change at line 55 | | skipping to change at line 55 | |
| // Getter function without integration set | | // Getter function without integration set | |
| return getObj(nset,0,sterileIndex,isetRangeName) ; | | return getObj(nset,0,sterileIndex,isetRangeName) ; | |
| } | | } | |
| | | | |
| Int_t setObj(const RooArgSet* nset, T* obj, const TNamed* isetRangeName=0
) { | | Int_t setObj(const RooArgSet* nset, T* obj, const TNamed* isetRangeName=0
) { | |
| // Setter function without integration set | | // Setter function without integration set | |
| return setObj(nset,0,obj,isetRangeName) ; | | return setObj(nset,0,obj,isetRangeName) ; | |
| } | | } | |
| | | | |
| inline T* getObj(const RooArgSet* nset, const RooArgSet* iset, Int_t* ste
rileIdx, const char* isetRangeName) { | | inline T* getObj(const RooArgSet* nset, const RooArgSet* iset, Int_t* ste
rileIdx, const char* isetRangeName) { | |
|
| if (_wired) return *_object ; | | if (_wired) return _object[0] ; | |
| return getObj(nset,iset,sterileIdx,RooNameReg::ptr(isetRangeName)) ; | | return getObj(nset,iset,sterileIdx,RooNameReg::ptr(isetRangeName)) ; | |
| } | | } | |
| | | | |
| T* getObj(const RooArgSet* nset, const RooArgSet* iset, Int_t* sterileInd
ex=0, const TNamed* isetRangeName=0) ; | | T* getObj(const RooArgSet* nset, const RooArgSet* iset, Int_t* sterileInd
ex=0, const TNamed* isetRangeName=0) ; | |
| Int_t setObj(const RooArgSet* nset, const RooArgSet* iset, T* obj, const
TNamed* isetRangeName=0) ; | | Int_t setObj(const RooArgSet* nset, const RooArgSet* iset, T* obj, const
TNamed* isetRangeName=0) ; | |
| | | | |
| void reset() ; | | void reset() ; | |
| virtual void sterilize() ; | | virtual void sterilize() ; | |
| | | | |
| Int_t lastIndex() const { | | Int_t lastIndex() const { | |
| | | | |
| skipping to change at line 111 | | skipping to change at line 111 | |
| oocoutI(_owner,Optimization) << "RooCacheManager::wireCache(" << _own
er->GetName() << ") cache cannot be wired because it contains more than one
element" << endl ; | | oocoutI(_owner,Optimization) << "RooCacheManager::wireCache(" << _own
er->GetName() << ") cache cannot be wired because it contains more than one
element" << endl ; | |
| } | | } | |
| } | | } | |
| | | | |
| protected: | | protected: | |
| | | | |
| Int_t _maxSize ; // Maximum size | | Int_t _maxSize ; // Maximum size | |
| Int_t _size ; // Actual use | | Int_t _size ; // Actual use | |
| Int_t _lastIndex ; // Last slot accessed | | Int_t _lastIndex ; // Last slot accessed | |
| | | | |
|
| RooNormSetCache* _nsetCache ; //! Normalization/Integration set manager | | std::vector<RooNormSetCache> _nsetCache ; //! Normalization/Integration s | |
| T** _object ; //! Payload | | et manager | |
| | | std::vector<T*> _object ; //! Payload | |
| Bool_t _wired ; //! In wired mode, there is a single payloa
d which is returned always | | Bool_t _wired ; //! In wired mode, there is a single payloa
d which is returned always | |
| | | | |
| ClassDef(RooCacheManager,1) // Cache Manager class generic objects | | ClassDef(RooCacheManager,1) // Cache Manager class generic objects | |
| } ; | | } ; | |
| | | | |
| template<class T> | | template<class T> | |
| RooCacheManager<T>::RooCacheManager(Int_t maxSize) : RooAbsCache(0) | | RooCacheManager<T>::RooCacheManager(Int_t maxSize) : RooAbsCache(0) | |
| { | | { | |
| // Constructor for simple caches without RooAbsArg payload. A cache | | // Constructor for simple caches without RooAbsArg payload. A cache | |
| // made with this constructor is not registered with its owner | | // made with this constructor is not registered with its owner | |
| // and will not receive information on server redirects and | | // and will not receive information on server redirects and | |
| // cache operation mode changes | | // cache operation mode changes | |
| | | | |
| _maxSize = maxSize ; | | _maxSize = maxSize ; | |
|
| _nsetCache = new RooNormSetCache[maxSize] ; | | _nsetCache.resize(_maxSize) ; // = new RooNormSetCache[maxSize] ; | |
| _object = new T*[maxSize] ; | | _object.resize(_maxSize,0) ; // = new T*[maxSize] ; | |
| _wired = kFALSE ; | | _wired = kFALSE ; | |
| } | | } | |
| | | | |
| template<class T> | | template<class T> | |
| RooCacheManager<T>::RooCacheManager(RooAbsArg* owner, Int_t maxSize) : RooA
bsCache(owner) | | RooCacheManager<T>::RooCacheManager(RooAbsArg* owner, Int_t maxSize) : RooA
bsCache(owner) | |
| { | | { | |
| // Constructor for simple caches with RooAbsArg derived payload. A cache | | // Constructor for simple caches with RooAbsArg derived payload. A cache | |
| // made with this constructor is registered with its owner | | // made with this constructor is registered with its owner | |
| // and will receive information on server redirects and | | // and will receive information on server redirects and | |
| // cache operation mode changes | | // cache operation mode changes | |
| | | | |
| _maxSize = maxSize ; | | _maxSize = maxSize ; | |
| _size = 0 ; | | _size = 0 ; | |
| | | | |
|
| _nsetCache = new RooNormSetCache[maxSize] ; | | _nsetCache.resize(_maxSize) ; // = new RooNormSetCache[maxSize] ; | |
| _object = new T*[maxSize] ; | | _object.resize(_maxSize,0) ; // = new T*[maxSize] ; | |
| _wired = kFALSE ; | | _wired = kFALSE ; | |
| _lastIndex = -1 ; | | _lastIndex = -1 ; | |
| | | | |
| Int_t i ; | | Int_t i ; | |
| for (i=0 ; i<_maxSize ; i++) { | | for (i=0 ; i<_maxSize ; i++) { | |
| _object[i]=0 ; | | _object[i]=0 ; | |
| } | | } | |
| | | | |
| } | | } | |
| | | | |
| template<class T> | | template<class T> | |
| RooCacheManager<T>::RooCacheManager(const RooCacheManager& other, RooAbsArg
* owner) : RooAbsCache(other,owner) | | RooCacheManager<T>::RooCacheManager(const RooCacheManager& other, RooAbsArg
* owner) : RooAbsCache(other,owner) | |
| { | | { | |
| // Copy constructor | | // Copy constructor | |
| | | | |
| _maxSize = other._maxSize ; | | _maxSize = other._maxSize ; | |
| _size = other._size ; | | _size = other._size ; | |
| | | | |
|
| _nsetCache = new RooNormSetCache[_maxSize] ; | | _nsetCache.resize(_maxSize) ; // = new RooNormSetCache[_maxSize] ; | |
| _object = new T*[_maxSize] ; | | _object.resize(_maxSize,0) ; // = new T*[_maxSize] ; | |
| _wired = kFALSE ; | | _wired = kFALSE ; | |
| _lastIndex = -1 ; | | _lastIndex = -1 ; | |
| | | | |
| // cout << "RooCacheManager:cctor(" << this << ")" << endl ; | | // cout << "RooCacheManager:cctor(" << this << ")" << endl ; | |
| | | | |
| Int_t i ; | | Int_t i ; | |
| for (i=0 ; i<other._size ; i++) { | | for (i=0 ; i<other._size ; i++) { | |
| _nsetCache[i].initialize(other._nsetCache[i]) ; | | _nsetCache[i].initialize(other._nsetCache[i]) ; | |
| _object[i] = 0 ; | | _object[i] = 0 ; | |
| } | | } | |
| | | | |
| skipping to change at line 186 | | skipping to change at line 186 | |
| for (i=other._size ; i<_maxSize ; i++) { | | for (i=other._size ; i<_maxSize ; i++) { | |
| _object[i] = 0 ; | | _object[i] = 0 ; | |
| } | | } | |
| } | | } | |
| | | | |
| template<class T> | | template<class T> | |
| RooCacheManager<T>::~RooCacheManager() | | RooCacheManager<T>::~RooCacheManager() | |
| { | | { | |
| // Destructor | | // Destructor | |
| | | | |
|
| delete[] _nsetCache ; | | //delete[] _nsetCache ; | |
| Int_t i ; | | Int_t i ; | |
| for (i=0 ; i<_size ; i++) { | | for (i=0 ; i<_size ; i++) { | |
| delete _object[i] ; | | delete _object[i] ; | |
| } | | } | |
|
| delete[] _object ; | | //delete[] _object ; | |
| } | | } | |
| | | | |
| template<class T> | | template<class T> | |
| void RooCacheManager<T>::reset() | | void RooCacheManager<T>::reset() | |
| { | | { | |
| // Clear the cache | | // Clear the cache | |
| | | | |
| Int_t i ; | | Int_t i ; | |
| for (i=0 ; i<_maxSize ; i++) { | | for (i=0 ; i<_maxSize ; i++) { | |
| delete _object[i] ; | | delete _object[i] ; | |
| | | | |
| skipping to change at line 244 | | skipping to change at line 244 | |
| // Found sterile slot that can should be recycled [ sterileIndex only s
et if isetRangeName matches ] | | // Found sterile slot that can should be recycled [ sterileIndex only s
et if isetRangeName matches ] | |
| _object[sterileIdx] = obj ; | | _object[sterileIdx] = obj ; | |
| | | | |
| // Allow optional post-processing of object inserted in cache | | // Allow optional post-processing of object inserted in cache | |
| insertObjectHook(*obj) ; | | insertObjectHook(*obj) ; | |
| | | | |
| return lastIndex() ; | | return lastIndex() ; | |
| } | | } | |
| | | | |
| if (_size==_maxSize) { | | if (_size==_maxSize) { | |
|
| return -1 ; | | _maxSize *=2 ; | |
| | | _object.resize(_maxSize,0) ; | |
| | | _nsetCache.resize(_maxSize) ; | |
| } | | } | |
| | | | |
| _nsetCache[_size].autoCache(_owner,nset,iset,isetRangeName,kTRUE) ; | | _nsetCache[_size].autoCache(_owner,nset,iset,isetRangeName,kTRUE) ; | |
| if (_object[_size]) { | | if (_object[_size]) { | |
| delete _object[_size] ; | | delete _object[_size] ; | |
| } | | } | |
| | | | |
| _object[_size] = obj ; | | _object[_size] = obj ; | |
| _size++ ; | | _size++ ; | |
| | | | |
| | | | |
| skipping to change at line 273 | | skipping to change at line 275 | |
| | | | |
| template<class T> | | template<class T> | |
| T* RooCacheManager<T>::getObj(const RooArgSet* nset, const RooArgSet* iset,
Int_t* sterileIdx, const TNamed* isetRangeName) | | T* RooCacheManager<T>::getObj(const RooArgSet* nset, const RooArgSet* iset,
Int_t* sterileIdx, const TNamed* isetRangeName) | |
| { | | { | |
| // Retrieve payload object indexed on nset,uset amd isetRangeName | | // Retrieve payload object indexed on nset,uset amd isetRangeName | |
| // If sterileIdx is not null, it is set to the index of the sterile | | // If sterileIdx is not null, it is set to the index of the sterile | |
| // slot in cacse such a slot is recycled | | // slot in cacse such a slot is recycled | |
| | | | |
| // Fast-track for wired mode | | // Fast-track for wired mode | |
| if (_wired) { | | if (_wired) { | |
|
| if(*_object==0 && sterileIdx) *sterileIdx=0 ; | | if(_object[0]==0 && sterileIdx) *sterileIdx=0 ; | |
| return *_object ; | | return _object[0] ; | |
| } | | } | |
| | | | |
| Int_t i ; | | Int_t i ; | |
| for (i=0 ; i<_size ; i++) { | | for (i=0 ; i<_size ; i++) { | |
| if (_nsetCache[i].contains(nset,iset,isetRangeName)==kTRUE) { | | if (_nsetCache[i].contains(nset,iset,isetRangeName)==kTRUE) { | |
| _lastIndex = i ; | | _lastIndex = i ; | |
| if(_object[i]==0 && sterileIdx) *sterileIdx=i ; | | if(_object[i]==0 && sterileIdx) *sterileIdx=i ; | |
| return _object[i] ; | | return _object[i] ; | |
| } | | } | |
| } | | } | |
| | | | |
End of changes. 10 change blocks. |
| 15 lines changed or deleted | | 18 lines changed or added | |
|
| RooCompositeDataStore.h | | RooCompositeDataStore.h | |
| /**************************************************************************
*** | | /**************************************************************************
*** | |
| * Project: RooFit
* | | * Project: RooFit
* | |
| * Package: RooFitCore
* | | * Package: RooFitCore
* | |
|
| * File: $Id: RooCompositeDataStore.h 42179 2011-11-22 22:03:01Z wouter
$ | | * File: $Id: RooCompositeDataStore.h 42987 2012-02-13 19:56:24Z wouter
$ | |
| * Authors:
* | | * Authors:
* | |
| * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu
* | | * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu
* | |
| * DK, David Kirkby, UC Irvine, dkirkby@uci.edu
* | | * DK, David Kirkby, UC Irvine, dkirkby@uci.edu
* | |
| *
* | | *
* | |
| * Copyright (c) 2000-2005, Regents of the University of California
* | | * Copyright (c) 2000-2005, Regents of the University of California
* | |
| * and Stanford University. All rights reserved.
* | | * and Stanford University. All rights reserved.
* | |
| *
* | | *
* | |
| * Redistribution and use in source and binary forms,
* | | * Redistribution and use in source and binary forms,
* | |
| * with or without modification, are permitted according to the terms
* | | * with or without modification, are permitted according to the terms
* | |
| * listed in LICENSE (http://roofit.sourceforge.net/license.txt)
* | | * listed in LICENSE (http://roofit.sourceforge.net/license.txt)
* | |
| | | | |
| skipping to change at line 92 | | skipping to change at line 92 | |
| // Buffer redirection routines used in inside RooAbsOptTestStatistics | | // Buffer redirection routines used in inside RooAbsOptTestStatistics | |
| virtual void attachBuffers(const RooArgSet& extObs) ; | | virtual void attachBuffers(const RooArgSet& extObs) ; | |
| virtual void resetBuffers() ; | | virtual void resetBuffers() ; | |
| | | | |
| // Constant term optimizer interface | | // Constant term optimizer interface | |
| virtual void cacheArgs(const RooAbsArg* owner, RooArgSet& varSet, const R
ooArgSet* nset=0) ; | | virtual void cacheArgs(const RooAbsArg* owner, RooArgSet& varSet, const R
ooArgSet* nset=0) ; | |
| virtual const RooAbsArg* cacheOwner() { return 0 ; } | | virtual const RooAbsArg* cacheOwner() { return 0 ; } | |
| virtual void setArgStatus(const RooArgSet& set, Bool_t active) ; | | virtual void setArgStatus(const RooArgSet& set, Bool_t active) ; | |
| virtual void resetCache() ; | | virtual void resetCache() ; | |
| | | | |
|
| | | virtual void recalculateCache(const RooArgSet* /*proj*/, Int_t /*firstEve | |
| | | nt*/, Int_t /*lastEvent*/, Int_t /*stepSize*/) ; | |
| | | | |
| void loadValues(const RooAbsDataStore *tds, const RooFormulaVar* select=0
, const char* rangeName=0, Int_t nStart=0, Int_t nStop=2000000000) ; | | void loadValues(const RooAbsDataStore *tds, const RooFormulaVar* select=0
, const char* rangeName=0, Int_t nStart=0, Int_t nStop=2000000000) ; | |
| | | | |
| protected: | | protected: | |
| | | | |
| void attachCache(const RooAbsArg* newOwner, const RooArgSet& cachedVars)
; | | void attachCache(const RooAbsArg* newOwner, const RooArgSet& cachedVars)
; | |
| | | | |
| std::map<Int_t,RooAbsDataStore*> _dataMap ; | | std::map<Int_t,RooAbsDataStore*> _dataMap ; | |
| RooCategory* _indexCat ; | | RooCategory* _indexCat ; | |
| mutable RooAbsDataStore* _curStore ; //! Datastore associated with curren
t event | | mutable RooAbsDataStore* _curStore ; //! Datastore associated with curren
t event | |
| mutable Int_t _curIndex ; //! Index associated with current event | | mutable Int_t _curIndex ; //! Index associated with current event | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 4 lines changed or added | |
|
| RooDataHist.h | | RooDataHist.h | |
| | | | |
| skipping to change at line 57 | | skipping to change at line 57 | |
| RooDataHist(const char *name, const char *title, const RooArgList& vars,
RooCategory& indexCat, std::map<std::string,TH1*> histMap, Double_t initWgt
=1.0) ; | | RooDataHist(const char *name, const char *title, const RooArgList& vars,
RooCategory& indexCat, std::map<std::string,TH1*> histMap, Double_t initWgt
=1.0) ; | |
| RooDataHist(const char *name, const char *title, const RooArgList& vars,
RooCategory& indexCat, std::map<std::string,RooDataHist*> dhistMap, Double_
t wgt=1.0) ; | | RooDataHist(const char *name, const char *title, const RooArgList& vars,
RooCategory& indexCat, std::map<std::string,RooDataHist*> dhistMap, Double_
t wgt=1.0) ; | |
| //RooDataHist(const char *name, const char *title, const RooArgList& vars
, Double_t initWgt=1.0) ; | | //RooDataHist(const char *name, const char *title, const RooArgList& vars
, Double_t initWgt=1.0) ; | |
| RooDataHist(const char *name, const char *title, const RooArgList& vars,
const RooCmdArg& arg1, const RooCmdArg& arg2=RooCmdArg(), const RooCmdArg&
arg3=RooCmdArg(), | | RooDataHist(const char *name, const char *title, const RooArgList& vars,
const RooCmdArg& arg1, const RooCmdArg& arg2=RooCmdArg(), const RooCmdArg&
arg3=RooCmdArg(), | |
| const RooCmdArg& arg4=RooCmdArg(),const RooCmdArg& arg5=RooCmd
Arg(),const RooCmdArg& arg6=RooCmdArg(),const RooCmdArg& arg7=RooCmdArg(),c
onst RooCmdArg& arg8=RooCmdArg()) ; | | const RooCmdArg& arg4=RooCmdArg(),const RooCmdArg& arg5=RooCmd
Arg(),const RooCmdArg& arg6=RooCmdArg(),const RooCmdArg& arg7=RooCmdArg(),c
onst RooCmdArg& arg8=RooCmdArg()) ; | |
| | | | |
| RooDataHist(const RooDataHist& other, const char* newname = 0) ; | | RooDataHist(const RooDataHist& other, const char* newname = 0) ; | |
| virtual TObject* Clone(const char* newname=0) const { return new RooDataH
ist(*this,newname?newname:GetName()) ; } | | virtual TObject* Clone(const char* newname=0) const { return new RooDataH
ist(*this,newname?newname:GetName()) ; } | |
| virtual ~RooDataHist() ; | | virtual ~RooDataHist() ; | |
| | | | |
|
| virtual RooAbsData* emptyClone(const char* newName=0, const char* newTitl
e=0, const RooArgSet*vars=0) const { | | virtual RooAbsData* emptyClone(const char* newName=0, const char* newTitl
e=0, const RooArgSet*vars=0, const char* /*wgtVarName*/=0) const { | |
| // Return empty clone of this RooDataHist | | // Return empty clone of this RooDataHist | |
| return new RooDataHist(newName?newName:GetName(),newTitle?newTitle:GetT
itle(),vars?*vars:*get()) ; | | return new RooDataHist(newName?newName:GetName(),newTitle?newTitle:GetT
itle(),vars?*vars:*get()) ; | |
| } | | } | |
| | | | |
| // Add one ore more rows of data | | // Add one ore more rows of data | |
| virtual void add(const RooArgSet& row, Double_t wgt=1.0) { | | virtual void add(const RooArgSet& row, Double_t wgt=1.0) { | |
| // Increment weight of bin enclosing coordinate stored in row by wgt | | // Increment weight of bin enclosing coordinate stored in row by wgt | |
| add(row,wgt,-1.) ; | | add(row,wgt,-1.) ; | |
| } | | } | |
| virtual void add(const RooArgSet& row, Double_t weight, Double_t sumw2) ; | | virtual void add(const RooArgSet& row, Double_t weight, Double_t sumw2) ; | |
| | | | |
| skipping to change at line 90 | | skipping to change at line 90 | |
| virtual const RooArgSet* get(const RooArgSet& coord) const ; | | virtual const RooArgSet* get(const RooArgSet& coord) const ; | |
| virtual Int_t numEntries() const ; | | virtual Int_t numEntries() const ; | |
| virtual Double_t sumEntries() const ; | | virtual Double_t sumEntries() const ; | |
| virtual Double_t sumEntries(const char* cutSpec, const char* cutRange=0)
const ; | | virtual Double_t sumEntries(const char* cutSpec, const char* cutRange=0)
const ; | |
| virtual Bool_t isWeighted() const { | | virtual Bool_t isWeighted() const { | |
| // Return true as all histograms have in principle events weight != 1 | | // Return true as all histograms have in principle events weight != 1 | |
| return kTRUE ; | | return kTRUE ; | |
| } | | } | |
| virtual Bool_t isNonPoissonWeighted() const ; | | virtual Bool_t isNonPoissonWeighted() const ; | |
| | | | |
|
| Double_t sum(Bool_t correctForBinSize) const ; | | Double_t sum(Bool_t correctForBinSize, Bool_t inverseCorr=kFALSE) const ; | |
| Double_t sum(const RooArgSet& sumSet, const RooArgSet& sliceSet, Bool_t c | | Double_t sum(const RooArgSet& sumSet, const RooArgSet& sliceSet, Bool_t c | |
| orrectForBinSize) ; | | orrectForBinSize, Bool_t inverseCorr=kFALSE) ; | |
| | | | |
| virtual Double_t weight() const { | | virtual Double_t weight() const { | |
| // Return weight of current bin | | // Return weight of current bin | |
| return _curWeight ; | | return _curWeight ; | |
| } | | } | |
| Double_t weight(const RooArgSet& bin, Int_t intOrder=1, Bool_t correctFor
BinSize=kFALSE, Bool_t cdfBoundaries=kFALSE, Bool_t oneSafe=kFALSE) ; | | Double_t weight(const RooArgSet& bin, Int_t intOrder=1, Bool_t correctFor
BinSize=kFALSE, Bool_t cdfBoundaries=kFALSE, Bool_t oneSafe=kFALSE) ; | |
| Double_t binVolume() const { return _curVolume ; } | | Double_t binVolume() const { return _curVolume ; } | |
| Double_t binVolume(const RooArgSet& bin) ; | | Double_t binVolume(const RooArgSet& bin) ; | |
| virtual Bool_t valid() const ; | | virtual Bool_t valid() const ; | |
| | | | |
| | | | |
| skipping to change at line 125 | | skipping to change at line 125 | |
| virtual void reset() ; | | virtual void reset() ; | |
| void dump2() ; | | void dump2() ; | |
| | | | |
| virtual void printMultiline(ostream& os, Int_t content, Bool_t verbose=kF
ALSE, TString indent="") const ; | | virtual void printMultiline(ostream& os, Int_t content, Bool_t verbose=kF
ALSE, TString indent="") const ; | |
| virtual void printArgs(ostream& os) const ; | | virtual void printArgs(ostream& os) const ; | |
| virtual void printValue(ostream& os) const ; | | virtual void printValue(ostream& os) const ; | |
| | | | |
| void SetName(const char *name) ; | | void SetName(const char *name) ; | |
| void SetNameTitle(const char *name, const char* title) ; | | void SetNameTitle(const char *name, const char* title) ; | |
| | | | |
|
| Int_t getIndex(const RooArgSet& coord) ; | | Int_t getIndex(const RooArgSet& coord, Bool_t fast=kFALSE) ; | |
| | | | |
| void removeSelfFromDir() { removeFromDir(this) ; } | | void removeSelfFromDir() { removeFromDir(this) ; } | |
| | | | |
| protected: | | protected: | |
| | | | |
| friend class RooAbsCachedPdf ; | | friend class RooAbsCachedPdf ; | |
| friend class RooAbsCachedReal ; | | friend class RooAbsCachedReal ; | |
| friend class RooDataHistSliceIter ; | | friend class RooDataHistSliceIter ; | |
| friend class RooAbsOptTestStatistic ; | | friend class RooAbsOptTestStatistic ; | |
| | | | |
| | | | |
End of changes. 3 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| RooDataSet.h | | RooDataSet.h | |
| | | | |
| skipping to change at line 63 | | skipping to change at line 63 | |
| // Constructor importing data from external ROOT Tree | | // Constructor importing data from external ROOT Tree | |
| RooDataSet(const char *name, const char *title, TTree *ntuple, const RooA
rgSet& vars, | | RooDataSet(const char *name, const char *title, TTree *ntuple, const RooA
rgSet& vars, | |
| const char *cuts=0, const char* wgtVarName=0); | | const char *cuts=0, const char* wgtVarName=0); | |
| RooDataSet(const char *name, const char *title, TTree *t, const RooArgSet
& vars, | | RooDataSet(const char *name, const char *title, TTree *t, const RooArgSet
& vars, | |
| const RooFormulaVar& cutVar, const char* wgtVarName=0) ; | | const RooFormulaVar& cutVar, const char* wgtVarName=0) ; | |
| | | | |
| RooDataSet(RooDataSet const & other, const char* newname=0) ; | | RooDataSet(RooDataSet const & other, const char* newname=0) ; | |
| virtual TObject* Clone(const char* newname=0) const { return new RooDataS
et(*this,newname?newname:GetName()) ; } | | virtual TObject* Clone(const char* newname=0) const { return new RooDataS
et(*this,newname?newname:GetName()) ; } | |
| virtual ~RooDataSet() ; | | virtual ~RooDataSet() ; | |
| | | | |
|
| virtual RooAbsData* emptyClone(const char* newName=0, const char* newTitl
e=0, const RooArgSet* vars=0) const ; | | virtual RooAbsData* emptyClone(const char* newName=0, const char* newTitl
e=0, const RooArgSet* vars=0, const char* wgtVarName=0) const ; | |
| | | | |
| RooDataHist* binnedClone(const char* newName=0, const char* newTitle=0) c
onst ; | | RooDataHist* binnedClone(const char* newName=0, const char* newTitle=0) c
onst ; | |
| | | | |
| virtual Double_t sumEntries() const ; | | virtual Double_t sumEntries() const ; | |
| virtual Double_t sumEntries(const char* cutSpec, const char* cutRange=0)
const ; | | virtual Double_t sumEntries(const char* cutSpec, const char* cutRange=0)
const ; | |
| | | | |
| virtual RooPlot* plotOnXY(RooPlot* frame, | | virtual RooPlot* plotOnXY(RooPlot* frame, | |
| const RooCmdArg& arg1=RooCmdArg::none(), const R
ooCmdArg& arg2=RooCmdArg::none(), | | const RooCmdArg& arg1=RooCmdArg::none(), const R
ooCmdArg& arg2=RooCmdArg::none(), | |
| const RooCmdArg& arg3=RooCmdArg::none(), const R
ooCmdArg& arg4=RooCmdArg::none(), | | const RooCmdArg& arg3=RooCmdArg::none(), const R
ooCmdArg& arg4=RooCmdArg::none(), | |
| const RooCmdArg& arg5=RooCmdArg::none(), const R
ooCmdArg& arg6=RooCmdArg::none(), | | const RooCmdArg& arg5=RooCmdArg::none(), const R
ooCmdArg& arg6=RooCmdArg::none(), | |
| | | | |
End of changes. 1 change blocks. |
| 1 lines changed or deleted | | 1 lines changed or added | |
|
| RooFunctor1DBinding.h | | RooFunctor1DBinding.h | |
| /**************************************************************************
*** | | /**************************************************************************
*** | |
| * Project: RooFit
* | | * Project: RooFit
* | |
| * Package: RooFitCore
* | | * Package: RooFitCore
* | |
|
| * File: $Id: RooFunctor1DBinding.h 28963 2009-06-12 15:47:45Z wouter $ | | * File: $Id: RooFunctor1DBinding.h 42987 2012-02-13 19:56:24Z wouter $ | |
| * Authors:
* | | * Authors:
* | |
| * WV, Wouter Verkerke, NIKHEF, verkerke@nikhef.nl
* | | * WV, Wouter Verkerke, NIKHEF, verkerke@nikhef.nl
* | |
| *
* | | *
* | |
| * Copyright (c) 2000-2008, NIKHEF, Regents of the University of California
* | | * Copyright (c) 2000-2008, NIKHEF, Regents of the University of California
* | |
| * and Stanford University. All rights reserved.
* | | * and Stanford University. All rights reserved.
* | |
| *
* | | *
* | |
| **************************************************************************
***/ | | **************************************************************************
***/ | |
| | | | |
| #ifndef ROOFUNCTOR1DBINDING | | #ifndef ROOFUNCTOR1DBINDING | |
| #define ROOFUNCTOR1DBINDING | | #define ROOFUNCTOR1DBINDING | |
| | | | |
| skipping to change at line 37 | | skipping to change at line 37 | |
| | | | |
| namespace RooFit { | | namespace RooFit { | |
| | | | |
| RooAbsReal* bindFunction(const char* name, const ROOT::Math::IBaseFunctionO
neDim& ftor, RooAbsReal& vars) ; | | RooAbsReal* bindFunction(const char* name, const ROOT::Math::IBaseFunctionO
neDim& ftor, RooAbsReal& vars) ; | |
| RooAbsPdf* bindPdf(const char* name, const ROOT::Math::IBaseFunctionOneDim
& ftor, RooAbsReal& vars) ; | | RooAbsPdf* bindPdf(const char* name, const ROOT::Math::IBaseFunctionOneDim
& ftor, RooAbsReal& vars) ; | |
| | | | |
| } | | } | |
| | | | |
| class RooFunctor1DBinding : public RooAbsReal { | | class RooFunctor1DBinding : public RooAbsReal { | |
| public: | | public: | |
|
| RooFunctor1DBinding() { | | RooFunctor1DBinding() : func(0) { | |
| // Default constructor | | // Default constructor | |
| } ; | | } ; | |
| RooFunctor1DBinding(const char *name, const char *title, const ROOT::Math
::IBaseFunctionOneDim& ftor, RooAbsReal& var); | | RooFunctor1DBinding(const char *name, const char *title, const ROOT::Math
::IBaseFunctionOneDim& ftor, RooAbsReal& var); | |
| RooFunctor1DBinding(const RooFunctor1DBinding& other, const char* name=0)
; | | RooFunctor1DBinding(const RooFunctor1DBinding& other, const char* name=0)
; | |
| virtual TObject* clone(const char* newname) const { return new RooFunctor
1DBinding(*this,newname); } | | virtual TObject* clone(const char* newname) const { return new RooFunctor
1DBinding(*this,newname); } | |
| inline virtual ~RooFunctor1DBinding() {} | | inline virtual ~RooFunctor1DBinding() {} | |
| void printArgs(ostream& os) const ; | | void printArgs(ostream& os) const ; | |
| | | | |
| protected: | | protected: | |
| | | | |
| | | | |
| skipping to change at line 60 | | skipping to change at line 60 | |
| const ROOT::Math::IBaseFunctionOneDim* func ; // Functor | | const ROOT::Math::IBaseFunctionOneDim* func ; // Functor | |
| RooRealProxy var ; // Argument reference | | RooRealProxy var ; // Argument reference | |
| | | | |
| private: | | private: | |
| | | | |
| ClassDef(RooFunctor1DBinding,1) // RooAbsReal binding to a ROOT::Math::IB
aseFunctionOneDim | | ClassDef(RooFunctor1DBinding,1) // RooAbsReal binding to a ROOT::Math::IB
aseFunctionOneDim | |
| }; | | }; | |
| | | | |
| class RooFunctor1DPdfBinding : public RooAbsPdf { | | class RooFunctor1DPdfBinding : public RooAbsPdf { | |
| public: | | public: | |
|
| RooFunctor1DPdfBinding() { | | RooFunctor1DPdfBinding() : func(0) { | |
| // Default constructor | | // Default constructor | |
| } ; | | } ; | |
| RooFunctor1DPdfBinding(const char *name, const char *title, const ROOT::M
ath::IBaseFunctionOneDim& ftor, RooAbsReal& vars); | | RooFunctor1DPdfBinding(const char *name, const char *title, const ROOT::M
ath::IBaseFunctionOneDim& ftor, RooAbsReal& vars); | |
| RooFunctor1DPdfBinding(const RooFunctor1DPdfBinding& other, const char* n
ame=0) ; | | RooFunctor1DPdfBinding(const RooFunctor1DPdfBinding& other, const char* n
ame=0) ; | |
| virtual TObject* clone(const char* newname) const { return new RooFunctor
1DPdfBinding(*this,newname); } | | virtual TObject* clone(const char* newname) const { return new RooFunctor
1DPdfBinding(*this,newname); } | |
| inline virtual ~RooFunctor1DPdfBinding() {} | | inline virtual ~RooFunctor1DPdfBinding() {} | |
| void printArgs(ostream& os) const ; | | void printArgs(ostream& os) const ; | |
| | | | |
| protected: | | protected: | |
| | | | |
| | | | |
End of changes. 3 change blocks. |
| 3 lines changed or deleted | | 3 lines changed or added | |
|
| RooFunctorBinding.h | | RooFunctorBinding.h | |
| /**************************************************************************
*** | | /**************************************************************************
*** | |
| * Project: RooFit
* | | * Project: RooFit
* | |
| * Package: RooFitCore
* | | * Package: RooFitCore
* | |
|
| * File: $Id: RooFunctorBinding.h 28963 2009-06-12 15:47:45Z wouter $ | | * File: $Id: RooFunctorBinding.h 42987 2012-02-13 19:56:24Z wouter $ | |
| * Authors:
* | | * Authors:
* | |
| * WV, Wouter Verkerke, NIKHEF, verkerke@nikhef.nl
* | | * WV, Wouter Verkerke, NIKHEF, verkerke@nikhef.nl
* | |
| *
* | | *
* | |
| * Copyright (c) 2000-2008, NIKHEF, Regents of the University of California
* | | * Copyright (c) 2000-2008, NIKHEF, Regents of the University of California
* | |
| * and Stanford University. All rights reserved.
* | | * and Stanford University. All rights reserved.
* | |
| *
* | | *
* | |
| **************************************************************************
***/ | | **************************************************************************
***/ | |
| | | | |
| #ifndef ROOFUNCTORBINDING | | #ifndef ROOFUNCTORBINDING | |
| #define ROOFUNCTORBINDING | | #define ROOFUNCTORBINDING | |
| | | | |
| skipping to change at line 37 | | skipping to change at line 37 | |
| | | | |
| namespace RooFit { | | namespace RooFit { | |
| | | | |
| RooAbsReal* bindFunction(const char* name, const ROOT::Math::IBaseFunctionM
ultiDim& ftor,const RooArgList& vars) ; | | RooAbsReal* bindFunction(const char* name, const ROOT::Math::IBaseFunctionM
ultiDim& ftor,const RooArgList& vars) ; | |
| RooAbsPdf* bindPdf(const char* name, const ROOT::Math::IBaseFunctionMultiD
im& ftor, const RooArgList& vars) ; | | RooAbsPdf* bindPdf(const char* name, const ROOT::Math::IBaseFunctionMultiD
im& ftor, const RooArgList& vars) ; | |
| | | | |
| } | | } | |
| | | | |
| class RooFunctorBinding : public RooAbsReal { | | class RooFunctorBinding : public RooAbsReal { | |
| public: | | public: | |
|
| RooFunctorBinding() : x(0) { | | RooFunctorBinding() : func(0), x(0) { | |
| // Default constructor | | // Default constructor | |
| } ; | | } ; | |
| RooFunctorBinding(const char *name, const char *title, const ROOT::Math::
IBaseFunctionMultiDim& ftor, const RooArgList& vars); | | RooFunctorBinding(const char *name, const char *title, const ROOT::Math::
IBaseFunctionMultiDim& ftor, const RooArgList& vars); | |
| RooFunctorBinding(const RooFunctorBinding& other, const char* name=0) ; | | RooFunctorBinding(const RooFunctorBinding& other, const char* name=0) ; | |
| virtual TObject* clone(const char* newname) const { return new RooFunctor
Binding(*this,newname); } | | virtual TObject* clone(const char* newname) const { return new RooFunctor
Binding(*this,newname); } | |
| inline virtual ~RooFunctorBinding() { delete[] x ; } | | inline virtual ~RooFunctorBinding() { delete[] x ; } | |
| void printArgs(ostream& os) const ; | | void printArgs(ostream& os) const ; | |
| | | | |
| protected: | | protected: | |
| | | | |
| | | | |
| skipping to change at line 61 | | skipping to change at line 61 | |
| RooListProxy vars ; // Argument reference | | RooListProxy vars ; // Argument reference | |
| Double_t* x ; // Argument value array | | Double_t* x ; // Argument value array | |
| | | | |
| private: | | private: | |
| | | | |
| ClassDef(RooFunctorBinding,1) // RooAbsReal binding to a ROOT::Math::IBas
eFunctionMultiDim | | ClassDef(RooFunctorBinding,1) // RooAbsReal binding to a ROOT::Math::IBas
eFunctionMultiDim | |
| }; | | }; | |
| | | | |
| class RooFunctorPdfBinding : public RooAbsPdf { | | class RooFunctorPdfBinding : public RooAbsPdf { | |
| public: | | public: | |
|
| RooFunctorPdfBinding() : x(0) { | | RooFunctorPdfBinding() : func(0), x(0) { | |
| // Default constructor | | // Default constructor | |
| } ; | | } ; | |
| RooFunctorPdfBinding(const char *name, const char *title, const ROOT::Mat
h::IBaseFunctionMultiDim& ftor, const RooArgList& vars); | | RooFunctorPdfBinding(const char *name, const char *title, const ROOT::Mat
h::IBaseFunctionMultiDim& ftor, const RooArgList& vars); | |
| RooFunctorPdfBinding(const RooFunctorPdfBinding& other, const char* name=
0) ; | | RooFunctorPdfBinding(const RooFunctorPdfBinding& other, const char* name=
0) ; | |
| virtual TObject* clone(const char* newname) const { return new RooFunctor
PdfBinding(*this,newname); } | | virtual TObject* clone(const char* newname) const { return new RooFunctor
PdfBinding(*this,newname); } | |
| inline virtual ~RooFunctorPdfBinding() { delete[] x ; } | | inline virtual ~RooFunctorPdfBinding() { delete[] x ; } | |
| void printArgs(ostream& os) const ; | | void printArgs(ostream& os) const ; | |
| | | | |
| protected: | | protected: | |
| | | | |
| | | | |
End of changes. 3 change blocks. |
| 3 lines changed or deleted | | 3 lines changed or added | |
|
| RooHistFunc.h | | RooHistFunc.h | |
| /**************************************************************************
*** | | /**************************************************************************
*** | |
| * Project: RooFit
* | | * Project: RooFit
* | |
| * Package: RooFitCore
* | | * Package: RooFitCore
* | |
|
| * File: $Id: RooHistFunc.h 42232 2011-11-24 23:23:30Z wouter $ | | * File: $Id: RooHistFunc.h 42987 2012-02-13 19:56:24Z wouter $ | |
| * Authors:
* | | * Authors:
* | |
| * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu
* | | * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu
* | |
| * DK, David Kirkby, UC Irvine, dkirkby@uci.edu
* | | * DK, David Kirkby, UC Irvine, dkirkby@uci.edu
* | |
| *
* | | *
* | |
| * Copyright (c) 2000-2005, Regents of the University of California
* | | * Copyright (c) 2000-2005, Regents of the University of California
* | |
| * and Stanford University. All rights reserved.
* | | * and Stanford University. All rights reserved.
* | |
| *
* | | *
* | |
| * Redistribution and use in source and binary forms,
* | | * Redistribution and use in source and binary forms,
* | |
| * with or without modification, are permitted according to the terms
* | | * with or without modification, are permitted according to the terms
* | |
| * listed in LICENSE (http://roofit.sourceforge.net/license.txt)
* | | * listed in LICENSE (http://roofit.sourceforge.net/license.txt)
* | |
| | | | |
| skipping to change at line 68 | | skipping to change at line 68 | |
| void setCdfBoundaries(Bool_t flag) { | | void setCdfBoundaries(Bool_t flag) { | |
| // Set use of special boundary conditions for c.d.f.s | | // Set use of special boundary conditions for c.d.f.s | |
| _cdfBoundaries = flag ; | | _cdfBoundaries = flag ; | |
| } | | } | |
| | | | |
| Bool_t getCdfBoundaries() const { | | Bool_t getCdfBoundaries() const { | |
| // If true, special boundary conditions for c.d.f.s are used | | // If true, special boundary conditions for c.d.f.s are used | |
| return _cdfBoundaries ; | | return _cdfBoundaries ; | |
| } | | } | |
| | | | |
|
| | | virtual Int_t getMaxVal(const RooArgSet& vars) const; | |
| | | virtual Double_t maxVal(Int_t code) const; | |
| | | | |
| virtual std::list<Double_t>* binBoundaries(RooAbsRealLValue& /*obs*/, Dou
ble_t /*xlo*/, Double_t /*xhi*/) const ; | | virtual std::list<Double_t>* binBoundaries(RooAbsRealLValue& /*obs*/, Dou
ble_t /*xlo*/, Double_t /*xhi*/) const ; | |
| virtual std::list<Double_t>* plotSamplingHint(RooAbsRealLValue& obs, Doub
le_t xlo, Double_t xhi) const ; | | virtual std::list<Double_t>* plotSamplingHint(RooAbsRealLValue& obs, Doub
le_t xlo, Double_t xhi) const ; | |
| virtual Bool_t isBinnedDistribution(const RooArgSet&) const { return _int
Order==0 ; } | | virtual Bool_t isBinnedDistribution(const RooArgSet&) const { return _int
Order==0 ; } | |
| | | | |
| protected: | | protected: | |
| | | | |
| Double_t evaluate() const; | | Double_t evaluate() const; | |
| Double_t totalVolume() const ; | | Double_t totalVolume() const ; | |
| friend class RooAbsCachedReal ; | | friend class RooAbsCachedReal ; | |
| Double_t totVolume() const ; | | Double_t totVolume() const ; | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 4 lines changed or added | |
|
| RooRealMPFE.h | | RooRealMPFE.h | |
| | | | |
| skipping to change at line 41 | | skipping to change at line 41 | |
| RooRealMPFE(const RooRealMPFE& other, const char* name=0); | | RooRealMPFE(const RooRealMPFE& other, const char* name=0); | |
| virtual TObject* clone(const char* newname) const { return new RooRealMPF
E(*this,newname); } | | virtual TObject* clone(const char* newname) const { return new RooRealMPF
E(*this,newname); } | |
| virtual ~RooRealMPFE(); | | virtual ~RooRealMPFE(); | |
| | | | |
| void calculate() const ; | | void calculate() const ; | |
| virtual Double_t getValV(const RooArgSet* nset=0) const ; | | virtual Double_t getValV(const RooArgSet* nset=0) const ; | |
| void standby() ; | | void standby() ; | |
| | | | |
| void setVerbose(Bool_t clientFlag=kTRUE, Bool_t serverFlag=kTRUE) ; | | void setVerbose(Bool_t clientFlag=kTRUE, Bool_t serverFlag=kTRUE) ; | |
| | | | |
|
| | | void applyNLLWeightSquared(Bool_t flag) ; | |
| | | | |
| protected: | | protected: | |
| | | | |
| // Function evaluation | | // Function evaluation | |
| virtual Double_t evaluate() const ; | | virtual Double_t evaluate() const ; | |
| friend class RooAbsTestStatistic ; | | friend class RooAbsTestStatistic ; | |
| virtual void constOptimizeTestStatistic(ConstOpCode opcode, Bool_t doAlso
Tracking=kTRUE) ; | | virtual void constOptimizeTestStatistic(ConstOpCode opcode, Bool_t doAlso
Tracking=kTRUE) ; | |
| | | | |
| enum State { Initialize,Client,Server,Inline } ; | | enum State { Initialize,Client,Server,Inline } ; | |
| State _state ; | | State _state ; | |
| | | | |
| enum Message { SendReal=0, SendCat=1, Calculate=2, Retrieve=3, ReturnValu
e=4, Terminate=5, | | enum Message { SendReal=0, SendCat=1, Calculate=2, Retrieve=3, ReturnValu
e=4, Terminate=5, | |
|
| ConstOpt=6, Verbose=7, RetrieveErrors=8, SendError=9, LogEv
alError=10 } ; | | ConstOpt=6, Verbose=7, RetrieveErrors=8, SendError=9, LogEv
alError=10, ApplyNLLW2=11 } ; | |
| | | | |
| void initialize() ; | | void initialize() ; | |
| void initVars() ; | | void initVars() ; | |
| void serverLoop() ; | | void serverLoop() ; | |
| | | | |
|
| | | void doApplyNLLW2(Bool_t flag) ; | |
| | | | |
| RooRealProxy _arg ; // Function to calculate in parallel process | | RooRealProxy _arg ; // Function to calculate in parallel process | |
| | | | |
| RooListProxy _vars ; // Variables | | RooListProxy _vars ; // Variables | |
| RooArgList _saveVars ; // Copy of variables | | RooArgList _saveVars ; // Copy of variables | |
| mutable Bool_t _calcInProgress ; | | mutable Bool_t _calcInProgress ; | |
| Bool_t _verboseClient ; | | Bool_t _verboseClient ; | |
| Bool_t _verboseServer ; | | Bool_t _verboseServer ; | |
| Bool_t _inlineMode ; | | Bool_t _inlineMode ; | |
| mutable Bool_t _forceCalc ; | | mutable Bool_t _forceCalc ; | |
| mutable RooAbsReal::ErrorLoggingMode _remoteEvalErrorLoggingState ; | | mutable RooAbsReal::ErrorLoggingMode _remoteEvalErrorLoggingState ; | |
| | | | |
End of changes. 3 change blocks. |
| 1 lines changed or deleted | | 5 lines changed or added | |
|
| RooVectorDataStore.h | | RooVectorDataStore.h | |
| /**************************************************************************
*** | | /**************************************************************************
*** | |
| * Project: RooFit
* | | * Project: RooFit
* | |
| * Package: RooFitCore
* | | * Package: RooFitCore
* | |
|
| * File: $Id: RooVectorDataStore.h 41998 2011-11-15 10:34:40Z moneta $ | | * File: $Id: RooVectorDataStore.h 42987 2012-02-13 19:56:24Z wouter $ | |
| * Authors:
* | | * Authors:
* | |
| * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu
* | | * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu
* | |
| * DK, David Kirkby, UC Irvine, dkirkby@uci.edu
* | | * DK, David Kirkby, UC Irvine, dkirkby@uci.edu
* | |
| *
* | | *
* | |
| * Copyright (c) 2000-2005, Regents of the University of California
* | | * Copyright (c) 2000-2005, Regents of the University of California
* | |
| * and Stanford University. All rights reserved.
* | | * and Stanford University. All rights reserved.
* | |
| *
* | | *
* | |
| * Redistribution and use in source and binary forms,
* | | * Redistribution and use in source and binary forms,
* | |
| * with or without modification, are permitted according to the terms
* | | * with or without modification, are permitted according to the terms
* | |
| * listed in LICENSE (http://roofit.sourceforge.net/license.txt)
* | | * listed in LICENSE (http://roofit.sourceforge.net/license.txt)
* | |
| | | | |
| skipping to change at line 99 | | skipping to change at line 99 | |
| | | | |
| // Buffer redirection routines used in inside RooAbsOptTestStatistics | | // Buffer redirection routines used in inside RooAbsOptTestStatistics | |
| virtual void attachBuffers(const RooArgSet& extObs) ; | | virtual void attachBuffers(const RooArgSet& extObs) ; | |
| virtual void resetBuffers() ; | | virtual void resetBuffers() ; | |
| | | | |
| // Constant term optimizer interface | | // Constant term optimizer interface | |
| virtual const RooAbsArg* cacheOwner() { return _cacheOwner ; } | | virtual const RooAbsArg* cacheOwner() { return _cacheOwner ; } | |
| virtual void cacheArgs(const RooAbsArg* owner, RooArgSet& varSet, const R
ooArgSet* nset=0) ; | | virtual void cacheArgs(const RooAbsArg* owner, RooArgSet& varSet, const R
ooArgSet* nset=0) ; | |
| virtual void attachCache(const RooAbsArg* newOwner, const RooArgSet& cach
edVars) ; | | virtual void attachCache(const RooAbsArg* newOwner, const RooArgSet& cach
edVars) ; | |
| virtual void resetCache() ; | | virtual void resetCache() ; | |
|
| virtual void recalculateCache() ; | | virtual void recalculateCache(const RooArgSet* /*proj*/, Int_t firstEvent
, Int_t lastEvent, Int_t stepSize) ; | |
| | | | |
| virtual void setArgStatus(const RooArgSet& set, Bool_t active) ; | | virtual void setArgStatus(const RooArgSet& set, Bool_t active) ; | |
| | | | |
| const RooVectorDataStore* cache() const { return _cache ; } | | const RooVectorDataStore* cache() const { return _cache ; } | |
| | | | |
| void loadValues(const RooAbsDataStore *tds, const RooFormulaVar* select=0
, const char* rangeName=0, Int_t nStart=0, Int_t nStop=2000000000) ; | | void loadValues(const RooAbsDataStore *tds, const RooFormulaVar* select=0
, const char* rangeName=0, Int_t nStart=0, Int_t nStop=2000000000) ; | |
| | | | |
| void dump() ; | | void dump() ; | |
| | | | |
| void setExternalWeightArray(Double_t* arrayWgt, Double_t* arrayWgtErrLo,
Double_t* arrayWgtErrHi, Double_t* arraySumW2) { | | void setExternalWeightArray(Double_t* arrayWgt, Double_t* arrayWgtErrLo,
Double_t* arrayWgtErrHi, Double_t* arraySumW2) { | |
| | | | |
End of changes. 2 change blocks. |
| 2 lines changed or deleted | | 2 lines changed or added | |
|
| RootFinder.h | | RootFinder.h | |
|
| // @(#)root/tmva $Id: RootFinder.h 40005 2011-06-27 15:29:10Z stelzer $ | | // @(#)root/mathmore:$Id: RootFinder.h 33942 2010-06-16 13:12:17Z moneta $ | |
| // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss | | // Authors: L. Moneta, A. Zsenei 08/2005 | |
| | | | |
|
| /************************************************************************** | | /********************************************************************** | |
| ******** | | * * | |
| * Project: TMVA - a Root-integrated toolkit for multivariate data analysis | | * Copyright (c) 2004 ROOT Foundation, CERN/PH-SFT * | |
| * | | * * | |
| * Package: TMVA | | * This library is free software; you can redistribute it and/or * | |
| * | | * modify it under the terms of the GNU General Public License * | |
| * Class : RootFinder | | * as published by the Free Software Foundation; either version 2 * | |
| * | | * of the License, or (at your option) any later version. * | |
| * Web : http://tmva.sourceforge.net | | * * | |
| * | | * This library is distributed in the hope that it will be useful, * | |
| * | | * but WITHOUT ANY WARRANTY; without even the implied warranty of * | |
| * | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * | |
| * Description: | | * General Public License for more details. * | |
| * | | * * | |
| * Root finding using Brents algorithm | | * You should have received a copy of the GNU General Public License * | |
| * | | * along with this library (see file COPYING); if not, write * | |
| * (translated from CERNLIB function RZERO) | | * to the Free Software Foundation, Inc., 59 Temple Place, Suite * | |
| * | | * 330, Boston, MA 02111-1307 USA, or contact the author. * | |
| * | | * * | |
| * | | **********************************************************************/ | |
| * Authors (alphabetical): | | | |
| * | | // Header file for class RootFinder | |
| * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland | | // | |
| * | | // Created by: moneta at Sun Nov 14 16:59:55 2004 | |
| * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German | | // | |
| y * | | // Last update: Sun Nov 14 16:59:55 2004 | |
| * Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada | | // | |
| * | | #ifndef ROOT_Math_RootFinder | |
| * | | #define ROOT_Math_RootFinder | |
| * | | | |
| * Copyright (c) 2005: | | | |
| * | | | |
| * CERN, Switzerland | | | |
| * | | | |
| * U. of Victoria, Canada | | | |
| * | | | |
| * MPI-K Heidelberg, Germany | | | |
| * | | | |
| * | | | |
| * | | | |
| * Redistribution and use in source and binary forms, with or without | | | |
| * | | | |
| * modification, are permitted according to the terms listed in LICENSE | | | |
| * | | | |
| * (http://tmva.sourceforge.net/LICENSE) | | | |
| * | | | |
| ************************************************************************** | | | |
| ********/ | | | |
| | | | |
| #ifndef ROOT_TMVA_RootFinder | | | |
| #define ROOT_TMVA_RootFinder | | | |
| | | | |
| ////////////////////////////////////////////////////////////////////////// | | | |
| // // | | | |
| // RootFinder // | | | |
| // // | | | |
| // Root finding using Brents algorithm // | | | |
| // (translated from CERNLIB function RZERO) // | | | |
| // // | | | |
| ////////////////////////////////////////////////////////////////////////// | | | |
| | | | |
|
| #ifndef ROOT_TObject | | #ifndef ROOT_Math_IFunctionfwd | |
| #include "TObject.h" | | #include "Math/IFunctionfwd.h" | |
| #endif | | #endif | |
| | | | |
|
| namespace TMVA { | | #ifndef ROOT_Math_IRootFinderMethod | |
| | | #include "Math/IRootFinderMethod.h" | |
| class MsgLogger; | | #endif | |
| | | | |
| class RootFinder : public TObject { | | | |
| | | | |
| public: | | | |
| | | | |
| RootFinder( Double_t (*rootVal)( Double_t ), | | | |
| Double_t rootMin, Double_t rootMax, | | | |
| Int_t maxIterations = 100, | | | |
| Double_t absTolerance = 0.0 ); | | | |
| virtual ~RootFinder( void ); | | | |
| | | | |
| // returns the root of the function | | | |
| Double_t Root( Double_t refValue ); | | | |
| | | | |
|
| private: | | /** | |
| | | @defgroup RootFinders One-dimensional Root-Finding algorithms | |
| | | Various implementation esists in MathCore and MathMore | |
| | | The user interacts with a proxy class ROOT::Math::RootFinder which creat | |
| | | es behing | |
| | | the choosen algorithms which are implemented using the ROOT::Math::IRoot | |
| | | FinderMethod interface | |
| | | | |
| | | @ingroup NumAlgo | |
| | | */ | |
| | | | |
| | | namespace ROOT { | |
| | | namespace Math { | |
| | | | |
| | | //_________________________________________________________________________ | |
| | | ____________ | |
| | | /** | |
| | | User Class to find the Root of one dimensional functions. | |
| | | The GSL Methods are implemented in MathMore and they are loaded au | |
| | | tomatically | |
| | | via the plug-in manager | |
| | | | |
| | | The possible types of Root-finding algorithms are: | |
| | | <ul> | |
| | | <li>Root Bracketing Algorithms which do not require function deriv | |
| | | atives | |
| | | <ol> | |
| | | <li>RootFinder::kBRENT (default method implemented in MathCore) | |
| | | <li>RootFinder::kGSL_BISECTION | |
| | | <li>RootFinder::kGSL_FALSE_POS | |
| | | <li>RootFinder::kGSL_BRENT | |
| | | </ol> | |
| | | <li>Root Finding Algorithms using Derivatives | |
| | | <ol> | |
| | | <li>RootFinder::kGSL_NEWTON | |
| | | <li>RootFinder::kGSL_SECANT | |
| | | <li>RootFinder::kGSL_STEFFENSON | |
| | | </ol> | |
| | | </ul> | |
| | | | |
| | | This class does not cupport copying | |
| | | | |
| | | @ingroup RootFinders | |
| | | | |
| | | */ | |
| | | | |
| | | class RootFinder { | |
| | | | |
| | | public: | |
| | | | |
| | | enum EType { kBRENT, // Methods | |
| | | from MathCore | |
| | | kGSL_BISECTION, kGSL_FALSE_POS, kGSL_BRENT, // GSL Nor | |
| | | mal | |
| | | kGSL_NEWTON, kGSL_SECANT, kGSL_STEFFENSON // GSL Der | |
| | | ivatives | |
| | | }; | |
| | | | |
| | | /** | |
| | | Construct a Root-Finder algorithm | |
| | | */ | |
| | | RootFinder(RootFinder::EType type = RootFinder::kBRENT); | |
| | | virtual ~RootFinder(); | |
| | | | |
| | | private: | |
| | | // usually copying is non trivial, so we make this unaccessible | |
| | | RootFinder(const RootFinder & ) {} | |
| | | RootFinder & operator = (const RootFinder & rhs) | |
| | | { | |
| | | if (this == &rhs) return *this; // time saving self-test | |
| | | return *this; | |
| | | } | |
| | | | |
| | | public: | |
| | | | |
| | | bool SetMethod(RootFinder::EType type = RootFinder::kBRENT); | |
| | | | |
| | | /** | |
| | | Provide to the solver the function and the initial search inter | |
| | | val [xlow, xup] | |
| | | for algorithms not using derivatives (bracketing algorithms) | |
| | | The templated function f must be of a type implementing the \a | |
| | | operator() method, | |
| | | <em> double operator() ( double x ) </em> | |
| | | Returns non zero if interval is not valid (i.e. does not contai | |
| | | ns a root) | |
| | | */ | |
| | | | |
| | | bool SetFunction( const IGenFunction & f, double xlow, double xup) | |
| | | { | |
| | | return fSolver->SetFunction( f, xlow, xup); | |
| | | } | |
| | | | |
| | | /** | |
| | | Provide to the solver the function and an initial estimate of t | |
| | | he root, | |
| | | for algorithms using derivatives. | |
| | | The templated function f must be of a type implementing the \a | |
| | | operator() | |
| | | and the \a Gradient() methods. | |
| | | <em> double operator() ( double x ) </em> | |
| | | Returns non zero if starting point is not valid | |
| | | */ | |
| | | | |
| | | bool SetFunction( const IGradFunction & f, double xstart) { | |
| | | return fSolver->SetFunction( f, xstart); | |
| | | } | |
| | | | |
| | | template<class Function, class Derivative> | |
| | | bool Solve(Function &f, Derivative &d, double start, | |
| | | int maxIter = 100, double absTol = 1E-8, double relTol = | |
| | | 1E-10); | |
| | | | |
| | | template<class Function> | |
| | | bool Solve(Function &f, double min, double max, | |
| | | int maxIter = 100, double absTol = 1E-8, double relTol = | |
| | | 1E-10); | |
| | | | |
| | | /** | |
| | | Compute the roots iterating until the estimate of the Root is | |
| | | within the required tolerance returning | |
| | | the iteration Status | |
| | | */ | |
| | | bool Solve( int maxIter = 100, double absTol = 1E-8, double relTol | |
| | | = 1E-10) { | |
| | | return fSolver->Solve( maxIter, absTol, relTol ); | |
| | | } | |
| | | | |
| | | /** | |
| | | Return the number of iteration performed to find the Root. | |
| | | */ | |
| | | int Iterations() const { | |
| | | return fSolver->Iterations(); | |
| | | } | |
| | | | |
| | | /** | |
| | | Perform a single iteration and return the Status | |
| | | */ | |
| | | int Iterate() { | |
| | | return fSolver->Iterate(); | |
| | | } | |
| | | | |
| | | /** | |
| | | Return the current and latest estimate of the Root | |
| | | */ | |
| | | double Root() const { | |
| | | return fSolver->Root(); | |
| | | } | |
| | | | |
| | | /** | |
| | | Return the status of the last estimate of the Root | |
| | | = 0 OK, not zero failure | |
| | | */ | |
| | | int Status() const { | |
| | | return fSolver->Status(); | |
| | | } | |
| | | | |
| | | /** | |
| | | Return the current and latest estimate of the lower value of th | |
| | | e Root-finding interval (for bracketing algorithms) | |
| | | */ | |
| | | /* double XLower() const { */ | |
| | | /* return fSolver->XLower(); */ | |
| | | /* } */ | |
| | | | |
| | | /** | |
| | | Return the current and latest estimate of the upper value of th | |
| | | e Root-finding interval (for bracketing algorithms) | |
| | | */ | |
| | | /* double XUpper() const { */ | |
| | | /* return fSolver->XUpper(); */ | |
| | | /* } */ | |
| | | | |
| | | /** | |
| | | Get Name of the Root-finding solver algorithm | |
| | | */ | |
| | | const char * Name() const { | |
| | | return fSolver->Name(); | |
| | | } | |
| | | | |
| | | protected: | |
| | | | |
| | | private: | |
| | | | |
| | | IRootFinderMethod* fSolver; // type of algorithm to be used | |
| | | | |
|
| Double_t fRootMin; // minimum root value | | }; | |
| Double_t fRootMax; // maximum root value | | | |
| Int_t fMaxIter; // maximum number of iterations | | | |
| Double_t fAbsTol; // absolute tolerance deviation | | | |
| | | | |
|
| // function pointer | | } // namespace Math | |
| Double_t (*fGetRootVal)( Double_t ); | | } // namespace ROOT | |
| | | | |
|
| mutable MsgLogger* fLogger; //! message logger | | #ifndef ROOT_Math_WrappedFunction | |
| MsgLogger& Log() const { return *fLogger; } | | #include "Math/WrappedFunction.h" | |
| | | #endif | |
| | | | |
|
| ClassDef(RootFinder,0) // Root finding using Brents algorithm | | #ifndef ROOT_Math_Functor | |
| }; | | #include "Math/Functor.h" | |
| | | #endif | |
| | | | |
|
| } // namespace TMVA | | template<class Function, class Derivative> | |
| | | bool ROOT::Math::RootFinder::Solve(Function &f, Derivative &d, double start | |
| | | , | |
| | | int maxIter, double absTol, double relTol | |
| | | ) | |
| | | { | |
| | | if (!fSolver) return false; | |
| | | ROOT::Math::GradFunctor1D wf(f, d); | |
| | | bool ret = fSolver->SetFunction(wf, start); | |
| | | if (!ret) return false; | |
| | | return Solve(maxIter, absTol, relTol); | |
| | | } | |
| | | | |
| | | template<class Function> | |
| | | bool ROOT::Math::RootFinder::Solve(Function &f, double min, double max, | |
| | | int maxIter, double absTol, double relTol | |
| | | ) | |
| | | { | |
| | | if (!fSolver) return false; | |
| | | ROOT::Math::WrappedFunction<Function &> wf(f); | |
| | | bool ret = fSolver->SetFunction(wf, min, max); | |
| | | if (!ret) return false; | |
| | | return Solve(maxIter, absTol, relTol); | |
| | | } | |
| | | | |
|
| #endif | | #endif /* ROOT_Math_RootFinder */ | |
| | | | |
End of changes. 11 change blocks. |
| 92 lines changed or deleted | | 254 lines changed or added | |
|
| SamplingDistPlot.h | | SamplingDistPlot.h | |
|
| // @(#)root/roostats:$Id: SamplingDistPlot.h 39391 2011-05-26 09:51:59Z mon
eta $ | | // @(#)root/roostats:$Id: SamplingDistPlot.h 42988 2012-02-13 21:03:07Z wou
ter $ | |
| // Authors: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke | | // Authors: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| #ifndef ROOSTATS_SamplingDistPlot | | #ifndef ROOSTATS_SamplingDistPlot | |
| #define ROOSTATS_SamplingDistPlot | | #define ROOSTATS_SamplingDistPlot | |
| | | | |
| #include "RooList.h" | | #include "RooList.h" | |
| #include "RooPrintable.h" | | #include "RooPrintable.h" | |
| #include "TNamed.h" | | #include "TNamed.h" | |
| #include "TIterator.h" | | #include "TIterator.h" | |
| #include "TH1F.h" | | #include "TH1F.h" | |
|
| | | #include "TF1.h" | |
| #include "TLegend.h" | | #include "TLegend.h" | |
| | | | |
| #ifndef ROOSTATS_SamplingDistribution | | #ifndef ROOSTATS_SamplingDistribution | |
| #include "RooStats/SamplingDistribution.h" | | #include "RooStats/SamplingDistribution.h" | |
| #endif | | #endif | |
| | | | |
| #ifndef ROO_PLOT | | #ifndef ROO_PLOT | |
| #include "RooPlot.h" | | #include "RooPlot.h" | |
| #endif | | #endif | |
| | | | |
| namespace RooStats { | | namespace RooStats { | |
| | | | |
| class SamplingDistPlot : public TNamed, public RooPrintable { | | class SamplingDistPlot : public TNamed, public RooPrintable { | |
| | | | |
| public: | | public: | |
| // Constructors for SamplingDistribution | | // Constructors for SamplingDistribution | |
| SamplingDistPlot(Int_t nbins = 100); | | SamplingDistPlot(Int_t nbins = 100); | |
|
| | | SamplingDistPlot(Int_t nbins, Double_t min, Double_t max); | |
| // SamplingDistPlot(const char* name, const char* title, Int_t nbins, Do
uble_t xmin, Double_t xmax); | | // SamplingDistPlot(const char* name, const char* title, Int_t nbins, Do
uble_t xmin, Double_t xmax); | |
| | | | |
| // Destructor of SamplingDistribution | | // Destructor of SamplingDistribution | |
| virtual ~SamplingDistPlot() {} | | virtual ~SamplingDistPlot() {} | |
| | | | |
| // adds the sampling distribution and returns the scale factor | | // adds the sampling distribution and returns the scale factor | |
| Double_t AddSamplingDistribution(const SamplingDistribution *samplingDi
st, Option_t *drawOptions="NORMALIZE HIST"); | | Double_t AddSamplingDistribution(const SamplingDistribution *samplingDi
st, Option_t *drawOptions="NORMALIZE HIST"); | |
| // Like AddSamplingDistribution, but also sets a shaded area in the | | // Like AddSamplingDistribution, but also sets a shaded area in the | |
| // minShaded and maxShaded boundaries. | | // minShaded and maxShaded boundaries. | |
| Double_t AddSamplingDistributionShaded(const SamplingDistribution *samp
lingDist, Double_t minShaded, Double_t maxShaded, Option_t *drawOptions="NO
RMALIZE HIST"); | | Double_t AddSamplingDistributionShaded(const SamplingDistribution *samp
lingDist, Double_t minShaded, Double_t maxShaded, Option_t *drawOptions="NO
RMALIZE HIST"); | |
| | | | |
| // add a line | | // add a line | |
| void AddLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2, const
char* title = NULL); | | void AddLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2, const
char* title = NULL); | |
|
| | | // add a TH1 | |
| | | void AddTH1(TH1* h, Option_t *drawOptions=""); | |
| | | // add a TF1 | |
| | | void AddTF1(TF1* f, const char* title = NULL, Option_t *drawOptions="SA | |
| | | ME"); | |
| | | // set legend | |
| | | void SetLegend(TLegend* l){ fLegend = l; } | |
| | | | |
| void Draw(Option_t *options=0); | | void Draw(Option_t *options=0); | |
| | | | |
| // Applies a predefined style if fApplyStyle is kTRUE (default). | | // Applies a predefined style if fApplyStyle is kTRUE (default). | |
| void ApplyDefaultStyle(void); | | void ApplyDefaultStyle(void); | |
| | | | |
| void SetLineColor(Color_t color, const SamplingDistribution *samplDist
= 0); | | void SetLineColor(Color_t color, const SamplingDistribution *samplDist
= 0); | |
| void SetLineWidth(Width_t lwidth, const SamplingDistribution *samplDist
= 0); | | void SetLineWidth(Width_t lwidth, const SamplingDistribution *samplDist
= 0); | |
| void SetLineStyle(Style_t style, const SamplingDistribution *samplDist
= 0); | | void SetLineStyle(Style_t style, const SamplingDistribution *samplDist
= 0); | |
| | | | |
| | | | |
| skipping to change at line 74 | | skipping to change at line 82 | |
| | | | |
| void SetAxisTitle(char *varName) { fVarName = TString(varName); } | | void SetAxisTitle(char *varName) { fVarName = TString(varName); } | |
| | | | |
| // If you do not want SamplingDistPlot to interfere with your style set
tings, call this | | // If you do not want SamplingDistPlot to interfere with your style set
tings, call this | |
| // function with "false" before Draw(). | | // function with "false" before Draw(). | |
| void SetApplyStyle(Bool_t s) { fApplyStyle = s; } | | void SetApplyStyle(Bool_t s) { fApplyStyle = s; } | |
| | | | |
| // Returns the TH1F associated with the give SamplingDistribution. | | // Returns the TH1F associated with the give SamplingDistribution. | |
| // Intended use: Access to member functions of TH1F like GetMean(), | | // Intended use: Access to member functions of TH1F like GetMean(), | |
| // GetRMS() etc. | | // GetRMS() etc. | |
|
| TH1F* GetTH1F(const SamplingDistribution *samplDist); | | TH1F* GetTH1F(const SamplingDistribution *samplDist = NULL); | |
| | | | |
| // changes plot to log scale on x axis | | // changes plot to log scale on x axis | |
| void SetLogXaxis(Bool_t lx) { fLogXaxis = lx; } | | void SetLogXaxis(Bool_t lx) { fLogXaxis = lx; } | |
| // changes plot to log scale on y axis | | // changes plot to log scale on y axis | |
| void SetLogYaxis(Bool_t ly) { fLogYaxis = ly; } | | void SetLogYaxis(Bool_t ly) { fLogYaxis = ly; } | |
| | | | |
|
| | | // change x range | |
| | | void SetXRange( double mi, double ma ) { fXMin = mi; fXMax = ma; } | |
| | | // change y range | |
| | | void SetYRange( double mi, double ma ) { fYMin = mi; fYMax = ma; } | |
| | | | |
| // write to Root file | | // write to Root file | |
| void DumpToFile(const char* RootFileName, Option_t *option="", const ch
ar *ftitle="", Int_t compress=1); | | void DumpToFile(const char* RootFileName, Option_t *option="", const ch
ar *ftitle="", Int_t compress=1); | |
| | | | |
| private: | | private: | |
| std::vector<Double_t> fSamplingDistr; | | std::vector<Double_t> fSamplingDistr; | |
| std::vector<Double_t> fSampleWeights; | | std::vector<Double_t> fSampleWeights; | |
| | | | |
| Bool_t fIsWeighted; | | Bool_t fIsWeighted; | |
| | | | |
| Int_t fBins; | | Int_t fBins; | |
| | | | |
| skipping to change at line 108 | | skipping to change at line 121 | |
| TH1F* fHist; | | TH1F* fHist; | |
| TLegend *fLegend; | | TLegend *fLegend; | |
| | | | |
| RooList fItems; // holds TH1Fs only | | RooList fItems; // holds TH1Fs only | |
| RooList fOtherItems; // other objects to be drawn like TLine etc. | | RooList fOtherItems; // other objects to be drawn like TLine etc. | |
| TIterator* fIterator; // TODO remove class variable and instantiate loc
ally as necessary | | TIterator* fIterator; // TODO remove class variable and instantiate loc
ally as necessary | |
| RooPlot* fRooPlot; | | RooPlot* fRooPlot; | |
| Bool_t fLogXaxis; | | Bool_t fLogXaxis; | |
| Bool_t fLogYaxis; | | Bool_t fLogYaxis; | |
| | | | |
|
| | | double fXMin, fXMax, fYMin, fYMax; | |
| | | | |
| Bool_t fApplyStyle; | | Bool_t fApplyStyle; | |
| Style_t fFillStyle; | | Style_t fFillStyle; | |
| | | | |
| void SetSampleWeights(const SamplingDistribution *samplingDist); | | void SetSampleWeights(const SamplingDistribution *samplingDist); | |
| | | | |
| void addObject(TObject *obj, Option_t *drawOptions=0); // for TH1Fs onl
y | | void addObject(TObject *obj, Option_t *drawOptions=0); // for TH1Fs onl
y | |
| void addOtherObject(TObject *obj, Option_t *drawOptions=0); | | void addOtherObject(TObject *obj, Option_t *drawOptions=0); | |
| void GetAbsoluteInterval(Float_t &theMin, Float_t &theMax, Float_t &the
YMax) const; | | void GetAbsoluteInterval(Float_t &theMin, Float_t &theMax, Float_t &the
YMax) const; | |
| | | | |
| ClassDef(SamplingDistPlot,1) // Class containing the results of the Hy
bridCalculator | | ClassDef(SamplingDistPlot,1) // Class containing the results of the Hy
bridCalculator | |
| | | | |
End of changes. 7 change blocks. |
| 2 lines changed or deleted | | 18 lines changed or added | |
|
| TGDMLParse.h | | TGDMLParse.h | |
|
| /* @(#)root/gdml:$Id: TGDMLParse.h 41588 2011-10-26 10:10:54Z agheata $ */ | | /* @(#)root/gdml:$Id: TGDMLParse.h 42440 2011-12-08 10:10:14Z agheata $ */ | |
| // Authors: Ben Lloyd 09/11/06 | | // Authors: Ben Lloyd 09/11/06 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 159 | | skipping to change at line 159 | |
| XMLNodePointer_t MatProcess(TXMLEngine* gdml, XMLNodePointer_t node, XM
LAttrPointer_t attr, int z); | | XMLNodePointer_t MatProcess(TXMLEngine* gdml, XMLNodePointer_t node, XM
LAttrPointer_t attr, int z); | |
| | | | |
| //'solids' section | | //'solids' section | |
| XMLNodePointer_t BooSolid(TXMLEngine* gdml, XMLNodePointer_t node, XMLA
ttrPointer_t attr, int num); | | XMLNodePointer_t BooSolid(TXMLEngine* gdml, XMLNodePointer_t node, XMLA
ttrPointer_t attr, int num); | |
| XMLNodePointer_t Box(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPo
inter_t attr); | | XMLNodePointer_t Box(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPo
inter_t attr); | |
| XMLNodePointer_t Paraboloid(TXMLEngine* gdml, XMLNodePointer_t node, XM
LAttrPointer_t attr); | | XMLNodePointer_t Paraboloid(TXMLEngine* gdml, XMLNodePointer_t node, XM
LAttrPointer_t attr); | |
| XMLNodePointer_t Arb8(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrP
ointer_t attr); | | XMLNodePointer_t Arb8(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrP
ointer_t attr); | |
| XMLNodePointer_t Tube(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrP
ointer_t attr); | | XMLNodePointer_t Tube(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrP
ointer_t attr); | |
| XMLNodePointer_t CutTube(TXMLEngine* gdml, XMLNodePointer_t node, XMLAt
trPointer_t attr); | | XMLNodePointer_t CutTube(TXMLEngine* gdml, XMLNodePointer_t node, XMLAt
trPointer_t attr); | |
| XMLNodePointer_t Cone(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrP
ointer_t attr); | | XMLNodePointer_t Cone(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrP
ointer_t attr); | |
|
| | | XMLNodePointer_t ElCone(TXMLEngine* gdml, XMLNodePointer_t node, XMLAtt
rPointer_t attr); | |
| XMLNodePointer_t Trap(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrP
ointer_t attr); | | XMLNodePointer_t Trap(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrP
ointer_t attr); | |
| XMLNodePointer_t Trd(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPo
inter_t attr); | | XMLNodePointer_t Trd(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrPo
inter_t attr); | |
| XMLNodePointer_t Polycone(TXMLEngine* gdml, XMLNodePointer_t node, XMLA
ttrPointer_t attr); | | XMLNodePointer_t Polycone(TXMLEngine* gdml, XMLNodePointer_t node, XMLA
ttrPointer_t attr); | |
| XMLNodePointer_t Polyhedra(TXMLEngine* gdml, XMLNodePointer_t node, XML
AttrPointer_t attr); | | XMLNodePointer_t Polyhedra(TXMLEngine* gdml, XMLNodePointer_t node, XML
AttrPointer_t attr); | |
| XMLNodePointer_t Sphere(TXMLEngine* gdml, XMLNodePointer_t node, XMLAtt
rPointer_t attr); | | XMLNodePointer_t Sphere(TXMLEngine* gdml, XMLNodePointer_t node, XMLAtt
rPointer_t attr); | |
| XMLNodePointer_t Torus(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttr
Pointer_t attr); | | XMLNodePointer_t Torus(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttr
Pointer_t attr); | |
| XMLNodePointer_t Hype(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrP
ointer_t attr); | | XMLNodePointer_t Hype(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrP
ointer_t attr); | |
| XMLNodePointer_t Para(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrP
ointer_t attr); | | XMLNodePointer_t Para(TXMLEngine* gdml, XMLNodePointer_t node, XMLAttrP
ointer_t attr); | |
| XMLNodePointer_t TwistTrap(TXMLEngine* gdml, XMLNodePointer_t node, XML
AttrPointer_t attr); | | XMLNodePointer_t TwistTrap(TXMLEngine* gdml, XMLNodePointer_t node, XML
AttrPointer_t attr); | |
| XMLNodePointer_t ElTube(TXMLEngine* gdml, XMLNodePointer_t node, XMLAtt
rPointer_t attr); | | XMLNodePointer_t ElTube(TXMLEngine* gdml, XMLNodePointer_t node, XMLAtt
rPointer_t attr); | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 2 lines changed or added | |
|
| TGDMLWrite.h | | TGDMLWrite.h | |
|
| // @(#)root/gdml:$Id: TGDMLWrite.h 42053 2011-11-16 12:35:25Z rdm $ | | // @(#)root/gdml:$Id: TGDMLWrite.h 42440 2011-12-08 10:10:14Z agheata $ | |
| // Author: Anton Pytel 15/9/2011 | | // Author: Anton Pytel 15/9/2011 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2011, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2011, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 95 | | skipping to change at line 95 | |
| #endif | | #endif | |
| | | | |
| #ifndef ROOT_TGeoBoolNode | | #ifndef ROOT_TGeoBoolNode | |
| #include "TGeoBoolNode.h" | | #include "TGeoBoolNode.h" | |
| #endif | | #endif | |
| | | | |
| #ifndef ROOT_TGeoCompositeShape | | #ifndef ROOT_TGeoCompositeShape | |
| #include "TGeoCompositeShape.h" | | #include "TGeoCompositeShape.h" | |
| #endif | | #endif | |
| | | | |
|
| | | #ifndef ROOT_TGeoScaledShape | |
| | | #include "TGeoScaledShape.h" | |
| | | #endif | |
| | | | |
| #include <map> | | #include <map> | |
| #include <vector> | | #include <vector> | |
| #include <iostream> | | #include <iostream> | |
| | | | |
|
| | | /////////////////////////////////////////////////////////////////////////// | |
| | | / | |
| | | // / | |
| | | / | |
| | | // TGDMLWrite - Class for exporting geometries From ROOT's gGeoManager / | |
| | | / | |
| | | // (instance of TGeoManager class) To GDML file. More about GDML / | |
| | | / | |
| | | // see http://gdml.web.cern.ch. / | |
| | | / | |
| | | // / | |
| | | / | |
| | | /////////////////////////////////////////////////////////////////////////// | |
| | | / | |
| | | | |
| class TGDMLWrite : public TObject { | | class TGDMLWrite : public TObject { | |
| public: | | public: | |
| TGDMLWrite(); | | TGDMLWrite(); | |
| virtual ~TGDMLWrite(); | | virtual ~TGDMLWrite(); | |
|
| | | | |
| | | static void StartGDMLWriting(TGeoManager * geomanager, const char* filen | |
| | | ame, TString option) { | |
| | | //static function - | |
| | | //options: | |
| | | // g - set by default - geant4 compatibility | |
| | | // f,n - if none of this two is set then naming convention is | |
| | | // with incremental suffix, if "f" then suffix is pointer | |
| | | // if "n" then there is no suffix, but uniqness of names | |
| | | // is not secured. | |
| | | TGDMLWrite *writer = new TGDMLWrite; | |
| | | writer->WriteGDMLfile(geomanager, filename, option); | |
| | | delete writer; | |
| | | } | |
| //wrapper of all main methods for extraction | | //wrapper of all main methods for extraction | |
| void WriteGDMLfile(TGeoManager * geomanager, const char* filename = "tes
t.gdml", TString option = ""); | | void WriteGDMLfile(TGeoManager * geomanager, const char* filename = "tes
t.gdml", TString option = ""); | |
| enum ENamingType { | | enum ENamingType { | |
| kelegantButSlow = 0, | | kelegantButSlow = 0, | |
| kwithoutSufixNotUniq = 1, | | kwithoutSufixNotUniq = 1, | |
| kfastButUglySufix = 2 | | kfastButUglySufix = 2 | |
| }; | | }; | |
| void SetNamingSpeed(ENamingType naming); | | void SetNamingSpeed(ENamingType naming); | |
| void SetG4Compatibility(Bool_t G4Compatible) { | | void SetG4Compatibility(Bool_t G4Compatible) { | |
| fgG4Compatibility = G4Compatible; | | fgG4Compatibility = G4Compatible; | |
| | | | |
| skipping to change at line 137 | | skipping to change at line 162 | |
| NameList fLst; | | NameList fLst; | |
| }; //to store pointers | | }; //to store pointers | |
| struct NameLst { | | struct NameLst { | |
| NameListS fLst; //to map pointers with names | | NameListS fLst; //to map pointers with names | |
| NameListI fLstIter; //to store all the iterators for repeating nam
es | | NameListI fLstIter; //to store all the iterators for repeating nam
es | |
| }; | | }; | |
| | | | |
| //General lists | | //General lists | |
| StructLst *fIsotopeList; //list of isotopes | | StructLst *fIsotopeList; //list of isotopes | |
| StructLst *fElementList; //list of elements | | StructLst *fElementList; //list of elements | |
|
| StructLst *fMaterialList; //list of materials | | | |
| StructLst *fShapeList; //list of solids | | | |
| StructLst *fVolumeList; //list of volumes | | | |
| StructLst *fAccPatt; //list of accepted patterns for division | | StructLst *fAccPatt; //list of accepted patterns for division | |
| StructLst *fRejShape; //list of rejected shapes | | StructLst *fRejShape; //list of rejected shapes | |
| | | | |
| NameLst *fNameList; //list of names (pointer mapped) | | NameLst *fNameList; //list of names (pointer mapped) | |
| | | | |
| //Data members | | //Data members | |
| static TGDMLWrite *fgGDMLWrite; //pointer to gdm
l writer | | static TGDMLWrite *fgGDMLWrite; //pointer to gdm
l writer | |
|
| Int_t fgNamingSpeed; | | Int_t fgNamingSpeed; //input option f | |
| Bool_t fgG4Compatibility; | | or volume and solid naming | |
| XMLDocPointer_t fGdmlFile; | | Bool_t fgG4Compatibility; //input option f | |
| TString fTopVolumeName; | | or Geant4 compatibility | |
| TXMLEngine *fGdmlE; | | XMLDocPointer_t fGdmlFile; //pointer storin | |
| | | g xml file | |
| | | TString fTopVolumeName; //name of top vo | |
| | | lume | |
| | | TXMLEngine *fGdmlE; //xml engine poi | |
| | | nter | |
| | | | |
| XMLNodePointer_t fDefineNode; //main <define>
node... | | XMLNodePointer_t fDefineNode; //main <define>
node... | |
| XMLNodePointer_t fMaterialsNode; //main <material
s> node... | | XMLNodePointer_t fMaterialsNode; //main <material
s> node... | |
| XMLNodePointer_t fSolidsNode; //main <solids>
node... | | XMLNodePointer_t fSolidsNode; //main <solids>
node... | |
| XMLNodePointer_t fStructureNode; //main <structur
e> node... | | XMLNodePointer_t fStructureNode; //main <structur
e> node... | |
| Int_t fVolCnt; //count of volum
es | | Int_t fVolCnt; //count of volum
es | |
| Int_t fPhysVolCnt; //count of physi
cal volumes | | Int_t fPhysVolCnt; //count of physi
cal volumes | |
| UInt_t fActNameErr; //count of name
errors | | UInt_t fActNameErr; //count of name
errors | |
| UInt_t fSolCnt; //count of name
solids | | UInt_t fSolCnt; //count of name
solids | |
| | | | |
| static const UInt_t fgkProcBit = BIT(14); //14th bit is set when s
olid is processed | | static const UInt_t fgkProcBit = BIT(14); //14th bit is set when s
olid is processed | |
| static const UInt_t fgkProcBitVol = BIT(19); //19th bit is set when v
olume is processed | | static const UInt_t fgkProcBitVol = BIT(19); //19th bit is set when v
olume is processed | |
| static const UInt_t fgkMaxNameErr = 5; //maximum number of erro
rs for naming | | static const UInt_t fgkMaxNameErr = 5; //maximum number of erro
rs for naming | |
| | | | |
|
| //I. Methods returning pointer to the created node | | //I. Methods processing the gGeoManager geometry object structure | |
| //1. Main methods to extract everything from ROOT gGeoManager | | //1. Main methods to extract everything from ROOT gGeoManager | |
|
| | | | |
| XMLNodePointer_t ExtractMaterials(TList* materialsLst); //result <materi
als>... | | XMLNodePointer_t ExtractMaterials(TList* materialsLst); //result <materi
als>... | |
|
| void ExtractSolids(TObjArray* shapesLst); //result <solids | | TString ExtractSolid(TGeoShape* volShape); //adds <shape> t | |
| >... | | o <solids> | |
| void ExtractVolumes(TGeoVolume* volume); //result <volume | | void ExtractVolumes(TGeoVolume* volume); //result <volume | |
| > node... | | > node... + corresp. shape | |
| | | | |
| //1.1 Materials sub methods - creating Nodes | | //1.1 Materials sub methods - creating Nodes | |
| XMLNodePointer_t CreateAtomN(Double_t atom, const char * unit = "g/mole"
); | | XMLNodePointer_t CreateAtomN(Double_t atom, const char * unit = "g/mole"
); | |
| XMLNodePointer_t CreateDN(Double_t density, const char * unit = "g/cm3")
; | | XMLNodePointer_t CreateDN(Double_t density, const char * unit = "g/cm3")
; | |
| XMLNodePointer_t CreateFractionN(Double_t percentage, const char * refNa
me); | | XMLNodePointer_t CreateFractionN(Double_t percentage, const char * refNa
me); | |
| | | | |
| XMLNodePointer_t CreateIsotopN(TGeoIsotope * isotope, const char * name)
; | | XMLNodePointer_t CreateIsotopN(TGeoIsotope * isotope, const char * name)
; | |
| XMLNodePointer_t CreateElementN(TGeoElement * element, XMLNodePointer_t
materials, const char * name); | | XMLNodePointer_t CreateElementN(TGeoElement * element, XMLNodePointer_t
materials, const char * name); | |
| XMLNodePointer_t CreateMixtureN(TGeoMixture * mixture, XMLNodePointer_t
materials, TString mname); | | XMLNodePointer_t CreateMixtureN(TGeoMixture * mixture, XMLNodePointer_t
materials, TString mname); | |
| XMLNodePointer_t CreateMaterialN(TGeoMaterial * material, TString mname)
; | | XMLNodePointer_t CreateMaterialN(TGeoMaterial * material, TString mname)
; | |
| | | | |
| skipping to change at line 206 | | skipping to change at line 228 | |
| XMLNodePointer_t CreateTrdN(TGeoTrd2 * geoShape); | | XMLNodePointer_t CreateTrdN(TGeoTrd2 * geoShape); | |
| XMLNodePointer_t CreateTubeN(TGeoTubeSeg * geoShape); | | XMLNodePointer_t CreateTubeN(TGeoTubeSeg * geoShape); | |
| XMLNodePointer_t CreateCutTubeN(TGeoCtub * geoShape); | | XMLNodePointer_t CreateCutTubeN(TGeoCtub * geoShape); | |
| XMLNodePointer_t CreateTubeN(TGeoTube * geoShape); | | XMLNodePointer_t CreateTubeN(TGeoTube * geoShape); | |
| XMLNodePointer_t CreatePolyconeN(TGeoPcon * geoShape); | | XMLNodePointer_t CreatePolyconeN(TGeoPcon * geoShape); | |
| XMLNodePointer_t CreateTorusN(TGeoTorus * geoShape); | | XMLNodePointer_t CreateTorusN(TGeoTorus * geoShape); | |
| XMLNodePointer_t CreatePolyhedraN(TGeoPgon * geoShape); | | XMLNodePointer_t CreatePolyhedraN(TGeoPgon * geoShape); | |
| XMLNodePointer_t CreateEltubeN(TGeoEltu * geoShape); | | XMLNodePointer_t CreateEltubeN(TGeoEltu * geoShape); | |
| XMLNodePointer_t CreateHypeN(TGeoHype * geoShape); | | XMLNodePointer_t CreateHypeN(TGeoHype * geoShape); | |
| XMLNodePointer_t CreateXtrusionN(TGeoXtru * geoShape); | | XMLNodePointer_t CreateXtrusionN(TGeoXtru * geoShape); | |
|
| | | XMLNodePointer_t CreateEllipsoidN(TGeoCompositeShape * geoShape, TString | |
| | | elName); | |
| | | XMLNodePointer_t CreateElConeN(TGeoScaledShape * geoShape); | |
| | | | |
| XMLNodePointer_t CreateCommonBoolN(TGeoCompositeShape *geoShape); | | XMLNodePointer_t CreateCommonBoolN(TGeoCompositeShape *geoShape); | |
| | | | |
| //1.3 Volume sub methods | | //1.3 Volume sub methods | |
| XMLNodePointer_t CreatePhysVolN(const char * volref, const char * posref
, const char * rotref, XMLNodePointer_t scaleN); | | XMLNodePointer_t CreatePhysVolN(const char * volref, const char * posref
, const char * rotref, XMLNodePointer_t scaleN); | |
| XMLNodePointer_t CreateDivisionN(Double_t offset, Double_t width, Int_t
number, const char * axis, const char * unit, const char * volref); | | XMLNodePointer_t CreateDivisionN(Double_t offset, Double_t width, Int_t
number, const char * axis, const char * unit, const char * volref); | |
| | | | |
| XMLNodePointer_t CreateSetupN(const char * topVolName , const char * nam
e = "default", const char * version = "1.0"); | | XMLNodePointer_t CreateSetupN(const char * topVolName , const char * nam
e = "default", const char * version = "1.0"); | |
| XMLNodePointer_t StartVolumeN(const char * name, const char * solid, con
st char * material); | | XMLNodePointer_t StartVolumeN(const char * name, const char * solid, con
st char * material); | |
| XMLNodePointer_t StartAssemblyN(const char * name); | | XMLNodePointer_t StartAssemblyN(const char * name); | |
| | | | |
| //II. Utility methods | | //II. Utility methods | |
| Xyz GetXYZangles(const Double_t * rotationMatrix); | | Xyz GetXYZangles(const Double_t * rotationMatrix); | |
| //nodes to create position, rotation and similar types first-position/ro
tation... | | //nodes to create position, rotation and similar types first-position/ro
tation... | |
|
| XMLNodePointer_t CreatePositionN(const char * name, const Double_t *posi
tion, const char * type = "position", const char * unit = "cm"); | | XMLNodePointer_t CreatePositionN(const char * name, Xyz position, const
char * type = "position", const char * unit = "cm"); | |
| XMLNodePointer_t CreateRotationN(const char * name, Xyz rotation, const
char * type = "rotation", const char * unit = "deg"); | | XMLNodePointer_t CreateRotationN(const char * name, Xyz rotation, const
char * type = "rotation", const char * unit = "deg"); | |
| TGeoCompositeShape* CreateFakeCtub(TGeoCtub * geoShape); //create fake
cut tube as intersection | | TGeoCompositeShape* CreateFakeCtub(TGeoCtub * geoShape); //create fake
cut tube as intersection | |
| | | | |
| //check name (2nd parameter) whether it is in the list (1st parameter) | | //check name (2nd parameter) whether it is in the list (1st parameter) | |
| Bool_t IsInList(NameList list, TString name2check); | | Bool_t IsInList(NameList list, TString name2check); | |
| TString GenName(TString oldname); | | TString GenName(TString oldname); | |
| TString GenName(TString oldname, TString objPointer); | | TString GenName(TString oldname, TString objPointer); | |
| Bool_t CanProcess(TObject *pointer); | | Bool_t CanProcess(TObject *pointer); | |
| TString GetPattAxis(Int_t divAxis, const char * pattName, TString& unit)
; | | TString GetPattAxis(Int_t divAxis, const char * pattName, TString& unit)
; | |
|
| | | Bool_t IsNullParam(Double_t parValue, TString parName, TString objName); | |
| | | void UnsetTemporaryBits(TGeoManager * geoMng); | |
| | | | |
| ClassDef(TGDMLWrite, 0) //imports GDML using DOM and binds it to ROOT | | ClassDef(TGDMLWrite, 0) //imports GDML using DOM and binds it to ROOT | |
| }; | | }; | |
| | | | |
| #endif /* ROOT_TGDMLWRITE */ | | #endif /* ROOT_TGDMLWRITE */ | |
| | | | |
End of changes. 12 change blocks. |
| 16 lines changed or deleted | | 56 lines changed or added | |
|
| TProof.h | | TProof.h | |
|
| // @(#)root/proof:$Id: TProof.h 39178 2011-05-13 10:30:30Z ganis $ | | // @(#)root/proof:$Id: TProof.h 42560 2011-12-21 12:50:33Z ganis $ | |
| // Author: Fons Rademakers 13/02/97 | | // Author: Fons Rademakers 13/02/97 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 398 | | skipping to change at line 398 | |
| kAborted = 2 // After the abort button has been press
ed | | kAborted = 2 // After the abort button has been press
ed | |
| }; | | }; | |
| | | | |
| enum ESubMerger { | | enum ESubMerger { | |
| kOutputSize = 1, //Number of objects in worker's output l
ist | | kOutputSize = 1, //Number of objects in worker's output l
ist | |
| kSendOutput = 2, //Naster asks worker for its output list | | kSendOutput = 2, //Naster asks worker for its output list | |
| kBeMerger = 3, //Master tells worker to be a merger | | kBeMerger = 3, //Master tells worker to be a merger | |
| kMergerDown = 4, //Merger cannot serve | | kMergerDown = 4, //Merger cannot serve | |
| kStopMerging = 5, //Master tells worker to stop merging (a
nd return output) | | kStopMerging = 5, //Master tells worker to stop merging (a
nd return output) | |
| kOutputSent = 6 //Worker reports sending its output to g
iven worker | | kOutputSent = 6 //Worker reports sending its output to g
iven worker | |
|
| }; | | }; | |
| | | | |
| | | enum EProofClearData { | |
| | | kPurge = 0x1, | |
| | | kUnregistered = 0x2, | |
| | | kDataset = 0x4, | |
| | | kForceClear = 0x8 | |
| | | }; | |
| | | | |
| private: | | private: | |
| enum EUrgent { | | enum EUrgent { | |
| kLocalInterrupt = -1, | | kLocalInterrupt = -1, | |
| kPing = 0, | | kPing = 0, | |
| kHardInterrupt = 1, | | kHardInterrupt = 1, | |
| kSoftInterrupt, | | kSoftInterrupt, | |
| kShutdownInterrupt | | kShutdownInterrupt | |
| }; | | }; | |
| enum EProofCacheCommands { | | enum EProofCacheCommands { | |
| | | | |
| skipping to change at line 468 | | skipping to change at line 475 | |
| enum EBuildPackageOpt { | | enum EBuildPackageOpt { | |
| kDontBuildOnClient = -2, | | kDontBuildOnClient = -2, | |
| kBuildOnSlavesNoWait = -1, | | kBuildOnSlavesNoWait = -1, | |
| kBuildAll = 0, | | kBuildAll = 0, | |
| kCollectBuildResults = 1 | | kCollectBuildResults = 1 | |
| }; | | }; | |
| enum EProofShowQuotaOpt { | | enum EProofShowQuotaOpt { | |
| kPerGroup = 0x1, | | kPerGroup = 0x1, | |
| kPerUser = 0x2 | | kPerUser = 0x2 | |
| }; | | }; | |
|
| enum EProofClearData { | | | |
| kPurge = 0x1, | | | |
| kUnregistered = 0x2, | | | |
| kDataset = 0x4, | | | |
| kForceClear = 0x8 | | | |
| }; | | | |
| | | | |
| Bool_t fValid; //is this a valid proof object | | Bool_t fValid; //is this a valid proof object | |
| TString fMaster; //master server ("" if a master); used
in the browser | | TString fMaster; //master server ("" if a master); used
in the browser | |
| TString fWorkDir; //current work directory on remote ser
vers | | TString fWorkDir; //current work directory on remote ser
vers | |
| TString fGroup; //PROOF group of this user | | TString fGroup; //PROOF group of this user | |
| Int_t fLogLevel; //server debug logging level | | Int_t fLogLevel; //server debug logging level | |
| Int_t fStatus; //remote return status (part of kPROOF
_LOGDONE) | | Int_t fStatus; //remote return status (part of kPROOF
_LOGDONE) | |
| Int_t fCheckFileStatus; //remote return status after kPROOF_CH
ECKFILE | | Int_t fCheckFileStatus; //remote return status after kPROOF_CH
ECKFILE | |
| TList *fRecvMessages; //Messages received during collect not
yet processed | | TList *fRecvMessages; //Messages received during collect not
yet processed | |
| TList *fSlaveInfo; //!list returned by kPROOF_GETSLAVEINF
O | | TList *fSlaveInfo; //!list returned by kPROOF_GETSLAVEINF
O | |
| | | | |
End of changes. 3 change blocks. |
| 8 lines changed or deleted | | 9 lines changed or added | |
|
| TProofOutputFile.h | | TProofOutputFile.h | |
|
| // @(#)root/proof:$Id: TProofOutputFile.h 39171 2011-05-12 16:21:17Z ganis
$ | | // @(#)root/proof:$Id: TProofOutputFile.h 42907 2012-02-07 14:32:53Z ganis
$ | |
| // Author: Long Tran-Thanh 14/09/07 | | // Author: Long Tran-Thanh 14/09/07 | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. * | | * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. * | |
| * All rights reserved. * | | * All rights reserved. * | |
| * * | | * * | |
| * For the licensing terms see $ROOTSYS/LICENSE. * | | * For the licensing terms see $ROOTSYS/LICENSE. * | |
| * For the list of contributors see $ROOTSYS/README/CREDITS. * | | * For the list of contributors see $ROOTSYS/README/CREDITS. * | |
| *************************************************************************/ | | *************************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 66 | | skipping to change at line 66 | |
| TString fRawDir; // name of the local directory where to create
the file | | TString fRawDir; // name of the local directory where to create
the file | |
| TString fFileName; | | TString fFileName; | |
| TString fOptionsAnchor; // options and anchor string including delimit
ers, e.g. "?myopts#myanchor" | | TString fOptionsAnchor; // options and anchor string including delimit
ers, e.g. "?myopts#myanchor" | |
| TString fOutputFileName; | | TString fOutputFileName; | |
| TString fWorkerOrdinal; | | TString fWorkerOrdinal; | |
| TString fLocalHost; // Host where the file was created | | TString fLocalHost; // Host where the file was created | |
| Bool_t fIsLocal; // kTRUE if the file is in the sandbox | | Bool_t fIsLocal; // kTRUE if the file is in the sandbox | |
| Bool_t fMerged; | | Bool_t fMerged; | |
| ERunType fRunType; // Type of run (see enum ERunType) | | ERunType fRunType; // Type of run (see enum ERunType) | |
| UInt_t fTypeOpt; // Option (see enum ETypeOpt) | | UInt_t fTypeOpt; // Option (see enum ETypeOpt) | |
|
| | | Bool_t fMergeHistosOneGo; // If true merge histos in one go (argument
to TFileMerger) | |
| | | | |
| TFileCollection *fDataSet; // Instance of the file collection in 'datas
et' mode | | TFileCollection *fDataSet; // Instance of the file collection in 'datas
et' mode | |
| TFileMerger *fMerger; // Instance of the file merger in 'merge' mode | | TFileMerger *fMerger; // Instance of the file merger in 'merge' mode | |
| | | | |
| void Init(const char *path, const char *dsname); | | void Init(const char *path, const char *dsname); | |
| void SetFileName(const char* name) { fFileName = name; } | | void SetFileName(const char* name) { fFileName = name; } | |
| void SetDir(const char* dir, Bool_t raw = kFALSE) { if (raw) { fRawDir =
dir; } else { fDir = dir; } } | | void SetDir(const char* dir, Bool_t raw = kFALSE) { if (raw) { fRawDir =
dir; } else { fDir = dir; } } | |
| void SetMerged(Bool_t merged = kTRUE) { fMerged = merged; } | | void SetMerged(Bool_t merged = kTRUE) { fMerged = merged; } | |
| void SetWorkerOrdinal(const char* ordinal) { fWorkerOrdinal = ordinal; } | | void SetWorkerOrdinal(const char* ordinal) { fWorkerOrdinal = ordinal; } | |
| | | | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 2 lines changed or added | |
|