ra4_macros
bede988c286599a3a84b77a4d788ac0a971e89f9
|
#include <cstddef>
#include <cstdio>
#include <cmath>
#include <string>
#include <vector>
#include "TString.h"
#include "TTree.h"
#include "TGraph.h"
Go to the source code of this file.
Typedefs | |
typedef std::pair< int, double > | int_double |
typedef std::pair< double, double > | double_double |
Functions | |
float | cross_section (const TString &file) |
std::vector< TString > | dirlist (const TString &folder, const TString &inname="dir", const TString &tag="") |
bool | eigen2x2 (float matrix[2][2], float &eig1, float &eig2) |
bool | id_big2small (const int_double &left, const int_double &right) |
bool | dd_big2small (const double_double &left, const double_double &right) |
bool | dd_small2big (const double_double &left, const double_double &right) |
long double | DeltaPhi (long double phi1, long double phi2) |
long double | SignedDeltaPhi (long double phi1, long double phi2) |
float | dR (float eta1, float eta2, float phi1, float phi2) |
TString | RoundNumber (double num, int decimals, double denom=1.) |
long double | AddInQuadrature (long double x, long double y) |
long double | GetMass (long double e, long double px, long double py, long double pz) |
long double | GetMT (long double m1, long double pt1, long double phi1, long double m2, long double pt2, long double phi2) |
long double | GetMT (long double pt1, long double phi1, long double pt2, long double phi2) |
bool | Contains (const std::string &text, const std::string &pattern) |
std::vector< std::string > | Tokenize (const std::string &input, const std::string &tokens=" ") |
void | get_count_and_uncertainty (TTree &tree, const std::string &cut, double &count, double &uncertainty) |
void | AddPoint (TGraph &graph, const double x, const double y) |
template<class T > | |
bool | is_nan (const T &x) |
template<class T > | |
short | Sign (T val) |
std::string | execute (const std::string &cmd) |
std::string | RemoveTrailingNewlines (std::string str) |
std::vector< double > | LinearSpacing (size_t npts, double low, double high) |
Variables | |
const long double | PI = acos(-1.L) |
typedef std::pair<double,double> double_double |
Definition at line 24 of file utilities.hpp.
typedef std::pair<int,double> int_double |
Definition at line 23 of file utilities.hpp.
long double AddInQuadrature | ( | long double | x, |
long double | y | ||
) |
Definition at line 212 of file utilities.cpp.
Referenced by dR(), main(), and GammaParams::operator+=().
void AddPoint | ( | TGraph & | graph, |
const double | x, | ||
const double | y | ||
) |
Definition at line 267 of file utilities.cpp.
Referenced by Process().
bool Contains | ( | const std::string & | text, |
const std::string & | pattern | ||
) |
Definition at line 201 of file generate_small_tree.cxx.
Referenced by main(), WriteBaseHeader(), WriteBaseSource(), WriteSepHeader(), and WriteSepSource().
float cross_section | ( | const TString & | file | ) |
Definition at line 32 of file utilities.cpp.
bool dd_big2small | ( | const double_double & | left, |
const double_double & | right | ||
) |
Definition at line 167 of file utilities.cpp.
bool dd_small2big | ( | const double_double & | left, |
const double_double & | right | ||
) |
Definition at line 163 of file utilities.cpp.
long double DeltaPhi | ( | long double | phi1, |
long double | phi2 | ||
) |
std::vector<TString> dirlist | ( | const TString & | folder, |
const TString & | inname = "dir" , |
||
const TString & | tag = "" |
||
) |
Definition at line 128 of file utilities.cpp.
References parse_card::file.
float dR | ( | float | eta1, |
float | eta2, | ||
float | phi1, | ||
float | phi2 | ||
) |
Definition at line 187 of file utilities.cpp.
References AddInQuadrature(), and DeltaPhi().
bool eigen2x2 | ( | float | matrix[2][2], |
float & | eig1, | ||
float & | eig2 | ||
) |
Definition at line 150 of file utilities.cpp.
std::string execute | ( | const std::string & | cmd | ) |
Definition at line 26 of file generate_small_tree.cxx.
Referenced by do_MJ_validation(), doMC1D(), doN1_R4(), doSignal(), doSyst(), main(), and Sign().
void get_count_and_uncertainty | ( | TTree & | tree, |
const std::string & | cut, | ||
double & | count, | ||
double & | uncertainty | ||
) |
Definition at line 257 of file utilities.cpp.
Referenced by DrawPie().
long double GetMass | ( | long double | e, |
long double | px, | ||
long double | py, | ||
long double | pz | ||
) |
Definition at line 223 of file utilities.cpp.
long double GetMT | ( | long double | m1, |
long double | pt1, | ||
long double | phi1, | ||
long double | m2, | ||
long double | pt2, | ||
long double | phi2 | ||
) |
Definition at line 228 of file utilities.cpp.
long double GetMT | ( | long double | pt1, |
long double | phi1, | ||
long double | pt2, | ||
long double | phi2 | ||
) |
Definition at line 233 of file utilities.cpp.
bool id_big2small | ( | const int_double & | left, |
const int_double & | right | ||
) |
Definition at line 159 of file utilities.cpp.
bool is_nan | ( | const T & | x | ) |
Definition at line 56 of file utilities.hpp.
std::vector<double> LinearSpacing | ( | size_t | npts, |
double | low, | ||
double | high | ||
) |
Definition at line 292 of file utilities.cpp.
Referenced by Sign().
std::string RemoveTrailingNewlines | ( | std::string | str | ) |
Definition at line 285 of file utilities.cpp.
Referenced by Sign().
TString RoundNumber | ( | double | num, |
int | decimals, | ||
double | denom = 1. |
||
) |
Definition at line 191 of file utilities.cpp.
References efficiency_map::num.
Referenced by Efficiency(), GetKappa(), GetLabel(), GetRatio(), main(), maketable(), plot_distributions(), PlotTurnOn(), and YieldsCut().
short Sign | ( | T | val | ) |
Definition at line 59 of file utilities.hpp.
References execute(), LinearSpacing(), and RemoveTrailingNewlines().
long double SignedDeltaPhi | ( | long double | phi1, |
long double | phi2 | ||
) |
Definition at line 176 of file utilities.cpp.
References PI.
std::vector<std::string> Tokenize | ( | const std::string & | input, |
const std::string & | tokens = " " |
||
) |
Definition at line 40 of file generate_small_tree.cxx.
Referenced by main().
const long double PI = acos(-1.L) |
Definition at line 25 of file utilities.hpp.
Referenced by DeltaPhi(), and SignedDeltaPhi().