// DCATrackNtuple.h #ifndef DCATrackNtuple_H #define DCATrackNtuple_H // Manage an ntuple for DCA tracks. // // The tuple holds parameters for up to three tracks. // 1. The starting MC track. // 2. The reconstructed track. // 3. The final Monte Carlo track. // // The ntuple is in HBOOK format and is number 101. // // The entries are: // stat - status flag: 0 for MC-reco match // 1 for MC only (unfound track) // 2 for reco only (fake track) // mrs - MC radius_signed // mz - MC z in cm // mphid - MC phi_direction // mtlm - MC tan(lambda) = dz/dsT // mqpt - MC q/pT (e/GeV/c) // rrs - reco radius_signed // rz - reco z // rphid - reco phi_direction // rtlm - reco tan(lambda) = dz/dsT // rqpt - reco q/pT // ers - diagonal error matrix element for r_signed // ez - diagonal error matrix element for z // ephid - diagonal error matrix element for phi_direction // etlm - diagonal error matrix element for tan(lambda) // eqpt - diagonal error matrix element for curvature // nhit - # hits on the reco track // chsq - chi-square for the reco track fit // mchsq - match chi-square = (Tmc-Treco) E (Tmc-Treco) // mrs2 - MC2 radius_signed // mz2 - MC2 z in cm // mphid2- MC2 phi_direction // mtlm2 - MC2 tan(lambda) = dz/dsT // mqpt2 - MC2 q/pT (e/GeV/c) // #include "ptr/Ptr.h" #include "trfbase/SurfacePtr.h" #include "trffit/McRecoTrackNtuple.h" namespace trf { class VTrack; class HTrack; class TrackMatch; class DCATrackNtuple : public McRecoTrackNtuple { private: // data // surface for checking type SurfacePtr _psrf; // current event number int _evt; private: // methods // fill the MC part of the ntuple void _fill_mc(const VTrack& trv, double mphi); // fill the final MC part of the ntuple void _fill_mc2(const VTrack& trv, double mphi); // fill the reco part of the ntuple void _fill_reco(const HTrack& trh, double rphi); public: // constructors and destructor // Constructor: // mc - include starting Monte Carlo track // reco - include reconstructed track // mc2 - include final MC track DCATrackNtuple(bool mc, bool reco, bool mc2); // Destructor. ~DCATrackNtuple(); public: // non-const methods // Set the event number. void set_event(int evt) { _evt = evt; }; // Fill ntuple from the full triplet of tracks. void fill(const VTrack& trv, const HTrack& trh, const VTrack& trv2); // Fill ntuple from a MC-reco pair. void fill(const VTrack& trv, const HTrack& trh); // Fill ntuple from a MC-MC pair. void fill(const VTrack& trv, const VTrack& trv2); // Fill ntuple from a unmatched MC track. void fill(const VTrack& trv); // Fill ntuple from an unmatched reco track. void fill(const HTrack& trh); }; } // end namespace trf #endif