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  m_params.setIsoTauEtaMin(conf.getParameter<int> ("isoTauEtaMin"));
181  m_params.setIsoTauEtaMax(conf.getParameter<int> ("isoTauEtaMax"));
182 
183  m_params.setTauPUSParams(conf.getParameter<std::vector<double>>("tauPUSParams"));
184 
185  // jets
186  m_params.setJetLsb(conf.getParameter<double>("jetLsb"));
187  m_params.setJetSeedThreshold(conf.getParameter<double>("jetSeedThreshold"));
188  m_params.setJetNeighbourThreshold(conf.getParameter<double>("jetNeighbourThreshold"));
189  m_params.setJetPUSType(conf.getParameter<std::string>("jetPUSType"));
190  m_params.setJetCalibrationType(conf.getParameter<std::string>("jetCalibrationType"));
191  m_params.setJetCalibrationParams(conf.getParameter<std::vector<double> >("jetCalibrationParams"));
192 
193  // sums
194  m_params.setEtSumLsb(conf.getParameter<double>("etSumLsb"));
195 
196  std::vector<int> etSumEtaMin = conf.getParameter<std::vector<int> >("etSumEtaMin");
197  std::vector<int> etSumEtaMax = conf.getParameter<std::vector<int> >("etSumEtaMax");
198  std::vector<double> etSumEtThreshold = conf.getParameter<std::vector<double> >("etSumEtThreshold");
199 
200  if ((etSumEtaMin.size() == etSumEtaMax.size()) && (etSumEtaMin.size() == etSumEtThreshold.size())) {
201  for (unsigned i=0; i<etSumEtaMin.size(); ++i) {
202  m_params.setEtSumEtaMin(i, etSumEtaMin.at(i));
203  m_params.setEtSumEtaMax(i, etSumEtaMax.at(i));
204  m_params.setEtSumEtThreshold(i, etSumEtThreshold.at(i));
205  }
206  }
207  else {
208  edm::LogError("l1t|calo") << "Inconsistent number of EtSum parameters" << std::endl;
209  }
210 
211  // HI centrality trigger
212  edm::FileInPath centralityLUTFile = conf.getParameter<edm::FileInPath>("centralityLUTFile");
213  std::ifstream centralityLUTStream(centralityLUTFile.fullPath());
214  std::shared_ptr<LUT> centralityLUT( new LUT(centralityLUTStream) );
215  m_params.setCentralityLUT(*centralityLUT);
216 
217  // HI Q2 trigger
218  edm::FileInPath q2LUTFile = conf.getParameter<edm::FileInPath>("q2LUTFile");
219  std::ifstream q2LUTStream(q2LUTFile.fullPath());
220  std::shared_ptr<LUT> q2LUT( new LUT(q2LUTStream) );
221  m_params.setQ2LUT(*q2LUT);
222 
223 
224 }
void setEgCalibrationLUT(const l1t::LUT &lut)
Definition: CaloParams.h:281
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
void setEgMinPtHOverEIsolation(int cutValue)
Definition: CaloParams.h:270
void setTauIsolationLUT(const l1t::LUT &lut)
Definition: CaloParams.h:318
void setTowerNBitsH(int n)
Definition: CaloParams.h:212
void setTauIsoAreaNrTowersEta(unsigned iTauIsoAreaNrTowersEta)
Definition: CaloParams.h:321
void setIsoTauEtaMin(int value)
Definition: CaloParams.h:315
void setTowerLsbE(double lsb)
Definition: CaloParams.h:210
void setEgMaxPtJetIsolation(int cutValue)
Definition: CaloParams.h:269
void setEgPUSParams(const std::vector< double > &params)
Definition: CaloParams.h:277
void setQ2LUT(const l1t::LUT &lut)
Definition: CaloParams.h:364
void setRegionPUSParams(const std::vector< double > &params)
Definition: CaloParams.h:226
void setEgHcalThreshold(double thresh)
Definition: CaloParams.h:261
void setJetCalibrationParams(std::vector< double > params)
Definition: CaloParams.h:344
void setEgMaxPtHOverE(double thresh)
Definition: CaloParams.h:264
void setIsoTauEtaMax(int value)
Definition: CaloParams.h:316
void setEgShapeIdLUT(const l1t::LUT &lut)
Definition: CaloParams.h:267
void setEgIsoVetoNrTowersPhi(unsigned iEgIsoVetoNrTowersPhi)
Definition: CaloParams.h:275
void setTauMaxPtTauVeto(double limit)
Definition: CaloParams.h:311
void setJetSeedThreshold(double thresh)
Definition: CaloParams.h:339
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:258
void setEgPUSType(std::string type)
Definition: CaloParams.h:276
void setEgNeighbourThreshold(double thresh)
Definition: CaloParams.h:260
void setEgTrimmingLUT(const l1t::LUT &lut)
Definition: CaloParams.h:262
void setEgIsolationLUT(const l1t::LUT &lut)
Definition: CaloParams.h:278
void setTauPUSType(std::string type)
Definition: CaloParams.h:317
void setTowerLsbSum(double lsb)
Definition: CaloParams.h:211
void setTauCalibrationLUT(const l1t::LUT &lut)
Definition: CaloParams.h:326
void setTauSeedThreshold(double thresh)
Definition: CaloParams.h:309
void setRegionPUSType(std::string type)
Definition: CaloParams.h:225
void setEgCompressShapesLUT(const l1t::LUT &lut)
Definition: CaloParams.h:266
void setTauIsoVetoNrTowersPhi(unsigned iTauIsoVetoNrTowersPhi)
Definition: CaloParams.h:323
void setTauIsoAreaNrTowersPhi(unsigned iTauIsoAreaNrTowersPhi)
Definition: CaloParams.h:322
void setEgIsoAreaNrTowersEta(unsigned iEgIsoAreaNrTowersEta)
Definition: CaloParams.h:273
void setTowerNBitsSum(int n)
Definition: CaloParams.h:214
void setTauMaxJetIsolationA(double cutValue)
Definition: CaloParams.h:314
void setTauMaxJetIsolationB(double limit)
Definition: CaloParams.h:313
void setTauMinPtJetIsolationB(double limit)
Definition: CaloParams.h:312
void setTowerLsbH(double lsb)
Definition: CaloParams.h:209
void setEgMaxHcalEt(double cut)
Definition: CaloParams.h:263
void setEgSeedThreshold(double thresh)
Definition: CaloParams.h:259
void setEtSumEtaMin(unsigned isum, int eta)
Definition: CaloParams.cc:20
void setCentralityLUT(const l1t::LUT &lut)
Definition: CaloParams.h:360
void setEgMinPtJetIsolation(int cutValue)
Definition: CaloParams.h:268
void setEtSumEtaMax(unsigned isum, int eta)
Definition: CaloParams.cc:25
void setTauPUSParams(const std::vector< double > &params)
Definition: CaloParams.h:327
void setEtSumLsb(double lsb)
Definition: CaloParams.h:353
void setJetCalibrationType(std::string type)
Definition: CaloParams.h:343
void setTauLsb(double lsb)
Definition: CaloParams.h:308
void setEgMaxHOverELUT(const l1t::LUT &lut)
Definition: CaloParams.h:265
void setJetNeighbourThreshold(double thresh)
Definition: CaloParams.h:340
void setJetLsb(double lsb)
Definition: CaloParams.h:338
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:274
void setJetPUSType(std::string type)
Definition: CaloParams.h:341
void setEgMaxPtHOverEIsolation(int cutValue)
Definition: CaloParams.h:271
void setTowerNBitsRatio(int n)
Definition: CaloParams.h:215
void setRegionLsb(double lsb)
Definition: CaloParams.h:224
void setTowerNBitsE(int n)
Definition: CaloParams.h:213
void setTowerEncoding(bool doit)
Definition: CaloParams.h:216
void setTauNeighbourThreshold(double thresh)
Definition: CaloParams.h:310
L1TCaloParamsESProducer::~L1TCaloParamsESProducer ( )

Definition at line 227 of file L1TCaloParamsESProducer.cc.

228 {
229 
230  // do anything here that needs to be done at desctruction time
231  // (e.g. close files, deallocate resources etc.)
232 
233 }

Member Function Documentation

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

Definition at line 242 of file L1TCaloParamsESProducer.cc.

243 {
244  using namespace edm::es;
245  boost::shared_ptr<CaloParams> pCaloParams ;
246 
247  pCaloParams = boost::shared_ptr< CaloParams >(new CaloParams(m_params));
248  return pCaloParams;
249 }

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.