CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions
CSCChannelMapperStartup Class Reference

#include <CSCChannelMapperStartup.h>

Inheritance diagram for CSCChannelMapperStartup:
CSCChannelMapperBase

Public Member Functions

int channelFromStrip (const CSCDetId &id, int strip) const override
 
 CSCChannelMapperStartup ()
 
int geomStripChannel (const CSCDetId &id, int iraw) const override
 Return geometrical strip channel number for input raw channel number. More...
 
std::string name () const override
 
CSCDetId rawCSCDetId (const CSCDetId &id) const override
 
int rawStripChannel (const CSCDetId &id, int igeom) const override
 Return raw strip channel number for input geometrical channel number. More...
 
 ~CSCChannelMapperStartup () override
 
- Public Member Functions inherited from CSCChannelMapperBase
 CSCChannelMapperBase ()
 
int geomAnodeChannel (const CSCDetId &id, int iraw) const
 Alias for geomWireChannel. More...
 
int geomCathodeChannel (const CSCDetId &id, int iraw) const
 Alias for geomStripChannel. More...
 
int geomWireChannel (const CSCDetId &id, int iraw) const
 Return geometrical wiregroup channel number for input raw channel number. More...
 
int rawAnodeChannel (const CSCDetId &id, int igeom) const
 Alias for rawWireChannel. More...
 
int rawCathodeChannel (const CSCDetId &id, int igeom) const
 Alias for rawStripChannel. More...
 
int rawWireChannel (const CSCDetId &id, int igeom) const
 Return raw wiregroup channel number for input geometrical channel number. More...
 
virtual ~CSCChannelMapperBase ()
 

Detailed Description

A concrete CSCChannelMapper class to map between raw/online channel numbers (for strips/cathodes and wires/anodes) and offline geometry-oriented channel numbers, in which increasing number corresponds to increasing local x (strips) or y (wire groups) as defined in CMS Note CMS IN-2007/024.

This version is for CMS Startup (2008-2013)

  1. Sorts out readout-flipping within the two endcaps for ME1a and ME1b strip channels.
  2. Maps the ME1a channels from online labels 65-80 to offline 1-16.
  3. Does nothing with wiregroup channels; the output = the input.

Since ME1a is ganged, the 48 strips in ME1a are fed to 16 channels, so it is important to distinguish the nomenclatures "strip" vs "channel". It is usually a meaningful distinction!

Also note that the CSCDetId for ME11 and ME1b is identical. Offline we presume ring=1 of station 1 to mean the ME1b strips. We use the identifier ring=4 to denote the ME1a strips.

Author
Tim Cox

Definition at line 34 of file CSCChannelMapperStartup.h.

Constructor & Destructor Documentation

CSCChannelMapperStartup::CSCChannelMapperStartup ( )
inline

Definition at line 36 of file CSCChannelMapperStartup.h.

36 {}
CSCChannelMapperStartup::~CSCChannelMapperStartup ( )
inlineoverride

Definition at line 37 of file CSCChannelMapperStartup.h.

37 {}

Member Function Documentation

int CSCChannelMapperStartup::channelFromStrip ( const CSCDetId id,
int  strip 
) const
overridevirtual

Offline conversion of a strip (geometric labelling) back to channel (Startup: convert the 48 strips of ME1A to 16 ganged channels.)

Implements CSCChannelMapperBase.

Definition at line 52 of file CSCChannelMapperStartup.cc.

References relativeConstraints::ring, and digitizers_cfi::strip.

52  {
53  // This just returns the electronics channel label to which a given strip is
54  // connected In all chambers but ME1A this is just a direct 1-1
55  // correspondence. In ME1A the 48 strips are ganged into 16 channels:
56  // 1+17+33->1, 2+18+34->2, ... 16+32+48->16.
57  int ichan = strip;
58  bool me1a = (id.station() == 1) && (id.ring() == 4);
59  if (me1a && strip > 16)
60  ichan = (strip - 1) % 16 + 1; // gang the 48 to 16
61  return ichan;
62 }
int CSCChannelMapperStartup::geomStripChannel ( const CSCDetId id,
int  iraw 
) const
overridevirtual

Return geometrical strip channel number for input raw channel number.

Implements CSCChannelMapperBase.

Definition at line 27 of file CSCChannelMapperStartup.cc.

References relativeConstraints::ring, and SurfaceOrientation::zplus.

27  {
28  // Translate a raw strip channel in range 1-80, iraw, into
29  // corresponding geometry-oriented channel in which increasing
30  // channel number <-> strip number increasing with +ve local x.
31 
32  int igeo = iraw;
33 
34  bool zplus = (id.endcap() == 1);
35  bool me11 = (id.station() == 1) && (id.ring() == 1);
36  bool me1a = me11 && (iraw > 64);
37  bool me1b = me11 && (iraw <= 64);
38 
39  if (me1a)
40  igeo -= 64; // 65-80 -> 1-16
41  // if ( me1a ) igeo %= 64; // 65-80 -> 1-16
42  if (me1a && zplus) {
43  igeo = 17 - igeo;
44  } // 65-80 -> 16-1
45  if (me1b && !zplus) {
46  igeo = 65 - igeo;
47  } // 1-64 -> 64-1
48 
49  return igeo;
50 }
std::string CSCChannelMapperStartup::name ( ) const
inlineoverridevirtual
CSCDetId CSCChannelMapperStartup::rawCSCDetId ( const CSCDetId id) const
overridevirtual

Construct raw CSCDetId matching supplied offline CSCDetid (Startup: return the ME11 CSCDetID when supplied with that for ME1A)

Implements CSCChannelMapperBase.

Definition at line 64 of file CSCChannelMapperStartup.cc.

References CSCDetId, Reference_intrackfit_cff::endcap, phase1PixelTopology::layer, relativeConstraints::ring, and relativeConstraints::station.

64  {
65  // Return the effective online CSCDetId for given offline CSCDetId
66  // That means the same one except for ME1A, which online is part of ME11
67  // (channels 65-80)
68  CSCDetId idraw(id);
69  bool me1a = (id.station() == 1) && (id.ring() == 4);
70  if (me1a)
71  idraw = CSCDetId(id.endcap(), id.station(), 1, id.chamber(), id.layer());
72  return idraw;
73 }
constexpr std::array< uint8_t, layerIndexSize > layer
int CSCChannelMapperStartup::rawStripChannel ( const CSCDetId id,
int  igeom 
) const
overridevirtual

Return raw strip channel number for input geometrical channel number.

Implements CSCChannelMapperBase.

Definition at line 3 of file CSCChannelMapperStartup.cc.

References relativeConstraints::ring, and SurfaceOrientation::zplus.

3  {
4  // Translate a geometry-oriented strip channel in range 1-80, igeo,
5  // into corresponding raw channel.
6 
7  int iraw = igeo;
8 
9  bool zplus = (id.endcap() == 1);
10 
11  bool me1a = (id.station() == 1) && (id.ring() == 4);
12  bool me1b = (id.station() == 1) && (id.ring() == 1);
13 
14  if (me1a && zplus) {
15  iraw = 17 - iraw;
16  } // 1-16 -> 16-1
17  if (me1b && !zplus) {
18  iraw = 65 - iraw;
19  } // 1-64 -> 64-1
20  if (me1a) {
21  iraw += 64;
22  } // set 1-16 to 65-80
23 
24  return iraw;
25 }