Skip to content

Commit

Permalink
remnant edits
Browse files Browse the repository at this point in the history
  • Loading branch information
mverwe committed Feb 14, 2023
1 parent d0d33f3 commit 07ba50d
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .pythia8
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/Users/mverweij/soft/pythia8303
/Users/mverweij/soft/pythia8308
8 changes: 4 additions & 4 deletions PU14/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ FFLAGS = -Wall -O2
CXXFLAGS += -std=c++11
LDFLAGS += -std=c++11

FJCONFIG = /Users/mverweij/soft/fastjet-3.3.3/../fastjet333-install/bin/fastjet-config
FJLOC = /Users/mverweij/soft/fastjet-3.3.3/../fastjet333-install
FJCONFIG = /Users/mverweij/soft/fastjet-3.4.0/../fastjet340-install/bin/fastjet-config
FJLOC = /Users/mverweij/soft/fastjet-3.4.0/../fastjet340-install

INCLUDE += `$(FJCONFIG) --cxxflags`
LIBRARIES += -L$(FJLOC)/lib -lRecursiveTools `$(FJCONFIG) --libs --plugins` -lfastjetcontribfragile
LIBRARIES += -L/usr/local/Cellar/gsl/2.5/lib -lgsl -lgslcblas
LIBRARIES += -L/usr/local/Cellar/gsl/2.7.1/lib -lgsl -lgslcblas

INCLUDE += -I/usr/local/Cellar/gsl/2.5/include
INCLUDE += -I/usr/local/Cellar/gsl/2.7.1/include

INCLUDE += $(LCLINCLUDE)

Expand Down
39 changes: 26 additions & 13 deletions include/dyGroomer.hh
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ private :
std::vector<double> zg_; //zg of groomed jets
std::vector<int> drBranches_; //dropped branches
std::vector<double> dr12_; //distance between the two subjet
std::vector<double> tau21_; //n-subjettiness ratio 21
std::vector<double> tau32_; //n-subjettiness ratio 32
std::vector<double> kt_; //kt of groomed jets
std::vector<double> tau21_; //n-subjettiness ratio 21
std::vector<double> tau32_; //n-subjettiness ratio 32
std::vector<double> kappa_; //kappa of groomed jets

public :
Expand All @@ -42,6 +43,7 @@ public :
std::vector<double> getZgs() const;
std::vector<double> calculateZg();
std::vector<double> getDR12() const;
std::vector<double> getKts() const;
std::vector<int> getNDroppedSubjets() const;
std::vector<double> getKappas() const;
std::vector<double> getTau21() const;
Expand Down Expand Up @@ -77,6 +79,11 @@ std::vector<double> dyGroomer::getDR12() const
return dr12_;
}

std::vector<double> dyGroomer::getKts() const
{
return kt_;
}

std::vector<double> dyGroomer::getTau21() const
{
return tau21_;
Expand Down Expand Up @@ -121,6 +128,7 @@ std::vector<fastjet::PseudoJet> dyGroomer::doGrooming()
fjOutputs_.reserve(fjInputs_.size());
zg_.reserve(fjInputs_.size());
dr12_.reserve(fjInputs_.size());
kt_.reserve(fjInputs_.size());
drBranches_.reserve(fjInputs_.size());
kappa_.reserve(fjInputs_.size());
// tau21_.reserve(fjInputs_.size());
Expand All @@ -135,6 +143,7 @@ std::vector<fastjet::PseudoJet> dyGroomer::doGrooming()
fjOutputs_.push_back(fastjet::PseudoJet(0.,0.,0.,0.));
zg_.push_back(-1.);
dr12_.push_back(-1.);
kt_.push_back(-1.);
drBranches_.push_back(-1.);
kappa_.push_back(-1.);
//tau21_.push_back(-1);
Expand All @@ -157,6 +166,7 @@ std::vector<fastjet::PseudoJet> dyGroomer::doGrooming()
fjOutputs_.push_back(fastjet::PseudoJet(0.,0.,0.,0.));
zg_.push_back(-1.);
dr12_.push_back(-1.);
kt_.push_back(-1.);
drBranches_.push_back(-1.);
kappa_.push_back(-1.);
//tau21_.push_back(-1);
Expand Down Expand Up @@ -207,17 +217,19 @@ std::vector<fastjet::PseudoJet> dyGroomer::doGrooming()
fastjet::PseudoJet daughter1, daughter2;
groomed_jet.has_parents(daughter1, daughter2);

// if(daughter1.pt() + daughter2.pt() > 0 && daughter1.E()>0. && daughter2.E()>0. && daughter1.m()>0. && daughter2.m()>0.){
if (daughter1.pt() + daughter2.pt() > 0 && daughter1.E()>0. && daughter2.E()>0){
double pt = daughter1.pt() + daughter2.pt();
double zg = min(daughter1.pt(), daughter2.pt()) / pt;
double deltaR = daughter1.delta_R(daughter2);
drBranches_.push_back(ndrop);
zg_.push_back(zg);
dr12_.push_back(deltaR);
//kappa_.push_back(kappa);
kappa_.push_back(1./getKappa(pt,deltaR,zg));
}
// if(daughter1.pt() + daughter2.pt() > 0 && daughter1.E()>0. && daughter2.E()>0. && daughter1.m()>0. && daughter2.m()>0.){
if (daughter1.pt() + daughter2.pt() > 0 && daughter1.E()>0. && daughter2.E()>0){
double pt = daughter1.pt() + daughter2.pt();
double zg = min(daughter1.pt(), daughter2.pt()) / pt;
double deltaR = daughter1.delta_R(daughter2);
double kt = min(daughter1.pt(), daughter2.pt()) * deltaR;
drBranches_.push_back(ndrop);
zg_.push_back(zg);
dr12_.push_back(deltaR);
kt_.push_back(kt);
//kappa_.push_back(kappa);
kappa_.push_back(1./getKappa(pt,deltaR,zg));
}

// Compute the n-subjettiness ratio
// double beta = 2;
Expand All @@ -236,6 +248,7 @@ std::vector<fastjet::PseudoJet> dyGroomer::doGrooming()
else {fjOutputs_.push_back(fastjet::PseudoJet(0.,0.,0.,0.));
zg_.push_back(-1.);
dr12_.push_back(-1.);
kt_.push_back(-1.);
drBranches_.push_back(-1.);
kappa_.push_back(-1.);
// tau21_.push_back(-1);
Expand Down
14 changes: 10 additions & 4 deletions include/thermalEvent.hh
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,34 @@ class thermalEvent {
private :
double meanpt_;
unsigned int mult_;
double sigmaMult_;
double rapMin_;
double rapMax_;
double ptMin_;
double neutralFrac_;
TF1 *funcThrm_;

public :
thermalEvent(unsigned int mult = 12000, double meanpt = 0.7, double rapMin = -3., double rapMax = 3.,double neutralFrac = 0.33) :
thermalEvent(unsigned int mult = 12000, double meanpt = 0.7, double rapMin = -3., double rapMax = 3.,double neutralFrac = 0.33, double sigmaMult = 0.) :
meanpt_(meanpt),
mult_(mult),
sigmaMult_(sigmaMult),
rapMin_(rapMin),
rapMax_(rapMax),
neutralFrac_(neutralFrac)
{

funcThrm_ = new TF1("funcThrm_","[0]*TMath::Power([1], 2)*x*TMath::Exp(-[1]*x)", 0.2, 200.);
ptMin_ = 0.2;
//self.funbg = ROOT.TF1("funbg", "2. / [0] * x * TMath::Exp(-(2. / [0]) * x)", self.min_pt, self.max_pt, 1);
funcThrm_ = new TF1("funcThrm_","[0]*TMath::Power([1], 2)*x*TMath::Exp(-[1]*x)", ptMin_, 200.);
funcThrm_->SetParNames("Amplitude", "b (GeV/c)^{-1}");
funcThrm_->SetParameters(1.,2./meanpt_);
}

void setMult(unsigned int m) { mult_ = m; }
void setMult(double mpt) { meanpt_ = mpt; }
void setMultSigma(double s) { sigmaMult_ = s; }
void setMeanPt(double mpt) { meanpt_ = mpt; }
void setRapidityRange(double min, double max) { rapMin_ = min; rapMax_ = max; }
void setPtMin(double pt) {ptMin_ = pt; }

std::vector<fastjet::PseudoJet> createThermalEvent() {

Expand Down
1 change: 1 addition & 0 deletions runConstituentSubtraction.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <iostream>
#include <cstdio> // needed for io
#include <chrono>

#include "TFile.h"
Expand Down

0 comments on commit 07ba50d

Please sign in to comment.