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 TH1 * weightedRescaleFactor[50][250]
std::string WeightFileName_
std::vector< std::pair< calib::CalibElectron *, calib::CalibElectron * > > electrons_
std::vector< float > weight_sum_
const std::vector< float > & getOptimizedCoefficientsError() const
ZIterativeAlgorithmWithFit()
Default constructor.
void getWeight(unsigned int evid, std::pair< calib::CalibElectron *, calib::CalibElectron *>, float)
unsigned int currentEvent_
virtual ~ZIterativeAlgorithmWithFit()
Destructor.
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
void recalculateWeightsEnergies()
std::vector< float > calib_fac_
const ZIterativeAlgorithmWithFitPlots * getHistos() const
unsigned int totalEvents_
const std::vector< int > & getOptimizedIterations() const
std::vector< float > Event_Weight_
const std::vector< float > & getWeightSum() const
int getNumberOfChannels() const
float getEventWeight(unsigned int event_id)
const std::vector< float > & getOptimizedCoefficients() const
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)
const std::vector< float > & getOptimizedChiSquare() const
void getStatWeights(const std::string &file)
std::vector< float > optimizedCoefficientsError_
const std::vector< float > & getEpsilonSum() const
std::vector< float > massReco_