Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:52:14

0001 #include <cfloat>
0002 
0003 #include "CondTools/Hcal/interface/make_HFPhase1PMTParams.h"
0004 
0005 #include "CondFormats/HcalObjects/interface/HcalDetIdTransform.h"
0006 #include "CondFormats/HcalObjects/interface/HcalConstFunctor.h"
0007 
0008 std::unique_ptr<HFPhase1PMTParams> make_HFPhase1PMTParams_dummy() {
0009   // Create "all pass" HFPhase1PMTData configuration
0010   HFPhase1PMTData::Cuts cuts;
0011 
0012   cuts[HFPhase1PMTData::T_0_MIN] = std::shared_ptr<AbsHcalFunctor>(new HcalConstFunctor(-FLT_MAX));
0013   cuts[HFPhase1PMTData::T_0_MAX] = std::shared_ptr<AbsHcalFunctor>(new HcalConstFunctor(FLT_MAX));
0014   cuts[HFPhase1PMTData::T_1_MIN] = cuts[HFPhase1PMTData::T_0_MIN];
0015   cuts[HFPhase1PMTData::T_1_MAX] = cuts[HFPhase1PMTData::T_0_MAX];
0016   cuts[HFPhase1PMTData::ASYMM_MIN] = cuts[HFPhase1PMTData::T_0_MIN];
0017   cuts[HFPhase1PMTData::ASYMM_MAX] = cuts[HFPhase1PMTData::T_0_MAX];
0018 
0019   std::unique_ptr<HFPhase1PMTData> defaultItem(new HFPhase1PMTData(cuts, -FLT_MAX, -FLT_MAX, FLT_MAX));
0020 
0021   // Other parts needed to create HFPhase1PMTParams
0022   const unsigned detIdTransformCode = HcalDetIdTransform::RAWID;
0023   HcalIndexLookup lookup;
0024   HcalItemColl<HFPhase1PMTData> coll;
0025 
0026   return std::unique_ptr<HFPhase1PMTParams>(
0027       new HFPhase1PMTParams(coll, lookup, detIdTransformCode, std::move(defaultItem)));
0028 }