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