CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
L1RCTRelValAnalyzer Class Reference

#include <L1RCTRelValAnalyzer.h>

Inheritance diagram for L1RCTRelValAnalyzer:
edm::one::EDAnalyzer< edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
 L1RCTRelValAnalyzer (const edm::ParameterSet &)
 
 ~L1RCTRelValAnalyzer () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::SharedResources >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const noexcept final
 
bool wantsGlobalRuns () const noexcept final
 
bool wantsInputProcessBlocks () const noexcept final
 
bool wantsProcessBlocks () const noexcept final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const noexcept
 
bool wantsStreamRuns () const noexcept
 
 ~EDAnalyzerBase () 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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > 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::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

TH1F * h_emIeta
 
TH1F * h_emIphi
 
TH2F * h_emIsoOccIetaIphi
 
TH2F * h_emNonIsoOccIetaIphi
 
TH1F * h_emRank
 
TH2F * h_regionOccIetaIphi
 
TH1F * h_regionSum
 
TH2F * h_regionSumIetaIphi
 
edm::EDGetTokenT< L1CaloEmCollectionm_rctEmCands
 
edm::EDGetTokenT< L1CaloRegionCollectionm_rctRegions
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

L1Trigger/RegionalCaloTrigger/interface/L1RCTRelValAnalyzer.h L1Trigger/RegionalCaloTrigger/plugins/L1RCTRelValAnalyzer.cc

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

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

Definition at line 45 of file L1RCTRelValAnalyzer.h.

Constructor & Destructor Documentation

◆ L1RCTRelValAnalyzer()

L1RCTRelValAnalyzer::L1RCTRelValAnalyzer ( const edm::ParameterSet iConfig)
explicit

Definition at line 25 of file L1RCTRelValAnalyzer.cc.

References compareTotals::fs, h_emIeta, h_emIphi, h_emIsoOccIetaIphi, h_emNonIsoOccIetaIphi, h_emRank, h_regionOccIetaIphi, h_regionSum, h_regionSumIetaIphi, and TFileService::kSharedResource.

26  : m_rctEmCands(consumes(iConfig.getParameter<edm::InputTag>("rctEmCandsLabel"))),
27  m_rctRegions(consumes(iConfig.getParameter<edm::InputTag>("rctRegionsLabel"))) {
28  // now do what ever initialization is needed
29 
30  usesResource(TFileService::kSharedResource);
32  h_emRank = fs->make<TH1F>("emRank", "emRank", 64, 0., 64.);
33  h_emIeta = fs->make<TH1F>("emOccupancyIeta", "emOccupancyIeta", 22, 0., 22.);
34  h_emIphi = fs->make<TH1F>("emOccupancyIphi", "emOccupancyIphi", 18, 0., 18.);
35  h_emIsoOccIetaIphi = fs->make<TH2F>("emIsoOccupancy2D", "emIsoOccupancy2D", 22, 0., 22., 18, 0., 18.);
36  h_emNonIsoOccIetaIphi = fs->make<TH2F>("emNonIsoOccupancy2D", "emNonIsoOccupancy2D", 22, 0., 22., 18, 0., 18.);
37 
38  h_regionSum = fs->make<TH1F>("regionSum", "regionSum", 100, 0., 100.);
39  h_regionSumIetaIphi = fs->make<TH2F>("regionSumEtWeighted2D", "regionSumEtWeighted2D", 22, 0., 22., 18, 0., 18.);
40  h_regionOccIetaIphi = fs->make<TH2F>("regionOccupancy2D", "regionOccupancy2D", 22, 0., 22., 18, 0., 18.);
41 }
static const std::string kSharedResource
Definition: TFileService.h:76
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< L1CaloRegionCollection > m_rctRegions
edm::EDGetTokenT< L1CaloEmCollection > m_rctEmCands

◆ ~L1RCTRelValAnalyzer()

L1RCTRelValAnalyzer::~L1RCTRelValAnalyzer ( )
override

Definition at line 43 of file L1RCTRelValAnalyzer.cc.

43  {
44  // do anything here that needs to be done at destruction time
45  // (e.g. close files, deallocate resources etc.)
46 }

Member Function Documentation

◆ analyze()

void L1RCTRelValAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 53 of file L1RCTRelValAnalyzer.cc.

References h_emIeta, h_emIphi, h_emIsoOccIetaIphi, h_emNonIsoOccIetaIphi, h_emRank, h_regionOccIetaIphi, h_regionSum, h_regionSumIetaIphi, iEvent, m_rctEmCands, and m_rctRegions.

53  {
54  using namespace edm;
55 
56  // as in L1GctTestAnalyzer.cc
57  Handle<L1CaloEmCollection> rctEmCands = iEvent.getHandle(m_rctEmCands);
58  Handle<L1CaloRegionCollection> rctRegions = iEvent.getHandle(m_rctRegions);
59 
60  for (auto em = rctEmCands->begin(); em != rctEmCands->end(); em++) {
61  if ((*em).rank() > 0) {
62  h_emRank->Fill((*em).rank());
63  h_emIeta->Fill((*em).regionId().ieta());
64  h_emIphi->Fill((*em).regionId().iphi());
65  if ((*em).isolated()) {
66  h_emIsoOccIetaIphi->Fill((*em).regionId().ieta(), (*em).regionId().iphi());
67  } else {
68  h_emNonIsoOccIetaIphi->Fill((*em).regionId().ieta(), (*em).regionId().iphi());
69  }
70  }
71  }
72 
73  for (auto rgn = rctRegions->begin(); rgn != rctRegions->end(); rgn++) {
74  if ((*rgn).et() > 0) {
75  h_regionSum->Fill((*rgn).et());
76  h_regionSumIetaIphi->Fill((*rgn).gctEta(), (*rgn).gctPhi(), (*rgn).et());
77  h_regionOccIetaIphi->Fill((*rgn).gctEta(), (*rgn).gctPhi());
78  }
79  }
80 }
int iEvent
Definition: GenABIO.cc:224
edm::EDGetTokenT< L1CaloRegionCollection > m_rctRegions
edm::EDGetTokenT< L1CaloEmCollection > m_rctEmCands
HLT enums.

Member Data Documentation

◆ h_emIeta

TH1F* L1RCTRelValAnalyzer::h_emIeta
private

Definition at line 58 of file L1RCTRelValAnalyzer.h.

Referenced by analyze(), and L1RCTRelValAnalyzer().

◆ h_emIphi

TH1F* L1RCTRelValAnalyzer::h_emIphi
private

Definition at line 59 of file L1RCTRelValAnalyzer.h.

Referenced by analyze(), and L1RCTRelValAnalyzer().

◆ h_emIsoOccIetaIphi

TH2F* L1RCTRelValAnalyzer::h_emIsoOccIetaIphi
private

Definition at line 60 of file L1RCTRelValAnalyzer.h.

Referenced by analyze(), and L1RCTRelValAnalyzer().

◆ h_emNonIsoOccIetaIphi

TH2F* L1RCTRelValAnalyzer::h_emNonIsoOccIetaIphi
private

Definition at line 61 of file L1RCTRelValAnalyzer.h.

Referenced by analyze(), and L1RCTRelValAnalyzer().

◆ h_emRank

TH1F* L1RCTRelValAnalyzer::h_emRank
private

Definition at line 57 of file L1RCTRelValAnalyzer.h.

Referenced by analyze(), and L1RCTRelValAnalyzer().

◆ h_regionOccIetaIphi

TH2F* L1RCTRelValAnalyzer::h_regionOccIetaIphi
private

Definition at line 65 of file L1RCTRelValAnalyzer.h.

Referenced by analyze(), and L1RCTRelValAnalyzer().

◆ h_regionSum

TH1F* L1RCTRelValAnalyzer::h_regionSum
private

Definition at line 63 of file L1RCTRelValAnalyzer.h.

Referenced by analyze(), and L1RCTRelValAnalyzer().

◆ h_regionSumIetaIphi

TH2F* L1RCTRelValAnalyzer::h_regionSumIetaIphi
private

Definition at line 64 of file L1RCTRelValAnalyzer.h.

Referenced by analyze(), and L1RCTRelValAnalyzer().

◆ m_rctEmCands

edm::EDGetTokenT<L1CaloEmCollection> L1RCTRelValAnalyzer::m_rctEmCands
private

Definition at line 54 of file L1RCTRelValAnalyzer.h.

Referenced by analyze().

◆ m_rctRegions

edm::EDGetTokenT<L1CaloRegionCollection> L1RCTRelValAnalyzer::m_rctRegions
private

Definition at line 55 of file L1RCTRelValAnalyzer.h.

Referenced by analyze().