-
Notifications
You must be signed in to change notification settings - Fork 0
/
Utils.cxx
33 lines (29 loc) · 1.04 KB
/
Utils.cxx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright (c) 2013 Patrick Huck
#include "StRoot/BesCocktail/Utils.h"
#include <iostream>
#include <boost/lexical_cast.hpp>
#include <TMath.h>
double Utils::emass = 0.510998928e-3;
double Utils::emass2 = emass*emass;
double Utils::twoPi = 2.*TMath::Pi();
double Utils::threePi = 3.*TMath::Pi();
double Utils::alpha = 1./137.035999174;
double Utils::mMin = 2*emass;
double Utils::ptMin = 0.;
double Utils::ptMax = 5.;
int Utils::nBins = 350; // 10 MeV/c2
int Utils::nBinsPt = 200; // 25 MeV/c
double Utils::mMax = 3.5;
std::map<std::string, int> Utils::mColorMap = Utils::createColorMap();
Utils::Utils() { }
void Utils::printInfo(const int& n, const int& div) { // div in k
if ( n > 0 && !(n%(div*1000)) ) std::cout << n/1000 << "k" << std::endl;
else if ( !(n%(div*100)) ) std::cout << "." << std::flush;
}
const char* Utils::getOutFileName(
const std::string& p, const double& e, const std::string& suffix) {
std::string fn = "out/BesCocktail/";
fn += boost::lexical_cast<std::string>(e);
fn += "/"+p+suffix+".root";
return fn.c_str();
}