CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Attributes
HcalHardcodeCalibrations Class Reference

#include <HcalHardcodeCalibrations.h>

Inheritance diagram for HcalHardcodeCalibrations:
edm::ESProducer edm::EventSetupRecordIntervalFinder edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

 HcalHardcodeCalibrations (const edm::ParameterSet &)
 
void produce ()
 
 ~HcalHardcodeCalibrations ()
 
- 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 ()
 
- Public Member Functions inherited from edm::EventSetupRecordIntervalFinder
const
eventsetup::ComponentDescription
descriptionForFinder () const
 
 EventSetupRecordIntervalFinder ()
 
std::set
< eventsetup::EventSetupRecordKey
findingForRecords () const
 
const ValidityIntervalfindIntervalFor (const eventsetup::EventSetupRecordKey &, const IOVSyncValue &)
 
void setDescriptionForFinder (const eventsetup::ComponentDescription &iDescription)
 
virtual ~EventSetupRecordIntervalFinder ()
 

Protected Member Functions

std::auto_ptr< HcalChannelQualityproduceChannelQuality (const HcalChannelQualityRcd &rcd)
 
std::auto_ptr
< HcalCholeskyMatrices
produceCholeskyMatrices (const HcalCholeskyMatricesRcd &rcd)
 
std::auto_ptr
< HcalCovarianceMatrices
produceCovarianceMatrices (const HcalCovarianceMatricesRcd &rcd)
 
std::auto_ptr< HcalDcsMapproduceDcsMap (const HcalDcsMapRcd &rcd)
 
std::auto_ptr< HcalDcsValuesproduceDcsValues (const HcalDcsRcd &rcd)
 
std::auto_ptr< HcalElectronicsMapproduceElectronicsMap (const HcalElectronicsMapRcd &rcd)
 
std::auto_ptr
< HcalFlagHFDigiTimeParams
produceFlagHFDigiTimeParams (const HcalFlagHFDigiTimeParamsRcd &rcd)
 
std::auto_ptr< HcalGainsproduceGains (const HcalGainsRcd &rcd)
 
std::auto_ptr< HcalGainWidthsproduceGainWidths (const HcalGainWidthsRcd &rcd)
 
std::auto_ptr
< HcalL1TriggerObjects
produceL1TriggerObjects (const HcalL1TriggerObjectsRcd &rcd)
 
std::auto_ptr< HcalLongRecoParamsproduceLongRecoParams (const HcalLongRecoParamsRcd &rcd)
 
std::auto_ptr< HcalLUTCorrsproduceLUTCorrs (const HcalLUTCorrsRcd &rcd)
 
std::auto_ptr< HcalLutMetadataproduceLutMetadata (const HcalLutMetadataRcd &rcd)
 
std::auto_ptr< HcalMCParamsproduceMCParams (const HcalMCParamsRcd &rcd)
 
std::auto_ptr< HcalPedestalsproducePedestals (const HcalPedestalsRcd &rcd)
 
std::auto_ptr< HcalPedestalWidthsproducePedestalWidths (const HcalPedestalWidthsRcd &rcd)
 
std::auto_ptr< HcalPFCorrsproducePFCorrs (const HcalPFCorrsRcd &rcd)
 
std::auto_ptr< HcalQIEDataproduceQIEData (const HcalQIEDataRcd &rcd)
 
std::auto_ptr< HcalRecoParamsproduceRecoParams (const HcalRecoParamsRcd &rcd)
 
std::auto_ptr< HcalRespCorrsproduceRespCorrs (const HcalRespCorrsRcd &rcd)
 
std::auto_ptr< HcalTimeCorrsproduceTimeCorrs (const HcalTimeCorrsRcd &rcd)
 
std::auto_ptr< HcalTimingParamsproduceTimingParams (const HcalTimingParamsRcd &rcd)
 
std::auto_ptr
< HcalValidationCorrs
produceValidationCorrs (const HcalValidationCorrsRcd &rcd)
 
std::auto_ptr< HcalZSThresholdsproduceZSThresholds (const HcalZSThresholdsRcd &rcd)
 
virtual void setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)
 
- 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 &)
 
- Protected Member Functions inherited from edm::EventSetupRecordIntervalFinder
template<class T >
void findingRecord ()
 
void findingRecordWithKey (const eventsetup::EventSetupRecordKey &)
 

Private Attributes

HERecalibrationhe_recalibration
 
HFRecalibrationhf_recalibration
 
double iLumi
 
bool switchGainWidthsForTrigPrims
 

Additional Inherited Members

- 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
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 

Detailed Description

Definition at line 44 of file HcalHardcodeCalibrations.h.

Constructor & Destructor Documentation

HcalHardcodeCalibrations::HcalHardcodeCalibrations ( const edm::ParameterSet iConfig)

Definition at line 110 of file HcalHardcodeCalibrations.cc.

References cond::ecalcond::all, prof2calltree::cutoff, edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), he_recalibration, hf_recalibration, i, iLumi, mergeVDriftHistosByStation::name, summarizeEdmComparisonLogfiles::objectName, produceChannelQuality(), produceCholeskyMatrices(), produceCovarianceMatrices(), produceDcsMap(), produceDcsValues(), produceElectronicsMap(), produceFlagHFDigiTimeParams(), produceGains(), produceGainWidths(), produceL1TriggerObjects(), produceLongRecoParams(), produceLUTCorrs(), produceLutMetadata(), produceMCParams(), producePedestals(), producePedestalWidths(), producePFCorrs(), produceQIEData(), produceRecoParams(), produceRespCorrs(), produceTimeCorrs(), produceValidationCorrs(), produceZSThresholds(), HERecalibration::setDsegm(), edm::ESProducer::setWhatProduced(), switchGainWidthsForTrigPrims, and convertSQLitetoXML_cfg::toGet.

111 {
112  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::HcalHardcodeCalibrations->...";
113 
114  if ( iConfig.exists("GainWidthsForTrigPrims") )
115  switchGainWidthsForTrigPrims = iConfig.getParameter<bool>("GainWidthsForTrigPrims");
116  else switchGainWidthsForTrigPrims = false;
117 
118 
119  // HE and HF recalibration preparation
120  iLumi = 0.;
121  if ( iConfig.exists("iLumi") )
122  iLumi=iConfig.getParameter<double>("iLumi");
123 
124  if( iLumi > 0.0 ) {
125  bool he_recalib = iConfig.getParameter<bool>("HERecalibration");
126  bool hf_recalib = iConfig.getParameter<bool>("HFRecalibration");
127  if(he_recalib) {
128  double cutoff = iConfig.getParameter<double>("HEreCalibCutoff");
129  he_recalibration = new HERecalibration(iLumi,cutoff);
130  }
131  if(hf_recalib) hf_recalibration = new HFRecalibration();
132 
133  // std::cout << " HcalHardcodeCalibrations: iLumi = " << iLumi << std::endl;
134  }
135 
136  bool relabel_=false;
137  edm::ParameterSet ps0;
138  if ( iConfig.exists("HcalReLabel") ) {
139  ps0 = iConfig.getParameter<edm::ParameterSet>("HcalReLabel");
140  relabel_= ps0.getUntrackedParameter<bool>("RelabelHits",false);
141  }
142 
143  if (relabel_) {
144  std::vector<std::vector<int>> m_segmentation;
145  m_segmentation.resize(29);
146  edm::ParameterSet ps1 = ps0.getUntrackedParameter<edm::ParameterSet>("RelabelRules");
147  for (int i = 0; i < 29; i++) {
148  char name[10];
149  snprintf(name,10,"Eta%d",i+1);
150  if (i > 0) {
151  m_segmentation[i]=
152  ps1.getUntrackedParameter<std::vector<int>>(name,m_segmentation[i-1]);
153  } else {
154  m_segmentation[i]=ps1.getUntrackedParameter<std::vector<int> >(name);
155  }
156 
157  /*
158  std::cout << name;
159  for (unsigned int k=0; k<m_segmentation[i].size(); k++) {
160  std::cout << " [" << k << "] " << m_segmentation[i][k];
161  }
162  std::cout << std::endl;
163  */
164 
165  }
166 
167  if(he_recalibration !=0) he_recalibration->setDsegm(m_segmentation);
168  }
169 
170 
171  std::vector <std::string> toGet = iConfig.getUntrackedParameter <std::vector <std::string> > ("toGet");
172  for(std::vector <std::string>::iterator objectName = toGet.begin(); objectName != toGet.end(); ++objectName ) {
173  bool all = *objectName == "all";
174  if ((*objectName == "Pedestals") || all) {
176  findingRecord <HcalPedestalsRcd> ();
177  }
178  if ((*objectName == "PedestalWidths") || all) {
180  findingRecord <HcalPedestalWidthsRcd> ();
181  }
182  if ((*objectName == "Gains") || all) {
184  findingRecord <HcalGainsRcd> ();
185  }
186  if ((*objectName == "GainWidths") || all) {
188  findingRecord <HcalGainWidthsRcd> ();
189  }
190  if ((*objectName == "QIEData") || all) {
192  findingRecord <HcalQIEDataRcd> ();
193  }
194  if ((*objectName == "ChannelQuality") || (*objectName == "channelQuality") || all) {
196  findingRecord <HcalChannelQualityRcd> ();
197  }
198  if ((*objectName == "ElectronicsMap") || (*objectName == "electronicsMap") || all) {
200  findingRecord <HcalElectronicsMapRcd> ();
201  }
202  if ((*objectName == "ZSThresholds") || (*objectName == "zsThresholds") || all) {
204  findingRecord <HcalZSThresholdsRcd> ();
205  }
206  if ((*objectName == "RespCorrs") || (*objectName == "ResponseCorrection") || all) {
208  findingRecord <HcalRespCorrsRcd> ();
209  }
210  if ((*objectName == "LUTCorrs") || (*objectName == "LUTCorrection") || all) {
212  findingRecord <HcalLUTCorrsRcd> ();
213  }
214  if ((*objectName == "PFCorrs") || (*objectName == "PFCorrection") || all) {
216  findingRecord <HcalPFCorrsRcd> ();
217  }
218  if ((*objectName == "TimeCorrs") || (*objectName == "TimeCorrection") || all) {
220  findingRecord <HcalTimeCorrsRcd> ();
221  }
222  if ((*objectName == "L1TriggerObjects") || (*objectName == "L1Trigger") || all) {
224  findingRecord <HcalL1TriggerObjectsRcd> ();
225  }
226  if ((*objectName == "ValidationCorrs") || (*objectName == "ValidationCorrection") || all) {
228  findingRecord <HcalValidationCorrsRcd> ();
229  }
230  if ((*objectName == "LutMetadata") || (*objectName == "lutMetadata") || all) {
232  findingRecord <HcalLutMetadataRcd> ();
233  }
234  if ((*objectName == "DcsValues") || all) {
236  findingRecord <HcalDcsRcd> ();
237  }
238  if ((*objectName == "DcsMap") || (*objectName == "dcsMap") || all) {
240  findingRecord <HcalDcsMapRcd> ();
241  }
242  if ((*objectName == "RecoParams") || all) {
244  findingRecord <HcalRecoParamsRcd> ();
245  }
246  if ((*objectName == "LongRecoParams") || all) {
248  findingRecord <HcalLongRecoParamsRcd> ();
249  }
250  if ((*objectName == "MCParams") || all) {
252  findingRecord <HcalMCParamsRcd> ();
253  }
254  if ((*objectName == "FlagHFDigiTimeParams") || all) {
256  findingRecord <HcalFlagHFDigiTimeParamsRcd> ();
257  }
258  if ((*objectName == "CholeskyMatrices") || all) {
260  findingRecord <HcalCholeskyMatricesRcd> ();
261  }
262  if ((*objectName == "CovarianceMatrices") || all) {
264  findingRecord <HcalCovarianceMatricesRcd> ();
265  }
266  }
267 }
std::auto_ptr< HcalPedestalWidths > producePedestalWidths(const HcalPedestalWidthsRcd &rcd)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
std::auto_ptr< HcalLUTCorrs > produceLUTCorrs(const HcalLUTCorrsRcd &rcd)
std::auto_ptr< HcalDcsMap > produceDcsMap(const HcalDcsMapRcd &rcd)
void setDsegm(const std::vector< std::vector< int > > &m_segmentation)
std::auto_ptr< HcalQIEData > produceQIEData(const HcalQIEDataRcd &rcd)
bool exists(std::string const &parameterName) const
checks if a parameter exists
std::auto_ptr< HcalLutMetadata > produceLutMetadata(const HcalLutMetadataRcd &rcd)
std::auto_ptr< HcalZSThresholds > produceZSThresholds(const HcalZSThresholdsRcd &rcd)
std::auto_ptr< HcalDcsValues > produceDcsValues(const HcalDcsRcd &rcd)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
std::auto_ptr< HcalChannelQuality > produceChannelQuality(const HcalChannelQualityRcd &rcd)
std::auto_ptr< HcalTimeCorrs > produceTimeCorrs(const HcalTimeCorrsRcd &rcd)
std::auto_ptr< HcalRecoParams > produceRecoParams(const HcalRecoParamsRcd &rcd)
std::auto_ptr< HcalGains > produceGains(const HcalGainsRcd &rcd)
std::auto_ptr< HcalRespCorrs > produceRespCorrs(const HcalRespCorrsRcd &rcd)
std::auto_ptr< HcalLongRecoParams > produceLongRecoParams(const HcalLongRecoParamsRcd &rcd)
std::auto_ptr< HcalElectronicsMap > produceElectronicsMap(const HcalElectronicsMapRcd &rcd)
std::auto_ptr< HcalPFCorrs > producePFCorrs(const HcalPFCorrsRcd &rcd)
std::auto_ptr< HcalCovarianceMatrices > produceCovarianceMatrices(const HcalCovarianceMatricesRcd &rcd)
std::auto_ptr< HcalMCParams > produceMCParams(const HcalMCParamsRcd &rcd)
std::auto_ptr< HcalFlagHFDigiTimeParams > produceFlagHFDigiTimeParams(const HcalFlagHFDigiTimeParamsRcd &rcd)
std::auto_ptr< HcalCholeskyMatrices > produceCholeskyMatrices(const HcalCholeskyMatricesRcd &rcd)
std::auto_ptr< HcalGainWidths > produceGainWidths(const HcalGainWidthsRcd &rcd)
std::auto_ptr< HcalValidationCorrs > produceValidationCorrs(const HcalValidationCorrsRcd &rcd)
std::auto_ptr< HcalPedestals > producePedestals(const HcalPedestalsRcd &rcd)
std::auto_ptr< HcalL1TriggerObjects > produceL1TriggerObjects(const HcalL1TriggerObjectsRcd &rcd)
HcalHardcodeCalibrations::~HcalHardcodeCalibrations ( )

Definition at line 270 of file HcalHardcodeCalibrations.cc.

References he_recalibration, and hf_recalibration.

271 {
272  if (he_recalibration != 0 ) delete he_recalibration;
273  if (hf_recalibration != 0 ) delete hf_recalibration;
274 }

Member Function Documentation

void HcalHardcodeCalibrations::produce ( )
inline
std::auto_ptr< HcalChannelQuality > HcalHardcodeCalibrations::produceChannelQuality ( const HcalChannelQualityRcd rcd)
protected

Definition at line 374 of file HcalHardcodeCalibrations.cc.

References edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), and query::result.

Referenced by HcalHardcodeCalibrations().

374  {
375  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceChannelQuality-> ...";
377  rcd.getRecord<IdealGeometryRecord>().get(htopo);
378  const HcalTopology* topo=&(*htopo);
379 
380  std::auto_ptr<HcalChannelQuality> result (new HcalChannelQuality (topo));
381  std::vector <HcalGenericDetId> cells = allCells(*topo);
382  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
383  HcalChannelStatus item(cell->rawId(),0);
384  result->addValues(item);
385  }
386  return result;
387 }
tuple result
Definition: query.py:137
std::auto_ptr< HcalCholeskyMatrices > HcalHardcodeCalibrations::produceCholeskyMatrices ( const HcalCholeskyMatricesRcd rcd)
protected

Definition at line 688 of file HcalHardcodeCalibrations.cc.

References edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HcalGenericDetId::HcalGenBarrel, HcalGenericDetId::HcalGenEndcap, HcalGenericDetId::HcalGenForward, HcalGenericDetId::HcalGenOuter, and query::result.

Referenced by HcalHardcodeCalibrations().

688  {
689 
691  rec.getRecord<IdealGeometryRecord>().get(htopo);
692  const HcalTopology* topo=&(*htopo);
693  std::auto_ptr<HcalCholeskyMatrices> result (new HcalCholeskyMatrices (topo));
694 
695  std::vector <HcalGenericDetId> cells = allCells(*topo);
696  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
697 
698  int sub = cell->genericSubdet();
699 
700  if (sub == HcalGenericDetId::HcalGenBarrel ||
704  HcalCholeskyMatrix item(cell->rawId());
705  result->addValues(item);
706  }
707  }
708  return result;
709 
710 }
tuple result
Definition: query.py:137
std::auto_ptr< HcalCovarianceMatrices > HcalHardcodeCalibrations::produceCovarianceMatrices ( const HcalCovarianceMatricesRcd rcd)
protected

Definition at line 711 of file HcalHardcodeCalibrations.cc.

References edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), and query::result.

Referenced by HcalHardcodeCalibrations().

711  {
712 
714  rec.getRecord<IdealGeometryRecord>().get(htopo);
715  const HcalTopology* topo=&(*htopo);
716  std::auto_ptr<HcalCovarianceMatrices> result (new HcalCovarianceMatrices (topo));
717  std::vector <HcalGenericDetId> cells = allCells(*topo);
718  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
719 
720  HcalCovarianceMatrix item(cell->rawId());
721  result->addValues(item);
722  }
723  return result;
724 }
tuple result
Definition: query.py:137
std::auto_ptr< HcalDcsMap > HcalHardcodeCalibrations::produceDcsMap ( const HcalDcsMapRcd rcd)
protected

Definition at line 577 of file HcalHardcodeCalibrations.cc.

References HcalDbHardcode::makeHardcodeDcsMap(), and query::result.

Referenced by HcalHardcodeCalibrations().

577  {
578  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceDcsMap-> ...";
579 
580  std::auto_ptr<HcalDcsMap> result (new HcalDcsMap ());
582  return result;
583 }
void makeHardcodeDcsMap(HcalDcsMap &dcs_map)
tuple result
Definition: query.py:137
std::auto_ptr< HcalDcsValues > HcalHardcodeCalibrations::produceDcsValues ( const HcalDcsRcd rcd)
protected

Definition at line 571 of file HcalHardcodeCalibrations.cc.

References query::result.

Referenced by HcalHardcodeCalibrations().

571  {
572  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceDcsValues-> ...";
573  std::auto_ptr<HcalDcsValues> result(new HcalDcsValues);
574  return result;
575 }
tuple result
Definition: query.py:137
std::auto_ptr< HcalElectronicsMap > HcalHardcodeCalibrations::produceElectronicsMap ( const HcalElectronicsMapRcd rcd)
protected

Definition at line 516 of file HcalHardcodeCalibrations.cc.

References HcalDbHardcode::makeHardcodeMap(), and query::result.

Referenced by HcalHardcodeCalibrations().

516  {
517  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceElectronicsMap-> ...";
518 
519  std::auto_ptr<HcalElectronicsMap> result (new HcalElectronicsMap ());
521  return result;
522 }
void makeHardcodeMap(HcalElectronicsMap &emap)
tuple result
Definition: query.py:137
std::auto_ptr< HcalFlagHFDigiTimeParams > HcalHardcodeCalibrations::produceFlagHFDigiTimeParams ( const HcalFlagHFDigiTimeParamsRcd rcd)
protected

Definition at line 660 of file HcalHardcodeCalibrations.cc.

References edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), and query::result.

Referenced by HcalHardcodeCalibrations().

660  {
661  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceFlagHFDigiTimeParams-> ...";
663  rec.getRecord<IdealGeometryRecord>().get(htopo);
664  const HcalTopology* topo=&(*htopo);
665 
666  std::auto_ptr<HcalFlagHFDigiTimeParams> result (new HcalFlagHFDigiTimeParams (topo));
667  std::vector <HcalGenericDetId> cells = allCells(*topo);
668 
669  std::vector<double> coef;
670  coef.push_back(0.93);
671  coef.push_back(-0.38275);
672  coef.push_back(-0.012667);
673 
674  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
675  HcalFlagHFDigiTimeParam item(cell->rawId(),
676  1, //firstsample
677  3, // samplestoadd
678  2, //expectedpeak
679  40., // min energy threshold
680  coef // coefficients
681  );
682  result->addValues(item);
683  }
684  return result;
685 }
tuple result
Definition: query.py:137
std::auto_ptr< HcalGains > HcalHardcodeCalibrations::produceGains ( const HcalGainsRcd rcd)
protected

Definition at line 316 of file HcalHardcodeCalibrations.cc.

References edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HcalDbHardcode::makeGain(), and query::result.

Referenced by HcalHardcodeCalibrations().

316  {
317  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceGains-> ...";
319  rec.getRecord<IdealGeometryRecord>().get(htopo);
320  const HcalTopology* topo=&(*htopo);
321 
322  std::auto_ptr<HcalGains> result (new HcalGains (topo));
323  std::vector <HcalGenericDetId> cells = allCells(*topo);
324  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
325  HcalGain item = HcalDbHardcode::makeGain (*cell);
326  result->addValues(item);
327  }
328  return result;
329 }
HcalGain makeGain(HcalGenericDetId fId, bool fSmear=false)
tuple result
Definition: query.py:137
std::auto_ptr< HcalGainWidths > HcalHardcodeCalibrations::produceGainWidths ( const HcalGainWidthsRcd rcd)
protected

Definition at line 331 of file HcalHardcodeCalibrations.cc.

References edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HcalDbHardcode::makeGainWidth(), query::result, and switchGainWidthsForTrigPrims.

Referenced by HcalHardcodeCalibrations().

331  {
332  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceGainWidths-> ...";
334  rec.getRecord<IdealGeometryRecord>().get(htopo);
335  const HcalTopology* topo=&(*htopo);
336 
337  std::auto_ptr<HcalGainWidths> result (new HcalGainWidths (topo));
338  std::vector <HcalGenericDetId> cells = allCells(*topo);
339  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
340 
341  // for Upgrade - include TrigPrims, for regular case - only HcalDetId
344  result->addValues(item);
345  } else if (!cell->isHcalTrigTowerDetId()) {
347  result->addValues(item);
348  }
349  }
350  return result;
351 }
tuple result
Definition: query.py:137
HcalGainWidth makeGainWidth(HcalGenericDetId fId)
std::auto_ptr< HcalL1TriggerObjects > HcalHardcodeCalibrations::produceL1TriggerObjects ( const HcalL1TriggerObjectsRcd rcd)
protected

Definition at line 495 of file HcalHardcodeCalibrations.cc.

References edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), and query::result.

Referenced by HcalHardcodeCalibrations().

495  {
496  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceL1TriggerObjects-> ...";
498  rcd.getRecord<IdealGeometryRecord>().get(htopo);
499  const HcalTopology* topo=&(*htopo);
500 
501  std::auto_ptr<HcalL1TriggerObjects> result (new HcalL1TriggerObjects (topo));
502  std::vector <HcalGenericDetId> cells = allCells(*topo);
503  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
504  HcalL1TriggerObject item(cell->rawId(),0., 1., 0);
505  result->addValues(item);
506  }
507  // add tag and algo values
508  result->setTagString("hardcoded");
509  result->setAlgoString("hardcoded");
510  return result;
511 }
tuple result
Definition: query.py:137
std::auto_ptr< HcalLongRecoParams > HcalHardcodeCalibrations::produceLongRecoParams ( const HcalLongRecoParamsRcd rcd)
protected

Definition at line 613 of file HcalHardcodeCalibrations.cc.

References edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), and query::result.

Referenced by HcalHardcodeCalibrations().

613  {
614  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceLongRecoParams-> ...";
616  rec.getRecord<IdealGeometryRecord>().get(htopo);
617  const HcalTopology* topo=&(*htopo);
618 
619  std::auto_ptr<HcalLongRecoParams> result (new HcalLongRecoParams (topo));
620  std::vector <HcalGenericDetId> cells = allCells(*topo);
621  std::vector <unsigned int> mSignal;
622  mSignal.push_back(4);
623  mSignal.push_back(5);
624  mSignal.push_back(6);
625  std::vector <unsigned int> mNoise;
626  mNoise.push_back(1);
627  mNoise.push_back(2);
628  mNoise.push_back(3);
629  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
630  if (cell->isHcalZDCDetId())
631  {
632  HcalLongRecoParam item(cell->rawId(),mSignal,mNoise);
633  result->addValues(item);
634  }
635  }
636  return result;
637 }
tuple result
Definition: query.py:137
std::auto_ptr< HcalLUTCorrs > HcalHardcodeCalibrations::produceLUTCorrs ( const HcalLUTCorrsRcd rcd)
protected

Definition at line 434 of file HcalHardcodeCalibrations.cc.

References edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), and query::result.

Referenced by HcalHardcodeCalibrations().

434  {
435  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceLUTCorrs-> ...";
437  rcd.getRecord<IdealGeometryRecord>().get(htopo);
438  const HcalTopology* topo=&(*htopo);
439 
440  std::auto_ptr<HcalLUTCorrs> result (new HcalLUTCorrs (topo));
441  std::vector <HcalGenericDetId> cells = allCells(*topo);
442  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
443  HcalLUTCorr item(cell->rawId(),1.0);
444  result->addValues(item);
445  }
446  return result;
447 }
tuple result
Definition: query.py:137
std::auto_ptr< HcalLutMetadata > HcalHardcodeCalibrations::produceLutMetadata ( const HcalLutMetadataRcd rcd)
protected

Definition at line 539 of file HcalHardcodeCalibrations.cc.

References edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), and query::result.

Referenced by HcalHardcodeCalibrations().

539  {
540  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceLutMetadata-> ...";
542  rcd.getRecord<IdealGeometryRecord>().get(htopo);
543  const HcalTopology* topo=&(*htopo);
544 
545  std::auto_ptr<HcalLutMetadata> result (new HcalLutMetadata (topo));
546 
547  result->setRctLsb( 0.5 );
548  result->setNominalGain(0.003333); // for HBHE SiPMs
549 
550  std::vector <HcalGenericDetId> cells = allCells(*topo);
551  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
552 
553  /*
554  if (cell->isHcalTrigTowerDetId()) {
555  HcalTrigTowerDetId ht = HcalTrigTowerDetId(*cell);
556  int ieta = ht.ieta();
557  int iphi = ht.iphi();
558  std::cout << " HcalTrigTower cell (ieta,iphi) = "
559  << ieta << ", " << iphi << std::endl;
560  }
561  */
562 
563  HcalLutMetadatum item(cell->rawId(),1.0,1,1);
564  result->addValues(item);
565  }
566 
567  return result;
568 }
tuple result
Definition: query.py:137
std::auto_ptr< HcalMCParams > HcalHardcodeCalibrations::produceMCParams ( const HcalMCParamsRcd rcd)
protected

Definition at line 639 of file HcalHardcodeCalibrations.cc.

References edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HcalDbHardcode::makeMCParam(), and query::result.

Referenced by HcalHardcodeCalibrations().

639  {
640 
641 
642  // std::cout << std::endl << " .... HcalHardcodeCalibrations::produceMCParams ->"<< std::endl;
643 
644  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceMCParams-> ...";
646  rec.getRecord<IdealGeometryRecord>().get(htopo);
647  const HcalTopology* topo=&(*htopo);
648  std::auto_ptr<HcalMCParams> result (new HcalMCParams (topo));
649  std::vector <HcalGenericDetId> cells = allCells(*topo);
650  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
651 
652  // HcalMCParam item(cell->rawId(),0);
654  result->addValues(item);
655  }
656  return result;
657 }
tuple result
Definition: query.py:137
HcalMCParam makeMCParam(HcalGenericDetId fId)
std::auto_ptr< HcalPedestals > HcalHardcodeCalibrations::producePedestals ( const HcalPedestalsRcd rcd)
protected

Definition at line 286 of file HcalHardcodeCalibrations.cc.

References edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), iLumi, HcalDbHardcode::makePedestal(), and query::result.

Referenced by HcalHardcodeCalibrations().

286  {
287  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::producePedestals-> ...";
289  rec.getRecord<IdealGeometryRecord>().get(htopo);
290  const HcalTopology* topo=&(*htopo);
291 
292  std::auto_ptr<HcalPedestals> result (new HcalPedestals (topo,false));
293  std::vector <HcalGenericDetId> cells = allCells(*topo);
294  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
295  HcalPedestal item = HcalDbHardcode::makePedestal (*cell, false, iLumi);
296  result->addValues(item);
297  }
298  return result;
299 }
tuple result
Definition: query.py:137
HcalPedestal makePedestal(HcalGenericDetId fId, bool fSmear=false)
std::auto_ptr< HcalPedestalWidths > HcalHardcodeCalibrations::producePedestalWidths ( const HcalPedestalWidthsRcd rcd)
protected

Definition at line 301 of file HcalHardcodeCalibrations.cc.

References edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), iLumi, HcalDbHardcode::makePedestalWidth(), and query::result.

Referenced by HcalHardcodeCalibrations().

301  {
302  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::producePedestalWidths-> ...";
304  rec.getRecord<IdealGeometryRecord>().get(htopo);
305  const HcalTopology* topo=&(*htopo);
306 
307  std::auto_ptr<HcalPedestalWidths> result (new HcalPedestalWidths (topo,false));
308  std::vector <HcalGenericDetId> cells = allCells(*htopo);
309  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
311  result->addValues(item);
312  }
313  return result;
314 }
HcalPedestalWidth makePedestalWidth(HcalGenericDetId fId)
tuple result
Definition: query.py:137
std::auto_ptr< HcalPFCorrs > HcalHardcodeCalibrations::producePFCorrs ( const HcalPFCorrsRcd rcd)
protected

Definition at line 449 of file HcalHardcodeCalibrations.cc.

References edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), and query::result.

Referenced by HcalHardcodeCalibrations().

449  {
450  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::producePFCorrs-> ...";
452  rcd.getRecord<IdealGeometryRecord>().get(htopo);
453  const HcalTopology* topo=&(*htopo);
454 
455  std::auto_ptr<HcalPFCorrs> result (new HcalPFCorrs (topo));
456  std::vector <HcalGenericDetId> cells = allCells(*topo);
457  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
458  HcalPFCorr item(cell->rawId(),1.0);
459  result->addValues(item);
460  }
461  return result;
462 }
tuple result
Definition: query.py:137
std::auto_ptr< HcalQIEData > HcalHardcodeCalibrations::produceQIEData ( const HcalQIEDataRcd rcd)
protected

Definition at line 353 of file HcalHardcodeCalibrations.cc.

References edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HcalDbHardcode::makeQIECoder(), and query::result.

Referenced by HcalHardcodeCalibrations().

353  {
354  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceQIEData-> ...";
355 
356  /*
357  std::cout << std::endl << ">>> HcalHardcodeCalibrations::produceQIEData"
358  << std::endl;
359  */
360 
362  rcd.getRecord<IdealGeometryRecord>().get(htopo);
363  const HcalTopology* topo=&(*htopo);
364 
365  std::auto_ptr<HcalQIEData> result (new HcalQIEData (topo));
366  std::vector <HcalGenericDetId> cells = allCells(*topo);
367  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
369  result->addCoder (coder);
370  }
371  return result;
372 }
HcalQIECoder makeQIECoder(HcalGenericDetId fId)
tuple result
Definition: query.py:137
std::auto_ptr< HcalRecoParams > HcalHardcodeCalibrations::produceRecoParams ( const HcalRecoParamsRcd rcd)
protected

Definition at line 585 of file HcalHardcodeCalibrations.cc.

References edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HcalDbHardcode::makeRecoParam(), and query::result.

Referenced by HcalHardcodeCalibrations().

585  {
586  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceRecoParams-> ...";
588  rec.getRecord<IdealGeometryRecord>().get(htopo);
589  const HcalTopology* topo=&(*htopo);
590 
591  std::auto_ptr<HcalRecoParams> result (new HcalRecoParams (topo));
592  std::vector <HcalGenericDetId> cells = allCells(*topo);
593  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
595  result->addValues(item);
596  }
597  return result;
598 }
tuple result
Definition: query.py:137
HcalRecoParam makeRecoParam(HcalGenericDetId fId)
std::auto_ptr< HcalRespCorrs > HcalHardcodeCalibrations::produceRespCorrs ( const HcalRespCorrsRcd rcd)
protected

Definition at line 390 of file HcalHardcodeCalibrations.cc.

References corr, HcalDetId::depth(), HFRecalibration::getCorr(), HERecalibration::getCorr(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HcalGenericDetId::HcalGenEndcap, HcalGenericDetId::HcalGenForward, he_recalibration, hf_recalibration, HcalDetId::ieta(), iLumi, and query::result.

Referenced by HcalHardcodeCalibrations().

390  {
391  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceRespCorrs-> ...";
393  rcd.getRecord<IdealGeometryRecord>().get(htopo);
394  const HcalTopology* topo=&(*htopo);
395 
396  std::auto_ptr<HcalRespCorrs> result (new HcalRespCorrs (topo));
397  std::vector <HcalGenericDetId> cells = allCells(*topo);
398  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
399 
400  double corr = 1.0;
401 
402  if ((he_recalibration != 0 ) &&
403  ((*cell).genericSubdet() == HcalGenericDetId::HcalGenEndcap)) {
404 
405  int depth_ = HcalDetId(*cell).depth();
406  int ieta_ = HcalDetId(*cell).ieta();
407  corr = he_recalibration->getCorr(ieta_, depth_);
408 
409  /*
410  std::cout << "HE ieta, depth = " << ieta_ << ", " << depth_
411  << " corr = " << corr << std::endl;
412  */
413 
414  }
415  else if ((hf_recalibration != 0 ) &&
416  ((*cell).genericSubdet() == HcalGenericDetId::HcalGenForward)) {
417  int depth_ = HcalDetId(*cell).depth();
418  int ieta_ = HcalDetId(*cell).ieta();
419  corr = hf_recalibration->getCorr(ieta_, depth_, iLumi);
420 
421  /*
422  std::cout << "HF ieta, depth = " << ieta_ << ", " << depth_
423  << " corr = " << corr << std::endl;
424  */
425 
426  }
427 
428  HcalRespCorr item(cell->rawId(),corr);
429  result->addValues(item);
430  }
431  return result;
432 }
double getCorr(int ieta, int idepth)
int depth() const
get the tower depth
Definition: HcalDetId.h:40
double getCorr(int ieta, int idepth, double lumi)
tuple result
Definition: query.py:137
int ieta() const
get the cell ieta
Definition: HcalDetId.h:36
JetCorrectorParameters corr
Definition: classes.h:5
std::auto_ptr< HcalTimeCorrs > HcalHardcodeCalibrations::produceTimeCorrs ( const HcalTimeCorrsRcd rcd)
protected

Definition at line 464 of file HcalHardcodeCalibrations.cc.

References edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), and query::result.

Referenced by HcalHardcodeCalibrations().

464  {
465  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceTimeCorrs-> ...";
467  rcd.getRecord<IdealGeometryRecord>().get(htopo);
468  const HcalTopology* topo=&(*htopo);
469 
470  std::auto_ptr<HcalTimeCorrs> result (new HcalTimeCorrs (topo));
471  std::vector <HcalGenericDetId> cells = allCells(*topo);
472  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
473  HcalTimeCorr item(cell->rawId(),0.0);
474  result->addValues(item);
475  }
476  return result;
477 }
tuple result
Definition: query.py:137
std::auto_ptr< HcalTimingParams > HcalHardcodeCalibrations::produceTimingParams ( const HcalTimingParamsRcd rcd)
protected

Definition at line 599 of file HcalHardcodeCalibrations.cc.

References edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HcalDbHardcode::makeTimingParam(), and query::result.

599  {
600  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceTimingParams-> ...";
602  rec.getRecord<IdealGeometryRecord>().get(htopo);
603  const HcalTopology* topo=&(*htopo);
604 
605  std::auto_ptr<HcalTimingParams> result (new HcalTimingParams (topo));
606  std::vector <HcalGenericDetId> cells = allCells(*topo);
607  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
609  result->addValues(item);
610  }
611  return result;
612 }
HcalTimingParam makeTimingParam(HcalGenericDetId fId)
tuple result
Definition: query.py:137
std::auto_ptr< HcalValidationCorrs > HcalHardcodeCalibrations::produceValidationCorrs ( const HcalValidationCorrsRcd rcd)
protected

Definition at line 524 of file HcalHardcodeCalibrations.cc.

References edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), and query::result.

Referenced by HcalHardcodeCalibrations().

524  {
525  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceValidationCorrs-> ...";
527  rcd.getRecord<IdealGeometryRecord>().get(htopo);
528  const HcalTopology* topo=&(*htopo);
529 
530  std::auto_ptr<HcalValidationCorrs> result (new HcalValidationCorrs (topo));
531  std::vector <HcalGenericDetId> cells = allCells(*topo);
532  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
533  HcalValidationCorr item(cell->rawId(),1.0);
534  result->addValues(item);
535  }
536  return result;
537 }
tuple result
Definition: query.py:137
std::auto_ptr< HcalZSThresholds > HcalHardcodeCalibrations::produceZSThresholds ( const HcalZSThresholdsRcd rcd)
protected

Definition at line 479 of file HcalHardcodeCalibrations.cc.

References edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), and query::result.

Referenced by HcalHardcodeCalibrations().

479  {
480  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceZSThresholds-> ...";
482  rcd.getRecord<IdealGeometryRecord>().get(htopo);
483  const HcalTopology* topo=&(*htopo);
484 
485  std::auto_ptr<HcalZSThresholds> result (new HcalZSThresholds (topo));
486  std::vector <HcalGenericDetId> cells = allCells(*topo);
487  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
488  HcalZSThreshold item(cell->rawId(),0);
489  result->addValues(item);
490  }
491  return result;
492 }
tuple result
Definition: query.py:137
void HcalHardcodeCalibrations::setIntervalFor ( const edm::eventsetup::EventSetupRecordKey iKey,
const edm::IOVSyncValue iTime,
edm::ValidityInterval oInterval 
)
protectedvirtual

Implements edm::EventSetupRecordIntervalFinder.

Definition at line 280 of file HcalHardcodeCalibrations.cc.

References edm::IOVSyncValue::beginOfTime(), edm::IOVSyncValue::endOfTime(), edm::IOVSyncValue::eventID(), edm::eventsetup::EventSetupRecordKey::name(), record, AlCaHLTBitMon_QueryRunRegistry::string, edm::IOVSyncValue::time(), and edm::Timestamp::value().

280  {
281  std::string record = iKey.name ();
282  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::setIntervalFor-> key: " << record << " time: " << iTime.eventID() << '/' << iTime.time ().value ();
284 }
const EventID & eventID() const
Definition: IOVSyncValue.h:42
JetCorrectorParameters::Record record
Definition: classes.h:7
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:97
std::pair< Time_t, Time_t > ValidityInterval
Definition: Time.h:19
static const IOVSyncValue & beginOfTime()
const Timestamp & time() const
Definition: IOVSyncValue.h:44
TimeValue_t value() const
Definition: Timestamp.h:56

Member Data Documentation

HERecalibration* HcalHardcodeCalibrations::he_recalibration
private
HFRecalibration* HcalHardcodeCalibrations::hf_recalibration
private
double HcalHardcodeCalibrations::iLumi
private
bool HcalHardcodeCalibrations::switchGainWidthsForTrigPrims
private

Definition at line 92 of file HcalHardcodeCalibrations.h.

Referenced by HcalHardcodeCalibrations(), and produceGainWidths().