CMS 3D CMS Logo

Public Member Functions | Private Attributes

L1GtEtaPhiConversions Class Reference

#include <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 int > m_lutEtaCenCaloCommon
 eta conversion of calorimeter object to a common scale
std::vector< unsigned int > m_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.

                                             {

    // do nothing

}
L1GtEtaPhiConversions::~L1GtEtaPhiConversions ( ) [virtual]

destructor

Definition at line 45 of file L1GtEtaPhiConversions.cc.

                                              {

    // do nothing

}

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

                                                                    {
    
    // no bullet-proof method, depends on binning... 
    
    //
    // convert phi scale for muon (finer) to phi scale for calo (coarser)
    //
    
    unsigned int nrMuPhiBins = 144; // FIXME ask Ivan for size() ... 
    //unsigned int nrMuPhiBins = l1MuTriggerScales->getPhiScale()->size();

    unsigned int nrGctEmJetPhiBins = l1CaloGeometry->numberGctEmJetPhiBins();
    
    if (edm::isDebugEnabled() ) {
        
        LogTrace("L1GtEtaPhiConversions") << "\n nrGctEmJetPhiBins = "
                << nrGctEmJetPhiBins << "\n" << std::endl;

        for (unsigned int iCalo = 0; iCalo < nrGctEmJetPhiBins; ++iCalo) {
            double phiCaloLowEdge =
                    l1CaloGeometry->emJetPhiBinLowEdge(iCalo);
            double phiCaloHighEdge =
                    l1CaloGeometry->emJetPhiBinHighEdge(iCalo);

            LogTrace("L1GtEtaPhiConversions") << "Bin " << iCalo
                    << "\t phiCaloLowEdge = " << phiCaloLowEdge
                    << "\t phiCaloHighEdge = " << phiCaloHighEdge
                    << std::endl;

        }

        LogTrace("L1GtEtaPhiConversions") << "\n nrMuPhiBins = "
                << nrMuPhiBins << "\n" << std::endl;

        for (unsigned int iBin = 0; iBin < nrMuPhiBins; ++iBin) {
            double phiMuLowEdge = l1MuTriggerScales->getPhiScale()->getLowEdge(iBin);
            double phiMuHighEdge = l1MuTriggerScales->getPhiScale()->getHighEdge(iBin);

            LogTrace("L1GtEtaPhiConversions") << "Bin " << iBin
                    << "\t phiMuLowEdge = " << phiMuLowEdge
                    << "\t phiMuHighEdge = " << phiMuHighEdge << std::endl;

        }

        LogTrace("L1GtEtaPhiConversions") << "\n"
                << l1MuTriggerScales->getPhiScale()->print() << "\n" << std::endl;

    }
    
    // 
    m_lutPhiMuCalo.clear(); 
    m_lutPhiMuCalo.resize(nrMuPhiBins); 
    
    for (unsigned int phiMuInd = 0; phiMuInd < nrMuPhiBins; ++phiMuInd) {
        
        double phiMuLowEdge = l1MuTriggerScales->getPhiScale()->getLowEdge(phiMuInd);
        double phiMuHighEdge = l1MuTriggerScales->getPhiScale()->getHighEdge(phiMuInd);

        for (unsigned int iCalo = nrGctEmJetPhiBins; iCalo <= nrGctEmJetPhiBins; --iCalo) {
            
            double phiCaloLowEdge = l1CaloGeometry->emJetPhiBinLowEdge(iCalo);
            double phiCaloHighEdge = l1CaloGeometry->emJetPhiBinHighEdge(iCalo);
            
            if (phiMuLowEdge >= phiCaloLowEdge) {
                m_lutPhiMuCalo[phiMuInd] = iCalo%nrGctEmJetPhiBins;
                                    
                LogTrace("L1GtEtaPhiConversions") 
                        << " phiMuLowEdge[" << phiMuInd << "] = " << phiMuLowEdge                            
                        << " phiMuHighEdge[" << phiMuInd << "] = " << phiMuHighEdge                            
                        << "\n phiCaloLowEdge[" << iCalo << "] = " << phiCaloLowEdge
                        << " phiCaloHighEdge[" << iCalo << "] = " << phiCaloHighEdge
                        << std::endl;

                break;                    
            }                     
        }
        
    }
        
    if (edm::isDebugEnabled() ) {
        LogTrace("L1GtEtaPhiConversions") << std::endl;
        for (unsigned int iBin = 0; iBin < m_lutPhiMuCalo.size(); ++iBin) {
            LogTrace("L1GtEtaPhiConversions") << "Mu phiIndex = " << iBin
                    << " converted to index " << m_lutPhiMuCalo[iBin]
                    << std::endl;

        }
        LogTrace("L1GtEtaPhiConversions") << std::endl;
    }
    
    //
    // convert calo eta scale for CenJet/TauJet & IsoEG/NoIsoEG to a common 
    // central / forward eta scale
    //
    
    unsigned int nrGctCentralEtaBinsPerHalf = 
        l1CaloGeometry->numberGctCentralEtaBinsPerHalf();

    unsigned int nrGctForwardEtaBinsPerHalf =
            l1CaloGeometry->numberGctForwardEtaBinsPerHalf();
    
    unsigned int nrGctTotalEtaBinsPerHalf = nrGctCentralEtaBinsPerHalf
            + nrGctForwardEtaBinsPerHalf;
    

    m_lutEtaCenCaloCommon.clear(); 
    m_lutEtaCenCaloCommon.resize(nrGctTotalEtaBinsPerHalf); 
    
    for (unsigned int cenInd = 0; cenInd < nrGctCentralEtaBinsPerHalf; ++cenInd) {
        
        // FIXME 
        
    }
        
    if (edm::isDebugEnabled() ) {
        LogTrace("L1GtEtaPhiConversions") << std::endl;
        LogTrace("L1GtEtaPhiConversions") << std::endl;
    }


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

print all the performed conversions

Definition at line 179 of file L1GtEtaPhiConversions.cc.

                                                          {

    myCout << "\n  L1GtEtaPhiConversions print...\n" << std::endl;
    // FIXME

}

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