//----------------------------------------------------------------------------- // TObsvVertex: STNTUPLE description of the post-simulation particle // Record format is inherits from Run I ... not the best... // Mar 26 2001 P.Murat (CDF/FNAL) //----------------------------------------------------------------------------- #ifdef __GNUG__ #pragma implementation #endif #include "Stntuple/obj/TObsvVertex.hh" ClassImp(TObsvVertex) //_____________________________________________________________________________ TObsvVertex::TObsvVertex() { SetUniqueID(UINT_MAX); } //_____________________________________________________________________________ TObsvVertex::TObsvVertex(Int_t IVert, Float_t Vx, Float_t Vy, Float_t Vz, Float_t Time, Int_t Mother, Int_t FirstDaughter, Int_t LastDaughter): TLorentzVector(Vx,Vy,Vz,Time), fMother(Mother), fFirstDaughter(FirstDaughter), fLastDaughter(LastDaughter) { SetUniqueID(IVert); } //_____________________________________________________________________________ TObsvVertex::~TObsvVertex() { } //_____________________________________________________________________________ Int_t TObsvVertex::Init(Int_t IVert, Float_t Vx, Float_t Vy, Float_t Vz, Float_t Time, Int_t Mother, Int_t FirstDaughter, Int_t LastDaughter) { // init method: same as constructor SetUniqueID(IVert); TLorentzVector::SetXYZT(Vx,Vy,Vz,Time); fMother = Mother; fFirstDaughter = FirstDaughter; fLastDaughter = LastDaughter; return 0; } //_____________________________________________________________________________ void TObsvVertex::Print(Option_t* Option) const { TString opt(Option); int print_lf(1), print_banner(0), print_data(1); print_lf = opt.Index("/nolf" ) < 0; print_banner = opt.Index("/banner") >= 0; print_data = (opt == "") || (opt.Index("/data") >= 0); if (print_banner) { // print banner printf(" i Vx Vy Vz Time "); printf(" Mom FD LD"); if (print_lf || print_data) printf("\n"); } if (print_data) { printf("%4i",Number()); printf("%9.3f",X()); printf("%9.3f",Y()); printf("%9.3f",Z()); printf("%7.2f",T()); printf("%5i" ,Mother()); printf("%5i" ,FirstDaughter()); printf("%5i" ,LastDaughter()); if (print_lf) printf("\n"); } }