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
l1t::CaloParamsESProducer Class Reference
Inheritance diagram for l1t::CaloParamsESProducer:
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

 CaloParamsESProducer (const edm::ParameterSet &)
 
ReturnType produce (const L1TCaloParamsRcd &)
 
 ~CaloParamsESProducer ()
 
- 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 43 of file CaloParamsESProducer.cc.

Member Typedef Documentation

Definition at line 48 of file CaloParamsESProducer.cc.

Constructor & Destructor Documentation

l1t::CaloParamsESProducer::CaloParamsESProducer ( const edm::ParameterSet conf)

Definition at line 68 of file CaloParamsESProducer.cc.

References edm::FileInPath::fullPath(), edm::ParameterSet::getParameter(), and AlCaHLTBitMon_QueryRunRegistry::string.

69 {
70 
71  //the following line is needed to tell the framework what
72  // data is being produced
73  setWhatProduced(this);
74  //setWhatProduced(this, conf.getParameter<std::string>("label"));
75 
76  // towers
77  m_params.setTowerLsbH(conf.getParameter<double>("towerLsbH"));
78  m_params.setTowerLsbE(conf.getParameter<double>("towerLsbE"));
79  m_params.setTowerLsbSum(conf.getParameter<double>("towerLsbSum"));
80  m_params.setTowerNBitsH(conf.getParameter<int>("towerNBitsH"));
81  m_params.setTowerNBitsE(conf.getParameter<int>("towerNBitsE"));
82  m_params.setTowerNBitsSum(conf.getParameter<int>("towerNBitsSum"));
83  m_params.setTowerNBitsRatio(conf.getParameter<int>("towerNBitsRatio"));
84  m_params.setTowerEncoding(conf.getParameter<bool>("towerEncoding"));
85 
86  // regions
87  m_params.setRegionLsb(conf.getParameter<double>("regionLsb"));
88  m_params.setRegionPUSType(conf.getParameter<std::string>("regionPUSType"));
89  m_params.setRegionPUSParams(conf.getParameter<std::vector<double> >("regionPUSParams"));
90 
91  // EG
92  m_params.setEgLsb(conf.getParameter<double>("egLsb"));
93  m_params.setEgSeedThreshold(conf.getParameter<double>("egSeedThreshold"));
94  m_params.setEgNeighbourThreshold(conf.getParameter<double>("egNeighbourThreshold"));
95  m_params.setEgMaxHcalEt(conf.getParameter<double>("egMaxHcalEt"));
96  m_params.setEgEtToRemoveHECut(conf.getParameter<double>("egEtToRemoveHECut"));
97  m_params.setEgMaxHOverE(conf.getParameter<double>("egMaxHOverE"));
98  m_params.setEgIsoPUSType(conf.getParameter<std::string>("egIsoPUSType"));
99 
100  edm::FileInPath egIsoLUTFile = conf.getParameter<edm::FileInPath>("egIsoLUTFile");
101  std::ifstream egIsoLUTStream(egIsoLUTFile.fullPath());
102  std::shared_ptr<l1t::LUT> egIsoLUT( new l1t::LUT(egIsoLUTStream) );
103  m_params.setEgIsolationLUT(egIsoLUT);
104 
105  m_params.setEgIsoAreaNrTowersEta(conf.getParameter<unsigned int>("egIsoAreaNrTowersEta"));
106  m_params.setEgIsoAreaNrTowersPhi(conf.getParameter<unsigned int>("egIsoAreaNrTowersPhi"));
107  m_params.setEgIsoVetoNrTowersPhi(conf.getParameter<unsigned int>("egIsoVetoNrTowersPhi"));
108  m_params.setEgIsoPUEstTowerGranularity(conf.getParameter<unsigned int>("egIsoPUEstTowerGranularity"));
109  m_params.setEgIsoMaxEtaAbsForTowerSum(conf.getParameter<unsigned int>("egIsoMaxEtaAbsForTowerSum"));
110  m_params.setEgIsoMaxEtaAbsForIsoSum(conf.getParameter<unsigned int>("egIsoMaxEtaAbsForIsoSum"));
111 
112  // tau
113  m_params.setTauLsb(conf.getParameter<double>("tauLsb"));
114  m_params.setTauSeedThreshold(conf.getParameter<double>("tauSeedThreshold"));
115  m_params.setTauNeighbourThreshold(conf.getParameter<double>("tauNeighbourThreshold"));
116  m_params.setTauIsoPUSType(conf.getParameter<std::string>("tauIsoPUSType"));
117 
118  edm::FileInPath tauIsoLUTFile = conf.getParameter<edm::FileInPath>("tauIsoLUTFile");
119  std::ifstream tauIsoLUTStream(tauIsoLUTFile.fullPath());
120  std::shared_ptr<l1t::LUT> tauIsoLUT( new l1t::LUT(tauIsoLUTStream) );
121  m_params.setTauIsolationLUT(tauIsoLUT);
122 
123  // jets
124  m_params.setJetLsb(conf.getParameter<double>("jetLsb"));
125  m_params.setJetSeedThreshold(conf.getParameter<double>("jetSeedThreshold"));
126  m_params.setJetNeighbourThreshold(conf.getParameter<double>("jetNeighbourThreshold"));
127  m_params.setJetPUSType(conf.getParameter<std::string>("jetPUSType"));
128  m_params.setJetCalibrationType(conf.getParameter<std::string>("jetCalibrationType"));
129  m_params.setJetCalibrationParams(conf.getParameter<std::vector<double> >("jetCalibrationParams"));
130 
131  // sums
132  m_params.setEtSumLsb(conf.getParameter<double>("etSumLsb"));
133  m_params.setEtSumEtaMin(0, conf.getParameter<int>("ettEtaMin"));
134  m_params.setEtSumEtaMax(0, conf.getParameter<int>("ettEtaMax"));
135  m_params.setEtSumEtThreshold(0, conf.getParameter<double>("ettEtThreshold"));
136  m_params.setEtSumEtaMin(1, conf.getParameter<int>("httEtaMin"));
137  m_params.setEtSumEtaMax(1, conf.getParameter<int>("httEtaMax"));
138  m_params.setEtSumEtThreshold(1, conf.getParameter<double>("httEtThreshold"));
139  m_params.setEtSumEtaMin(2, conf.getParameter<int>("metEtaMin"));
140  m_params.setEtSumEtaMax(2, conf.getParameter<int>("metEtaMax"));
141  m_params.setEtSumEtThreshold(2, conf.getParameter<double>("metEtThreshold"));
142  m_params.setEtSumEtaMin(3, conf.getParameter<int>("mhtEtaMin"));
143  m_params.setEtSumEtaMax(3, conf.getParameter<int>("mhtEtaMax"));
144  m_params.setEtSumEtThreshold(3, conf.getParameter<double>("mhtEtThreshold"));
145 
146 }
T getParameter(std::string const &) const
void setTowerNBitsH(int n)
Definition: CaloParams.h:49
void setTowerLsbE(double lsb)
Definition: CaloParams.h:47
void setTauIsolationLUT(std::shared_ptr< LUT > lut)
Definition: CaloParams.h:127
void setJetCalibrationParams(std::vector< double > params)
Definition: CaloParams.h:148
void setEgIsoPUEstTowerGranularity(unsigned iEgIsoPUEstTowerGranularity)
Definition: CaloParams.h:101
void setEgIsoVetoNrTowersPhi(unsigned iEgIsoVetoNrTowersPhi)
Definition: CaloParams.h:100
void setJetSeedThreshold(double thresh)
Definition: CaloParams.h:143
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
void setTauIsoPUSType(std::string type)
Definition: CaloParams.h:126
void setEtSumEtThreshold(unsigned isum, double thresh)
Definition: CaloParams.cc:30
void setEgLsb(double lsb)
Definition: CaloParams.h:90
void setEgIsoMaxEtaAbsForIsoSum(unsigned iEgIsoMaxEtaAbsForIsoSum)
Definition: CaloParams.h:103
void setEgNeighbourThreshold(double thresh)
Definition: CaloParams.h:92
void setTowerLsbSum(double lsb)
Definition: CaloParams.h:48
void setEgMaxHOverE(double cut)
Definition: CaloParams.h:95
void setEgEtToRemoveHECut(double thresh)
Definition: CaloParams.h:94
void setTauSeedThreshold(double thresh)
Definition: CaloParams.h:123
void setRegionPUSType(std::string type)
Definition: CaloParams.h:62
Definition: LUT.h:27
void setEgIsoAreaNrTowersEta(unsigned iEgIsoAreaNrTowersEta)
Definition: CaloParams.h:98
void setTowerNBitsSum(int n)
Definition: CaloParams.h:51
void setTowerLsbH(double lsb)
Definition: CaloParams.h:46
void setEgMaxHcalEt(double cut)
Definition: CaloParams.h:93
void setEgSeedThreshold(double thresh)
Definition: CaloParams.h:91
void setEtSumEtaMin(unsigned isum, int eta)
Definition: CaloParams.cc:20
void setEgIsolationLUT(std::shared_ptr< LUT > lut)
Definition: CaloParams.h:105
void setEgIsoPUSType(std::string type)
Definition: CaloParams.h:104
void setEtSumEtaMax(unsigned isum, int eta)
Definition: CaloParams.cc:25
void setEgIsoMaxEtaAbsForTowerSum(unsigned iEgIsoMaxEtaAbsForTowerSum)
Definition: CaloParams.h:102
void setEtSumLsb(double lsb)
Definition: CaloParams.h:158
void setJetCalibrationType(std::string type)
Definition: CaloParams.h:147
void setTauLsb(double lsb)
Definition: CaloParams.h:122
void setJetNeighbourThreshold(double thresh)
Definition: CaloParams.h:144
void setJetLsb(double lsb)
Definition: CaloParams.h:142
std::string fullPath() const
Definition: FileInPath.cc:165
void setEgIsoAreaNrTowersPhi(unsigned iEgIsoAreaNrTowersPhi)
Definition: CaloParams.h:99
void setJetPUSType(std::string type)
Definition: CaloParams.h:145
void setTowerNBitsRatio(int n)
Definition: CaloParams.h:52
void setRegionLsb(double lsb)
Definition: CaloParams.h:61
void setTowerNBitsE(int n)
Definition: CaloParams.h:50
void setTowerEncoding(bool doit)
Definition: CaloParams.h:53
void setTauNeighbourThreshold(double thresh)
Definition: CaloParams.h:124
void setRegionPUSParams(std::vector< double > params)
Definition: CaloParams.h:63
l1t::CaloParamsESProducer::~CaloParamsESProducer ( )

Definition at line 149 of file CaloParamsESProducer.cc.

150 {
151 
152  // do anything here that needs to be done at desctruction time
153  // (e.g. close files, deallocate resources etc.)
154 
155 }

Member Function Documentation

CaloParamsESProducer::ReturnType l1t::CaloParamsESProducer::produce ( const L1TCaloParamsRcd iRecord)

Definition at line 164 of file CaloParamsESProducer.cc.

165 {
166  using namespace edm::es;
167  boost::shared_ptr<CaloParams> pCaloParams ;
168 
169  pCaloParams = boost::shared_ptr< CaloParams >(new CaloParams(m_params));
170  return pCaloParams;
171 }

Member Data Documentation

std::string l1t::CaloParamsESProducer::m_label
private

Definition at line 54 of file CaloParamsESProducer.cc.

CaloParams l1t::CaloParamsESProducer::m_params
private

Definition at line 53 of file CaloParamsESProducer.cc.