1 #ifndef BackgroundHandler_h 2 #define BackgroundHandler_h 12 #include <CLHEP/Vector/LorentzVector.h> 21 class TestBackgroundHandler;
39 const std::vector<double> & leftWindowBorders,
40 const std::vector<double> & rightWindowBorders,
41 const double * ResMass,
42 const double * massWindowHalfWidth );
60 void countEventsInAllWindows(
const std::vector<std::pair<reco::Particle::LorentzVector,reco::Particle::LorentzVector> > & muonPairs,
64 void setParameters(
double* Start,
double*
Step,
double* Mini,
double* Maxi,
int* ind, TString* parname,
const std::vector<double> & parBgr,
const std::vector<int> & parBgrOrder,
const int muonType);
67 bool unlockParameter(
const std::vector<int> & resfind,
const unsigned int ipar);
70 std::pair<double, double>
windowBorders(
const bool doBackgroundFit,
const int ires );
77 double resMass(
const bool doBackgroundFit,
const int ires );
85 void rescale( std::vector<double> & parBgr,
const double * ResMass,
const double * massWindowHalfWidth,
86 const std::vector<std::pair<reco::Particle::LorentzVector,reco::Particle::LorentzVector> > & muonPairs,
87 const double & weight = 1. );
95 const double * parval,
const int resTotNum,
const int ires,
96 const bool * resConsidered,
const double * ResMass,
const double ResHalfWidth[],
98 const int MuonType,
const double &
mass,
const double & eta1,
const double & eta2 );
102 const std::vector<double> & leftWindowBorders,
103 const std::vector<double> & rightWindowBorders )
const noexcept(
false);
133 #endif // BackgroundHandler_h
std::vector< MassWindow > backgroundWindow_
int regionsParNum()
Returns the total number of parameters used for the regions.
std::vector< MassWindow > resonanceWindow_
void consistencyCheck(const std::vector< int > &identifiers, const std::vector< double > &leftWindowBorders, const std::vector< double > &rightWindowBorders) const (false)
Used to check the consistency of passed parameters.
std::pair< double, double > backgroundFunction(const bool doBackgroundFit, const double *parval, const int resTotNum, const int ires, const bool *resConsidered, const double *ResMass, const double ResHalfWidth[], const int MuonType, const double &mass, const double &eta1, const double &eta2)
void rescale(std::vector< double > &parBgr, const double *ResMass, const double *massWindowHalfWidth, const std::vector< std::pair< reco::Particle::LorentzVector, reco::Particle::LorentzVector > > &muonPairs, const double &weight=1.)
double resMass(const bool doBackgroundFit, const int ires)
void setParameters(double *Start, double *Step, double *Mini, double *Maxi, int *ind, TString *parname, const std::vector< double > &parBgr, const std::vector< int > &parBgrOrder, const int muonType)
Sets initial parameters for all the functions.
std::pair< double, double > windowBorders(const bool doBackgroundFit, const int ires)
Returns the appropriate window borders depending on whether the background is being fitted and on the...
bool unlockParameter(const std::vector< int > &resfind, const unsigned int ipar)
returns true if the parameter is to be unlocked
void countEventsInAllWindows(const std::vector< std::pair< reco::Particle::LorentzVector, reco::Particle::LorentzVector > > &muonPairs, const double &weight)
bool checkBackgroundWindow(const double &mass, const int iRegion)
Check if the mass value is inside the given background region.
int parNumsResonances_[6]
friend class TestBackgroundHandler
BackgroundHandler(const std::vector< int > &identifiers, const std::vector< double > &leftWindowBorders, const std::vector< double > &rightWindowBorders, const double *ResMass, const double *massWindowHalfWidth)
void initializeParNums()
Initialize the parNums to be used in the shifts of parval.