CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
EcalElectronicsId.cc File Reference
#include "DataFormats/EcalDetId/interface/EcalElectronicsId.h"
#include "FWCore/Utilities/interface/Exception.h"
#include <iostream>

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

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

Referenced by EcalElectronicsId::channelId().

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

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