Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:20:46

0001 #ifndef __l1microgmtisolationunit_h
0002 #define __l1microgmtisolationunit_h
0003 
0004 #include "MicroGMTConfiguration.h"
0005 #include "MicroGMTExtrapolationLUT.h"
0006 #include "MicroGMTRelativeIsolationCheckLUT.h"
0007 #include "MicroGMTAbsoluteIsolationCheckLUT.h"
0008 #include "MicroGMTCaloIndexSelectionLUT.h"
0009 
0010 #include "L1Trigger/L1TMuon/interface/L1TMuonGlobalParamsHelper.h"
0011 #include "L1Trigger/L1TMuon/interface/MicroGMTLUTFactories.h"
0012 
0013 namespace l1t {
0014   class MicroGMTIsolationUnit {
0015   public:
0016     MicroGMTIsolationUnit();
0017     virtual ~MicroGMTIsolationUnit();
0018 
0019     /// Initialisation from ES record
0020     void initialise(L1TMuonGlobalParamsHelper*);
0021     // returns the index corresponding to the calo tower sum using the LUT
0022     int getCaloIndex(MicroGMTConfiguration::InterMuon&) const;
0023     // copies the energy values to the m_towerEnergies map for consistent access
0024     void setTowerSums(const MicroGMTConfiguration::CaloInputCollection& inputs, int bx);
0025     // First step done for calo input preparation, calculates strip sums
0026     void calculate5by1Sums(const MicroGMTConfiguration::CaloInputCollection&, int bx);
0027     // Second step, only done for the sums needed for final iso requirement
0028     int calculate5by5Sum(unsigned index) const;
0029 
0030     // Checks with LUT isolation for all muons in list, assuming input calo is non-summed
0031     void isolate(MicroGMTConfiguration::InterMuonList&) const;
0032     // Checks with LUT isolation for all muons in list, assuming input calo is pre-summed
0033     void isolatePreSummed(MicroGMTConfiguration::InterMuonList& muons) const;
0034     // Uses *Extrapolation LUTs to project trajectory to the vertex and adds info to muon
0035     void extrapolateMuons(MicroGMTConfiguration::InterMuonList&) const;
0036 
0037   private:
0038     int m_fwVersion;
0039 
0040     std::shared_ptr<MicroGMTExtrapolationLUT> m_BEtaExtrapolation;
0041     std::shared_ptr<MicroGMTExtrapolationLUT> m_BPhiExtrapolation;
0042     std::shared_ptr<MicroGMTExtrapolationLUT> m_OEtaExtrapolation;
0043     std::shared_ptr<MicroGMTExtrapolationLUT> m_OPhiExtrapolation;
0044     std::shared_ptr<MicroGMTExtrapolationLUT> m_FEtaExtrapolation;
0045     std::shared_ptr<MicroGMTExtrapolationLUT> m_FPhiExtrapolation;
0046 
0047     std::map<tftype, std::shared_ptr<MicroGMTExtrapolationLUT>> m_phiExtrapolationLUTs;
0048     std::map<tftype, std::shared_ptr<MicroGMTExtrapolationLUT>> m_etaExtrapolationLUTs;
0049 
0050     std::shared_ptr<MicroGMTCaloIndexSelectionLUT> m_IdxSelMemEta;
0051     std::shared_ptr<MicroGMTCaloIndexSelectionLUT> m_IdxSelMemPhi;
0052 
0053     std::shared_ptr<MicroGMTRelativeIsolationCheckLUT> m_RelIsoCheckMem;
0054     std::shared_ptr<MicroGMTAbsoluteIsolationCheckLUT> m_AbsIsoCheckMem;
0055 
0056     std::bitset<28> m_caloInputsToDisable;
0057     std::bitset<28> m_maskedCaloInputs;
0058 
0059     std::vector<int> m_5by1TowerSums;
0060     std::map<int, int> m_towerEnergies;
0061     bool m_initialSums;
0062   };
0063 }  // namespace l1t
0064 
0065 #endif /* defined(__l1microgmtisolationunit_h) */