Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 ///
0002 /// Description: Firmware headers
0003 ///
0004 /// Implementation:
0005 ///    Concrete firmware implementations
0006 ///
0007 /// \author: Jim Brooke - University of Bristol
0008 /// Modified: Adam Elwood - ICL
0009 
0010 //
0011 //
0012 
0013 #ifndef Stage2Layer2JetAlgorithmFirmware_H
0014 #define Stage2Layer2JetAlgorithmFirmware_H
0015 
0016 #include "L1Trigger/L1TCalorimeter/interface/Stage2Layer2JetAlgorithm.h"
0017 #include "L1Trigger/L1TCalorimeter/interface/CaloParamsHelper.h"
0018 
0019 namespace l1t {
0020 
0021   // Imp1 is for v1 and v2
0022   class Stage2Layer2JetAlgorithmFirmwareImp1 : public Stage2Layer2JetAlgorithm {
0023   public:
0024     Stage2Layer2JetAlgorithmFirmwareImp1(CaloParamsHelper const* params);
0025     ~Stage2Layer2JetAlgorithmFirmwareImp1() override = default;
0026     void processEvent(const std::vector<CaloTower>& towers, std::vector<Jet>& jets, std::vector<Jet>& alljets) override;
0027 
0028     void create(const std::vector<CaloTower>& towers,
0029                 std::vector<Jet>& jets,
0030                 std::vector<Jet>& alljets,
0031                 std::string PUSubMethod);
0032 
0033     void accuSort(std::vector<Jet>& jets);
0034 
0035     void calibrate(std::vector<Jet>& jets, int calibThreshold, bool isAllJets);
0036 
0037     double calibFit(double, double*);
0038     double calibFitErr(double, double*);
0039 
0040     int donutPUEstimate(int jetEta, int jetPhi, int size, const std::vector<l1t::CaloTower>& towers);
0041 
0042     std::vector<int> getChunkyRing(Jet& jet,
0043                                    int pos,
0044                                    const std::vector<l1t::CaloTower>& towers,
0045                                    const std::string chunkyString);
0046 
0047     int chunkyDonutPUEstimate(Jet& jet, int pos, const std::vector<l1t::CaloTower>& towers);
0048 
0049     //Adding chunky sandwich, chunkydonut variant using only phiflaps. Useful for simple handiling of calorimeter hardware ieta strips, and in high pu environment like PbPb
0050     int chunkySandwichPUEstimate(Jet& jet,
0051                                  int pos,
0052                                  const std::vector<l1t::CaloTower>& towers,
0053                                  const std::string chunkySandwichStr);
0054     std::map<int, int> getSumEtEtaMap(const std::vector<l1t::CaloTower>& towers);
0055 
0056   private:
0057     CaloParamsHelper const* const params_;
0058   };
0059 
0060 }  // namespace l1t
0061 
0062 #endif