CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, 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::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
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (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 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<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
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...
 
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

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

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

Definition at line 126 of file DijetRatio.h.

Constructor & Destructor Documentation

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

Definition at line 24 of file DijetRatio.cc.

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

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 }
T getUntrackedParameter(std::string const &, T const &) const
std::string m_Mid5CaloJetsSrc
Definition: DijetRatio.h:136
std::string fOutputFileName
Definition: DijetRatio.h:132
std::string m_Mid5CorRecJetsSrc
Definition: DijetRatio.h:135
double m_eta3
Definition: DijetRatio.h:139
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
double m_eta4
Definition: DijetRatio.h:140
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

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.

References edm::Event::getByLabel(), and histoFill().

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 }
std::string m_Mid5CaloJetsSrc
Definition: DijetRatio.h:136
std::string m_Mid5CorRecJetsSrc
Definition: DijetRatio.h:135
double m_eta3
Definition: DijetRatio.h:139
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:500
double m_eta4
Definition: DijetRatio.h:140
void histoFill(TH1F *jetHisto[], edm::Handle< R > jetsRec, double eta1, double eta2)
Definition: DijetRatio.h:82
TH1F * hCalo[hisotNumber]
Definition: DijetRatio.h:145
TH1F * hCor[hisotNumber]
Definition: DijetRatio.h:146
template<class Jet >
void DijetRatio< Jet >::beginJob ( void  )
overridevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 66 of file DijetRatio.cc.

References hInit().

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 }
std::string fOutputFileName
Definition: DijetRatio.h:132
TFile * hOutputFile
Definition: DijetRatio.h:149
TH1F * hCalo[hisotNumber]
Definition: DijetRatio.h:145
TH1F * hCor[hisotNumber]
Definition: DijetRatio.h:146
void hInit(TH1F *hJet[], const char *name)
Definition: DijetRatio.h:57
template<class Jet >
void DijetRatio< Jet >::endJob ( void  )
overridevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 79 of file DijetRatio.cc.

References histoSize, and mps_fire::i.

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 }
TFile * hOutputFile
Definition: DijetRatio.h:149
const int histoSize
Definition: DijetRatio.h:54
TH1F * hCalo[hisotNumber]
Definition: DijetRatio.h:145
TH1F * hCor[hisotNumber]
Definition: DijetRatio.h:146

Member Data Documentation

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

Definition at line 132 of file DijetRatio.h.

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

Definition at line 145 of file DijetRatio.h.

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

Definition at line 146 of file DijetRatio.h.

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

Definition at line 143 of file DijetRatio.h.

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

Definition at line 149 of file DijetRatio.h.

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

Definition at line 139 of file DijetRatio.h.

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

Definition at line 140 of file DijetRatio.h.

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

Definition at line 136 of file DijetRatio.h.

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

Definition at line 135 of file DijetRatio.h.