#include "hvirtualcand.h" #include "hphysicsconstants.h" #include "TBuffer.h" // ROOT's IO and RTTI stuff is added here ClassImp(HVirtualCand) //_HADES_CLASS_DESCRIPTION //////////////////////////////////////////////////////////////////////////////// // // // HVirtualCand // // Virtual class for Candidates // // //////////////////////////////////////////////////////////////////////////////// HVirtualCand::~HVirtualCand() {} void HVirtualCand::print(UInt_t selection) { } Float_t HVirtualCand::getMomentumPID(Int_t pid) { // returns the momentum of the candidate taking // into account the charge of the provided PID ( mom*charge) // In the track reconstruction by default all // momenta are recontructed using charge = 1 if(fMomentum == -1) return fMomentum; Float_t mom = fMomentum; Int_t chrg = TMath::Abs(HPhysicsConstants::charge(pid)); if(chrg > 0) mom = mom*chrg; return mom; } void HVirtualCand::Streamer(TBuffer &R__b) { // Stream an object of class HVirtualCand. UInt_t R__s, R__c; if (R__b.IsReading()) { Version_t R__v = R__b.ReadVersion(&R__s, &R__c); if (R__v) { } TLorentzVector::Streamer(R__b); // R__b >> fCharge; // R__b >> fTofRec; {float R_Dummy;R__b >> R_Dummy; fBeta=Float16_t(R_Dummy);} {float R_Dummy;R__b >> R_Dummy; fMomentum=Float16_t(R_Dummy);} {float R_Dummy;R__b >> R_Dummy; fMass2=Float16_t(R_Dummy);} R__b >> fCharge; R__b >> fTofRec; {float R_Dummy;R__b >> R_Dummy; fPhi=Float16_t(R_Dummy);} {float R_Dummy;R__b >> R_Dummy; fTheta=Float16_t(R_Dummy);} {float R_Dummy;R__b >> R_Dummy; fR=Float16_t(R_Dummy);} {float R_Dummy;R__b >> R_Dummy; fZ=Float16_t(R_Dummy);} {float R_Dummy;R__b >> R_Dummy; fChi2=Float16_t(R_Dummy);} if(R__v > 1){ {float R_Dummy;R__b >> R_Dummy; fPhi2=Float16_t(R_Dummy);} {float R_Dummy;R__b >> R_Dummy; fTheta2=Float16_t(R_Dummy);} {float R_Dummy;R__b >> R_Dummy; fR2=Float16_t(R_Dummy);} {float R_Dummy;R__b >> R_Dummy; fZ2=Float16_t(R_Dummy);} } else { fPhi2 = -1.; fTheta2 = -1.; fR2 = -1.; fZ2 = -1.; } R__b.CheckByteCount(R__s, R__c, HVirtualCand::IsA()); } else { R__c = R__b.WriteVersion(HVirtualCand::IsA(), kTRUE); TLorentzVector::Streamer(R__b); // R__b << fCharge; // R__b << fTofRec; R__b << float(fBeta); R__b << float(fMomentum); R__b << float(fMass2); R__b << fCharge; R__b << fTofRec; R__b << float(fPhi); R__b << float(fTheta); R__b << float(fR); R__b << float(fZ); R__b << float(fChi2); R__b << float(fPhi2); R__b << float(fTheta2); R__b << float(fR2); R__b << float(fZ2); R__b.SetByteCount(R__c, kTRUE); } }