CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
HOHXLogicalMapEntry Class Reference

#include <HcalMappingEntry.h>

Public Member Functions

const DetId getDetId () const
 
const HcalElectronicsId getHcalElectronicsId () const
 
const HcalFrontEndId getHcalFrontEndId () const
 
const uint32_t getLinearIndex () const
 
 HOHXLogicalMapEntry ()
 
 HOHXLogicalMapEntry (int in_fi_ch, int in_htr_fi, int in_spig, int in_fed, int in_cr, int in_htr, std::string in_s_fpga, std::string in_s_det, int in_sid, int in_et, int in_ph, int in_dep, int in_dph, int in_sec, int in_rm, int in_rm_fi, int in_pix, int in_qie, int in_adc, std::string in_s_rbx, std::string in_s_let)
 
char * printLMapLine ()
 
 ~HOHXLogicalMapEntry ()
 

Private Attributes

uint32_t hcalDetID_
 
uint32_t hcalEID_
 
uint32_t hcalFrontEndID_
 
int mydphi_
 
std::string myletter_
 
int mysector_
 

Detailed Description

Definition at line 70 of file HcalMappingEntry.h.

Constructor & Destructor Documentation

HOHXLogicalMapEntry::HOHXLogicalMapEntry ( )
inline

Definition at line 76 of file HcalMappingEntry.h.

References AlCaHLTBitMon_QueryRunRegistry::string.

76 {}
HOHXLogicalMapEntry::HOHXLogicalMapEntry ( int  in_fi_ch,
int  in_htr_fi,
int  in_spig,
int  in_fed,
int  in_cr,
int  in_htr,
std::string  in_s_fpga,
std::string  in_s_det,
int  in_sid,
int  in_et,
int  in_ph,
int  in_dep,
int  in_dph,
int  in_sec,
int  in_rm,
int  in_rm_fi,
int  in_pix,
int  in_qie,
int  in_adc,
std::string  in_s_rbx,
std::string  in_s_let 
)

Definition at line 157 of file HcalMappingEntry.cc.

References HcalOuter, HcalFrontEndId::rawId(), DetId::rawId(), HcalElectronicsId::rawId(), and HcalElectronicsId::setHTR().

177  {
178  int mytopbot;
179  (in_s_fpga == "bot") ? mytopbot = 0 : mytopbot = 1;
180 
181  mydphi_ = in_dph;
182  mysector_ = in_sec;
183  // string data members
184  myletter_ = in_s_let;
185 
186  // create the hcal electronics id
187  HcalElectronicsId heid(in_fi_ch, in_htr_fi, in_spig, in_fed - 700);
188  heid.setHTR(in_cr, in_htr, mytopbot);
189 
190  if (in_s_det == "HO") {
191  //create the hcal det id in the case of regular HO channel
192  HcalDetId hdid(HcalOuter, in_sid * in_et, in_ph, in_dep);
193  hcalDetID_ = hdid.rawId();
194  } else {
195  //create the calib det id in the case of HO cross talk channels
196  HcalCalibDetId hdid(in_sid * in_et, in_ph);
197  hcalDetID_ = hdid.rawId();
198  }
199 
200  HcalFrontEndId hrbx(in_s_rbx, in_rm, in_pix, in_rm_fi, in_fi_ch, in_qie, in_adc);
201 
202  // store the different ids
203  hcalEID_ = heid.rawId();
204  hcalFrontEndID_ = hrbx.rawId();
205 }
Readout chain identification for Hcal.
HOHXLogicalMapEntry::~HOHXLogicalMapEntry ( )
inline

Definition at line 99 of file HcalMappingEntry.h.

References HBHEHFLogicalMapEntry::printLMapLine().

99 {}

Member Function Documentation

const DetId HOHXLogicalMapEntry::getDetId ( ) const
inline

Definition at line 104 of file HcalMappingEntry.h.

References HBHEHFLogicalMapEntry::hcalDetID_.

Referenced by HcalLogicalMapGenerator::buildHOXMap().

104 { return DetId(hcalDetID_); }
Definition: DetId.h:17
const HcalElectronicsId HOHXLogicalMapEntry::getHcalElectronicsId ( ) const
inline

Definition at line 103 of file HcalMappingEntry.h.

References HBHEHFLogicalMapEntry::hcalEID_.

103 { return HcalElectronicsId(hcalEID_); }
Readout chain identification for Hcal.
const HcalFrontEndId HOHXLogicalMapEntry::getHcalFrontEndId ( ) const
inline
const uint32_t HOHXLogicalMapEntry::getLinearIndex ( ) const
inline

Definition at line 102 of file HcalMappingEntry.h.

References HBHEHFLogicalMapEntry::hcalEID_, and HcalElectronicsId::linearIndex().

Referenced by HcalLogicalMapGenerator::buildHOXMap().

constexpr int linearIndex() const
get a fast, compact, unique index for linear lookups
Readout chain identification for Hcal.
char * HOHXLogicalMapEntry::printLMapLine ( )

Definition at line 207 of file HcalMappingEntry.cc.

References HcalFrontEndId::adc(), HcalElectronicsId::dccid(), HcalDetId::depth(), HcalElectronicsId::fiberChanId(), HcalElectronicsId::fiberIndex(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, HcalElectronicsId::htrSlot(), HcalElectronicsId::htrTopBottom(), HcalCalibDetId::ieta(), HcalDetId::ietaAbs(), HcalCalibDetId::iphi(), HcalDetId::iphi(), HcalGenericDetId::isHcalCalibDetId(), HcalGenericDetId::isHcalDetId(), HcalFrontEndId::pixel(), HcalFrontEndId::qieCard(), HcalFrontEndId::rbx(), HcalElectronicsId::readoutVMECrateId(), HcalFrontEndId::rm(), HcalFrontEndId::rmFiber(), HcalElectronicsId::spigot(), HcalDetId::subdet(), HcalCalibDetId::zside(), and HcalDetId::zside().

207  {
208  static char myline[512];
209 
210  HcalElectronicsId hcaleid(hcalEID_);
211  HcalGenericDetId hcalgenid(hcalDetID_);
213 
214  int mydcc_sl = 0;
215  int mydcc = 0;
216  if ((hcaleid.dccid() % 2) == 1) {
217  mydcc_sl = 20;
218  mydcc = 2;
219  } else {
220  mydcc_sl = 10;
221  mydcc = 1;
222  }
223 
224  string myfpga = "";
225  string mydet = "";
226  int mydepth = 0;
227  int myside = -2;
228  int myeta = 0;
229  int myphi = -1;
230  if (hcalgenid.isHcalCalibDetId()) {
231  HcalCalibDetId hcalcompid(hcalDetID_);
232  mydet = "HOX";
233  mydepth = 4;
234  myside = hcalcompid.zside();
235  myeta = hcalcompid.ieta() * myside;
236  myphi = hcalcompid.iphi();
237  } else if (hcalgenid.isHcalDetId()) {
238  HcalDetId hcalcompid(hcalDetID_);
239  HcalSubdetector mysubdet = hcalcompid.subdet();
240  (mysubdet == HcalBarrel)
241  ? mydet = "HB"
242  : ((mysubdet == HcalEndcap)
243  ? mydet = "HE"
244  : ((mysubdet == HcalOuter) ? mydet = "HO"
245  : ((mysubdet == HcalForward) ? mydet = "HF" : mydet = "invalid")));
246  mydepth = hcalcompid.depth();
247  myside = hcalcompid.zside();
248  myeta = hcalcompid.ietaAbs();
249  myphi = hcalcompid.iphi();
250  }
251 
252  (hcaleid.htrTopBottom() == 0) ? myfpga = "bot" : myfpga = "top";
253 
254  sprintf(myline,
255  "%1d %6d %6d %6d %6d %6d %6s %7s %6d %6d %6d",
256  0,
257  myside,
258  myeta,
259  myphi,
260  mydphi_,
261  mydepth,
262  mydet.c_str(),
263  rbxid.rbx().c_str(),
264  mysector_,
265  rbxid.rm(),
266  rbxid.pixel());
267  sprintf(myline + strlen(myline),
268  "%6d %6d %6d %6d %8s %6d %6d %6s",
269  rbxid.qieCard(),
270  rbxid.adc(),
271  rbxid.rmFiber(),
272  hcaleid.fiberChanId(),
273  myletter_.c_str(),
274  hcaleid.readoutVMECrateId(),
275  hcaleid.htrSlot(),
276  myfpga.c_str());
277  sprintf(myline + strlen(myline),
278  "%8d %7d %6d %6d %6d\n",
279  hcaleid.fiberIndex(),
280  mydcc_sl,
281  hcaleid.spigot(),
282  mydcc,
283  hcaleid.dccid() + 700);
284 
285  return myline;
286 }
HcalSubdetector
Definition: HcalAssistant.h:31
Readout chain identification for Hcal.

Member Data Documentation

uint32_t HOHXLogicalMapEntry::hcalDetID_
private

Definition at line 109 of file HcalMappingEntry.h.

uint32_t HOHXLogicalMapEntry::hcalEID_
private

Definition at line 108 of file HcalMappingEntry.h.

uint32_t HOHXLogicalMapEntry::hcalFrontEndID_
private

Definition at line 110 of file HcalMappingEntry.h.

int HOHXLogicalMapEntry::mydphi_
private

Definition at line 113 of file HcalMappingEntry.h.

std::string HOHXLogicalMapEntry::myletter_
private

Definition at line 114 of file HcalMappingEntry.h.

int HOHXLogicalMapEntry::mysector_
private

Definition at line 113 of file HcalMappingEntry.h.