1 #ifndef Alignment_MuonAlignmentAlgorithms_MuonResidualsTwoBin_H
2 #define Alignment_MuonAlignmentAlgorithms_MuonResidualsTwoBin_H
80 std::string namePos = name + std::string(
"Pos");
81 std::string nameNeg = name + std::string(
"Neg");
113 std::vector<double> residuals;
115 residuals.push_back((*
r)[which]);
119 residuals.push_back((*
r)[which]);
122 std::sort(residuals.begin(), residuals.end());
123 int length = residuals.size();
124 return residuals[length/2];
127 double mean(
int which,
double truncate) {
131 double value = (*r)[which];
132 if (fabs(value) < truncate) {
139 double value = (*r)[which];
140 if (fabs(value) < truncate) {
149 double wmean(
int which,
int whichredchi2,
double truncate) {
153 double value = (*r)[which];
154 if (fabs(value) < truncate) {
155 double weight = 1./(*r)[whichredchi2];
156 if (TMath::Prob(1./weight*12, 12) < 0.99) {
164 double value = (*r)[which];
165 if (fabs(value) < truncate) {
166 double weight = 1./(*r)[whichredchi2];
167 if (TMath::Prob(1./weight*12, 12) < 0.99) {
177 double stdev(
int which,
double truncate) {
182 double value = (*r)[which];
183 if (fabs(value) < truncate) {
191 double value = (*r)[which];
192 if (fabs(value) < truncate) {
199 return sqrt(sum2/n -
pow(sum/n, 2));
204 std::string namePos = name + std::string(
"Pos");
205 std::string nameNeg = name + std::string(
"Neg");
216 std::string namePos = name + std::string(
"Pos");
217 std::string nameNeg = name + std::string(
"Neg");
269 #endif // Alignment_MuonAlignmentAlgorithms_MuonResidualsTwoBin_H
double wmean(int which, int whichredchi2, double truncate)
MuonResidualsFitter * m_neg
MuonResidualsFitter * m_pos
void fix(int parNum, bool val=true)
void selectPeakResiduals(double nsigma, int nvar, int *vars)
void fill(char charge, double *residual)
std::vector< double * >::const_iterator residualsPos_end() const
void write(FILE *file, int which=0)
long numResiduals() const
void eraseNotSelectedResiduals()
std::vector< double * >::const_iterator residualsNeg_end() const
void read(FILE *file, int which=0)
void setPrintLevel(int printLevel) const
long numResidualsPos() const
double stdev(int which, double truncate)
virtual bool fit(Alignable *ali)=0
void fill(double *residual)
std::vector< bool >::const_iterator residualsPos_ok_end() const
std::vector< bool >::const_iterator residualsPos_ok_begin() const
int residualsModel() const
std::vector< bool >::const_iterator residualsNeg_ok_end() const
std::vector< bool >::const_iterator residualsNeg_ok_begin() const
int residualsModel() const
void plotweighted(std::string name, TFileDirectory *dir, int which, int whichredchi2, double multiplier)
void write(FILE *file, int which=0)
double mean(int which, double truncate)
virtual void correctBField()=0
virtual double plot(std::string name, TFileDirectory *dir, Alignable *ali)=0
std::vector< double * >::const_iterator residualsNeg_begin() const
double antisym(int parNum)
MuonResidualsTwoBin(bool twoBin, MuonResidualsFitter *pos, MuonResidualsFitter *neg)
void plotsimple(std::string name, TFileDirectory *dir, int which, double multiplier)
void setStrategy(int strategy) const
void setStrategy(int strategy)
virtual double sumofweights()=0
void eraseNotSelectedResiduals()
double errorerror(int parNum)
void read(FILE *file, int which=0)
std::vector< double * >::const_iterator residuals_end() const
long numResidualsNeg() const
std::vector< bool > & selectedResidualsFlags()
void plotweighted(std::string name, TFileDirectory *dir, int which, int whichredchi2, double multiplier)
double errorerror(int parNum)
void plotsimple(std::string name, TFileDirectory *dir, int which, double multiplier)
std::vector< double * >::const_iterator residualsPos_begin() const
void setPrintLevel(int printLevel)
void selectPeakResiduals(double nsigma, int nvar, int *vars)
std::vector< double * >::const_iterator residuals_begin() const
virtual int type() const =0
double plot(std::string name, TFileDirectory *dir, Alignable *ali)
void fix(int parNum, bool value=true)
Power< A, B >::type pow(const A &a, const B &b)