CMS 3D CMS Logo

Functions

/data/refman/pasoursint/CMSSW_5_3_3/src/DataFormats/EcalDetId/src/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().

                                                {
        // Q1 = EE+N or EE-F, Top
        // Q2 = EE+F or EE-N, Top
        // Q3 = EE+F or EE-N, Bottom
        // Q4 = EE+N or EE-F, Bottom
        //  (local notation)
        // in Q1-Q3 and in Q2-Q4, the relation between strip#, channel# and xtal_id
        // is the same
 int q=-1;
  if ( (dcc == EcalElectronicsId::DCC_EEP + 1) || ( dcc == EcalElectronicsId::DCC_EEP + 2) ||
       (dcc == EcalElectronicsId::DCC_EEP && dcc_channel <= EcalElectronicsId::kDCCChannelBoundary) ||
       (dcc == EcalElectronicsId::DCC_EEM + 3) || ( dcc == EcalElectronicsId::DCC_EEM + 4) ||
       (dcc == EcalElectronicsId::DCC_EEM + 5 && dcc_channel <= EcalElectronicsId::kDCCChannelBoundary) ) q=1;
  else if ( (dcc == EcalElectronicsId::DCC_EEP + 3) || ( dcc == EcalElectronicsId::DCC_EEP + 4) ||
       (dcc == EcalElectronicsId::DCC_EEP+5 && dcc_channel <= EcalElectronicsId::kDCCChannelBoundary) ||
       (dcc == EcalElectronicsId::DCC_EEM && dcc_channel <= EcalElectronicsId::kDCCChannelBoundary) ||
       (dcc == EcalElectronicsId::DCC_EEM + 1) || ( dcc == EcalElectronicsId::DCC_EEM + 2) ) q=2;
  else if ( (dcc == EcalElectronicsId::DCC_EEP + 6) ||
       (dcc == EcalElectronicsId::DCC_EEP + 5 && dcc_channel > EcalElectronicsId::kDCCChannelBoundary) ||
       (dcc == EcalElectronicsId::DCC_EEP + 7 && dcc_channel > EcalElectronicsId::kDCCChannelBoundary) ||
       (dcc == EcalElectronicsId::DCC_EEM && dcc_channel > EcalElectronicsId::kDCCChannelBoundary) ||
       (dcc == EcalElectronicsId::DCC_EEM + 8) ||
       (dcc == EcalElectronicsId::DCC_EEM + 7 && dcc_channel > EcalElectronicsId::kDCCChannelBoundary)) q=3;
  else
       q=4;
  return q;
}
std::ostream& operator<< ( std::ostream &  os,
const EcalElectronicsId id 
)

Definition at line 110 of file EcalElectronicsId.cc.

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