18 , _likList(likList_in)
113 , _likList(other._likList)
119 std::cout <<
"ERROR in Neg2LLSum::add: trying to add null pointer" 128 for(
unsigned int i=0; i <
_likList.size(); i++){
133 for(
unsigned int i=0; i <
_likList.size(); i++){
139 for(
unsigned int i=0; i <
_likList.size(); i++){
147 for(
unsigned int i=0; i <
_likList.size(); i++){
155 cout <<
"addConstraints for " <<
getParSet()->
size() <<
" paramaters" << endl;
160 cout <<
"paramater " << i <<
" : " << name_i << endl;
165 add(gaussConstraint);
166 cout <<
"Added gaussian constraint to parameter: " << name_i
168 <<
" and mean = " << constrain.
getVal(0)
169 <<
" and sigma = " << constrain.
getVal(1) << endl ;
170 cout <<
"neg2LL value = " << gaussConstraint->
getVal() << endl;
180 std::vector<std::vector<double> > gradVec;
182 for(
unsigned int i=0; i <
_likList.size(); i++){
184 std::vector<double> grad_tmp(this->
getParSet()->size());
185 for(
unsigned int j=0; j < grad_tmp.size(); j++) grad_tmp[j]= 0.;
189 std::vector<double> tmp;
192 tmp.push_back(grad_tmp[j]);
195 gradVec.push_back(tmp);
198 for(
unsigned int i=0;i< grad.size();i++){
200 for(
unsigned int j=0; j <
_likList.size(); j++){
201 grad.at(i) += gradVec.at(j).at(i);
208 for(
unsigned int i=0; i <
_likList.size(); i++){
209 b = b &&
_likList[i]->useAnalyticGradient();
215 for(
unsigned int j=0; j <
_likList.size(); j++){
virtual void Gradient(std::vector< double > &grad)
Neg2LLSum(MinuitParameterSet *mps=0)
IMinuitParameter * getParPtr(unsigned int i)
virtual void parametersChanged()
unsigned int size() const
virtual const std::string & name() const =0
bool add(IMinimisable *llPtr)
virtual void setUseAnalyticGradient(bool useAnalyticGradient)
MinuitParameterSet * getParSet()
virtual double getVal()=0
virtual const T & getVal(int i=0) const
std::vector< IMinimisable * > _likList
virtual bool useAnalyticGradient()