CMS 3D CMS Logo

L1GtEtaPhiConversions Class Reference

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

#include <L1Trigger/GlobalTrigger/interface/L1GtEtaPhiConversions.h>

List of all members.

Public Member Functions

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

Private Attributes

std::vector< unsigned intm_lutEtaCenCaloCommon
 eta conversion of calorimeter object to a common scale
std::vector< unsigned intm_lutPhiMuCalo
 phi conversion for Mu to Calo


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.

00038                                              {
00039 
00040     // do nothing
00041 
00042 }

L1GtEtaPhiConversions::~L1GtEtaPhiConversions (  )  [virtual]

destructor

Definition at line 45 of file L1GtEtaPhiConversions.cc.

00045                                               {
00046 
00047     // do nothing
00048 
00049 }


Member Function Documentation

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

perform all conversions

Definition at line 54 of file L1GtEtaPhiConversions.cc.

References L1CaloGeometry::emJetPhiBinHighEdge(), L1CaloGeometry::emJetPhiBinLowEdge(), lat::endl(), 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().

00056                                                                     {
00057     
00058     // no bullet-proof method, depends on binning... 
00059     
00060     //
00061     // convert phi scale for muon (finer) to phi scale for calo (coarser)
00062     //
00063     
00064     unsigned int nrMuPhiBins = 144; // FIXME ask Ivan for size() ... 
00065     //unsigned int nrMuPhiBins = l1MuTriggerScales->getPhiScale()->size();
00066 
00067     unsigned int nrGctEmJetPhiBins = l1CaloGeometry->numberGctEmJetPhiBins();
00068     
00069     if (edm::isDebugEnabled() ) {
00070         
00071         LogTrace("L1GtEtaPhiConversions") << "\n nrGctEmJetPhiBins = "
00072                 << nrGctEmJetPhiBins << "\n" << std::endl;
00073 
00074         for (unsigned int iCalo = 0; iCalo < nrGctEmJetPhiBins; ++iCalo) {
00075             double phiCaloLowEdge =
00076                     l1CaloGeometry->emJetPhiBinLowEdge(iCalo);
00077             double phiCaloHighEdge =
00078                     l1CaloGeometry->emJetPhiBinHighEdge(iCalo);
00079 
00080             LogTrace("L1GtEtaPhiConversions") << "Bin " << iCalo
00081                     << "\t phiCaloLowEdge = " << phiCaloLowEdge
00082                     << "\t phiCaloHighEdge = " << phiCaloHighEdge
00083                     << std::endl;
00084 
00085         }
00086 
00087         LogTrace("L1GtEtaPhiConversions") << "\n nrMuPhiBins = "
00088                 << nrMuPhiBins << "\n" << std::endl;
00089 
00090         for (unsigned int iBin = 0; iBin < nrMuPhiBins; ++iBin) {
00091             double phiMuLowEdge = l1MuTriggerScales->getPhiScale()->getLowEdge(iBin);
00092             double phiMuHighEdge = l1MuTriggerScales->getPhiScale()->getHighEdge(iBin);
00093 
00094             LogTrace("L1GtEtaPhiConversions") << "Bin " << iBin
00095                     << "\t phiMuLowEdge = " << phiMuLowEdge
00096                     << "\t phiMuHighEdge = " << phiMuHighEdge << std::endl;
00097 
00098         }
00099 
00100         LogTrace("L1GtEtaPhiConversions") << "\n"
00101                 << l1MuTriggerScales->getPhiScale()->print() << "\n" << std::endl;
00102 
00103     }
00104     
00105     // 
00106     m_lutPhiMuCalo.clear(); 
00107     m_lutPhiMuCalo.resize(nrMuPhiBins); 
00108     
00109     for (unsigned int phiMuInd = 0; phiMuInd < nrMuPhiBins; ++phiMuInd) {
00110         
00111         double phiMuLowEdge = l1MuTriggerScales->getPhiScale()->getLowEdge(phiMuInd);
00112         double phiMuHighEdge = l1MuTriggerScales->getPhiScale()->getHighEdge(phiMuInd);
00113 
00114         for (unsigned int iCalo = nrGctEmJetPhiBins; iCalo >= 0; --iCalo) {
00115             
00116             double phiCaloLowEdge = l1CaloGeometry->emJetPhiBinLowEdge(iCalo);
00117             double phiCaloHighEdge = l1CaloGeometry->emJetPhiBinHighEdge(iCalo);
00118             
00119             if (phiMuLowEdge >= phiCaloLowEdge) {
00120                 m_lutPhiMuCalo[phiMuInd] = iCalo%nrGctEmJetPhiBins;
00121                                     
00122                 LogTrace("L1GtEtaPhiConversions") 
00123                         << " phiMuLowEdge[" << phiMuInd << "] = " << phiMuLowEdge                            
00124                         << " phiMuHighEdge[" << phiMuInd << "] = " << phiMuHighEdge                            
00125                         << "\n phiCaloLowEdge[" << iCalo << "] = " << phiCaloLowEdge
00126                         << " phiCaloHighEdge[" << iCalo << "] = " << phiCaloHighEdge
00127                         << std::endl;
00128 
00129                 break;                    
00130             }                     
00131         }
00132         
00133     }
00134         
00135     if (edm::isDebugEnabled() ) {
00136         LogTrace("L1GtEtaPhiConversions") << std::endl;
00137         for (unsigned int iBin = 0; iBin < m_lutPhiMuCalo.size(); ++iBin) {
00138             LogTrace("L1GtEtaPhiConversions") << "Mu phiIndex = " << iBin
00139                     << " converted to index " << m_lutPhiMuCalo[iBin]
00140                     << std::endl;
00141 
00142         }
00143         LogTrace("L1GtEtaPhiConversions") << std::endl;
00144     }
00145     
00146     //
00147     // convert calo eta scale for CenJet/TauJet & IsoEG/NoIsoEG to a common 
00148     // central / forward eta scale
00149     //
00150     
00151     unsigned int nrGctCentralEtaBinsPerHalf = 
00152         l1CaloGeometry->numberGctCentralEtaBinsPerHalf();
00153 
00154     unsigned int nrGctForwardEtaBinsPerHalf =
00155             l1CaloGeometry->numberGctForwardEtaBinsPerHalf();
00156     
00157     unsigned int nrGctTotalEtaBinsPerHalf = nrGctCentralEtaBinsPerHalf
00158             + nrGctForwardEtaBinsPerHalf;
00159     
00160 
00161     m_lutEtaCenCaloCommon.clear(); 
00162     m_lutEtaCenCaloCommon.resize(nrGctTotalEtaBinsPerHalf); 
00163     
00164     for (unsigned int cenInd = 0; cenInd < nrGctCentralEtaBinsPerHalf; ++cenInd) {
00165         
00166         // FIXME 
00167         
00168     }
00169         
00170     if (edm::isDebugEnabled() ) {
00171         LogTrace("L1GtEtaPhiConversions") << std::endl;
00172         LogTrace("L1GtEtaPhiConversions") << std::endl;
00173     }
00174 
00175 
00176 }

void L1GtEtaPhiConversions::print ( std::ostream &  myCout  )  const [virtual]

print all the performed conversions

Definition at line 179 of file L1GtEtaPhiConversions.cc.

References lat::endl().

00179                                                           {
00180 
00181     myCout << "\n  L1GtEtaPhiConversions print...\n" << std::endl;
00182     // FIXME
00183 
00184 }


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().


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