CMS 3D CMS Logo

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

#include <L1GtEtaPhiConversions.h>

Public Member Functions

void convert (const L1CaloGeometry *, const L1MuTriggerScales *, const int, const int)
 perform all conversions More...
 
 L1GtEtaPhiConversions ()
 constructor More...
 
virtual void print (std::ostream &myCout) const
 print all the performed conversions More...
 
virtual ~L1GtEtaPhiConversions ()
 destructor More...
 

Private Attributes

std::vector< unsigned int > m_lutEtaCenCaloCommon
 eta conversion of calorimeter object to a common scale More...
 
std::vector< unsigned int > m_lutPhiMuCalo
 phi conversion for Mu to Calo More...
 

Detailed Description

Description: convert eta and phi between various L1 trigger objects.

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

$Date$ $Revision$

Definition at line 41 of file L1GtEtaPhiConversions.h.

Constructor & Destructor Documentation

L1GtEtaPhiConversions::L1GtEtaPhiConversions ( )

constructor

Definition at line 38 of file L1GtEtaPhiConversions.cc.

38  {
39 
40  // do nothing
41 
42 }
L1GtEtaPhiConversions::~L1GtEtaPhiConversions ( )
virtual

destructor

Definition at line 45 of file L1GtEtaPhiConversions.cc.

45  {
46 
47  // do nothing
48 
49 }

Member Function Documentation

void L1GtEtaPhiConversions::convert ( const L1CaloGeometry l1CaloGeometry,
const L1MuTriggerScales l1MuTriggerScales,
const int  ifCaloEtaNumberBits,
const int  ifMuEtaNumberBits 
)

perform all conversions

Definition at line 54 of file L1GtEtaPhiConversions.cc.

References L1CaloGeometry::emJetPhiBinHighEdge(), L1CaloGeometry::emJetPhiBinLowEdge(), L1MuScale::getHighEdge(), L1MuScale::getLowEdge(), L1MuTriggerScales::getPhiScale(), edm::isDebugEnabled(), LogTrace, m_lutEtaCenCaloCommon, m_lutPhiMuCalo, L1CaloGeometry::numberGctCentralEtaBinsPerHalf(), L1CaloGeometry::numberGctEmJetPhiBins(), L1CaloGeometry::numberGctForwardEtaBinsPerHalf(), and L1MuScale::print().

Referenced by L1GlobalTriggerGTL::run().

56  {
57 
58  // no bullet-proof method, depends on binning...
59 
60  //
61  // convert phi scale for muon (finer) to phi scale for calo (coarser)
62  //
63 
64  unsigned int nrMuPhiBins = 144; // FIXME ask Ivan for size() ...
65  //unsigned int nrMuPhiBins = l1MuTriggerScales->getPhiScale()->size();
66 
67  unsigned int nrGctEmJetPhiBins = l1CaloGeometry->numberGctEmJetPhiBins();
68 
69  if (edm::isDebugEnabled() ) {
70 
71  LogTrace("L1GtEtaPhiConversions") << "\n nrGctEmJetPhiBins = "
72  << nrGctEmJetPhiBins << "\n" << std::endl;
73 
74  for (unsigned int iCalo = 0; iCalo < nrGctEmJetPhiBins; ++iCalo) {
75  double phiCaloLowEdge =
76  l1CaloGeometry->emJetPhiBinLowEdge(iCalo);
77  double phiCaloHighEdge =
78  l1CaloGeometry->emJetPhiBinHighEdge(iCalo);
79 
80  LogTrace("L1GtEtaPhiConversions") << "Bin " << iCalo
81  << "\t phiCaloLowEdge = " << phiCaloLowEdge
82  << "\t phiCaloHighEdge = " << phiCaloHighEdge
83  << std::endl;
84 
85  }
86 
87  LogTrace("L1GtEtaPhiConversions") << "\n nrMuPhiBins = "
88  << nrMuPhiBins << "\n" << std::endl;
89 
90  for (unsigned int iBin = 0; iBin < nrMuPhiBins; ++iBin) {
91  double phiMuLowEdge = l1MuTriggerScales->getPhiScale()->getLowEdge(iBin);
92  double phiMuHighEdge = l1MuTriggerScales->getPhiScale()->getHighEdge(iBin);
93 
94  LogTrace("L1GtEtaPhiConversions") << "Bin " << iBin
95  << "\t phiMuLowEdge = " << phiMuLowEdge
96  << "\t phiMuHighEdge = " << phiMuHighEdge << std::endl;
97 
98  }
99 
100  LogTrace("L1GtEtaPhiConversions") << "\n"
101  << l1MuTriggerScales->getPhiScale()->print() << "\n" << std::endl;
102 
103  }
104 
105  //
106  m_lutPhiMuCalo.clear();
107  m_lutPhiMuCalo.resize(nrMuPhiBins);
108 
109  for (unsigned int phiMuInd = 0; phiMuInd < nrMuPhiBins; ++phiMuInd) {
110 
111  double phiMuLowEdge = l1MuTriggerScales->getPhiScale()->getLowEdge(phiMuInd);
112  double phiMuHighEdge = l1MuTriggerScales->getPhiScale()->getHighEdge(phiMuInd);
113 
114  for (unsigned int iCalo = nrGctEmJetPhiBins; iCalo <= nrGctEmJetPhiBins; --iCalo) {
115 
116  double phiCaloLowEdge = l1CaloGeometry->emJetPhiBinLowEdge(iCalo);
117  double phiCaloHighEdge = l1CaloGeometry->emJetPhiBinHighEdge(iCalo);
118 
119  if (phiMuLowEdge >= phiCaloLowEdge) {
120  m_lutPhiMuCalo[phiMuInd] = iCalo%nrGctEmJetPhiBins;
121 
122  LogTrace("L1GtEtaPhiConversions")
123  << " phiMuLowEdge[" << phiMuInd << "] = " << phiMuLowEdge
124  << " phiMuHighEdge[" << phiMuInd << "] = " << phiMuHighEdge
125  << "\n phiCaloLowEdge[" << iCalo << "] = " << phiCaloLowEdge
126  << " phiCaloHighEdge[" << iCalo << "] = " << phiCaloHighEdge
127  << std::endl;
128 
129  break;
130  }
131  }
132 
133  }
134 
135  if (edm::isDebugEnabled() ) {
136  LogTrace("L1GtEtaPhiConversions") << std::endl;
137  for (unsigned int iBin = 0; iBin < m_lutPhiMuCalo.size(); ++iBin) {
138  LogTrace("L1GtEtaPhiConversions") << "Mu phiIndex = " << iBin
139  << " converted to index " << m_lutPhiMuCalo[iBin]
140  << std::endl;
141 
142  }
143  LogTrace("L1GtEtaPhiConversions") << std::endl;
144  }
145 
146  //
147  // convert calo eta scale for CenJet/TauJet & IsoEG/NoIsoEG to a common
148  // central / forward eta scale
149  //
150 
151  unsigned int nrGctCentralEtaBinsPerHalf =
152  l1CaloGeometry->numberGctCentralEtaBinsPerHalf();
153 
154  unsigned int nrGctForwardEtaBinsPerHalf =
155  l1CaloGeometry->numberGctForwardEtaBinsPerHalf();
156 
157  unsigned int nrGctTotalEtaBinsPerHalf = nrGctCentralEtaBinsPerHalf
158  + nrGctForwardEtaBinsPerHalf;
159 
160 
161  m_lutEtaCenCaloCommon.clear();
162  m_lutEtaCenCaloCommon.resize(nrGctTotalEtaBinsPerHalf);
163 
164  for (unsigned int cenInd = 0; cenInd < nrGctCentralEtaBinsPerHalf; ++cenInd) {
165 
166  // FIXME
167 
168  }
169 
170  if (edm::isDebugEnabled() ) {
171  LogTrace("L1GtEtaPhiConversions") << std::endl;
172  LogTrace("L1GtEtaPhiConversions") << std::endl;
173  }
174 
175 
176 }
bool isDebugEnabled()
unsigned int numberGctForwardEtaBinsPerHalf() const
virtual float getLowEdge(unsigned packed) const =0
get the low edge of bin represented by packed
std::vector< unsigned int > m_lutEtaCenCaloCommon
eta conversion of calorimeter object to a common scale
unsigned int numberGctEmJetPhiBins() const
unsigned int numberGctCentralEtaBinsPerHalf() const
virtual float getHighEdge(unsigned packed) const =0
get the upper edge of bin represented by packed
const L1MuScale * getPhiScale() const
get the phi scale
#define LogTrace(id)
double emJetPhiBinLowEdge(unsigned int phiIndex) const
virtual std::string print() const =0
std::vector< unsigned int > m_lutPhiMuCalo
phi conversion for Mu to Calo
double emJetPhiBinHighEdge(unsigned int phiIndex) const
void L1GtEtaPhiConversions::print ( std::ostream &  myCout) const
virtual

print all the performed conversions

Definition at line 179 of file L1GtEtaPhiConversions.cc.

179  {
180 
181  myCout << "\n L1GtEtaPhiConversions print...\n" << std::endl;
182  // FIXME
183 
184 }

Member Data Documentation

std::vector<unsigned int> L1GtEtaPhiConversions::m_lutEtaCenCaloCommon
private

eta conversion of calorimeter object to a common scale

Definition at line 67 of file L1GtEtaPhiConversions.h.

Referenced by convert().

std::vector<unsigned int> L1GtEtaPhiConversions::m_lutPhiMuCalo
private

phi conversion for Mu to Calo

Definition at line 64 of file L1GtEtaPhiConversions.h.

Referenced by convert().