Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:04:01

0001 /****************************************************************************
0002 *
0003 * This is a part of TOTEM offline software.
0004 * Authors:
0005 *   Jan Kašpar (jan.kaspar@gmail.com)
0006 *
0007 ****************************************************************************/
0008 
0009 #ifndef DataFormats_CTPPSReco_CTPPSLocalTrackLite
0010 #define DataFormats_CTPPSReco_CTPPSLocalTrackLite
0011 
0012 #include <cstdint>
0013 
0014 #include "DataFormats/CTPPSReco/interface/CTPPSPixelLocalTrackRecoInfo.h"
0015 
0016 /**
0017  *\brief Local (=single RP) track with essential information only.
0018  **/
0019 class CTPPSLocalTrackLite {
0020 public:
0021   CTPPSLocalTrackLite()
0022       : rp_id_(0),
0023         x_(0.),
0024         x_unc_(-1.),
0025         y_(0.),
0026         y_unc_(-1.),
0027         tx_(999.),
0028         tx_unc_(-1.),
0029         ty_(999.),
0030         ty_unc_(-1.),
0031         chi2_norm_(-1.),
0032         pixel_track_reco_info_(CTPPSpixelLocalTrackReconstructionInfo::invalid),
0033         num_points_fit_(0),
0034         time_(0.),
0035         time_unc_(-1.) {}
0036 
0037   CTPPSLocalTrackLite(uint32_t pid,
0038                       float px,
0039                       float pxu,
0040                       float py,
0041                       float pyu,
0042                       float ptx,
0043                       float ptxu,
0044                       float pty,
0045                       float ptyu,
0046                       float pchiSquaredOverNDF,
0047                       CTPPSpixelLocalTrackReconstructionInfo ppixelTrack_reco_info,
0048                       unsigned short pNumberOfPointsUsedForFit,
0049                       float pt,
0050                       float ptu)
0051       : rp_id_(pid),
0052         x_(px),
0053         x_unc_(pxu),
0054         y_(py),
0055         y_unc_(pyu),
0056         tx_(ptx),
0057         tx_unc_(ptxu),
0058         ty_(pty),
0059         ty_unc_(ptyu),
0060         chi2_norm_(pchiSquaredOverNDF),
0061         pixel_track_reco_info_(ppixelTrack_reco_info),
0062         num_points_fit_(pNumberOfPointsUsedForFit),
0063         time_(pt),
0064         time_unc_(ptu) {}
0065 
0066   /// returns the RP id
0067   inline uint32_t rpId() const { return rp_id_; }
0068 
0069   /// returns the horizontal track position
0070   inline float x() const { return x_; }
0071 
0072   /// returns the horizontal track position uncertainty
0073   inline float xUnc() const { return x_unc_; }
0074 
0075   /// returns the vertical track position
0076   inline float y() const { return y_; }
0077 
0078   /// returns the vertical track position uncertainty
0079   inline float yUnc() const { return y_unc_; }
0080 
0081   /// returns the track time
0082   inline float time() const { return time_; }
0083 
0084   /// returns the track time uncertainty
0085   inline float timeUnc() const { return time_unc_; }
0086 
0087   /// returns the track horizontal angle
0088   inline float tx() const { return tx_; }
0089 
0090   /// returns the track horizontal angle uncertainty
0091   inline float txUnc() const { return tx_unc_; }
0092 
0093   /// returns the track vertical angle
0094   inline float ty() const { return ty_; }
0095 
0096   /// returns the track vertical angle uncertainty
0097   inline float tyUnc() const { return ty_unc_; }
0098 
0099   /// returns the track fit chi Squared over NDF
0100   inline float chiSquaredOverNDF() const { return chi2_norm_; }
0101 
0102   /// returns the track reconstruction info byte
0103   inline CTPPSpixelLocalTrackReconstructionInfo pixelTrackRecoInfo() const { return pixel_track_reco_info_; }
0104 
0105   /// returns the number of points used for fit
0106   inline unsigned short numberOfPointsUsedForFit() const { return num_points_fit_; }
0107 
0108 protected:
0109   /// RP id
0110   uint32_t rp_id_;
0111 
0112   /// local track parameterization
0113   /// x = x0 + tx*(z-z0), y = y0 + ty*(z-z0)
0114   /// x0, y0, z-z0 in mm
0115   /// z0: position of the reference scoring plane (in the middle of the RP)
0116 
0117   /// horizontal hit position, mm
0118   float x_;
0119   /// uncertainty on horizontal hit position, mm
0120   float x_unc_;
0121   /// vertical hit position, mm
0122   float y_;
0123   /// uncertainty on vertical hit position, mm
0124   float y_unc_;
0125   /// horizontal angle, x = x0 + tx*(z-z0)
0126   float tx_;
0127   /// uncertainty on horizontal angle
0128   float tx_unc_;
0129   /// vertical angle, y = y0 + ty*(z-z0)
0130   float ty_;
0131   /// uncertainty on vertical angle
0132   float ty_unc_;
0133   /// fit \f$\chi^2\f$/NDF
0134   float chi2_norm_;
0135 
0136   /// Track information byte for bx-shifted runs:
0137   /// * notShiftedRun    -> Default value for tracks reconstructed in non-bx-shifted ROCs
0138   /// * allShiftedPlanes -> Track reconstructed in a bx-shifted ROC with bx-shifted planes only
0139   /// * noShiftedPlanes  -> Track reconstructed in a bx-shifted ROC with non-bx-shifted planes only
0140   /// * mixedPlanes      -> Track reconstructed in a bx-shifted ROC both with bx-shifted and non-bx-shifted planes
0141   /// * invalid          -> Dummy value. Assigned when pixelTrack_reco_info is not computed (i.e. non-pixel tracks)
0142   CTPPSpixelLocalTrackReconstructionInfo pixel_track_reco_info_;
0143 
0144   /// number of points used for fit
0145   unsigned short num_points_fit_;
0146 
0147   /// time information, ns
0148   float time_;
0149   /// uncertainty on time information, ns
0150   float time_unc_;
0151 };
0152 
0153 #endif