CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Attributes | Private Attributes
CSCRecHit2D Class Referencefinal

#include <CSCRecHit2D.h>

Inheritance diagram for CSCRecHit2D:
RecHit2DLocalPos TrackingRecHit

Public Types

typedef edm::RangeMap< int, std::vector< float > > ADCContainer
 
typedef std::vector< int > ChannelContainer
 
enum  SharedInputType {
  all = TrackingRecHit::all, some = TrackingRecHit::some, allWires, someWires,
  allStrips, someStrips
}
 
- Public Types inherited from RecHit2DLocalPos
typedef GloballyPositioned< float >::LocalPoint LocalPoint
 
- Public Types inherited from TrackingRecHit
typedef std::vector< ConstRecHitPointerConstRecHitContainer
 
using ConstRecHitPointer = std::shared_ptr< TrackingRecHit const >
 
typedef unsigned int id_type
 
typedef std::vector< ConstRecHitPointerRecHitContainer
 
using RecHitPointer = std::shared_ptr< TrackingRecHit const >
 
enum  SharedInputType { all, some }
 definition of equality via shared input More...
 
enum  Type {
  valid = 0, missing = 1, inactive = 2, bad = 3,
  missing_inner = 4, missing_outer = 5, inactive_inner = 6, inactive_outer = 7
}
 

Public Member Functions

float adcs (unsigned int strip, unsigned int timebin) const
 Map of strip ADCs for strips comprising the rechit. More...
 
short int badStrip () const
 flags for involvement of 'bad' channels More...
 
short int badWireGroup () const
 
int channels (unsigned int i) const
 Extracting strip channel numbers comprising the rechit - low. More...
 
int channelsl1a (unsigned int i) const
 Extract the L1A phase bits from the StripChannelContainer - high. More...
 
CSCRecHit2Dclone () const override
 RecHit2DLocalPos base class interface. More...
 
CSCDetId cscDetId () const
 
 CSCRecHit2D ()
 
 CSCRecHit2D (const CSCDetId &id, const LocalPoint &pos, const LocalError &err, const ChannelContainer &channels, const ADCContainer &adcs, const ChannelContainer &wgroups, float tpeak, float posInStrip, float errInStrip, int quality, short int badStrip=0, short int badWireGroup=0, int scaledWireTime=0, float energyDeposit=-995.)
 
float energyDepositedInLayer () const
 
float errorWithinStrip () const
 The uncertainty of the estimated position within the strip. More...
 
short int hitWire () const
 L1A. More...
 
LocalPoint localPosition () const override
 
LocalError localPositionError () const override
 
unsigned int nStrips () const
 
unsigned int nTimeBins () const
 
unsigned int nWireGroups () const
 
float positionWithinStrip () const
 The estimated position within the strip. More...
 
void print () const
 Print the content of the RecHit2D including L1A (for debugging) More...
 
int quality () const
 quality flag of the reconstruction More...
 
bool sharesInput (const TrackingRecHit *other, TrackingRecHit::SharedInputType what) const override
 Returns true if the two TrackingRecHits are using the same input information, false otherwise. In this case, looks at the geographical ID and channel numbers for strips and wires. More...
 
bool sharesInput (const TrackingRecHit *other, CSCRecHit2D::SharedInputType what) const
 Returns true if the two TrackingRecHits are using the same input information, false otherwise. In this case, looks at the geographical ID and channel numbers for strips and wires. More...
 
bool sharesInput (const CSCRecHit2D *otherRecHit, CSCRecHit2D::SharedInputType what) const
 Returns true if the two CSCRecHits are using the same input information, false otherwise. In this case, looks at the geographical ID and channel numbers for strips and wires. More...
 
float tpeak () const
 Fitted peaking time. More...
 
short int wgroupsBX () const
 
float wireTime () const
 
 ~CSCRecHit2D () override
 
- Public Member Functions inherited from RecHit2DLocalPos
int dimension () const override
 
AlgebraicVector parameters () const override
 
AlgebraicSymMatrix parametersError () const override
 
AlgebraicMatrix projectionMatrix () const override
 
 RecHit2DLocalPos (DetId id)
 
 RecHit2DLocalPos (TrackingRecHit::id_type id=0)
 
std::vector< const TrackingRecHit * > recHits () const override
 Access to component RecHits (if any) More...
 
std::vector< TrackingRecHit * > recHits () override
 Non-const access to component RecHits (if any) More...
 
 ~RecHit2DLocalPos () override
 
- Public Member Functions inherited from TrackingRecHit
virtual bool canImproveWithTrack () const
 
RecHitPointer cloneForFit (const GeomDet &idet) const
 
virtual TrackingRecHitcloneHit () const
 
virtual RecHitPointer cloneSH () const
 
const GeomDetdet () const
 
virtual const GeomDetUnitdetUnit () const
 
virtual float errorGlobalR () const
 
virtual float errorGlobalRPhi () const
 
virtual float errorGlobalZ () const
 
DetId geographicalId () const
 
virtual void getKfComponents (KfComponentsHolder &holder) const
 
unsigned int getRTTI () const
 
Type getType () const
 
virtual GlobalPoint globalPosition () const
 
virtual GlobalError globalPositionError () const
 
virtual bool hasPositionAndError () const
 to be redefined by daughter class More...
 
virtual TrackingRecHit const * hit () const
 
bool isValid () const
 
id_type rawId () const
 
virtual void recHitsV (std::vector< const TrackingRecHit *> &) const
 
virtual void recHitsV (std::vector< TrackingRecHit *> &)
 
virtual void setDet (const GeomDet &idet)
 
virtual const Surfacesurface () const
 
 TrackingRecHit (DetId id, Type type=valid)
 
 TrackingRecHit (id_type id=0, Type type=valid)
 
 TrackingRecHit (DetId id, unsigned int rt, Type type=valid)
 
 TrackingRecHit (const GeomDet &idet, Type type=valid)
 
 TrackingRecHit (const GeomDet &idet, unsigned int rt, Type type=valid)
 
 TrackingRecHit (const GeomDet &idet, TrackingRecHit const &rh)
 
virtual ConstRecHitContainer transientHits () const
 
Type type () const
 
virtual float weight () const
 
virtual ~TrackingRecHit ()
 

Static Public Attributes

static const unsigned int MAXSTRIPS = 3
 
static const unsigned int MAXTIMEBINS = 4
 
static const unsigned int N_ADC = MAXSTRIPS * MAXTIMEBINS
 
- Static Public Attributes inherited from TrackingRecHit
static const int rttiShift = 24
 
static const int typeMask = 0xf
 

Private Attributes

short int hitWire_
 
unsigned char nStrips_
 
unsigned char nTimeBins_
 
unsigned char nWireGroups_
 
float theADCs_ [N_ADC]
 
short int theBadStrip
 
short int theBadWireGroup
 
float theEnergyDeposit
 
float theErrorWithinStrip
 
unsigned char theL1APhaseBits_ [MAXSTRIPS]
 
LocalError theLocalError
 
LocalPoint theLocalPosition
 
float thePositionWithinStrip
 
int theQuality
 
int theScaledWireTime
 
unsigned char theStrips_ [MAXSTRIPS]
 
float theTpeak
 
short int theWGroupsBX_
 

Additional Inherited Members

- Protected Member Functions inherited from TrackingRecHit
void setId (id_type iid)
 
void setRTTI (unsigned int rt)
 
void setType (Type ttype)
 

Detailed Description

Describes a 2-dim reconstructed hit in one layer of an Endcap Muon CSC.

Author
Tim Cox et al.

Definition at line 18 of file CSCRecHit2D.h.

Member Typedef Documentation

◆ ADCContainer

typedef edm::RangeMap<int, std::vector<float> > CSCRecHit2D::ADCContainer

Definition at line 21 of file CSCRecHit2D.h.

◆ ChannelContainer

typedef std::vector<int> CSCRecHit2D::ChannelContainer

Definition at line 20 of file CSCRecHit2D.h.

Member Enumeration Documentation

◆ SharedInputType

Enumerator
all 
some 
allWires 
someWires 
allStrips 
someStrips 

Definition at line 23 of file CSCRecHit2D.h.

Constructor & Destructor Documentation

◆ CSCRecHit2D() [1/2]

CSCRecHit2D::CSCRecHit2D ( )

Definition at line 4 of file CSCRecHit2D.cc.

References mps_fire::i, dqmiolumiharvest::j, MAXSTRIPS, MAXTIMEBINS, theADCs_, and theStrips_.

Referenced by clone().

5  : theTpeak(-999.),
7  theErrorWithinStrip(-999.),
8  theEnergyDeposit(-994.),
9  theQuality(0),
11  theBadStrip(0),
12  theBadWireGroup(0),
13  nStrips_(0),
14  nWireGroups_(0),
15  nTimeBins_(0),
16  theLocalPosition(0., 0.),
17  theLocalError(0., 0., 0.) {
18  for (unsigned int i = 0; i < MAXSTRIPS; i++)
19  theStrips_[i] = 0;
20  for (unsigned int i = 0; i < MAXSTRIPS; i++)
21  for (unsigned int j = 0; j < MAXTIMEBINS; j++)
22  theADCs_[i * MAXTIMEBINS + j] = 0;
23 }
LocalPoint theLocalPosition
Definition: CSCRecHit2D.h:138
unsigned char nTimeBins_
Definition: CSCRecHit2D.h:132
unsigned char nWireGroups_
Definition: CSCRecHit2D.h:132
unsigned char nStrips_
Definition: CSCRecHit2D.h:132
static const unsigned int MAXSTRIPS
Definition: CSCRecHit2D.h:32
short int theBadStrip
Definition: CSCRecHit2D.h:129
short int theBadWireGroup
Definition: CSCRecHit2D.h:130
LocalError theLocalError
Definition: CSCRecHit2D.h:139
float theTpeak
Definition: CSCRecHit2D.h:121
int theScaledWireTime
Definition: CSCRecHit2D.h:126
float thePositionWithinStrip
Definition: CSCRecHit2D.h:122
float theErrorWithinStrip
Definition: CSCRecHit2D.h:123
float theEnergyDeposit
Definition: CSCRecHit2D.h:124
static const unsigned int MAXTIMEBINS
Definition: CSCRecHit2D.h:33
float theADCs_[N_ADC]
Definition: CSCRecHit2D.h:136
unsigned char theStrips_[MAXSTRIPS]
Definition: CSCRecHit2D.h:135

◆ CSCRecHit2D() [2/2]

CSCRecHit2D::CSCRecHit2D ( const CSCDetId id,
const LocalPoint pos,
const LocalError err,
const ChannelContainer channels,
const ADCContainer adcs,
const ChannelContainer wgroups,
float  tpeak,
float  posInStrip,
float  errInStrip,
int  quality,
short int  badStrip = 0,
short int  badWireGroup = 0,
int  scaledWireTime = 0,
float  energyDeposit = -995. 
)

Definition at line 25 of file CSCRecHit2D.cc.

References adcs(), channels(), gather_cfg::cout, hitWire_, mps_fire::i, dqmiolumiharvest::j, dqmdumpme::k, MAXSTRIPS, MAXTIMEBINS, nStrips_, nTimeBins_, nWireGroups_, theADCs_, theL1APhaseBits_, theStrips_, theWGroupsBX_, and createJobs::tmp.

39  : RecHit2DLocalPos(id),
40  theTpeak(tpeak),
41  thePositionWithinStrip(posInStrip),
42  theErrorWithinStrip(errInStrip),
43  theEnergyDeposit(energyDeposit),
45  theScaledWireTime(scaledWireTime),
50  nStrips_ = channels.size();
51  nWireGroups_ = wgroups.size();
52 
53  if (nStrips_ > MAXSTRIPS) {
54  std::cout << "CSCRecHit2D: not enough strips in DataFormat! " << unsigned(nStrips_) << std::endl;
56  }
57 
58  for (unsigned int i = 0; i < MAXSTRIPS; i++)
59  theStrips_[i] = 0;
60  for (unsigned int i = 0; i < MAXSTRIPS; i++)
61  theL1APhaseBits_[i] = 0;
62  for (unsigned int i = 0; i < MAXSTRIPS; i++)
63  for (unsigned int j = 0; j < MAXTIMEBINS; j++)
64  theADCs_[i * MAXTIMEBINS + j] = 0;
65 
66  for (unsigned int i = 0; i < nStrips_; i++) {
67  theStrips_[i] = channels[i] & 0x000000FF;
68  theL1APhaseBits_[i] = channels[i] & 0x0000FF00;
69  }
70  if (nWireGroups_ > 0) {
71  //take only the low bits
72  hitWire_ = wgroups[nWireGroups_ / 2] & 0x0000FFFF;
73  theWGroupsBX_ = (wgroups[nWireGroups_ / 2] >> 16) & 0x0000FFFF;
74  } else {
75  hitWire_ = 0;
76  theWGroupsBX_ = 0;
77  }
78  ADCContainer tmp(adcs); //must be a bug in RangeMap!!!???
79  nTimeBins_ = tmp.size() / nStrips_;
80  unsigned int k = 0;
81  for (unsigned int i = 0; i < nStrips_; i++)
82  for (unsigned int j = 0; j < nTimeBins_; j++) {
83  theADCs_[i * MAXTIMEBINS + j] = tmp[k];
84  k++;
85  }
86 }
LocalPoint theLocalPosition
Definition: CSCRecHit2D.h:138
unsigned char nTimeBins_
Definition: CSCRecHit2D.h:132
RecHit2DLocalPos(DetId id)
unsigned char nWireGroups_
Definition: CSCRecHit2D.h:132
unsigned char nStrips_
Definition: CSCRecHit2D.h:132
short int hitWire_
Definition: CSCRecHit2D.h:127
static const unsigned int MAXSTRIPS
Definition: CSCRecHit2D.h:32
short int theBadStrip
Definition: CSCRecHit2D.h:129
short int badStrip() const
flags for involvement of &#39;bad&#39; channels
Definition: CSCRecHit2D.h:91
edm::RangeMap< int, std::vector< float > > ADCContainer
Definition: CSCRecHit2D.h:21
short int theBadWireGroup
Definition: CSCRecHit2D.h:130
LocalError theLocalError
Definition: CSCRecHit2D.h:139
float theTpeak
Definition: CSCRecHit2D.h:121
float adcs(unsigned int strip, unsigned int timebin) const
Map of strip ADCs for strips comprising the rechit.
Definition: CSCRecHit2D.h:74
short int badWireGroup() const
Definition: CSCRecHit2D.h:92
int theScaledWireTime
Definition: CSCRecHit2D.h:126
float tpeak() const
Fitted peaking time.
Definition: CSCRecHit2D.h:79
float thePositionWithinStrip
Definition: CSCRecHit2D.h:122
float theErrorWithinStrip
Definition: CSCRecHit2D.h:123
float theEnergyDeposit
Definition: CSCRecHit2D.h:124
static const unsigned int MAXTIMEBINS
Definition: CSCRecHit2D.h:33
short int theWGroupsBX_
Definition: CSCRecHit2D.h:128
float theADCs_[N_ADC]
Definition: CSCRecHit2D.h:136
int channels(unsigned int i) const
Extracting strip channel numbers comprising the rechit - low.
Definition: CSCRecHit2D.h:61
tmp
align.sh
Definition: createJobs.py:716
unsigned char theStrips_[MAXSTRIPS]
Definition: CSCRecHit2D.h:135
int quality() const
quality flag of the reconstruction
Definition: CSCRecHit2D.h:88
unsigned char theL1APhaseBits_[MAXSTRIPS]
Definition: CSCRecHit2D.h:134

◆ ~CSCRecHit2D()

CSCRecHit2D::~CSCRecHit2D ( )
override

Definition at line 88 of file CSCRecHit2D.cc.

88 {}

Member Function Documentation

◆ adcs()

float CSCRecHit2D::adcs ( unsigned int  strip,
unsigned int  timebin 
) const
inline

Map of strip ADCs for strips comprising the rechit.

Definition at line 74 of file CSCRecHit2D.h.

References MAXTIMEBINS, nano_mu_digi_cff::strip, and theADCs_.

Referenced by CSCRecHit2D().

74 { return theADCs_[strip * MAXTIMEBINS + timebin]; }
static const unsigned int MAXTIMEBINS
Definition: CSCRecHit2D.h:33
float theADCs_[N_ADC]
Definition: CSCRecHit2D.h:136

◆ badStrip()

short int CSCRecHit2D::badStrip ( ) const
inline

flags for involvement of 'bad' channels

Definition at line 91 of file CSCRecHit2D.h.

References theBadStrip.

91 { return theBadStrip; }
short int theBadStrip
Definition: CSCRecHit2D.h:129

◆ badWireGroup()

short int CSCRecHit2D::badWireGroup ( ) const
inline

Definition at line 92 of file CSCRecHit2D.h.

References theBadWireGroup.

92 { return theBadWireGroup; }
short int theBadWireGroup
Definition: CSCRecHit2D.h:130

◆ channels()

int CSCRecHit2D::channels ( unsigned int  i) const
inline

Extracting strip channel numbers comprising the rechit - low.

Definition at line 61 of file CSCRecHit2D.h.

References mps_fire::i, and theStrips_.

Referenced by CSCHitAssociator::associateCSCHitId(), CSCHitAssociator::associateHitId(), CSCSegAlgoRU::baseline(), CSCSegAlgoRU::buildSegments(), CSCRecHit2D(), operator<<(), print(), and sharesInput().

61 { return theStrips_[i]; }
unsigned char theStrips_[MAXSTRIPS]
Definition: CSCRecHit2D.h:135

◆ channelsl1a()

int CSCRecHit2D::channelsl1a ( unsigned int  i) const
inline

Extract the L1A phase bits from the StripChannelContainer - high.

Definition at line 65 of file CSCRecHit2D.h.

References mps_fire::i, and theL1APhaseBits_.

65 { return theL1APhaseBits_[i]; }
unsigned char theL1APhaseBits_[MAXSTRIPS]
Definition: CSCRecHit2D.h:134

◆ clone()

CSCRecHit2D* CSCRecHit2D::clone ( void  ) const
inlineoverridevirtual

RecHit2DLocalPos base class interface.

Implements RecHit2DLocalPos.

Definition at line 55 of file CSCRecHit2D.h.

References CSCRecHit2D().

55 { return new CSCRecHit2D(*this); }

◆ cscDetId()

CSCDetId CSCRecHit2D::cscDetId ( ) const
inline

◆ energyDepositedInLayer()

float CSCRecHit2D::energyDepositedInLayer ( ) const
inline

Energy deposited in the layer. Note: this value is dE. In order to get the dE/dX, you will need to divide by the path length. Specific failure values... If the user has chosen not to use the gas gain correction —> -998. If the gas gain correction from the database is a bad value -> -997. If it is an edge strip -----------------------------------—> -996. If gas-gain is OK, but the ADC vector is the wrong size -—> -999. If the user has created the Rechit without the energy deposit> -995. If the user has created the Rechit with no arguments -----—> -994.

Definition at line 106 of file CSCRecHit2D.h.

References theEnergyDeposit.

106 { return theEnergyDeposit; }
float theEnergyDeposit
Definition: CSCRecHit2D.h:124

◆ errorWithinStrip()

float CSCRecHit2D::errorWithinStrip ( ) const
inline

The uncertainty of the estimated position within the strip.

Definition at line 85 of file CSCRecHit2D.h.

References theErrorWithinStrip.

Referenced by CSCSegAlgoRU::areHitsCloseInGlobalPhi(), and operator<<().

85 { return theErrorWithinStrip; };
float theErrorWithinStrip
Definition: CSCRecHit2D.h:123

◆ hitWire()

short int CSCRecHit2D::hitWire ( ) const
inline

L1A.

Container of wire groups comprising the rechit

Definition at line 68 of file CSCRecHit2D.h.

References hitWire_.

Referenced by CSCSegAlgoRU::areHitsCloseInR(), CSCSegAlgoRU::buildSegments(), operator<<(), and sharesInput().

68 { return hitWire_; }
short int hitWire_
Definition: CSCRecHit2D.h:127

◆ localPosition()

LocalPoint CSCRecHit2D::localPosition ( ) const
inlineoverridevirtual

◆ localPositionError()

LocalError CSCRecHit2D::localPositionError ( ) const
inlineoverridevirtual

Implements RecHit2DLocalPos.

Definition at line 57 of file CSCRecHit2D.h.

References theLocalError.

Referenced by FWCSCRecHitProxyBuilder::build(), operator<<(), and print().

57 { return theLocalError; }
LocalError theLocalError
Definition: CSCRecHit2D.h:139

◆ nStrips()

unsigned int CSCRecHit2D::nStrips ( ) const
inline

◆ nTimeBins()

unsigned int CSCRecHit2D::nTimeBins ( ) const
inline

Definition at line 76 of file CSCRecHit2D.h.

References nTimeBins_.

76 { return nTimeBins_; }
unsigned char nTimeBins_
Definition: CSCRecHit2D.h:132

◆ nWireGroups()

unsigned int CSCRecHit2D::nWireGroups ( ) const
inline

Definition at line 71 of file CSCRecHit2D.h.

References nWireGroups_.

Referenced by operator<<(), print(), and sharesInput().

71 { return nWireGroups_; }
unsigned char nWireGroups_
Definition: CSCRecHit2D.h:132

◆ positionWithinStrip()

float CSCRecHit2D::positionWithinStrip ( ) const
inline

The estimated position within the strip.

Definition at line 82 of file CSCRecHit2D.h.

References thePositionWithinStrip.

Referenced by operator<<().

82 { return thePositionWithinStrip; };
float thePositionWithinStrip
Definition: CSCRecHit2D.h:122

◆ print()

void CSCRecHit2D::print ( void  ) const

Print the content of the RecHit2D including L1A (for debugging)

L1A

Definition at line 174 of file CSCRecHit2D.cc.

References channels(), gather_cfg::cout, cscDetId(), TauDecayModes::dec, hitWire_, mps_fire::i, createfilelist::int, dqmdumpme::k, localPosition(), localPositionError(), nStrips(), nWireGroups(), mathSSE::sqrt(), theBadStrip, theBadWireGroup, theErrorWithinStrip, thePositionWithinStrip, theQuality, theScaledWireTime, theTpeak, geometryCSVtoXML::xx, and geometryCSVtoXML::yy.

174  {
175  std::cout << "CSCRecHit in CSC Detector: " << cscDetId() << std::endl;
176  std::cout << " local x = " << localPosition().x() << " +/- " << sqrt(localPositionError().xx())
177  << " y = " << localPosition().y() << " +/- " << sqrt(localPositionError().yy()) << std::endl;
178 
179  std::cout << " tpeak " << theTpeak << " psoInStrip " << thePositionWithinStrip << " errorinstrip "
180  << theErrorWithinStrip << " "
181  << " qual " << theQuality << " wiretime " << theScaledWireTime << " tbs " << theBadStrip << " bwg "
182  << theBadWireGroup << std::endl;
183 
184  std::cout << " Channels: ";
185  for (unsigned int i = 0; i < nStrips(); i++) {
186  std::cout << std::dec << channels(i) << " "
187  << " ("
188  << "HEX: " << std::hex << channels(i) << ")"
189  << " ";
190  }
191  std::cout << std::endl;
192 
194  std::cout << " L1APhase: ";
195  for (int i = 0; i < (int)nStrips(); i++) {
196  std::cout << "|";
197  for (int k = 0; k < 8; k++) {
198  std::cout << ((channelsl1a(i) >> (15 - k)) & 0x1) << " ";
199  }
200  std::cout << "| ";
201  }
202  std::cout << std::endl;
203 
204  std::cout << "nWireGroups " << (int)nWireGroups() << " central wire " << hitWire_ << std::endl;
205 }
unsigned int nStrips() const
Definition: CSCRecHit2D.h:62
CSCDetId cscDetId() const
Definition: CSCRecHit2D.h:58
unsigned int nWireGroups() const
Definition: CSCRecHit2D.h:71
short int hitWire_
Definition: CSCRecHit2D.h:127
short int theBadStrip
Definition: CSCRecHit2D.h:129
short int theBadWireGroup
Definition: CSCRecHit2D.h:130
T sqrt(T t)
Definition: SSEVec.h:19
float theTpeak
Definition: CSCRecHit2D.h:121
int theScaledWireTime
Definition: CSCRecHit2D.h:126
LocalError localPositionError() const override
Definition: CSCRecHit2D.h:57
LocalPoint localPosition() const override
Definition: CSCRecHit2D.h:56
float thePositionWithinStrip
Definition: CSCRecHit2D.h:122
float theErrorWithinStrip
Definition: CSCRecHit2D.h:123
int channels(unsigned int i) const
Extracting strip channel numbers comprising the rechit - low.
Definition: CSCRecHit2D.h:61

◆ quality()

int CSCRecHit2D::quality ( ) const
inline

quality flag of the reconstruction

Definition at line 88 of file CSCRecHit2D.h.

References theQuality.

Referenced by operator<<().

88 { return theQuality; }

◆ sharesInput() [1/3]

bool CSCRecHit2D::sharesInput ( const TrackingRecHit other,
TrackingRecHit::SharedInputType  what 
) const
overridevirtual

Returns true if the two TrackingRecHits are using the same input information, false otherwise. In this case, looks at the geographical ID and channel numbers for strips and wires.

Reimplemented from TrackingRecHit.

Definition at line 90 of file CSCRecHit2D.cc.

References trackingPlots::other.

Referenced by sharesInput().

90  {
91  // This is to satisfy the base class virtual function
92 
93  // @@ Cast the enum (!) But what if the TRH::SIT changes?!
95  return sharesInput(other, cscWhat);
96 }
bool sharesInput(const TrackingRecHit *other, TrackingRecHit::SharedInputType what) const override
Returns true if the two TrackingRecHits are using the same input information, false otherwise...
Definition: CSCRecHit2D.cc:90

◆ sharesInput() [2/3]

bool CSCRecHit2D::sharesInput ( const TrackingRecHit other,
CSCRecHit2D::SharedInputType  what 
) const

Returns true if the two TrackingRecHits are using the same input information, false otherwise. In this case, looks at the geographical ID and channel numbers for strips and wires.

Definition at line 98 of file CSCRecHit2D.cc.

References MuonSubdetId::CSC, trackingPlots::other, and sharesInput().

98  {
99  // Check to see if the TrackingRecHit is actually a CSCRecHit2D.
100  if (other->geographicalId().subdetId() != MuonSubdetId::CSC)
101  return false;
102 
103  // Now I can static cast, because the previous guarantees that this is a CSCRecHit2D
104  const CSCRecHit2D* otherRecHit = static_cast<const CSCRecHit2D*>(other);
105 
106  return sharesInput(otherRecHit, what);
107 }
bool sharesInput(const TrackingRecHit *other, TrackingRecHit::SharedInputType what) const override
Returns true if the two TrackingRecHits are using the same input information, false otherwise...
Definition: CSCRecHit2D.cc:90
static constexpr int CSC
Definition: MuonSubdetId.h:12

◆ sharesInput() [3/3]

bool CSCRecHit2D::sharesInput ( const CSCRecHit2D otherRecHit,
CSCRecHit2D::SharedInputType  what 
) const

Returns true if the two CSCRecHits are using the same input information, false otherwise. In this case, looks at the geographical ID and channel numbers for strips and wires.

Definition at line 109 of file CSCRecHit2D.cc.

References all, allStrips, allWires, CSCDetId::channel(), channels(), cscDetId(), newFWLiteAna::found, TrackingRecHit::geographicalId(), hitWire(), mps_fire::i, dqmiolumiharvest::j, nStrips(), nWireGroups(), some, someStrips, and someWires.

109  {
110  // Check to see if the geographical ID of the two are the same
111  if (geographicalId() != otherRecHit->geographicalId())
112  return false;
113 
114  // Trivial cases
115  if (nStrips() == 0 && otherRecHit->nStrips() == 0 && nWireGroups() == 0 && otherRecHit->nWireGroups() == 0)
116  return true;
117  if ((what == allWires || what == someWires) && nWireGroups() == 0 && otherRecHit->nWireGroups() == 0)
118  return true;
119  if ((what == allStrips || what == someStrips) && nStrips() == 0 && otherRecHit->nStrips() == 0)
120  return true;
121 
122  // Check to see if the wire containers are the same length
123  if ((what == all || what == allWires) && nWireGroups() != otherRecHit->nWireGroups())
124  return false;
125 
126  // Check to see if the strip containers are the same length
127  if ((what == all || what == allStrips) && nStrips() != otherRecHit->nStrips())
128  return false;
129 
130  bool foundWire = false;
131  // Check to see if the wires are the same
132  if (what != allStrips && what != someStrips) {
133  //can we do better here?
134  if (hitWire() != otherRecHit->hitWire())
135  return false;
136  }
137 
138  // Check to see if the wires are the same
139  bool foundStrip = false;
140  if (what != allWires && what != someWires) {
141  for (unsigned int i = 0; i < nStrips(); i++) {
142  bool found = false;
143  for (unsigned int j = 0; j < nStrips(); j++) {
144  //a strip is a channel for all but ME1/1a chambers (where 3 ganged strips are a channel)
145  if (cscDetId().channel(channels(i)) == otherRecHit->cscDetId().channel(otherRecHit->channels(j))) {
146  if (what == some || what == someStrips)
147  return true;
148  else {
149  found = true;
150  foundStrip = true;
151  break;
152  }
153  }
154  }
155  if ((what == all || what == allStrips) && !found)
156  return false;
157  }
158  if (what == someStrips && !foundStrip)
159  return false;
160  }
161 
162  // In case we were looking for "some" and found absolutely nothing.
163  if (!foundWire && !foundStrip)
164  return false;
165 
166  // If we made it this far, then:
167  // 1) the detector IDs are the same
168  // 2) the channel containers have the same number of entries
169  // 3) for each entry in my channel container, I can find the same value in the other RecHit's corresponding channel container
170  // I think that means we are the same.
171  return true;
172 }
unsigned int nStrips() const
Definition: CSCRecHit2D.h:62
CSCDetId cscDetId() const
Definition: CSCRecHit2D.h:58
unsigned int nWireGroups() const
Definition: CSCRecHit2D.h:71
int channel(int istrip)
Definition: CSCDetId.h:105
DetId geographicalId() const
int channels(unsigned int i) const
Extracting strip channel numbers comprising the rechit - low.
Definition: CSCRecHit2D.h:61
short int hitWire() const
L1A.
Definition: CSCRecHit2D.h:68

◆ tpeak()

float CSCRecHit2D::tpeak ( ) const
inline

Fitted peaking time.

Definition at line 79 of file CSCRecHit2D.h.

References theTpeak.

Referenced by operator<<().

79 { return theTpeak; }
float theTpeak
Definition: CSCRecHit2D.h:121

◆ wgroupsBX()

short int CSCRecHit2D::wgroupsBX ( ) const
inline

Definition at line 69 of file CSCRecHit2D.h.

References theWGroupsBX_.

69 { return theWGroupsBX_; }
short int theWGroupsBX_
Definition: CSCRecHit2D.h:128

◆ wireTime()

float CSCRecHit2D::wireTime ( ) const
inline

Definition at line 95 of file CSCRecHit2D.h.

References theScaledWireTime.

Referenced by operator<<().

95 { return (float)theScaledWireTime / 100.; }
int theScaledWireTime
Definition: CSCRecHit2D.h:126

Member Data Documentation

◆ hitWire_

short int CSCRecHit2D::hitWire_
private

Definition at line 127 of file CSCRecHit2D.h.

Referenced by CSCRecHit2D(), hitWire(), and print().

◆ MAXSTRIPS

const unsigned int CSCRecHit2D::MAXSTRIPS = 3
static

Definition at line 32 of file CSCRecHit2D.h.

Referenced by CSCRecHit2D().

◆ MAXTIMEBINS

const unsigned int CSCRecHit2D::MAXTIMEBINS = 4
static

Definition at line 33 of file CSCRecHit2D.h.

Referenced by adcs(), and CSCRecHit2D().

◆ N_ADC

const unsigned int CSCRecHit2D::N_ADC = MAXSTRIPS * MAXTIMEBINS
static

Definition at line 34 of file CSCRecHit2D.h.

◆ nStrips_

unsigned char CSCRecHit2D::nStrips_
private

Definition at line 132 of file CSCRecHit2D.h.

Referenced by CSCRecHit2D(), and nStrips().

◆ nTimeBins_

unsigned char CSCRecHit2D::nTimeBins_
private

Definition at line 132 of file CSCRecHit2D.h.

Referenced by CSCRecHit2D(), and nTimeBins().

◆ nWireGroups_

unsigned char CSCRecHit2D::nWireGroups_
private

Definition at line 132 of file CSCRecHit2D.h.

Referenced by CSCRecHit2D(), and nWireGroups().

◆ theADCs_

float CSCRecHit2D::theADCs_[N_ADC]
private

Definition at line 136 of file CSCRecHit2D.h.

Referenced by adcs(), and CSCRecHit2D().

◆ theBadStrip

short int CSCRecHit2D::theBadStrip
private

Definition at line 129 of file CSCRecHit2D.h.

Referenced by badStrip(), and print().

◆ theBadWireGroup

short int CSCRecHit2D::theBadWireGroup
private

Definition at line 130 of file CSCRecHit2D.h.

Referenced by badWireGroup(), and print().

◆ theEnergyDeposit

float CSCRecHit2D::theEnergyDeposit
private

Definition at line 124 of file CSCRecHit2D.h.

Referenced by energyDepositedInLayer().

◆ theErrorWithinStrip

float CSCRecHit2D::theErrorWithinStrip
private

Definition at line 123 of file CSCRecHit2D.h.

Referenced by errorWithinStrip(), and print().

◆ theL1APhaseBits_

unsigned char CSCRecHit2D::theL1APhaseBits_[MAXSTRIPS]
private

Definition at line 134 of file CSCRecHit2D.h.

Referenced by channelsl1a(), and CSCRecHit2D().

◆ theLocalError

LocalError CSCRecHit2D::theLocalError
private

Definition at line 139 of file CSCRecHit2D.h.

Referenced by localPositionError().

◆ theLocalPosition

LocalPoint CSCRecHit2D::theLocalPosition
private

Definition at line 138 of file CSCRecHit2D.h.

Referenced by localPosition().

◆ thePositionWithinStrip

float CSCRecHit2D::thePositionWithinStrip
private

Definition at line 122 of file CSCRecHit2D.h.

Referenced by positionWithinStrip(), and print().

◆ theQuality

int CSCRecHit2D::theQuality
private

Definition at line 125 of file CSCRecHit2D.h.

Referenced by print(), and quality().

◆ theScaledWireTime

int CSCRecHit2D::theScaledWireTime
private

Definition at line 126 of file CSCRecHit2D.h.

Referenced by print(), and wireTime().

◆ theStrips_

unsigned char CSCRecHit2D::theStrips_[MAXSTRIPS]
private

Definition at line 135 of file CSCRecHit2D.h.

Referenced by channels(), and CSCRecHit2D().

◆ theTpeak

float CSCRecHit2D::theTpeak
private

Definition at line 121 of file CSCRecHit2D.h.

Referenced by print(), and tpeak().

◆ theWGroupsBX_

short int CSCRecHit2D::theWGroupsBX_
private

Definition at line 128 of file CSCRecHit2D.h.

Referenced by CSCRecHit2D(), and wgroupsBX().