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 42 of file EcalElectronicsId.cc.

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

Referenced by EcalElectronicsId::channelId().

42  {
43  // Q1 = EE+N or EE-F, Top
44  // Q2 = EE+F or EE-N, Top
45  // Q3 = EE+F or EE-N, Bottom
46  // Q4 = EE+N or EE-F, Bottom
47  // (local notation)
48  // in Q1-Q3 and in Q2-Q4, the relation between strip#, channel# and xtal_id
49  // is the same
50  int q=-1;
51  if ( (dcc == EcalElectronicsId::DCC_EEP + 1) || ( dcc == EcalElectronicsId::DCC_EEP + 2) ||
53  (dcc == EcalElectronicsId::DCC_EEM + 3) || ( dcc == EcalElectronicsId::DCC_EEM + 4) ||
54  (dcc == EcalElectronicsId::DCC_EEM + 5 && dcc_channel <= EcalElectronicsId::kDCCChannelBoundary) ) q=1;
55  else if ( (dcc == EcalElectronicsId::DCC_EEP + 3) || ( dcc == EcalElectronicsId::DCC_EEP + 4) ||
58  (dcc == EcalElectronicsId::DCC_EEM + 1) || ( dcc == EcalElectronicsId::DCC_EEM + 2) ) q=2;
59  else if ( (dcc == EcalElectronicsId::DCC_EEP + 6) ||
63  (dcc == EcalElectronicsId::DCC_EEM + 8) ||
64  (dcc == EcalElectronicsId::DCC_EEM + 7 && dcc_channel > EcalElectronicsId::kDCCChannelBoundary)) q=3;
65  else
66  q=4;
67  return q;
68 }
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 108 of file EcalElectronicsId.cc.

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