ATLAS Offline Software
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
GenGauss3D Class Reference

#include <GenGauss3D.h>

Inheritance diagram for GenGauss3D:
Collaboration diagram for GenGauss3D:

Public Member Functions

 GenGauss3D ()
 
 GenGauss3D (const char *name, const char *title, RooArgList &_xvec, RooArgList &_muvex, RooAbsReal &_vxx, RooAbsReal &_vxy, RooAbsReal &_vxz, RooAbsReal &_vyy, RooAbsReal &_vyz, RooAbsReal &_vzz, TMatrixDSym &dummyMatrix)
 
 GenGauss3D (const GenGauss3D &other, const char *name=0)
 
virtual TObject * clone (const char *newname) const
 
virtual ~GenGauss3D ()
 
Int_t getAnalyticalIntegral (RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const
 
Double_t analyticalIntegral (Int_t code, const char *rangeName=0) const
 
void generateEvent (Int_t code)
 
void updateCov ()
 

Protected Member Functions

Double_t evaluate () const
 

Protected Attributes

RooRealProxy xvec
 
RooRealProxy muvec
 
RooRealProxy vxx
 
RooRealProxy vxy
 
RooRealProxy vxz
 
RooRealProxy vyy
 
RooRealProxy vyz
 
RooRealProxy vzz
 

Detailed Description

Definition at line 22 of file GenGauss3D.h.

Constructor & Destructor Documentation

◆ GenGauss3D() [1/3]

GenGauss3D::GenGauss3D ( )
inline

Definition at line 28 of file GenGauss3D.h.

36 { return new GenGauss3D(*this,newname); }

◆ GenGauss3D() [2/3]

GenGauss3D::GenGauss3D ( const char *  name,
const char *  title,
RooArgList &  _xvec,
RooArgList &  _muvex,
RooAbsReal &  _vxx,
RooAbsReal &  _vxy,
RooAbsReal &  _vxz,
RooAbsReal &  _vyy,
RooAbsReal &  _vyz,
RooAbsReal &  _vzz,
TMatrixDSym &  dummyMatrix 
)

◆ GenGauss3D() [3/3]

GenGauss3D::GenGauss3D ( const GenGauss3D other,
const char *  name = 0 
)

Definition at line 50 of file GenGauss3D.cxx.

50  :
51  RooMultiVarGaussian(other,name),
52  vxx("vxx",this,other.vxx),
53  vxy("vxy",this,other.vxy),
54  vxz("vxz",this,other.vxz),
55  vyy("vyy",this,other.vyy),
56  vyz("vyz",this,other.vyz),
57  vzz("vzz",this,other.vzz)
58  //nUpdates(0),
59  //nChanged(0),
60  //oldVxx(-1),
61  //oldVxy(-1),
62  //oldVyy(-1),
63  //oldVzz(-1)
64  {
65  }

◆ ~GenGauss3D()

virtual GenGauss3D::~GenGauss3D ( )
inlinevirtual

Definition at line 41 of file GenGauss3D.h.

46 :
47 

Member Function Documentation

◆ analyticalIntegral()

Double_t GenGauss3D::analyticalIntegral ( Int_t  code,
const char *  rangeName = 0 
) const

Definition at line 139 of file GenGauss3D.cxx.

140  {
141  // RETURN ANALYTICAL INTEGRAL DEFINED BY RETURN CODE ASSIGNED BY getAnalyticalIntegral
142  // THE MEMBER FUNCTION x.min(rangeName) AND x.max(rangeName) WILL RETURN THE INTEGRATION
143  // BOUNDARIES FOR EACH OBSERVABLE x
144 
145  // assert(code==1) ;
146  // return (x.max(rangeName)-x.min(rangeName)) ;
147 
148  // Since we need to update _cov here, must get rid of const
149  GenGauss3D* self = const_cast<GenGauss3D*>(this);
150  self->updateCov();
151 
152  // Prevent caching of partial integrals - these may depend on the
153  // particular covariance matrix!
154  _anaIntCache.clear();
155 
156  return RooMultiVarGaussian::analyticalIntegral(code,rangeName) ;
157 }

◆ clone()

virtual TObject* GenGauss3D::clone ( const char *  newname) const
inlinevirtual

Definition at line 40 of file GenGauss3D.h.

46 :
47 

◆ evaluate()

Double_t GenGauss3D::evaluate ( ) const
protected

Definition at line 107 of file GenGauss3D.cxx.

108  {
109  // ENTER EXPRESSION IN TERMS OF VARIABLE ARGUMENTS HERE
110 
111  // Since we need to update _cov here, must get rid of const
112  GenGauss3D* self = const_cast<GenGauss3D*>(this);
113  self->updateCov();
114 
116  }

◆ generateEvent()

void GenGauss3D::generateEvent ( Int_t  code)

Definition at line 160 of file GenGauss3D.cxx.

160  {
161  _genCache.clear() ;
162  updateCov();
163  _genCache.clear() ;
164  return RooMultiVarGaussian::generateEvent(code);
165  }

◆ getAnalyticalIntegral()

Int_t GenGauss3D::getAnalyticalIntegral ( RooArgSet &  allVars,
RooArgSet &  analVars,
const char *  rangeName = 0 
) const

Definition at line 120 of file GenGauss3D.cxx.

121  {
122  // LIST HERE OVER WHICH VARIABLES ANALYTICAL INTEGRATION IS SUPPORTED,
123  // ASSIGN A NUMERIC CODE FOR EACH SUPPORTED (SET OF) PARAMETERS
124  // THE EXAMPLE BELOW ASSIGNS CODE 1 TO INTEGRATION OVER VARIABLE X
125  // YOU CAN ALSO IMPLEMENT MORE THAN ONE ANALYTICAL INTEGRAL BY REPEATING THE matchArgs
126  // EXPRESSION MULTIPLE TIMES
127 
128  // if (matchArgs(allVars,analVars,x)) return 1 ;
129 
130  // Since we need to update _cov here, must get rid of const
131  GenGauss3D* self = const_cast<GenGauss3D*>(this);
132  self->updateCov();
133 
134  return RooMultiVarGaussian::getAnalyticalIntegral(allVars,analVars,rangeName) ;
135  }

◆ updateCov()

void GenGauss3D::updateCov ( )

Definition at line 68 of file GenGauss3D.cxx.

68  {
69  //nUpdates++;
70  //if (vxx==oldVxx &&
71  // vyy==oldVyy &&
72  // vxy==oldVxy &&
73  // vzz==oldVzz)
74  // return;
75  //oldVxx = vxx;
76  //oldVyy = vyy;
77  //oldVxy = vxy;
78  //oldVzz = vzz;
79 
80  //nChanged++;
81  //if (nUpdates % 10000 == 0) {
82  // cout << nUpdates << " calls to updateCov" << endl;
83  // cout << nChanged << " calls required recalculation of of covariance matrix" << endl << endl;
84  //}
85 
86  _cov(0,0) = vxx;
87  _cov(0,1) = vxy;
88  _cov(0,2) = vxz;
89  _cov(1,0) = vxy;
90  _cov(1,1) = vyy;
91  _cov(1,2) = vyz;
92  _cov(2,0) = vxz;
93  _cov(2,1) = vyz;
94  _cov(2,2) = vzz;
95  _det = _cov.Determinant();
96 
97  int n = _cov.GetNrows();
98  for (int i=0;i<n;i++) {
99  for (int j=0;j<n;j++) {
100  _covI(i,j)=_cov(i,j);
101  }
102  }
103  _covI.Invert();
104  }

Member Data Documentation

◆ muvec

RooRealProxy GenGauss3D::muvec
protected

Definition at line 53 of file GenGauss3D.h.

◆ vxx

RooRealProxy GenGauss3D::vxx
protected

Definition at line 54 of file GenGauss3D.h.

◆ vxy

RooRealProxy GenGauss3D::vxy
protected

Definition at line 55 of file GenGauss3D.h.

◆ vxz

RooRealProxy GenGauss3D::vxz
protected

Definition at line 56 of file GenGauss3D.h.

◆ vyy

RooRealProxy GenGauss3D::vyy
protected

Definition at line 57 of file GenGauss3D.h.

◆ vyz

RooRealProxy GenGauss3D::vyz
protected

Definition at line 58 of file GenGauss3D.h.

◆ vzz

RooRealProxy GenGauss3D::vzz
protected

Definition at line 59 of file GenGauss3D.h.

◆ xvec

RooRealProxy GenGauss3D::xvec
protected

Definition at line 52 of file GenGauss3D.h.


The documentation for this class was generated from the following files:
GenGauss3D::vyy
RooRealProxy vyy
Definition: GenGauss3D.h:57
LArNewCalib_Delay_OFC_Cali.evaluate
evaluate
Definition: LArNewCalib_Delay_OFC_Cali.py:216
GenGauss3D::vxx
RooRealProxy vxx
Definition: GenGauss3D.h:54
histSizes.code
code
Definition: histSizes.py:129
GenGauss3D::vzz
RooRealProxy vzz
Definition: GenGauss3D.h:59
lumiFormat.i
int i
Definition: lumiFormat.py:85
beamspotman.n
n
Definition: beamspotman.py:731
GenGauss3D::vyz
RooRealProxy vyz
Definition: GenGauss3D.h:58
GenGauss3D::GenGauss3D
GenGauss3D()
Definition: GenGauss3D.h:28
GenGauss3D::vxz
RooRealProxy vxz
Definition: GenGauss3D.h:56
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
GenGauss3D::updateCov
void updateCov()
Definition: GenGauss3D.cxx:68
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
createCoolChannelIdFile.newname
newname
Definition: createCoolChannelIdFile.py:106
GenGauss3D::vxy
RooRealProxy vxy
Definition: GenGauss3D.h:55
GenGauss3D
Definition: GenGauss3D.h:22