CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions
PFLayer Class Reference

layer definition for PFRecHit and PFCluster More...

#include <PFLayer.h>

Public Types

enum  Layer {
  PS2 = -12, PS1 = -11, ECAL_ENDCAP = -2, ECAL_BARREL = -1,
  NONE = 0, HCAL_BARREL1 = 1, HCAL_BARREL2 = 2, HCAL_ENDCAP = 3,
  HF_EM = 11, HF_HAD = 12, HGCAL = 13
}
 layer definition More...
 

Public Member Functions

 PFLayer ()
 constructor More...
 
 ~PFLayer ()
 destructor More...
 

Static Public Member Functions

static Layer fromCaloID (const reco::CaloID &id)
 
static reco::CaloID toCaloID (Layer layer)
 

Detailed Description

layer definition for PFRecHit and PFCluster

These definitions are intended for internal use in the particle flow packages.

Author
Colin Bernet
Date
July 2006

Definition at line 20 of file PFLayer.h.

Member Enumeration Documentation

◆ Layer

layer definition

Enumerator
PS2 
PS1 
ECAL_ENDCAP 
ECAL_BARREL 
NONE 
HCAL_BARREL1 
HCAL_BARREL2 
HCAL_ENDCAP 
HF_EM 
HF_HAD 
HGCAL 

Definition at line 29 of file PFLayer.h.

29  {
30  PS2 = -12,
31  PS1 = -11,
32  ECAL_ENDCAP = -2,
33  ECAL_BARREL = -1,
34  NONE = 0,
35  HCAL_BARREL1 = 1,
36  HCAL_BARREL2 = 2,
37  HCAL_ENDCAP = 3,
38  HF_EM = 11,
39  HF_HAD = 12,
40  HGCAL = 13 // HGCal, could be EM or HAD
41  };

Constructor & Destructor Documentation

◆ PFLayer()

PFLayer::PFLayer ( )
inline

constructor

Definition at line 23 of file PFLayer.h.

23 {}

◆ ~PFLayer()

PFLayer::~PFLayer ( )
inline

destructor

Definition at line 26 of file PFLayer.h.

26 {}

Member Function Documentation

◆ fromCaloID()

PFLayer::Layer PFLayer::fromCaloID ( const reco::CaloID id)
static

Definition at line 38 of file PFLayer.cc.

38  {
39  // cout<<"PFLayer::fromCaloID "<<id<<" "<<id.detector()<<endl;
40  if (!id.isSingleDetector()) {
41  edm::LogError("PFLayer") << "cannot convert " << id
42  << " to a layer, as this CaloID does not correspond to a single detector";
43  }
44 
45  switch (id.detector()) {
46  case CaloID::DET_ECAL_BARREL:
47  return ECAL_BARREL;
48  case CaloID::DET_ECAL_ENDCAP:
49  return ECAL_ENDCAP;
50  case CaloID::DET_PS1:
51  return PS1;
52  case CaloID::DET_PS2:
53  return PS2;
54  case CaloID::DET_HCAL_BARREL:
55  return HCAL_BARREL1;
56  case CaloID::DET_HCAL_ENDCAP:
57  return HCAL_ENDCAP;
58  case CaloID::DET_HF_EM:
59  return HF_EM;
60  case CaloID::DET_HF_HAD:
61  return HF_HAD;
62  case CaloID::DET_HO:
63  return HCAL_BARREL2;
64  case CaloID::DET_HGCAL_ENDCAP:
65  return HGCAL;
66  default:
67  return NONE;
68  }
69 }

References reco::CaloID::DET_ECAL_BARREL, reco::CaloID::DET_ECAL_ENDCAP, reco::CaloID::DET_HCAL_BARREL, reco::CaloID::DET_HCAL_ENDCAP, reco::CaloID::DET_HF_EM, reco::CaloID::DET_HF_HAD, reco::CaloID::DET_HGCAL_ENDCAP, reco::CaloID::DET_HO, reco::CaloID::DET_PS1, reco::CaloID::DET_PS2, hgcalTestNeighbor_cfi::detector, and NONE.

Referenced by reco::PFCluster::layer().

◆ toCaloID()

CaloID PFLayer::toCaloID ( Layer  layer)
static

Definition at line 11 of file PFLayer.cc.

11  {
12  switch (layer) {
13  case PS2:
14  return CaloID(CaloID::DET_PS2);
15  case PS1:
16  return CaloID(CaloID::DET_PS1);
17  case ECAL_ENDCAP:
18  return CaloID(CaloID::DET_ECAL_ENDCAP);
19  case ECAL_BARREL:
20  return CaloID(CaloID::DET_ECAL_BARREL);
21  case HCAL_BARREL1:
22  return CaloID(CaloID::DET_HCAL_BARREL);
23  case HCAL_BARREL2:
24  return CaloID(CaloID::DET_HO);
25  case HCAL_ENDCAP:
26  return CaloID(CaloID::DET_HCAL_ENDCAP);
27  case HF_EM:
28  return CaloID(CaloID::DET_HF_EM);
29  case HF_HAD:
30  return CaloID(CaloID::DET_HF_HAD);
31  case HGCAL:
32  return CaloID(CaloID::DET_HGCAL_ENDCAP);
33  default:
34  return CaloID();
35  }
36 }

References reco::CaloID::DET_ECAL_BARREL, reco::CaloID::DET_ECAL_ENDCAP, reco::CaloID::DET_HCAL_BARREL, reco::CaloID::DET_HCAL_ENDCAP, reco::CaloID::DET_HF_EM, reco::CaloID::DET_HF_HAD, reco::CaloID::DET_HGCAL_ENDCAP, reco::CaloID::DET_HO, reco::CaloID::DET_PS1, and reco::CaloID::DET_PS2.

Referenced by reco::PFCluster::setLayer().

PFLayer::HCAL_ENDCAP
Definition: PFLayer.h:37
PFLayer::ECAL_BARREL
Definition: PFLayer.h:33
PFLayer::PS1
Definition: PFLayer.h:31
PFLayer::HCAL_BARREL2
Definition: PFLayer.h:36
PFLayer::HF_EM
Definition: PFLayer.h:38
PFLayer::HCAL_BARREL1
Definition: PFLayer.h:35
PFLayer::HGCAL
Definition: PFLayer.h:40
PFLayer::NONE
Definition: PFLayer.h:34
PFLayer::HF_HAD
Definition: PFLayer.h:39
edm::LogError
Definition: MessageLogger.h:183
reco::CaloID
Definition: CaloID.h:17
hgcalTestNeighbor_cfi.detector
detector
Definition: hgcalTestNeighbor_cfi.py:6
PFLayer::ECAL_ENDCAP
Definition: PFLayer.h:32
PFLayer::PS2
Definition: PFLayer.h:30