Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-03-09 23:30:28

0001 #ifndef DataFormats_Scouting_Run3ScoutingMuon_h
0002 #define DataFormats_Scouting_Run3ScoutingMuon_h
0003 
0004 #include <vector>
0005 #include "DataFormats/Scouting/interface/Run3ScoutingHitPatternPOD.h"
0006 
0007 // Class for holding muon information, for use in data scouting
0008 // IMPORTANT: the content of this class should be changed only in backwards compatible ways!
0009 class Run3ScoutingMuon {
0010 public:
0011   //constructor with values for all data fields
0012   Run3ScoutingMuon(float pt,
0013                    float eta,
0014                    float phi,
0015                    float m,
0016                    unsigned int type,
0017                    int charge,
0018                    float normalizedChi2,
0019                    float ecalIso,
0020                    float hcalIso,
0021                    float trackIso,
0022                    int nValidStandAloneMuonHits,
0023                    int nStandAloneMuonMatchedStations,
0024                    int nValidRecoMuonHits,
0025                    int nRecoMuonChambers,
0026                    int nRecoMuonChambersCSCorDT,
0027                    int nRecoMuonMatches,
0028                    int nRecoMuonMatchedStations,
0029                    unsigned int nRecoMuonExpectedMatchedStations,
0030                    unsigned int recoMuonStationMask,
0031                    int nRecoMuonMatchedRPCLayers,
0032                    unsigned int recoMuonRPClayerMask,
0033                    int nValidPixelHits,
0034                    int nValidStripHits,
0035                    int nPixelLayersWithMeasurement,
0036                    int nTrackerLayersWithMeasurement,
0037                    float trk_chi2,
0038                    float trk_ndof,
0039                    float trk_dxy,
0040                    float trk_dz,
0041                    float trk_qoverp,
0042                    float trk_lambda,
0043                    float trk_pt,
0044                    float trk_phi,
0045                    float trk_eta,
0046                    float trk_dxyError,
0047                    float trk_dzError,
0048                    float trk_qoverpError,
0049                    float trk_lambdaError,
0050                    float trk_phiError,
0051                    float trk_dsz,
0052                    float trk_dszError,
0053                    float trk_qoverp_lambda_cov,
0054                    float trk_qoverp_phi_cov,
0055                    float trk_qoverp_dxy_cov,
0056                    float trk_qoverp_dsz_cov,
0057                    float trk_lambda_phi_cov,
0058                    float trk_lambda_dxy_cov,
0059                    float trk_lambda_dsz_cov,
0060                    float trk_phi_dxy_cov,
0061                    float trk_phi_dsz_cov,
0062                    float trk_dxy_dsz_cov,
0063                    float trk_vx,
0064                    float trk_vy,
0065                    float trk_vz,
0066                    std::vector<int> vtxIndx,
0067                    Run3ScoutingHitPatternPOD trk_hitPattern)
0068       : pt_(pt),
0069         eta_(eta),
0070         phi_(phi),
0071         m_(m),
0072         type_(type),
0073         charge_(charge),
0074         normalizedChi2_(normalizedChi2),
0075         ecalIso_(ecalIso),
0076         hcalIso_(hcalIso),
0077         trackIso_(trackIso),
0078         nValidStandAloneMuonHits_(nValidStandAloneMuonHits),
0079         nStandAloneMuonMatchedStations_(nStandAloneMuonMatchedStations),
0080         nValidRecoMuonHits_(nValidRecoMuonHits),
0081         nRecoMuonChambers_(nRecoMuonChambers),
0082         nRecoMuonChambersCSCorDT_(nRecoMuonChambersCSCorDT),
0083         nRecoMuonMatches_(nRecoMuonMatches),
0084         nRecoMuonMatchedStations_(nRecoMuonMatchedStations),
0085         nRecoMuonExpectedMatchedStations_(nRecoMuonExpectedMatchedStations),
0086         recoMuonStationMask_(recoMuonStationMask),
0087         nRecoMuonMatchedRPCLayers_(nRecoMuonMatchedRPCLayers),
0088         recoMuonRPClayerMask_(recoMuonRPClayerMask),
0089         nValidPixelHits_(nValidPixelHits),
0090         nValidStripHits_(nValidStripHits),
0091         nPixelLayersWithMeasurement_(nPixelLayersWithMeasurement),
0092         nTrackerLayersWithMeasurement_(nTrackerLayersWithMeasurement),
0093         trk_chi2_(trk_chi2),
0094         trk_ndof_(trk_ndof),
0095         trk_dxy_(trk_dxy),
0096         trk_dz_(trk_dz),
0097         trk_qoverp_(trk_qoverp),
0098         trk_lambda_(trk_lambda),
0099         trk_pt_(trk_pt),
0100         trk_phi_(trk_phi),
0101         trk_eta_(trk_eta),
0102         trk_dxyError_(trk_dxyError),
0103         trk_dzError_(trk_dzError),
0104         trk_qoverpError_(trk_qoverpError),
0105         trk_lambdaError_(trk_lambdaError),
0106         trk_phiError_(trk_phiError),
0107         trk_dsz_(trk_dsz),
0108         trk_dszError_(trk_dszError),
0109         trk_qoverp_lambda_cov_(trk_qoverp_lambda_cov),
0110         trk_qoverp_phi_cov_(trk_qoverp_phi_cov),
0111         trk_qoverp_dxy_cov_(trk_qoverp_dxy_cov),
0112         trk_qoverp_dsz_cov_(trk_qoverp_dsz_cov),
0113         trk_lambda_phi_cov_(trk_lambda_phi_cov),
0114         trk_lambda_dxy_cov_(trk_lambda_dxy_cov),
0115         trk_lambda_dsz_cov_(trk_lambda_dsz_cov),
0116         trk_phi_dxy_cov_(trk_phi_dxy_cov),
0117         trk_phi_dsz_cov_(trk_phi_dsz_cov),
0118         trk_dxy_dsz_cov_(trk_dxy_dsz_cov),
0119         trk_vx_(trk_vx),
0120         trk_vy_(trk_vy),
0121         trk_vz_(trk_vz),
0122         vtxIndx_(std::move(vtxIndx)),
0123         trk_hitPattern_(std::move(trk_hitPattern)) {}
0124   //default constructor
0125   Run3ScoutingMuon()
0126       : pt_(0),
0127         eta_(0),
0128         phi_(0),
0129         m_(0),
0130         type_(0),
0131         charge_(0),
0132         normalizedChi2_(0),
0133         ecalIso_(0),
0134         hcalIso_(0),
0135         trackIso_(0),
0136         nValidStandAloneMuonHits_(0),
0137         nStandAloneMuonMatchedStations_(0),
0138         nValidRecoMuonHits_(0),
0139         nRecoMuonChambers_(0),
0140         nRecoMuonChambersCSCorDT_(0),
0141         nRecoMuonMatches_(0),
0142         nRecoMuonMatchedStations_(0),
0143         nRecoMuonExpectedMatchedStations_(0),
0144         recoMuonStationMask_(0),
0145         nRecoMuonMatchedRPCLayers_(0),
0146         recoMuonRPClayerMask_(0),
0147         nValidPixelHits_(0),
0148         nValidStripHits_(0),
0149         nPixelLayersWithMeasurement_(0),
0150         nTrackerLayersWithMeasurement_(0),
0151         trk_chi2_(0),
0152         trk_ndof_(0),
0153         trk_dxy_(0),
0154         trk_dz_(0),
0155         trk_qoverp_(0),
0156         trk_lambda_(0),
0157         trk_pt_(0),
0158         trk_phi_(0),
0159         trk_eta_(0),
0160         trk_dxyError_(0),
0161         trk_dzError_(0),
0162         trk_qoverpError_(0),
0163         trk_lambdaError_(0),
0164         trk_phiError_(0),
0165         trk_dsz_(0),
0166         trk_dszError_(0),
0167         trk_qoverp_lambda_cov_(0),
0168         trk_qoverp_phi_cov_(0),
0169         trk_qoverp_dxy_cov_(0),
0170         trk_qoverp_dsz_cov_(0),
0171         trk_lambda_phi_cov_(0),
0172         trk_lambda_dxy_cov_(0),
0173         trk_lambda_dsz_cov_(0),
0174         trk_phi_dxy_cov_(0),
0175         trk_phi_dsz_cov_(0),
0176         trk_dxy_dsz_cov_(0),
0177         trk_vx_(0),
0178         trk_vy_(0),
0179         trk_vz_(0),
0180         vtxIndx_(0) {}
0181 
0182   //accessor functions
0183   float pt() const { return pt_; }
0184   float eta() const { return eta_; }
0185   float phi() const { return phi_; }
0186   float m() const { return m_; }
0187   unsigned int type() const { return type_; }
0188   bool isGlobalMuon() const { return type_ & 1 << 1; }
0189   bool isTrackerMuon() const { return type_ & 1 << 2; }
0190   int charge() const { return charge_; }
0191   float normalizedChi2() const { return normalizedChi2_; }
0192   float ecalIso() const { return ecalIso_; }
0193   float hcalIso() const { return hcalIso_; }
0194   float trackIso() const { return trackIso_; }
0195   int nValidStandAloneMuonHits() const { return nValidStandAloneMuonHits_; }
0196   int nStandAloneMuonMatchedStations() const { return nStandAloneMuonMatchedStations_; }
0197   int nValidRecoMuonHits() const { return nValidRecoMuonHits_; }
0198   int nRecoMuonChambers() const { return nRecoMuonChambers_; }
0199   int nRecoMuonChambersCSCorDT() const { return nRecoMuonChambersCSCorDT_; }
0200   int nRecoMuonMatches() const { return nRecoMuonMatches_; }
0201   int nRecoMuonMatchedStations() const { return nRecoMuonMatchedStations_; }
0202   unsigned int nRecoMuonExpectedMatchedStations() const { return nRecoMuonExpectedMatchedStations_; }
0203   unsigned int recoMuonStationMask() const { return recoMuonStationMask_; }
0204   int nRecoMuonMatchedRPCLayers() const { return nRecoMuonMatchedRPCLayers_; }
0205   unsigned int recoMuonRPClayerMask() const { return recoMuonRPClayerMask_; }
0206   int nValidPixelHits() const { return nValidPixelHits_; }
0207   int nValidStripHits() const { return nValidStripHits_; }
0208   int nPixelLayersWithMeasurement() const { return nPixelLayersWithMeasurement_; }
0209   int nTrackerLayersWithMeasurement() const { return nTrackerLayersWithMeasurement_; }
0210   float trk_chi2() const { return trk_chi2_; }
0211   float trk_ndof() const { return trk_ndof_; }
0212   float trk_dxy() const { return trk_dxy_; }
0213   float trk_dz() const { return trk_dz_; }
0214   float trk_qoverp() const { return trk_qoverp_; }
0215   float trk_lambda() const { return trk_lambda_; }
0216   float trk_pt() const { return trk_pt_; }
0217   float trk_phi() const { return trk_phi_; }
0218   float trk_eta() const { return trk_eta_; }
0219   float trk_dxyError() const { return trk_dxyError_; }
0220   float trk_dzError() const { return trk_dzError_; }
0221   float trk_qoverpError() const { return trk_qoverpError_; }
0222   float trk_lambdaError() const { return trk_lambdaError_; }
0223   float trk_phiError() const { return trk_phiError_; }
0224   float trk_dsz() const { return trk_dsz_; }
0225   float trk_dszError() const { return trk_dszError_; }
0226   //add off-diagonal covariance matrix parameter, the above "Error" variables correspond to the diagonal, enum for Cov matrix (qoverp, lambda, phi, dxy, dsz), see https://github.com/cms-sw/cmssw/blob/CMSSW_11_2_X/DataFormats/TrackReco/src/TrackBase.cc for details
0227   float trk_qoverp_lambda_cov() const { return trk_qoverp_lambda_cov_; }
0228   float trk_qoverp_phi_cov() const { return trk_qoverp_phi_cov_; }
0229   float trk_qoverp_dxy_cov() const { return trk_qoverp_dxy_cov_; }
0230   float trk_qoverp_dsz_cov() const { return trk_qoverp_dsz_cov_; }
0231   float trk_lambda_phi_cov() const { return trk_lambda_phi_cov_; }
0232   float trk_lambda_dxy_cov() const { return trk_lambda_dxy_cov_; }
0233   float trk_lambda_dsz_cov() const { return trk_lambda_dsz_cov_; }
0234   float trk_phi_dxy_cov() const { return trk_phi_dxy_cov_; }
0235   float trk_phi_dsz_cov() const { return trk_phi_dsz_cov_; }
0236   float trk_dxy_dsz_cov() const { return trk_dxy_dsz_cov_; }
0237   float trk_vx() const { return trk_vx_; }
0238   float trk_vy() const { return trk_vy_; }
0239   float trk_vz() const { return trk_vz_; }
0240   std::vector<int> const& vtxIndx() const { return vtxIndx_; }
0241   Run3ScoutingHitPatternPOD const& trk_hitPattern() const { return trk_hitPattern_; }
0242 
0243 private:
0244   float pt_;
0245   float eta_;
0246   float phi_;
0247   float m_;
0248   unsigned int type_;
0249   int charge_;
0250   float normalizedChi2_;
0251   float ecalIso_;
0252   float hcalIso_;
0253   float trackIso_;
0254   int nValidStandAloneMuonHits_;
0255   int nStandAloneMuonMatchedStations_;
0256   int nValidRecoMuonHits_;
0257   int nRecoMuonChambers_;
0258   int nRecoMuonChambersCSCorDT_;
0259   int nRecoMuonMatches_;
0260   int nRecoMuonMatchedStations_;
0261   unsigned int nRecoMuonExpectedMatchedStations_;
0262   unsigned int recoMuonStationMask_;
0263   int nRecoMuonMatchedRPCLayers_;
0264   unsigned int recoMuonRPClayerMask_;
0265   int nValidPixelHits_;
0266   int nValidStripHits_;
0267   int nPixelLayersWithMeasurement_;
0268   int nTrackerLayersWithMeasurement_;
0269   float trk_chi2_;
0270   float trk_ndof_;
0271   float trk_dxy_;
0272   float trk_dz_;
0273   float trk_qoverp_;
0274   float trk_lambda_;
0275   float trk_pt_;
0276   float trk_phi_;
0277   float trk_eta_;
0278   float trk_dxyError_;
0279   float trk_dzError_;
0280   float trk_qoverpError_;
0281   float trk_lambdaError_;
0282   float trk_phiError_;
0283   float trk_dsz_;
0284   float trk_dszError_;
0285   float trk_qoverp_lambda_cov_;
0286   float trk_qoverp_phi_cov_;
0287   float trk_qoverp_dxy_cov_;
0288   float trk_qoverp_dsz_cov_;
0289   float trk_lambda_phi_cov_;
0290   float trk_lambda_dxy_cov_;
0291   float trk_lambda_dsz_cov_;
0292   float trk_phi_dxy_cov_;
0293   float trk_phi_dsz_cov_;
0294   float trk_dxy_dsz_cov_;
0295   float trk_vx_;
0296   float trk_vy_;
0297   float trk_vz_;
0298   std::vector<int> vtxIndx_;
0299   Run3ScoutingHitPatternPOD trk_hitPattern_;
0300 };
0301 
0302 typedef std::vector<Run3ScoutingMuon> Run3ScoutingMuonCollection;
0303 
0304 #endif