CMS 3D CMS Logo

List of all members
Rivet::CMS_2013_I1224539_DIJET Class Reference
Inheritance diagram for Rivet::CMS_2013_I1224539_DIJET:

Public Member Functions

Constructors etc.
 CMS_2013_I1224539_DIJET ()
 Constructor. More...
 
Analysis methods
void init () override
 Book histograms and initialise projections before the run. More...
 
size_t findPtBin (double ptJ)
 
void analyze (const Event &event) override
 Perform the per-event analysis. More...
 
void finalize () override
 Normalise histograms etc., after the run. More...
 

Private Attributes

FastJet grooming tools (configured in constructor init list)
const fastjet::Filter _filter
 
const fastjet::Filter _trimmer
 
const fastjet::Pruner _pruner
 

Histograms

enum Rivet::CMS_2013_I1224539_DIJET::{
  PT_220_300_dj =0, PT_300_450_dj, PT_450_500_dj, PT_500_600_dj,
  PT_600_800_dj, PT_800_1000_dj, PT_1000_1500_dj, N_PT_BINS_dj
BINS_dj
 
Histo1DPtr _h_ungroomedJet0pt
 
Histo1DPtr _h_ungroomedJet1pt
 
Histo1DPtr _h_ungroomedAvgJetMass_dj [N_PT_BINS_dj]
 
Histo1DPtr _h_filteredAvgJetMass_dj [N_PT_BINS_dj]
 
Histo1DPtr _h_trimmedAvgJetMass_dj [N_PT_BINS_dj]
 
Histo1DPtr _h_prunedAvgJetMass_dj [N_PT_BINS_dj]
 

Detailed Description

Definition at line 13 of file CMS_2013_I1224539_DIJET.cc.

Member Enumeration Documentation

anonymous enum
private

Constructor & Destructor Documentation

Rivet::CMS_2013_I1224539_DIJET::CMS_2013_I1224539_DIJET ( )
inline

Constructor.

Definition at line 20 of file CMS_2013_I1224539_DIJET.cc.

21  : Analysis("CMS_2013_I1224539_DIJET"),
22  _filter(fastjet::Filter(fastjet::JetDefinition(fastjet::cambridge_algorithm, 0.3), fastjet::SelectorNHardest(3))),
23  _trimmer(fastjet::Filter(fastjet::JetDefinition(fastjet::kt_algorithm, 0.2), fastjet::SelectorPtFractionMin(0.03))),
24  _pruner(fastjet::Pruner(fastjet::cambridge_algorithm, 0.1, 0.5))
25  { }
cms::Filter Filter

Member Function Documentation

void Rivet::CMS_2013_I1224539_DIJET::analyze ( const Event event)
inlineoverride

Perform the per-event analysis.

Definition at line 67 of file CMS_2013_I1224539_DIJET.cc.

References _filter, _h_filteredAvgJetMass_dj, _h_prunedAvgJetMass_dj, _h_trimmedAvgJetMass_dj, _h_ungroomedAvgJetMass_dj, _pruner, _trimmer, event(), findPtBin(), GeV, and N_PT_BINS_dj.

67  {
68  const double weight = event.weight();
69 
70  // Look at events with >= 2 jets
71  const PseudoJets& psjetsAK7 = applyProjection<FastJets>(event, "JetsAK7").pseudoJetsByPt( 50.0*GeV );
72  if (psjetsAK7.size() < 2) vetoEvent;
73 
74  // Get the leading two jets and find their average pT
75  const fastjet::PseudoJet& j0 = psjetsAK7[0];
76  const fastjet::PseudoJet& j1 = psjetsAK7[1];
77  double ptAvg = 0.5 * (j0.pt() + j1.pt());
78 
79  // Find the appropriate mean pT bin and escape if needed
80  const size_t njetBin = findPtBin(ptAvg/GeV);
81  if (njetBin >= N_PT_BINS_dj) vetoEvent;
82 
83  // Now run the substructure algs...
84  fastjet::PseudoJet filtered0 = _filter(j0);
85  fastjet::PseudoJet filtered1 = _filter(j1);
86  fastjet::PseudoJet trimmed0 = _trimmer(j0);
87  fastjet::PseudoJet trimmed1 = _trimmer(j1);
88  fastjet::PseudoJet pruned0 = _pruner(j0);
89  fastjet::PseudoJet pruned1 = _pruner(j1);
90 
91  // ... and fill the histograms
92  _h_ungroomedAvgJetMass_dj[njetBin]->fill(0.5*(j0.m() + j1.m())/GeV, weight);
93  _h_filteredAvgJetMass_dj[njetBin]->fill(0.5*(filtered0.m() + filtered1.m())/GeV, weight);
94  _h_trimmedAvgJetMass_dj[njetBin]->fill(0.5*(trimmed0.m() + trimmed1.m())/GeV, weight);
95  _h_prunedAvgJetMass_dj[njetBin]->fill(0.5*(pruned0.m() + pruned1.m())/GeV, weight);
96  }
const double GeV
Definition: MathUtil.h:16
Histo1DPtr _h_filteredAvgJetMass_dj[N_PT_BINS_dj]
Definition: weight.py:1
Histo1DPtr _h_ungroomedAvgJetMass_dj[N_PT_BINS_dj]
Histo1DPtr _h_prunedAvgJetMass_dj[N_PT_BINS_dj]
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
Histo1DPtr _h_trimmedAvgJetMass_dj[N_PT_BINS_dj]
void Rivet::CMS_2013_I1224539_DIJET::finalize ( void  )
inlineoverride

Normalise histograms etc., after the run.

Definition at line 100 of file CMS_2013_I1224539_DIJET.cc.

References _h_filteredAvgJetMass_dj, _h_prunedAvgJetMass_dj, _h_trimmedAvgJetMass_dj, _h_ungroomedAvgJetMass_dj, mps_fire::i, and N_PT_BINS_dj.

100  {
101  const double normalizationVal = 1000;
102  for (size_t i = 0; i < N_PT_BINS_dj; ++i) {
103  normalize(_h_ungroomedAvgJetMass_dj[i], normalizationVal);
104  normalize(_h_filteredAvgJetMass_dj[i], normalizationVal);
105  normalize(_h_trimmedAvgJetMass_dj[i], normalizationVal);
106  normalize(_h_prunedAvgJetMass_dj[i], normalizationVal);
107  }
108  }
Histo1DPtr _h_filteredAvgJetMass_dj[N_PT_BINS_dj]
Histo1DPtr _h_ungroomedAvgJetMass_dj[N_PT_BINS_dj]
Histo1DPtr _h_prunedAvgJetMass_dj[N_PT_BINS_dj]
Histo1DPtr _h_trimmedAvgJetMass_dj[N_PT_BINS_dj]
size_t Rivet::CMS_2013_I1224539_DIJET::findPtBin ( double  ptJ)
inline

Definition at line 57 of file CMS_2013_I1224539_DIJET.cc.

References N_PT_BINS_dj.

Referenced by analyze().

57  {
58  const double ptBins_dj[N_PT_BINS_dj+1] = { 220.0, 300.0, 450.0, 500.0, 600.0, 800.0, 1000.0, 1500.0};
59  for (size_t ibin = 0; ibin < N_PT_BINS_dj; ++ibin) {
60  if (inRange(ptJ, ptBins_dj[ibin], ptBins_dj[ibin+1])) return ibin;
61  }
62  return N_PT_BINS_dj;
63  }
void Rivet::CMS_2013_I1224539_DIJET::init ( void  )
inlineoverride

Book histograms and initialise projections before the run.

Definition at line 36 of file CMS_2013_I1224539_DIJET.cc.

References _h_filteredAvgJetMass_dj, _h_prunedAvgJetMass_dj, _h_trimmedAvgJetMass_dj, _h_ungroomedAvgJetMass_dj, GeV, mps_fire::i, and N_PT_BINS_dj.

36  {
37  FinalState fs(-2.4, 2.4, 0*GeV);
38  addProjection(fs, "FS");
39 
40  // Jet collections
41  addProjection(FastJets(fs, FastJets::ANTIKT, 0.7), "JetsAK7");
42  addProjection(FastJets(fs, FastJets::CAM, 0.8), "JetsCA8");
43  addProjection(FastJets(fs, FastJets::CAM, 1.2), "JetsCA12");
44 
45  // Histograms
46  for (size_t i = 0; i < N_PT_BINS_dj; ++i ) {
47  _h_ungroomedAvgJetMass_dj[i] = bookHisto1D(i+1+0*N_PT_BINS_dj, 1, 1);
48  _h_filteredAvgJetMass_dj[i] = bookHisto1D(i+1+1*N_PT_BINS_dj, 1, 1);
49  _h_trimmedAvgJetMass_dj[i] = bookHisto1D(i+1+2*N_PT_BINS_dj, 1, 1);
50  _h_prunedAvgJetMass_dj[i] = bookHisto1D(i+1+3*N_PT_BINS_dj, 1, 1);
51  }
52  }
const double GeV
Definition: MathUtil.h:16
Histo1DPtr _h_filteredAvgJetMass_dj[N_PT_BINS_dj]
Histo1DPtr _h_ungroomedAvgJetMass_dj[N_PT_BINS_dj]
Histo1DPtr _h_prunedAvgJetMass_dj[N_PT_BINS_dj]
Histo1DPtr _h_trimmedAvgJetMass_dj[N_PT_BINS_dj]

Member Data Documentation

const fastjet::Filter Rivet::CMS_2013_I1224539_DIJET::_filter
private

Definition at line 117 of file CMS_2013_I1224539_DIJET.cc.

Referenced by analyze().

Histo1DPtr Rivet::CMS_2013_I1224539_DIJET::_h_filteredAvgJetMass_dj[N_PT_BINS_dj]
private

Definition at line 129 of file CMS_2013_I1224539_DIJET.cc.

Referenced by analyze(), finalize(), and init().

Histo1DPtr Rivet::CMS_2013_I1224539_DIJET::_h_prunedAvgJetMass_dj[N_PT_BINS_dj]
private

Definition at line 131 of file CMS_2013_I1224539_DIJET.cc.

Referenced by analyze(), finalize(), and init().

Histo1DPtr Rivet::CMS_2013_I1224539_DIJET::_h_trimmedAvgJetMass_dj[N_PT_BINS_dj]
private

Definition at line 130 of file CMS_2013_I1224539_DIJET.cc.

Referenced by analyze(), finalize(), and init().

Histo1DPtr Rivet::CMS_2013_I1224539_DIJET::_h_ungroomedAvgJetMass_dj[N_PT_BINS_dj]
private

Definition at line 128 of file CMS_2013_I1224539_DIJET.cc.

Referenced by analyze(), finalize(), and init().

Histo1DPtr Rivet::CMS_2013_I1224539_DIJET::_h_ungroomedJet0pt
private

Definition at line 127 of file CMS_2013_I1224539_DIJET.cc.

Histo1DPtr Rivet::CMS_2013_I1224539_DIJET::_h_ungroomedJet1pt
private

Definition at line 127 of file CMS_2013_I1224539_DIJET.cc.

const fastjet::Pruner Rivet::CMS_2013_I1224539_DIJET::_pruner
private

Definition at line 119 of file CMS_2013_I1224539_DIJET.cc.

Referenced by analyze().

const fastjet::Filter Rivet::CMS_2013_I1224539_DIJET::_trimmer
private

Definition at line 118 of file CMS_2013_I1224539_DIJET.cc.

Referenced by analyze().

enum { ... } Rivet::CMS_2013_I1224539_DIJET::BINS_dj