17 #include "TLorentzVector.h" 28 ,_TheMassConstraint(0)
34 std::vector<TAbsFitParticle*>* ParList2, Double_t
Mass)
55 <<
"Mass constraint in TFitConstraintM cannot be set to a negative value, will be set to 0.";
61 std::vector<TAbsFitParticle*>* ParList1,
62 std::vector<TAbsFitParticle*>* ParList2, Double_t
Mass)
83 <<
"Mass constraint in TFitConstraintM cannot be set to a negative value, will be set to 0.";
156 TMatrixD* DerivativeMatrix =
new TMatrixD(1,4);
157 (*DerivativeMatrix) *= 0.;
162 Double_t Factor = 0.;
163 TLorentzVector Pf(0., 0., 0., 0.);
167 for (
unsigned int i=0;
i<Npart;
i++) {
168 const TLorentzVector* FourVec = (
_ParList1[
i])->getCurr4Vec();
173 <<
"Division by zero in " 174 << IsA()->GetName() <<
" (named " << GetName() <<
", titled " << GetTitle()
175 <<
") will lead to Inf in derivative matrix for particle " 176 << particle->GetName() <<
".";
181 for (
unsigned int i=0;
i<Npart;
i++) {
182 const TLorentzVector* FourVec = (
_ParList2[
i])->getCurr4Vec();
187 <<
"Division by zero in " 188 << IsA()->GetName() <<
" (named " << GetName() <<
", titled " << GetTitle()
189 <<
") will lead to Inf in derivative matrix for particle " 190 << particle->GetName() <<
".";
197 (*DerivativeMatrix)(0,0) = -Pf[0] ;
198 (*DerivativeMatrix)(0,1) = -Pf[1];
199 (*DerivativeMatrix)(0,2) = -Pf[2];
200 (*DerivativeMatrix)(0,3) = +Pf[3];
201 (*DerivativeMatrix) *= Factor;
203 return DerivativeMatrix;
211 Double_t InitValue(0) ;
219 Double_t CurrentValue(0);
230 UInt_t Npart = List->size();
231 for (
unsigned int i=0;
i<Npart;
i++) {
232 ok = (particle == (*List)[
i]);
241 TLorentzVector
P(0., 0., 0., 0.);
242 UInt_t Npart = List->size();
243 for (
unsigned int i=0;
i<Npart;
i++) {
244 const TLorentzVector* FourVec = 0;
246 FourVec = ((*List)[
i])->getIni4Vec();
248 FourVec = ((*List)[
i])->getCurr4Vec();
257 std::stringstream
info;
258 info << std::scientific << std::setprecision(6);
260 info <<
"__________________________" << std::endl
262 info <<
"OBJ: " << IsA()->GetName() <<
"\t" << GetName() <<
"\t" << GetTitle() << std::endl;
264 info <<
"initial value: " <<
getInitValue() << std::endl;
void addParticles1(TAbsFitParticle *p1, TAbsFitParticle *p2=0, TAbsFitParticle *p3=0, TAbsFitParticle *p4=0, TAbsFitParticle *p5=0, TAbsFitParticle *p6=0, TAbsFitParticle *p7=0, TAbsFitParticle *p8=0, TAbsFitParticle *p9=0, TAbsFitParticle *p10=0)
Double_t CalcMass(std::vector< TAbsFitParticle * > *List, Bool_t IniVal)
virtual ~TFitConstraintM()
Double_t _TheMassConstraint
Bool_t OnList(std::vector< TAbsFitParticle * > *List, TAbsFitParticle *particle)
void addParticles2(TAbsFitParticle *p1, TAbsFitParticle *p2=0, TAbsFitParticle *p3=0, TAbsFitParticle *p4=0, TAbsFitParticle *p5=0, TAbsFitParticle *p6=0, TAbsFitParticle *p7=0, TAbsFitParticle *p8=0, TAbsFitParticle *p9=0, TAbsFitParticle *p10=0)
virtual Double_t getInitValue()
virtual TMatrixD * getDerivative(TAbsFitParticle *particle)
std::pair< OmniClusterRef, TrackingParticleRef > P
std::vector< TAbsFitParticle * > _ParList1
void addParticle1(TAbsFitParticle *particle)
virtual Double_t getCurrentValue()
virtual TString getInfoString()
std::vector< TAbsFitParticle * > _ParList2
void addParticle2(TAbsFitParticle *particle)