CMS 3D CMS Logo

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

#include <HFNoseNumberingScheme.h>

Public Member Functions

uint32_t getUnitID (int layer, int module, int cell, int iz, const G4ThreeVector &pos, double &wt)
 assigns the det id to a hit More...
 
 HFNoseNumberingScheme (const HGCalDDDConstants &hgc)
 
 ~HFNoseNumberingScheme ()
 

Private Member Functions

 HFNoseNumberingScheme ()=delete
 

Private Attributes

const HGCalDDDConstantshgcons_
 
const HGCalGeometryMode::GeometryMode mode_
 

Detailed Description

Definition at line 14 of file HFNoseNumberingScheme.h.

Constructor & Destructor Documentation

HFNoseNumberingScheme::HFNoseNumberingScheme ( const HGCalDDDConstants hgc)

Definition at line 11 of file HFNoseNumberingScheme.cc.

11  : hgcons_(hgc), mode_(hgc.geomMode()) {
12 #ifdef EDM_ML_DEBUG
13  edm::LogVerbatim("HGCSim") << "Creating HFNoseNumberingScheme";
14 #endif
15 }
HGCalGeometryMode::GeometryMode geomMode() const
const HGCalGeometryMode::GeometryMode mode_
const HGCalDDDConstants & hgcons_
HFNoseNumberingScheme::~HFNoseNumberingScheme ( )
inline

Definition at line 17 of file HFNoseNumberingScheme.h.

References getUnitID(), and HFNoseNumberingScheme().

17 {}
HFNoseNumberingScheme::HFNoseNumberingScheme ( )
privatedelete

Referenced by ~HFNoseNumberingScheme().

Member Function Documentation

uint32_t HFNoseNumberingScheme::getUnitID ( int  layer,
int  module,
int  cell,
int  iz,
const G4ThreeVector &  pos,
double &  wt 
)

assigns the det id to a hit

Definition at line 17 of file HFNoseNumberingScheme.cc.

References TauDecayModes::dec, HGCalGeometryMode::Hexagon8Full, hgcons_, mode_, DetId::rawId(), HGCalDDDConstants::waferFromPosition(), and geometryCSVtoXML::xx.

Referenced by ~HFNoseNumberingScheme().

18  {
19  // module is the copy number of the wafer as placed in the layer
20  uint32_t index(0);
21  wt = 1.0;
22  int cellU(0), cellV(0), waferType(-1), waferU(0), waferV(0);
23  if (cell >= 0) {
24  waferType = module / 1000000;
25  waferU = module % 100;
26  if ((module / 10000) % 10 > 0)
27  waferU = -waferU;
28  waferV = (module / 100) % 100;
29  if ((module / 100000) % 10 > 0)
30  waferV = -waferV;
31  cellU = cell % 100;
32  cellV = (cell / 100) % 100;
33  } else if (mode_ == HGCalGeometryMode::Hexagon8Full) {
34  double xx = (pos.z() > 0) ? pos.x() : -pos.x();
35  hgcons_.waferFromPosition(xx, pos.y(), layer, waferU, waferV, cellU, cellV, waferType, wt);
36  }
37  if (waferType >= 0) {
38  index = HFNoseDetId(iz, waferType, layer, waferU, waferV, cellU, cellV).rawId();
39 #ifdef EDM_ML_DEBUG
40  edm::LogVerbatim("HFNSim") << "OK WaferType " << waferType << " Wafer " << waferU << ":" << waferV << " Cell "
41  << cellU << ":" << cellV;
42  } else {
43  edm::LogVerbatim("HFNSim") << "Bad WaferType " << waferType;
44 #endif
45  }
46 #ifdef EDM_ML_DEBUG
47  edm::LogVerbatim("HFNSim") << "HFNoseNumberingScheme::i/p " << layer << ":" << module << ":" << cell << ":" << iz
48  << ":" << pos.x() << ":" << pos.y() << ":" << pos.z() << " ID " << std::hex << index
49  << std::dec << " wt " << wt;
50 #endif
51  return index;
52 }
void waferFromPosition(const double x, const double y, int &wafer, int &icell, int &celltyp) const
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
const HGCalGeometryMode::GeometryMode mode_
const HGCalDDDConstants & hgcons_
Definition: vlib.h:208

Member Data Documentation

const HGCalDDDConstants& HFNoseNumberingScheme::hgcons_
private

Definition at line 26 of file HFNoseNumberingScheme.h.

Referenced by getUnitID().

const HGCalGeometryMode::GeometryMode HFNoseNumberingScheme::mode_
private

Definition at line 27 of file HFNoseNumberingScheme.h.

Referenced by getUnitID().