ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
Pythia8::mergingDJRs Class Reference
Inheritance diagram for Pythia8::mergingDJRs:
Collaboration diagram for Pythia8::mergingDJRs:

Public Member Functions

 mergingDJRs ()
 
 ~mergingDJRs ()
 
virtual bool canVetoPartonLevel () override
 
virtual bool doVetoPartonLevel (const Event &event) override
 
virtual void getDJR (const Event &event)
 
virtual bool initAfterBeams () override
 

Private Attributes

int m_power = 1
 
double m_etaMax = 10.
 
double m_radius = 1.0
 
double m_pTjetMin = 10.
 
Pythia8::SlowJetHook * m_sjHookPtrIn = 0
 
bool m_useFJcoreIn = false
 
bool m_useStandardRin = true
 
int m_nSel = 2
 
int m_massSetIn = 1
 
std::unique_ptr< Pythia8::SlowJet > m_slowJet
 
std::unique_ptr< TH1Fm_HistDjr
 
std::unique_ptr< TH1Fm_HistDjr2
 
std::unique_ptr< TFile > m_outFile
 
vector< double > m_result
 
vector< double > m_DJR
 
Event m_workEventJet
 

Detailed Description

Definition at line 20 of file mergingDJRs.cxx.

Constructor & Destructor Documentation

◆ mergingDJRs()

Pythia8::mergingDJRs::mergingDJRs ( )
inline

Definition at line 44 of file mergingDJRs.cxx.

44  {
45  // Slowjet pointer
46  m_slowJet = std::make_unique<Pythia8::SlowJet>(
49 
50  // ROOT histograms and the output file where to save them
51  m_HistDjr = std::make_unique<TH1F>("HistDjr", "The first DJR", 100, 0.0, 3.0);
52  m_HistDjr2 =
53  std::make_unique<TH1F>("HistDjr2", "The second DJR", 100, 0.0, 3.0);
54  m_outFile = std::make_unique<TFile>("hist-DJR.root", "RECREATE");
55 
56  std::cout << "**********************************************************"
57  << std::endl;
58  std::cout << "* *"
59  << std::endl;
60  std::cout << "* the jet merging userhook CKKWL DJRS is working *"
61  << std::endl;
62  std::cout << "* *"
63  << std::endl;
64  std::cout << "**********************************************************"
65  << std::endl;
66  }

◆ ~mergingDJRs()

Pythia8::mergingDJRs::~mergingDJRs ( )
inline

Definition at line 69 of file mergingDJRs.cxx.

69  {
70  m_HistDjr->Write();
71  m_HistDjr2->Write();
72  }

Member Function Documentation

◆ canVetoPartonLevel()

virtual bool Pythia8::mergingDJRs::canVetoPartonLevel ( )
inlineoverridevirtual

Definition at line 75 of file mergingDJRs.cxx.

75 { return true; }

◆ doVetoPartonLevel()

bool Pythia8::mergingDJRs::doVetoPartonLevel ( const Event event)
inlineoverridevirtual

Definition at line 91 of file mergingDJRs.cxx.

91  {
92 
93  // subEvent method extract a list of the current partons list and save the
94  // output in workEvent.
95  subEvent(event);
96  m_workEventJet = workEvent;
97 
98  // The selected particles to pass to slowjet
99  for (int j = 0; j < m_workEventJet.size(); ++j) {
100  if (!(m_workEventJet[j].isFinal()) || m_workEventJet[j].isLepton() ||
101  m_workEventJet[j].id() == 23 || std::abs(m_workEventJet[j].id()) == 24 ||
102  m_workEventJet[j].id() == 22) {
103  m_workEventJet[j].statusNeg();
104  continue;
105  }
106  }
107 
108  // slowjet analyze the events
109  if (not m_slowJet->setup(m_workEventJet)){
110  std::cout<< "setup failed in mergingDJRs::doVetoPartonLevel\n";
111  return false;
112  }
113 
114  // Call getDJR and store the DJRs vector
116 
117  // if we reached here then no veto
118  return false;
119 }

◆ getDJR()

void Pythia8::mergingDJRs::getDJR ( const Event event)
inlinevirtual

Definition at line 122 of file mergingDJRs.cxx.

122  {
123 
124  // setup slowjet pointer
125  if (not m_slowJet->setup(event)){
126  std::cout<< "setup failed in mergingDJRs::getDJR\n";
127  return;
128  };
129 
130  // Clear members.
131  m_DJR.clear();
132  m_result.clear();
133 
134  while (m_slowJet->sizeAll() - m_slowJet->sizeJet() > 0) {
135  // Save the next clustering scale.
136  m_result.push_back(sqrt(m_slowJet->dNext()));
137  // Perform step.
138  m_slowJet->doStep();
139  }
140 
141  // Save clustering scales in reverse order
142  for (int i = m_result.size() - 1; i >= 0; --i) {
143  m_DJR.push_back(m_result[i]);
144  }
145 
146  // Fill the histogram and Normalize them
147  double eventWeight = infoPtr->mergingWeight() * infoPtr->weight();
148 
149  if (m_DJR.size() > 0) {
150  m_HistDjr->Fill(log10(m_DJR[0]), eventWeight);
151  m_HistDjr2->Fill(log10(m_DJR[1]), eventWeight);
152  }
153 }

◆ initAfterBeams()

virtual bool Pythia8::mergingDJRs::initAfterBeams ( )
inlineoverridevirtual

Definition at line 82 of file mergingDJRs.cxx.

82  {
83 
84  m_workEventJet.init("(workEventJet)", particleDataPtr);
85 
86  return true;
87  }

Member Data Documentation

◆ m_DJR

vector<double> Pythia8::mergingDJRs::m_DJR
private

Definition at line 40 of file mergingDJRs.cxx.

◆ m_etaMax

double Pythia8::mergingDJRs::m_etaMax = 10.
private

Definition at line 25 of file mergingDJRs.cxx.

◆ m_HistDjr

std::unique_ptr<TH1F> Pythia8::mergingDJRs::m_HistDjr
private

Definition at line 37 of file mergingDJRs.cxx.

◆ m_HistDjr2

std::unique_ptr<TH1F> Pythia8::mergingDJRs::m_HistDjr2
private

Definition at line 37 of file mergingDJRs.cxx.

◆ m_massSetIn

int Pythia8::mergingDJRs::m_massSetIn = 1
private

Definition at line 33 of file mergingDJRs.cxx.

◆ m_nSel

int Pythia8::mergingDJRs::m_nSel = 2
private

Definition at line 32 of file mergingDJRs.cxx.

◆ m_outFile

std::unique_ptr<TFile> Pythia8::mergingDJRs::m_outFile
private

Definition at line 38 of file mergingDJRs.cxx.

◆ m_power

int Pythia8::mergingDJRs::m_power = 1
private

Definition at line 24 of file mergingDJRs.cxx.

◆ m_pTjetMin

double Pythia8::mergingDJRs::m_pTjetMin = 10.
private

Definition at line 27 of file mergingDJRs.cxx.

◆ m_radius

double Pythia8::mergingDJRs::m_radius = 1.0
private

Definition at line 26 of file mergingDJRs.cxx.

◆ m_result

vector<double> Pythia8::mergingDJRs::m_result
private

Definition at line 40 of file mergingDJRs.cxx.

◆ m_sjHookPtrIn

Pythia8::SlowJetHook* Pythia8::mergingDJRs::m_sjHookPtrIn = 0
private

Definition at line 28 of file mergingDJRs.cxx.

◆ m_slowJet

std::unique_ptr<Pythia8::SlowJet> Pythia8::mergingDJRs::m_slowJet
private

Definition at line 34 of file mergingDJRs.cxx.

◆ m_useFJcoreIn

bool Pythia8::mergingDJRs::m_useFJcoreIn = false
private

Definition at line 29 of file mergingDJRs.cxx.

◆ m_useStandardRin

bool Pythia8::mergingDJRs::m_useStandardRin = true
private

Definition at line 31 of file mergingDJRs.cxx.

◆ m_workEventJet

Event Pythia8::mergingDJRs::m_workEventJet
private

Definition at line 41 of file mergingDJRs.cxx.


The documentation for this class was generated from the following file:
Pythia8::mergingDJRs::m_useStandardRin
bool m_useStandardRin
Definition: mergingDJRs.cxx:31
Pythia8::mergingDJRs::m_HistDjr2
std::unique_ptr< TH1F > m_HistDjr2
Definition: mergingDJRs.cxx:37
Pythia8::mergingDJRs::m_DJR
vector< double > m_DJR
Definition: mergingDJRs.cxx:40
Pythia8::mergingDJRs::m_nSel
int m_nSel
Definition: mergingDJRs.cxx:32
Pythia8::mergingDJRs::m_etaMax
double m_etaMax
Definition: mergingDJRs.cxx:25
Pythia8::mergingDJRs::m_sjHookPtrIn
Pythia8::SlowJetHook * m_sjHookPtrIn
Definition: mergingDJRs.cxx:28
Pythia8::mergingDJRs::m_slowJet
std::unique_ptr< Pythia8::SlowJet > m_slowJet
Definition: mergingDJRs.cxx:34
Pythia8::mergingDJRs::m_radius
double m_radius
Definition: mergingDJRs.cxx:26
Pythia8::mergingDJRs::m_massSetIn
int m_massSetIn
Definition: mergingDJRs.cxx:33
Pythia8::mergingDJRs::m_HistDjr
std::unique_ptr< TH1F > m_HistDjr
Definition: mergingDJRs.cxx:37
Pythia8::mergingDJRs::m_outFile
std::unique_ptr< TFile > m_outFile
Definition: mergingDJRs.cxx:38
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
lumiFormat.i
int i
Definition: lumiFormat.py:92
Pythia8::mergingDJRs::m_pTjetMin
double m_pTjetMin
Definition: mergingDJRs.cxx:27
Pythia8::mergingDJRs::m_workEventJet
Event m_workEventJet
Definition: mergingDJRs.cxx:41
Pythia8::mergingDJRs::getDJR
virtual void getDJR(const Event &event)
Definition: mergingDJRs.cxx:122
Pythia8::mergingDJRs::m_useFJcoreIn
bool m_useFJcoreIn
Definition: mergingDJRs.cxx:29
Pythia8::mergingDJRs::m_power
int m_power
Definition: mergingDJRs.cxx:24
Pythia8::mergingDJRs::m_result
vector< double > m_result
Definition: mergingDJRs.cxx:40
isLepton
bool isLepton(const T &p)
APID: the fourth generation leptons are leptons.
Definition: AtlasPID.h:130