ScoutingMuon

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
#ifndef DataFormats_ScoutingMuon_h
#define DataFormats_ScoutingMuon_h

#include <vector>

// Class for holding muon information, for use in data scouting
// IMPORTANT: the content of this class should be changed only in backwards compatible ways!
class ScoutingMuon {
public:
  //constructor with values for all data fields
  ScoutingMuon(float pt,
               float eta,
               float phi,
               float m,
               float ecalIso,
               float hcalIso,
               float trackIso,
               float chi2,
               float ndof,
               int charge,
               float dxy,
               float dz,
               int nValidMuonHits,
               int nValidPixelHits,
               int nMatchedStations,
               int nTrackerLayersWithMeasurement,
               int type,
               int nValidStripHits,
               float trk_qoverp,
               float trk_lambda,
               float trk_pt,
               float trk_phi,
               float trk_eta,
               float dxyError,
               float dzError,
               float trk_qoverpError,
               float trk_lambdaError,
               float trk_phiError,
               float trk_dsz,
               float trk_dszError,
               std::vector<int> vtxIndx)
      : pt_(pt),
        eta_(eta),
        phi_(phi),
        m_(m),
        ecalIso_(ecalIso),
        hcalIso_(hcalIso),
        trackIso_(trackIso),
        chi2_(chi2),
        ndof_(ndof),
        charge_(charge),
        dxy_(dxy),
        dz_(dz),
        nValidMuonHits_(nValidMuonHits),
        nValidPixelHits_(nValidPixelHits),
        nMatchedStations_(nMatchedStations),
        nTrackerLayersWithMeasurement_(nTrackerLayersWithMeasurement),
        type_(type),
        nValidStripHits_(nValidStripHits),
        trk_qoverp_(trk_qoverp),
        trk_lambda_(trk_lambda),
        trk_pt_(trk_pt),
        trk_phi_(trk_phi),
        trk_eta_(trk_eta),
        dxyError_(dxyError),
        dzError_(dzError),
        trk_qoverpError_(trk_qoverpError),
        trk_lambdaError_(trk_lambdaError),
        trk_phiError_(trk_phiError),
        trk_dsz_(trk_dsz),
        trk_dszError_(trk_dszError),
        vtxIndx_(std::move(vtxIndx)) {}
  //default constructor
  ScoutingMuon()
      : pt_(0),
        eta_(0),
        phi_(0),
        m_(0),
        ecalIso_(0),
        hcalIso_(0),
        trackIso_(0),
        chi2_(0),
        ndof_(0),
        charge_(0),
        dxy_(0),
        dz_(0),
        nValidMuonHits_(0),
        nValidPixelHits_(0),
        nMatchedStations_(0),
        nTrackerLayersWithMeasurement_(0),
        type_(0),
        nValidStripHits_(0),
        trk_qoverp_(0),
        trk_lambda_(0),
        trk_pt_(0),
        trk_phi_(0),
        trk_eta_(0),
        dxyError_(0),
        dzError_(0),
        trk_qoverpError_(0),
        trk_lambdaError_(0),
        trk_phiError_(0),
        trk_dsz_(0),
        trk_dszError_(0),
        vtxIndx_(0) {}

  //accessor functions
  float pt() const { return pt_; }
  float eta() const { return eta_; }
  float phi() const { return phi_; }
  float m() const { return m_; }
  float ecalIso() const { return ecalIso_; }
  float hcalIso() const { return hcalIso_; }
  float trackIso() const { return trackIso_; }
  float chi2() const { return chi2_; }
  float ndof() const { return ndof_; }
  int charge() const { return charge_; }
  float dxy() const { return dxy_; }
  float dz() const { return dz_; }
  int nValidMuonHits() const { return nValidMuonHits_; }
  int nValidPixelHits() const { return nValidPixelHits_; }
  int nMatchedStations() const { return nMatchedStations_; }
  int nTrackerLayersWithMeasurement() const { return nTrackerLayersWithMeasurement_; }
  int type() const { return type_; }
  bool isGlobalMuon() const { return type_ & 1 << 1; }
  bool isTrackerMuon() const { return type_ & 1 << 2; }
  int nValidStripHits() const { return nValidStripHits_; }
  float trk_qoverp() const { return trk_qoverp_; }
  float trk_lambda() const { return trk_lambda_; }
  float trk_pt() const { return trk_pt_; }
  float trk_phi() const { return trk_phi_; }
  float trk_eta() const { return trk_eta_; }
  float dxyError() const { return dxyError_; }
  float dzError() const { return dzError_; }
  float trk_qoverpError() const { return trk_qoverpError_; }
  float trk_lambdaError() const { return trk_lambdaError_; }
  float trk_phiError() const { return trk_phiError_; }
  float trk_dsz() const { return trk_dsz_; }
  float trk_dszError() const { return trk_dszError_; }
  std::vector<int> vtxIndx() const { return vtxIndx_; }

private:
  float pt_;
  float eta_;
  float phi_;
  float m_;
  float ecalIso_;
  float hcalIso_;
  float trackIso_;
  float chi2_;
  float ndof_;
  int charge_;
  float dxy_;
  float dz_;
  int nValidMuonHits_;
  int nValidPixelHits_;
  int nMatchedStations_;
  int nTrackerLayersWithMeasurement_;
  int type_;
  int nValidStripHits_;
  float trk_qoverp_;
  float trk_lambda_;
  float trk_pt_;
  float trk_phi_;
  float trk_eta_;
  float dxyError_;
  float dzError_;
  float trk_qoverpError_;
  float trk_lambdaError_;
  float trk_phiError_;
  float trk_dsz_;
  float trk_dszError_;
  std::vector<int> vtxIndx_;
};

typedef std::vector<ScoutingMuon> ScoutingMuonCollection;

#endif