CMS 3D CMS Logo

List of all members | Public Member Functions
L1ScalesTester Class Reference

#include <L1TriggerConfig/L1ScalesProducer/interface/L1ScalesTester.h>

Inheritance diagram for L1ScalesTester:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
 L1ScalesTester (const edm::ParameterSet &)
 
 ~L1ScalesTester () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 29 of file L1ScalesTester.h.

Constructor & Destructor Documentation

◆ L1ScalesTester()

L1ScalesTester::L1ScalesTester ( const edm::ParameterSet ps)
explicit

Definition at line 19 of file L1ScalesTester.cc.

19 { cout << "Constructing a L1ScalesTester" << endl; }

References gather_cfg::cout.

◆ ~L1ScalesTester()

L1ScalesTester::~L1ScalesTester ( )
override

Definition at line 21 of file L1ScalesTester.cc.

21 {}

Member Function Documentation

◆ analyze()

void L1ScalesTester::analyze ( const edm::Event e,
const edm::EventSetup es 
)
overridevirtual

Implements edm::EDAnalyzer.

Definition at line 23 of file L1ScalesTester.cc.

23  {
24  using namespace edm;
25 
27  es.get<L1EmEtScaleRcd>().get(emScale);
28 
29  cout << "L1EmEtScaleRcd :" << endl;
30  emScale->print(cout);
31  cout << endl;
32 
33  ESHandle<L1CaloEcalScale> ecalScale;
34  es.get<L1CaloEcalScaleRcd>().get(ecalScale);
35 
36  ESHandle<L1CaloHcalScale> hcalScale;
37  es.get<L1CaloHcalScaleRcd>().get(hcalScale);
38 
39  cout << " L1ColoEcalScale :" << endl;
40  ecalScale->print(cout);
41  cout << endl;
42 
43  cout << " L1ColoHcalScale :" << endl;
44  hcalScale->print(cout);
45  cout << endl;
46 
49 
50  cout << "L1JetEtScaleRcd :" << endl;
51  jetScale->print(cout);
52  cout << endl;
53 
54  // test EM lin-rank conversion
55  cout << "Testing EM linear-to-rank conversion" << endl;
56  for (unsigned short i = 0; i < 32; i++) {
57  unsigned rank = emScale->rank(i);
58  cout << "EM linear : " << i << ", Et : " << i * emScale->linearLsb() << " GeV, rank : " << rank << endl;
59  }
60  cout << endl;
61 
62  // test jet lin-rank conversion
63  cout << "Testing jet linear-to-rank conversion" << endl;
64  for (unsigned short i = 0; i < 32; i++) {
65  unsigned rank = jetScale->rank(i);
66  cout << "jet linear : " << i << ", Et : " << i * jetScale->linearLsb() << " GeV, rank : " << rank << endl;
67  }
68  cout << endl;
69 
70  // test EM rank-et conversion
71  cout << "Testing EM rank-to-Et conversion" << endl;
72  for (unsigned i = 0; i < 32; i++) {
73  double et = emScale->et(i);
74  cout << "EM rank : " << i << " Et : " << et << " GeV" << endl;
75  }
76  cout << endl;
77 
78  // test jet rank-et conversion
79  cout << "Testing jet rank-to-Et conversion" << endl;
80  for (unsigned i = 0; i < 32; i++) {
81  double et = jetScale->et(i);
82  cout << "jet rank : " << i << " Et : " << et << " GeV" << endl;
83  }
84  cout << endl;
85 }

References gather_cfg::cout, EgHLTOffHistBins_cfi::et, L1CaloEtScale::et(), edm::EventSetup::get(), get, mps_fire::i, wplusjetsAnalysis_cfi::jetScale, L1CaloEtScale::linearLsb(), L1CaloHcalScale::print(), L1CaloEcalScale::print(), L1CaloEtScale::print(), and L1CaloEtScale::rank().

mps_fire.i
i
Definition: mps_fire.py:428
L1CaloEcalScaleRcd
Definition: L1CaloEcalScaleRcd.h:12
edm
HLT enums.
Definition: AlignableModifier.h:19
gather_cfg.cout
cout
Definition: gather_cfg.py:144
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
L1CaloHcalScale::print
void print(std::ostream &s) const
Definition: L1CaloHcalScale.cc:75
L1JetEtScaleRcd
Definition: L1JetEtScaleRcd.h:30
L1CaloEcalScale::print
void print(std::ostream &s) const
Definition: L1CaloEcalScale.cc:75
edm::ESHandle
Definition: DTSurvey.h:22
L1CaloEtScale::linearLsb
double linearLsb() const
get LSB of linear input scale
Definition: L1CaloEtScale.h:54
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
L1CaloEtScale::rank
uint16_t rank(const uint16_t linear) const
convert from linear Et scale to rank scale
Definition: L1CaloEtScale.cc:52
get
#define get
L1CaloEtScale::print
void print(std::ostream &s) const
Definition: L1CaloEtScale.cc:85
L1EmEtScaleRcd
Definition: L1EmEtScaleRcd.h:30
wplusjetsAnalysis_cfi.jetScale
jetScale
Definition: wplusjetsAnalysis_cfi.py:88
L1CaloEtScale::et
double et(const uint16_t rank) const
convert from rank to physically meaningful quantity
Definition: L1CaloEtScale.cc:68
L1CaloHcalScaleRcd
Definition: L1CaloHcalScaleRcd.h:13