CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Public Attributes | Static Public Attributes
DijetRatio< Jet > Class Template Reference

#include <RecoJets/DijetRatio/src/DijetRatio.cc>

Inheritance diagram for DijetRatio< Jet >:
edm::EDAnalyzer edm::EDConsumerBase

Public Types

typedef std::vector< Jet > JetCollection
 
- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
 DijetRatio (const edm::ParameterSet &)
 
void endJob () override
 
 ~DijetRatio () 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::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
 
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)
 

Public Attributes

std::string fOutputFileName
 
TH1F * hCalo [hisotNumber]
 
TH1F * hCor [hisotNumber]
 
TFile * hOutputFile
 
double m_eta3
 
double m_eta4
 
std::string m_Mid5CaloJetsSrc
 
std::string m_Mid5CorRecJetsSrc
 

Static Public Attributes

static const int hisotNumber = 10
 

Additional Inherited Members

- 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

template<class Jet>
class DijetRatio< Jet >

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

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

Definition at line 121 of file DijetRatio.h.

Member Typedef Documentation

◆ JetCollection

template<class Jet >
typedef std::vector<Jet> DijetRatio< Jet >::JetCollection

Definition at line 126 of file DijetRatio.h.

Constructor & Destructor Documentation

◆ DijetRatio()

template<class Jet >
DijetRatio< Jet >::DijetRatio ( const edm::ParameterSet iConfig)
explicit

Definition at line 24 of file DijetRatio.cc.

24  {
25  //get name of output file with histograms
26  fOutputFileName = iConfig.getUntrackedParameter<std::string>("HistoFileName", "DijetRatio.root");
27 
28  // get names of modules, producing object collections
29  m_Mid5CorRecJetsSrc = iConfig.getParameter<std::string>("CorrectedJets");
30  m_Mid5CaloJetsSrc = iConfig.getParameter<std::string>("UnCorrectedJets");
31 
32  // eta limit for numerator and denominator
33  m_eta3 = iConfig.getUntrackedParameter<double>("etaInner", 0.7);
34  m_eta4 = iConfig.getUntrackedParameter<double>("etaOuter", 1.3);
35 }

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

◆ ~DijetRatio()

template<class Jet >
DijetRatio< Jet >::~DijetRatio ( )
override

Definition at line 38 of file DijetRatio.cc.

38  {
39  // do anything here that needs to be done at desctruction time
40  // (e.g. close files, deallocate resources etc.)
41 }

Member Function Documentation

◆ analyze()

template<class Jet >
void DijetRatio< Jet >::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Implements edm::EDAnalyzer.

Definition at line 50 of file DijetRatio.cc.

50  {
51  using namespace edm;
52 
53  // get calo jet collection
54  Handle<JetCollection> Mid5CorRecJets;
55  iEvent.getByLabel(m_Mid5CorRecJetsSrc, Mid5CorRecJets);
56 
57  Handle<JetCollection> Mid5CaloJets;
58  iEvent.getByLabel(m_Mid5CaloJetsSrc, Mid5CaloJets);
59 
60  histoFill(hCalo, Mid5CaloJets, m_eta3, m_eta4);
61  histoFill(hCor, Mid5CorRecJets, m_eta3, m_eta4);
62 }

References histoFill(), and iEvent.

◆ beginJob()

template<class Jet >
void DijetRatio< Jet >::beginJob ( void  )
overridevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 66 of file DijetRatio.cc.

66  {
67  hOutputFile = new TFile(fOutputFileName.c_str(), "RECREATE");
68 
69  // Histo Initializations for Jets
70  hInit(hCalo, "DijetRatio_UnCorrectedJets");
71  hInit(hCor, "DijetRatio_CorrectedJets");
72 
73  return;
74 }

References hInit().

◆ endJob()

template<class Jet >
void DijetRatio< Jet >::endJob ( void  )
overridevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 79 of file DijetRatio.cc.

79  {
80  hOutputFile->cd();
81  for (int i = 0; i < histoSize; ++i) {
82  hCalo[i]->Write();
83  hCor[i]->Write();
84  }
85  hOutputFile->Close();
86 
87  return;
88 }

References histoSize, and mps_fire::i.

Member Data Documentation

◆ fOutputFileName

template<class Jet >
std::string DijetRatio< Jet >::fOutputFileName

Definition at line 132 of file DijetRatio.h.

◆ hCalo

template<class Jet >
TH1F* DijetRatio< Jet >::hCalo[hisotNumber]

Definition at line 145 of file DijetRatio.h.

◆ hCor

template<class Jet >
TH1F* DijetRatio< Jet >::hCor[hisotNumber]

Definition at line 146 of file DijetRatio.h.

◆ hisotNumber

template<class Jet >
const int DijetRatio< Jet >::hisotNumber = 10
static

Definition at line 143 of file DijetRatio.h.

◆ hOutputFile

template<class Jet >
TFile* DijetRatio< Jet >::hOutputFile

Definition at line 149 of file DijetRatio.h.

◆ m_eta3

template<class Jet >
double DijetRatio< Jet >::m_eta3

Definition at line 139 of file DijetRatio.h.

◆ m_eta4

template<class Jet >
double DijetRatio< Jet >::m_eta4

Definition at line 140 of file DijetRatio.h.

◆ m_Mid5CaloJetsSrc

template<class Jet >
std::string DijetRatio< Jet >::m_Mid5CaloJetsSrc

Definition at line 136 of file DijetRatio.h.

◆ m_Mid5CorRecJetsSrc

template<class Jet >
std::string DijetRatio< Jet >::m_Mid5CorRecJetsSrc

Definition at line 135 of file DijetRatio.h.

histoFill
void histoFill(TH1F *jetHisto[], edm::Handle< R > jetsRec, double eta1, double eta2)
Definition: DijetRatio.h:82
mps_fire.i
i
Definition: mps_fire.py:428
DijetRatio::hOutputFile
TFile * hOutputFile
Definition: DijetRatio.h:149
edm
HLT enums.
Definition: AlignableModifier.h:19
DijetRatio::m_eta4
double m_eta4
Definition: DijetRatio.h:140
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
DijetRatio::hCor
TH1F * hCor[hisotNumber]
Definition: DijetRatio.h:146
edm::Handle
Definition: AssociativeIterator.h:50
DijetRatio::hCalo
TH1F * hCalo[hisotNumber]
Definition: DijetRatio.h:145
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
histoSize
const int histoSize
Definition: DijetRatio.h:54
iEvent
int iEvent
Definition: GenABIO.cc:224
DijetRatio::fOutputFileName
std::string fOutputFileName
Definition: DijetRatio.h:132
DijetRatio::m_Mid5CaloJetsSrc
std::string m_Mid5CaloJetsSrc
Definition: DijetRatio.h:136
DijetRatio::m_Mid5CorRecJetsSrc
std::string m_Mid5CorRecJetsSrc
Definition: DijetRatio.h:135
hInit
void hInit(TH1F *hJet[], const char *name)
Definition: DijetRatio.h:57
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
DijetRatio::m_eta3
double m_eta3
Definition: DijetRatio.h:139