CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
L1TCaloParamsESProducer Class Reference
Inheritance diagram for L1TCaloParamsESProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Types

typedef std::shared_ptr< CaloParamsReturnType
 
- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair< DataKey, edm::propagate_const< std::shared_ptr< DataProxy > > > > KeyedProxies
 
typedef std::vector< EventSetupRecordKeyKeys
 
typedef std::map< EventSetupRecordKey, KeyedProxiesRecordProxies
 

Public Member Functions

 L1TCaloParamsESProducer (const edm::ParameterSet &)
 
ReturnType produce (const L1TCaloParamsRcd &)
 
 ~L1TCaloParamsESProducer () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ~ESProducer ()(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval) override
 overrides DataProxyProvider method More...
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
 DataProxyProvider ()
 
const ComponentDescriptiondescription () const
 
bool isUsingRecord (const EventSetupRecordKey &) const
 
const KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey) const
 
void resetProxies (const EventSetupRecordKey &iRecordType)
 
void resetProxiesIfTransient (const EventSetupRecordKey &iRecordType)
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 

Private Attributes

std::string m_label
 
CaloParams m_params
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::ESProducer
 ESProducer (const ESProducer &)=delete
 
ESProducer const & operator= (const ESProducer &)=delete
 
template<typename T >
void setWhatProduced (T *iThis, const es::Label &iLabel=es::Label())
 
template<typename T >
void setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
void setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
void setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel=es::Label())
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList) override
 override DataProxyProvider method More...
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
void eraseAll (const EventSetupRecordKey &iRecordKey)
 deletes all the Proxies in aStream More...
 
void invalidateProxies (const EventSetupRecordKey &iRecordKey)
 
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &)
 

Detailed Description

Description: Produces configuration parameters for the fictitious Yellow trigger.

Implementation: Dummy producer for L1 calo upgrade configuration parameters

Author
: Jim Brooke, University of Bristol

Definition at line 44 of file L1TCaloParamsESProducer.cc.

Member Typedef Documentation

Definition at line 49 of file L1TCaloParamsESProducer.cc.

Constructor & Destructor Documentation

L1TCaloParamsESProducer::L1TCaloParamsESProducer ( const edm::ParameterSet conf)

Definition at line 69 of file L1TCaloParamsESProducer.cc.

References edm::ParameterSet::existsAs(), edm::FileInPath::fullPath(), edm::ParameterSet::getParameter(), mps_fire::i, l1t::CaloParamsHelper::setCentralityLUT(), l1t::CaloParamsHelper::setCentralityRegionMask(), l1t::CaloParamsHelper::setEgBypassECALFG(), l1t::CaloParamsHelper::setEgBypassEGVetos(), l1t::CaloParamsHelper::setEgBypassExtHOverE(), l1t::CaloParamsHelper::setEgBypassHoE(), l1t::CaloParamsHelper::setEgBypassShape(), l1t::CaloParamsHelper::setEgCalibrationLUT(), l1t::CaloParamsHelper::setEgCalibrationType(), l1t::CaloParamsHelper::setEgCalibrationVersion(), l1t::CaloParamsHelper::setEgCompressShapesLUT(), l1t::CaloParamsHelper::setEgEtaCut(), l1t::CaloParamsHelper::setEgHcalThreshold(), l1t::CaloParamsHelper::setEgHOverEcutBarrel(), l1t::CaloParamsHelper::setEgHOverEcutEndcap(), l1t::CaloParamsHelper::setEgIsoAreaNrTowersEta(), l1t::CaloParamsHelper::setEgIsoAreaNrTowersPhi(), l1t::CaloParamsHelper::setEgIsolationLUT(), l1t::CaloParamsHelper::setEgIsolationLUT2(), l1t::CaloParamsHelper::setEgIsolationType(), l1t::CaloParamsHelper::setEgIsoVetoNrTowersPhi(), l1t::CaloParamsHelper::setEgLsb(), l1t::CaloParamsHelper::setEgMaxHcalEt(), l1t::CaloParamsHelper::setEgMaxHOverELUT(), l1t::CaloParamsHelper::setEgMaxPtHOverE(), l1t::CaloParamsHelper::setEgMaxPtHOverEIsolation(), l1t::CaloParamsHelper::setEgMaxPtJetIsolation(), l1t::CaloParamsHelper::setEgMinPtHOverEIsolation(), l1t::CaloParamsHelper::setEgMinPtJetIsolation(), l1t::CaloParamsHelper::setEgNeighbourThreshold(), l1t::CaloParamsHelper::setEgPUSParams(), l1t::CaloParamsHelper::setEgPUSType(), l1t::CaloParamsHelper::setEgSeedThreshold(), l1t::CaloParamsHelper::setEgShapeIdLUT(), l1t::CaloParamsHelper::setEgShapeIdType(), l1t::CaloParamsHelper::setEgShapeIdVersion(), l1t::CaloParamsHelper::setEgTrimmingLUT(), l1t::CaloParamsHelper::setEtSumBypassEcalSumPUS(), l1t::CaloParamsHelper::setEtSumBypassEttPUS(), l1t::CaloParamsHelper::setEtSumBypassMetPUS(), l1t::CaloParamsHelper::setEtSumCentLower(), l1t::CaloParamsHelper::setEtSumCentUpper(), l1t::CaloParamsHelper::setEtSumEcalSumCalibrationLUT(), l1t::CaloParamsHelper::setEtSumEcalSumCalibrationType(), l1t::CaloParamsHelper::setEtSumEcalSumPUSLUT(), l1t::CaloParamsHelper::setEtSumEcalSumPUSType(), l1t::CaloParamsHelper::setEtSumEtaMax(), l1t::CaloParamsHelper::setEtSumEtaMin(), l1t::CaloParamsHelper::setEtSumEttCalibrationLUT(), l1t::CaloParamsHelper::setEtSumEttCalibrationType(), l1t::CaloParamsHelper::setEtSumEtThreshold(), l1t::CaloParamsHelper::setEtSumEttPUSLUT(), l1t::CaloParamsHelper::setEtSumEttPUSType(), l1t::CaloParamsHelper::setEtSumLsb(), l1t::CaloParamsHelper::setEtSumMetPUSLUT(), l1t::CaloParamsHelper::setEtSumMetPUSType(), l1t::CaloParamsHelper::setIsoTauEtaMax(), l1t::CaloParamsHelper::setIsoTauEtaMin(), l1t::CaloParamsHelper::setJetBypassPUS(), l1t::CaloParamsHelper::setJetCalibrationLUT(), l1t::CaloParamsHelper::setJetCalibrationParams(), l1t::CaloParamsHelper::setJetCalibrationType(), l1t::CaloParamsHelper::setJetCompressEtaLUT(), l1t::CaloParamsHelper::setJetCompressPtLUT(), l1t::CaloParamsHelper::setJetLsb(), l1t::CaloParamsHelper::setJetNeighbourThreshold(), l1t::CaloParamsHelper::setJetPUSType(), l1t::CaloParamsHelper::setJetPUSUsePhiRing(), l1t::CaloParamsHelper::setJetRegionMask(), l1t::CaloParamsHelper::setJetSeedThreshold(), l1t::CaloParamsHelper::setLayer1ECalScaleETBins(), l1t::CaloParamsHelper::setLayer1ECalScaleFactors(), l1t::CaloParamsHelper::setLayer1ECalScalePhiBins(), l1t::CaloParamsHelper::setLayer1HCalScaleETBins(), l1t::CaloParamsHelper::setLayer1HCalScaleFactors(), l1t::CaloParamsHelper::setLayer1HCalScalePhiBins(), l1t::CaloParamsHelper::setLayer1HFScaleETBins(), l1t::CaloParamsHelper::setLayer1HFScaleFactors(), l1t::CaloParamsHelper::setLayer1HFScalePhiBins(), l1t::CaloParamsHelper::setLayer1SecondStageLUT(), l1t::CaloParamsHelper::setMetCalibrationLUT(), l1t::CaloParamsHelper::setMetCalibrationType(), l1t::CaloParamsHelper::setMetHFCalibrationLUT(), l1t::CaloParamsHelper::setMetHFCalibrationType(), l1t::CaloParamsHelper::setMetHFPhiCalibrationLUT(), l1t::CaloParamsHelper::setMetPhiCalibrationLUT(), l1t::CaloParamsHelper::setMinimumBiasThresholds(), l1t::CaloParamsHelper::setQ2LUT(), l1t::CaloParamsHelper::setRegionLsb(), l1t::CaloParamsHelper::setRegionPUSParams(), l1t::CaloParamsHelper::setRegionPUSType(), l1t::CaloParamsHelper::setTauCalibrationLUT(), l1t::CaloParamsHelper::setTauCompressLUT(), l1t::CaloParamsHelper::setTauEtToHFRingEtLUT(), l1t::CaloParamsHelper::setTauIsoAreaNrTowersEta(), l1t::CaloParamsHelper::setTauIsoAreaNrTowersPhi(), l1t::CaloParamsHelper::setTauIsolationLUT(), l1t::CaloParamsHelper::setTauIsolationLUT2(), l1t::CaloParamsHelper::setTauIsoVetoNrTowersPhi(), l1t::CaloParamsHelper::setTauLsb(), l1t::CaloParamsHelper::setTauMaxJetIsolationA(), l1t::CaloParamsHelper::setTauMaxJetIsolationB(), l1t::CaloParamsHelper::setTauMaxPtTauVeto(), l1t::CaloParamsHelper::setTauMinPtJetIsolationB(), l1t::CaloParamsHelper::setTauNeighbourThreshold(), l1t::CaloParamsHelper::setTauPUSParams(), l1t::CaloParamsHelper::setTauPUSType(), l1t::CaloParamsHelper::setTauRegionMask(), l1t::CaloParamsHelper::setTauSeedThreshold(), l1t::CaloParamsHelper::setTauTrimmingShapeVetoLUT(), l1t::CaloParamsHelper::setTowerEncoding(), l1t::CaloParamsHelper::setTowerLsbE(), l1t::CaloParamsHelper::setTowerLsbH(), l1t::CaloParamsHelper::setTowerLsbSum(), l1t::CaloParamsHelper::setTowerNBitsE(), l1t::CaloParamsHelper::setTowerNBitsH(), l1t::CaloParamsHelper::setTowerNBitsRatio(), l1t::CaloParamsHelper::setTowerNBitsSum(), and AlCaHLTBitMon_QueryRunRegistry::string.

70 {
71 
72  //the following line is needed to tell the framework what
73  // data is being produced
74  setWhatProduced(this);
75  //setWhatProduced(this, conf.getParameter<std::string>("label"));
76 
77  CaloParamsHelper m_params_helper;
78 
79  // towers
80  m_params_helper.setTowerLsbH(conf.getParameter<double>("towerLsbH"));
81  m_params_helper.setTowerLsbE(conf.getParameter<double>("towerLsbE"));
82  m_params_helper.setTowerLsbSum(conf.getParameter<double>("towerLsbSum"));
83  m_params_helper.setTowerNBitsH(conf.getParameter<int>("towerNBitsH"));
84  m_params_helper.setTowerNBitsE(conf.getParameter<int>("towerNBitsE"));
85  m_params_helper.setTowerNBitsSum(conf.getParameter<int>("towerNBitsSum"));
86  m_params_helper.setTowerNBitsRatio(conf.getParameter<int>("towerNBitsRatio"));
87  m_params_helper.setTowerEncoding(conf.getParameter<bool>("towerEncoding"));
88 
89  // regions
90  m_params_helper.setRegionLsb(conf.getParameter<double>("regionLsb"));
91  m_params_helper.setRegionPUSType(conf.getParameter<std::string>("regionPUSType"));
92  m_params_helper.setRegionPUSParams(conf.getParameter<std::vector<double> >("regionPUSParams"));
93 
94  // EG
95  m_params_helper.setEgEtaCut(conf.getParameter<int>("egEtaCut"));
96 
97  m_params_helper.setEgLsb(conf.getParameter<double>("egLsb"));
98  m_params_helper.setEgSeedThreshold(conf.getParameter<double>("egSeedThreshold"));
99  m_params_helper.setEgNeighbourThreshold(conf.getParameter<double>("egNeighbourThreshold"));
100  m_params_helper.setEgHcalThreshold(conf.getParameter<double>("egHcalThreshold"));
101 
102  edm::FileInPath egTrimmingLUTFile = conf.getParameter<edm::FileInPath>("egTrimmingLUTFile");
103  std::ifstream egTrimmingLUTStream(egTrimmingLUTFile.fullPath());
104  auto egTrimmingLUT = std::make_shared<LUT>(egTrimmingLUTStream);
105  m_params_helper.setEgTrimmingLUT(*egTrimmingLUT);
106 
107  m_params_helper.setEgMaxHcalEt(conf.getParameter<double>("egMaxHcalEt"));
108  m_params_helper.setEgMaxPtHOverE(conf.getParameter<double>("egMaxPtHOverE"));
109  m_params_helper.setEgHOverEcutBarrel(conf.getParameter<int>("egHOverEcutBarrel"));
110  m_params_helper.setEgHOverEcutEndcap(conf.getParameter<int>("egHOverEcutEndcap"));
111  m_params_helper.setEgMinPtJetIsolation(conf.getParameter<int>("egMinPtJetIsolation"));
112  m_params_helper.setEgMaxPtJetIsolation(conf.getParameter<int>("egMaxPtJetIsolation"));
113  m_params_helper.setEgMinPtHOverEIsolation(conf.getParameter<int>("egMinPtHOverEIsolation"));
114  m_params_helper.setEgMaxPtHOverEIsolation(conf.getParameter<int>("egMaxPtHOverEIsolation"));
115  m_params_helper.setEgBypassEGVetos(conf.getParameter<unsigned>("egBypassEGVetos"));
116  m_params_helper.setEgBypassExtHOverE(conf.getParameter<unsigned>("egBypassExtHOverE"));
117  m_params_helper.setEgBypassShape(conf.getParameter<unsigned>("egBypassShape"));
118  m_params_helper.setEgBypassECALFG(conf.getParameter<unsigned>("egBypassECALFG"));
119  m_params_helper.setEgBypassHoE(conf.getParameter<unsigned>("egBypassHoE"));
120 
121  edm::FileInPath egMaxHOverELUTFile = conf.getParameter<edm::FileInPath>("egMaxHOverELUTFile");
122  std::ifstream egMaxHOverELUTStream(egMaxHOverELUTFile.fullPath());
123  auto egMaxHOverELUT = std::make_shared<LUT>(egMaxHOverELUTStream);
124  m_params_helper.setEgMaxHOverELUT(*egMaxHOverELUT);
125 
126  edm::FileInPath egCompressShapesLUTFile = conf.getParameter<edm::FileInPath>("egCompressShapesLUTFile");
127  std::ifstream egCompressShapesLUTStream(egCompressShapesLUTFile.fullPath());
128  auto egCompressShapesLUT = std::make_shared<LUT>(egCompressShapesLUTStream);
129  m_params_helper.setEgCompressShapesLUT(*egCompressShapesLUT);
130 
131  m_params_helper.setEgShapeIdType(conf.getParameter<std::string>("egShapeIdType"));
132  m_params_helper.setEgShapeIdVersion(conf.getParameter<unsigned>("egShapeIdVersion"));
133  edm::FileInPath egShapeIdLUTFile = conf.getParameter<edm::FileInPath>("egShapeIdLUTFile");
134  std::ifstream egShapeIdLUTStream(egShapeIdLUTFile.fullPath());
135  auto egShapeIdLUT = std::make_shared<LUT>(egShapeIdLUTStream);
136  m_params_helper.setEgShapeIdLUT(*egShapeIdLUT);
137 
138  m_params_helper.setEgPUSType(conf.getParameter<std::string>("egPUSType"));
139 
140  m_params_helper.setEgIsolationType(conf.getParameter<std::string>("egIsolationType"));
141  edm::FileInPath egIsoLUTFile = conf.getParameter<edm::FileInPath>("egIsoLUTFile");
142  std::ifstream egIsoLUTStream(egIsoLUTFile.fullPath());
143  auto egIsoLUT = std::make_shared<LUT>(egIsoLUTStream);
144  m_params_helper.setEgIsolationLUT(*egIsoLUT);
145  edm::FileInPath egIsoLUTFile2 = conf.getParameter<edm::FileInPath>("egIsoLUTFile2");
146  std::ifstream egIsoLUTStream2(egIsoLUTFile2.fullPath());
147  auto egIsoLUT2 = std::make_shared<LUT>(egIsoLUTStream2);
148  m_params_helper.setEgIsolationLUT2(*egIsoLUT2);
149 
150  //edm::FileInPath egIsoLUTFileBarrel = conf.getParameter<edm::FileInPath>("egIsoLUTFileBarrel");
151  //std::ifstream egIsoLUTBarrelStream(egIsoLUTFileBarrel.fullPath());
152  //auto egIsoLUTBarrel = std::make_shared<LUT>(egIsoLUTBarrelStream);
153  //m_params_helper.setEgIsolationLUTBarrel(egIsoLUTBarrel);
154 
155  //edm::FileInPath egIsoLUTFileEndcaps = conf.getParameter<edm::FileInPath>("egIsoLUTFileEndcaps");
156  //std::ifstream egIsoLUTEndcapsStream(egIsoLUTFileEndcaps.fullPath());
157  //auto egIsoLUTEndcaps = std::make_shared<LUT>(egIsoLUTEndcapsStream);
158  //m_params_helper.setEgIsolationLUTEndcaps(egIsoLUTEndcaps);
159 
160 
161  m_params_helper.setEgIsoAreaNrTowersEta(conf.getParameter<unsigned int>("egIsoAreaNrTowersEta"));
162  m_params_helper.setEgIsoAreaNrTowersPhi(conf.getParameter<unsigned int>("egIsoAreaNrTowersPhi"));
163  m_params_helper.setEgIsoVetoNrTowersPhi(conf.getParameter<unsigned int>("egIsoVetoNrTowersPhi"));
164  //m_params_helper.setEgIsoPUEstTowerGranularity(conf.getParameter<unsigned int>("egIsoPUEstTowerGranularity"));
165  //m_params_helper.setEgIsoMaxEtaAbsForTowerSum(conf.getParameter<unsigned int>("egIsoMaxEtaAbsForTowerSum"));
166  //m_params_helper.setEgIsoMaxEtaAbsForIsoSum(conf.getParameter<unsigned int>("egIsoMaxEtaAbsForIsoSum"));
167  m_params_helper.setEgPUSParams(conf.getParameter<std::vector<double>>("egPUSParams"));
168 
169  m_params_helper.setEgCalibrationType(conf.getParameter<std::string>("egCalibrationType"));
170  m_params_helper.setEgCalibrationVersion(conf.getParameter<unsigned>("egCalibrationVersion"));
171  edm::FileInPath egCalibrationLUTFile = conf.getParameter<edm::FileInPath>("egCalibrationLUTFile");
172  std::ifstream egCalibrationLUTStream(egCalibrationLUTFile.fullPath());
173  auto egCalibrationLUT = std::make_shared<LUT>(egCalibrationLUTStream);
174  m_params_helper.setEgCalibrationLUT(*egCalibrationLUT);
175 
176  // tau
177  m_params_helper.setTauRegionMask(conf.getParameter<int>("tauRegionMask"));
178  m_params_helper.setTauLsb(conf.getParameter<double>("tauLsb"));
179  m_params_helper.setTauSeedThreshold(conf.getParameter<double>("tauSeedThreshold"));
180  m_params_helper.setTauNeighbourThreshold(conf.getParameter<double>("tauNeighbourThreshold"));
181  m_params_helper.setTauMaxPtTauVeto(conf.getParameter<double>("tauMaxPtTauVeto"));
182  m_params_helper.setTauMinPtJetIsolationB(conf.getParameter<double>("tauMinPtJetIsolationB"));
183  m_params_helper.setTauPUSType(conf.getParameter<std::string>("tauPUSType"));
184  m_params_helper.setTauMaxJetIsolationB(conf.getParameter<double>("tauMaxJetIsolationB"));
185  m_params_helper.setTauMaxJetIsolationA(conf.getParameter<double>("tauMaxJetIsolationA"));
186  m_params_helper.setTauIsoAreaNrTowersEta(conf.getParameter<unsigned int>("tauIsoAreaNrTowersEta"));
187  m_params_helper.setTauIsoAreaNrTowersPhi(conf.getParameter<unsigned int>("tauIsoAreaNrTowersPhi"));
188  m_params_helper.setTauIsoVetoNrTowersPhi(conf.getParameter<unsigned int>("tauIsoVetoNrTowersPhi"));
189 
190  edm::FileInPath tauIsoLUTFile = conf.getParameter<edm::FileInPath>("tauIsoLUTFile");
191  std::ifstream tauIsoLUTStream(tauIsoLUTFile.fullPath());
192  auto tauIsoLUT = std::make_shared<LUT>(tauIsoLUTStream);
193  m_params_helper.setTauIsolationLUT(*tauIsoLUT);
194 
195  edm::FileInPath tauIsoLUTFile2 = conf.getParameter<edm::FileInPath>("tauIsoLUTFile2");
196  std::ifstream tauIsoLUTStream2(tauIsoLUTFile2.fullPath());
197  std::shared_ptr<LUT> tauIsoLUT2( new LUT(tauIsoLUTStream2) );
198  m_params_helper.setTauIsolationLUT2(*tauIsoLUT2);
199 
200  edm::FileInPath tauTrimmingShapeVetoLUTFile = conf.getParameter<edm::FileInPath>("tauTrimmingShapeVetoLUTFile");
201  std::ifstream tauTrimmingShapeVetoLUTStream(tauTrimmingShapeVetoLUTFile.fullPath());
202  std::shared_ptr<LUT> tauTrimmingShapeVetoLUT( new LUT(tauTrimmingShapeVetoLUTStream) );
203  m_params_helper.setTauTrimmingShapeVetoLUT(*tauTrimmingShapeVetoLUT);
204 
205  edm::FileInPath tauCalibrationLUTFile = conf.getParameter<edm::FileInPath>("tauCalibrationLUTFile");
206  std::ifstream tauCalibrationLUTStream(tauCalibrationLUTFile.fullPath());
207  auto tauCalibrationLUT = std::make_shared<LUT>(tauCalibrationLUTStream);
208  m_params_helper.setTauCalibrationLUT(*tauCalibrationLUT);
209 
210  edm::FileInPath tauCompressLUTFile = conf.getParameter<edm::FileInPath>("tauCompressLUTFile");
211  std::ifstream tauCompressLUTStream(tauCompressLUTFile.fullPath());
212  auto tauCompressLUT = std::make_shared<LUT>(tauCompressLUTStream);
213  m_params_helper.setTauCompressLUT(*tauCompressLUT);
214 
215  edm::FileInPath tauEtToHFRingEtLUTFile = conf.getParameter<edm::FileInPath>("tauEtToHFRingEtLUTFile");
216  std::ifstream tauEtToHFRingEtLUTStream(tauEtToHFRingEtLUTFile.fullPath());
217  auto tauEtToHFRingEtLUT = std::make_shared<LUT>(tauEtToHFRingEtLUTStream);
218  m_params_helper.setTauEtToHFRingEtLUT(*tauEtToHFRingEtLUT);
219 
220  m_params_helper.setIsoTauEtaMin(conf.getParameter<int> ("isoTauEtaMin"));
221  m_params_helper.setIsoTauEtaMax(conf.getParameter<int> ("isoTauEtaMax"));
222 
223  m_params_helper.setTauPUSParams(conf.getParameter<std::vector<double>>("tauPUSParams"));
224 
225  // jets
226  m_params_helper.setJetLsb(conf.getParameter<double>("jetLsb"));
227  m_params_helper.setJetSeedThreshold(conf.getParameter<double>("jetSeedThreshold"));
228  m_params_helper.setJetNeighbourThreshold(conf.getParameter<double>("jetNeighbourThreshold"));
229  m_params_helper.setJetRegionMask(conf.getParameter<int>("jetRegionMask"));
230  m_params_helper.setJetPUSType(conf.getParameter<std::string>("jetPUSType"));
231  m_params_helper.setJetBypassPUS(conf.getParameter<unsigned>("jetBypassPUS"));
232  m_params_helper.setJetPUSUsePhiRing(conf.getParameter<unsigned>("jetPUSUsePhiRing"));
233  m_params_helper.setJetCalibrationType(conf.getParameter<std::string>("jetCalibrationType"));
234  m_params_helper.setJetCalibrationParams(conf.getParameter<std::vector<double> >("jetCalibrationParams"));
235  edm::FileInPath jetCalibrationLUTFile = conf.getParameter<edm::FileInPath>("jetCalibrationLUTFile");
236  std::ifstream jetCalibrationLUTStream(jetCalibrationLUTFile.fullPath());
237  auto jetCalibrationLUT = std::make_shared<LUT>(jetCalibrationLUTStream);
238  m_params_helper.setJetCalibrationLUT(*jetCalibrationLUT);
239  edm::FileInPath jetCompressEtaLUTFile = conf.getParameter<edm::FileInPath>("jetCompressEtaLUTFile");
240  std::ifstream jetCompressEtaLUTStream(jetCompressEtaLUTFile.fullPath());
241  std::shared_ptr<LUT> jetCompressEtaLUT( new LUT(jetCompressEtaLUTStream) );
242  m_params_helper.setJetCompressEtaLUT(*jetCompressEtaLUT);
243  edm::FileInPath jetCompressPtLUTFile = conf.getParameter<edm::FileInPath>("jetCompressPtLUTFile");
244  std::ifstream jetCompressPtLUTStream(jetCompressPtLUTFile.fullPath());
245  std::shared_ptr<LUT> jetCompressPtLUT( new LUT(jetCompressPtLUTStream) );
246  m_params_helper.setJetCompressPtLUT(*jetCompressPtLUT);
247 
248  // sums
249  m_params_helper.setEtSumLsb(conf.getParameter<double>("etSumLsb"));
250 
251  std::vector<int> etSumEtaMin = conf.getParameter<std::vector<int> >("etSumEtaMin");
252  std::vector<int> etSumEtaMax = conf.getParameter<std::vector<int> >("etSumEtaMax");
253  std::vector<double> etSumEtThreshold = conf.getParameter<std::vector<double> >("etSumEtThreshold");
254  m_params_helper.setEtSumBypassMetPUS(conf.getParameter<unsigned>("etSumBypassMetPUS"));
255  m_params_helper.setEtSumBypassEttPUS(conf.getParameter<unsigned>("etSumBypassEttPUS"));
256  m_params_helper.setEtSumBypassEcalSumPUS(conf.getParameter<unsigned>("etSumBypassEcalSumPUS"));
257  m_params_helper.setEtSumMetPUSType(conf.getParameter<std::string>("etSumMetPUSType"));
258  m_params_helper.setEtSumEttPUSType(conf.getParameter<std::string>("etSumEttPUSType"));
259  m_params_helper.setEtSumEcalSumPUSType(conf.getParameter<std::string>("etSumEcalSumPUSType"));
260  m_params_helper.setMetCalibrationType(conf.getParameter<std::string>("metCalibrationType"));
261  m_params_helper.setMetHFCalibrationType(conf.getParameter<std::string>("metHFCalibrationType"));
262  m_params_helper.setEtSumEttCalibrationType(conf.getParameter<std::string>("etSumEttCalibrationType"));
263  m_params_helper.setEtSumEcalSumCalibrationType(conf.getParameter<std::string>("etSumEcalSumCalibrationType"));
264 
265  if ((etSumEtaMin.size() == etSumEtaMax.size()) && (etSumEtaMin.size() == etSumEtThreshold.size())) {
266  for (unsigned i=0; i<etSumEtaMin.size(); ++i) {
267  m_params_helper.setEtSumEtaMin(i, etSumEtaMin.at(i));
268  m_params_helper.setEtSumEtaMax(i, etSumEtaMax.at(i));
269  m_params_helper.setEtSumEtThreshold(i, etSumEtThreshold.at(i));
270  }
271  }
272  else {
273  edm::LogError("l1t|calo") << "Inconsistent number of EtSum parameters" << std::endl;
274  }
275 
276  edm::FileInPath etSumMetPUSLUTFile = conf.getParameter<edm::FileInPath>("etSumMetPUSLUTFile");
277  std::ifstream etSumMetPUSLUTStream(etSumMetPUSLUTFile.fullPath());
278  std::shared_ptr<LUT> etSumMetPUSLUT( new LUT(etSumMetPUSLUTStream) );
279  m_params_helper.setEtSumMetPUSLUT(*etSumMetPUSLUT);
280 
281  edm::FileInPath etSumEttPUSLUTFile = conf.getParameter<edm::FileInPath>("etSumEttPUSLUTFile");
282  std::ifstream etSumEttPUSLUTStream(etSumEttPUSLUTFile.fullPath());
283  std::shared_ptr<LUT> etSumEttPUSLUT( new LUT(etSumEttPUSLUTStream) );
284  m_params_helper.setEtSumEttPUSLUT(*etSumEttPUSLUT);
285 
286  edm::FileInPath etSumEcalSumPUSLUTFile = conf.getParameter<edm::FileInPath>("etSumEcalSumPUSLUTFile");
287  std::ifstream etSumEcalSumPUSLUTStream(etSumEcalSumPUSLUTFile.fullPath());
288  std::shared_ptr<LUT> etSumEcalSumPUSLUT( new LUT(etSumEcalSumPUSLUTStream) );
289  m_params_helper.setEtSumEcalSumPUSLUT(*etSumEcalSumPUSLUT);
290 
291  edm::FileInPath metCalibrationLUTFile = conf.getParameter<edm::FileInPath>("metCalibrationLUTFile");
292  std::ifstream metCalibrationLUTStream(metCalibrationLUTFile.fullPath());
293  std::shared_ptr<LUT> metCalibrationLUT( new LUT(metCalibrationLUTStream) );
294  m_params_helper.setMetCalibrationLUT(*metCalibrationLUT);
295 
296  edm::FileInPath metHFCalibrationLUTFile = conf.getParameter<edm::FileInPath>("metHFCalibrationLUTFile");
297  std::ifstream metHFCalibrationLUTStream(metHFCalibrationLUTFile.fullPath());
298  std::shared_ptr<LUT> metHFCalibrationLUT( new LUT(metHFCalibrationLUTStream) );
299  m_params_helper.setMetHFCalibrationLUT(*metHFCalibrationLUT);
300 
301  edm::FileInPath etSumEttCalibrationLUTFile = conf.getParameter<edm::FileInPath>("etSumEttCalibrationLUTFile");
302  std::ifstream etSumEttCalibrationLUTStream(etSumEttCalibrationLUTFile.fullPath());
303  std::shared_ptr<LUT> etSumEttCalibrationLUT( new LUT(etSumEttCalibrationLUTStream) );
304  m_params_helper.setEtSumEttCalibrationLUT(*etSumEttCalibrationLUT);
305 
306  edm::FileInPath etSumEcalSumCalibrationLUTFile = conf.getParameter<edm::FileInPath>("etSumEcalSumCalibrationLUTFile");
307  std::ifstream etSumEcalSumCalibrationLUTStream(etSumEcalSumCalibrationLUTFile.fullPath());
308  std::shared_ptr<LUT> etSumEcalSumCalibrationLUT( new LUT(etSumEcalSumCalibrationLUTStream) );
309  m_params_helper.setEtSumEcalSumCalibrationLUT(*etSumEcalSumCalibrationLUT);
310 
311  edm::FileInPath metPhiCalibrationLUTFile = conf.getParameter<edm::FileInPath>("metPhiCalibrationLUTFile");
312  std::ifstream metPhiCalibrationLUTStream(metPhiCalibrationLUTFile.fullPath());
313  std::shared_ptr<LUT> metPhiCalibrationLUT( new LUT(metPhiCalibrationLUTStream) );
314  m_params_helper.setMetPhiCalibrationLUT(*metPhiCalibrationLUT);
315 
316  edm::FileInPath metHFPhiCalibrationLUTFile = conf.getParameter<edm::FileInPath>("metHFPhiCalibrationLUTFile");
317  std::ifstream metHFPhiCalibrationLUTStream(metHFPhiCalibrationLUTFile.fullPath());
318  std::shared_ptr<LUT> metHFPhiCalibrationLUT( new LUT(metHFPhiCalibrationLUTStream) );
319  m_params_helper.setMetHFPhiCalibrationLUT(*metHFPhiCalibrationLUT);
320 
321  // HI centrality trigger
322  std::vector<double> etSumCentLower = conf.getParameter<std::vector<double>>("etSumCentralityLower");
323  std::vector<double> etSumCentUpper = conf.getParameter<std::vector<double>>("etSumCentralityUpper");
324  if (etSumCentLower.size() == etSumCentUpper.size()){
325  for (unsigned i=0; i<etSumCentLower.size(); ++i) {
326  m_params_helper.setEtSumCentLower(i, etSumCentLower.at(i));
327  m_params_helper.setEtSumCentUpper(i, etSumCentUpper.at(i));
328  }
329  }
330  else {
331  edm::LogError("l1t|calo") << "Inconsistent number of Centrality boundaries" << std::endl;
332  }
333 
334  edm::FileInPath centralityLUTFile = conf.getParameter<edm::FileInPath>("centralityLUTFile");
335  std::ifstream centralityLUTStream(centralityLUTFile.fullPath());
336  auto centralityLUT = std::make_shared<LUT>(centralityLUTStream);
337  m_params_helper.setCentralityLUT(*centralityLUT);
338  m_params_helper.setCentralityRegionMask(conf.getParameter<int>("centralityRegionMask"));
339  std::vector<int> minbiasThresholds = conf.getParameter<std::vector<int> >("minimumBiasThresholds");
340  if(minbiasThresholds.size() == 4) {
341  m_params_helper.setMinimumBiasThresholds(minbiasThresholds);
342  } else {
343  edm::LogError("l1t|calo") << "Incorrect number of minimum bias thresholds set.";
344  }
345 
346  // HI Q2 trigger
347  edm::FileInPath q2LUTFile = conf.getParameter<edm::FileInPath>("q2LUTFile");
348  std::ifstream q2LUTStream(q2LUTFile.fullPath());
349  auto q2LUT = std::make_shared<LUT>(q2LUTStream);
350  m_params_helper.setQ2LUT(*q2LUT);
351 
352  // Layer 1 LUT specification
353  m_params_helper.setLayer1ECalScaleFactors(conf.getParameter<std::vector<double>>("layer1ECalScaleFactors"));
354  m_params_helper.setLayer1HCalScaleFactors(conf.getParameter<std::vector<double>>("layer1HCalScaleFactors"));
355  m_params_helper.setLayer1HFScaleFactors (conf.getParameter<std::vector<double>>("layer1HFScaleFactors"));
356 
357  m_params_helper.setLayer1ECalScaleETBins(conf.getParameter<std::vector<int>>("layer1ECalScaleETBins"));
358  m_params_helper.setLayer1HCalScaleETBins(conf.getParameter<std::vector<int>>("layer1HCalScaleETBins"));
359  m_params_helper.setLayer1HFScaleETBins (conf.getParameter<std::vector<int>>("layer1HFScaleETBins"));
360 
361  m_params_helper.setLayer1ECalScalePhiBins(conf.getParameter<std::vector<unsigned>>("layer1ECalScalePhiBins"));
362  m_params_helper.setLayer1HCalScalePhiBins(conf.getParameter<std::vector<unsigned>>("layer1HCalScalePhiBins"));
363  m_params_helper.setLayer1HFScalePhiBins (conf.getParameter<std::vector<unsigned>>("layer1HFScalePhiBins"));
364 
365  if (conf.existsAs<std::vector<unsigned>>("layer1SecondStageLUT")) {
366  m_params_helper.setLayer1SecondStageLUT(conf.getParameter<std::vector<unsigned>>("layer1SecondStageLUT"));
367  }
368 
369  m_params = (CaloParams)m_params_helper;
370 
371 }
void setEtSumEtaMax(unsigned isum, int eta)
void setEtSumEcalSumCalibrationLUT(const l1t::LUT &lut)
void setEtSumEcalSumPUSType(std::string type)
T getParameter(std::string const &) const
void setMetPhiCalibrationLUT(const l1t::LUT &lut)
void setTauMaxJetIsolationA(double cutValue)
void setEgCalibrationVersion(unsigned version)
void setCentralityLUT(const l1t::LUT &lut)
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:185
void setLayer1HFScaleFactors(std::vector< double > params)
void setIsoTauEtaMax(int value)
void setTauMinPtJetIsolationB(double limit)
void setRegionPUSType(std::string type)
void setEtSumBypassMetPUS(unsigned flag)
void setEgNeighbourThreshold(double thresh)
void setEgMinPtHOverEIsolation(int cutValue)
void setEgLsb(double lsb)
void setJetCalibrationParams(std::vector< double > params)
void setTauEtToHFRingEtLUT(const l1t::LUT &lut)
void setTauCalibrationLUT(const l1t::LUT &lut)
void setTauLsb(double lsb)
void setTauIsolationLUT(const l1t::LUT &lut)
void setJetCalibrationLUT(const l1t::LUT &lut)
void setEtSumBypassEcalSumPUS(unsigned flag)
void setTauNeighbourThreshold(double thresh)
void setEgMaxPtJetIsolation(int cutValue)
void setEtSumMetPUSLUT(const l1t::LUT &lut)
void setEgHOverEcutEndcap(int cut)
void setEgHcalThreshold(double thresh)
void setTauIsoAreaNrTowersPhi(unsigned iTauIsoAreaNrTowersPhi)
void setEgBypassExtHOverE(unsigned flag)
void setEtSumEttCalibrationLUT(const l1t::LUT &lut)
void setLayer1ECalScalePhiBins(std::vector< unsigned > params)
void setCentralityRegionMask(int mask)
void setJetCompressEtaLUT(const l1t::LUT &lut)
void setTauIsoAreaNrTowersEta(unsigned iTauIsoAreaNrTowersEta)
void setEgCalibrationLUT(const l1t::LUT &lut)
void setLayer1HCalScalePhiBins(std::vector< unsigned > params)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
void setEgShapeIdLUT(const l1t::LUT &lut)
void setEtSumEttPUSLUT(const l1t::LUT &lut)
void setJetCompressPtLUT(const l1t::LUT &lut)
void setEgHOverEcutBarrel(int cut)
void setEtSumEcalSumCalibrationType(std::string type)
void setEgBypassECALFG(unsigned flag)
void setEtSumEtaMin(unsigned isum, int eta)
void setEtSumCentLower(unsigned centClass, double loBound)
void setTauMaxPtTauVeto(double limit)
void setRegionLsb(double lsb)
void setJetCalibrationType(std::string type)
void setEtSumMetPUSType(std::string type)
void setJetPUSUsePhiRing(unsigned flag)
void setTowerLsbH(double lsb)
void setLayer1HCalScaleFactors(std::vector< double > params)
void setEgMinPtJetIsolation(int cutValue)
void setEgBypassEGVetos(unsigned flag)
void setEtSumCentUpper(unsigned centClass, double upBound)
void setEgIsolationLUT2(const l1t::LUT &lut)
void setTauCompressLUT(const l1t::LUT &lut)
void setLayer1HCalScaleETBins(std::vector< int > params)
void setEtSumEtThreshold(unsigned isum, double thresh)
void setTauPUSType(std::string type)
void setEgPUSType(std::string type)
void setLayer1ECalScaleETBins(std::vector< int > params)
void setTauSeedThreshold(double thresh)
void setTowerEncoding(bool doit)
void setTauMaxJetIsolationB(double limit)
void setEgIsoAreaNrTowersPhi(unsigned iEgIsoAreaNrTowersPhi)
void setEgBypassShape(unsigned flag)
void setJetNeighbourThreshold(double thresh)
void setEgShapeIdVersion(unsigned version)
void setTauRegionMask(int mask)
void setJetRegionMask(int mask)
void setEgEtaCut(int mask)
void setEgMaxHcalEt(double cut)
void setLayer1SecondStageLUT(const std::vector< unsigned > &lut)
void setLayer1HFScalePhiBins(std::vector< unsigned > params)
void setJetLsb(double lsb)
void setTauPUSParams(const std::vector< double > &params)
void setLayer1HFScaleETBins(std::vector< int > params)
void setEtSumEttCalibrationType(std::string type)
void setQ2LUT(const l1t::LUT &lut)
void setEtSumBypassEttPUS(unsigned flag)
void setEgMaxHOverELUT(const l1t::LUT &lut)
void setMinimumBiasThresholds(std::vector< int > thresholds)
void setMetCalibrationType(std::string type)
void setJetSeedThreshold(double thresh)
void setMetHFCalibrationType(std::string type)
void setEgMaxPtHOverE(double thresh)
void setLayer1ECalScaleFactors(std::vector< double > params)
void setEgTrimmingLUT(const l1t::LUT &lut)
void setRegionPUSParams(const std::vector< double > &params)
void setEgIsolationLUT(const l1t::LUT &lut)
void setEgMaxPtHOverEIsolation(int cutValue)
void setTauIsolationLUT2(const l1t::LUT &lut)
void setJetBypassPUS(unsigned flag)
void setTauTrimmingShapeVetoLUT(const l1t::LUT &lut)
void setMetHFPhiCalibrationLUT(const l1t::LUT &lut)
void setEgBypassHoE(unsigned flag)
void setMetHFCalibrationLUT(const l1t::LUT &lut)
void setEtSumEttPUSType(std::string type)
std::string fullPath() const
Definition: FileInPath.cc:197
void setEgSeedThreshold(double thresh)
void setTauIsoVetoNrTowersPhi(unsigned iTauIsoVetoNrTowersPhi)
void setMetCalibrationLUT(const l1t::LUT &lut)
void setJetPUSType(std::string type)
void setEgIsoVetoNrTowersPhi(unsigned iEgIsoVetoNrTowersPhi)
void setEtSumLsb(double lsb)
void setEgIsoAreaNrTowersEta(unsigned iEgIsoAreaNrTowersEta)
std::vector< unsigned short int > LUT
Definition: DTTracoLUTs.h:32
void setEgShapeIdType(std::string type)
void setIsoTauEtaMin(int value)
void setTowerLsbSum(double lsb)
void setEgPUSParams(const std::vector< double > &params)
void setTowerLsbE(double lsb)
void setEgCalibrationType(std::string type)
void setEtSumEcalSumPUSLUT(const l1t::LUT &lut)
void setEgCompressShapesLUT(const l1t::LUT &lut)
void setTowerNBitsRatio(int n)
void setEgIsolationType(std::string type)
L1TCaloParamsESProducer::~L1TCaloParamsESProducer ( )
override

Definition at line 374 of file L1TCaloParamsESProducer.cc.

375 {
376 
377  // do anything here that needs to be done at desctruction time
378  // (e.g. close files, deallocate resources etc.)
379 
380 }

Member Function Documentation

L1TCaloParamsESProducer::ReturnType L1TCaloParamsESProducer::produce ( const L1TCaloParamsRcd iRecord)

Definition at line 389 of file L1TCaloParamsESProducer.cc.

References DEFINE_FWK_EVENTSETUP_MODULE.

390 {
391  using namespace edm::es;
392  return std::make_shared<CaloParams>(m_params);
393 }

Member Data Documentation

std::string L1TCaloParamsESProducer::m_label
private

Definition at line 55 of file L1TCaloParamsESProducer.cc.

CaloParams L1TCaloParamsESProducer::m_params
private

Definition at line 54 of file L1TCaloParamsESProducer.cc.