Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef MuonReco_MuonSegmentMatch_h
0002 #define MuonReco_MuonSegmentMatch_h
0003 
0004 #include <cmath>
0005 
0006 #include "DataFormats/DTRecHit/interface/DTRecSegment4DCollection.h"
0007 #include "DataFormats/CSCRecHit/interface/CSCSegmentCollection.h"
0008 #include "DataFormats/GEMRecHit/interface/GEMSegmentCollection.h"
0009 #include "DataFormats/GEMRecHit/interface/ME0SegmentCollection.h"
0010 
0011 namespace reco {
0012   class MuonSegmentMatch {
0013   public:
0014     /// segment mask flags

0015     static const unsigned int Arbitrated = 1 << 8;                  // is arbitrated (multiple muons)

0016     static const unsigned int BestInChamberByDX = 1 << 9;           // best delta x in single muon chamber

0017     static const unsigned int BestInChamberByDR = 1 << 10;          // best delta r in single muon chamber

0018     static const unsigned int BestInChamberByDXSlope = 1 << 11;     // best delta dx/dz in single muon chamber

0019     static const unsigned int BestInChamberByDRSlope = 1 << 12;     // best delta dy/dz in single muon chamber

0020     static const unsigned int BestInStationByDX = 1 << 13;          // best delta x in single muon station

0021     static const unsigned int BestInStationByDR = 1 << 14;          // best delta r in single muon station

0022     static const unsigned int BestInStationByDXSlope = 1 << 15;     // best delta dx/dz in single muon station

0023     static const unsigned int BestInStationByDRSlope = 1 << 16;     // best delta dy/dz in single muon station

0024     static const unsigned int BelongsToTrackByDX = 1 << 17;         // best delta x of multiple muons

0025     static const unsigned int BelongsToTrackByDR = 1 << 18;         // best delta r of multiple muons

0026     static const unsigned int BelongsToTrackByDXSlope = 1 << 19;    // best delta dx/dz of multiple muons

0027     static const unsigned int BelongsToTrackByDRSlope = 1 << 20;    // best delta dy/dz of multiple muons

0028     static const unsigned int BelongsToTrackByME1aClean = 1 << 21;  // won ME1a segment sharing cleaning

0029     static const unsigned int BelongsToTrackByOvlClean = 1 << 22;   // won chamber overlap segment sharing cleaning

0030     static const unsigned int BelongsToTrackByClusClean = 1 << 23;  // won cluster sharing cleaning

0031     // won any arbitration cleaning type, including defaults

0032     static const unsigned int BelongsToTrackByCleaning = 1 << 24;
0033 
0034     float x;            // X position of the matched segment

0035     float y;            // Y position of the matched segment

0036     float xErr;         // uncertainty in X

0037     float yErr;         // uncertainty in Y

0038     float dXdZ;         // dX/dZ of the matched segment

0039     float dYdZ;         // dY/dZ of the matched segment

0040     float dXdZErr;      // uncertainty in dX/dZ

0041     float dYdZErr;      // uncertainty in dY/dZ

0042     unsigned int mask;  // arbitration mask

0043     bool hasZed_;       // contains local y information (only relevant for segments in DT)

0044     bool hasPhi_;       // contains local x information (only relevant for segments in DT)

0045 
0046     bool isMask(unsigned int flag = Arbitrated) const { return (mask & flag) == flag; }
0047     void setMask(unsigned int flag) { mask |= flag; }
0048     float t0;
0049 
0050     DTRecSegment4DRef dtSegmentRef;
0051     CSCSegmentRef cscSegmentRef;
0052     GEMSegmentRef gemSegmentRef;
0053     ME0SegmentRef me0SegmentRef;
0054     MuonSegmentMatch() : x(0), y(0), xErr(0), yErr(0), dXdZ(0), dYdZ(0), dXdZErr(0), dYdZErr(0) {}
0055 
0056     bool hasZed() const { return hasZed_; }
0057     bool hasPhi() const { return hasPhi_; }
0058   };
0059 }  // namespace reco

0060 
0061 #endif