Go to the documentation of this file. 1 #ifndef ZITERATIVEALGORITHMWITHFIT_H
2 #define ZITERATIVEALGORITHMWITHFIT_H
11 #include <TClonesArray.h>
25 #define nMaxIterations 50
26 #define nMaxChannels 250
75 static inline float invMassCalc(
float Energy1,
float Eta1,
float Phi1,
float Energy2,
float Eta2,
float Phi2) {
76 return (
sqrt(2 * Energy1 * Energy2 * (1 -
cosTheta12(Eta1, Phi1, Eta2, Phi2))));
79 static inline float cosTheta12(
float Eta1,
float Phi1,
float Eta2,
float Phi2) {
80 return ((
cos(Phi1 - Phi2) + sinh(Eta1) * sinh(Eta2)) / (cosh(Eta1) * cosh(Eta2)));
90 TH1F* histoou,
double* par,
double* errpar,
float nsigmalow,
float nsigmaup,
double* mychi2,
int* iterations);
105 void getWeight(
unsigned int evid, std::pair<calib::CalibElectron*, calib::CalibElectron*>,
float);
122 std::vector<std::pair<calib::CalibElectron*, calib::CalibElectron*> >
electrons_;
145 #endif // ZIterativeAlgorithmWithFit_H
unsigned int totalEvents_
std::vector< int > optimizedIterations_
std::vector< float > calib_fac_
bool addEvent(calib::CalibElectron *, calib::CalibElectron *, float)
void getStatWeights(const std::string &file)
unsigned int currentEvent_
virtual ~ZIterativeAlgorithmWithFit()
Destructor.
ZIterativeAlgorithmWithFitPlots * thePlots_
const std::vector< float > & getOptimizedChiSquare() const
int getNumberOfIterations() const
std::vector< float > optimizedChiSquare_
unsigned int currentIteration_
std::vector< float > Event_Weight_
Cos< T >::type cos(const T &t)
unsigned int numberOfIterations_
std::vector< float > massReco_
void addWeightsCorrections(unsigned int event_id)
ZIterativeAlgorithmWithFit & operator=(const ZIterativeAlgorithmWithFit &r)
Assignment operator.
std::vector< float > optimizedCoefficients_
void getWeight(unsigned int evid, std::pair< calib::CalibElectron *, calib::CalibElectron * >, float)
void recalculateWeightsEnergies()
TH1 * weightedRescaleFactor[50][250]
static void gausfit(TH1F *histoou, double *par, double *errpar, float nsigmalow, float nsigmaup, double *mychi2, int *iterations)
const std::vector< float > & getOptimizedCoefficients() const
static float cosTheta12(float Eta1, float Phi1, float Eta2, float Phi2)
std::string WeightFileName_
std::vector< float > StatWeights_
const std::vector< float > & getEpsilonSum() const
const std::vector< float > & getWeightSum() const
const ZIterativeAlgorithmWithFitPlots * getHistos() const
static float invMassCalc(float Energy1, float Eta1, float Phi1, float Energy2, float Eta2, float Phi2)
std::vector< std::pair< calib::CalibElectron *, calib::CalibElectron * > > electrons_
const std::vector< int > & getOptimizedIterations() const
TH1 * unweightedRescaleFactor[50][250]
float getEventWeight(unsigned int event_id)
std::vector< float > optimizedCoefficientsError_
ZIterativeAlgorithmWithFit()
Default constructor.
int getNumberOfChannels() const
const std::vector< float > & getOptimizedCoefficientsError() const
std::vector< float > weight_sum_