Go to the documentation of this file.
10 _selectionIndex(selectionIndex),
11 _dimensionality(dmsnlty)
16 _selectionIndex(right._selectionIndex),
17 _dimensionality(right._dimensionality)
25 if (_selectionIndex!=0)
throw std::runtime_error(
"Genfun::Variable: selection index !=0") ;
30 if (!(_selectionIndex<
a.dimension()))
throw std::runtime_error(
"Genfun::Varaible selection index out of bounds");
31 return a[_selectionIndex];
35 return _selectionIndex;
40 int kroneckerDelta = mindex==_selectionIndex ? 1 : 0;
43 for (
unsigned int i=1;
i<_dimensionality;
i++) {
54 return _dimensionality;
How the various random distributions are validated The distributions in CLHEP
How the various random distributions are validated The distributions in for example are independently validated By we mean checking that *The algorithm is mathematically correct *The algorithm is properly coded *The compilation of the algorithm is proper for this plaform *There is no subtle interaction between the algorithm and the random engine used that detectably impacts the distribution This validation must be done without reference to the coded algorithm and testing that these obey the mathematical properties of the desired distribution For each those we reject if the distribution is sigma away from the proper properties
user code seldom needs to call this function directly ZMerrno whether or not they are still recorded ZMerrno whether or not they are still since the user counter was last ZMerrno while ZMerrno ZMerrno while ZMerrno to note the handler and logger used when the exception was ZMthrow n etc The resulting pointer should generally be checked against in case ZMerrno does not go back as far as requested ZMerrno for example
How the various random distributions are validated The distributions in for example are independently validated By we mean checking that *The algorithm is mathematically correct *The algorithm is properly coded *The compilation of the algorithm is proper for this plaform *There is no subtle interaction between the algorithm and the random engine used that detectably impacts the distribution This validation must be done without reference to the coded algorithm and testing that these obey the mathematical properties of the desired distribution For each those we reject conservatively
Signatures of Hep3Vector::rotate For equivalent ZOOM axis There is no harm in leaving this axis CLHEP has implemented a first forming an identity then rotating that by axis and I leave the CLHEP code alone people are of course free to use the ZOOM originated method with signature which I believe will be faster Return types for rotateZ CLHEP and PhysicsVectors each have these three and they are identical except that the ZOOM version returns a reference to while in CLHEP they return void Having methods that alter an object return a reference to that object is convenient for certain chained and costs nothing I don t wish to potentially break ZOOM user code for no good so I have made these CLHEP method conform to this convention There are a couple of other CLHEP rotate and which use the void return but since these methods or signatures don t appear in the original ZOOM this can t break any so I leave the void return type alone for those After discussion with A P and I have modified the return types of other CLHEP methods which return void and would by the same reasoning be better returning *this These include rotate and boost methods in LorentzVector h HepLorentzVector explicit and leads to division by zero if this vector has which takes very little time I think the zoom implementation is therefore better by the way
the naive Gaussian approximation is inaccurate at a level for turns out to be detectable in a sample of only
the goal is to keep the overall false rejection probability down at the to level For each validated we discuss which of course is by necessity relative timing We take the time for a single random via one of the fastest good and at any rate the ratios will vary by around depending on the processor and memory configuration used A timing for a distribution of units would mean no time used beyond the uniform random Summary Distribution Validated Validation Rejected Past N RandGauss RandGaussT RandGaussQ RandGeneral(approximating a gaussian) linear N
this we validated samples(it is more time consuming) with no problems. We validated the quick() routine(which differs only above mu
the goal is to keep the overall false rejection probability down at the to level For each validated we discuss which of course is by necessity relative timing We take the time for a single random via one of the fastest good and at any rate the ratios will vary by around depending on the processor and memory configuration used A timing for a distribution of units would mean no time used beyond the uniform random Summary Distribution Validated Validation Rejected Past N RandGauss RandGaussT RandGaussQ bins stepwise bins RandPoisson RandPoissonT mu< 100 N=50, 000, 000 ------- mu > RandPoissonQ mu< 100 N=50, 000, 000 -------(same as RandPoissonT) mu > RandGauss shoot() etc 2.5 units Validation tests applied and a very accurate series is substituted for the table method shoot() etc 1.7 units Validation tests applied and below about **a series approximation is but we have applied this test with N up to and never get anywhere near the rejection point Analytical considerations indicate that the validation test would not reject until O(10 **24) samples were inspected. ---------------------------------------------------------- 2. RandGeneral Method since we wish to have good resolution power even if just one of the mu values is it would be unwise to dial this down any further Validation for several values o mu)
Technical Maintenance Note for CLHEP Random Consequences of seeding JamesRandom with positive seed values greater than In the source code JamesRandom The usual way of seeding a generator is via the default which makes use of the table of and the seed is the xor of a mask which starts with a bit and the seed from the table But it and often supply a seed of more than
virtual unsigned int dimensionality() const
How the various random distributions are validated The distributions in for example RandGauss
HepRotation and so forth isNear() norm2() rectify() static Rotation row1 row4(To avoid bloat in the code pulled in for programs which don 't use all these features, we split the implementation .cc files. Only isNear() goes into the original Rotation.cc) --------------------------------------- HepAxisAngle and HepEulerAngles classes --------------------------------------- These classes are very useful and simple structures for holding the result of a nice intuituve decomposition of a rotation there is no longer much content in the distinct ZOOM PhysicsVectors library The only content left in the library is the object files representing the various Exception objects When we build the CLHEP classes for the ZOOM we will set up so as to use ZOOM SpaceVector is(but we can disable namespace usage and most of our users do so at this point). What I do is leave Hep3Vector in the global namespace
the goal is to keep the overall false rejection probability down at the to level For each validated we discuss here
we want to make it possible for the user to use the so instead
Signatures of Hep3Vector::rotate For equivalent ZOOM takes(axis, delta) where CLHEP takes(delta
the goal is to keep the overall false rejection probability down at the to level For each validated we discuss which of course is by necessity relative timing We take the time for a single random via one of the fastest good and at any rate the ratios will vary by around depending on the processor and memory configuration used A timing for a distribution of units would mean no time used beyond the uniform random Summary Distribution Validated Validation Rejected Past N RandGauss RandGaussT RandGaussQ bins stepwise bins RandPoisson RandPoissonT mu< 100 N=50, 000, 000 ------- mu > RandPoissonQ mu< 100 N=50, 000, 000 -------(same as RandPoissonT) mu > RandGauss shoot() etc 2.5 units Validation tests applied and a very accurate series is substituted for the table method shoot() etc 1.7 units Validation tests applied and below about **a series approximation is used
Derivative partial(unsigned int) const
How the various random distributions are validated The distributions in for example are independently validated By validation
if another namely the one associated with the parent class of x s class Finally as documented above and b returns that function s result as its own result this method calls flag into the name of the handler being used together with the value of the throw ignore flag Based on filtering criteria
there is no the time needed for times is not significantly less
Variable(unsigned int selectionIndex=0, unsigned int dimensionality=1)
the goal is to keep the overall false rejection probability down at the to level For each validated we discuss which of course is by necessity relative timing We take the time for a single random via one of the fastest good and at any rate the ratios will vary by around depending on the processor and memory configuration used A timing for a distribution of units would mean no time used beyond the uniform random Summary Distribution Validated Validation Rejected Past N RandGauss N
this formatted text is the function s string result this method sends the formatted string s to the ostream destination specified when the logger was instantiated as its a code describing if any
user code seldom needs to call this function directly ZMerrno whether or not they are still recorded ZMerrno whether or not they are still since the user counter was last ZMerrno while ZMerrno ZMerrno get() gives a(const pointer to) the latest recorded exception
the goal is to keep the overall false rejection probability down at the to level For each validated we discuss which of course is by necessity relative timing We take the time for a single random via one of the fastest good and at any rate the ratios will vary by around depending on the processor and memory configuration used A timing for a distribution of units would mean no time used beyond the uniform random Summary Distribution Validated Validation Rejected Past N RandGauss RandGaussT RandGaussQ bins stepwise bins RandPoisson RandPoissonT mu< 100 N=50, 000, 000 ------- mu > RandPoissonQ mu< 100 N=50, 000, 000 -------(same as RandPoissonT) mu > RandGauss Method
the default is TimePositive CLHEP always does TimePositive The cost of the flexibility is small
I could not create a faster method completely accurate that does not require overly large tables and takes a major step up when we cross for several values of but we have applied this with much higher N We validated the main trials It showed no sign of approaching the rejectable p values or errors in mean and sigma Above
ZMthrow event sequence W E Dec These notes document the sequence of significant events set into motion by execution of a single passing on the hereinafter known simply as together with the line number and file name from which the macro is invoked It is mandatory that x be of a type derived from class ZMexception::The result of or b ignored as the macro s final act and then calls x thus initiating x s handling and logging the copy is made Finally
exctest1 cc this occurrence arose from this associated compilation unit
unsigned int index() const
this formatted text is the function s string result this method sends the formatted string s to the ostream destination specified when the logger was instantiated as its result
Issues Concerning the PhysicsVectors CLHEP Vector Merge The merge of ZOOM PhysicsVdectors and the CLHEP Vector package is completed The purpose of this document is to list the major issues that affected the merge of these and where relevant describe the resolutions More detailed documents describe more minor issues General Approach As agreed at the June CLHEP the approach is to combine the features of each ZOOM class with the corresponding CLHEP class expanding the interface to create a single lingua franca of what a I have placed almost all the new features in a second section of the and have created separate cc files for sensible subsets of the methods In if a program uses only the methods found in the original CLHEP very little additional code is linked in Classes The corresponding classes I am not giving up on it eventually being in use
In alll angles are always treated as measured in RADIANS Spherical coordinate setting mof V in however
The given behavior will apply to any exceptions ZMthrow n after the handler has been established Available handlers Here is a list of the five standard handlers that are defined via the Exceptions package Each is accompanied by a brief description of its after become the object of a C throw but will have no further affect on subsequent control flow after be thrown if its severity is ZMexERROR or higher
How the various random distributions are validated The distributions in for example are independently validated By we mean checking that *The algorithm is mathematically correct *The algorithm is properly coded *The compilation of the algorithm is proper for this plaform *There is no subtle interaction between the algorithm and the random engine used that detectably impacts the distribution This validation must be done without reference to the coded algorithm and testing that these obey the mathematical properties of the desired distribution For each those we reject if the distribution is sigma away from the proper we asserting that something is wrong with the algorithm of coding For distributions which will be tested in many we make our rejection criteria a bit more severe
the goal is to keep the overall false rejection probability down at the to level For each validated we discuss which of course is by necessity relative timing We take the time for a single random via one of the fastest good and at any rate the ratios will vary by around depending on the processor and memory configuration used A timing for a distribution of units would mean no time used beyond the uniform random Summary Distribution Validated Validation Rejected Past N RandGauss RandGaussT RandGaussQ bins stepwise bins RandPoisson RandPoissonT mu< 100 N=50, 000, 000 ------- mu > RandPoissonQ mu< 100 N=50, 000, 000 -------(same as RandPoissonT) mu > RandGauss shoot() etc 2.5 units Validation tests applied and a very accurate series is substituted for the table method shoot() etc 1.7 units Validation tests applied and below about **a series approximation is but we have applied this test with N up to and never get anywhere near the rejection point Analytical considerations indicate that the validation test would not reject until O(10 **24) samples were inspected. ---------------------------------------------------------- 2. RandGeneral Method since we wish to have good resolution power even if just one of the mu values is it would be unwise to dial this down any further Validation for several values of but we have applied this with much higher N We validated the mai fire)() method for a variety of mu values between 0 and 100 at a level of 10
the goal is to keep the overall false rejection probability down at the to level For each validated we discuss which of course is by necessity relative timing We take the time for a single random via one of the fastest good and at any rate the ratios will vary by around depending on the processor and memory configuration used A timing for a distribution of units would mean no time used beyond the uniform random Summary Distribution Validated Validation Rejected Past N RandGauss RandGaussT RandGaussQ bins stepwise bins RandPoisson RandPoissonT mu< 100 N=50, 000, 000 ------- mu > RandPoissonQ mu< 100 N=50, 000, 000 -------(same as RandPoissonT) mu > RandGauss shoot() etc 2.5 units Validation tests applied and a very accurate series is substituted for the table method Timing
I could not create a faster method completely accurate that does not require overly large tables and takes a major step up when we cross for several values of but we have applied this with much higher N We validated the main trials It showed no sign of approaching the rejectable p values or errors in mean and sigma the method matches the original algorithm
Issues Concerning the PhysicsVectors CLHEP Vector Merge The merge of ZOOM PhysicsVdectors and the CLHEP Vector package is completed The purpose of this document is to list the major issues that affected the merge of these and where relevant describe the resolutions More detailed documents describe more minor issues General Approach As agreed at the June CLHEP the approach is to combine the features of each ZOOM class with the corresponding CLHEP class expanding the interface to create a single lingua franca of what a I have placed almost all the new features in a second section of the and have created separate cc files for sensible subsets of the methods In particular
the goal is to keep the overall false rejection probability down at the to level For each validated we discuss which of course is by necessity relative timing We take the time for a single random via one of the fastest good and at any rate the ratios will vary by around depending on the processor and memory configuration used A timing for a distribution of units would mean no time used beyond the uniform random Summary Distribution Validated Validation Rejected Past N RandGauss RandGaussT RandGaussQ bins stepwise bins RandPoisson RandPoissonT mu< 100 N=50, 000, 000 ------- mu > RandPoissonQ mu< 100 N=50, 000, 000 -------(same as RandPoissonT) mu > RandGauss shoot() etc 2.5 units Validation tests applied and a very accurate series is substituted for the table method shoot() etc 1.7 units Validation tests applied and below about **a series approximation is but we have applied this test with N up to and never get anywhere near the rejection point Analytical considerations indicate that the validation test would not reject until O(10 **24) samples were inspected. ---------------------------------------------------------- 2. RandGeneral Method since we wish to have good resolution power even if just one of the mu values is it would be unwise to dial this down any further Validatio Level)
Technical Maintenance Note for CLHEP Random Consequences of seeding JamesRandom with positive seed values greater than In the source code JamesRandom The usual way of seeding a generator is via the default which makes use of the table of and the seed is the xor of a mask which starts with a bit and the seed from the table But it and often does
subsequent instances will be thrown after handling a logger is the term for an instance of a class that records to a designated destination a ZMthrow n exception A logger is responsible only for routing the message associated with an exception instance
How the various random distributions are validated The distributions in for example are independently validated By we mean checking that *The algorithm is mathematically correct *The algorithm is properly coded *The compilation of the algorithm is proper for this plaform *There is no subtle interaction between the algorithm and the random engine used that detectably impacts the distribution This validation must be done without reference to the coded algorithm and testing that these obey the mathematical properties of the desired distribution For each distribution
the goal is to keep the overall false rejection probability down at the to level For each validated we discuss which of course is by necessity relative timing We take the time for a single random via one of the fastest good and at any rate the ratios will vary by around depending on the processor and memory configuration used A timing for a distribution of units would mean no time used beyond the uniform random Summary Distribution Validated Validation Rejected Past N RandGauss RandGaussT RandGaussQ bins stepwise bins RandPoisson RandPoissonT mu< 100 N=50, 000, 000 ------- mu > RandPoissonQ mu< 100 N=50, 000, 000 -------(same as RandPoissonT) mu > RandGauss shoot() etc 2.5 units Validation tests applied and below
Signatures of Hep3Vector::rotate For equivalent ZOOM axis There is no harm in leaving this axis CLHEP has implemented a first forming an identity then rotating that by axis and I leave the CLHEP code alone people are of course free to use the ZOOM originated method with signature which I believe will be faster Return types for rotateZ CLHEP and PhysicsVectors each have these three and they are identical except that the ZOOM version returns a reference to while in CLHEP they return void Having methods that alter an object return a reference to that object is convenient for certain chained and costs nothing I don t wish to potentially break ZOOM user code for no good so I have made these CLHEP method conform to this convention There are a couple of other CLHEP rotate and which use the void return but since these methods or signatures don t appear in the original ZOOM this can t break any so I leave the void return type alone for those After discussion with A P and I have modified the return types of other CLHEP methods which return void and would by the same reasoning be better returning *this These include rotate and boost methods in LorentzVector h HepLorentzVector explicit and leads to division by zero if this vector has which takes very little time I think the zoom implementation is therefore better This
the goal is to keep the overall false rejection probability down at the to level For each validated we discuss which of course is by necessity relative timing We take the time for a single random via one of the fastest good and at any rate the ratios will vary by around depending on the processor and memory configuration used A timing for a distribution of units would mean no time used beyond the uniform random Summary Distribution Validated Validation Rejected Past N RandGauss RandGaussT RandGaussQ bins stepwise bins RandPoisson RandPoissonT mu< 100 N=50, 000, 000 ------- mu > RandPoissonQ mu< 100 N=50, 000, 000 -------(same as RandPoissonT) mu > RandGauss shoot() etc 2.5 units Validation tests applied and a very accurate series is substituted for the table method shoot() etc 1.7 units Validation tests applied and below about **a series approximation is but we have applied this test with N up to million
How the various random distributions are validated The distributions in for example are independently validated By we mean checking that *The algorithm is mathematically correct *The algorithm is properly coded *The compilation of the algorithm is proper for this plaform *There is no subtle interaction between the algorithm and the random engine used that detectably impacts the distribution This validation must be done without reference to the coded algorithm itself(independent). It must be done by generating some(selectable) number of deviates
it has advantages For now
virtual double operator()(double argument) const
Technical Maintenance Note for CLHEP Random Consequences of seeding JamesRandom with positive seed values greater than In the source code JamesRandom The usual way of seeding a generator is via the default which makes use of the table of and the seed is the xor of a mask which starts with a bit and the seed from the table But it can
How the various random distributions are validated The distributions in for example are independently validated By we mean checking that *The algorithm is mathematically correct *The algorithm is properly coded *The compilation of the algorithm is proper for this plaform *There is no subtle interaction between the algorithm and the random engine used that detectably impacts the distribution This validation must be done without reference to the coded algorithm and testing that these obey the mathematical properties of the desired distribution For each those we reject if the distribution is sigma away from the proper we reject
it has advantages For I leave the ZMthrows in
the naive Gaussian approximation is inaccurate at a level which
the goal is to keep the overall false rejection probability down at the to level For each validated we discuss which of course is by necessity relative timing We take the time for a single random via one of the fastest good and at any rate the ratios will vary by around depending on the processor and memory configuration used A timing for a distribution of units would mean no time used beyond the uniform random Summary Distribution Validated Validation Rejected Past N RandGauss RandGaussT RandGaussQ bins stepwise bins RandPoisson RandPoissonT mu< 100 N=50, 000, 000 ------- mu > RandPoissonQ mu< 100 N=50, 000, 000 -------(same as RandPoissonT) mu > RandGauss shoot() etc 2.5 units Validation tests applied and a very accurate series is substituted for the table method shoot() etc 1.7 units Validation tests applied and below about **a series approximation is but we have applied this test with N up to and never get anywhere near the rejection point Analytical considerations indicate that the validation test would not reject until O(10 **24) samples were inspected. ---------------------------------------------------------- 2. RandGeneral Method since we wish to have good resolution power even if just one of the mu values i flawed)
any side effects of that construction would occur twice The semantics of throw x
any side effects of that construction would occur twice The semantics of throw on the other are that x is not constructed an extra time The macro used achievs this
the goal is to keep the overall false rejection probability down at the to level For each validated we discuss which of course is by necessity relative timing We take the time for a single random via one of the fastest good generators(DualRand) to be 1 unit. These are not super-carful timings
often useful for progress reporting and for debugging purposes ZMexWARNING Something unusual has but we have a quite reasonable action to take
#define FUNCTION_OBJECT_IMP(classname)
Issues Concerning the PhysicsVectors CLHEP Vector Merge The merge of ZOOM PhysicsVdectors and the CLHEP Vector package is completed The purpose of this document is to list the major issues that affected the merge of these and where relevant describe the resolutions More detailed documents describe more minor issues General Approach As agreed at the June CLHEP the approach is to combine the features of each ZOOM class with the corresponding CLHEP class expanding the interface to create a single lingua franca of what a I have placed almost all the new features in a second section of the and have created separate cc files for sensible subsets of the methods In if a program uses only the methods found in the original CLHEP very little additional code is linked in Classes The corresponding classes are
We have the boost methods returning HepLorentzVector &rather than so things can be chained we feel the boost methods along an boostZ in really ought to be in the main part of the header ZOOM does several checks to see that the boost vector is not tachyonic However
How the various random distributions are validated The distributions in for example are independently validated By we mean checking that *The algorithm is mathematically correct *The algorithm is properly coded *The compilation of the algorithm is proper for this plaform *There is no subtle interaction between the algorithm and the random engine used that detectably impacts the distribution This validation must be done without reference to the coded algorithm and testing that these obey the mathematical properties of the desired distribution For each those we reject if the distribution is sigma away from the proper we asserting that something is wrong with the algorithm of coding For distributions which will be tested in many ways