#include <KinematicFit.h>
Inheritance diagram for KinematicFit:
Public Member Functions | |
void | AddEqualMass (int number, std::vector< int > tlis1, std::vector< int > tlis2) |
void | AddEqualMass (int number, std::vector< int > tlis1, std::vector< int > tlis2) |
void | AddFourMomentum (int number, double etot) |
void | AddFourMomentum (int number, HepLorentzVector p4) |
void | AddFourMomentum (int number, double etot) |
void | AddFourMomentum (int number, HepLorentzVector p4) |
std::vector< int > | AddList (int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, int n10, int n11, int n12) |
std::vector< int > | AddList (int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, int n10, int n11) |
std::vector< int > | AddList (int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, int n10) |
std::vector< int > | AddList (int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9) |
std::vector< int > | AddList (int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8) |
std::vector< int > | AddList (int n1, int n2, int n3, int n4, int n5, int n6, int n7) |
std::vector< int > | AddList (int n1, int n2, int n3, int n4, int n5, int n6) |
std::vector< int > | AddList (int n1, int n2, int n3, int n4, int n5) |
std::vector< int > | AddList (int n1, int n2, int n3, int n4) |
std::vector< int > | AddList (int n1, int n2, int n3) |
std::vector< int > | AddList (int n1, int n2) |
std::vector< int > | AddList (int n1) |
std::vector< int > | AddList (int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, int n10, int n11, int n12) |
std::vector< int > | AddList (int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, int n10, int n11) |
std::vector< int > | AddList (int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, int n10) |
std::vector< int > | AddList (int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9) |
std::vector< int > | AddList (int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8) |
std::vector< int > | AddList (int n1, int n2, int n3, int n4, int n5, int n6, int n7) |
std::vector< int > | AddList (int n1, int n2, int n3, int n4, int n5, int n6) |
std::vector< int > | AddList (int n1, int n2, int n3, int n4, int n5) |
std::vector< int > | AddList (int n1, int n2, int n3, int n4) |
std::vector< int > | AddList (int n1, int n2, int n3) |
std::vector< int > | AddList (int n1, int n2) |
std::vector< int > | AddList (int n1) |
void | AddMissTrack (const int number, const HepLorentzVector p4) |
void | AddMissTrack (const int number, const RecEmcShower *trk) |
void | AddMissTrack (const int number, const double mass, const RecEmcShower *trk) |
void | AddMissTrack (const int number, const double mass, const HepLorentzVector p4) |
void | AddMissTrack (const int number, const double mass) |
void | AddMissTrack (const int number, const HepLorentzVector p4) |
void | AddMissTrack (const int number, const RecEmcShower *trk) |
void | AddMissTrack (const int number, const double mass, const RecEmcShower *trk) |
void | AddMissTrack (const int number, const double mass, const HepLorentzVector p4) |
void | AddMissTrack (const int number, const double mass) |
void | AddResonance (int number, double mres, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, int n10, int n11, int n12) |
void | AddResonance (int number, double mres, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, int n10, int n11) |
void | AddResonance (int number, double mres, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, int n10) |
void | AddResonance (int number, double mres, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9) |
void | AddResonance (int number, double mres, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8) |
void | AddResonance (int number, double mres, int n1, int n2, int n3, int n4, int n5, int n6, int n7) |
void | AddResonance (int number, double mres, int n1, int n2, int n3, int n4, int n5, int n6) |
void | AddResonance (int number, double mres, int n1, int n2, int n3, int n4, int n5) |
void | AddResonance (int number, double mres, int n1, int n2, int n3, int n4) |
void | AddResonance (int number, double mres, int n1, int n2, int n3) |
void | AddResonance (int number, double mres, int n1, int n2) |
void | AddResonance (int number, double mres, int n1) |
void | AddResonance (int number, double mres, std::vector< int > tlis) |
void | AddResonance (int number, double mres, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, int n10, int n11, int n12) |
void | AddResonance (int number, double mres, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, int n10, int n11) |
void | AddResonance (int number, double mres, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, int n10) |
void | AddResonance (int number, double mres, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9) |
void | AddResonance (int number, double mres, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8) |
void | AddResonance (int number, double mres, int n1, int n2, int n3, int n4, int n5, int n6, int n7) |
void | AddResonance (int number, double mres, int n1, int n2, int n3, int n4, int n5, int n6) |
void | AddResonance (int number, double mres, int n1, int n2, int n3, int n4, int n5) |
void | AddResonance (int number, double mres, int n1, int n2, int n3, int n4) |
void | AddResonance (int number, double mres, int n1, int n2, int n3) |
void | AddResonance (int number, double mres, int n1, int n2) |
void | AddResonance (int number, double mres, int n1) |
void | AddResonance (int number, double mres, std::vector< int > tlis) |
void | AddThreeMomentum (int number, Hep3Vector p3) |
void | AddThreeMomentum (int number, Hep3Vector p3) |
void | AddTotalEnergy (int number, double etot, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, int n10, int n11, int n12) |
void | AddTotalEnergy (int number, double etot, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, int n10, int n11) |
void | AddTotalEnergy (int number, double etot, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, int n10) |
void | AddTotalEnergy (int number, double etot, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9) |
void | AddTotalEnergy (int number, double etot, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8) |
void | AddTotalEnergy (int number, double etot, int n1, int n2, int n3, int n4, int n5, int n6, int n7) |
void | AddTotalEnergy (int number, double etot, int n1, int n2, int n3, int n4, int n5, int n6) |
void | AddTotalEnergy (int number, double etot, int n1, int n2, int n3, int n4, int n5) |
void | AddTotalEnergy (int number, double etot, int n1, int n2, int n3, int n4) |
void | AddTotalEnergy (int number, double etot, int n1, int n2, int n3) |
void | AddTotalEnergy (int number, double etot, int n1, int n2) |
void | AddTotalEnergy (int number, double etot, int n1) |
void | AddTotalEnergy (int number, double etot, std::vector< int > lis) |
void | AddTotalEnergy (int number, double etot, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, int n10, int n11, int n12) |
void | AddTotalEnergy (int number, double etot, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, int n10, int n11) |
void | AddTotalEnergy (int number, double etot, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, int n10) |
void | AddTotalEnergy (int number, double etot, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9) |
void | AddTotalEnergy (int number, double etot, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8) |
void | AddTotalEnergy (int number, double etot, int n1, int n2, int n3, int n4, int n5, int n6, int n7) |
void | AddTotalEnergy (int number, double etot, int n1, int n2, int n3, int n4, int n5, int n6) |
void | AddTotalEnergy (int number, double etot, int n1, int n2, int n3, int n4, int n5) |
void | AddTotalEnergy (int number, double etot, int n1, int n2, int n3, int n4) |
void | AddTotalEnergy (int number, double etot, int n1, int n2, int n3) |
void | AddTotalEnergy (int number, double etot, int n1, int n2) |
void | AddTotalEnergy (int number, double etot, int n1) |
void | AddTotalEnergy (int number, double etot, std::vector< int > lis) |
void | AddTotalMomentum (int number, double ptot, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, int n10, int n11, int n12) |
void | AddTotalMomentum (int number, double ptot, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, int n10, int n11) |
void | AddTotalMomentum (int number, double ptot, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, int n10) |
void | AddTotalMomentum (int number, double ptot, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9) |
void | AddTotalMomentum (int number, double ptot, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8) |
void | AddTotalMomentum (int number, double ptot, int n1, int n2, int n3, int n4, int n5, int n6, int n7) |
void | AddTotalMomentum (int number, double ptot, int n1, int n2, int n3, int n4, int n5, int n6) |
void | AddTotalMomentum (int number, double ptot, int n1, int n2, int n3, int n4, int n5) |
void | AddTotalMomentum (int number, double ptot, int n1, int n2, int n3, int n4) |
void | AddTotalMomentum (int number, double ptot, int n1, int n2, int n3) |
void | AddTotalMomentum (int number, double ptot, int n1, int n2) |
void | AddTotalMomentum (int number, double ptot, int n1) |
void | AddTotalMomentum (int number, double ptot, std::vector< int > lis) |
void | AddTotalMomentum (int number, double ptot, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, int n10, int n11, int n12) |
void | AddTotalMomentum (int number, double ptot, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, int n10, int n11) |
void | AddTotalMomentum (int number, double ptot, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, int n10) |
void | AddTotalMomentum (int number, double ptot, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9) |
void | AddTotalMomentum (int number, double ptot, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8) |
void | AddTotalMomentum (int number, double ptot, int n1, int n2, int n3, int n4, int n5, int n6, int n7) |
void | AddTotalMomentum (int number, double ptot, int n1, int n2, int n3, int n4, int n5, int n6) |
void | AddTotalMomentum (int number, double ptot, int n1, int n2, int n3, int n4, int n5) |
void | AddTotalMomentum (int number, double ptot, int n1, int n2, int n3, int n4) |
void | AddTotalMomentum (int number, double ptot, int n1, int n2, int n3) |
void | AddTotalMomentum (int number, double ptot, int n1, int n2) |
void | AddTotalMomentum (int number, double ptot, int n1) |
void | AddTotalMomentum (int number, double ptot, std::vector< int > lis) |
void | AddTrack (const int number, const WTrackParameter wtrk) |
void | AddTrack (const int number, const double mass, const RecEmcShower *trk) |
void | AddTrack (const int number, const double mass, const RecMdcKalTrack *trk) |
void | AddTrack (const int number, const double mass, const RecMdcTrack *trk) |
void | AddTrack (const int number, const WTrackParameter wtrk) |
void | AddTrack (const int number, const double mass, const RecEmcShower *trk) |
void | AddTrack (const int number, const double mass, const RecMdcKalTrack *trk) |
void | AddTrack (const int number, const double mass, const RecMdcTrack *trk) |
void | AddTrackVertex (const int number, const double mass, const RecEmcShower *trk) |
void | AddTrackVertex (const int number, const double mass, const RecEmcShower *trk) |
void | BuildVirtualParticle (int number) |
void | BuildVirtualParticle (int number) |
double | chisq (int n) const |
double | chisq () const |
double | chisq (int n) const |
double | chisq () const |
void | clearGammaShape () |
void | clearGammaShape () |
void | clearGammaShapeList () |
void | clearGammaShapeList () |
void | clearMapkinematic () |
void | clearMapkinematic () |
void | clearMappositionA () |
void | clearMappositionA () |
void | clearMappositionB () |
void | clearMappositionB () |
void | clearone () |
void | clearone () |
void | cleartwo () |
void | cleartwo () |
void | clearWTrackInfit () |
void | clearWTrackInfit () |
void | clearWTrackList () |
void | clearWTrackList () |
void | clearWTrackOrigin () |
void | clearWTrackOrigin () |
double | collideangle () const |
double | collideangle () const |
HepVector | cpu () const |
HepVector | cpu () const |
bool | dynamicerror () const |
bool | dynamicerror () const |
double | espread () const |
double | espread () const |
bool | Fit (int n) |
bool | Fit () |
bool | Fit (int n) |
bool | Fit () |
int | GammaShapeList (int n) const |
std::vector< int > | GammaShapeList () const |
int | GammaShapeList (int n) const |
std::vector< int > | GammaShapeList () const |
GammaShape | GammaShapeValue (int n) const |
std::vector< GammaShape > | GammaShapeValue () const |
GammaShape | GammaShapeValue (int n) const |
std::vector< GammaShape > | GammaShapeValue () const |
HepPoint3D | getBeamPosition () const |
HepPoint3D | getBeamPosition () const |
HepSymMatrix | getVBeamPosition () const |
HepSymMatrix | getVBeamPosition () const |
WTrackParameter | infit (int n) const |
WTrackParameter | infit (int n) const |
void | init () |
void | init () |
vector< int > | mapkinematic () const |
vector< int > | mapkinematic () const |
vector< int > | mappositionA () const |
vector< int > | mappositionA () const |
vector< int > | mappositionB () const |
vector< int > | mappositionB () const |
int | numberGammaShape () const |
int | numberGammaShape () const |
int | numberone () const |
int | numberone () const |
int | numbertwo () const |
int | numbertwo () const |
int | numberWTrack () const |
int | numberWTrack () const |
WTrackParameter | origin (int n) const |
WTrackParameter | origin (int n) const |
HepLorentzVector | pfit (int n) const |
HepLorentzVector | pfit (int n) const |
HepLorentzVector | pfit1 (int n) const |
HepLorentzVector | pfit1 (int n) const |
HepVector | pull (int n) |
HepVector | pull (int n) |
void | setBeamPosition (const HepPoint3D BeamPosition) |
void | setBeamPosition (const HepPoint3D BeamPosition) |
void | setChisqCut (const double chicut=200, const double chiter=0.05) |
void | setChisqCut (const double chicut=200, const double chiter=0.05) |
void | setCollideangle (const double collideangle=11e-3) |
void | setCollideangle (const double collideangle=11e-3) |
void | setDynamicerror (const bool dynamicerror=1) |
void | setDynamicerror (const bool dynamicerror=1) |
void | setEspread (const double espread=0.0009) |
void | setEspread (const double espread=0.0009) |
void | setFlag (const bool flag=1) |
void | setFlag (const bool flag=1) |
void | setGammaShape (const GammaShape gammashape) |
void | setGammaShape (const int n, const GammaShape gammashape) |
void | setGammaShape (const GammaShape gammashape) |
void | setGammaShape (const int n, const GammaShape gammashape) |
void | setGammaShapeList (const int n) |
void | setGammaShapeList (const int n) |
void | setIterNumber (const int niter=5) |
void | setIterNumber (const int niter=5) |
void | setKalman (const int kalman) |
void | setKalman (const int kalman) |
void | setMapkinematic (const int n) |
void | setMapkinematic (const int n) |
void | setMappositionA (const int n) |
void | setMappositionA (const int n) |
void | setMappositionB (const int n) |
void | setMappositionB (const int n) |
void | setVBeamPosition (const HepSymMatrix VBeamPosition) |
void | setVBeamPosition (const HepSymMatrix VBeamPosition) |
void | setWTrackInfit (const WTrackParameter wtrk) |
void | setWTrackInfit (const int n, const WTrackParameter wtrk) |
void | setWTrackInfit (const WTrackParameter wtrk) |
void | setWTrackInfit (const int n, const WTrackParameter wtrk) |
void | setWTrackList (const int n) |
void | setWTrackList (const int n) |
void | setWTrackOrigin (const WTrackParameter wtrk) |
void | setWTrackOrigin (const int n, const WTrackParameter wtrk) |
void | setWTrackOrigin (const WTrackParameter wtrk) |
void | setWTrackOrigin (const int n, const WTrackParameter wtrk) |
WTrackParameter | wTrackInfit (int n) const |
std::vector< WTrackParameter > | wTrackInfit () const |
WTrackParameter | wTrackInfit (int n) const |
std::vector< WTrackParameter > | wTrackInfit () const |
int | wTrackList (int n) const |
std::vector< int > | wTrackList () const |
int | wTrackList (int n) const |
std::vector< int > | wTrackList () const |
WTrackParameter | wTrackOrigin (int n) const |
std::vector< WTrackParameter > | wTrackOrigin () const |
WTrackParameter | wTrackOrigin (int n) const |
std::vector< WTrackParameter > | wTrackOrigin () const |
WTrackParameter | wVirtualTrack (int n) const |
WTrackParameter | wVirtualTrack (int n) const |
~KinematicFit () | |
~KinematicFit () | |
Static Public Member Functions | |
KinematicFit * | instance () |
KinematicFit * | instance () |
Private Member Functions | |
HepSymMatrix | covInfit (int i) const |
HepSymMatrix | covInfit (int i) const |
void | covMatrix (int n) |
void | covMatrix (int n) |
HepSymMatrix | covOrigin (int i) const |
HepSymMatrix | covOrigin (int i) const |
HepMatrix | D (int ic, int itk) const |
HepMatrix | D (int ic, int itk) const |
HepMatrix | DT (int itk, int ic) const |
HepMatrix | DT (int itk, int ic) const |
void | fit (int n) |
void | fit () |
void | fit (int n) |
void | fit () |
void | fits () |
void | fits () |
void | gda () |
void | gda () |
KinematicFit () | |
KinematicFit () | |
HepLorentzVector | p4Infit (int i) const |
HepLorentzVector | p4Infit (int i) const |
HepLorentzVector | p4Origin (int i) const |
HepLorentzVector | p4Origin (int i) const |
HepVector | pInfit (int i) const |
HepVector | pInfit (int i) const |
HepVector | pOrigin (int i) const |
HepVector | pOrigin (int i) const |
void | setCovInfit (int i, const HepSymMatrix &c) |
void | setCovInfit (int i, const HepSymMatrix &c) |
void | setCovOrigin (int i, const HepSymMatrix &c) |
void | setCovOrigin (int i, const HepSymMatrix &c) |
void | setD (int ic, int itk, const HepMatrix &p) |
void | setD (int ic, int itk, const HepMatrix &p) |
void | setDT (int itk, int ic, const HepMatrix &p) |
void | setDT (int itk, int ic, const HepMatrix &p) |
void | setMassvector (int i, const double mass) |
void | setMassvector (int i, const double mass) |
void | setPInfit (int i, const HepVector &p) |
void | setPInfit (int i, const HepVector &p) |
void | setPOrigin (int i, const HepVector &p) |
void | setPOrigin (int i, const HepVector &p) |
void | upCovmtx () |
void | upCovmtx () |
void | updateConstraints (KinematicConstraints kc) |
void | updateConstraints (KinematicConstraints kc) |
Private Attributes | |
double | m_chi |
double | m_chicut |
std::vector< double > | m_chisq |
std::vector< double > | m_chisq |
double | m_chiter |
double | m_collideangle |
HepSymMatrix | m_covInfit |
HepSymMatrix | m_covOrigin |
HepVector | m_cpu |
HepVector | m_d |
HepMatrix | m_D |
HepMatrix | m_DT |
bool | m_dynamicerror |
double | m_espread |
bool | m_flag |
int | m_kalman |
std::vector< KinematicConstraints > | m_kc |
std::vector< KinematicConstraints > | m_kc |
HepMatrix | m_KP |
HepVector | m_massvector |
int | m_nc |
int | m_niter |
int | m_nktrk |
HepVector | m_pInfit |
HepVector | m_pOrigin |
HepSymMatrix | m_VD |
std::vector< WTrackParameter > | m_virtual_wtrk |
std::vector< WTrackParameter > | m_virtual_wtrk |
Static Private Attributes | |
const int | EqualMass = 64 |
const int | FourMomentum = 32 |
KinematicFit * | m_pointer |
KinematicFit * | m_pointer = 0 |
const int | NTRKPAR = 3 |
const int | Position = 8 |
const int | Resonance = 1 |
const int | ThreeMomentum = 16 |
const int | TotalEnergy = 2 |
const int | TotalMomentum = 4 |
|
00028 {
00029 // if(m_pointer) delete m_pointer;
00030 }
|
|
00026 {;}
|
|
|
|
|
|
|
|
00322 { 00323 KinematicConstraints kc; 00324 HepSymMatrix Vne = HepSymMatrix(1,0); 00325 kc.EqualMassConstraints(tlis1, tlis2, Vne); 00326 m_kc.push_back(kc); 00327 if((unsigned int) number != m_kc.size()-1) 00328 std::cout << "wrong kinematic constraints index" << std::endl; 00329 }
|
|
|
|
|
|
00379 { 00380 00381 HepLorentzVector p4(0.0, 0.0, 0.0, etot); 00382 std::vector<int> tlis; 00383 tlis.clear(); 00384 KinematicConstraints kc; 00385 00386 for(int i = 0; i < numberWTrack(); i++) { 00387 tlis.push_back(i); 00388 } 00389 HepSymMatrix Vme = HepSymMatrix (4,0); 00390 Vme[3][3] = 2*m_espread*m_espread; 00391 // kc.FourMomentumConstraints(p4, tlis, Vme); 00392 kc.FourMomentumConstraints(p4, tlis, Vme); 00393 m_kc.push_back(kc); 00394 if((unsigned int) number != m_kc.size()-1) 00395 std::cout << "wrong kinematic constraints index" << std::endl; 00396 }
|
|
00354 { 00355 00356 std::vector<int> tlis; 00357 tlis.clear(); 00358 KinematicConstraints kc; 00359 00360 for(int i = 0; i < numberWTrack(); i++) { 00361 tlis.push_back(i); 00362 } 00363 // for(int i = 0; i < numberWTrack_V(); i++) { 00364 // tlis_V.push_back(i); 00365 // } 00366 00367 HepSymMatrix Vme = HepSymMatrix(4,0); 00368 Vme[0][0] = 2*m_espread*m_espread*sin(m_collideangle)*sin(m_collideangle); 00369 Vme[0][3] = 2*m_espread*m_espread*sin(m_collideangle); 00370 Vme[3][3] = 2*m_espread*m_espread; 00371 00372 // kc.FourMomentumConstraints(p4, tlis, Vme); 00373 kc.FourMomentumConstraints(p4, tlis, Vme); 00374 m_kc.push_back(kc); 00375 if((unsigned int) number != m_kc.size()-1) 00376 std::cout << "wrong kinematic constraints index" << std::endl; 00377 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
00619 {
00620 std::vector<int> lis;
00621 lis.clear();
00622 lis.push_back(n1);
00623 lis.push_back(n2);
00624 lis.push_back(n3);
00625 lis.push_back(n4);
00626 lis.push_back(n5);
00627 lis.push_back(n6);
00628 lis.push_back(n7);
00629 lis.push_back(n8);
00630 lis.push_back(n9);
00631 lis.push_back(n10);
00632 lis.push_back(n11);
00633 lis.push_back(n12);
00634 return lis;
00635 }
|
|
00601 {
00602 std::vector<int> lis;
00603 lis.clear();
00604 lis.push_back(n1);
00605 lis.push_back(n2);
00606 lis.push_back(n3);
00607 lis.push_back(n4);
00608 lis.push_back(n5);
00609 lis.push_back(n6);
00610 lis.push_back(n7);
00611 lis.push_back(n8);
00612 lis.push_back(n9);
00613 lis.push_back(n10);
00614 lis.push_back(n11);
00615 return lis;
00616 }
|
|
00584 {
00585 std::vector<int> lis;
00586 lis.clear();
00587 lis.push_back(n1);
00588 lis.push_back(n2);
00589 lis.push_back(n3);
00590 lis.push_back(n4);
00591 lis.push_back(n5);
00592 lis.push_back(n6);
00593 lis.push_back(n7);
00594 lis.push_back(n8);
00595 lis.push_back(n9);
00596 lis.push_back(n10);
00597 return lis;
00598 }
|
|
00568 {
00569 std::vector<int> lis;
00570 lis.clear();
00571 lis.push_back(n1);
00572 lis.push_back(n2);
00573 lis.push_back(n3);
00574 lis.push_back(n4);
00575 lis.push_back(n5);
00576 lis.push_back(n6);
00577 lis.push_back(n7);
00578 lis.push_back(n8);
00579 lis.push_back(n9);
00580 return lis;
00581 }
|
|
00553 {
00554 std::vector<int> lis;
00555 lis.clear();
00556 lis.push_back(n1);
00557 lis.push_back(n2);
00558 lis.push_back(n3);
00559 lis.push_back(n4);
00560 lis.push_back(n5);
00561 lis.push_back(n6);
00562 lis.push_back(n7);
00563 lis.push_back(n8);
00564 return lis;
00565 }
|
|
00540 {
00541 std::vector<int> lis;
00542 lis.clear();
00543 lis.push_back(n1);
00544 lis.push_back(n2);
00545 lis.push_back(n3);
00546 lis.push_back(n4);
00547 lis.push_back(n5);
00548 lis.push_back(n6);
00549 lis.push_back(n7);
00550 return lis;
00551 }
|
|
00528 {
00529 std::vector<int> lis;
00530 lis.clear();
00531 lis.push_back(n1);
00532 lis.push_back(n2);
00533 lis.push_back(n3);
00534 lis.push_back(n4);
00535 lis.push_back(n5);
00536 lis.push_back(n6);
00537 return lis;
00538 }
|
|
00517 {
00518 std::vector<int> lis;
00519 lis.clear();
00520 lis.push_back(n1);
00521 lis.push_back(n2);
00522 lis.push_back(n3);
00523 lis.push_back(n4);
00524 lis.push_back(n5);
00525 return lis;
00526 }
|
|
00507 {
00508 std::vector<int> lis;
00509 lis.clear();
00510 lis.push_back(n1);
00511 lis.push_back(n2);
00512 lis.push_back(n3);
00513 lis.push_back(n4);
00514 return lis;
00515 }
|
|
00498 {
00499 std::vector<int> lis;
00500 lis.clear();
00501 lis.push_back(n1);
00502 lis.push_back(n2);
00503 lis.push_back(n3);
00504 return lis;
00505 }
|
|
00490 {
00491 std::vector<int> lis;
00492 lis.clear();
00493 lis.push_back(n1);
00494 lis.push_back(n2);
00495 return lis;
00496 }
|
|
00483 {
00484 std::vector<int> lis;
00485 lis.clear();
00486 lis.push_back(n1);
00487 return lis;
00488 }
|
|
|
|
|
|
|
|
|
|
|
|
00403 { 00404 double dphi = 1E+3; 00405 double dthe = 1E+3; 00406 double dE = 1E+3; 00407 WTrackParameter wtrk(p4, dphi, dthe, dE); 00408 HepSymMatrix Ew = HepSymMatrix(7,0); 00409 for (int i = 0; i < 7; i++) { 00410 for (int j = 0; j < 7; j++) { 00411 if(i==j) Ew[i][j] = 1E+6; 00412 } 00413 } 00414 wtrk.setType(1); 00415 wtrk.setEw(Ew); 00416 setWTrackOrigin(wtrk); 00417 setWTrackInfit(wtrk); 00418 setWTrackList(number); 00419 setMapkinematic(2); 00420 setMappositionA(m_numberone); 00421 setMappositionB(m_numbertwo); 00422 m_numbertwo = m_numbertwo + 4; 00423 }
|
|
00250 { 00251 // 00252 //parameters: phi lambda mass E 00253 // 00254 00255 double mass = 0; 00256 double ptrk = trk->energy(); 00257 double e = sqrt(ptrk*ptrk + mass * mass); 00258 double the = trk->theta(); 00259 double phi = trk->phi(); 00260 HepLorentzVector p4( e* sin(the) * cos(phi), 00261 e * sin(the) * sin(phi), 00262 e * cos(the), 00263 e); 00264 double dphi = trk->dphi(); 00265 double dthe = trk->dtheta(); 00266 double de = 1E+6; 00267 double x = trk->x(); 00268 double y = trk->y(); 00269 double z = trk->z(); 00270 00271 HepPoint3D x3 (x, y ,z); 00272 WTrackParameter wtrk(x3, p4 ,dphi ,dthe, de); 00273 HepSymMatrix Vpe = HepSymMatrix(2,0); 00274 //=== get Vclus=== 00275 HepSymMatrix Vclus = HepSymMatrix (3,0); 00276 Vclus = (wtrk.Ew()).sub(5,7); 00277 double xpr = x - m_BeamPosition[0]; 00278 double ypr = y - m_BeamPosition[1]; 00279 double zpr = z - m_BeamPosition[2]; 00280 double Rpr = sqrt(xpr*xpr + ypr*ypr); 00281 // === get jacobi === 00282 HepMatrix J(2,3,0); 00283 J[0][0] = -ypr/(Rpr*Rpr); 00284 J[0][1] = xpr/(Rpr*Rpr); 00285 J[1][0] = -xpr * zpr/(Rpr*Rpr*Rpr); 00286 J[1][1] = -ypr * zpr/(Rpr*Rpr*Rpr); 00287 J[1][2] = 1/Rpr; 00288 Vpe = Vclus.similarity(J) + m_VBeamPosition.similarity(J); 00289 Vpe[0][1]=0; 00290 double phipre = atan(ypr/xpr); 00291 00292 if(xpr<0){ 00293 phipre = atan(ypr/xpr) + 3.1415926; 00294 } 00295 double lambdapre = zpr/Rpr; 00296 00297 00298 HepVector plmp(4 , 0); 00299 plmp[0] = phipre; 00300 plmp[1] = lambdapre; 00301 plmp[2] = mass; 00302 plmp[3] = e; 00303 wtrk.setPlmp(plmp); 00304 00305 HepSymMatrix Vplm(2,0); 00306 Vplm[0][0] = Vpe[0][0]; 00307 Vplm[1][1] = Vpe[1][1]; 00308 wtrk.setVplm(Vplm); 00309 00310 00311 00312 // === set p4 === 00313 double p0x = ptrk*cos(phipre)/sqrt(1 + lambdapre*lambdapre); 00314 double p0y = ptrk*sin(phipre)/sqrt(1 + lambdapre*lambdapre); 00315 double p0z = ptrk*lambdapre/sqrt(1 + lambdapre*lambdapre); 00316 double p0e = e; 00317 00318 wtrk.setW(0,p0x); 00319 wtrk.setW(1,p0y); 00320 wtrk.setW(2,p0z); 00321 wtrk.setW(3,p0e); 00322 00323 wtrk.setType(1); 00324 setWTrackOrigin(wtrk); 00325 setWTrackInfit(wtrk); 00326 setWTrackList(number); 00327 GammaShape gtrk(p4,dphi,dthe,de); 00328 setGammaShape(gtrk); 00329 setGammaShapeList(number); 00330 setMapkinematic(4); 00331 setMappositionA(m_numberone); 00332 setMappositionB(m_numbertwo); 00333 00334 m_numberone = m_numberone + 2; 00335 m_numbertwo = m_numbertwo + 2; 00336 }
|
|
00160 { 00161 // 00162 //parameters: phi lambda mass ptrk 00163 // 00164 double ptrk = trk->energy(); 00165 double e = sqrt(ptrk*ptrk + mass * mass); 00166 double the = trk->theta(); 00167 double phi = trk->phi(); 00168 HepLorentzVector p4( e* sin(the) * cos(phi), 00169 e * sin(the) * sin(phi), 00170 e * cos(the), 00171 e); 00172 double dphi = trk->dphi(); 00173 double dthe = trk->dtheta(); 00174 double de = 1E+6; 00175 double x = trk->x(); 00176 double y = trk->y(); 00177 double z = trk->z(); 00178 00179 HepPoint3D x3 (x, y ,z); 00180 WTrackParameter wtrk(x3, p4 ,dphi ,dthe, de); 00181 HepSymMatrix Vpe = HepSymMatrix(2,0); 00182 //=== get Vclus=== 00183 HepSymMatrix Vclus = HepSymMatrix (3,0); 00184 Vclus = (wtrk.Ew()).sub(5,7); 00185 double xpr = x - m_BeamPosition[0]; 00186 double ypr = y - m_BeamPosition[1]; 00187 double zpr = z - m_BeamPosition[2]; 00188 double Rpr = sqrt(xpr*xpr + ypr*ypr); 00189 // === get jacobi === 00190 HepMatrix J(2,3,0); 00191 J[0][0] = -ypr/(Rpr*Rpr); 00192 J[0][1] = xpr/(Rpr*Rpr); 00193 J[1][0] = -xpr * zpr/(Rpr*Rpr*Rpr); 00194 J[1][1] = -ypr * zpr/(Rpr*Rpr*Rpr); 00195 J[1][2] = 1/Rpr; 00196 Vpe = Vclus.similarity(J) + m_VBeamPosition.similarity(J); 00197 Vpe[0][1]=0; 00198 00199 double phipre = atan(ypr/xpr); 00200 00201 if(xpr<0){ 00202 phipre = atan(ypr/xpr) + 3.1415926; 00203 } 00204 double lambdapre = zpr/Rpr; 00205 00206 00207 HepVector plmp(4 , 0); 00208 plmp[0] = phipre; 00209 plmp[1] = lambdapre; 00210 plmp[2] = mass; 00211 plmp[3] = ptrk; 00212 wtrk.setPlmp(plmp); 00213 00214 HepSymMatrix Vplm(3,0); 00215 Vplm[0][0] = Vpe[0][0]; 00216 Vplm[1][1] = Vpe[1][1]; 00217 wtrk.setVplm(Vplm); 00218 00219 00220 00221 // === set p4 === 00222 double p0x = ptrk*cos(phipre)/sqrt(1 + lambdapre*lambdapre); 00223 double p0y = ptrk*sin(phipre)/sqrt(1 + lambdapre*lambdapre); 00224 double p0z = ptrk*lambdapre/sqrt(1 + lambdapre*lambdapre); 00225 double p0e = e; 00226 00227 wtrk.setW(0,p0x); 00228 wtrk.setW(1,p0y); 00229 wtrk.setW(2,p0z); 00230 wtrk.setW(3,p0e); 00231 00232 wtrk.setType(1); 00233 setWTrackOrigin(wtrk); 00234 setWTrackInfit(wtrk); 00235 setWTrackList(number); 00236 GammaShape gtrk(p4,dphi,dthe,de); 00237 setGammaShape(gtrk); 00238 setGammaShapeList(number); 00239 setMapkinematic(5); 00240 setMappositionA(m_numberone); 00241 setMappositionB(m_numbertwo); 00242 00243 m_numberone = m_numberone + 3; 00244 m_numbertwo = m_numbertwo + 1; 00245 }
|
|
00341 { 00342 // 00343 //parameters: mass px py pz 00344 // 00345 00346 double dphi = 1E+6; 00347 double dthe = 1E+6; 00348 double dE = 1E+6; 00349 WTrackParameter wtrk(p4, dphi, dthe, dE); 00350 HepVector plmp(4, 0); 00351 double phipre = atan(p4[1]/p4[0]); 00352 00353 if(p4[0]<0){ 00354 phipre = atan(p4[1]/p4[0]) + 3.1415926; 00355 } 00356 plmp[0] = phipre; 00357 plmp[1] = wtrk.Lambda(); 00358 plmp[2] = mass; 00359 plmp[3] = p4[3]; 00360 HepSymMatrix Vplm(3, 0); 00361 wtrk.setPlmp(plmp); 00362 wtrk.setVplm(Vplm); 00363 wtrk.setType(1); 00364 setWTrackOrigin(wtrk); 00365 setWTrackInfit(wtrk); 00366 setWTrackList(number); 00367 setMapkinematic(3); 00368 setMappositionA(m_numberone); 00369 setMappositionB(m_numbertwo); 00370 m_numberone = m_numberone + 1; 00371 m_numbertwo = m_numbertwo + 3; 00372 }
|
|
00375 { 00376 // 00377 //parameters: mass px py pz, but px,py,pz 's error matrix is set as 10e^6 00378 // 00379 WTrackParameter wtrk; 00380 wtrk.setMass(mass); 00381 HepVector w(7,0); 00382 HepSymMatrix Ew(7,0); 00383 w[0] = 0.2; 00384 w[1] = 0.2; 00385 w[2] = 0.2; 00386 w[3] = sqrt(0.2*0.2*3 + mass*mass); 00387 Ew[0][0] = 1E+6; 00388 Ew[1][1] = 1E+6; 00389 Ew[2][2] = 1E+6; 00390 wtrk.setW(w); 00391 wtrk.setEw(Ew); 00392 setWTrackOrigin(wtrk); 00393 setWTrackInfit(wtrk); 00394 setWTrackList(number); 00395 setMapkinematic(7); 00396 setMappositionA(m_numberone); 00397 setMappositionB(m_numbertwo); 00398 m_numberone = m_numberone + 4; 00399 00400 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
00138 { 00139 std::vector<int> tlis = AddList(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11, n12); 00140 AddResonance(number, mres, tlis); 00141 }
|
|
00131 { 00132 std::vector<int> tlis = AddList(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11); 00133 AddResonance(number, mres, tlis); 00134 }
|
|
00123 { 00124 std::vector<int> tlis = AddList(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10); 00125 AddResonance(number, mres, tlis); 00126 }
|
|
00117 { 00118 std::vector<int> tlis = AddList(n1, n2, n3, n4, n5, n6, n7, n8, n9); 00119 AddResonance(number, mres, tlis); 00120 }
|
|
00111 { 00112 std::vector<int> tlis = AddList(n1, n2, n3, n4, n5, n6, n7, n8); 00113 AddResonance(number, mres, tlis); 00114 }
|
|
00105 { 00106 std::vector<int> tlis = AddList(n1, n2, n3, n4, n5, n6, n7); 00107 AddResonance(number, mres, tlis); 00108 }
|
|
00099 { 00100 std::vector<int> tlis = AddList(n1, n2, n3, n4, n5, n6); 00101 AddResonance(number, mres, tlis); 00102 }
|
|
00093 { 00094 std::vector<int> tlis = AddList(n1, n2, n3, n4, n5); 00095 AddResonance(number, mres, tlis); 00096 }
|
|
00087 { 00088 std::vector<int> tlis = AddList(n1, n2, n3, n4); 00089 AddResonance(number, mres, tlis); 00090 }
|
|
00082 { 00083 std::vector<int> tlis = AddList(n1, n2, n3); 00084 AddResonance(number, mres, tlis); 00085 }
|
|
00077 { 00078 std::vector<int> tlis = AddList(n1, n2); 00079 AddResonance(number, mres, tlis); 00080 }
|
|
00072 { 00073 std::vector<int> tlis = AddList(n1); 00074 AddResonance(number, mres, tlis); 00075 }
|
|
00143 { 00144 KinematicConstraints kc; 00145 HepSymMatrix Vre = HepSymMatrix(1,0); 00146 kc.ResonanceConstraints(mres, tlis, Vre); 00147 m_kc.push_back(kc); 00148 if((unsigned int) number != m_kc.size()-1) 00149 std::cout << "wrong kinematic constraints index" << std::endl; 00150 }
|
|
|
|
00335 { 00336 std::vector<int> tlis; 00337 tlis.clear(); 00338 WTrackParameter wtrk; 00339 KinematicConstraints kc; 00340 00341 for(int i = 0; i < numberWTrack(); i++) { 00342 tlis.push_back(i); 00343 } 00344 kc.ThreeMomentumConstraints(p3, tlis); 00345 m_kc.push_back(kc); 00346 if((unsigned int) number != m_kc.size()-1) 00347 std::cout << "wrong kinematic constraints index" << std::endl; 00348 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
00306 { 00307 std::vector<int> tlis = AddList(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11, n12); 00308 AddTotalEnergy(number, etot, tlis); 00309 }
|
|
00299 { 00300 std::vector<int> tlis = AddList(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11); 00301 AddTotalEnergy(number, etot, tlis); 00302 }
|
|
00291 { 00292 std::vector<int> tlis = AddList(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10); 00293 AddTotalEnergy(number, etot, tlis); 00294 }
|
|
00284 { 00285 std::vector<int> tlis = AddList(n1, n2, n3, n4, n5, n6, n7, n8, n9); 00286 AddTotalEnergy(number, etot, tlis); 00287 }
|
|
00278 { 00279 std::vector<int> tlis = AddList(n1, n2, n3, n4, n5, n6, n7, n8); 00280 AddTotalEnergy(number, etot, tlis); 00281 }
|
|
00272 { 00273 std::vector<int> tlis = AddList(n1, n2, n3, n4, n5, n6, n7); 00274 AddTotalEnergy(number, etot, tlis); 00275 }
|
|
00266 { 00267 std::vector<int> tlis = AddList(n1, n2, n3, n4, n5, n6); 00268 AddTotalEnergy(number, etot, tlis); 00269 }
|
|
00260 { 00261 std::vector<int> tlis = AddList(n1, n2, n3, n4, n5); 00262 AddTotalEnergy(number, etot, tlis); 00263 }
|
|
00254 { 00255 std::vector<int> tlis = AddList(n1, n2, n3, n4); 00256 AddTotalEnergy(number, etot, tlis); 00257 }
|
|
00249 { 00250 std::vector<int> tlis = AddList(n1, n2, n3); 00251 AddTotalEnergy(number, etot, tlis); 00252 }
|
|
00244 { 00245 std::vector<int> tlis = AddList(n1, n2); 00246 AddTotalEnergy(number, etot, tlis); 00247 }
|
|
00240 { 00241 std::vector<int> tlis = AddList(n1); 00242 AddTotalEnergy(number, etot, tlis); 00243 }
|
|
00311 { 00312 KinematicConstraints kc; 00313 kc.TotalEnergyConstraints(etot, tlis); 00314 m_kc.push_back(kc); 00315 if((unsigned int) number != m_kc.size()-1) 00316 std::cout << "wrong kinematic constraints index" << std::endl; 00317 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
00223 { 00224 std::vector<int> tlis = AddList(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11, n12); 00225 AddTotalMomentum(number, ptot, tlis); 00226 }
|
|
00216 { 00217 std::vector<int> tlis = AddList(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11); 00218 AddTotalMomentum(number, ptot, tlis); 00219 }
|
|
00208 { 00209 std::vector<int> tlis = AddList(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10); 00210 AddTotalMomentum(number, ptot, tlis); 00211 }
|
|
00201 { 00202 std::vector<int> tlis = AddList(n1, n2, n3, n4, n5, n6, n7, n8, n9); 00203 AddTotalMomentum(number, ptot, tlis); 00204 }
|
|
00195 { 00196 std::vector<int> tlis = AddList(n1, n2, n3, n4, n5, n6, n7, n8); 00197 AddTotalMomentum(number, ptot, tlis); 00198 }
|
|
00189 { 00190 std::vector<int> tlis = AddList(n1, n2, n3, n4, n5, n6, n7); 00191 AddTotalMomentum(number, ptot, tlis); 00192 }
|
|
00183 { 00184 std::vector<int> tlis = AddList(n1, n2, n3, n4, n5, n6); 00185 AddTotalMomentum(number, ptot, tlis); 00186 }
|
|
00177 { 00178 std::vector<int> tlis = AddList(n1, n2, n3, n4, n5); 00179 AddTotalMomentum(number, ptot, tlis); 00180 }
|
|
00171 { 00172 std::vector<int> tlis = AddList(n1, n2, n3, n4); 00173 AddTotalMomentum(number, ptot, tlis); 00174 }
|
|
00166 { 00167 std::vector<int> tlis = AddList(n1, n2, n3); 00168 AddTotalMomentum(number, ptot, tlis); 00169 }
|
|
00161 { 00162 std::vector<int> tlis = AddList(n1, n2); 00163 AddTotalMomentum(number, ptot, tlis); 00164 }
|
|
00157 { 00158 std::vector<int> tlis = AddList(n1); 00159 AddTotalMomentum(number, ptot, tlis); 00160 }
|
|
00228 { 00229 KinematicConstraints kc; 00230 kc.TotalMomentumConstraints(ptot, tlis); 00231 m_kc.push_back(kc); 00232 if((unsigned int) number != m_kc.size()-1) 00233 std::cout << "wrong kinematic constraints index" << std::endl; 00234 }
|
|
|
|
|
|
|
|
|
|
00429 { 00430 setWTrackOrigin(wtrk); 00431 setWTrackInfit(wtrk); 00432 setWTrackList(number); 00433 if(number != numberWTrack()-1) { 00434 std::cout << "TrackPool: wrong track index" <<" " 00435 <<number<<" , " <<numberWTrack()<< std::endl; 00436 } 00437 setMapkinematic(0); 00438 setMappositionA(m_numberone); 00439 setMappositionB(m_numbertwo); 00440 m_numberone = m_numberone + 4; 00441 }
|
|
00045 { 00046 // 00047 //parameters: phi lambda mass energy 00048 // 00049 double ptrk = trk->energy(); 00050 double e = sqrt(ptrk*ptrk + mass * mass); 00051 double the = trk->theta(); 00052 double phi = trk->phi(); 00053 HepLorentzVector p4(ptrk * sin(the) * cos(phi), 00054 ptrk * sin(the) * sin(phi), 00055 ptrk * cos(the), 00056 e); 00057 double dphi = trk->dphi(); 00058 double dthe = trk->dtheta(); 00059 double de = trk->dE(); 00060 double x = trk->x(); 00061 double y = trk->y(); 00062 double z = trk->z(); 00063 HepPoint3D x3 (x, y ,z); 00064 WTrackParameter wtrk(x3, p4 ,dphi ,dthe, de); 00065 HepSymMatrix Vpl = HepSymMatrix(2,0); 00066 //=== get Vclus=== 00067 HepSymMatrix Vclus = HepSymMatrix (3,0); 00068 Vclus = (wtrk.Ew()).sub(5,7); 00069 double xpr = x - m_BeamPosition[0]; 00070 double ypr = y - m_BeamPosition[1]; 00071 double zpr = z - m_BeamPosition[2]; 00072 double Rpr = sqrt(xpr*xpr + ypr*ypr); 00073 // === get jacobi === 00074 HepMatrix J(2,3,0); 00075 J[0][0] = -ypr/(Rpr*Rpr); 00076 J[0][1] = xpr/(Rpr*Rpr); 00077 J[1][0] = -xpr * zpr/(Rpr*Rpr*Rpr); 00078 J[1][1] = -ypr * zpr/(Rpr*Rpr*Rpr); 00079 J[1][2] = 1/Rpr; 00080 Vpl = Vclus.similarity(J) + m_VBeamPosition.similarity(J); 00081 Vpl[0][1]=0; 00082 // === get phipre, lambda=== 00083 00084 double phipre = atan(ypr/xpr); 00085 00086 if(xpr<0){ 00087 phipre = atan(ypr/xpr) + 3.1415926; 00088 } 00089 double lambdapre = zpr/Rpr; 00090 00091 00092 // === set p4 === 00093 double p0x = ptrk*cos(phipre)/sqrt(1 + lambdapre*lambdapre); 00094 double p0y = ptrk*sin(phipre)/sqrt(1 + lambdapre*lambdapre); 00095 double p0z = ptrk*lambdapre/sqrt(1 + lambdapre*lambdapre); 00096 double p0e = e; 00097 00098 00099 double p0ver = sqrt(p0x*p0x + p0y*p0y); 00100 00101 00102 HepMatrix B(4,3,0); 00103 B[0][0] = -p0y; 00104 B[0][1] = -p0z * p0x * p0ver/(p0e * p0e); 00105 B[0][2] = p0x/p0e; 00106 B[1][0] = p0x; 00107 B[1][1] = -p0z * p0y * p0ver/(p0e * p0e); 00108 B[1][2] = p0y/p0e; 00109 B[2][1] = p0ver * p0ver * p0ver/(p0e * p0e); 00110 B[2][2] = p0z/p0e; 00111 B[3][2] = 1; 00112 00113 HepSymMatrix Vple(3,0); 00114 Vple[0][0] = Vpl[0][0]; 00115 Vple[1][1] = Vpl[1][1]; 00116 Vple[2][2] = de * de; 00117 00118 HepSymMatrix Vpxyze(4,0); 00119 Vpxyze = Vple.similarity(B); 00120 00121 wtrk.setW(0,p0x); 00122 wtrk.setW(1,p0y); 00123 wtrk.setW(2,p0z); 00124 wtrk.setW(3,p0e); 00125 00126 wtrk.setEw(Vpxyze); 00127 00128 HepSymMatrix Vplme(4,0); 00129 Vplme[0][0] = Vpl[0][0]; 00130 Vplme[1][1] = Vpl[1][1]; 00131 Vplme[3][3] = de * de; 00132 wtrk.setVplm(Vplme); 00133 00134 HepVector plmp(4 , 0); 00135 plmp[0] = phipre; 00136 plmp[1] = lambdapre; 00137 plmp[2] = mass; 00138 plmp[3] = e; 00139 wtrk.setPlmp(plmp); 00140 00141 00142 setWTrackOrigin(wtrk); 00143 setWTrackInfit(wtrk); 00144 setWTrackList(number); 00145 if(number != numberWTrack()-1) { 00146 std::cout << "TrackPool: wrong track index" <<" " 00147 <<number<<" , " <<numberWTrack()<< std::endl; 00148 } 00149 GammaShape gtrk(p4,dphi,dthe,de); 00150 setGammaShape(gtrk); 00151 setGammaShapeList(number); 00152 setMapkinematic(1); 00153 setMappositionA(m_numberone); 00154 setMappositionB(m_numbertwo); 00155 m_numberone = m_numberone + 4; 00156 }
|
|
|
|
00023 { 00024 HepVector helix(5,0); 00025 double error[15]; 00026 for(int i = 0; i < 5; i++) 00027 helix[i] = trk->helix(i); 00028 for(int i = 0; i < 15; i++) 00029 error[i] = trk->err(i); 00030 WTrackParameter wtrk(mass, helix, error); 00031 setWTrackOrigin(wtrk); 00032 setWTrackInfit(wtrk); 00033 setWTrackList(number); 00034 if(number != numberWTrack()-1) { 00035 std::cout << "TrackPool: wrong track index" <<" " 00036 <<number<<" , " <<numberWTrack()<< std::endl; 00037 } 00038 setMapkinematic(0); 00039 setMappositionA(m_numberone); 00040 setMappositionB(m_numbertwo); 00041 m_numberone = m_numberone + 4; 00042 }
|
|
|
|
00444 { 00445 double ptrk = trk->energy(); 00446 double e = sqrt(ptrk*ptrk + mass * mass); 00447 double the = trk->theta(); 00448 double phi = trk->phi(); 00449 HepLorentzVector p4(ptrk * sin(the) * cos(phi), 00450 ptrk * sin(the) * sin(phi), 00451 ptrk * cos(the), 00452 e); 00453 double dphi = trk->dphi(); 00454 double dthe = trk->dtheta(); 00455 double de = trk->dE(); 00456 double x = trk->x(); 00457 double y = trk->y(); 00458 double z = trk->z(); 00459 HepPoint3D x3 (x, y ,z); 00460 WTrackParameter wtrk(x3, p4 ,dphi ,dthe, de); 00461 setWTrackOrigin(wtrk); 00462 setWTrackInfit(wtrk); 00463 setWTrackList(number); 00464 if(number != numberWTrack()-1) { 00465 std::cout << "TrackPool: wrong track index" <<" " 00466 <<number<<" , " <<numberWTrack()<< std::endl; 00467 } 00468 GammaShape gtrk(p4,dphi,dthe,de); 00469 setGammaShape(gtrk); 00470 setGammaShapeList(number); 00471 setMapkinematic(6); 00472 m_numbertwo = 0; 00473 setMappositionA(m_numberone); 00474 setMappositionB(m_numbertwo); 00475 00476 m_numberone = m_numberone + 4; 00477 m_numbertwo = m_numbertwo + 3; 00478 }
|
|
|
|
00793 { 00794 // 00795 // q = p1 + p2 + ... + pn 00796 // 00797 upCovmtx(); 00798 KinematicConstraints kc = m_kc[n]; 00799 int ntrk = (kc.Ltrk()).size(); 00800 int charge = 0; 00801 HepVector w(7, 0); 00802 HepSymMatrix ew(7, 0); 00803 HepMatrix dwdp(7, 7, 0); 00804 dwdp[0][0] = 1; 00805 dwdp[1][1] = 1; 00806 dwdp[2][2] = 1; 00807 dwdp[3][3] = 1; 00808 dwdp[4][4] = 1; 00809 dwdp[5][5] = 1; 00810 dwdp[6][6] = 1; 00811 for (int i = 0; i < ntrk; i++) { 00812 int itk = (kc.Ltrk())[i]; 00813 charge += wTrackInfit(itk).charge(); 00814 w[0] = w[0] + wTrackInfit(itk).w()[0]; 00815 w[1] = w[1] + wTrackInfit(itk).w()[1]; 00816 w[2] = w[2] + wTrackInfit(itk).w()[2]; 00817 w[3] = w[3] + wTrackInfit(itk).w()[3]; 00818 w[4] = 0.0;// 00819 w[5] = 0.0;// set virtual particle's vertex at (0,0,0) 00820 w[6] = 0.0;// 00821 ew = ew + (wTrackInfit(itk).Ew()).similarity(dwdp); // the vertex matrix of this particles is not correct, because we do not use vertex information in kinematicfit, so ... 00822 } 00823 double m = sqrt(w[3]*w[3] - w[0]*w[0] - w[1]*w[1] - w[2]*w[2]); 00824 WTrackParameter vwtrk; 00825 vwtrk.setCharge(charge); 00826 vwtrk.setW(w); 00827 vwtrk.setEw(ew); 00828 vwtrk.setMass(m); 00829 m_virtual_wtrk.push_back(vwtrk); 00830 }
|
|
00151 {return m_chisq[n];}
|
|
00150 {return m_chi;}
|
|
00151 {return m_chisq[n];}
|
|
00150 {return m_chi;}
|
|
00133 {m_gammashape.clear();}
|
|
00133 {m_gammashape.clear();}
|
|
00134 {m_lgammashape.clear();}
|
|
00134 {m_lgammashape.clear();}
|
|
00118 {m_mapkinematic.clear();}
|
|
00118 {m_mapkinematic.clear();}
|
|
00119 {m_mappositionA.clear();}
|
|
00119 {m_mappositionA.clear();}
|
|
00120 {m_mappositionB.clear();}
|
|
00120 {m_mappositionB.clear();}
|
|
00109 {m_numberone = 0;}
|
|
00109 {m_numberone = 0;}
|
|
00110 {m_numbertwo = 0;}
|
|
00110 {m_numbertwo = 0;}
|
|
00106 {m_wtrk_infit.clear();}
|
|
00106 {m_wtrk_infit.clear();}
|
|
00107 {m_lwtrk.clear();}
|
|
00107 {m_lwtrk.clear();}
|
|
00105 {m_wtrk_origin.clear();}
|
|
00105 {m_wtrk_origin.clear();}
|
|
00166 {return m_collideangle;}
|
|
00166 {return m_collideangle;}
|
|
00215 {return m_covInfit.sub(i*NTRKPAR+1, (i+1)*NTRKPAR);}
|
|
00215 {return m_covInfit.sub(i*NTRKPAR+1, (i+1)*NTRKPAR);}
|
|
|
|
00558 { 00559 KinematicConstraints kc = m_kc[n]; 00560 int nc = kc.nc(); 00561 int ntrk = (kc.Ltrk()).size(); 00562 HepSymMatrix Va0(7*ntrk, 0); 00563 for (int i = 0; i < ntrk; i++) { 00564 int itk = (kc.Ltrk())[i]; 00565 for(int j = 0; j < 7; j++) 00566 for (int k = 0; k < 7; k++) 00567 Va0[7*i+j][7*i+k] = (wTrackOrigin(itk).Ew())[j][k]; 00568 00569 } 00570 HepMatrix D(nc, 7*ntrk, 0); 00571 int ncc = 0; 00572 for(int j = 0; j < kc.nc(); j++) { 00573 for(int l = 0; l < ntrk; l++) { 00574 for(int k = 0; k < 7; k++) 00575 D[ncc][7*l+k] = (kc.Dc()[l])[j][k]; 00576 } 00577 ncc++; 00578 } 00579 00580 00581 HepSymMatrix VD(nc, 0); 00582 VD = kc.VD()[0]; 00583 HepSymMatrix Va(7*ntrk, 0); 00584 Va = Va0 - (VD.similarity(D.T())).similarity(Va0); 00585 for(int i = 0; i < ntrk; i++) { 00586 int itk = (kc.Ltrk())[i]; 00587 HepVector w(7, 0); 00588 HepSymMatrix Ew(7, 0); 00589 for(int j = 0; j < 7; j++) { 00590 for(int k = 0; k < 7; k++) 00591 Ew[j][k] = Va[7*i + j] [7*i + k]; 00592 } 00593 WTrackParameter wtrk = wTrackInfit(itk); 00594 wtrk.setEw(Ew); 00595 setWTrackInfit(itk, wtrk); 00596 } 00597 m_kc[n] = kc; 00598 00599 }
|
|
00214 {return m_covOrigin.sub(i*NTRKPAR+1, (i+1)*NTRKPAR);}
|
|
00214 {return m_covOrigin.sub(i*NTRKPAR+1, (i+1)*NTRKPAR);}
|
|
00169 {return m_cpu;}
|
|
00169 {return m_cpu;}
|
|
00192 {return m_D.sub(ic+1, ic+1, itk*NTRKPAR+1, (itk+1)*NTRKPAR);}
|
|
00192 {return m_D.sub(ic+1, ic+1, itk*NTRKPAR+1, (itk+1)*NTRKPAR);}
|
|
00195 {return m_DT.sub(itk*NTRKPAR+1, (itk+1)*NTRKPAR, ic+1, ic+1);}
|
|
00195 {return m_DT.sub(itk*NTRKPAR+1, (itk+1)*NTRKPAR, ic+1, ic+1);}
|
|
00167 {return m_dynamicerror;}
|
|
00167 {return m_dynamicerror;}
|
|
00165 {return m_espread;}
|
|
00165 {return m_espread;}
|
|
|
|
|
|
|
|
|
|
00533 { 00534 00535 if(m_chisq.size() == 0) { 00536 for(unsigned int i = 0; i < m_kc.size(); i++) 00537 m_chisq.push_back(9999.0); 00538 } 00539 KinematicConstraints kc; 00540 int nc = m_nc; 00541 int ntrk = numberWTrack(); 00542 00543 m_VD = HepSymMatrix(m_nc, 0); 00544 m_VD = m_covOrigin.similarity(m_D); 00545 int ifail; 00546 m_VD.invert(ifail); 00547 HepVector G(m_nc, 0); 00548 G = m_D * (m_pOrigin - m_pInfit) + m_d; 00549 m_KP = HepMatrix(NTRKPAR*m_nktrk, m_nc, 0); 00550 m_KP = m_covOrigin * m_DT * m_VD; 00551 m_chisq[n] = (m_VD.similarity(G.T()))[0][0]; 00552 m_pInfit = m_pOrigin - m_KP * G; 00553 00554 }
|
|
00422 { 00423 00424 KinematicConstraints kc; 00425 int nc = m_nc; 00426 int ntrk = numberWTrack(); 00427 00428 TStopwatch timer; 00429 timer.Start(); 00430 00431 m_VD = HepSymMatrix(m_nc, 0); 00432 m_VD = m_covOrigin.similarity(m_D); 00433 timer.Stop(); 00434 m_cpu[1] += timer.CpuTime(); 00435 timer.Start(); 00436 00437 int ifail; 00438 m_VD.invert(ifail); 00439 00440 timer.Stop(); 00441 m_cpu[2] += timer.CpuTime(); 00442 timer.Start(); 00443 00444 HepVector G(m_nc, 0); 00445 G = m_D * (m_pOrigin - m_pInfit) + m_d; 00446 00447 m_KP = HepMatrix(NTRKPAR*m_nktrk, m_nc, 0); 00448 m_KP = m_covOrigin * m_DT * m_VD; 00449 m_chi = (m_VD.similarity(G.T()))[0][0]; 00450 00451 00452 timer.Stop(); 00453 m_cpu[3] += timer.CpuTime(); 00454 timer.Start(); 00455 00456 m_pInfit = m_pOrigin - m_KP * G; 00457 00458 // ===== gamma dynamic adjustment==== 00459 00460 timer.Stop(); 00461 m_cpu[4] += timer.CpuTime(); 00462 00463 timer.Start(); 00464 if(m_dynamicerror ==1) 00465 gda(); 00466 00467 timer.Stop(); 00468 m_cpu[6] += timer.CpuTime(); 00469 }
|
|
00741 { 00742 bool okfit = false; 00743 if(n < 0 || (unsigned int)n >= m_kc.size()) return okfit; 00744 00745 m_nktrk = numberWTrack(); 00746 m_pOrigin = HepVector(m_nktrk * NTRKPAR, 0); 00747 m_pInfit = HepVector(m_nktrk * NTRKPAR, 0); 00748 m_covOrigin = HepSymMatrix(m_nktrk * NTRKPAR, 0); 00749 m_covInfit = HepSymMatrix(m_nktrk * NTRKPAR, 0); 00750 m_massvector = HepVector(m_nktrk * NTRKPAR, 0); 00751 for(int i = 0; i < numberWTrack(); i++) { 00752 setWTrackInfit(i, wTrackOrigin(i)); 00753 setPOrigin(i, (wTrackOrigin(i).w()).sub(1, NTRKPAR)); 00754 setPInfit(i, (wTrackOrigin(i).w()).sub(1, NTRKPAR)); 00755 setCovOrigin(i, (wTrackOrigin(i).Ew()).sub(1, NTRKPAR)); 00756 setMassvector(i, wTrackOrigin(i).mass()); 00757 } 00758 00759 // 00760 // iteration loop 00761 // 00762 00763 std::vector<double> chisq; 00764 chisq.clear(); 00765 00766 m_D = HepMatrix(m_kc[n].nc(), m_nktrk * NTRKPAR, 0); 00767 m_DT = HepMatrix(m_nktrk * NTRKPAR, m_kc[n].nc(), 0); 00768 m_d = HepVector(m_kc[n].nc(), 0); 00769 00770 for(int it = 0; it < m_niter; it++) { 00771 m_nc = 0; 00772 KinematicConstraints kc = m_kc[n]; 00773 updateConstraints(kc); 00774 // m_kc[n] = kc; 00775 fit(n); 00776 00777 chisq.push_back(m_chisq[n]); 00778 if(it > 0) { 00779 double delchi = chisq[it]- chisq[it-1]; 00780 if(fabs(delchi) < m_chiter) 00781 break; 00782 } 00783 } 00784 00785 if(m_chisq[n] >= m_chicut) return okfit; 00786 // ====update cov==== 00787 // upCovmtx(); 00788 okfit = true; 00789 return okfit; 00790 }
|
|
00604 { 00605 bool okfit = false; 00606 TStopwatch timer; 00607 m_nktrk = numberWTrack(); 00608 m_pOrigin = HepVector(m_nktrk * NTRKPAR, 0); 00609 m_pInfit = HepVector(m_nktrk * NTRKPAR, 0); 00610 m_covOrigin = HepSymMatrix(m_nktrk * NTRKPAR, 0); 00611 m_covInfit = HepSymMatrix(m_nktrk * NTRKPAR, 0); 00612 m_massvector = HepVector(m_nktrk, 0); 00613 for(int i = 0; i < numberWTrack(); i++) { 00614 setWTrackInfit(i, wTrackOrigin(i)); 00615 setPOrigin(i, (wTrackOrigin(i).w()).sub(1, NTRKPAR)); 00616 setPInfit(i, (wTrackOrigin(i).w()).sub(1, NTRKPAR)); 00617 setCovOrigin(i, (wTrackOrigin(i).Ew()).sub(1, NTRKPAR)); 00618 setMassvector(i, wTrackOrigin(i).mass()); 00619 } 00620 00621 // 00622 // iteration 00623 // 00624 // cout<<"m_pInfit ="<<m_pInfit<<endl; 00625 // cout<<"m_covOrigin="<<m_covOrigin<<endl; 00626 // cout<<"m_massvector ="<<m_massvector<<endl; 00627 00628 std::vector<double> chisq; 00629 chisq.clear(); 00630 int nc = 0; 00631 for(int i = 0; i < m_kc.size(); i++) 00632 nc += m_kc[i].nc(); 00633 00634 m_D = HepMatrix(nc, m_nktrk * NTRKPAR, 0); 00635 m_DT = HepMatrix(m_nktrk * NTRKPAR, nc, 0); 00636 m_d = HepVector(nc, 0); 00637 00638 for(int it = 0; it < m_niter; it++) { 00639 00640 timer.Start(); 00641 m_nc = 0; 00642 for(unsigned int i = 0; i < m_kc.size(); i++) { 00643 KinematicConstraints kc = m_kc[i]; 00644 // std::vector<WTrackParameter> wlis; 00645 // std::vector<WTrackParameter> wlis_V; 00646 // wlis.clear(); 00647 // wlis_V.clear(); 00648 // for(unsigned int j = 0; j < (kc.Ltrk()).size(); j++) { 00649 // int n = (kc.Ltrk())[j]; 00650 // WTrackParameter wtrk = wTrackInfit(n); 00651 // if(m_espread!=0) wtrk = wTrackOrigin(n); 00652 // wlis.push_back(wtrk); 00653 // } 00654 // for(unsigned int j = 0; j < (kc.Ltrk_V()).size(); j++) { 00655 // int n = (kc.Ltrk_V())[j]; 00656 // WTrackParameter wtrk = wTrackInfit_V(n); 00657 // wlis_V.push_back(wtrk); 00658 // } 00659 // kc.UpdateConstraints(wlis, wlis_V); 00660 // m_kc[i] = kc; 00661 //cout<<"wlis_V ="<<(wlis_V[0].w())[0]<<endl; 00662 updateConstraints(kc); 00663 // std::cout << "updata OK " << m_d << std::endl; 00664 } 00665 timer.Stop(); 00666 m_cpu[0] += timer.CpuTime(); 00667 00668 fit(); 00669 chisq.push_back(m_chi); 00670 if(it > 0) { 00671 double delchi = chisq[it]- chisq[it-1]; 00672 if(fabs(delchi) < m_chiter) 00673 break; 00674 } 00675 } 00676 if(m_chi >= m_chicut) { 00677 00678 return okfit; 00679 } 00680 // update track parameter and its covariance matrix 00681 // upTrkpar(); 00682 // covMatrix(); 00683 timer.Start(); 00684 //upCovmtx(); 00685 timer.Stop(); 00686 m_cpu[5] += timer.CpuTime(); 00687 00688 okfit = true; 00689 00690 /* 00691 for (int i = 0; i<numberWTrack(); i++){ 00692 if (wTrackOrigin(i).charge()==0) continue ; 00693 HTrackParameter horigin = HTrackParameter(wTrackOrigin(i)); 00694 HTrackParameter hinfit = HTrackParameter(wTrackInfit(i)); 00695 00696 HepVector a0 = horigin.hel(); 00697 HepVector a1 = hinfit.hel(); 00698 HepSymMatrix v0 = horigin.eHel(); 00699 HepSymMatrix v1 = hinfit.eHel(); 00700 HepVector pull(5,0); 00701 for (int k=0; k<5; k++) { 00702 pull[k] = (a0[k]-a1[k])/sqrt(abs(v0[k][k]-v1[k][k])); 00703 } 00704 00705 WTrackParameter wtrk2 = wTrackInfit(i); 00706 wtrk2.setPull(pull); 00707 // for (int l=0;l<5; l++) { 00708 //(wTrackInfit(i).pull())[l]=(wtrk2.pull())[l]; 00709 // } 00710 setWTrackInfit(i, wtrk2); 00711 } 00712 */ 00713 /*/ 00714 00715 for (int i = 0; i<numberWTrack_V(); i++){ 00716 //if (wTrackOrigin(i).charge()==0) continue ; 00717 HTrackParameter horigin_V = HTrackParameter(wTrackOrigin_V(i)); 00718 HTrackParameter hinfit_V = HTrackParameter(wTrackInfit_V(i)); 00719 00720 HepVector a0 = horigin.hel(); 00721 HepVector a1 = hinfit.hel(); 00722 HepSymMatrix v0 = horigin.eHel(); 00723 HepSymMatrix v1 = hinfit.eHel(); 00724 HepVector pull(5,0); 00725 for (int k=0; k<5; k++) { 00726 pull[k] = (a0[k]-a1[k])/sqrt(abs(v0[k][k]-v1[k][k])); 00727 } 00728 00729 WTrackParameter wtrk2 = wTrackInfit(i); 00730 wtrk2.setPull(pull); 00731 // for (int l=0;l<5; l++) { 00732 //(wTrackInfit(i).pull())[l]=(wtrk2.pull())[l]; 00733 // } 00734 setWTrackInfit(i, wtrk2); 00735 } 00736 */ 00737 00738 return okfit; 00739 }
|
|
|
|
|
|
00092 {return m_lgammashape[n];}
|
|
00090 {return m_lgammashape;}
|
|
00092 {return m_lgammashape[n];}
|
|
00090 {return m_lgammashape;}
|
|
00091 {return m_gammashape[n];}
|
|
00089 {return m_gammashape;}
|
|
00091 {return m_gammashape[n];}
|
|
00089 {return m_gammashape;}
|
|
|
|
00834 { 00835 for(int i = 0; i < numberWTrack(); i++) { 00836 00837 if ((wTrackOrigin(i)).type() == 2 ){ 00838 int n ; 00839 for(int j = 0; j < numberGammaShape(); j++) { 00840 if(i==GammaShapeList(j)) n = j; 00841 } 00842 HepSymMatrix Ew(NTRKPAR, 0); 00843 HepLorentzVector p1 = p4Infit(i); 00844 double eorigin = pOrigin(i)[3]; 00845 //cout<<"p1 ="<<p1<<endl; 00846 HepMatrix dwda1(NTRKPAR, 3, 0); 00847 dwda1[0][0] = -p1.py(); 00848 dwda1[1][0] = p1.px(); 00849 dwda1[0][1] = p1.px()*p1.pz()/p1.perp(); 00850 dwda1[1][1] = p1.py()*p1.pz()/p1.perp(); 00851 dwda1[2][1] = -p1.perp(); 00852 dwda1[0][2] = p1.px()/p1.rho(); 00853 dwda1[1][2] = p1.py()/p1.rho(); 00854 dwda1[2][2] = p1.pz()/p1.rho(); 00855 dwda1[3][2] = p1.rho()/p1.e(); 00856 HepSymMatrix emcmea1(3, 0); 00857 double pk = p1[3]; 00858 emcmea1[0][0] = GammaShapeValue(n).getdphi() * GammaShapeValue(n).getdphi(); 00859 emcmea1[1][1] = GammaShapeValue(n).getdthe() * GammaShapeValue(n).getdthe(); 00860 emcmea1[2][2] = GammaShapeValue(n).de(eorigin,pk) * GammaShapeValue(n).de(eorigin,pk); 00861 Ew = emcmea1.similarity(dwda1); 00862 //cout<<"emcmea1 ="<<emcmea1<<endl; 00863 //cout<<"Ew ="<<Ew<<endl; 00864 setCovOrigin(i, Ew); 00865 } 00866 } 00867 }
|
|
00141 {return m_BeamPosition;}
|
|
00141 {return m_BeamPosition;}
|
|
00142 {return m_VBeamPosition;}
|
|
00142 {return m_VBeamPosition;}
|
|
00161 {return wTrackInfit(n);}
|
|
00161 {return wTrackInfit(n);}
|
|
|
|
00033 { 00034 clearWTrackOrigin(); 00035 clearWTrackInfit(); 00036 clearWTrackList(); 00037 //For Virtual Particles 00038 //gamma shape 00039 clearGammaShape(); 00040 clearGammaShapeList(); 00041 clearMapkinematic(); 00042 clearMappositionA(); 00043 clearMappositionB(); 00044 clearone(); 00045 cleartwo(); 00046 setBeamPosition(HepPoint3D(0.0,0.0,0.0)); 00047 setVBeamPosition(HepSymMatrix(3,0)); 00048 00049 //============= 00050 m_kc.clear(); 00051 m_chisq.clear(); 00052 m_chi = 9999.; 00053 m_niter = 10; 00054 m_chicut = 200.; 00055 m_chiter = 0.005; 00056 m_espread = 0.0; 00057 m_kalman = 0; 00058 m_collideangle = 11e-3; 00059 m_flag = 0; 00060 m_dynamicerror = 0; 00061 m_nc = 0; 00062 m_cpu = HepVector(10, 0); 00063 m_massvector = HepVector(12,0); 00064 m_virtual_wtrk.clear(); 00065 }
|
|
|
|
00020 { 00021 if(m_pointer) return m_pointer; 00022 m_pointer = new KinematicFit(); 00023 return m_pointer; 00024 }
|
|
00116 {return m_mapkinematic;}
|
|
00116 {return m_mapkinematic;}
|
|
00114 {return m_mappositionA;}
|
|
00114 {return m_mappositionA;}
|
|
00115 {return m_mappositionB;}
|
|
00115 {return m_mappositionB;}
|
|
00093 { return ((int)(m_lgammashape.size()) );}
|
|
00093 { return ((int)(m_lgammashape.size()) );}
|
|
00111 {return m_numberone;}
|
|
00111 {return m_numberone;}
|
|
00112 {return m_numbertwo;}
|
|
00112 {return m_numbertwo;}
|
|
00073 { return ((int)(m_lwtrk.size()));}
|
|
00073 { return ((int)(m_lwtrk.size()));}
|
|
00160 {return wTrackOrigin(n);}
|
|
00160 {return wTrackOrigin(n);}
|
|
00211 { HepVector p(3, 0); p = pInfit(i); double E = sqrt(p[0]*p[0] + p[1]*p[1] + p[2]*p[2] + origin(i).mass() * origin(i).mass()); return HepLorentzVector(p[0], p[1], p[2], E); } //modified by yanl 2010.7.26 for changing the wtrackparameters
|
|
00211 { HepVector p(3, 0); p = pInfit(i); double E = sqrt(p[0]*p[0] + p[1]*p[1] + p[2]*p[2] + origin(i).mass() * origin(i).mass()); return HepLorentzVector(p[0], p[1], p[2], E); } //modified by yanl 2010.7.26 for changing the wtrackparameters
|
|
00209 { HepVector p(3, 0); p = pOrigin(i); double E = sqrt(p[0]*p[0] + p[1]*p[1] + p[2]*p[2] + origin(i).mass() * origin(i).mass());return HepLorentzVector(p[0], p[1], p[2], E);} //modified by yanl 2010.7.26 for changing the wtrackparameters
|
|
00209 { HepVector p(3, 0); p = pOrigin(i); double E = sqrt(p[0]*p[0] + p[1]*p[1] + p[2]*p[2] + origin(i).mass() * origin(i).mass());return HepLorentzVector(p[0], p[1], p[2], E);} //modified by yanl 2010.7.26 for changing the wtrackparameters
|
|
00154 {return p4Infit(n);}
|
|
00154 {return p4Infit(n);}
|
|
00157 {return p4Origin(n);}
|
|
00157 {return p4Origin(n);}
|
|
00210 {return m_pInfit.sub(i*NTRKPAR+1, (i+1)*NTRKPAR);}
|
|
00210 {return m_pInfit.sub(i*NTRKPAR+1, (i+1)*NTRKPAR);}
|
|
00208 {return m_pOrigin.sub(i*NTRKPAR+1, (i+1)*NTRKPAR);}
|
|
00208 {return m_pOrigin.sub(i*NTRKPAR+1, (i+1)*NTRKPAR);}
|
|
|
|
00870 { 00871 upCovmtx(); 00872 00873 if (wTrackOrigin(n).charge()!=0){ 00874 HepVector W(6,0); 00875 HepSymMatrix Ew(6,0); 00876 HepVector W1(7,0); 00877 HepSymMatrix Ew1(7,0); 00878 WTrackParameter wtrk = wTrackOrigin(n); 00879 // W = wTrackOrigin(n).w(); 00880 // Ew = wTrackOrigin(n).Ew(); 00881 //cout<<"===Origin status==="<<endl; 00882 //cout<<"W = "<<W<<endl; 00883 //cout<<"Ew ="<<Ew<<endl; 00884 for(int i=0; i<3; i++) { 00885 W[i] = pInfit(n)[i]; 00886 } 00887 W[3] = wTrackOrigin(n).w()[4]; 00888 W[4] = wTrackOrigin(n).w()[5]; 00889 W[5] = wTrackOrigin(n).w()[6]; 00890 for(int j=0; j<3; j++) { 00891 for(int k=0; k<3; k++) { 00892 Ew[j][k] = covInfit(n)[j][k]; 00893 } 00894 } 00895 00896 for(int j=3; j<6; j++) { 00897 for(int k=3; k<6; k++) { 00898 Ew[j][k] = wTrackOrigin(n).Ew()[j+1][k+1]; 00899 } 00900 } 00901 // 00902 // define J matrix to transfer 3 parameters to 4 parameters 00903 // 00904 double px = p4Infit(n).px(); 00905 double py = p4Infit(n).py(); 00906 double pz = p4Infit(n).pz(); 00907 double e = p4Infit(n).e(); 00908 HepMatrix J(7, 6, 0); 00909 J[0][0] = 1; 00910 J[1][1] = 1; 00911 J[2][2] = 1; 00912 J[3][0] = px/e; 00913 J[3][1] = py/e; 00914 J[3][2] = pz/e; 00915 J[4][3] = 1; 00916 J[5][4] = 1; 00917 J[6][5] = 1; 00918 W1 = J * W; 00919 Ew1 = Ew.similarity(J) ; 00920 00921 00922 00923 // cout<<"===Infiddt status==="<<endl; 00924 // cout<<"p4 ="<<p4Infit(n)<<endl; 00925 // cout<<"W ="<<wTrackOrigin(n).w()<<endl; 00926 // cout<<"W1 ="<<W1<<endl; 00927 // cout<<"Ew ="<<wTrackOrigin(n).Ew()<<endl; 00928 // cout<<"Ew1 ="<<Ew1<<endl; 00929 00930 wtrk.setW(W1); 00931 wtrk.setEw(Ew1); 00932 setWTrackInfit(n, wtrk); 00933 HTrackParameter horigin = HTrackParameter(wTrackOrigin(n)); 00934 HTrackParameter hinfit = HTrackParameter(wTrackInfit(n)); 00935 00936 HepVector a0 = horigin.hel(); 00937 HepVector a1 = hinfit.hel(); 00938 HepSymMatrix v0 = horigin.eHel(); 00939 HepSymMatrix v1 = hinfit.eHel(); 00940 HepVector pull(11,0); 00941 for (int k=0; k<5; k++) { 00942 pull[k] = (a0[k]-a1[k])/sqrt(abs(v0[k][k]-v1[k][k])); 00943 // cout<<"pull ["<<k<<"] ="<<pull[k]<<endl; 00944 } 00945 for (int l=5; l<9; l++) { 00946 pull[l] = (wTrackOrigin(n).w()[l-5] - wTrackInfit(n).w()[l-5])/sqrt(abs(wTrackOrigin(n).Ew()[l-5][l-5] - wTrackInfit(n).Ew()[l-5][l-5])); 00947 // cout<<"pull ["<<l<<"] ="<<pull[l]<<endl; 00948 } 00949 00950 // pull[9] = wTrackOrigin(n).w()[3] - wTrackInfit(n).w()[3]; 00951 // pull[10] =1/sqrt(abs(wTrackOrigin(n).Ew()[3][3] - wTrackInfit(n).Ew()[3][3])); 00952 return pull; 00953 }else { 00954 HepVector pull(3,0); 00955 for (int m=0; m<3; m++) { 00956 pull[m] = (wTrackOrigin(n).w()[m] - wTrackInfit(n).w()[m])/sqrt(abs(wTrackOrigin(n).Ew()[m][m] - wTrackInfit(n).Ew()[m][m])); 00957 } 00958 return pull; 00959 } 00960 }
|
|
00137 {m_BeamPosition = BeamPosition;}
|
|
00137 {m_BeamPosition = BeamPosition;}
|
|
|
|
|
|
00138 {m_collideangle = collideangle;}
|
|
00138 {m_collideangle = collideangle;}
|
|
00217 {m_covInfit.sub(i*NTRKPAR+1,c);}
|
|
00217 {m_covInfit.sub(i*NTRKPAR+1,c);}
|
|
00216 {m_covOrigin.sub(i*NTRKPAR+1, c);}
|
|
00216 {m_covOrigin.sub(i*NTRKPAR+1, c);}
|
|
00193 {m_D.sub(ic+1, itk*NTRKPAR+1, p);}
|
|
00193 {m_D.sub(ic+1, itk*NTRKPAR+1, p);}
|
|
00196 { m_DT.sub(itk*NTRKPAR+1, ic+1, p);}
|
|
00196 { m_DT.sub(itk*NTRKPAR+1, ic+1, p);}
|
|
00139 {m_dynamicerror = dynamicerror;}
|
|
00139 {m_dynamicerror = dynamicerror;}
|
|
00137 {m_espread = espread;}
|
|
00137 {m_espread = espread;}
|
|
00130 {m_flag = flag;}
|
|
00130 {m_flag = flag;}
|
|
00130 {m_gammashape.push_back(gammashape);}
|
|
00129 {m_gammashape[n] = gammashape;}
|
|
00130 {m_gammashape.push_back(gammashape);}
|
|
00129 {m_gammashape[n] = gammashape;}
|
|
00131 {m_lgammashape.push_back(n);}
|
|
00131 {m_lgammashape.push_back(n);}
|
|
00131 {m_niter = niter;}
|
|
00131 {m_niter = niter;}
|
|
00136 {m_kalman = kalman;}
|
|
00136 {m_kalman = kalman;}
|
|
00122 {m_mapkinematic.push_back(n);}
|
|
00122 {m_mapkinematic.push_back(n);}
|
|
00123 {m_mappositionA.push_back(n);}
|
|
00123 {m_mappositionA.push_back(n);}
|
|
00124 {m_mappositionB.push_back(n);}
|
|
00124 {m_mappositionB.push_back(n);}
|
|
00218 {m_massvector[i] = mass;}
|
|
00218 {m_massvector[i] = mass;}
|
|
00213 {m_pInfit.sub(i*NTRKPAR+1, p);}
|
|
00213 {m_pInfit.sub(i*NTRKPAR+1, p);}
|
|
00212 { m_pOrigin.sub(i*NTRKPAR+1, p);}
|
|
00212 { m_pOrigin.sub(i*NTRKPAR+1, p);}
|
|
00138 {m_VBeamPosition = VBeamPosition;}
|
|
00138 {m_VBeamPosition = VBeamPosition;}
|
|
00102 {m_wtrk_infit.push_back(wtrk);}
|
|
00100 {m_wtrk_infit[n] = wtrk;}
|
|
00102 {m_wtrk_infit.push_back(wtrk);}
|
|
00100 {m_wtrk_infit[n] = wtrk;}
|
|
00103 {m_lwtrk.push_back(n);}
|
|
00103 {m_lwtrk.push_back(n);}
|
|
00101 {m_wtrk_origin.push_back(wtrk);}
|
|
00099 {m_wtrk_origin[n] = wtrk;}
|
|
00101 {m_wtrk_origin.push_back(wtrk);}
|
|
00099 {m_wtrk_origin[n] = wtrk;}
|
|
|
|
00475 { 00476 00477 int ntrk = numberWTrack(); 00478 HepSymMatrix I(NTRKPAR*m_nktrk, 1); 00479 m_covInfit = m_covOrigin.similarity(I - m_KP*m_D); 00480 for(int i = 0; i < m_nktrk; i++) { 00481 HepSymMatrix ew3 (3, 0); 00482 HepSymMatrix ew6 (6, 0); 00483 HepSymMatrix Ew1 (7, 0); 00484 ew3 = m_covInfit.sub(i*NTRKPAR + 1, (i+1)*NTRKPAR); 00485 for(int j = 0; j < NTRKPAR; j++) { 00486 for(int k = 0; k < NTRKPAR; k++) { 00487 ew6[j][k] = ew3[j][k]; 00488 } 00489 } 00490 for(int m = NTRKPAR; m < 6; m++) { 00491 for(int n = NTRKPAR; n < 6; n++) { 00492 ew6[m][n] = 0;//(wTrackOrigin(i).Ew())[m+1][n+1]; 00493 } 00494 } 00495 double px = p4Infit(i).px(); 00496 double py = p4Infit(i).py(); 00497 double pz = p4Infit(i).pz(); 00498 double m = p4Infit(i).m(); 00499 double e = p4Infit(i).e(); 00500 00501 HepMatrix J(7, 6, 0); 00502 J[0][0] = 1; 00503 J[1][1] = 1; 00504 J[2][2] = 1; 00505 J[3][0] = px/e; 00506 J[3][1] = py/e; 00507 J[3][2] = pz/e; 00508 J[4][3] = 1; 00509 J[5][4] = 1; 00510 J[6][5] = 1; 00511 Ew1 = ew6.similarity(J); 00512 00513 HepVector W(7, 0); 00514 for(int j=0; j<4; j++) { 00515 W[j] = p4Infit(i)[j]; 00516 } 00517 W[4] = wTrackOrigin(i).w()[4]; 00518 W[5] = wTrackOrigin(i).w()[5]; 00519 W[6] = wTrackOrigin(i).w()[6]; 00520 00521 00522 WTrackParameter wtrk = wTrackInfit(i); 00523 wtrk.setEw(Ew1); 00524 wtrk.setW(W); 00525 setWTrackInfit(i, wtrk); 00526 } 00527 00528 00529 }
|
|
|
|
00963 { 00964 KinematicConstraints kc = k; 00965 00966 // std::vector<HepLorentzVector> wlis; 00967 // std::vector<WTrackParameter> wlis_V; 00968 // wlis.clear(); 00969 // wlis_V.clear(); 00970 // for(unsigned int j = 0; j < (kc.Ltrk()).size(); j++) { 00971 // int n = (kc.Ltrk())[j]; 00972 // HepVec wtrk = wTrackInfit(n); 00973 // if(m_espread!=0) wtrk = wTrackOrigin(n); 00974 00975 // wlis.push_back(p4Infit(n)); 00976 // } 00977 // for(unsigned int j = 0; j < (kc.Ltrk_V()).size(); j++) { 00978 // int n = (kc.Ltrk_V())[j]; 00979 // WTrackParameter wtrk = wTrackInfit_V(n); 00980 // wlis_V.push_back(wtrk); 00981 // } 00982 00983 00984 int type = kc.Type(); 00985 switch(type) { 00986 case Resonance: { 00987 // 00988 // E^2 - px^2 - py^2 - pz^2 = mres^2 00989 // 00990 double mres = kc.mres(); 00991 HepLorentzVector pmis; 00992 for(unsigned int j = 0; j< (kc.Ltrk()).size(); j++){ 00993 int n = (kc.Ltrk())[j]; 00994 00995 pmis = pmis + p4Infit(n); 00996 } 00997 // for(unsigned int i = 0; i < wlis_V.size(); i++) 00998 // pmis = pmis + wlis_V[i].p(); 00999 for(unsigned int j = 0; j< (kc.Ltrk()).size(); j++){ 01000 int n = (kc.Ltrk())[j]; 01001 HepMatrix Dc(1, NTRKPAR, 0); 01002 Dc[0][0] = -2 * pmis.px() + 2 * pmis.e() * p4Infit(n).px() / p4Infit(n).e(); 01003 Dc[0][1] = -2 * pmis.py() + 2 * pmis.e() * p4Infit(n).py() / p4Infit(n).e(); 01004 Dc[0][2] = -2 * pmis.pz() + 2 * pmis.e() * p4Infit(n).pz() / p4Infit(n).e(); 01005 // Dc[0][3] = 2 * pmis.e(); 01006 setD(m_nc,n,Dc); 01007 setDT(n, m_nc, Dc.T()); 01008 } 01009 01010 // for(unsigned int i = 0; i < wlis_V.size(); i++) { 01011 // HepMatrix Dc_V(1, 7, 0); 01012 // Dc_V[0][0] = -2 * pmis.px(); 01013 // Dc_V[0][1] = -2 * pmis.py(); 01014 // Dc_V[0][2] = -2 * pmis.pz(); 01015 // Dc_V[0][3] = 2 * pmis.e(); 01016 // m_Dc_V.push_back(Dc_V); 01017 // } 01018 01019 01020 HepVector dc(1, 0); 01021 dc[0] = pmis.m2() - mres * mres; 01022 m_d[m_nc] = dc[0]; 01023 m_nc+=1; 01024 // std::cout << "etot = " << dc[0] <<" , " << mres<< std::endl; 01025 // m_dc.push_back(dc); 01026 // HepVector lambda(1, 0); 01027 // m_lambda.push_back(lambda); 01028 // HepSymMatrix vd(1, 0); 01029 // m_VD.push_back(vd); 01030 // HepSymMatrix V6 = m_Vre; 01031 // m_Vm.push_back(V6); 01032 01033 break; 01034 } 01035 case TotalEnergy: { 01036 // 01037 // E - Etot = 0 01038 // 01039 double etot = kc.etot(); 01040 HepLorentzVector pmis; 01041 for(unsigned int j = 0; j < (kc.Ltrk()).size(); j++){ 01042 int n = (kc.Ltrk())[j]; 01043 pmis = pmis + p4Infit(n); 01044 } 01045 // for(unsigned int i = 0; i < wlis.size(); i++) 01046 // pmis = pmis + wlis[i].p(); 01047 for(unsigned int j = 0; j < (kc.Ltrk()).size(); j++) { 01048 int n = (kc.Ltrk())[j]; 01049 HepMatrix Dc(1, NTRKPAR, 0); 01050 Dc[0][0] = p4Infit(n).px()/p4Infit(n).e(); 01051 Dc[0][1] = p4Infit(n).py()/p4Infit(n).e(); 01052 Dc[0][2] = p4Infit(n).pz()/p4Infit(n).e(); 01053 // Dc[0][3] = 1.0; 01054 setD(m_nc,n,Dc); 01055 setDT(n, m_nc, Dc.T()); 01056 } 01057 HepVector dc(1, 0); 01058 dc[0] = pmis.e() - etot; 01059 m_d[m_nc] = dc[0]; 01060 m_nc+=1; 01061 // m_dc.push_back(dc); 01062 // HepVector lambda(1, 0); 01063 // m_lambda.push_back(lambda); 01064 // HepSymMatrix vd(1, 0); 01065 // m_VD.push_back(vd); 01066 break; 01067 } 01068 case TotalMomentum: { 01069 // 01070 // sqrt(px^2+py^2+pz^2) - ptot = 0 01071 // 01072 double ptot = kc.ptot(); 01073 HepLorentzVector pmis; 01074 for(unsigned int j = 0; j< (kc.Ltrk()).size(); j++){ 01075 int n = (kc.Ltrk())[j]; 01076 pmis = pmis + p4Infit(n); 01077 } 01078 01079 // for(unsigned int i = 0; i < wlis.size(); i++) 01080 // pmis = pmis + wlis[i].p(); 01081 for(unsigned int j = 0; j < (kc.Ltrk()).size(); j++) { 01082 int n = (kc.Ltrk())[j]; 01083 HepMatrix Dc(1, NTRKPAR, 0); 01084 Dc[0][0] = pmis.px()/pmis.rho(); 01085 Dc[0][1] = pmis.py()/pmis.rho(); 01086 Dc[0][2] = pmis.pz()/pmis.rho(); 01087 setD(m_nc,n,Dc); 01088 setDT(n, m_nc, Dc.T()); 01089 // m_Dc.push_back(Dc); 01090 } 01091 HepVector dc(1, 0); 01092 dc[0] = pmis.rho() - ptot; 01093 m_d[m_nc] = dc[0]; 01094 m_nc+=1; 01095 // m_dc.push_back(dc); 01096 // HepVector lambda(1, 0); 01097 // m_lambda.push_back(lambda); 01098 // HepSymMatrix vd(1, 0); 01099 // m_VD.push_back(vd); 01100 break; 01101 } 01102 /* 01103 case kc.typePoint(): { 01104 HepPoint3D point = kc.point(); 01105 double flightpath; 01106 HepMatrix p(2,3,0); 01107 01108 HepSymMatrix Vp(2,0); 01109 for(unsigned int i = 0; i < wlis.size(); i++) { 01110 HepMatrix Dc(2, 7, 0); 01111 m_Dc.push_back(Dc); 01112 } 01113 // wlis_V.size() should be 1 01114 for(unsigned int i = 0; i < wlis_V.size(); i++) { 01115 // HepMatrix Dc(3, 7, 0); 01116 // m_Dc.push_back(Dc); 01117 HepMatrix Dc_V(2, 7, 0); 01118 HepSymMatrix Vclus(3, 0); 01119 for(unsigned int j = 0; j < 3; j++){ 01120 for(unsigned int k = j; k < 3; k++){ 01121 Vclus[j][k] = wlis_V[i].Ew()[j+4][k+4]; 01122 } 01123 } 01124 cout<<"Vclus ="<<Vclus<<endl; 01125 p[0][0] = wlis_V[i].w()[1]; 01126 p[0][1] = -wlis_V[i].w()[0]; 01127 p[1][0] = wlis_V[i].w()[2]; 01128 p[1][2] = -wlis_V[i].w()[0]; 01129 Vp = Vclus.similarity(p); 01130 cout<<"Vp ="<<Vp<<endl; 01131 Dc_V[0][0] = -(wlis_V[i].w()[5] - point[1]); 01132 Dc_V[0][1] = wlis_V[i].w()[4] - point[0]; 01133 Dc_V[0][4] = wlis_V[i].w()[1]; 01134 Dc_V[0][5] = -wlis_V[i].w()[0]; 01135 01136 Dc_V[1][0] = -(wlis_V[i].w()[6] - point[2]); 01137 Dc_V[1][2] = wlis_V[i].w()[4] - point[0]; 01138 Dc_V[1][4] = wlis_V[i].w()[2]; 01139 Dc_V[1][6] = -wlis_V[i].w()[0]; 01140 01141 // HepMatrix q_x(3,1,0) ; 01142 // q_x[0][0] = 1; 01143 // HepMatrix deltaX_x(3,1,0) ; 01144 // deltaX_x[0][0] = 1; 01145 // HepMatrix p1_x = -(q_x.T()*Vclus.inverse(iver)*deltaX)*p2 + p1*(q_x.T()*Vclus.inverse(iver)*q + q.T()*Vclus.inverse(iver)*q_x); 01146 // HepMatrix p2_x = p2*p2; 01147 01148 // HepMatrix q_y(3,1,0) ; 01149 // q_y[1][0] = 1; 01150 // HepMatrix deltaX_y(3,1,0); 01151 // deltaX_y[1][0] = 1; 01152 // HepMatrix p1_y = -(q_y.T()*Vclus.inverse(iver)*deltaX)*p2 + p1*(q_y.T()*Vclus.inverse(iver)*q + q.T()*Vclus.inverse(iver)*q_y); 01153 // HepMatrix p2_y = p2*p2; 01154 01155 // HepMatrix q_z(3,1,0); 01156 // q_z[2][0] = 1; 01157 // HepMatrix deltaX_z(3,1,0); 01158 // deltaX_z[2][0] = 1; 01159 // Hw()[0]<<endl; 01160 //cout<<"dc[0] ="<<dc[0]<<endl; 01161 dc[1] = (wlis_V[i].w()[4] - point[0])*wlis_V[i].w()[2] - (wlis_V[i].w()[6] - point[2])*wlis_V[i].w()[0]; 01162 m_dc.push_back(dc); 01163 } 01164 HepSymMatrix V3 = Vp; 01165 m_Vm.push_back(V3); 01166 break; 01167 } 01168 */ 01169 01170 case ThreeMomentum: { 01171 // 01172 // px - p3x = 0 01173 // py - p3y = 0 01174 // pz - p3z = 0 01175 // 01176 Hep3Vector p3 = kc.p3(); 01177 HepLorentzVector pmis; 01178 for(unsigned int j = 0; j< (kc.Ltrk()).size(); j++){ 01179 int n = (kc.Ltrk())[j]; 01180 pmis = pmis + p4Infit(n); 01181 } 01182 // for(unsigned int i = 0; i < wlis.size(); i++) 01183 // pmis = pmis + wlis[i].p(); 01184 for(unsigned int j = 0; j < (kc.Ltrk()).size(); j++) { 01185 int n = (kc.Ltrk())[j]; 01186 01187 HepMatrix Dc(kc.nc(), NTRKPAR, 0); 01188 Dc[0][0] = 1.0; 01189 Dc[1][1] = 1.0; 01190 Dc[2][2] = 1.0; 01191 HepVector dc(kc.nc(), 0); 01192 dc[0] = pmis.px() - p3.x(); 01193 dc[1] = pmis.py() - p3.y(); 01194 dc[2] = pmis.pz() - p3.z(); 01195 for(int i = 0; i < kc.nc(); i++) { 01196 setD(m_nc+i, n, Dc.sub(i+1, i+1, 1, NTRKPAR)); 01197 setDT(n, m_nc+i, (Dc.sub(i+1, i+1, 1, NTRKPAR)).T()); 01198 m_d[m_nc+i] = dc[i]; 01199 } 01200 // m_Dc.push_back(Dc); 01201 } 01202 m_nc += 3; 01203 01204 // HepVector dc(3, 0); 01205 // dc[0] = pmis.px() - p3.x(); 01206 // dc[1] = pmis.py() - p3.y(); 01207 // dc[2] = pmis.pz() - p3.z(); 01208 // m_dc.push_back(dc); 01209 // HepVector lambda(3, 0); 01210 // m_lambda.push_back(lambda); 01211 // HepSymMatrix vd(3, 0); 01212 // m_VD.push_back(vd); 01213 break; 01214 } 01215 case EqualMass: { 01216 // 01217 // (E_1 ^2 - Px_1 ^2 - Py_1 ^2 - Pz_1 ^2) - (E_2 ^2 - Px_2 ^2 - Py_2 ^2 - Pz_2 ^2) = 0 01218 // 01219 01220 int isiz = (kc.numEqual())[0]; 01221 HepLorentzVector pmis1, pmis2; 01222 for(int n = 0; n < isiz; n++) { 01223 int n1 = (kc.Ltrk())[n]; 01224 pmis1 = pmis1 + p4Infit(n1); 01225 } 01226 int jsiz = (kc.numEqual())[1]; 01227 for(int n = 0; n < jsiz; n++){ 01228 int n2 = (kc.Ltrk())[n+isiz]; 01229 pmis2 = pmis2 + p4Infit(n2); 01230 } 01231 for(int i = 0; i < isiz; i++) { 01232 int n1 = (kc.Ltrk())[i]; 01233 HepMatrix Dc(1, NTRKPAR, 0); 01234 Dc[0][0] = -2 * pmis1.px() + 2 * pmis1.e() * p4Infit(n1).px() / p4Infit(n1).e(); 01235 Dc[0][1] = -2 * pmis1.py() + 2 * pmis1.e() * p4Infit(n1).py() / p4Infit(n1).e(); 01236 Dc[0][2] = -2 * pmis1.pz() + 2 * pmis1.e() * p4Infit(n1).pz() / p4Infit(n1).e(); 01237 // Dc[0][3] = 2 * pmis1.e(); 01238 setD(m_nc,n1,Dc); 01239 setDT(n1,m_nc,Dc.T()); 01240 } 01241 for(int i = 0; i < jsiz; i++) { 01242 int n2 = (kc.Ltrk())[i+isiz]; 01243 HepMatrix Dc(1, NTRKPAR, 0); 01244 Dc[0][0] = 2 * pmis2.px() - 2 * pmis2.e() * p4Infit(n2).px() / p4Infit(n2).e(); 01245 Dc[0][1] = 2 * pmis2.py() - 2 * pmis2.e() * p4Infit(n2).py() / p4Infit(n2).e(); 01246 Dc[0][2] = 2 * pmis2.pz() - 2 * pmis2.e() * p4Infit(n2).pz() / p4Infit(n2).e(); 01247 Dc[0][3] = -2 * pmis2.e(); 01248 setD(m_nc,n2,Dc); 01249 setDT(n2,m_nc,Dc.T()); 01250 } 01251 // int isiz_V = m_nequal_V[0]; 01252 // HepLorentzVector pmis1_V, pmis2_V; 01253 // if(isiz_V > 0){ 01254 // for(int n = 0; n < isiz_V; n++) { 01255 // pmis1_V = pmis1_V + wlis_V[n].p(); 01256 // } 01257 // } 01258 // int jsiz_V = m_nequal_V[1]; 01259 // if(jsiz_V > 0) { 01260 // for(int n = 0; n < jsiz_V; n++) 01261 // pmis2_V = pmis2_V + wlis_V[isiz_V+n].p(); 01262 // } 01263 01264 // for(int i = 0; i < isiz_V; i++) { 01265 // HepMatrix Dc_V(1, 7, 0); 01266 // Dc_V[0][0] = -2 * pmis1_V.px(); 01267 // Dc_V[0][1] = -2 * pmis1_V.py(); 01268 // Dc_V[0][2] = -2 * pmis1_V.pz(); 01269 // Dc_V[0][3] = 2 * pmis1_V.e(); 01270 // m_Dc_V.push_back(Dc_V); 01271 // } 01272 // for(int i = isiz_V; i < isiz_V+jsiz_V; i++) { 01273 // HepMatrix Dc_V(1, 7, 0); 01274 // Dc_V[0][0] = 2 * pmis2_V.px(); 01275 // Dc_V[0][1] = 2 * pmis2_V.py(); 01276 // Dc_V[0][2] = 2 * pmis2_V.pz(); 01277 // Dc_V[0][3] = -2 * pmis2_V.e(); 01278 // m_Dc_V.push_back(Dc_V); 01279 // } 01280 HepVector dc(1, 0); 01281 dc[0] = pmis1.m2() - pmis2.m2();// + pmis1_V.m2() - pmis2_V.m2(); 01282 m_d[m_nc] = dc[0]; 01283 01284 m_nc+=1; 01285 // m_dc.push_back(dc); 01286 // HepVector lambda(1, 0); 01287 // m_lambda.push_back(lambda); 01288 // HepSymMatrix vd(1, 0); 01289 // m_VD.push_back(vd); 01290 // HepSymMatrix V2 = m_Vne; 01291 // m_Vm.push_back(V2); 01292 // std::cout <<"m_Vm[0] ="<<m_Vm[0]<<std::endl; 01293 break; 01294 } 01295 case FourMomentum: 01296 default: { 01297 // 01298 // px - p4x = 0 01299 // py - p4y = 0 01300 // pz - p4z = 0 01301 // e - p4e = 0 01302 // 01303 HepLorentzVector p4 = kc.p4(); 01304 HepLorentzVector pmis; 01305 for(unsigned int j = 0; j< (kc.Ltrk()).size(); j++){ 01306 int n = (kc.Ltrk())[j]; 01307 pmis = pmis + p4Infit(n); 01308 } 01309 // HepLorentzVector pmis_V; 01310 for(unsigned int j = 0; j < (kc.Ltrk()).size(); j++) { 01311 int n = (kc.Ltrk())[j]; 01312 HepMatrix Dc(kc.nc(), NTRKPAR, 0); 01313 Dc[0][0] = 1.0; 01314 Dc[1][1] = 1.0; 01315 Dc[2][2] = 1.0; 01316 Dc[3][0] = p4Infit(n).px() / p4Infit(n).e(); 01317 Dc[3][1] = p4Infit(n).py() / p4Infit(n).e(); 01318 Dc[3][2] = p4Infit(n).pz() / p4Infit(n).e(); 01319 // Dc[3][3] = 1.0; 01320 01321 // m_Dc.push_back(Dc); 01322 HepVector dc(kc.nc(), 0); 01323 dc[0] = pmis.px() - p4.px(); 01324 dc[1] = pmis.py() - p4.py(); 01325 dc[2] = pmis.pz() - p4.pz(); 01326 dc[3] = pmis.e() - p4.e(); 01327 for(int i = 0; i < kc.nc(); i++) { 01328 setD(m_nc+i, n, Dc.sub(i+1, i+1, 1, NTRKPAR)); 01329 setDT(n, m_nc+i, (Dc.sub(i+1, i+1, 1, NTRKPAR)).T()); 01330 m_d[m_nc+i] = dc[i]; 01331 } 01332 } 01333 m_nc += 4; 01334 // for(unsigned int i = 0; i < wlis_V.size(); i++) 01335 // pmis_V = pmis_V + wlis_V[i].p(); 01336 // for(unsigned int i = 0; i < wlis_V.size(); i++) { 01337 // HepMatrix Dc_V(4, 7, 0); 01338 // Dc_V[0][0] = 1.0; 01339 // Dc_V[1][1] = 1.0; 01340 // Dc_V[2][2] = 1.0; 01341 // Dc_V[3][3] = 1.0; 01342 // m_Dc_V.push_back(Dc_V); 01343 // } 01344 01345 // HepVector dc(4, 0); 01346 // dc[0] = pmis.px() + pmis_V.px() - p4.px(); 01347 // dc[1] = pmis.py() + pmis_V.py() - p4.py(); 01348 // dc[2] = pmis.pz() + pmis_V.pz() - p4.pz(); 01349 // dc[3] = pmis.e() + pmis_V.e() - p4.e(); 01350 // m_dc.push_back(dc); 01351 01352 // HepSymMatrix V1 = m_Vme; 01353 // m_Vm.push_back(V1); 01354 // HepVector lambda(4, 0); 01355 // m_lambda.push_back(lambda); 01356 // HepSymMatrix vd(4, 0); 01357 // m_VD.push_back(vd); 01358 01359 break; 01360 } 01361 } 01362 }
|
|
00070 {return m_wtrk_infit[n];}
|
|
00067 {return m_wtrk_infit;}
|
|
00070 {return m_wtrk_infit[n];}
|
|
00067 {return m_wtrk_infit;}
|
|
00071 {return m_lwtrk[n];}
|
|
00068 {return m_lwtrk;}
|
|
00071 {return m_lwtrk[n];}
|
|
00068 {return m_lwtrk;}
|
|
00069 {return m_wtrk_origin[n];}
|
|
00066 {return m_wtrk_origin;}
|
|
00069 {return m_wtrk_origin[n];}
|
|
00066 {return m_wtrk_origin;}
|
|
00171 {return m_virtual_wtrk[n];}
|
|
00171 {return m_virtual_wtrk[n];}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|