1 #ifndef Alignment_MuonAlignmentAlgorithms_MuonResidualsTwoBin_H 2 #define Alignment_MuonAlignmentAlgorithms_MuonResidualsTwoBin_H 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];
132 if (fabs(value) < truncate) {
140 if (fabs(value) < truncate) {
154 if (fabs(value) < truncate) {
155 double weight = 1./(*r)[whichredchi2];
156 if (TMath::Prob(1./weight*12, 12) < 0.99) {
165 if (fabs(value) < truncate) {
166 double weight = 1./(*r)[whichredchi2];
167 if (TMath::Prob(1./weight*12, 12) < 0.99) {
183 if (fabs(value) < truncate) {
192 if (fabs(value) < truncate) {
199 return sqrt(sum2/n -
pow(sum/n, 2));
274 #endif // Alignment_MuonAlignmentAlgorithms_MuonResidualsTwoBin_H
double wmean(int which, int whichredchi2, double truncate)
MuonResidualsFitter * m_neg
MuonResidualsFitter * m_pos
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 fix(int parNum, bool dofix=true)
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)
virtual int type() const =0
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)
void fiducialCuts(double xMin=-80.0, double xMax=80.0, double yMin=-80.0, double yMax=80.0, bool fidcut1=false)
std::vector< double * >::const_iterator residuals_end() const
long numResidualsNeg() const
int useRes(int pattern=-1)
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
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)