CMS 3D CMS Logo

PFLayer Class Reference

layer definition for PFRecHit and PFCluster More...

#include <DataFormats/ParticleFlowReco/interface/PFLayer.h>

List of all members.

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,
  HCAL_HF = 11
}
 layer definition More...

Public Member Functions

 PFLayer ()
 constructor
virtual ~PFLayer ()=0
 destructor

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.

Todo:
A new layer definition has been provided in reco::CaloID. translation functions have been added between reco::CaloID and PFLayer, but PFLayer should eventually be phased out completely
Author:
Colin Bernet
Date:
July 2006

Definition at line 21 of file PFLayer.h.


Member Enumeration Documentation

enum PFLayer::Layer

layer definition

Enumerator:
PS2 
PS1 
ECAL_ENDCAP 
ECAL_BARREL 
NONE 
HCAL_BARREL1 
HCAL_BARREL2 
HCAL_ENDCAP 
HCAL_HF 

Definition at line 31 of file PFLayer.h.

00031              {PS2          = -12, 
00032               PS1          = -11,
00033               ECAL_ENDCAP  = -2,
00034               ECAL_BARREL  = -1,
00035               NONE         = 0,
00036               HCAL_BARREL1 = 1,
00037               HCAL_BARREL2 = 2,
00038               HCAL_ENDCAP  = 3,
00039               HCAL_HF      = 11 };


Constructor & Destructor Documentation

PFLayer::PFLayer (  ) 

constructor

virtual PFLayer::~PFLayer (  )  [pure virtual]

destructor


Member Function Documentation

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

Definition at line 25 of file PFLayer.cc.

References ECAL_BARREL, ECAL_ENDCAP, HCAL_BARREL1, HCAL_BARREL2, HCAL_ENDCAP, HCAL_HF, NONE, PS1, and PS2.

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

00025                                                     {
00026 
00027   //  cout<<"PFLayer::fromCaloID "<<id<<" "<<id.detector()<<endl;
00028   if( !id.isSingleDetector() ) {
00029     assert(0); 
00030   }
00031 
00032   switch( id.detector() ) {
00033   case CaloID::DET_ECAL_BARREL   : return  ECAL_BARREL;  
00034   case CaloID::DET_ECAL_ENDCAP   : return  ECAL_ENDCAP; 
00035   case CaloID::DET_PS1           : return  PS1;
00036   case CaloID::DET_PS2           : return  PS2;
00037   case CaloID::DET_HCAL_BARREL   : return  HCAL_BARREL1;
00038   case CaloID::DET_HCAL_ENDCAP   : return  HCAL_ENDCAP;
00039   case CaloID::DET_HF            : return  HCAL_HF;
00040   case CaloID::DET_HO            : return  HCAL_BARREL2; 
00041   default                        : return  NONE;
00042   }
00043 }

CaloID PFLayer::toCaloID ( Layer  layer  )  [static]

Definition at line 9 of file PFLayer.cc.

References ECAL_BARREL, ECAL_ENDCAP, HCAL_BARREL1, HCAL_BARREL2, HCAL_ENDCAP, HCAL_HF, PS1, and PS2.

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

00009                                       {
00010   
00011   switch(layer) {
00012   case PS2           : return  CaloID(CaloID::DET_PS2);      
00013   case PS1           : return  CaloID(CaloID::DET_PS1); 
00014   case ECAL_ENDCAP   : return  CaloID(CaloID::DET_ECAL_ENDCAP); 
00015   case ECAL_BARREL   : return  CaloID(CaloID::DET_ECAL_BARREL);  
00016   case HCAL_BARREL1  : return  CaloID(CaloID::DET_HCAL_BARREL); 
00017   case HCAL_BARREL2  : return  CaloID(CaloID::DET_HO); 
00018   case HCAL_ENDCAP   : return  CaloID(CaloID::DET_HCAL_ENDCAP); 
00019   case HCAL_HF       : return  CaloID(CaloID::DET_HF); 
00020   default            : return  CaloID();
00021   }
00022 }


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