babymaker
e95a6a9342d4604277fe7cc6149b6b5b24447d89
|
#include <cmath>
#include <deque>
#include <iostream>
#include <string>
#include <stdexcept>
#include <iomanip>
#include "TCollection.h"
#include "TFile.h"
#include "TGraph.h"
#include "TH1D.h"
#include "TList.h"
#include "TString.h"
#include "TSystemDirectory.h"
#include "TSystemFile.h"
#include "TSystem.h"
#include "TTree.h"
#include "TChain.h"
#include "TRegexp.h"
#include "cross_sections.hh"
#include "utilities.hh"
Go to the source code of this file.
Functions | |
int | change_branch_one (TString indir, TString name, TString outdir, vector< TString > var_type, vector< TString > var, vector< vector< TString > > var_val, int totentries) |
vector< TString > | dirlist (const TString &folder, const TString &inname, const TString &tag) |
int | change_branch_one (TString indir, TString name, TString outdir, vector< TString > var_type, vector< TString > var, vector< TString > var_val, TString newname) |
bool | eigen2x2 (float matrix[2][2], float &eig1, float &eig2) |
bool | id_big2small (const int_double &left, const int_double &right) |
bool | dd_small2big (const double_double &left, const double_double &right) |
bool | dd_big2small (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) |
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 string &text, const string &pattern) |
vector< string > | Tokenize (const string &input, const string &tokens) |
void | get_count_and_uncertainty (TTree &tree, const string &cut, double &count, double &uncertainty) |
void | AddPoint (TGraph &graph, const double x, const double y) |
string | execute (const string &cmd) |
string | RemoveTrailingNewlines (string str) |
vector< double > | LinearSpacing (size_t npts, double low, double high) |
TString | hoursMinSec (long seconds) |
float | wISR (int nisr, vector< float > &sys_isr) |
void | mergeNtuples (vector< TString > ntuples, TString outname) |
TString addCommas | ( | double | num | ) |
Definition at line 499 of file utilities.cc.
References resubmit::ind.
Referenced by change_branch_one().
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, | ||
vector< TString > | var_type, | ||
vector< TString > | var, | ||
vector< 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, | ||
vector< TString > | var_type, | ||
vector< TString > | var, | ||
vector< TString > | var_val, | ||
TString | newname | ||
) |
Definition at line 310 of file utilities.cc.
References Contains().
bool Contains | ( | const string & | text, |
const string & | pattern | ||
) |
Definition at line 535 of file utilities.cc.
Referenced by change_branch_one(), and bmaker_full::writeTriggers().
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 | ||
) |
vector<TString> dirlist | ( | const TString & | folder, |
const TString & | inname, | ||
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(), and DeltaPhi().
bool eigen2x2 | ( | float | matrix[2][2], |
float & | eig1, | ||
float & | eig2 | ||
) |
Definition at line 437 of file utilities.cc.
string execute | ( | const string & | cmd | ) |
Definition at line 567 of file utilities.cc.
Referenced by event_tools::event_tools(), main(), MakeVRunLumi(), Sign(), and bmaker_full::~bmaker_full().
void get_count_and_uncertainty | ( | TTree & | tree, |
const 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.
vector<double> LinearSpacing | ( | size_t | npts, |
double | low, | ||
double | high | ||
) |
Definition at line 588 of file utilities.cc.
Referenced by Sign().
void mergeNtuples | ( | vector< TString > | ntuples, |
TString | outname | ||
) |
Definition at line 632 of file utilities.cc.
References resubmit::ind, and bmaker_full_cfg::rootfile.
Referenced by main().
string RemoveTrailingNewlines | ( | string | str | ) |
Definition at line 581 of file utilities.cc.
Referenced by Sign().
TString roundNumber | ( | double | num, |
int | decimals, | ||
double | denom | ||
) |
Definition at line 478 of file utilities.cc.
Referenced by change_branch_one().
long double SignedDeltaPhi | ( | long double | phi1, |
long double | phi2 | ||
) |
Definition at line 463 of file utilities.cc.
References PI.
vector<string> Tokenize | ( | const string & | input, |
const string & | tokens | ||
) |
Definition at line 539 of file utilities.cc.
float wISR | ( | int | nisr, |
vector< float > & | sys_isr | ||
) |
Definition at line 612 of file utilities.cc.
Referenced by change_branch_one(), and main().