CMS 3D CMS Logo

Functions
EcalElectronicsId.cc File Reference
#include "DataFormats/EcalDetId/interface/EcalElectronicsId.h"
#include "FWCore/Utilities/interface/Exception.h"
#include <ostream>

Go to the source code of this file.

Functions

static int EEQuadrant (int dcc, int dcc_channel)
 
std::ostream & operator<< (std::ostream &os, const EcalElectronicsId &id)
 

Function Documentation

static int EEQuadrant ( int  dcc,
int  dcc_channel 
)
static

Definition at line 40 of file EcalElectronicsId.cc.

References EcalElectronicsId::DCC_EEM, EcalElectronicsId::DCC_EEP, EcalElectronicsId::kDCCChannelBoundary, and lumiQueryAPI::q.

Referenced by EcalElectronicsId::channelId().

40  {
41  // Q1 = EE+N or EE-F, Top
42  // Q2 = EE+F or EE-N, Top
43  // Q3 = EE+F or EE-N, Bottom
44  // Q4 = EE+N or EE-F, Bottom
45  // (local notation)
46  // in Q1-Q3 and in Q2-Q4, the relation between strip#, channel# and xtal_id
47  // is the same
48  int q = -1;
49  if ((dcc == EcalElectronicsId::DCC_EEP + 1) || (dcc == EcalElectronicsId::DCC_EEP + 2) ||
51  (dcc == EcalElectronicsId::DCC_EEM + 3) || (dcc == EcalElectronicsId::DCC_EEM + 4) ||
53  q = 1;
54  else if ((dcc == EcalElectronicsId::DCC_EEP + 3) || (dcc == EcalElectronicsId::DCC_EEP + 4) ||
57  (dcc == EcalElectronicsId::DCC_EEM + 1) || (dcc == EcalElectronicsId::DCC_EEM + 2))
58  q = 2;
59  else if ((dcc == EcalElectronicsId::DCC_EEP + 6) ||
63  (dcc == EcalElectronicsId::DCC_EEM + 8) ||
65  q = 3;
66  else
67  q = 4;
68  return q;
69 }
static const int DCC_EEP
static const int DCC_EEM
static const int kDCCChannelBoundary
std::ostream& operator<< ( std::ostream &  os,
const EcalElectronicsId id 
)

Definition at line 109 of file EcalElectronicsId.cc.

109  {
110  return os << id.dccId() << ',' << id.towerId() << ',' << id.stripId() << ',' << id.xtalId();
111 }