Go to the documentation of this file.00001 #ifndef DataFormats_CSCRecHit2D_H
00002 #define DataFormats_CSCRecHit2D_H
00003
00011 #include "DataFormats/Common/interface/RangeMap.h"
00012 #include <DataFormats/TrackingRecHit/interface/RecHit2DLocalPos.h>
00013 #include <DataFormats/MuonDetId/interface/CSCDetId.h>
00014 #include <vector>
00015 #include <map>
00016 #include <iosfwd>
00017
00018 class CSCRecHit2D : public RecHit2DLocalPos {
00019
00020 public:
00021
00022 typedef std::vector<int> ChannelContainer;
00023 typedef edm::RangeMap<int, std::vector<float> > ADCContainer;
00024
00025 enum SharedInputType {all = TrackingRecHit::all, some = TrackingRecHit::some, allWires, someWires, allStrips, someStrips};
00026
00027 CSCRecHit2D();
00028
00029 CSCRecHit2D( const CSCDetId& id,
00030 const LocalPoint& pos, const LocalError& err,
00031 const ChannelContainer& channels,
00032 const ADCContainer& adcs,
00033 const ChannelContainer& wgroups,
00034 float tpeak,
00035 float posInStrip,
00036 float errInStrip,
00037 int quality,
00038 short int badStrip=0, short int badWireGroup=0,
00039 int scaledWireTime=0 );
00040
00041 ~CSCRecHit2D();
00042
00044 CSCRecHit2D* clone() const { return new CSCRecHit2D( *this ); }
00045 LocalPoint localPosition() const { return theLocalPosition; }
00046 LocalError localPositionError() const { return theLocalError; }
00047 CSCDetId cscDetId() const { return geographicalId(); }
00048
00050 const ChannelContainer& channels() const { return theStripsLowBits; }
00051
00052
00054 const ChannelContainer& channelsl1a() const { return theStripsHighBits; }
00055
00057 const ChannelContainer& channelsTotal() const { return theStrips; }
00058
00060 const ADCContainer& adcs() const { return theADCs; }
00061
00063
00064 ChannelContainer wgroups() const { return theWgroupsLowBits; }
00065
00067 ChannelContainer wgroupsBX() const { return theWgroupsHighBits; }
00068
00070 ChannelContainer wgroupsBXandWire() const { return theWireGroups; }
00071
00073 float tpeak() const { return theTpeak; }
00074
00076 float positionWithinStrip() const { return thePositionWithinStrip; };
00077
00079 float errorWithinStrip() const { return theErrorWithinStrip;} ;
00080
00082 int quality() const { return theQuality;}
00083
00085 short int badStrip() const { return theBadStrip; }
00086 short int badWireGroup() const { return theBadWireGroup; }
00087
00088
00089 float wireTime() const { return (float)theScaledWireTime/100.; }
00090
00092 virtual bool sharesInput(const TrackingRecHit *other, TrackingRecHit::SharedInputType what) const;
00093
00095 bool sharesInput(const TrackingRecHit *other, CSCRecHit2D::SharedInputType what) const;
00096
00098 bool sharesInput(const CSCRecHit2D *otherRecHit, CSCRecHit2D::SharedInputType what) const;
00099
00101 void print() const;
00102
00103 private:
00104
00105 LocalPoint theLocalPosition;
00106 LocalError theLocalError;
00107 ChannelContainer theStrips;
00108 ADCContainer theADCs;
00109 ChannelContainer theWireGroups;
00110 float theTpeak;
00111 float thePositionWithinStrip;
00112 float theErrorWithinStrip;
00113 int theQuality;
00114 short int theBadStrip;
00115 short int theBadWireGroup;
00116 int theScaledWireTime;
00117 ChannelContainer theStripsLowBits;
00118 ChannelContainer theStripsHighBits;
00119 ChannelContainer theWgroupsHighBits;
00120 ChannelContainer theWgroupsLowBits;
00121
00122 };
00123
00125 std::ostream& operator<<(std::ostream& os, const CSCRecHit2D& rh);
00126
00127 #endif
00128