Skip to content

Commit

Permalink
Merge pull request #30325 from cms-l1t-offline/pr111X-L1TCalo-Phase2-…
Browse files Browse the repository at this point in the history
…clean

New Package - Phase2 L1CaloTrigger
  • Loading branch information
cmsbuild committed Jun 29, 2020
2 parents 9010c72 + 1c3c7f6 commit 9c9e72f
Show file tree
Hide file tree
Showing 14 changed files with 1,901 additions and 0 deletions.
7 changes: 7 additions & 0 deletions L1Trigger/L1CaloTrigger/BuildFile.xml
@@ -0,0 +1,7 @@
<use name="DataFormats/Math"/>
<use name="FWCore/ParameterSet"/>
<use name="clhep"/>

<export>
<lib name="1"/>
</export>
25 changes: 25 additions & 0 deletions L1Trigger/L1CaloTrigger/interface/L1EGammaEECalibrator.h
@@ -0,0 +1,25 @@
#ifndef L1Trigger_L1CaloTrigger_L1EGammaEECalibrator_h
#define L1Trigger_L1CaloTrigger_L1EGammaEECalibrator_h

#include "FWCore/Framework/interface/Frameworkfwd.h"
#include <vector>
#include <set>
#include <cmath>

class L1EGammaEECalibrator {
public:
explicit L1EGammaEECalibrator(const edm::ParameterSet&);

float calibrationFactor(const float& pt, const float& eta) const;

private:
int etaBin(float eta) const { return bin(eta_bins, std::abs(eta)); }
int ptBin(float pt) const { return bin(pt_bins, pt); }
int bin(const std::set<float>& container, float value) const;

std::set<float> eta_bins;
std::set<float> pt_bins;
std::vector<float> calib_factors;
};

#endif
26 changes: 26 additions & 0 deletions L1Trigger/L1CaloTrigger/interface/ParametricCalibration.h
@@ -0,0 +1,26 @@
#ifndef L1Trigger_L1CaloTrigger_ParametricCalibration_h
#define L1Trigger_L1CaloTrigger_ParametricCalibration_h
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Utilities/interface/Exception.h"
#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
#include <vector>
#include <cmath>
#include <iostream>

namespace l1tp2 {
class ParametricCalibration {
public:
ParametricCalibration() {}
ParametricCalibration(const edm::ParameterSet& cpset);
static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);

float operator()(const float pt, const float abseta) const;

protected:
std::vector<float> etas, pts, scales;
};

}; // namespace l1tp2

#endif
32 changes: 32 additions & 0 deletions L1Trigger/L1CaloTrigger/plugins/BuildFile.xml
@@ -0,0 +1,32 @@
<use name="FWCore/Framework"/>
<use name="FWCore/ServiceRegistry"/>
<use name="SimDataFormats/CaloHit"/>
<use name="SimDataFormats/Track"/>
<use name="SimDataFormats/CaloTest"/>
<use name="Geometry/Records"/>
<use name="Geometry/CaloGeometry"/>
<use name="Geometry/HcalTowerAlgo"/>
<use name="Geometry/EcalAlgo"/>
<use name="Geometry/CaloTopology"/>
<use name="Geometry/CommonDetUnit"/>
<use name="DataFormats/EcalRecHit"/>
<use name="DataFormats/L1Trigger"/>
<use name="DataFormats/HcalDetId"/>
<use name="DataFormats/HcalRecHit"/>
<use name="DataFormats/EcalDigi"/>
<use name="DataFormats/HcalDigi"/>
<use name="DataFormats/Phase2L1CaloTrig"/>
<use name="SimCalorimetry/EcalEBTrigPrimProducers"/>
<use name="RecoLocalCalo/Configuration"/>
<use name="FastSimulation/CaloGeometryTools"/>
<use name="CalibFormats/CaloTPG"/>
<use name="L1Trigger/L1CaloTrigger"/>
<use name="DataFormats/L1THGCal"/>
<use name="L1Trigger/L1TCalorimeter"/>
<use name="FWCore/PluginManager"/>
<use name="FWCore/ParameterSet"/>
<use name="DataFormats/JetReco"/>
<use name="PhysicsTools/UtilAlgos"/>
<use name="root"/>
<use name="boost"/>
<flags EDM_PLUGIN="1"/>

0 comments on commit 9c9e72f

Please sign in to comment.