CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 boost::shared_ptr
< CaloParams
ReturnType
 
- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair
< DataKey, boost::shared_ptr
< DataProxy > > > 
KeyedProxies
 
typedef std::vector
< EventSetupRecordKey
Keys
 
typedef std::map
< EventSetupRecordKey,
KeyedProxies
RecordProxies
 

Public Member Functions

 L1TCaloParamsESProducer (const edm::ParameterSet &)
 
ReturnType produce (const L1TCaloParamsRcd &)
 
 ~L1TCaloParamsESProducer ()
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
virtual ~ESProducer ()
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer ()
 
- 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 ()
 

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
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::auto_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::auto_ptr< eventsetup::ProxyFactoryBase > &iFactory, const std::string &iLabel=std::string())
 
virtual void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList)
 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

typedef boost::shared_ptr<CaloParams> L1TCaloParamsESProducer::ReturnType

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::FileInPath::fullPath(), edm::ParameterSet::getParameter(), i, 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  // towers
78  m_params.setTowerLsbH(conf.getParameter<double>("towerLsbH"));
79  m_params.setTowerLsbE(conf.getParameter<double>("towerLsbE"));
80  m_params.setTowerLsbSum(conf.getParameter<double>("towerLsbSum"));
81  m_params.setTowerNBitsH(conf.getParameter<int>("towerNBitsH"));
82  m_params.setTowerNBitsE(conf.getParameter<int>("towerNBitsE"));
83  m_params.setTowerNBitsSum(conf.getParameter<int>("towerNBitsSum"));
84  m_params.setTowerNBitsRatio(conf.getParameter<int>("towerNBitsRatio"));
85  m_params.setTowerEncoding(conf.getParameter<bool>("towerEncoding"));
86 
87  // regions
88  m_params.setRegionLsb(conf.getParameter<double>("regionLsb"));
89  m_params.setRegionPUSType(conf.getParameter<std::string>("regionPUSType"));
90  m_params.setRegionPUSParams(conf.getParameter<std::vector<double> >("regionPUSParams"));
91 
92  // EG
93  m_params.setEgLsb(conf.getParameter<double>("egLsb"));
94  m_params.setEgSeedThreshold(conf.getParameter<double>("egSeedThreshold"));
95  m_params.setEgNeighbourThreshold(conf.getParameter<double>("egNeighbourThreshold"));
96  m_params.setEgHcalThreshold(conf.getParameter<double>("egHcalThreshold"));
97 
98  edm::FileInPath egTrimmingLUTFile = conf.getParameter<edm::FileInPath>("egTrimmingLUTFile");
99  std::ifstream egTrimmingLUTStream(egTrimmingLUTFile.fullPath());
100  std::shared_ptr<LUT> egTrimmingLUT( new LUT(egTrimmingLUTStream) );
101  m_params.setEgTrimmingLUT(*egTrimmingLUT);
102 
103  m_params.setEgMaxHcalEt(conf.getParameter<double>("egMaxHcalEt"));
104  m_params.setEgMaxPtHOverE(conf.getParameter<double>("egMaxPtHOverE"));
105  m_params.setEgMinPtJetIsolation(conf.getParameter<int>("egMinPtJetIsolation"));
106  m_params.setEgMaxPtJetIsolation(conf.getParameter<int>("egMaxPtJetIsolation"));
107  m_params.setEgMinPtHOverEIsolation(conf.getParameter<int>("egMinPtHOverEIsolation"));
108  m_params.setEgMaxPtHOverEIsolation(conf.getParameter<int>("egMaxPtHOverEIsolation"));
109 
110 
111  edm::FileInPath egMaxHOverELUTFile = conf.getParameter<edm::FileInPath>("egMaxHOverELUTFile");
112  std::ifstream egMaxHOverELUTStream(egMaxHOverELUTFile.fullPath());
113  std::shared_ptr<LUT> egMaxHOverELUT( new LUT(egMaxHOverELUTStream) );
114  m_params.setEgMaxHOverELUT(*egMaxHOverELUT);
115 
116  edm::FileInPath egCompressShapesLUTFile = conf.getParameter<edm::FileInPath>("egCompressShapesLUTFile");
117  std::ifstream egCompressShapesLUTStream(egCompressShapesLUTFile.fullPath());
118  std::shared_ptr<LUT> egCompressShapesLUT( new LUT(egCompressShapesLUTStream) );
119  m_params.setEgCompressShapesLUT(*egCompressShapesLUT);
120 
121  edm::FileInPath egShapeIdLUTFile = conf.getParameter<edm::FileInPath>("egShapeIdLUTFile");
122  std::ifstream egShapeIdLUTStream(egShapeIdLUTFile.fullPath());
123  std::shared_ptr<LUT> egShapeIdLUT( new LUT(egShapeIdLUTStream) );
124  m_params.setEgShapeIdLUT(*egShapeIdLUT);
125 
126  m_params.setEgPUSType(conf.getParameter<std::string>("egPUSType"));
127 
128  edm::FileInPath egIsoLUTFile = conf.getParameter<edm::FileInPath>("egIsoLUTFile");
129  std::ifstream egIsoLUTStream(egIsoLUTFile.fullPath());
130  std::shared_ptr<LUT> egIsoLUT( new LUT(egIsoLUTStream) );
131  m_params.setEgIsolationLUT(*egIsoLUT);
132 
133  //edm::FileInPath egIsoLUTFileBarrel = conf.getParameter<edm::FileInPath>("egIsoLUTFileBarrel");
134  //std::ifstream egIsoLUTBarrelStream(egIsoLUTFileBarrel.fullPath());
135  //std::shared_ptr<LUT> egIsoLUTBarrel( new LUT(egIsoLUTBarrelStream) );
136  //m_params.setEgIsolationLUTBarrel(egIsoLUTBarrel);
137 
138  //edm::FileInPath egIsoLUTFileEndcaps = conf.getParameter<edm::FileInPath>("egIsoLUTFileEndcaps");
139  //std::ifstream egIsoLUTEndcapsStream(egIsoLUTFileEndcaps.fullPath());
140  //std::shared_ptr<LUT> egIsoLUTEndcaps( new LUT(egIsoLUTEndcapsStream) );
141  //m_params.setEgIsolationLUTEndcaps(egIsoLUTEndcaps);
142 
143 
144  m_params.setEgIsoAreaNrTowersEta(conf.getParameter<unsigned int>("egIsoAreaNrTowersEta"));
145  m_params.setEgIsoAreaNrTowersPhi(conf.getParameter<unsigned int>("egIsoAreaNrTowersPhi"));
146  m_params.setEgIsoVetoNrTowersPhi(conf.getParameter<unsigned int>("egIsoVetoNrTowersPhi"));
147  //m_params.setEgIsoPUEstTowerGranularity(conf.getParameter<unsigned int>("egIsoPUEstTowerGranularity"));
148  //m_params.setEgIsoMaxEtaAbsForTowerSum(conf.getParameter<unsigned int>("egIsoMaxEtaAbsForTowerSum"));
149  //m_params.setEgIsoMaxEtaAbsForIsoSum(conf.getParameter<unsigned int>("egIsoMaxEtaAbsForIsoSum"));
150  m_params.setEgPUSParams(conf.getParameter<std::vector<double>>("egPUSParams"));
151 
152  edm::FileInPath egCalibrationLUTFile = conf.getParameter<edm::FileInPath>("egCalibrationLUTFile");
153  std::ifstream egCalibrationLUTStream(egCalibrationLUTFile.fullPath());
154  std::shared_ptr<LUT> egCalibrationLUT( new LUT(egCalibrationLUTStream) );
155  m_params.setEgCalibrationLUT(*egCalibrationLUT);
156 
157  // tau
158  m_params.setTauLsb(conf.getParameter<double>("tauLsb"));
159  m_params.setTauSeedThreshold(conf.getParameter<double>("tauSeedThreshold"));
160  m_params.setTauNeighbourThreshold(conf.getParameter<double>("tauNeighbourThreshold"));
161  m_params.setTauMaxPtTauVeto(conf.getParameter<double>("tauMaxPtTauVeto"));
162  m_params.setTauMinPtJetIsolationB(conf.getParameter<double>("tauMinPtJetIsolationB"));
163  m_params.setTauPUSType(conf.getParameter<std::string>("tauPUSType"));
164  m_params.setTauMaxJetIsolationB(conf.getParameter<double>("tauMaxJetIsolationB"));
165  m_params.setTauMaxJetIsolationA(conf.getParameter<double>("tauMaxJetIsolationA"));
166  m_params.setTauIsoAreaNrTowersEta(conf.getParameter<unsigned int>("tauIsoAreaNrTowersEta"));
167  m_params.setTauIsoAreaNrTowersPhi(conf.getParameter<unsigned int>("tauIsoAreaNrTowersPhi"));
168  m_params.setTauIsoVetoNrTowersPhi(conf.getParameter<unsigned int>("tauIsoVetoNrTowersPhi"));
169 
170  edm::FileInPath tauIsoLUTFile = conf.getParameter<edm::FileInPath>("tauIsoLUTFile");
171  std::ifstream tauIsoLUTStream(tauIsoLUTFile.fullPath());
172  std::shared_ptr<LUT> tauIsoLUT( new LUT(tauIsoLUTStream) );
173  m_params.setTauIsolationLUT(*tauIsoLUT);
174 
175  edm::FileInPath tauCalibrationLUTFile = conf.getParameter<edm::FileInPath>("tauCalibrationLUTFile");
176  std::ifstream tauCalibrationLUTStream(tauCalibrationLUTFile.fullPath());
177  std::shared_ptr<LUT> tauCalibrationLUT( new LUT(tauCalibrationLUTStream) );
178  m_params.setTauCalibrationLUT(*tauCalibrationLUT);
179 
180  edm::FileInPath tauEtToHFRingEtLUTFile = conf.getParameter<edm::FileInPath>("tauEtToHFRingEtLUTFile");
181  std::ifstream tauEtToHFRingEtLUTStream(tauEtToHFRingEtLUTFile.fullPath());
182  std::shared_ptr<LUT> tauEtToHFRingEtLUT( new LUT(tauEtToHFRingEtLUTStream) );
183  m_params.setTauEtToHFRingEtLUT(*tauEtToHFRingEtLUT);
184 
185  m_params.setIsoTauEtaMin(conf.getParameter<int> ("isoTauEtaMin"));
186  m_params.setIsoTauEtaMax(conf.getParameter<int> ("isoTauEtaMax"));
187 
188  m_params.setTauPUSParams(conf.getParameter<std::vector<double>>("tauPUSParams"));
189 
190  // jets
191  m_params.setJetLsb(conf.getParameter<double>("jetLsb"));
192  m_params.setJetSeedThreshold(conf.getParameter<double>("jetSeedThreshold"));
193  m_params.setJetNeighbourThreshold(conf.getParameter<double>("jetNeighbourThreshold"));
194  m_params.setJetPUSType(conf.getParameter<std::string>("jetPUSType"));
195  m_params.setJetCalibrationType(conf.getParameter<std::string>("jetCalibrationType"));
196  m_params.setJetCalibrationParams(conf.getParameter<std::vector<double> >("jetCalibrationParams"));
197  edm::FileInPath jetCalibrationLUTFile = conf.getParameter<edm::FileInPath>("jetCalibrationLUTFile");
198  std::ifstream jetCalibrationLUTStream(jetCalibrationLUTFile.fullPath());
199  std::shared_ptr<LUT> jetCalibrationLUT( new LUT(jetCalibrationLUTStream) );
200  m_params.setJetCalibrationLUT(*jetCalibrationLUT);
201 
202  // sums
203  m_params.setEtSumLsb(conf.getParameter<double>("etSumLsb"));
204 
205  std::vector<int> etSumEtaMin = conf.getParameter<std::vector<int> >("etSumEtaMin");
206  std::vector<int> etSumEtaMax = conf.getParameter<std::vector<int> >("etSumEtaMax");
207  std::vector<double> etSumEtThreshold = conf.getParameter<std::vector<double> >("etSumEtThreshold");
208 
209  if ((etSumEtaMin.size() == etSumEtaMax.size()) && (etSumEtaMin.size() == etSumEtThreshold.size())) {
210  for (unsigned i=0; i<etSumEtaMin.size(); ++i) {
211  m_params.setEtSumEtaMin(i, etSumEtaMin.at(i));
212  m_params.setEtSumEtaMax(i, etSumEtaMax.at(i));
213  m_params.setEtSumEtThreshold(i, etSumEtThreshold.at(i));
214  }
215  }
216  else {
217  edm::LogError("l1t|calo") << "Inconsistent number of EtSum parameters" << std::endl;
218  }
219 
220  // HI centrality trigger
221  edm::FileInPath centralityLUTFile = conf.getParameter<edm::FileInPath>("centralityLUTFile");
222  std::ifstream centralityLUTStream(centralityLUTFile.fullPath());
223  std::shared_ptr<LUT> centralityLUT( new LUT(centralityLUTStream) );
224  m_params.setCentralityLUT(*centralityLUT);
225 
226  // HI Q2 trigger
227  edm::FileInPath q2LUTFile = conf.getParameter<edm::FileInPath>("q2LUTFile");
228  std::ifstream q2LUTStream(q2LUTFile.fullPath());
229  std::shared_ptr<LUT> q2LUT( new LUT(q2LUTStream) );
230  m_params.setQ2LUT(*q2LUT);
231 
232 
233 }
void setEgCalibrationLUT(const l1t::LUT &lut)
Definition: CaloParams.h:301
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
void setEgMinPtHOverEIsolation(int cutValue)
Definition: CaloParams.h:290
void setTauIsolationLUT(const l1t::LUT &lut)
Definition: CaloParams.h:340
void setTowerNBitsH(int n)
Definition: CaloParams.h:232
void setTauIsoAreaNrTowersEta(unsigned iTauIsoAreaNrTowersEta)
Definition: CaloParams.h:343
void setIsoTauEtaMin(int value)
Definition: CaloParams.h:337
void setTowerLsbE(double lsb)
Definition: CaloParams.h:230
void setEgMaxPtJetIsolation(int cutValue)
Definition: CaloParams.h:289
void setEgPUSParams(const std::vector< double > &params)
Definition: CaloParams.h:297
void setQ2LUT(const l1t::LUT &lut)
Definition: CaloParams.h:389
void setRegionPUSParams(const std::vector< double > &params)
Definition: CaloParams.h:246
void setEgHcalThreshold(double thresh)
Definition: CaloParams.h:281
void setJetCalibrationParams(std::vector< double > params)
Definition: CaloParams.h:369
void setTauEtToHFRingEtLUT(const l1t::LUT &lut)
Definition: CaloParams.h:351
void setEgMaxPtHOverE(double thresh)
Definition: CaloParams.h:284
void setJetCalibrationLUT(const l1t::LUT &lut)
Definition: CaloParams.h:370
void setIsoTauEtaMax(int value)
Definition: CaloParams.h:338
void setEgShapeIdLUT(const l1t::LUT &lut)
Definition: CaloParams.h:287
void setEgIsoVetoNrTowersPhi(unsigned iEgIsoVetoNrTowersPhi)
Definition: CaloParams.h:295
void setTauMaxPtTauVeto(double limit)
Definition: CaloParams.h:333
void setJetSeedThreshold(double thresh)
Definition: CaloParams.h:364
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
void setEtSumEtThreshold(unsigned isum, double thresh)
Definition: CaloParams.cc:30
void setEgLsb(double lsb)
Definition: CaloParams.h:278
void setEgPUSType(std::string type)
Definition: CaloParams.h:296
void setEgNeighbourThreshold(double thresh)
Definition: CaloParams.h:280
void setEgTrimmingLUT(const l1t::LUT &lut)
Definition: CaloParams.h:282
void setEgIsolationLUT(const l1t::LUT &lut)
Definition: CaloParams.h:298
void setTauPUSType(std::string type)
Definition: CaloParams.h:339
void setTowerLsbSum(double lsb)
Definition: CaloParams.h:231
void setTauCalibrationLUT(const l1t::LUT &lut)
Definition: CaloParams.h:348
void setTauSeedThreshold(double thresh)
Definition: CaloParams.h:331
void setRegionPUSType(std::string type)
Definition: CaloParams.h:245
void setEgCompressShapesLUT(const l1t::LUT &lut)
Definition: CaloParams.h:286
void setTauIsoVetoNrTowersPhi(unsigned iTauIsoVetoNrTowersPhi)
Definition: CaloParams.h:345
void setTauIsoAreaNrTowersPhi(unsigned iTauIsoAreaNrTowersPhi)
Definition: CaloParams.h:344
void setEgIsoAreaNrTowersEta(unsigned iEgIsoAreaNrTowersEta)
Definition: CaloParams.h:293
void setTowerNBitsSum(int n)
Definition: CaloParams.h:234
void setTauMaxJetIsolationA(double cutValue)
Definition: CaloParams.h:336
void setTauMaxJetIsolationB(double limit)
Definition: CaloParams.h:335
void setTauMinPtJetIsolationB(double limit)
Definition: CaloParams.h:334
void setTowerLsbH(double lsb)
Definition: CaloParams.h:229
void setEgMaxHcalEt(double cut)
Definition: CaloParams.h:283
void setEgSeedThreshold(double thresh)
Definition: CaloParams.h:279
void setEtSumEtaMin(unsigned isum, int eta)
Definition: CaloParams.cc:20
void setCentralityLUT(const l1t::LUT &lut)
Definition: CaloParams.h:385
void setEgMinPtJetIsolation(int cutValue)
Definition: CaloParams.h:288
void setEtSumEtaMax(unsigned isum, int eta)
Definition: CaloParams.cc:25
void setTauPUSParams(const std::vector< double > &params)
Definition: CaloParams.h:349
void setEtSumLsb(double lsb)
Definition: CaloParams.h:378
void setJetCalibrationType(std::string type)
Definition: CaloParams.h:368
void setTauLsb(double lsb)
Definition: CaloParams.h:330
void setEgMaxHOverELUT(const l1t::LUT &lut)
Definition: CaloParams.h:285
void setJetNeighbourThreshold(double thresh)
Definition: CaloParams.h:365
void setJetLsb(double lsb)
Definition: CaloParams.h:363
std::string fullPath() const
Definition: FileInPath.cc:165
std::vector< unsigned short int > LUT
Definition: DTTracoLUTs.h:32
void setEgIsoAreaNrTowersPhi(unsigned iEgIsoAreaNrTowersPhi)
Definition: CaloParams.h:294
void setJetPUSType(std::string type)
Definition: CaloParams.h:366
void setEgMaxPtHOverEIsolation(int cutValue)
Definition: CaloParams.h:291
void setTowerNBitsRatio(int n)
Definition: CaloParams.h:235
void setRegionLsb(double lsb)
Definition: CaloParams.h:244
void setTowerNBitsE(int n)
Definition: CaloParams.h:233
void setTowerEncoding(bool doit)
Definition: CaloParams.h:236
void setTauNeighbourThreshold(double thresh)
Definition: CaloParams.h:332
L1TCaloParamsESProducer::~L1TCaloParamsESProducer ( )

Definition at line 236 of file L1TCaloParamsESProducer.cc.

237 {
238 
239  // do anything here that needs to be done at desctruction time
240  // (e.g. close files, deallocate resources etc.)
241 
242 }

Member Function Documentation

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

Definition at line 251 of file L1TCaloParamsESProducer.cc.

252 {
253  using namespace edm::es;
254  boost::shared_ptr<CaloParams> pCaloParams ;
255 
256  pCaloParams = boost::shared_ptr< CaloParams >(new CaloParams(m_params));
257  return pCaloParams;
258 }

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.