theme | _class | backgroundColor | marp | footer | tags |
---|---|---|---|---|---|
gaia |
lead |
true |
Daniel Brandenburg | 07142020 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TLatex tl; | |
TString label = ""; | |
TString klabel = ""; | |
TH1* sliceFit(TH2 * h2, TString _klabel){ | |
TF1 * fgyRes = new TF1( "fgyRes", "gaus" ); | |
fgyRes->SetRange( -0.5, 0.5 ); | |
h2->RebinX(4); | |
h2->FitSlicesY( fgyRes ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Globals | |
TGeoManager *geom; | |
TGeoElementTable *table; | |
// Materials | |
TGeoMedium *mediumAir; | |
TGeoMedium *mediumG10; | |
TGeoMedium *mediumNPC02; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "TFile.h" | |
#include "TH1F.h" | |
#include "TH1D.h" | |
#include "TH2F.h" | |
#include "TH3F.h" | |
#include "TCanvas.h" | |
#include "TMath.h" | |
#include "TVector3.h" | |
#include "TLegend.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Author: Daniel Brandenburg | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <iostream> | |
#include <memory> | |
#include <stdexcept> | |
#include <string> | |
#include <array> | |
// credit : https://stackoverflow.com/users/58008/waqas | |
// from : https://stackoverflow.com/questions/478898/how-do-i-execute-a-command-and-get-output-of-command-within-c-using-posix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//usr/bin/env root -l -b -q "$0( $1, \"$2\" )"; exit $? | |
/* Calculate the nth moment of a distribution | |
* | |
* int n : order of the moment to calculate | |
* TString filehist : | |
*/ | |
double moment( int n = 1, TString filehist = "", float x1=0, float x2=-1 ){ | |
cout << "Calculating moment " << n << " on " << filehist << endl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import numpy | |
import sys | |
if len(sys.argv) < 4: | |
print( "Usage: linspace start stop step [, endpoint, ndecimals]" ) | |
exit() | |
if not sys.stdin.isatty(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import numpy | |
import sys | |
if len(sys.argv) < 4: | |
print( "Usage: arange start stop step [, ndecimals]" ) | |
exit() | |
if not sys.stdin.isatty(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* | |
* Twitter Bootstrap | |
* | |
*/ | |
/*! | |
* Bootstrap v3.3.7 (http://getbootstrap.com) | |
* Copyright 2011-2016 Twitter, Inc. | |
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | |
*/ |