CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions
HFNoseDetIdToModule Class Reference

#include <HFNoseDetIdToModule.h>

Public Member Functions

std::vector< HFNoseDetIdgetDetIds (HFNoseDetId const &id) const
 
std::vector< HFNoseTriggerDetIdgetTriggerDetIds (HFNoseDetId const &id) const
 
 HFNoseDetIdToModule ()
 

Static Public Member Functions

static const HFNoseDetId getModule (HFNoseDetId const &id)
 
static const HFNoseDetId getModule (HFNoseTriggerDetId const &id)
 

Detailed Description

Definition at line 8 of file HFNoseDetIdToModule.h.

Constructor & Destructor Documentation

HFNoseDetIdToModule::HFNoseDetIdToModule ( )

This translated TriggerDetId to Module and viceversa for HFNose

Definition at line 3 of file HFNoseDetIdToModule.cc.

3 {}

Member Function Documentation

std::vector< HFNoseDetId > HFNoseDetIdToModule::getDetIds ( HFNoseDetId const &  id) const

Definition at line 5 of file HFNoseDetIdToModule.cc.

References HFNoseDetId::HFNoseCoarseN, HFNoseDetId::HFNoseFineN, photons_cff::ids, findQualityFiles::v, and ecaldqm::zside().

Referenced by getModule().

5  {
6  std::vector<HFNoseDetId> ids;
7  int nCells = (id.type() == 0) ? HFNoseDetId::HFNoseFineN : HFNoseDetId::HFNoseCoarseN;
8  for (int u = 0; u < 2 * nCells; ++u) {
9  for (int v = 0; v < 2 * nCells; ++v) {
10  if (((v - u) < nCells) && (u - v) <= nCells) {
11  HFNoseDetId newId(id.zside(), id.type(), id.layer(), id.waferU(), id.waferV(), u, v);
12  ids.emplace_back(newId);
13  }
14  }
15  }
16  return ids;
17 }
type
Definition: HCALResponse.h:21
static const int HFNoseCoarseN
Definition: HFNoseDetId.h:26
int zside(DetId const &)
static const int HFNoseFineN
Definition: HFNoseDetId.h:25
static const HFNoseDetId HFNoseDetIdToModule::getModule ( HFNoseDetId const &  id)
inlinestatic

Definition at line 13 of file HFNoseDetIdToModule.h.

References HFNoseDetId::moduleId().

13 { return id.moduleId(); }
static const HFNoseDetId HFNoseDetIdToModule::getModule ( HFNoseTriggerDetId const &  id)
inlinestatic

Definition at line 14 of file HFNoseDetIdToModule.h.

References getDetIds(), getTriggerDetIds(), and HFNoseDetId::moduleId().

14 { return id.moduleId(); }
std::vector< HFNoseTriggerDetId > HFNoseDetIdToModule::getTriggerDetIds ( HFNoseDetId const &  id) const

Definition at line 19 of file HFNoseDetIdToModule.cc.

References HFNoseDetId::HFNoseFineN, HFNoseDetId::HFNoseFineTrigger, HFNoseTrigger, photons_cff::ids, findQualityFiles::v, and ecaldqm::zside().

Referenced by getModule().

19  {
20  std::vector<HFNoseTriggerDetId> ids;
22  for (int u = 0; u < 2 * nCells; ++u) {
23  for (int v = 0; v < 2 * nCells; ++v) {
24  if (((v - u) < nCells) && (u - v) <= nCells) {
25  HFNoseTriggerDetId newId(HFNoseTrigger, id.zside(), id.type(), id.layer(), id.waferU(), id.waferV(), u, v);
26  ids.emplace_back(newId);
27  }
28  }
29  }
30  return ids;
31 }
type
Definition: HCALResponse.h:21
int zside(DetId const &)
static const int HFNoseFineN
Definition: HFNoseDetId.h:25
static const int HFNoseFineTrigger
Definition: HFNoseDetId.h:27