CMS 3D CMS Logo

EcalElectronicsMapping Class Reference

Id
EcalElectronicsMapping.h,v 1.6 2007/12/07 19:08:12 eperez Exp
More...

#include <Geometry/EcalMapping/interface/EcalElectronicsMapping.h>

List of all members.

Public Member Functions

void assign (const DetId &cell, const EcalElectronicsId &, const EcalTriggerElectronicsId &tower)
 set the association between a DetId and a tower
int DCCBoundary (int FED) const
std::vector< DetIddccConstituents (int dccId) const
 Get the constituent detids for this dccId.
int DCCid (const EcalTrigTowerDetId &id) const
 returns the DCCid (i.e. the FED) of a Trigger Tower
int DCCid (const EBDetId &id) const
 returns the DCC of an EBDetId
std::vector< DetIddccTowerConstituents (int dccId, int tower) const
 Get the constituent detids for this dccId.
 EcalElectronicsMapping ()
std::pair< int, intgetDCCandSC (EcalScDetId id) const
 returns the DCC and DCC_channel of an EcalScDetId
DetId getDetId (const EcalTriggerElectronicsId &id) const
 Get the detid given a trigger electronicsId.
DetId getDetId (const EcalElectronicsId &id) const
 Get the detid given an electronicsId.
EcalScDetId getEcalScDetId (int DCCid, int DCC_Channel) const
 builds an EcalScDetId from (DCC, DCC_channel)
EcalElectronicsId getElectronicsId (const EcalTriggerElectronicsId &id) const
 Get the electronics id given a trigger electronicsId.
EcalElectronicsId getElectronicsId (const DetId &id) const
 Get the electronics id for this det id.
int GetFED (double eta, double phi) const
void GetListofFEDs (const EcalEtaPhiRegion region, std::vector< int > &FEDs) const
std::vector< intGetListofFEDs (const EcalEtaPhiRegion region) const
int getLMNumber (const DetId &id) const
EcalTriggerElectronicsId getTriggerElectronicsId (const EcalElectronicsId &id) const
 Get the trigger electronics id given an electronicsId.
EcalTriggerElectronicsId getTriggerElectronicsId (const DetId &id) const
 Get the trigger electronics id for this det id.
EcalTrigTowerDetId getTrigTowerDetId (int TCCid, int iTT) const
 Builds a EcalTrigTowerDetID from the TCCid & TriggerTower index in TCC.
int iTT (const EcalTrigTowerDetId &id) const
 returns the index of a Trigger Tower within its TCC.
std::vector< DetIdpseudoStripConstituents (int tccId, int tt, int pseudostrip) const
 Get the constituent detids for this dccId.
bool rightTower (int tower) const
std::vector< DetIdstripConstituents (int dccId, int tower, int strip) const
 Get the constituent detids for this dccId.
EcalSubdetector subdet (int dccid, int mode) const
std::vector< DetIdtccConstituents (int tccId) const
 Get the constituent detids for this dccId.
int TCCid (const EcalTrigTowerDetId &id) const
 returns the TCCid of a Trigger Tower
int TCCid (const EBDetId &id) const
 returns the TCCid of an EBDetId
std::vector< DetIdttConstituents (int tccId, int tt) const
 Get the constituent detids for this dccId.
int zside (int dcctcc, int mode) const

Static Public Attributes

static const int DCCID_PHI0_EBM = EcalElectronicsId::DCCID_PHI0_EBM
static const int DCCID_PHI0_EBP = EcalElectronicsId::DCCID_PHI0_EBP
static const int iEEEtaMinInner = 22
static const int iEEEtaMinOuter = 18
static const int kCrystalsInPhi = EBDetId::kCrystalsInPhi
static const int kEBTowersInEta = EcalTrigTowerDetId::kEBTowersInEta
static const int kEBTowersInPhi = EcalTrigTowerDetId::kEBTowersInPhi
static const int kEBTowersPerSM = EcalTrigTowerDetId::kEBTowersPerSM
static const int kEETowersInEta = EcalTrigTowerDetId::kEETowersInEta
static const int kEETowersInEtaPerInnerTCC = 7
static const int kEETowersInEtaPerOuterTCC = 4
static const int kEETowersInPhiPerQuadrant = EcalTrigTowerDetId::kEETowersInPhiPerQuadrant
static const int kEETowersInPhiPerTCC = 4
static const int kTCCinPhi = 18
static const int kTowersInPhi = EBDetId::kTowersInPhi
static const int MAX_DCCID = EcalElectronicsId::MAX_DCCID
static const int MAX_DCCID_EBM = EcalElectronicsId::MAX_DCCID_EBM
static const int MAX_DCCID_EBP = EcalElectronicsId::MAX_DCCID_EBP
static const int MAX_DCCID_EEM = EcalElectronicsId::MAX_DCCID_EEM
static const int MAX_DCCID_EEP = EcalElectronicsId::MAX_DCCID_EEP
static const int MAX_LM = 92
static const int MAX_TCCID = EcalTriggerElectronicsId::MAX_TCCID
static const int MAX_TCCID_EBM = EcalTriggerElectronicsId::MAX_TCCID_EBM
static const int MAX_TCCID_EBP = EcalTriggerElectronicsId::MAX_TCCID_EBP
static const int MAX_TCCID_EEM = EcalTriggerElectronicsId::MAX_TCCID_EEM
static const int MAX_TCCID_EEP = EcalTriggerElectronicsId::MAX_TCCID_EEP
static const int MIN_DCCID = EcalElectronicsId::MIN_DCCID
static const int MIN_DCCID_EBM = EcalElectronicsId::MIN_DCCID_EBM
static const int MIN_DCCID_EBP = EcalElectronicsId::MIN_DCCID_EBP
static const int MIN_DCCID_EEM = EcalElectronicsId::MIN_DCCID_EEM
static const int MIN_DCCID_EEP = EcalElectronicsId::MIN_DCCID_EEP
static const int MIN_LM_EBM = 1
static const int MIN_LM_EBP = 37
static const int MIN_LM_EEM = 73
static const int MIN_LM_EEP = 83
static const int MIN_TCCID = EcalTriggerElectronicsId::MIN_TCCID
static const int MIN_TCCID_EBM = EcalTriggerElectronicsId::MIN_TCCID_EBM
static const int MIN_TCCID_EBP = EcalTriggerElectronicsId::MIN_TCCID_EBP
static const int MIN_TCCID_EEM = EcalTriggerElectronicsId::MIN_TCCID_EEM
static const int MIN_TCCID_EEP = EcalTriggerElectronicsId::MIN_TCCID_EEP
static const int TCCID_PHI0_EBM = EcalTriggerElectronicsId::TCCID_PHI0_EBM
static const int TCCID_PHI0_EBP = EcalTriggerElectronicsId::TCCID_PHI0_EBP
static const int TCCID_PHI0_EEM_IN = EcalTriggerElectronicsId::TCCID_PHI0_EEM_IN
static const int TCCID_PHI0_EEM_OUT = EcalTriggerElectronicsId::TCCID_PHI0_EEM_OUT
static const int TCCID_PHI0_EEP_IN = EcalTriggerElectronicsId::TCCID_PHI0_EEP_IN
static const int TCCID_PHI0_EEP_OUT = EcalTriggerElectronicsId::TCCID_PHI0_EEP_OUT

Private Types

typedef
boost::multi_index::multi_index_container
< MapItem,
boost::multi_index::indexed_by
< boost::multi_index::ordered_unique
< boost::multi_index::member
< MapItem, DetId,
&MapItem::cell > >,
boost::multi_index::ordered_unique
< boost::multi_index::member
< MapItem, EcalElectronicsId,
&MapItem::elid > >,
boost::multi_index::ordered_unique
< boost::multi_index::member
< MapItem,
EcalTriggerElectronicsId,
&MapItem::trelid > >,
boost::multi_index::ordered_non_unique
< boost::multi_index::const_mem_fun
< MapItem, int,&MapItem::dccId > >,
boost::multi_index::ordered_non_unique
< boost::multi_index::composite_key
< MapItem,
boost::multi_index::const_mem_fun
< MapItem, int,&MapItem::dccId >,
boost::multi_index::const_mem_fun
< MapItem, int,
&MapItem::towerId > > >,
boost::multi_index::ordered_non_unique
< boost::multi_index::composite_key
< MapItem,
boost::multi_index::const_mem_fun
< MapItem, int,&MapItem::dccId >,
boost::multi_index::const_mem_fun
< MapItem, int,
&MapItem::towerId >,
boost::multi_index::const_mem_fun
< MapItem, int,
&MapItem::stripId > > >,
boost::multi_index::ordered_non_unique
< boost::multi_index::const_mem_fun
< MapItem, int,&MapItem::tccId > >,
boost::multi_index::ordered_non_unique
< boost::multi_index::composite_key
< MapItem,
boost::multi_index::const_mem_fun
< MapItem, int,&MapItem::tccId >,
boost::multi_index::const_mem_fun
< MapItem, int,&MapItem::ttId > > >,
boost::multi_index::ordered_non_unique
< boost::multi_index::composite_key
< MapItem,
boost::multi_index::const_mem_fun
< MapItem, int,&MapItem::tccId >,
boost::multi_index::const_mem_fun
< MapItem, int,&MapItem::ttId >,
boost::multi_index::const_mem_fun
< MapItem, int,
&MapItem::pseudoStripId > > > > > 
EcalElectronicsMap
typedef
EcalElectronicsMap::nth_index
< 3 >::type 
EcalElectronicsMap_by_DccId
typedef
EcalElectronicsMap::nth_index
< 4 >::type 
EcalElectronicsMap_by_DccId_and_TowerId
typedef
EcalElectronicsMap::nth_index
< 5 >::type 
EcalElectronicsMap_by_DccId_TowerId_and_StripId
typedef
EcalElectronicsMap::nth_index
< 0 >::type 
EcalElectronicsMap_by_DetId
typedef
EcalElectronicsMap::nth_index
< 1 >::type 
EcalElectronicsMap_by_ElectronicsId
typedef
EcalElectronicsMap::nth_index
< 6 >::type 
EcalElectronicsMap_by_TccId
typedef
EcalElectronicsMap::nth_index
< 7 >::type 
EcalElectronicsMap_by_TccId_and_TtId
typedef
EcalElectronicsMap::nth_index
< 8 >::type 
EcalElectronicsMap_by_TccId_TtId_and_PseudostripId
typedef
EcalElectronicsMap::nth_index
< 2 >::type 
EcalElectronicsMap_by_TriggerElectronicsId

Private Attributes

std::map< int, intLaserMonitoringMap_EB
std::map< int, intLaserMonitoringMap_EE
EcalElectronicsMap m_items

Static Private Attributes

static const int DCCMODE = 0
static const int TCCMODE = 1

Classes

struct  MapItem
 Maybe these are needed Wrap a generic EEDetId to the equivalent one in z+ Quadrant 1 (from 0 < phi < pi/2). More...


Detailed Description

Id
EcalElectronicsMapping.h,v 1.6 2007/12/07 19:08:12 eperez Exp

Author:
P.Meridiani (INFN Roma1), E. Perez (CERN)

Definition at line 32 of file EcalElectronicsMapping.h.


Member Typedef Documentation

typedef boost::multi_index::multi_index_container< MapItem, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::member < MapItem,DetId,&MapItem::cell > >, boost::multi_index::ordered_unique< boost::multi_index::member < MapItem,EcalElectronicsId,&MapItem::elid > >, boost::multi_index::ordered_unique< boost::multi_index::member < MapItem,EcalTriggerElectronicsId,&MapItem::trelid > >, boost::multi_index::ordered_non_unique< boost::multi_index::const_mem_fun < MapItem, int, &MapItem::dccId > >, boost::multi_index::ordered_non_unique< boost::multi_index::composite_key< MapItem, boost::multi_index::const_mem_fun < MapItem, int, &MapItem::dccId > , boost::multi_index::const_mem_fun < MapItem, int, &MapItem::towerId > > >, boost::multi_index::ordered_non_unique< boost::multi_index::composite_key< MapItem, boost::multi_index::const_mem_fun < MapItem, int, &MapItem::dccId > , boost::multi_index::const_mem_fun < MapItem, int, &MapItem::towerId >, boost::multi_index::const_mem_fun < MapItem, int, &MapItem::stripId > > >, boost::multi_index::ordered_non_unique< boost::multi_index::const_mem_fun < MapItem, int, &MapItem::tccId > >, boost::multi_index::ordered_non_unique< boost::multi_index::composite_key< MapItem, boost::multi_index::const_mem_fun < MapItem, int, &MapItem::tccId > , boost::multi_index::const_mem_fun < MapItem, int, &MapItem::ttId > > >, boost::multi_index::ordered_non_unique< boost::multi_index::composite_key< MapItem, boost::multi_index::const_mem_fun < MapItem, int, &MapItem::tccId > , boost::multi_index::const_mem_fun < MapItem, int, &MapItem::ttId >, boost::multi_index::const_mem_fun < MapItem, int, &MapItem::pseudoStripId > > > > > EcalElectronicsMapping::EcalElectronicsMap [private]

Definition at line 248 of file EcalElectronicsMapping.h.

typedef EcalElectronicsMap::nth_index<3>::type EcalElectronicsMapping::EcalElectronicsMap_by_DccId [private]

Definition at line 254 of file EcalElectronicsMapping.h.

typedef EcalElectronicsMap::nth_index<4>::type EcalElectronicsMapping::EcalElectronicsMap_by_DccId_and_TowerId [private]

Definition at line 255 of file EcalElectronicsMapping.h.

typedef EcalElectronicsMap::nth_index<5>::type EcalElectronicsMapping::EcalElectronicsMap_by_DccId_TowerId_and_StripId [private]

Definition at line 256 of file EcalElectronicsMapping.h.

typedef EcalElectronicsMap::nth_index<0>::type EcalElectronicsMapping::EcalElectronicsMap_by_DetId [private]

Definition at line 250 of file EcalElectronicsMapping.h.

typedef EcalElectronicsMap::nth_index<1>::type EcalElectronicsMapping::EcalElectronicsMap_by_ElectronicsId [private]

Definition at line 251 of file EcalElectronicsMapping.h.

typedef EcalElectronicsMap::nth_index<6>::type EcalElectronicsMapping::EcalElectronicsMap_by_TccId [private]

Definition at line 258 of file EcalElectronicsMapping.h.

typedef EcalElectronicsMap::nth_index<7>::type EcalElectronicsMapping::EcalElectronicsMap_by_TccId_and_TtId [private]

Definition at line 259 of file EcalElectronicsMapping.h.

typedef EcalElectronicsMap::nth_index<8>::type EcalElectronicsMapping::EcalElectronicsMap_by_TccId_TtId_and_PseudostripId [private]

Definition at line 260 of file EcalElectronicsMapping.h.

typedef EcalElectronicsMap::nth_index<2>::type EcalElectronicsMapping::EcalElectronicsMap_by_TriggerElectronicsId [private]

Definition at line 252 of file EcalElectronicsMapping.h.


Constructor & Destructor Documentation

EcalElectronicsMapping::EcalElectronicsMapping (  ) 

Definition at line 36 of file EcalElectronicsMapping.cc.

References LaserMonitoringMap_EB, LaserMonitoringMap_EE, MAX_DCCID_EBM, MAX_DCCID_EBP, MAX_DCCID_EEM, MAX_DCCID_EEP, MIN_DCCID_EBM, MIN_DCCID_EBP, MIN_DCCID_EEM, MIN_DCCID_EEP, MIN_LM_EBM, MIN_LM_EBP, MIN_LM_EEM, and MIN_LM_EEP.

00036                                                {
00037 
00038         // Fill the map (Barrel) for the Laser Monitoring readout numbers :
00039         // Each DCC actually corresponds to 2 LMs,  ilm and ilm + 1
00040 
00041         int ilm = MIN_LM_EBM;
00042         for (int dcc=MIN_DCCID_EBM; dcc <= MAX_DCCID_EBM; dcc++) {
00043                 LaserMonitoringMap_EB[dcc] = ilm;
00044                 ilm += 2;
00045         }
00046         ilm = MIN_LM_EBP;
00047         for (int dcc=MIN_DCCID_EBP; dcc <= MAX_DCCID_EBP; dcc++) {
00048                 LaserMonitoringMap_EB[dcc] = ilm;
00049                 ilm += 2;
00050         }
00051 
00052         // Fill the map (EndCap) for the Laser Monitoring readout numbers :
00053         // Each DCC corresponds to onr LM, but DCC 8 (LM 80 and 81) and DCC 53 (LM 90 and 91)
00054 
00055         ilm = MIN_LM_EEM;
00056         for (int dcc=MIN_DCCID_EEM; dcc <= MAX_DCCID_EEM; dcc++) {
00057                 LaserMonitoringMap_EE[dcc] = ilm;
00058                 ilm += 1;
00059                 if (dcc == 8) ilm += 1;
00060         }
00061         ilm = MIN_LM_EEP;
00062         for (int dcc=MIN_DCCID_EEP; dcc <= MAX_DCCID_EEP; dcc++) {
00063                 LaserMonitoringMap_EE[dcc] = ilm;
00064                 ilm += 1;
00065                 if (dcc == 53) ilm += 1;
00066         }
00067         
00068 }


Member Function Documentation

void EcalElectronicsMapping::assign ( const DetId cell,
const EcalElectronicsId elid,
const EcalTriggerElectronicsId tower 
)

set the association between a DetId and a tower

Definition at line 765 of file EcalElectronicsMapping.cc.

References m_items.

Referenced by EcalElectronicsMappingBuilder::parseTextMap().

00765                                                                                                                            {
00766 
00767         m_items.insert(MapItem(cell, elid, tower));
00768 }

int EcalElectronicsMapping::DCCBoundary ( int  FED  )  const

Definition at line 881 of file EcalElectronicsMapping.cc.

References MAX_DCCID_EBM, MAX_DCCID_EBP, MAX_DCCID_EEM, MAX_DCCID_EEP, MIN_DCCID_EBM, MIN_DCCID_EBP, MIN_DCCID_EEM, and MIN_DCCID_EEP.

Referenced by GetListofFEDs().

00881                                                     {
00882 
00883  if (FED >= MIN_DCCID_EEM && FED <= MAX_DCCID_EEM) return MIN_DCCID_EEM;
00884  if (FED >= MIN_DCCID_EBM && FED <= MAX_DCCID_EBM) return MIN_DCCID_EBM;
00885  if (FED >= MIN_DCCID_EBP && FED <= MAX_DCCID_EBP) return MIN_DCCID_EBP;
00886  if (FED >= MIN_DCCID_EEP && FED <= MAX_DCCID_EEP) return MIN_DCCID_EEP;
00887  return -1;
00888 
00889 }

std::vector< DetId > EcalElectronicsMapping::dccConstituents ( int  dccId  )  const

Get the constituent detids for this dccId.

Definition at line 552 of file EcalElectronicsMapping.cc.

References DCCMODE, dccTowerConstituents(), EcalBarrel, EcalEndcap, Exception, i, kEBTowersPerSM, m_items, size, and subdet().

Referenced by tccConstituents().

00552                                                                         {
00553 
00554   EcalSubdetector sub = subdet(dccId,DCCMODE);
00555   std::vector<DetId> items;
00556 
00557   if (sub == EcalBarrel) { 
00558         for (int tower=1; tower <= kEBTowersPerSM; tower++) {
00559                 std::vector<DetId> xtals = dccTowerConstituents(dccId,tower);
00560                 int size = xtals.size();
00561                 for (int i=0; i < size; i++) {
00562                         DetId detid = xtals[i];
00563                         items.push_back(detid);
00564                 }
00565         }
00566         return items; 
00567   }
00568   else if (sub == EcalEndcap) {
00569         EcalElectronicsMap_by_DccId::const_iterator lb,ub;
00570         boost::tuples::tie(lb,ub)=get<3>(m_items).equal_range(dccId);
00571         while (lb != ub) {
00572                 DetId cell = lb -> cell;
00573                 items.push_back(cell);
00574                 ++ lb;
00575         }
00576         return items;
00577   }
00578   else throw cms::Exception("InvalidDetId") << "Wrong dccId = " << dccId << " in EcalElectronicsMapping::dccConstituents. ";
00579 }

int EcalElectronicsMapping::DCCid ( const EcalTrigTowerDetId id  )  const

returns the DCCid (i.e. the FED) of a Trigger Tower

Definition at line 202 of file EcalElectronicsMapping.cc.

References DCCID_PHI0_EBM, DCCID_PHI0_EBP, EcalBarrel, EcalEndcap, Exception, kEBTowersInPhi, offset, phi, TCCid(), and zside().

00202                                                                      {
00203 
00204         // This is needed for digitoraw. For a given Trigger Tower,
00205         // one needs to know to which FED it gets written.
00206 
00207   if ( id.subDet() == EcalBarrel )
00208     {
00209         int phi = id.iphi() +2;
00210         if (phi > 72) phi = phi-72;
00211         int dcc = ( phi - 1 ) / kEBTowersInPhi + 1;
00212         if ( id.zside() < 0 ) dcc += 18;      // now id is the SMid
00213                 if (id.zside() < 0) {
00214                         dcc  += DCCID_PHI0_EBM - 19;
00215                 }
00216                 else {
00217                         dcc  += DCCID_PHI0_EBP -1;
00218                 }
00219         return dcc;
00220     }
00221   else if ( id.subDet() == EcalEndcap) 
00222     {                   //FIXME :  yes I need to improve this part of the code...
00223         int tccid = TCCid(id);
00224         int dcc=0;
00225         int offset = 0;
00226         if (tccid >= 73) {
00227                 tccid = tccid-72;
00228                 offset = 45;
00229         }
00230         if (tccid == 24 || tccid == 25 || tccid == 6 || tccid == 7)  dcc=4;
00231         if (tccid == 26 || tccid == 27 || tccid == 8 || tccid == 9)  dcc=5;
00232         if (tccid == 28 || tccid == 29 || tccid == 10 || tccid == 11)  dcc=6;
00233         if (tccid == 30 || tccid == 31 || tccid == 12 || tccid == 13)  dcc=7;
00234         if (tccid == 32 || tccid == 33 || tccid == 14 || tccid == 15)  dcc=8;
00235         if (tccid == 34 || tccid == 35 || tccid == 16 || tccid == 17)  dcc=9;
00236         if (tccid == 36 || tccid == 19 || tccid == 18 || tccid == 1)  dcc=1;
00237         if (tccid == 20 || tccid == 21 || tccid == 2 || tccid == 3)  dcc=2;
00238         if (tccid == 22 || tccid == 23 || tccid == 4 || tccid == 5)  dcc=3;
00239         dcc += offset;
00240         return dcc;
00241     }
00242   else {
00243         throw cms::Exception("InvalidDetId") << " Wrong EcalTrigTowerDetId in EcalElectronicsMapping::DCCid.";
00244         return 0;
00245   }
00246 
00247 }

int EcalElectronicsMapping::DCCid ( const EBDetId id  )  const

returns the DCC of an EBDetId

Definition at line 71 of file EcalElectronicsMapping.cc.

References DCCID_PHI0_EBM, DCCID_PHI0_EBP, and zside().

Referenced by EcalTPGParamBuilder::analyze(), HLTPi0RecHitsFilter::filter(), getElectronicsId(), getLMNumber(), getTrigTowerDetId(), and Numbers::iSM().

00077 {
00078         int dcc = id.ism();      
00079         if (id.zside() < 0) {
00080                 dcc  += DCCID_PHI0_EBM - 19;
00081         }
00082         else {
00083                 dcc  += DCCID_PHI0_EBP -1;
00084         }
00085         return dcc;
00086 }

std::vector< DetId > EcalElectronicsMapping::dccTowerConstituents ( int  dccId,
int  tower 
) const

Get the constituent detids for this dccId.

Definition at line 583 of file EcalElectronicsMapping.cc.

References DCCID_PHI0_EBM, DCCID_PHI0_EBP, DCCMODE, EcalBarrel, EcalEndcap, EBDetId::ETAPHIMODE, Exception, kCrystalsInPhi, kTowersInPhi, m_items, subdet(), and zside().

Referenced by dccConstituents(), EcalElectronicsMapper::fillMaps(), getEcalScDetId(), and ttConstituents().

00583                                                                                         {
00584 
00585   EcalSubdetector sub = subdet(dccId,DCCMODE);
00586   std::vector<DetId> items;
00587 
00588   if (sub == EcalBarrel) {
00589         int iz = zside(dccId, DCCMODE);
00590         int smid = 0;
00591         int iphi = 0;
00592         if (iz < 0) {
00593                 smid = dccId + 19 - DCCID_PHI0_EBM;
00594                 iphi = (smid - 19) * kCrystalsInPhi;
00595                 iphi += 5 * ( (tower-1) % kTowersInPhi );
00596         }
00597         else {
00598                 smid = dccId +1 - DCCID_PHI0_EBP;
00599                 iphi = (smid - 1) * kCrystalsInPhi;
00600                 iphi += 5 * (
00601                         kTowersInPhi - ( (tower-1) % kTowersInPhi ) -1
00602                         );
00603         }
00604         int ieta = 5 * ((tower-1) / kTowersInPhi) + 1;
00605         for (int ip=1; ip <=5; ip++) {
00606          for (int ie=0; ie <=4; ie++) {
00607                 int ieta_xtal = ieta + ie;
00608                 int iphi_xtal = iphi + ip;
00609                 if (iz < 0) ieta_xtal = -ieta_xtal;
00610                 EBDetId ebdetid(ieta_xtal,iphi_xtal,EBDetId::ETAPHIMODE);
00611                 items.push_back(ebdetid);
00612          }
00613         }
00614         return items;
00615   }
00616 
00617   else if (sub == EcalEndcap) {
00618         EcalElectronicsMap_by_DccId_and_TowerId::const_iterator lb,ub;
00619         boost::tuples::tie(lb,ub)=get<4>(m_items).equal_range(boost::make_tuple(int(dccId), int(tower)));
00620         while (lb != ub) {
00621                 DetId cell = lb -> cell;
00622                 items.push_back(cell);
00623                 ++ lb;
00624         }
00625         return items;
00626   }
00627   else throw cms::Exception("InvalidDetId") << 
00628         "Wrong dccId = " << dccId << " tower = " << tower << " in EcalElectronicsMapping::dccTowerConstituents.";
00629 }

std::pair< int, int > EcalElectronicsMapping::getDCCandSC ( EcalScDetId  id  )  const

returns the DCC and DCC_channel of an EcalScDetId

Definition at line 771 of file EcalElectronicsMapping.cc.

References EcalElectronicsId::dccId(), getElectronicsId(), EcalElectronicsId::towerId(), EEDetId::validDetId(), EEDetId::XYMODE, and zside().

00771                                                                           {
00772 
00773 // pair.first = DCC id
00774 // pair.second = DCC_channel
00775 // For digi2raw, read the SRflags and write the SR block :
00776 // need to find out, for an EcalScDetId, which is the DCC and the DCC_channel
00777 
00778         std::pair<int,int> ind;
00779         EEDetId dum;
00780         int ix = id.ix();
00781         int iy = id.iy();
00782         int zside = id.zside();
00783         ix = (ix-1)*5 +1;
00784         iy = (iy-1)*5 +1;
00785         ix = 5 * (ix/5) +1;
00786         iy = 5 * (iy/5) +1;
00787         int ix_c = ix;
00788         int iy_c = iy;
00789         if (! dum.validDetId(ix_c,iy_c,zside) ) {
00790             ix_c = ix +4;
00791             iy_c = iy ;
00792             if ( ! dum.validDetId(ix_c,iy_c,zside) ) {
00793              ix_c = ix +4;
00794              iy_c = iy +4;
00795              if ( ! dum.validDetId(ix_c,iy_c,zside) ) {
00796               ix_c = ix;
00797               iy_c = iy +4;
00798              }
00799             }
00800         }
00801         EEDetId eedetid(ix_c,iy_c,zside,EEDetId::XYMODE);
00802         EcalElectronicsId elid = getElectronicsId(eedetid);
00803         int Dccid = elid.dccId();
00804         int DCC_Channel = elid.towerId();
00805         ind.first = Dccid;
00806         ind.second = DCC_Channel;
00807         return ind;
00808 }

DetId EcalElectronicsMapping::getDetId ( const EcalTriggerElectronicsId id  )  const

Get the detid given a trigger electronicsId.

Definition at line 504 of file EcalElectronicsMapping.cc.

References EcalBarrel, EcalEndcap, Exception, find(), getDetId(), getElectronicsId(), it, m_items, and subdet().

00504                                                                                {
00505 
00506   EcalSubdetector subdet = id.subdet();
00507 
00508   if (subdet == EcalBarrel) {
00509         const EcalElectronicsId& elid = getElectronicsId(id); 
00510         DetId cell = getDetId(elid);    
00511         return cell;
00512   }
00513   else if (subdet == EcalEndcap) {
00514         EcalElectronicsMap_by_TriggerElectronicsId::const_iterator it=get<2>(m_items).find(id);
00515         DetId cell = it -> cell;
00516         return cell;
00517   }
00518   else throw cms::Exception("InvalidDetId") << "Wrong EcalTriggerElectronicsId in EcalElectronicsMapping::getDetId." ;
00519 }

DetId EcalElectronicsMapping::getDetId ( const EcalElectronicsId id  )  const

Get the detid given an electronicsId.

Definition at line 411 of file EcalElectronicsMapping.cc.

References DCCID_PHI0_EBM, DCCID_PHI0_EBP, e, EcalBarrel, EcalEndcap, EBDetId::ETAPHIMODE, Exception, find(), it, kCrystalsInPhi, kTowersInPhi, m_items, rightTower(), strip(), subdet(), and zside().

Referenced by EcalElectronicsMapper::fillMaps(), and getDetId().

00411                                                                         {
00412   EcalSubdetector subdet = id.subdet();
00413 
00414   if (subdet == EcalBarrel) {
00415         int dcc = id.dccId();
00416         int tower = id.towerId();
00417         int strip = id.stripId();
00418         int channel = id.xtalId();
00419                                                                                                            
00420         int smid = 0;
00421         int iphi = 0;
00422         bool EBPlus = (id.zside() > 0);
00423         bool EBMinus = !EBPlus;
00424 
00425         if (id.zside() < 0) {
00426                 smid = dcc + 19 - DCCID_PHI0_EBM;
00427                 iphi = (smid - 19) * kCrystalsInPhi;
00428                 iphi += 5 * ( (tower-1) % kTowersInPhi );
00429         }
00430         else {
00431                 smid = dcc +1 - DCCID_PHI0_EBP;
00432                 iphi = (smid - 1) * kCrystalsInPhi;
00433                 iphi += 5 * (
00434                         kTowersInPhi - ( (tower-1) % kTowersInPhi ) -1
00435                         );
00436         }
00437         bool RightTower = rightTower(tower);
00438         int ieta = 5 * ((tower-1) / kTowersInPhi) + 1;
00439         if (RightTower) {
00440                 ieta += (strip-1);
00441                 if (strip%2 == 1) {
00442                         if (EBMinus) iphi += (channel-1) +1;
00443                         if (EBPlus) iphi += (4 - (channel-1)) +1;
00444                 }
00445                 else {
00446                         if (EBMinus) iphi += (4 - (channel-1)) +1;
00447                         if (EBPlus) iphi += (channel-1) +1;
00448                 }
00449         }
00450         else {
00451                 ieta += 4 - (strip-1);
00452                 if (strip%2 == 1) {
00453                         if (EBMinus) iphi += (4 - (channel-1)) +1;
00454                         if (EBPlus) iphi += (channel-1) +1;
00455                 }
00456                 else {
00457                         if (EBMinus) iphi += (channel-1) +1;
00458                         if (EBPlus) iphi += (4 - (channel-1)) +1;
00459                 }
00460         }
00461         if (id.zside() < 0) ieta = -ieta;
00462 
00463         EBDetId e(ieta,iphi,EBDetId::ETAPHIMODE);
00464         return e;
00465   }
00466 
00467   else if (subdet == EcalEndcap) {
00468         EcalElectronicsMap_by_ElectronicsId::const_iterator it=get<1>(m_items).find(id);
00469         DetId cell = it -> cell;
00470         return cell;
00471   }
00472   else throw cms::Exception("InvalidDetId") << "Wrong EcalElectronicsId in EcalElectronicsMapping::getDetId." ;
00473 }

EcalScDetId EcalElectronicsMapping::getEcalScDetId ( int  DCCid,
int  DCC_Channel 
) const

builds an EcalScDetId from (DCC, DCC_channel)

Definition at line 812 of file EcalElectronicsMapping.cc.

References dccTowerConstituents(), EEDetId::ix(), EEDetId::iy(), and EEDetId::zside().

Referenced by EcalElectronicsMapper::fillMaps().

00812                                                                                    {
00813 
00814 // For unpacking of ST flags.
00815 
00816         std::vector<DetId> xtals = dccTowerConstituents(DCCid, DCC_Channel);
00817         if (xtals.size() == 0) throw cms::Exception("InvalidDetId") << 
00818                 "EcalElectronicsMapping : can not create EcalScDetId for DCC " << DCCid << 
00819                 " and DCC_Channel " << DCC_Channel << ".";
00820 
00821         EEDetId eedetid = xtals[0];
00822         int ix = eedetid.ix();
00823         int iy = eedetid.iy();
00824         int iz = eedetid.zside();
00825         int ix_SC = (ix-1)/5 + 1;
00826         int iy_SC = (iy-1)/5 + 1;
00827         EcalScDetId scdetid(ix_SC,iy_SC,iz);
00828         return scdetid;
00829 
00830 }

EcalElectronicsId EcalElectronicsMapping::getElectronicsId ( const EcalTriggerElectronicsId id  )  const

Get the electronics id given a trigger electronicsId.

Definition at line 523 of file EcalElectronicsMapping.cc.

References DCCID_PHI0_EBM, DCCID_PHI0_EBP, EcalBarrel, EcalEndcap, Exception, find(), it, m_items, strip(), subdet(), TCCID_PHI0_EBM, TCCID_PHI0_EBP, and zside().

00523                                                                                                    {
00524 
00525   EcalSubdetector subdet = id.subdet();
00526 
00527   if (subdet == EcalBarrel) {
00528         int strip = id.pseudoStripId();
00529         int xtal = id.channelId();
00530         int tower = id.ttId();
00531         int dcc = id.tccId();
00532         if (id.zside() < 0) {
00533                 dcc  -= TCCID_PHI0_EBM - DCCID_PHI0_EBM;
00534         }
00535         else {
00536                 dcc  -= TCCID_PHI0_EBP - DCCID_PHI0_EBP;
00537         }
00538         EcalElectronicsId elid(dcc,tower,strip,xtal);
00539         return elid;
00540   }
00541   else if (subdet == EcalEndcap) {
00542         EcalElectronicsMap_by_TriggerElectronicsId::const_iterator it=get<2>(m_items).find(id);
00543         EcalElectronicsId elid = it -> elid;
00544         return elid;
00545   }
00546   else throw cms::Exception("InvalidDetId") << "Wrong EcalTriggerElectronicsId in EcalElectronicsMapping::getElectronicsId.";
00547 }

EcalElectronicsId EcalElectronicsMapping::getElectronicsId ( const DetId id  )  const

Get the electronics id for this det id.

Definition at line 329 of file EcalElectronicsMapping.cc.

References DCCid(), DCCMODE, EcalBarrel, EcalEndcap, Exception, find(), it, iTT(), m_items, rightTower(), strip(), subdet(), EBDetId::tower(), and zside().

Referenced by EcalURecHitHists::analyze(), EcalElectronicsMapper::fillMaps(), HLTPi0RecHitsFilter::filter(), getDCCandSC(), getDetId(), getLMNumber(), getTriggerElectronicsId(), Numbers::icEE(), Numbers::iSM(), Numbers::iTT(), EcalPedOffset::readDACs(), EcalDigiDisplay::readEBDigis(), EcalPedHists::readEBdigis(), EcalDigiDisplay::readEEDigis(), EcalPedHists::readEEdigis(), EcalMipGraphs::selectEBHits(), and EcalMipGraphs::selectEEHits().

00329                                                                                 {
00330 
00331   EcalSubdetector subdet = EcalSubdetector(id.subdetId());
00332   if (subdet == EcalBarrel) {
00333         const EBDetId ebdetid = EBDetId(id);
00334 
00335         int dcc = DCCid(ebdetid);
00336         bool EBPlus = (zside(dcc,DCCMODE) > 0);
00337         bool EBMinus = !EBPlus;
00338 
00339         EcalTrigTowerDetId trigtower = ebdetid.tower();
00340         // int tower = trigtower.iTT();
00341         int tower = iTT(trigtower);
00342 
00343         int ieta = EBDetId(id).ietaAbs();
00344         int iphi = EBDetId(id).iphi();
00345         int strip(0);
00346         int channel(0);
00347         bool RightTower = rightTower(tower);
00348         if (RightTower) {
00349                 strip = (ieta-1)%5;
00350                 if (strip%2 == 0) {
00351                         if (EBMinus) channel = (iphi-1) %5;
00352                         if (EBPlus) channel = 4 -( (iphi-1) %5 );
00353                 }
00354                 else {
00355                         if (EBMinus) channel = 4 -( (iphi-1) %5 ); 
00356                         if (EBPlus) channel = (iphi-1) %5;
00357                 }
00358         }
00359         else {
00360                 strip = 4 - ( (ieta-1)%5 );
00361                 if (strip%2 == 0) {
00362                         if (EBMinus) channel = 4 -( (iphi-1) %5 );
00363                         if (EBPlus) channel = (iphi-1) %5;
00364                 }
00365                 else {
00366                         if (EBMinus) channel = (iphi-1) %5;
00367                         if (EBPlus) channel = 4 -( (iphi-1) %5 );
00368                 }
00369         }
00370         strip += 1;
00371         channel += 1;
00372         
00373         EcalElectronicsId elid = EcalElectronicsId(dcc,tower,strip,channel);
00374         
00375         return elid;
00376   }
00377   else if (subdet == EcalEndcap) {
00378         EcalElectronicsMap_by_DetId::const_iterator it=get<0>(m_items).find(id);
00379         EcalElectronicsId elid = it -> elid;
00380         return elid;
00381   }
00382   else {
00383         throw cms::Exception("InvalidDetId") <<
00384                 " Wrong DetId in EcalElectronicsMapping::getElectronicsId.";
00385   }
00386 
00387 }

int EcalElectronicsMapping::GetFED ( double  eta,
double  phi 
) const

Definition at line 1030 of file EcalElectronicsMapping.cc.

References DCCID_PHI0_EBM, DCCID_PHI0_EBP, int, MIN_DCCID_EEM, and MIN_DCCID_EEP.

Referenced by EcalRegionCabling::elementIndex(), GetListofFEDs(), and EcalRegionCabling::updateEcalRefGetterWithEtaPhi().

01030                                                                 {
01031 
01032         // for regional unpacking.
01033         // eta is signed, phi is in degrees.
01034 
01035         int DCC_Phi0 = 0;
01036         bool IsBarrel = true;
01037         if (fabs(eta) > 1.479) IsBarrel = false;
01038         bool Positive = (eta > 0);
01039 
01040         if (IsBarrel && Positive) DCC_Phi0 = DCCID_PHI0_EBP;
01041         if (IsBarrel && (!Positive)) DCC_Phi0 = DCCID_PHI0_EBM;
01042         if ((!IsBarrel) && Positive) DCC_Phi0 = MIN_DCCID_EEP;
01043         if ((!IsBarrel) && (!Positive)) DCC_Phi0 = MIN_DCCID_EEM;
01044 
01045         // phi between 0 and 360 deg :
01046         if (phi < 0) phi += 360;
01047         if (phi > 360.) phi = 360. ;
01048         if (phi < 0) phi = 0. ;
01049 
01050         if (IsBarrel) phi = phi - 350;
01051         else phi = phi - 330;
01052         if (phi < 0) phi += 360;
01053         int iphi = -1;
01054         if (IsBarrel) iphi = (int)(phi / 20.);
01055         else iphi = (int)(phi / 40.);
01056 
01057         // std::cout << " in GetFED : phi iphi DCC0 " << phi << " " << iphi << " " << DCC_Phi0 << std::endl;
01058         
01059         int DCC = iphi + DCC_Phi0;
01060         // std::cout << "  eta phi " << eta << " " << " " << phi << " is in FED " << DCC << std::endl;
01061         return DCC;
01062 }

void EcalElectronicsMapping::GetListofFEDs ( const EcalEtaPhiRegion  region,
std::vector< int > &  FEDs 
) const

Definition at line 897 of file EcalElectronicsMapping.cc.

References GenMuonPlsPt100GeV_cfg::cout, DCCBoundary(), debug, deltaR(), dummy, lat::endl(), EcalEtaPhiRegion::etaHigh(), EcalEtaPhiRegion::etaLow(), GetFED(), MAX_DCCID_EBM, MAX_DCCID_EBP, MAX_DCCID_EEM, MAX_DCCID_EEP, MIN_DCCID_EBM, MIN_DCCID_EBP, MIN_DCCID_EEM, MIN_DCCID_EEP, EcalEtaPhiRegion::phiHigh(), EcalEtaPhiRegion::phiLow(), and Geom::pi().

00897                                                                                                      {
00898 
00899         // for regional unpacking.
00900         // get list of FEDs corresponding to a region in (eta,phi)
00901 
00902   //    std::vector<int> FEDs;
00903         double radTodeg = 180. / Geom::pi();
00904 
00905         bool debug = false;
00906 
00907         double etalow = region.etaLow();
00908         double philow = region.phiLow() * radTodeg;
00909         if (debug) std::cout << " etalow philow " << etalow << " " << philow << std::endl;
00910         int FED_LB = GetFED(etalow,philow);     // left, bottom
00911 
00912         double phihigh = region.phiHigh() * radTodeg;
00913         if (debug) std::cout << " etalow phihigh " << etalow << " " << phihigh << std::endl;
00914         int FED_LT = GetFED(etalow,phihigh);    // left, top
00915 
00916         int DCC_BoundaryL = DCCBoundary(FED_LB);
00917         int deltaL = 18;
00918         if (FED_LB < MIN_DCCID_EBM || FED_LB > MAX_DCCID_EBP) deltaL=9;
00919 
00920         if (philow < -170 && phihigh > 170) {
00921                 FED_LB = DCC_BoundaryL;
00922                 FED_LT = DCC_BoundaryL + deltaL -1;
00923         }
00924         if (debug) std::cout << " FED_LB FED_LT " << FED_LB << " " << FED_LT << std::endl;
00925 
00926 
00927         int iL=FED_LB;
00928         bool dummy = true;
00929         int idx = 0;
00930         while (  dummy ) {
00931                 iL = (FED_LB - DCC_BoundaryL + idx ) % deltaL + DCC_BoundaryL;
00932                 FEDs.push_back(iL);
00933                 if (debug) std::cout << "   add fed " << iL << std::endl;
00934                 if ( iL == FED_LT) break;
00935                 idx ++;
00936         }
00937  
00938         double etahigh = region.etaHigh();
00939         int FED_RB = GetFED(etahigh, philow);   // right, bottom
00940         if (FED_RB == FED_LB) return;// FEDs;
00941 
00942         int FED_RT = GetFED(etahigh, phihigh);  // right, top
00943 
00944         if (debug) std::cout << "etahigh philow phihigh " << etahigh << " " << philow << " " << phihigh << std::endl;
00945         int DCC_BoundaryR = DCCBoundary(FED_RB);
00946         int deltaR = 18;
00947         if (FED_RB < MIN_DCCID_EBM || FED_RB > MAX_DCCID_EBP) deltaR=9;
00948 
00949         if (philow < -170 && phihigh > 170) {
00950                 FED_RB = DCC_BoundaryR;
00951                 FED_RT = DCC_BoundaryR + deltaR-1;
00952         }
00953         if (debug) std::cout << " FED_RB FED_RT " << FED_RB << " " << FED_RT << std::endl;
00954 
00955         int iR=FED_RB;
00956         idx = 0;
00957         while ( dummy ) {
00958                 iR = (FED_RB - DCC_BoundaryR + idx) % deltaR + DCC_BoundaryR;
00959                 FEDs.push_back(iR);
00960                 if (debug) std::cout << "   add fed " << iR << std::endl;
00961                 if ( iR == FED_RT) break;
00962                 idx ++;
00963         }
00964 
00965 
00966         if (FED_LB >= MIN_DCCID_EBM && FED_LB <= MAX_DCCID_EBM   &&
00967             FED_RB >= MIN_DCCID_EEP && FED_RB <= MAX_DCCID_EEP) {
00968                 int minR = FED_LB + 18;
00969                 int maxR = FED_LT + 18;
00970                 int iR = minR;
00971                 int idx = 0;
00972                 while ( dummy ) {
00973                         iR = (minR - MIN_DCCID_EBP + idx) % 18 + MIN_DCCID_EBP;
00974                         FEDs.push_back(iR);
00975                         if (debug) std::cout << "   add fed " << iR << std::endl;
00976                         if ( iR == maxR) break;
00977                         idx ++;
00978                 }
00979                 return;// FEDs;
00980         }
00981 
00982         if (FED_LB >= MIN_DCCID_EEM && FED_LB <= MAX_DCCID_EEM &&
00983             FED_RB >= MIN_DCCID_EBP && FED_RB <= MAX_DCCID_EBP) {
00984                 int minL = FED_RB - 18;
00985                 int maxL = FED_RT - 18;
00986                 int iL = minL;
00987                 int idx = 0;
00988                 while ( dummy ) {
00989                         iL = (minL - MIN_DCCID_EBM + idx) % 18 + MIN_DCCID_EBM;
00990                         FEDs.push_back(iL);
00991                         if (debug) std::cout << "   add fed " << iL << std::endl;
00992                         if (iL == maxL) break;
00993                         idx ++;
00994                 }
00995                 return;// FEDs;
00996         } 
00997 
00998         if (FED_LB >= MIN_DCCID_EEM && FED_LB <= MAX_DCCID_EEM &&
00999             FED_RB >= MIN_DCCID_EEP && FED_RB <= MAX_DCCID_EEP) {
01000                 int minL = (FED_LB-1)*2 + MIN_DCCID_EBM;
01001                 if (minL == MIN_DCCID_EBM) minL=MAX_DCCID_EBM;
01002                 else minL = minL -1;
01003                 int maxL = (FED_LT-1)*2 + MIN_DCCID_EBM;
01004                 int iL = minL;
01005                 int idx = 0;
01006                 while (dummy) {
01007                         iL = (minL - MIN_DCCID_EBM + idx) % 18 + MIN_DCCID_EBM;
01008                         FEDs.push_back(iL);
01009                         if (debug) std::cout << "   add fed " << iL << std::endl;
01010                         if (iL == maxL) break;
01011                         idx ++;
01012                 }
01013                 int minR = minL + 18;
01014                 int maxR = maxL + 18;
01015                 int iR = minR;
01016                 idx = 0;
01017                 while (dummy) {
01018                         iR = (minR - MIN_DCCID_EBP + idx) % 18 + MIN_DCCID_EBP;
01019                         FEDs.push_back(iR);
01020                         if (debug) std::cout << "   add fed " << iR << std::endl;
01021                         if (iR == maxR) break;
01022                         idx ++;
01023                 }
01024         }
01025 
01026         return;// FEDs;
01027 
01028 }

std::vector< int > EcalElectronicsMapping::GetListofFEDs ( const EcalEtaPhiRegion  region  )  const

Definition at line 892 of file EcalElectronicsMapping.cc.

References reco_application_2006h2rawdata_ecalLocalReco_cfg::FEDs.

Referenced by ECALRegFEDSelector::produce().

00892                                                                                         {
00893   std::vector<int> FEDs;
00894   GetListofFEDs(region, FEDs);
00895   return FEDs;
00896 }

int EcalElectronicsMapping::getLMNumber ( const DetId id  )  const

Definition at line 1065 of file EcalElectronicsMapping.cc.

References EcalElectronicsId::dccId(), DCCid(), EcalBarrel, EcalEndcap, Exception, getElectronicsId(), EBDetId::ietaSM(), EBDetId::iphiSM(), it, EEDetId::ix(), LaserMonitoringMap_EB, LaserMonitoringMap_EE, edm::second(), and subdet().

01065                                                              {
01066 
01067 // Laser Monitoring readout number.
01068 
01069   EcalSubdetector subdet = EcalSubdetector(id.subdetId());
01070 
01071   if (subdet == EcalBarrel) {
01072         const EBDetId ebdetid = EBDetId(id);
01073         int dccid = DCCid(ebdetid);
01074         std::map<int, int>::const_iterator it = LaserMonitoringMap_EB.find(dccid);
01075         if (it != LaserMonitoringMap_EB.end() ) {
01076                 int ilm = it -> second;
01077                 int iETA = ebdetid.ietaSM();
01078                 int iPHI = ebdetid.iphiSM();
01079                 if (iPHI > 10 && iETA>5) {ilm ++; } ;
01080                 return ilm;
01081         } 
01082         else throw cms::Exception("InvalidDCCId") << "Wrong DCCId (EB) in EcalElectronicsMapping::getLMNumber.";
01083   }
01084 
01085   else if (subdet == EcalEndcap) {
01086         EcalElectronicsId elid = getElectronicsId(id);
01087         int dccid = elid.dccId();
01088         EEDetId eedetid = EEDetId(id);
01089         std::map<int, int>::const_iterator it = LaserMonitoringMap_EE.find(dccid);
01090         if (it != LaserMonitoringMap_EB.end() ) {
01091                 int ilm = it -> second;
01092                 if (dccid == 8) {
01093                         int ix = eedetid.ix();
01094                         if (ix > 50) ilm += 1;
01095                 }
01096                 if (dccid == 53) {
01097                         int ix = eedetid.ix();
01098                         if (ix > 50) ilm += 1;
01099                 }
01100                 return ilm;
01101         }
01102         else throw cms::Exception("InvalidDCCId") << "Wrong DCCId (EE) in EcalElectronicsMapping::getLMNumber.";
01103   }
01104 
01105   return -1;
01106 }

EcalTriggerElectronicsId EcalElectronicsMapping::getTriggerElectronicsId ( const EcalElectronicsId id  )  const

Get the trigger electronics id given an electronicsId.

Definition at line 476 of file EcalElectronicsMapping.cc.

References DCCID_PHI0_EBM, DCCID_PHI0_EBP, EcalBarrel, EcalEndcap, Exception, find(), it, m_items, strip(), subdet(), TCCID_PHI0_EBM, TCCID_PHI0_EBP, and zside().

00476                                                                                                           {
00477 
00478   EcalSubdetector subdet = id.subdet();
00479 
00480   if (subdet == EcalBarrel) {
00481         int strip = id.stripId();
00482         int xtal = id.xtalId();
00483         int tower = id.towerId();
00484         int tcc = id.dccId();
00485         if (id.zside() < 0) {
00486                 tcc  += TCCID_PHI0_EBM - DCCID_PHI0_EBM;
00487         }
00488         else {
00489                 tcc  += TCCID_PHI0_EBP - DCCID_PHI0_EBP;
00490         }
00491         EcalTriggerElectronicsId trelid(tcc,tower,strip,xtal);
00492         return trelid;
00493 
00494   }
00495   else if (subdet == EcalEndcap) {
00496         EcalElectronicsMap_by_ElectronicsId::const_iterator it=get<1>(m_items).find(id);
00497         EcalTriggerElectronicsId trelid = it -> trelid;
00498         return trelid;
00499   }
00500   else throw cms::Exception("InvalidDetId") << "Wrong EcalElectronicsId in EcalElectronicsMapping::getTriggerElectronicsId.";
00501 }

EcalTriggerElectronicsId EcalElectronicsMapping::getTriggerElectronicsId ( const DetId id  )  const

Get the trigger electronics id for this det id.

Definition at line 390 of file EcalElectronicsMapping.cc.

References EcalBarrel, EcalEndcap, Exception, find(), getElectronicsId(), it, m_items, and subdet().

Referenced by EcalTPGParamBuilder::analyze(), EcalTrigPrimFunctionalAlgo::findStripNr(), and EcalFenixStrip::process().

00390                                                                                               {
00391   EcalSubdetector subdet = EcalSubdetector(id.subdetId());
00392 
00393   if (subdet == EcalBarrel) {
00394 
00395         const EcalElectronicsId& elid = getElectronicsId(id);
00396         EcalTriggerElectronicsId trelid = getTriggerElectronicsId(elid);
00397         return trelid;
00398   }
00399   else if (subdet == EcalEndcap) {
00400         EcalElectronicsMap_by_DetId::const_iterator it=get<0>(m_items).find(id);
00401         EcalTriggerElectronicsId trelid = it -> trelid;
00402         return trelid;
00403   }
00404   else {
00405         throw cms::Exception("InvalidDetId") <<
00406                 " Wrong DetId in EcalElectronicsMapping::getTriggerElectronicsId.";
00407   }
00408 }

EcalTrigTowerDetId EcalElectronicsMapping::getTrigTowerDetId ( int  TCCid,
int  iTT 
) const

Builds a EcalTrigTowerDetID from the TCCid & TriggerTower index in TCC.

Definition at line 249 of file EcalElectronicsMapping.cc.

References funct::abs(), DCCid(), DCCID_PHI0_EBM, DCCID_PHI0_EBP, EcalBarrel, EcalEndcap, Exception, iEEEtaMinInner, iEEEtaMinOuter, SurfaceOrientation::inner, kEETowersInPhiPerQuadrant, kEETowersInPhiPerTCC, kTCCinPhi, kTowersInPhi, SurfaceOrientation::outer, subdet(), EcalTrigTowerDetId::SUBDETIJMODE, TCCID_PHI0_EBM, TCCID_PHI0_EBP, TCCID_PHI0_EEM_IN, TCCID_PHI0_EEM_OUT, TCCID_PHI0_EEP_IN, TCCID_PHI0_EEP_OUT, TCCMODE, and zside().

Referenced by EcalElectronicsMapper::fillMaps().

00249                                                                                      {
00250         
00251         // needed for unpacking code.
00252 
00253    EcalSubdetector sub = subdet(TCCid, TCCMODE);
00254    int zIndex = zside(TCCid, TCCMODE);
00255 
00256    if (sub == EcalBarrel) {
00257 
00258         int DCCid =0;
00259         int jtower = iTT-1;
00260         if (zIndex > 0) DCCid = TCCid - TCCID_PHI0_EBP + DCCID_PHI0_EBP;
00261         else DCCid = TCCid - TCCID_PHI0_EBM + DCCID_PHI0_EBM;
00262         int SMid = (zIndex > 0) ? DCCid - 27 : DCCid + 9;
00263 
00264         int etaTT = jtower / kTowersInPhi +1;   // between 1 and 17
00265         int phiTT;
00266                                                                                                                      
00267         if (zIndex > 0)
00268            phiTT=(SMid - 1) * kTowersInPhi + (kTowersInPhi -(jtower % kTowersInPhi)) -1;
00269         else
00270            phiTT=(SMid - 19)* kTowersInPhi + jtower % kTowersInPhi;
00271         phiTT ++;
00272         phiTT = phiTT -2;
00273         if (phiTT <= 0) phiTT = 72+phiTT;
00274         EcalTrigTowerDetId tdetid(zIndex, EcalBarrel, etaTT, phiTT,EcalTrigTowerDetId::SUBDETIJMODE);
00275         return tdetid;
00276    }
00277 
00278    else if (sub == EcalEndcap) {
00279 
00280         bool EEminus = (zIndex <0);
00281         bool EEplus  = (zIndex >0);     
00282         if ( (!EEminus) && (!EEplus) )
00283                 throw cms::Exception("InvalidDetId") <<
00284                 "EcalElectronicsMapping:  Cannot create EcalTrigTowerDetId object. " ;
00285         int iz = 0;
00286         int tcc = TCCid;
00287         if (tcc <= TCCID_PHI0_EEM_OUT+kTCCinPhi) iz = -1;
00288         else if (tcc >= TCCID_PHI0_EEP_OUT) iz = +1;
00289 
00290         bool inner = false;
00291         if (iz < 0 && tcc >= TCCID_PHI0_EEM_IN && tcc <= TCCID_PHI0_EEM_IN+kTCCinPhi) inner=true;
00292         if (iz > 0 && tcc >= TCCID_PHI0_EEP_IN && tcc <= TCCID_PHI0_EEP_IN+kTCCinPhi) inner=true;
00293         bool outer = !inner;
00294 
00295         int ieta = iTT / kEETowersInPhiPerTCC;
00296         int iphi = (iTT-1) % kEETowersInPhiPerTCC;
00297         if (inner) ieta += iEEEtaMinInner;
00298         else ieta += iEEEtaMinOuter;
00299         if (iz < 0) ieta = -ieta;
00300 
00301         int TCC_origin = 0;
00302         if (inner && iz < 0) TCC_origin=TCCID_PHI0_EEM_IN;
00303         if (outer && iz < 0) TCC_origin=TCCID_PHI0_EEM_OUT;
00304         if (inner && iz > 0) TCC_origin=TCCID_PHI0_EEP_IN;
00305         if (outer && iz > 0) TCC_origin=TCCID_PHI0_EEP_OUT;
00306         tcc = tcc - TCC_origin;
00307 
00308         iphi += kEETowersInPhiPerTCC * tcc;
00309         iphi = (iphi -2 + 4*kEETowersInPhiPerQuadrant) % (4*kEETowersInPhiPerQuadrant) + 1;
00310 
00311         int tower_i = abs(ieta);
00312         int tower_j = iphi;
00313         EcalTrigTowerDetId tdetid(zIndex, EcalEndcap, tower_i, tower_j,EcalTrigTowerDetId::SUBDETIJMODE);
00314         return tdetid;
00315 
00316    }
00317   else {
00318         throw cms::Exception("InvalidDetId") << 
00319                 " Wrong indices in EcalElectronicsMapping::getTrigTowerDetId. TCCid = " << TCCid << " iTT = " << iTT << ".";
00320   }
00321 
00322 
00323 }

int EcalElectronicsMapping::iTT ( const EcalTrigTowerDetId id  )  const

returns the index of a Trigger Tower within its TCC.

Definition at line 108 of file EcalElectronicsMapping.cc.

References EcalBarrel, EcalEndcap, Exception, iEEEtaMinInner, iEEEtaMinOuter, SurfaceOrientation::inner, kEBTowersInPhi, kEETowersInEtaPerInnerTCC, kEETowersInEtaPerOuterTCC, kEETowersInPhiPerQuadrant, kEETowersInPhiPerTCC, phi, and zside().

Referenced by EcalTPGParamBuilder::analyze(), Numbers::crystals(), and getElectronicsId().

00114 {
00115   if ( id.subDet() == EcalBarrel )
00116     {
00117       int ie = id.ietaAbs() -1;
00118       int ip;
00119       int phi = id.iphi();
00120       phi += 2;
00121       if (phi > 72) phi = phi-72;
00122       if (id.zside() < 0) {
00123         ip = (( phi -1 ) % kEBTowersInPhi ) + 1;
00124       } else {
00125         ip = kEBTowersInPhi - ((phi -1 ) % kEBTowersInPhi );
00126       }
00127                                                                                                                      
00128       return (ie * kEBTowersInPhi) + ip;
00129     }
00130   else if ( id.subDet() == EcalEndcap)   {
00131         int ie = id.ietaAbs();
00132         bool inner = (ie >= iEEEtaMinInner);
00133         if (inner) {
00134                 ie = ie - iEEEtaMinInner;
00135                 ie = ie % kEETowersInEtaPerInnerTCC;
00136         }
00137         else {
00138                 ie = ie - iEEEtaMinOuter;
00139                 ie = ie % kEETowersInEtaPerOuterTCC;
00140         }
00141                                                                                                                      
00142         int ip = id.iphi();
00143         ip = (ip + 1) % (kEETowersInPhiPerQuadrant*4); 
00144                                 // now iphi between 0 and 71,
00145                                 // with iphi=0,1,2,3 in 1st Phi sector
00146         ip = ip % kEETowersInPhiPerTCC;
00147         int itt = kEETowersInPhiPerTCC * ie + ip + 1;
00148         return itt;
00149   }
00150   else {
00151         throw cms::Exception("InvalidDetId") << " Wrong EcalTrigTowerDetId in EcalElectronicsMapping::iTT. " ;
00152         return 0;
00153   }
00154 
00155 }

std::vector< DetId > EcalElectronicsMapping::pseudoStripConstituents ( int  tccId,
int  tt,
int  pseudostrip 
) const

Get the constituent detids for this dccId.

Definition at line 740 of file EcalElectronicsMapping.cc.

References DCCID_PHI0_EBM, DCCID_PHI0_EBP, EcalBarrel, m_items, stripConstituents(), subdet(), TCCID_PHI0_EBM, TCCID_PHI0_EBP, TCCMODE, and zside().

00740                                                                                                          {
00741 
00742   EcalSubdetector sub = subdet(tccId,TCCMODE);
00743   std::vector<DetId> items;
00744 
00745   if (sub == EcalBarrel) {
00746         int iz =  zside(tccId,TCCMODE);
00747         int dccId = tccId;
00748         if (iz > 0) dccId = dccId - TCCID_PHI0_EBP + DCCID_PHI0_EBP;
00749         else dccId = dccId - TCCID_PHI0_EBM + DCCID_PHI0_EBM;
00750         items = stripConstituents(dccId,tt,pseudostrip);
00751         return items;
00752   }
00753   else {
00754         EcalElectronicsMap_by_TccId_TtId_and_PseudostripId::const_iterator lb,ub;
00755         boost::tuples::tie(lb,ub)=get<8>(m_items).equal_range(boost::make_tuple(int(tccId), int(tt), int(pseudostrip)));
00756         while (lb != ub) {
00757                 DetId cell = lb -> cell;
00758                 items.push_back(cell);
00759                 ++ lb;
00760         }
00761         return items;
00762   }
00763 }

bool EcalElectronicsMapping::rightTower ( int  tower  )  const

Definition at line 870 of file EcalElectronicsMapping.cc.

Referenced by getDetId(), getElectronicsId(), and stripConstituents().

00870                                                        {
00871         // for EB, two types of tower (LVRB top/bottom)
00872 
00873   if ((tower>12 && tower<21) || (tower>28 && tower<37) ||
00874        (tower>44 && tower<53) || (tower>60 && tower<69))
00875     return true;
00876   else
00877     return false;
00878 }

std::vector< DetId > EcalElectronicsMapping::stripConstituents ( int  dccId,
int  tower,
int  strip 
) const

Get the constituent detids for this dccId.

Definition at line 633 of file EcalElectronicsMapping.cc.

References DCCID_PHI0_EBM, DCCID_PHI0_EBP, DCCMODE, EcalBarrel, EBDetId::ETAPHIMODE, kCrystalsInPhi, kTowersInPhi, m_items, rightTower(), subdet(), and zside().

Referenced by pseudoStripConstituents().

00633                                                                                                 {
00634 
00635   EcalSubdetector sub = subdet(dccId,DCCMODE);
00636   std::vector<DetId> items;
00637 
00638   if (sub == EcalBarrel) {
00639 
00640         int iz = zside(dccId, DCCMODE);
00641         bool RightTower = rightTower(tower);
00642         int smid = 0;
00643         int iphi = 0;
00644         if (iz < 0) {
00645                 smid = dccId + 19 - DCCID_PHI0_EBM;
00646                 iphi = (smid - 19) * kCrystalsInPhi;
00647                 iphi += 5 * ( (tower-1) % kTowersInPhi );
00648         }
00649         else {
00650                 smid = dccId +1 - DCCID_PHI0_EBP;
00651                 iphi = (smid - 1) * kCrystalsInPhi;
00652                 iphi += 5 * (
00653                         kTowersInPhi - ( (tower-1) % kTowersInPhi ) -1
00654                         );
00655         }
00656         int ieta = 5 * ((tower-1) / kTowersInPhi) + 1;
00657         if (RightTower) {
00658                 ieta += (strip-1);
00659         }
00660         else {
00661                 ieta += 4 - (strip-1);
00662         }
00663         for (int ip=1; ip <=5; ip++) {
00664                 int ieta_xtal = ieta ;
00665                 int iphi_xtal = iphi + ip;
00666                 if (iz < 0) ieta_xtal = -ieta_xtal;
00667                 EBDetId ebdetid(ieta_xtal,iphi_xtal,EBDetId::ETAPHIMODE);
00668                 items.push_back(ebdetid);
00669         }
00670 
00671         return items;
00672   }
00673   else {
00674         EcalElectronicsMap_by_DccId_TowerId_and_StripId::const_iterator lb,ub;
00675         boost::tuples::tie(lb,ub)=get<5>(m_items).equal_range(boost::make_tuple(int(dccId), int(tower), int(strip)));
00676         while (lb != ub) {
00677                 DetId cell = lb -> cell;
00678                 items.push_back(cell);
00679                 ++ lb;
00680         }
00681         return items;
00682   }
00683   
00684 }

EcalSubdetector EcalElectronicsMapping::subdet ( int  dccid,
int  mode 
) const

Definition at line 834 of file EcalElectronicsMapping.cc.

References DCCMODE, EcalBarrel, EcalEndcap, Exception, MAX_DCCID_EBM, MAX_DCCID_EBP, MAX_TCCID_EBM, MAX_TCCID_EBP, MIN_DCCID_EBM, MIN_DCCID_EBP, MIN_TCCID_EBM, MIN_TCCID_EBP, and TCCMODE.

Referenced by Numbers::crystals(), dccConstituents(), dccTowerConstituents(), getDetId(), getElectronicsId(), getLMNumber(), getTriggerElectronicsId(), getTrigTowerDetId(), pseudoStripConstituents(), stripConstituents(), tccConstituents(), and ttConstituents().

00834                                                                          {
00835   if (mode == DCCMODE) {
00836         if ( (dcctcc >= MIN_DCCID_EBM && dcctcc <= MAX_DCCID_EBM) ||
00837              (dcctcc >= MIN_DCCID_EBP && dcctcc <= MAX_DCCID_EBP) ) return EcalBarrel;
00838         else return EcalEndcap;
00839   }
00840   else if (mode == TCCMODE) {
00841         if ( (dcctcc >= MIN_TCCID_EBM && dcctcc <= MAX_TCCID_EBM) ||
00842              (dcctcc >= MIN_TCCID_EBP && dcctcc <= MAX_TCCID_EBP) ) return EcalBarrel;
00843         else return EcalEndcap;
00844   }
00845   else throw cms::Exception("InvalidDetId") << " Wrong mode in EcalElectronicsMapping::subdet " << mode << ".";
00846 }

std::vector< DetId > EcalElectronicsMapping::tccConstituents ( int  tccId  )  const

Get the constituent detids for this dccId.

Definition at line 687 of file EcalElectronicsMapping.cc.

References dccConstituents(), DCCID_PHI0_EBM, DCCID_PHI0_EBP, EcalBarrel, m_items, subdet(), TCCID_PHI0_EBM, TCCID_PHI0_EBP, TCCMODE, and zside().

00687                                                                         {
00688 
00689   EcalSubdetector sub = subdet(tccId,TCCMODE);
00690   std::vector<DetId> items;
00691 
00692   if (sub == EcalBarrel) {
00693         int iz =  zside(tccId,TCCMODE);
00694         int dccId = tccId;
00695         if (iz > 0) dccId = dccId - TCCID_PHI0_EBP + DCCID_PHI0_EBP;
00696         else dccId = dccId - TCCID_PHI0_EBM + DCCID_PHI0_EBM;
00697         items = dccConstituents(dccId); 
00698         return items;
00699   }
00700   else {
00701         EcalElectronicsMap_by_TccId::const_iterator lb,ub;
00702         boost::tuples::tie(lb,ub)=get<6>(m_items).equal_range(tccId);
00703         while (lb != ub) {
00704                 DetId cell = lb -> cell;
00705                 items.push_back(cell);
00706                 ++ lb;
00707         }
00708         return items;
00709   }
00710 }

int EcalElectronicsMapping::TCCid ( const EcalTrigTowerDetId id  )  const

returns the TCCid of a Trigger Tower

Definition at line 158 of file EcalElectronicsMapping.cc.

References EcalBarrel, EcalEndcap, Exception, iEEEtaMinInner, SurfaceOrientation::inner, kEBTowersInPhi, kEETowersInPhiPerQuadrant, phi, TCCID_PHI0_EBM, TCCID_PHI0_EBP, TCCID_PHI0_EEM_IN, TCCID_PHI0_EEM_OUT, TCCID_PHI0_EEP_IN, TCCID_PHI0_EEP_OUT, and zside().

00158                                                                      {
00159 
00160   if ( id.subDet() == EcalBarrel )
00161     {
00162         int phi = id.iphi() +2;
00163         if (phi > 72) phi = phi-72;
00164         int tcc = ( phi - 1 ) / kEBTowersInPhi + 1;
00165         if ( id.zside() < 0 ) tcc += 18;      // now id is the SMid
00166                 if (id.zside() < 0) {
00167                         tcc  += TCCID_PHI0_EBM - 19;
00168                 }
00169                 else {
00170                         tcc  += TCCID_PHI0_EBP -1;
00171                 }
00172         return tcc;
00173     }
00174 
00175   else if ( id.subDet() == EcalEndcap )
00176     {
00177         int ie = id.ietaAbs();
00178         bool inner = (ie >= iEEEtaMinInner);
00179         int ip = id.iphi();    // iphi = 1 corresponds to 0 < phi < 5 degrees
00180         ip = (ip + 1) % (kEETowersInPhiPerQuadrant*4);  
00181                                 // now iphi between 0 and 71,
00182                                 // with iphi=0,1,2,3 in 1st Phi sector
00183         int Phiindex = ip / 4;
00184         if (inner) {
00185                 if (id.ieta()> 0) Phiindex += TCCID_PHI0_EEP_IN;
00186                 else Phiindex += TCCID_PHI0_EEM_IN;
00187         }
00188         else {
00189                 if (id.ieta() > 0) Phiindex += TCCID_PHI0_EEP_OUT;
00190                 else Phiindex += TCCID_PHI0_EEM_OUT;
00191         }
00192         return Phiindex;
00193     }
00194   else {
00195         throw cms::Exception("InvalidDetId") << " Wrong EcalTrigTowerDetId in EcalElectronicsMapping::TCCid.";
00196         return 0;
00197   }
00198 }

int EcalElectronicsMapping::TCCid ( const EBDetId id  )  const

returns the TCCid of an EBDetId

Definition at line 89 of file EcalElectronicsMapping.cc.

References TCCID_PHI0_EBM, TCCID_PHI0_EBP, and zside().

Referenced by EcalTPGParamBuilder::analyze(), L1TdeECAL::analyze(), Numbers::crystals(), and DCCid().

00095 {
00096         int tcc = id.ism();
00097         if (id.zside() < 0) {
00098                 tcc  += TCCID_PHI0_EBM - 19;
00099         }
00100         else {
00101                 tcc  += TCCID_PHI0_EBP -1;
00102         }
00103         return tcc;
00104 }

std::vector< DetId > EcalElectronicsMapping::ttConstituents ( int  tccId,
int  tt 
) const

Get the constituent detids for this dccId.

Definition at line 714 of file EcalElectronicsMapping.cc.

References DCCID_PHI0_EBM, DCCID_PHI0_EBP, dccTowerConstituents(), EcalBarrel, m_items, subdet(), TCCID_PHI0_EBM, TCCID_PHI0_EBP, TCCMODE, and zside().

00714                                                                                {
00715 
00716   EcalSubdetector sub = subdet(tccId,TCCMODE);
00717   std::vector<DetId> items;
00718 
00719   if (sub == EcalBarrel) {
00720         int iz =  zside(tccId,TCCMODE);
00721         int dccId = tccId;
00722         if (iz > 0) dccId = dccId - TCCID_PHI0_EBP + DCCID_PHI0_EBP;
00723         else dccId = dccId - TCCID_PHI0_EBM + DCCID_PHI0_EBM;
00724         items = dccTowerConstituents(dccId,tt);
00725         return items;
00726   }
00727   else {
00728         EcalElectronicsMap_by_TccId_and_TtId::const_iterator lb,ub;
00729         boost::tuples::tie(lb,ub)=get<7>(m_items).equal_range(boost::make_tuple(int(tccId), int(tt)));
00730         while (lb != ub) {
00731                 DetId cell = lb -> cell;
00732                 items.push_back(cell);
00733                 ++ lb;
00734         }
00735         return items;
00736   }
00737 }

int EcalElectronicsMapping::zside ( int  dcctcc,
int  mode 
) const

Definition at line 849 of file EcalElectronicsMapping.cc.

References DCCMODE, Exception, MAX_DCCID_EBM, MAX_DCCID_EBP, MAX_DCCID_EEM, MAX_DCCID_EEP, MAX_TCCID_EBM, MAX_TCCID_EBP, MAX_TCCID_EEM, MAX_TCCID_EEP, MIN_DCCID_EBM, MIN_DCCID_EBP, MIN_DCCID_EEM, MIN_DCCID_EEP, MIN_TCCID_EBM, MIN_TCCID_EBP, MIN_TCCID_EEM, MIN_TCCID_EEP, and TCCMODE.

Referenced by DCCid(), dccTowerConstituents(), getDCCandSC(), getDetId(), getElectronicsId(), getTriggerElectronicsId(), getTrigTowerDetId(), iTT(), pseudoStripConstituents(), stripConstituents(), tccConstituents(), TCCid(), and ttConstituents().

00849                                                             {
00850   if (mode == DCCMODE) {
00851         if (dcctcc >= MIN_DCCID_EBM && dcctcc <= MAX_DCCID_EBM) return -1;
00852         if (dcctcc >= MIN_DCCID_EBP && dcctcc <= MAX_DCCID_EBP) return +1;
00853         if (dcctcc >= MIN_DCCID_EEM && dcctcc <= MAX_DCCID_EEM) return -1;
00854         if (dcctcc >= MIN_DCCID_EEP && dcctcc <= MAX_DCCID_EEP) return +1; 
00855   }
00856   else if (mode == TCCMODE) {
00857         if (dcctcc >= MIN_TCCID_EBM && dcctcc <= MAX_TCCID_EBM) return -1;
00858         if (dcctcc >= MIN_TCCID_EBP && dcctcc <= MAX_TCCID_EBP) return +1;
00859         if (dcctcc >= MIN_TCCID_EEM && dcctcc <= MAX_TCCID_EEM) return -1;
00860         if (dcctcc >= MIN_TCCID_EEP && dcctcc <= MAX_TCCID_EEP) return +1;
00861   }
00862   else {
00863         throw cms::Exception("InvalidDetId") << " Wrong mode in EcalElectronicsMapping::zside " << mode << ".";
00864   }
00865   return 0;
00866 }


Member Data Documentation

const int EcalElectronicsMapping::DCCID_PHI0_EBM = EcalElectronicsId::DCCID_PHI0_EBM [static]

Definition at line 149 of file EcalElectronicsMapping.h.

Referenced by DCCid(), dccTowerConstituents(), getDetId(), getElectronicsId(), GetFED(), getTriggerElectronicsId(), getTrigTowerDetId(), pseudoStripConstituents(), stripConstituents(), tccConstituents(), and ttConstituents().

const int EcalElectronicsMapping::DCCID_PHI0_EBP = EcalElectronicsId::DCCID_PHI0_EBP [static]

Definition at line 150 of file EcalElectronicsMapping.h.

Referenced by DCCid(), dccTowerConstituents(), getDetId(), getElectronicsId(), GetFED(), getTriggerElectronicsId(), getTrigTowerDetId(), pseudoStripConstituents(), stripConstituents(), tccConstituents(), and ttConstituents().

const int EcalElectronicsMapping::DCCMODE = 0 [static, private]

Definition at line 184 of file EcalElectronicsMapping.h.

Referenced by dccConstituents(), dccTowerConstituents(), getElectronicsId(), stripConstituents(), subdet(), and zside().

const int EcalElectronicsMapping::iEEEtaMinInner = 22 [static]

Definition at line 134 of file EcalElectronicsMapping.h.

Referenced by getTrigTowerDetId(), iTT(), and TCCid().

const int EcalElectronicsMapping::iEEEtaMinOuter = 18 [static]

Definition at line 133 of file EcalElectronicsMapping.h.

Referenced by getTrigTowerDetId(), and iTT().

const int EcalElectronicsMapping::kCrystalsInPhi = EBDetId::kCrystalsInPhi [static]

Definition at line 119 of file EcalElectronicsMapping.h.

Referenced by dccTowerConstituents(), getDetId(), and stripConstituents().

const int EcalElectronicsMapping::kEBTowersInEta = EcalTrigTowerDetId::kEBTowersInEta [static]

Definition at line 126 of file EcalElectronicsMapping.h.

const int EcalElectronicsMapping::kEBTowersInPhi = EcalTrigTowerDetId::kEBTowersInPhi [static]

Definition at line 124 of file EcalElectronicsMapping.h.

Referenced by DCCid(), iTT(), and TCCid().

const int EcalElectronicsMapping::kEBTowersPerSM = EcalTrigTowerDetId::kEBTowersPerSM [static]

Definition at line 125 of file EcalElectronicsMapping.h.

Referenced by dccConstituents().

const int EcalElectronicsMapping::kEETowersInEta = EcalTrigTowerDetId::kEETowersInEta [static]

Definition at line 127 of file EcalElectronicsMapping.h.

const int EcalElectronicsMapping::kEETowersInEtaPerInnerTCC = 7 [static]

Definition at line 131 of file EcalElectronicsMapping.h.

Referenced by iTT().

const int EcalElectronicsMapping::kEETowersInEtaPerOuterTCC = 4 [static]

Definition at line 132 of file EcalElectronicsMapping.h.

Referenced by iTT().

const int EcalElectronicsMapping::kEETowersInPhiPerQuadrant = EcalTrigTowerDetId::kEETowersInPhiPerQuadrant [static]

Definition at line 128 of file EcalElectronicsMapping.h.

Referenced by getTrigTowerDetId(), iTT(), and TCCid().

const int EcalElectronicsMapping::kEETowersInPhiPerTCC = 4 [static]

Definition at line 130 of file EcalElectronicsMapping.h.

Referenced by getTrigTowerDetId(), and iTT().

const int EcalElectronicsMapping::kTCCinPhi = 18 [static]

Definition at line 172 of file EcalElectronicsMapping.h.

Referenced by getTrigTowerDetId().

const int EcalElectronicsMapping::kTowersInPhi = EBDetId::kTowersInPhi [static]

Definition at line 120 of file EcalElectronicsMapping.h.

Referenced by dccTowerConstituents(), getDetId(), getTrigTowerDetId(), and stripConstituents().

std::map<int, int> EcalElectronicsMapping::LaserMonitoringMap_EB [private]

Definition at line 271 of file EcalElectronicsMapping.h.

Referenced by EcalElectronicsMapping(), and getLMNumber().

std::map<int, int> EcalElectronicsMapping::LaserMonitoringMap_EE [private]

Definition at line 272 of file EcalElectronicsMapping.h.

Referenced by EcalElectronicsMapping(), and getLMNumber().

EcalElectronicsMap EcalElectronicsMapping::m_items [private]

Definition at line 264 of file EcalElectronicsMapping.h.

Referenced by assign(), dccConstituents(), dccTowerConstituents(), getDetId(), getElectronicsId(), getTriggerElectronicsId(), pseudoStripConstituents(), stripConstituents(), tccConstituents(), and ttConstituents().

const int EcalElectronicsMapping::MAX_DCCID = EcalElectronicsId::MAX_DCCID [static]

Definition at line 138 of file EcalElectronicsMapping.h.

const int EcalElectronicsMapping::MAX_DCCID_EBM = EcalElectronicsId::MAX_DCCID_EBM [static]

Definition at line 143 of file EcalElectronicsMapping.h.

Referenced by DCCBoundary(), EcalElectronicsMapping(), GetListofFEDs(), subdet(), and zside().

const int EcalElectronicsMapping::MAX_DCCID_EBP = EcalElectronicsId::MAX_DCCID_EBP [static]

Definition at line 145 of file EcalElectronicsMapping.h.

Referenced by DCCBoundary(), EcalElectronicsMapping(), GetListofFEDs(), subdet(), and zside().

const int EcalElectronicsMapping::MAX_DCCID_EEM = EcalElectronicsId::MAX_DCCID_EEM [static]

Definition at line 141 of file EcalElectronicsMapping.h.

Referenced by DCCBoundary(), EcalElectronicsMapping(), GetListofFEDs(), and zside().

const int EcalElectronicsMapping::MAX_DCCID_EEP = EcalElectronicsId::MAX_DCCID_EEP [static]

Definition at line 147 of file EcalElectronicsMapping.h.

Referenced by DCCBoundary(), EcalElectronicsMapping(), GetListofFEDs(), and zside().

const int EcalElectronicsMapping::MAX_LM = 92 [static]

Definition at line 179 of file EcalElectronicsMapping.h.

const int EcalElectronicsMapping::MAX_TCCID = EcalTriggerElectronicsId::MAX_TCCID [static]

Definition at line 153 of file EcalElectronicsMapping.h.

Referenced by TCCBlockFormatter::DigiToRaw().

const int EcalElectronicsMapping::MAX_TCCID_EBM = EcalTriggerElectronicsId::MAX_TCCID_EBM [static]

Definition at line 158 of file EcalElectronicsMapping.h.

Referenced by subdet(), and zside().

const int EcalElectronicsMapping::MAX_TCCID_EBP = EcalTriggerElectronicsId::MAX_TCCID_EBP [static]

Definition at line 160 of file EcalElectronicsMapping.h.

Referenced by subdet(), and zside().

const int EcalElectronicsMapping::MAX_TCCID_EEM = EcalTriggerElectronicsId::MAX_TCCID_EEM [static]

Definition at line 156 of file EcalElectronicsMapping.h.

Referenced by zside().

const int EcalElectronicsMapping::MAX_TCCID_EEP = EcalTriggerElectronicsId::MAX_TCCID_EEP [static]

Definition at line 162 of file EcalElectronicsMapping.h.

Referenced by zside().

const int EcalElectronicsMapping::MIN_DCCID = EcalElectronicsId::MIN_DCCID [static]

Definition at line 139 of file EcalElectronicsMapping.h.

const int EcalElectronicsMapping::MIN_DCCID_EBM = EcalElectronicsId::MIN_DCCID_EBM [static]

Definition at line 142 of file EcalElectronicsMapping.h.

Referenced by DCCBoundary(), EcalElectronicsMapping(), GetListofFEDs(), subdet(), and zside().

const int EcalElectronicsMapping::MIN_DCCID_EBP = EcalElectronicsId::MIN_DCCID_EBP [static]

Definition at line 144 of file EcalElectronicsMapping.h.

Referenced by DCCBoundary(), EcalElectronicsMapping(), GetListofFEDs(), subdet(), and zside().

const int EcalElectronicsMapping::MIN_DCCID_EEM = EcalElectronicsId::MIN_DCCID_EEM [static]

Definition at line 140 of file EcalElectronicsMapping.h.

Referenced by DCCBoundary(), EcalElectronicsMapping(), GetFED(), GetListofFEDs(), and zside().

const int EcalElectronicsMapping::MIN_DCCID_EEP = EcalElectronicsId::MIN_DCCID_EEP [static]

Definition at line 146 of file EcalElectronicsMapping.h.

Referenced by DCCBoundary(), EcalElectronicsMapping(), GetFED(), GetListofFEDs(), and zside().

const int EcalElectronicsMapping::MIN_LM_EBM = 1 [static]

Definition at line 176 of file EcalElectronicsMapping.h.

Referenced by EcalElectronicsMapping().

const int EcalElectronicsMapping::MIN_LM_EBP = 37 [static]

Definition at line 177 of file EcalElectronicsMapping.h.

Referenced by EcalElectronicsMapping().

const int EcalElectronicsMapping::MIN_LM_EEM = 73 [static]

Definition at line 175 of file EcalElectronicsMapping.h.

Referenced by EcalElectronicsMapping().

const int EcalElectronicsMapping::MIN_LM_EEP = 83 [static]

Definition at line 178 of file EcalElectronicsMapping.h.

Referenced by EcalElectronicsMapping().

const int EcalElectronicsMapping::MIN_TCCID = EcalTriggerElectronicsId::MIN_TCCID [static]

Definition at line 154 of file EcalElectronicsMapping.h.

const int EcalElectronicsMapping::MIN_TCCID_EBM = EcalTriggerElectronicsId::MIN_TCCID_EBM [static]

Definition at line 157 of file EcalElectronicsMapping.h.

Referenced by subdet(), and zside().

const int EcalElectronicsMapping::MIN_TCCID_EBP = EcalTriggerElectronicsId::MIN_TCCID_EBP [static]

Definition at line 159 of file EcalElectronicsMapping.h.

Referenced by subdet(), and zside().

const int EcalElectronicsMapping::MIN_TCCID_EEM = EcalTriggerElectronicsId::MIN_TCCID_EEM [static]

Definition at line 155 of file EcalElectronicsMapping.h.

Referenced by zside().

const int EcalElectronicsMapping::MIN_TCCID_EEP = EcalTriggerElectronicsId::MIN_TCCID_EEP [static]

Definition at line 161 of file EcalElectronicsMapping.h.

Referenced by zside().

const int EcalElectronicsMapping::TCCID_PHI0_EBM = EcalTriggerElectronicsId::TCCID_PHI0_EBM [static]

Definition at line 164 of file EcalElectronicsMapping.h.

Referenced by getElectronicsId(), getTriggerElectronicsId(), getTrigTowerDetId(), pseudoStripConstituents(), tccConstituents(), TCCid(), and ttConstituents().

const int EcalElectronicsMapping::TCCID_PHI0_EBP = EcalTriggerElectronicsId::TCCID_PHI0_EBP [static]

Definition at line 165 of file EcalElectronicsMapping.h.

Referenced by getElectronicsId(), getTriggerElectronicsId(), getTrigTowerDetId(), pseudoStripConstituents(), tccConstituents(), TCCid(), and ttConstituents().

const int EcalElectronicsMapping::TCCID_PHI0_EEM_IN = EcalTriggerElectronicsId::TCCID_PHI0_EEM_IN [static]

Definition at line 167 of file EcalElectronicsMapping.h.

Referenced by getTrigTowerDetId(), and TCCid().

const int EcalElectronicsMapping::TCCID_PHI0_EEM_OUT = EcalTriggerElectronicsId::TCCID_PHI0_EEM_OUT [static]

Definition at line 168 of file EcalElectronicsMapping.h.

Referenced by getTrigTowerDetId(), and TCCid().

const int EcalElectronicsMapping::TCCID_PHI0_EEP_IN = EcalTriggerElectronicsId::TCCID_PHI0_EEP_IN [static]

Definition at line 169 of file EcalElectronicsMapping.h.

Referenced by getTrigTowerDetId(), and TCCid().

const int EcalElectronicsMapping::TCCID_PHI0_EEP_OUT = EcalTriggerElectronicsId::TCCID_PHI0_EEP_OUT [static]

Definition at line 170 of file EcalElectronicsMapping.h.

Referenced by getTrigTowerDetId(), and TCCid().

const int EcalElectronicsMapping::TCCMODE = 1 [static, private]

Definition at line 185 of file EcalElectronicsMapping.h.

Referenced by getTrigTowerDetId(), pseudoStripConstituents(), subdet(), tccConstituents(), ttConstituents(), and zside().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:19:30 2009 for CMSSW by  doxygen 1.5.4