ATLAS Offline Software
Loading...
Searching...
No Matches
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< TH1F > m_HistDjr
std::unique_ptr< TH1F > m_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 // ROOT histograms and the output file where to save them
46 m_HistDjr(std::make_unique<TH1F>("HistDjr", "The first DJR", 100, 0.0, 3.0)),
47 m_HistDjr2(std::make_unique<TH1F>("HistDjr2", "The second DJR", 100, 0.0, 3.0)),
48 m_outFile(std::make_unique<TFile>("hist-DJR.root", "RECREATE")) {
49
50 // Slowjet pointer
51 m_slowJet = std::make_unique<Pythia8::SlowJet>(
54
55 std::cout << "**********************************************************"
56 << std::endl;
57 std::cout << "* *"
58 << std::endl;
59 std::cout << "* the jet merging userhook CKKWL DJRS is working *"
60 << std::endl;
61 std::cout << "* *"
62 << std::endl;
63 std::cout << "**********************************************************"
64 << std::endl;
65 }
std::unique_ptr< TH1F > m_HistDjr
std::unique_ptr< TH1F > m_HistDjr2
std::unique_ptr< TFile > m_outFile
Pythia8::SlowJetHook * m_sjHookPtrIn
std::unique_ptr< Pythia8::SlowJet > m_slowJet

◆ ~mergingDJRs()

Pythia8::mergingDJRs::~mergingDJRs ( )
inline

Definition at line 68 of file mergingDJRs.cxx.

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

Member Function Documentation

◆ canVetoPartonLevel()

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

Definition at line 74 of file mergingDJRs.cxx.

74{ return true; }

◆ doVetoPartonLevel()

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

Definition at line 90 of file mergingDJRs.cxx.

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

◆ getDJR()

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

Definition at line 121 of file mergingDJRs.cxx.

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

◆ initAfterBeams()

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

Definition at line 81 of file mergingDJRs.cxx.

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

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: