CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob ()
 
 DijetRatio (const edm::ParameterSet &)
 
virtual void endJob ()
 
 ~DijetRatio ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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 &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
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 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)
 

Detailed Description

template<class Jet>
class DijetRatio< Jet >

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

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

Definition at line 131 of file DijetRatio.h.

Member Typedef Documentation

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

Definition at line 137 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.

25 {
26 
27  //get name of output file with histograms
28  fOutputFileName = iConfig.getUntrackedParameter<std::string>("HistoFileName",
29  "DijetRatio.root");
30 
31  // get names of modules, producing object collections
32  m_Mid5CorRecJetsSrc = iConfig.getParameter<std::string>("CorrectedJets");
33  m_Mid5CaloJetsSrc = iConfig.getParameter<std::string>("UnCorrectedJets");
34 
35  // eta limit for numerator and denominator
36  m_eta3 = iConfig.getUntrackedParameter<double>("etaInner", 0.7);
37  m_eta4 = iConfig.getUntrackedParameter<double>("etaOuter", 1.3);
38 
39 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::string m_Mid5CaloJetsSrc
Definition: DijetRatio.h:148
std::string fOutputFileName
Definition: DijetRatio.h:144
std::string m_Mid5CorRecJetsSrc
Definition: DijetRatio.h:147
double m_eta3
Definition: DijetRatio.h:151
double m_eta4
Definition: DijetRatio.h:152
template<class Jet >
DijetRatio< Jet >::~DijetRatio ( )

Definition at line 44 of file DijetRatio.cc.

45 {
46 
47  // do anything here that needs to be done at desctruction time
48  // (e.g. close files, deallocate resources etc.)
49 
50 }

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 60 of file DijetRatio.cc.

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

61 {
62  using namespace edm;
63 
64  // get calo jet collection
65  Handle<JetCollection> Mid5CorRecJets;
66  iEvent.getByLabel(m_Mid5CorRecJetsSrc, Mid5CorRecJets);
67 
68  Handle<JetCollection> Mid5CaloJets;
69  iEvent.getByLabel(m_Mid5CaloJetsSrc, Mid5CaloJets);
70 
71  histoFill(hCalo, Mid5CaloJets, m_eta3, m_eta4);
72  histoFill(hCor, Mid5CorRecJets, m_eta3, m_eta4);
73 }
std::string m_Mid5CaloJetsSrc
Definition: DijetRatio.h:148
std::string m_Mid5CorRecJetsSrc
Definition: DijetRatio.h:147
double m_eta3
Definition: DijetRatio.h:151
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:405
double m_eta4
Definition: DijetRatio.h:152
void histoFill(TH1F *jetHisto[], edm::Handle< R > jetsRec, double eta1, double eta2)
Definition: DijetRatio.h:89
TH1F * hCalo[hisotNumber]
Definition: DijetRatio.h:157
TH1F * hCor[hisotNumber]
Definition: DijetRatio.h:158
template<class Jet >
void DijetRatio< Jet >::beginJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 79 of file DijetRatio.cc.

References hInit().

80 {
81  hOutputFile = new TFile( fOutputFileName.c_str(), "RECREATE" ) ;
82 
83  // Histo Initializations for Jets
84  hInit(hCalo, "DijetRatio_UnCorrectedJets");
85  hInit(hCor, "DijetRatio_CorrectedJets");
86 
87  return;
88 }
std::string fOutputFileName
Definition: DijetRatio.h:144
TFile * hOutputFile
Definition: DijetRatio.h:161
TH1F * hCalo[hisotNumber]
Definition: DijetRatio.h:157
TH1F * hCor[hisotNumber]
Definition: DijetRatio.h:158
void hInit(TH1F *hJet[], const char *name)
Definition: DijetRatio.h:57
template<class Jet >
void DijetRatio< Jet >::endJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 93 of file DijetRatio.cc.

References histoSize, i, and mathSSE::return().

93  {
94 
95  hOutputFile->cd();
96  for(int i=0; i<histoSize; ++i) {
97  hCalo[i]->Write() ;
98  hCor[i]->Write() ;
99  }
100  hOutputFile->Close() ;
101 
102 return ;
103 }
int i
Definition: DBlmapReader.cc:9
return((rh^lh)&mask)
TFile * hOutputFile
Definition: DijetRatio.h:161
const int histoSize
Definition: DijetRatio.h:54
TH1F * hCalo[hisotNumber]
Definition: DijetRatio.h:157
TH1F * hCor[hisotNumber]
Definition: DijetRatio.h:158

Member Data Documentation

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

Definition at line 144 of file DijetRatio.h.

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

Definition at line 157 of file DijetRatio.h.

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

Definition at line 158 of file DijetRatio.h.

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

Definition at line 155 of file DijetRatio.h.

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

Definition at line 161 of file DijetRatio.h.

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

Definition at line 151 of file DijetRatio.h.

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

Definition at line 152 of file DijetRatio.h.

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

Definition at line 148 of file DijetRatio.h.

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

Definition at line 147 of file DijetRatio.h.