#include <TRTAlignHistoChisqProjection.h>
|
| HistoChisqProjection (const char *name, int dim, int nbins, float xmin, float xmax) |
|
| ~HistoChisqProjection () |
|
| HistoChisqProjection (const HistoChisqProjection &)=delete |
|
HistoChisqProjection & | operator= (const HistoChisqProjection &)=delete |
|
void | add (const CLHEP::HepMatrix &deriv, const CLHEP::HepSymMatrix &weight, const CLHEP::HepSymMatrix &variance, const CLHEP::HepVector &residual) |
|
void | add (const CLHEP::HepMatrix &deriv, const CLHEP::HepSymMatrix &weight, const CLHEP::HepSymMatrix &variance, const CLHEP::HepVector &residual, const CLHEP::HepSymMatrix &secondweight) |
|
CLHEP::HepVector | getFittedHalfDChisqDX (std::ostream &os=std::cout) const |
|
CLHEP::HepVector | getNormalHalfDChisqDX () const |
|
void | setDirectory (TDirectory *dir) |
|
|
void | addfirst (const CLHEP::HepMatrix &derivative, const CLHEP::HepSymMatrix &weight, const CLHEP::HepSymMatrix &variance, const CLHEP::HepVector &residual) |
|
void | addsecond (const CLHEP::HepMatrix &derivative, const CLHEP::HepSymMatrix &weight) |
|
◆ HistoChisqProjection() [1/2]
TRTAlign::HistoChisqProjection::HistoChisqProjection |
( |
const char * |
name, |
|
|
int |
dim, |
|
|
int |
nbins, |
|
|
float |
xmin, |
|
|
float |
xmax |
|
) |
| |
◆ ~HistoChisqProjection()
TRTAlign::HistoChisqProjection::~HistoChisqProjection |
( |
| ) |
|
◆ HistoChisqProjection() [2/2]
◆ add() [1/2]
void TRTAlign::HistoChisqProjection::add |
( |
const CLHEP::HepMatrix & |
deriv, |
|
|
const CLHEP::HepSymMatrix & |
weight, |
|
|
const CLHEP::HepSymMatrix & |
variance, |
|
|
const CLHEP::HepVector & |
residual |
|
) |
| |
|
inline |
◆ add() [2/2]
void TRTAlign::HistoChisqProjection::add |
( |
const CLHEP::HepMatrix & |
deriv, |
|
|
const CLHEP::HepSymMatrix & |
weight, |
|
|
const CLHEP::HepSymMatrix & |
variance, |
|
|
const CLHEP::HepVector & |
residual, |
|
|
const CLHEP::HepSymMatrix & |
secondweight |
|
) |
| |
|
inline |
◆ addfirst()
void TRTAlign::HistoChisqProjection::addfirst |
( |
const CLHEP::HepMatrix & |
derivative, |
|
|
const CLHEP::HepSymMatrix & |
weight, |
|
|
const CLHEP::HepSymMatrix & |
variance, |
|
|
const CLHEP::HepVector & |
residual |
|
) |
| |
|
private |
Definition at line 22 of file TRTAlignHistoChisqProjection.cxx.
25 int dimr =
weight.num_row() ;
26 CLHEP::HepMatrix derivtimesweight(deriv*
weight) ;
28 for(
int irow=1; irow<=dimr; ++irow) {
29 double thissigma = sqrt( variance.fast(irow,irow) ) ;
31 for(
int ipar=0; ipar<
m_dim; ++ipar) {
32 double thisweight = derivtimesweight(ipar+1, irow ) * thissigma ;
33 double thispull =
residual(irow) / thissigma ;
38 m_h2->Fill(
double(ipar), thispull, thisweight ) ;
◆ addsecond()
void TRTAlign::HistoChisqProjection::addsecond |
( |
const CLHEP::HepMatrix & |
derivative, |
|
|
const CLHEP::HepSymMatrix & |
weight |
|
) |
| |
|
private |
◆ getFittedHalfDChisqDX()
CLHEP::HepVector TRTAlign::HistoChisqProjection::getFittedHalfDChisqDX |
( |
std::ostream & |
os = std::cout | ) |
const |
Definition at line 67 of file TRTAlignHistoChisqProjection.cxx.
69 CLHEP::HepVector halfDChisqDX(
m_dim,0) ;
72 for(
int ipar=1; ipar<=
m_dim; ++ipar) {
74 sprintf(hisname,
"tmph1_%d",ipar) ;
75 TH1* tmph1 =
m_h2->ProjectionY(hisname,ipar,ipar,
"e") ;
76 binwidth = tmph1->GetXaxis()->GetBinWidth(1) ;
77 tmph1->SetDirectory(
m_h2->GetDirectory()) ;
78 f1.SetParameter(0,tmph1->Integral());
79 f1.SetParLimits(0,0.5*tmph1->Integral(),2*tmph1->Integral()) ;
80 f1.SetParameter(1,0) ;
81 f1.SetParameter(2,tmph1->GetRMS()) ;
82 tmph1->Fit(&
f1,
"Q0I") ;
83 tmph1->GetListOfFunctions()->Add(
f1.Clone()) ;
84 halfDChisqDX(ipar) =
f1.GetParameter(1) *
m_integrals[ipar-1] ;
85 os <<
"fitresult: " <<
f1.GetParameter(1) <<
" weight: " <<
m_integrals[ipar-1] <<
" integrated mean: "
◆ getNormalHalfDChisqDX()
CLHEP::HepVector TRTAlign::HistoChisqProjection::getNormalHalfDChisqDX |
( |
| ) |
const |
|
inline |
◆ operator=()
◆ setDirectory()
void TRTAlign::HistoChisqProjection::setDirectory |
( |
TDirectory * |
dir | ) |
|
◆ m_dim
int TRTAlign::HistoChisqProjection::m_dim |
|
private |
◆ m_h2
TH2* TRTAlign::HistoChisqProjection::m_h2 |
|
private |
◆ m_halfd2ChisqdX2
CLHEP::HepSymMatrix TRTAlign::HistoChisqProjection::m_halfd2ChisqdX2 |
|
private |
◆ m_halfdChisqdX
CLHEP::HepVector TRTAlign::HistoChisqProjection::m_halfdChisqdX |
|
private |
◆ m_integrals
std::vector<double> TRTAlign::HistoChisqProjection::m_integrals |
|
private |
◆ m_unweightedh2
TH2* TRTAlign::HistoChisqProjection::m_unweightedh2 |
|
private |
The documentation for this class was generated from the following files:
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)