Skip to content

Commit

Permalink
Update README and some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
cbravo135 committed Jul 31, 2017
1 parent 0e679bb commit 7258f65
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 29 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ all: genTree

MyDict.cxx: include/LinkDef.h
rootcint -f $@ -c $(CXXFLAGS) -p $^
libMyLib.so: MyDict.cxx
g++ -shared -o$@ `root-config --ldflags` $(CXXFLAGS) -I$(ROOTSYS)/include $^

lib/libMyLib.so: MyDict.cxx
g++ -shared -o$@ `root-config --ldflags` -fPIC $(CXXFLAGS) -I$(ROOTSYS)/include $^

genTree: MyDict.cxx $(SRCS)
g++ $(CXXFLAGS) $(SRCS) -o $@ -I$(HOME)/local/include/ $(GLIBS) `lhapdf-config --cflags --ldflags`
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
# sphaleronMC
Should compile with gcc version >= 5.3.0
It also requires ROOT version >= 6.06/01
Compiles with gcc version >= 5.3.0
Requires ROOT version >= 6.06/01
Requires LHAPDF == 6.1.6

mstwpdf is from the mstw2008 package, available publically at https://mstwpdf.hepforge.org/
A. D. Martin, W. J. Stirling, R. S. Thorne and G. Watt,
"Parton distributions for the LHC",
Eur. Phys. J. C63 (2009) 189-285
[arXiv:0901.0002 [hep-ph]].
One must change the code to make sure it opens the pdf grid file you want to use.

Now using the LHAPDF code which can be found at:
Eur.Phys.J. C75 (2015) 3, 132 (http://arxiv.org/abs/1412.7420)
The LHAPDF code which can be found at:
"LHAPDF6: parton density access in the LHC precision era"
Eur.Phys.J. C75 (2015) 3, 132
http://arxiv.org/abs/1412.7420

The pdf grid string is hard coded, and can be changed before compiling.
End user must make sure they have downloaded the desired pdf grid and
installed it into their installation of LHAPDF.
30 changes: 9 additions & 21 deletions src/genTree.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "TF1.h"
#include "TH1.h"
#include "TH2.h"
#include "TMath.h"
#include "TString.h"

#include "../include/configBuilder.h"
Expand All @@ -24,7 +25,7 @@

#define ARGS 4
#define SQRTS 13000.0
#define MCW 0.00060
#define MPW 5.0e-7

using namespace LHAPDF;
using namespace std;
Expand All @@ -39,7 +40,7 @@ int main(int argc, char* argv[])
}

float thr = atof(argv[1]);
float maxW = atof(argv[2]);
float MCW = atof(argv[2]);
int Nevt = atoi(argv[3]);
string ofName = string(argv[4]);
double maxwt = 0;
Expand Down Expand Up @@ -76,14 +77,14 @@ int main(int argc, char* argv[])
const PDF* LHApdf = mkPDF("NNPDF30_lo_as_0118",0);
cout << LHApdf->xfxQ2(2, 0.5, SQRTS*SQRTS) << endl;

c_mstwpdf *pdf = new c_mstwpdf("/afs/cern.ch/user/b/bravo/work/sphaleron/mc/toy/mstw2008/Grids/mstw2008nnlo.00.dat");
//c_mstwpdf *pdf = new c_mstwpdf("/afs/cern.ch/user/b/bravo/work/sphaleron/mc/toy/mstw2008/Grids/mstw2008nnlo.00.dat");
//c_mstwpdf *pdf = new c_mstwpdf("../mstw2008/Grids/mstw2008nnlo.00.dat");
double maxMCtot = 0.0;

TH1D *x1_h = new TH1D("x1_h","x1 inclusive",1000,0.0,1.0);
TH1D *mcTot_h = new TH1D("mcTot_h","Monte Carlo Probabilities",100,0.0,MCW);
TH1D *sumInterQ3_h = new TH1D("sumInterQ3_h","Intermediate particle charges",21,-10.5,10.5);
TH1D *sphM_h = new TH1D("sphM_h","Sphaleron Mass;Invariant Mass [GeV];Events / 100 GeV",50,8000.0,SQRTS);
TH1D *sphM_h = new TH1D("sphM_h","Sphaleron Transition Energy;Invariant Mass [TeV];Events / 100 GeV",50,8.0,SQRTS/1000.0);
TH1D *sphPz_h = new TH1D("sphPz_h","Sphaleron p_{z};p_{z} [GeV];Events / 100 GeV",80,-4000.0,4000.0);
TH1D *outID_h = new TH1D("outID_h","Outgoing PDG IDs;PDG ID;Entries",33,-16.5,16.5);
TH1D *p1x_h = new TH1D("p1x_h","Parton 1 Momentum Fraction;x_{1};Events / 0.01",60,0.4,1.0);
Expand Down Expand Up @@ -111,10 +112,10 @@ int main(int argc, char* argv[])
TH1D hBufeta(nameBuf.c_str(),titBuf.c_str(),100,-5,5);
eta_hv.push_back(hBufeta);

titBuf = Form("Quark %i #phi;#phi;Entries / 0.1",iq);
titBuf = Form("Quark %i #phi;#phi;Entries / 0.1 #pi",iq);
if(iq < 0) nameBuf = Form("phi_iqm%i_h",int(fabs(iq)));
else nameBuf = Form("phi_iqp%i_h",int(fabs(iq)));
TH1D hBufphi(nameBuf.c_str(),titBuf.c_str(),64,-3.2,3.2);
TH1D hBufphi(nameBuf.c_str(),titBuf.c_str(),20,-1.0*TMath::Pi(),TMath::Pi());
phi_hv.push_back(hBufphi);
}

Expand Down Expand Up @@ -215,7 +216,7 @@ int main(int argc, char* argv[])
pz = mom.Pz();

weight = 1.0;
while(weight > maxW*rand.Uniform())
while(weight > MPW*rand.Uniform())
{
gen.SetDecay(mom, confBuf.size(), masses);

Expand Down Expand Up @@ -462,7 +463,7 @@ int main(int argc, char* argv[])

inQid_h->Fill(iq2,iq1);
frac2D_h->Fill(x2,x1);
sphM_h->Fill(momM);
sphM_h->Fill(momM/1000.0);
sphPz_h->Fill(pz);
p1x_h->Fill(x1);
p1id_h->Fill(iq1);
Expand Down Expand Up @@ -505,16 +506,3 @@ int main(int argc, char* argv[])
















0 comments on commit 7258f65

Please sign in to comment.