CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Static Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Member Functions | Static Private Attributes
l1t::CaloTools Class Reference

#include <CaloTools.h>

Public Types

enum  SubDet { ECAL =0x1, HCAL =0x2, CALO =0x3 }
 

Static Public Member Functions

static int bin16Eta (int ieta)
 
static int calHwEtSum (int iEta, int iPhi, const std::vector< l1t::CaloTower > &towers, int localEtaMin, int localEtaMax, int localPhiMin, int localPhiMax, SubDet etMode=CALO)
 
static int calHwEtSum (int iEta, int iPhi, const std::vector< l1t::CaloTower > &towers, int localEtaMin, int localEtaMax, int localPhiMin, int localPhiMax, int iEtaAbsMax, SubDet etMode=CALO)
 
static size_t calNrTowers (int iEtaMin, int iEtaMax, int iPhiMin, int iPhiMax, const std::vector< l1t::CaloTower > &towers, int minHwEt, int maxHwEt, SubDet etMode=CALO)
 
static int caloEta (int ietaMP)
 
static size_t caloTowerHash (int iEta, int iPhi)
 
static size_t caloTowerHashMax ()
 
static l1t::EGamma egP4Demux (l1t::EGamma &)
 
static l1t::EGamma egP4MP (l1t::EGamma &)
 
static l1t::EtSum etSumP4Demux (l1t::EtSum &)
 
static l1t::EtSum etSumP4MP (l1t::EtSum &)
 
static const l1t::CaloClustergetCluster (const std::vector< l1t::CaloCluster > &clusters, int iEta, int iPhi)
 
static const l1t::CaloTowergetTower (const std::vector< l1t::CaloTower > &towers, int iEta, int iPhi)
 
static int gtEta (int ieta)
 
static int gtPhi (int ieta, int iphi)
 
static bool insertTower (std::vector< l1t::CaloTower > &towers, const l1t::CaloTower &tower)
 
static bool isValidIEtaIPhi (int iEta, int iPhi)
 
static l1t::Jet jetP4Demux (l1t::Jet &)
 
static l1t::Jet jetP4MP (l1t::Jet &)
 
static int mpEta (int ieta)
 
static math::PtEtaPhiMLorentzVector p4Demux (l1t::L1Candidate *)
 
static math::PtEtaPhiMLorentzVector p4MP (l1t::L1Candidate *)
 
static int regionEta (int ieta)
 
static l1t::Tau tauP4Demux (l1t::Tau &)
 
static l1t::Tau tauP4MP (l1t::Tau &)
 
static float towerEta (int ieta)
 
static float towerEtaSize (int ieta)
 
static float towerPhi (int ieta, int iphi)
 
static float towerPhiSize (int ieta)
 

Static Public Attributes

static const int64_t cos_coeff [72] = {1023, 1019, 1007, 988, 961, 927, 886, 838, 784, 723, 658, 587, 512, 432, 350, 265, 178, 89, 0, -89, -178, -265, -350, -432, -512, -587, -658, -723, -784, -838, -886, -927, -961, -988, -1007, -1019, -1023, -1019, -1007, -988, -961, -927, -886, -838, -784, -723, -658, -587, -512, -432, -350, -265, -178, -89, 0, 89, 178, 265, 350, 432, 511, 587, 658, 723, 784, 838, 886, 927, 961, 988, 1007, 1019}
 
static const int kHBHEEnd =28
 
static const int kHBHENrPhi =72
 
static const int kHFBegin =29
 
static const int kHFEnd =41
 
static const int kHFNrPhi =72/kHFPhiSeg
 
static const int kHFPhiSeg =1
 
static const int kNPhi =72
 
static const int kNrHBHETowers = kHBHEEnd*kHBHENrPhi*2
 
static const int kNrTowers = ((kHFEnd-kHFBegin+1)*kHFNrPhi + kHBHEEnd*kHBHENrPhi )*2
 
static const int64_t sin_coeff [72] = {0, 89, 178, 265, 350, 432, 512, 587, 658, 723, 784, 838, 886, 927, 961, 988, 1007, 1019, 1023, 1019, 1007, 988, 961, 927, 886, 838, 784, 723, 658, 587, 512, 432, 350, 265, 178, 89, 0, -89, -178, -265, -350, -432, -512, -587, -658, -723, -784, -838, -886, -927, -961, -988, -1007, -1019, -1023, -1019, -1007, -988, -961, -927, -886, -838, -784, -723, -658, -587, -512, -432, -350, -265, -178, -89}
 

Private Member Functions

 CaloTools ()
 
 ~CaloTools ()
 

Static Private Member Functions

static std::pair< float, float > towerEtaBounds (int ieta)
 

Static Private Attributes

static const float kGTEtaLSB = 0.0435
 
static const float kGTEtLSB = 0.5
 
static const float kGTPhiLSB = 0.0435
 
static const l1t::CaloCluster nullCluster_
 
static const l1t::CaloTower nullTower_
 

Detailed Description

Description: A collection of useful functions for the Calorimeter that are of generic interest

Implementation: currently implimented as a static class rather than a namespace, open to re-writing it as namespace

Author
: Sam Harper - RAL

Definition at line 29 of file CaloTools.h.

Member Enumeration Documentation

Enumerator
ECAL 
HCAL 
CALO 

Definition at line 50 of file CaloTools.h.

50 {ECAL=0x1,HCAL=0x2,CALO=0x3}; //CALO is a short cut for ECAL|HCAL

Constructor & Destructor Documentation

l1t::CaloTools::CaloTools ( )
inlineprivate

Definition at line 33 of file CaloTools.h.

33 {}
l1t::CaloTools::~CaloTools ( )
inlineprivate

Definition at line 34 of file CaloTools.h.

34 {}

Member Function Documentation

int l1t::CaloTools::bin16Eta ( int  ieta)
static

Definition at line 239 of file CaloTools.cc.

int l1t::CaloTools::calHwEtSum ( int  iEta,
int  iPhi,
const std::vector< l1t::CaloTower > &  towers,
int  localEtaMin,
int  localEtaMax,
int  localPhiMin,
int  localPhiMax,
SubDet  etMode = CALO 
)
static

Definition at line 102 of file CaloTools.cc.

int l1t::CaloTools::calHwEtSum ( int  iEta,
int  iPhi,
const std::vector< l1t::CaloTower > &  towers,
int  localEtaMin,
int  localEtaMax,
int  localPhiMin,
int  localPhiMax,
int  iEtaAbsMax,
SubDet  etMode = CALO 
)
static

Definition at line 110 of file CaloTools.cc.

size_t l1t::CaloTools::calNrTowers ( int  iEtaMin,
int  iEtaMax,
int  iPhiMin,
int  iPhiMax,
const std::vector< l1t::CaloTower > &  towers,
int  minHwEt,
int  maxHwEt,
SubDet  etMode = CALO 
)
static

Definition at line 132 of file CaloTools.cc.

int l1t::CaloTools::caloEta ( int  ietaMP)
static
size_t l1t::CaloTools::caloTowerHash ( int  iEta,
int  iPhi 
)
static

Definition at line 66 of file CaloTools.cc.

Referenced by l1t::stage2::CaloTowerPacker::pack().

size_t l1t::CaloTools::caloTowerHashMax ( )
static

Definition at line 86 of file CaloTools.cc.

l1t::EGamma l1t::CaloTools::egP4Demux ( l1t::EGamma eg)
static

Definition at line 293 of file CaloTools.cc.

l1t::EGamma l1t::CaloTools::egP4MP ( l1t::EGamma eg)
static

Definition at line 382 of file CaloTools.cc.

l1t::EtSum l1t::CaloTools::etSumP4Demux ( l1t::EtSum etsum)
static

Definition at line 359 of file CaloTools.cc.

l1t::EtSum l1t::CaloTools::etSumP4MP ( l1t::EtSum etsum)
static

Definition at line 444 of file CaloTools.cc.

const l1t::CaloCluster & l1t::CaloTools::getCluster ( const std::vector< l1t::CaloCluster > &  clusters,
int  iEta,
int  iPhi 
)
static

Definition at line 53 of file CaloTools.cc.

const l1t::CaloTower & l1t::CaloTools::getTower ( const std::vector< l1t::CaloTower > &  towers,
int  iEta,
int  iPhi 
)
static
int l1t::CaloTools::gtEta ( int  ieta)
static
int l1t::CaloTools::gtPhi ( int  ieta,
int  iphi 
)
static
bool l1t::CaloTools::insertTower ( std::vector< l1t::CaloTower > &  towers,
const l1t::CaloTower tower 
)
static

Definition at line 19 of file CaloTools.cc.

bool l1t::CaloTools::isValidIEtaIPhi ( int  iEta,
int  iPhi 
)
static

Definition at line 92 of file CaloTools.cc.

l1t::Jet l1t::CaloTools::jetP4Demux ( l1t::Jet jet)
static

Definition at line 336 of file CaloTools.cc.

l1t::Jet l1t::CaloTools::jetP4MP ( l1t::Jet jet)
static

Definition at line 423 of file CaloTools.cc.

int l1t::CaloTools::mpEta ( int  ieta)
static
math::PtEtaPhiMLorentzVector l1t::CaloTools::p4Demux ( l1t::L1Candidate cand)
static
math::PtEtaPhiMLorentzVector l1t::CaloTools::p4MP ( l1t::L1Candidate cand)
static

Definition at line 373 of file CaloTools.cc.

int l1t::CaloTools::regionEta ( int  ieta)
static

Definition at line 213 of file CaloTools.cc.

l1t::Tau l1t::CaloTools::tauP4Demux ( l1t::Tau tau)
static

Definition at line 315 of file CaloTools.cc.

l1t::Tau l1t::CaloTools::tauP4MP ( l1t::Tau tau)
static

Definition at line 403 of file CaloTools.cc.

float l1t::CaloTools::towerEta ( int  ieta)
static

Definition at line 164 of file CaloTools.cc.

std::pair< float, float > l1t::CaloTools::towerEtaBounds ( int  ieta)
staticprivate

Definition at line 154 of file CaloTools.cc.

float l1t::CaloTools::towerEtaSize ( int  ieta)
static

Definition at line 179 of file CaloTools.cc.

float l1t::CaloTools::towerPhi ( int  ieta,
int  iphi 
)
static

Definition at line 172 of file CaloTools.cc.

float l1t::CaloTools::towerPhiSize ( int  ieta)
static

Definition at line 186 of file CaloTools.cc.

Member Data Documentation

const int64_t l1t::CaloTools::cos_coeff = {1023, 1019, 1007, 988, 961, 927, 886, 838, 784, 723, 658, 587, 512, 432, 350, 265, 178, 89, 0, -89, -178, -265, -350, -432, -512, -587, -658, -723, -784, -838, -886, -927, -961, -988, -1007, -1019, -1023, -1019, -1007, -988, -961, -927, -886, -838, -784, -723, -658, -587, -512, -432, -350, -265, -178, -89, 0, 89, 178, 265, 350, 432, 511, 587, 658, 723, 784, 838, 886, 927, 961, 988, 1007, 1019}
static
const float l1t::CaloTools::kGTEtaLSB = 0.0435
staticprivate

Definition at line 116 of file CaloTools.h.

const float l1t::CaloTools::kGTEtLSB = 0.5
staticprivate

Definition at line 118 of file CaloTools.h.

const float l1t::CaloTools::kGTPhiLSB = 0.0435
staticprivate

Definition at line 117 of file CaloTools.h.

const int l1t::CaloTools::kHBHEEnd =28
static

Definition at line 39 of file CaloTools.h.

const int l1t::CaloTools::kHBHENrPhi =72
static
const int l1t::CaloTools::kHFBegin =29
static
const int l1t::CaloTools::kHFEnd =41
static
const int l1t::CaloTools::kHFNrPhi =72/kHFPhiSeg
static

Definition at line 43 of file CaloTools.h.

const int l1t::CaloTools::kHFPhiSeg =1
static

Definition at line 42 of file CaloTools.h.

const int l1t::CaloTools::kNPhi =72
static

Definition at line 45 of file CaloTools.h.

const int l1t::CaloTools::kNrHBHETowers = kHBHEEnd*kHBHENrPhi*2
static

Definition at line 47 of file CaloTools.h.

const int l1t::CaloTools::kNrTowers = ((kHFEnd-kHFBegin+1)*kHFNrPhi + kHBHEEnd*kHBHENrPhi )*2
static

Definition at line 46 of file CaloTools.h.

const l1t::CaloCluster l1t::CaloTools::nullCluster_
staticprivate

Definition at line 114 of file CaloTools.h.

const l1t::CaloTower l1t::CaloTools::nullTower_
staticprivate

Definition at line 113 of file CaloTools.h.

const int64_t l1t::CaloTools::sin_coeff = {0, 89, 178, 265, 350, 432, 512, 587, 658, 723, 784, 838, 886, 927, 961, 988, 1007, 1019, 1023, 1019, 1007, 988, 961, 927, 886, 838, 784, 723, 658, 587, 512, 432, 350, 265, 178, 89, 0, -89, -178, -265, -350, -432, -512, -587, -658, -723, -784, -838, -886, -927, -961, -988, -1007, -1019, -1023, -1019, -1007, -988, -961, -927, -886, -838, -784, -723, -658, -587, -512, -432, -350, -265, -178, -89}
static