|
babymaker
e95a6a9342d4604277fe7cc6149b6b5b24447d89
|
#include <cstddef>#include <cstdio>#include <iostream>#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 |
Enumerations | |
| enum | varType { kDouble, kvDouble, kFloat, kvFloat, kInt, kvInt, kBool, kvBool } |
Functions | |
| int | change_branch_one (TString indir, TString name, TString outdir, std::vector< TString > var_type, std::vector< TString > var, std::vector< std::vector< TString > > var_val, int totentries) |
| int | change_branch_one (TString indir, TString name, TString outdir, std::vector< TString > var_type, std::vector< TString > var, std::vector< TString > var_val, TString newname="empty") |
| 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.) |
| TString | addCommas (double num) |
| 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) |
| TString | hoursMinSec (long seconds) |
| float | wISR (int nisr, std::vector< float > &sys_isr) |
| std::vector< TString > | dirlist (const TString &folder, const TString &inname="dir", const TString &tag="") |
| void | mergeNtuples (std::vector< TString > ntuples, TString outname) |
| template<class T > | |
| T | noNaN (T val, T defval=1.) |
| 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 21 of file utilities.hh.
| typedef std::pair<int,double> int_double |
Definition at line 20 of file utilities.hh.
| enum varType |
| Enumerator | |
|---|---|
| kDouble | |
| kvDouble | |
| kFloat | |
| kvFloat | |
| kInt | |
| kvInt | |
| kBool | |
| kvBool | |
Definition at line 23 of file utilities.hh.
| TString addCommas | ( | double | num | ) |
Definition at line 499 of file utilities.cc.
References resubmit::ind.
Referenced by change_branch_one(), and main().
| long double AddInQuadrature | ( | long double | x, |
| long double | y | ||
| ) |
Definition at line 508 of file utilities.cc.
Referenced by dR().
| void AddPoint | ( | TGraph & | graph, |
| const double | x, | ||
| const double | y | ||
| ) |
Definition at line 563 of file utilities.cc.
| int change_branch_one | ( | TString | indir, |
| TString | name, | ||
| TString | outdir, | ||
| std::vector< TString > | var_type, | ||
| std::vector< TString > | var, | ||
| std::vector< std::vector< TString > > | var_val, | ||
| int | totentries | ||
| ) |
Definition at line 32 of file utilities.cc.
References addCommas(), Contains(), kBool, kDouble, kFloat, kInt, kvBool, kvDouble, kvFloat, kvInt, noNaN(), roundNumber(), xsec::signalCrossSection(), xsec::stopCrossSection(), wISR(), and make_dataset_table::xsec.
Referenced by main().
| int change_branch_one | ( | TString | indir, |
| TString | name, | ||
| TString | outdir, | ||
| std::vector< TString > | var_type, | ||
| std::vector< TString > | var, | ||
| std::vector< TString > | var_val, | ||
| TString | newname = "empty" |
||
| ) |
Definition at line 310 of file utilities.cc.
References Contains().
| bool Contains | ( | const std::string & | text, |
| const std::string & | pattern | ||
| ) |
Definition at line 166 of file generate_baby.cxx.
Referenced by change_branch_one(), WriteBaseHeader(), WriteBaseSource(), WriteSepHeader(), and WriteSepSource().
| bool dd_big2small | ( | const double_double & | left, |
| const double_double & | right | ||
| ) |
Definition at line 454 of file utilities.cc.
| bool dd_small2big | ( | const double_double & | left, |
| const double_double & | right | ||
| ) |
Definition at line 450 of file utilities.cc.
| 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 287 of file utilities.cc.
References count_root_files::files.
Referenced by main(), and onefile_skim().
| float dR | ( | float | eta1, |
| float | eta2, | ||
| float | phi1, | ||
| float | phi2 | ||
| ) |
Definition at line 474 of file utilities.cc.
References AddInQuadrature(), DeltaPhi(), and utilities::dPhi().
Referenced by bmaker_full::writeIFSR(), and bmaker_full::writeMC().
| bool eigen2x2 | ( | float | matrix[2][2], |
| float & | eig1, | ||
| float & | eig2 | ||
| ) |
Definition at line 437 of file utilities.cc.
| std::string execute | ( | const std::string & | cmd | ) |
Definition at line 26 of file generate_baby.cxx.
Referenced by event_tools::event_tools(), main(), MakeVRunLumi(), Sign(), and bmaker_full::~bmaker_full().
| void get_count_and_uncertainty | ( | TTree & | tree, |
| const std::string & | cut, | ||
| double & | count, | ||
| double & | uncertainty | ||
| ) |
Definition at line 553 of file utilities.cc.
| long double GetMass | ( | long double | e, |
| long double | px, | ||
| long double | py, | ||
| long double | pz | ||
| ) |
Definition at line 519 of file utilities.cc.
| long double GetMT | ( | long double | m1, |
| long double | pt1, | ||
| long double | phi1, | ||
| long double | m2, | ||
| long double | pt2, | ||
| long double | phi2 | ||
| ) |
Definition at line 524 of file utilities.cc.
| long double GetMT | ( | long double | pt1, |
| long double | phi1, | ||
| long double | pt2, | ||
| long double | phi2 | ||
| ) |
Definition at line 529 of file utilities.cc.
| TString hoursMinSec | ( | long | seconds | ) |
Definition at line 599 of file utilities.cc.
Referenced by main().
| bool id_big2small | ( | const int_double & | left, |
| const int_double & | right | ||
| ) |
Definition at line 446 of file utilities.cc.
| std::vector<double> LinearSpacing | ( | size_t | npts, |
| double | low, | ||
| double | high | ||
| ) |
Definition at line 588 of file utilities.cc.
Referenced by Sign().
| void mergeNtuples | ( | std::vector< TString > | ntuples, |
| TString | outname | ||
| ) |
Definition at line 632 of file utilities.cc.
References resubmit::ind, and bmaker_full_cfg::rootfile.
Referenced by main().
| T noNaN | ( | T | val, |
| T | defval = 1. |
||
| ) |
Definition at line 61 of file utilities.hh.
Referenced by change_branch_one(), and main().
| std::string RemoveTrailingNewlines | ( | std::string | str | ) |
Definition at line 581 of file utilities.cc.
Referenced by Sign().
| TString roundNumber | ( | double | num, |
| int | decimals, | ||
| double | denom = 1. |
||
| ) |
Definition at line 478 of file utilities.cc.
Referenced by change_branch_one(), main(), mc_tools::printParticle(), bmaker_full::reportTime(), and bmaker_full::~bmaker_full().
| short Sign | ( | T | val | ) |
Definition at line 69 of file utilities.hh.
References rename_data_eras::cmd, execute(), LinearSpacing(), and RemoveTrailingNewlines().
| long double SignedDeltaPhi | ( | long double | phi1, |
| long double | phi2 | ||
| ) |
Definition at line 463 of file utilities.cc.
References PI.
| std::vector<std::string> Tokenize | ( | const std::string & | input, |
| const std::string & | tokens = " " |
||
| ) |
Definition at line 40 of file generate_baby.cxx.
Referenced by main().
| float wISR | ( | int | nisr, |
| std::vector< float > & | sys_isr | ||
| ) |
Definition at line 612 of file utilities.cc.
Referenced by change_branch_one(), and main().
| const long double PI = acos(-1.L) |
Definition at line 22 of file utilities.hh.
Referenced by DeltaPhi(), and SignedDeltaPhi().
1.8.11