10#include "FemtoFastCut.h"
18#include <TCollection.h>
30 Cout::PrintInfo(
"No default value in FemtoFastCuts, put some default values", EInfo::kLowWarning);
32 fMin =
new Double_t[1];
33 fMax =
new Double_t[1];
37 for (
int i = 1; i <
fBins; i++) {
39 Cout::PrintInfo(
"Overlaping bins in FemtoFastCuts, this lead to loosing pairs", EInfo::kLowWarning);
42 Cout::PrintInfo(
"Hole in FemtoFastCut, this might lead to loosing pairs", EInfo::kLowWarning);
49 Cout::PrintInfo(
"Empty femto fast cut, adding large values", EInfo::kLowWarning);
54 for (
int i = 0; i <
fBins; i++) {
59 if (
fPair == NULL) {
Cout::PrintInfo(Form(
"No FemtoPair in %s", this->ClassName()), EInfo::kCriticalError); }
63 Double_t* old_min =
fMin;
64 Double_t* old_max =
fMax;
67 for (
int i = 0; i <
fBins; i++) {
90 for (
int i = 0; i <
fBins; i++) {
95 for (int i = 0; i < fBins; i++) {
96 fMinTrue[i] = copy.fMinTrue[i];
97 fMaxTrue[i] = copy.fMaxTrue[i];
102 FemtoFastCut::~FemtoFastCut() {
109 FemtoFastCutKt::FemtoFastCutKt() : FemtoFastCut() {}
114 Double_t val = TMath::Sqrt(px * px + py * py) * 0.5;
115 for (
int i = 0; i <
fBins; i++) {
124 Double_t val = TMath::Sqrt(px * px + py * py) * 0.5;
125 for (
int i = 0; i <
fBins; i++) {
133 FemtoFastCutKt::~FemtoFastCutKt() {}
135 FemtoFastCutPtSum::FemtoFastCutPtSum() : FemtoFastCut() {}
140 Double_t val = TMath::Sqrt(pt1) + TMath::Sqrt(pt2);
141 for (
int i = 0; i <
fBins; i++) {
150 Double_t val = TMath::Sqrt(pt1) + TMath::Sqrt(pt2);
151 for (
int i = 0; i <
fBins; i++) {
159 FemtoFastCutPtSum::~FemtoFastCutPtSum() {}
163 TList* list =
new TList();
164 TList* listF =
new TList();
165 list->SetName(
"NumericValues");
166 listF->SetName(
"FormatedNames");
169 for (
int i = 0; i <
fBins; i++) {
179 FemtoFastCutPhi::FemtoFastCutPhi() {
188 Double_t val = RoundPhi(TMath::ATan2(py_sum, px_sum) - fPhiCorrection);
189 for (
int i = 0; i <
fBins; i++) {
198 Double_t val = TMath::ATan2(py_sum, px_sum) - fPhiCorrection;
199 val = RoundPhi(val - TMath::Pi());
200 for (
int i = 0; i <
fBins; i++) {
210 for (
int i = 0; i <
fBins; i++) {
214 fGlobalMin = TMath::Pi();
215 for (
int i = 0; i <
fBins; i++) {
216 if (
fMin[i] < fGlobalMin) { fGlobalMin =
fMin[i]; }
218 for (
int i = 0; i <
fBins; i++) {
225 for (
int i = 0; i <
fBins; i++) {
226 fMin[i] =
fMin[i] * TMath::RadToDeg();
228 fMax[i] =
fMax[i] * TMath::RadToDeg();
232 Double_t FemtoFastCutPhi::RoundPhi(Double_t val)
const {
233 while (val < -TMath::Pi()) {
234 val += TMath::Pi() * 2.0;
236 while (val >= TMath::Pi()) {
237 val -= TMath::Pi() * 2.0;
244 fPhiCorrection = fEventPhi + fGlobalMin;
245 fPhiCorrection = RoundPhi(fPhiCorrection);
250 void FemtoFastCutPhi::TryRoundRange(Int_t i) {
252 Double_t MinMod = TMath::Abs(
fMinTrue[i]);
253 Double_t MaxMod = TMath::Abs(
fMaxTrue[i]);
254 Double_t dMax = TMath::Abs(TMath::Pi() - MaxMod);
255 Double_t dMin = TMath::Abs(MinMod - TMath::Pi());
258 }
else if (dMin < dMax) {
261 Cout::PrintInfo(Form(
"Something is wrong with %s cut", this->ClassName()), EInfo::kWarning);
266 FemtoFastCutPhi::~FemtoFastCutPhi() {}
268 FemtoFastCutEta::FemtoFastCutEta() {
276 Double_t p = TMath::Sqrt(px * px + py * py + pz * pz);
277 Double_t eta = 0.5 * TMath::Log((p + pz) / (p - pz));
278 for (
int i = 0; i <
fBins; i++) {
288 Double_t p = TMath::Sqrt(px * px + py * py + pz * pz);
289 Double_t eta = 0.5 * TMath::Log((p + pz) / (p - pz));
290 for (
int i = 0; i <
fBins; i++) {
300 Double_t p = TMath::Sqrt(px * px + py * py + pz * pz);
301 Double_t eta = 0.5 * TMath::Log((p + pz) / (p - pz));
302 for (
int i = 0; i <
fBins; i++) {
308 FemtoFastCutEta::~FemtoFastCutEta() {}
317 FemtoFastCut(fast), fEventPhi(0), fGlobalMin(0), fPhiCorrection(0) {}
static void PrintInfo(TString text, Hal::EInfo status)
Int_t GetBinHemisphere() const
Int_t GetBinRotated() const
Int_t GetBinRotated() const
Int_t GetBinHemisphere() const
void SetEventPhi(const Double_t phi)
Int_t GetBinRotated() const
Int_t GetBinHemisphere() const
virtual Package * Report() const
void Init(FemtoPair *pair)
Int_t GetBinHemisphere() const
Int_t GetBinRotated() const
virtual void Init(FemtoPair *pair)
virtual void AddCutBin(Double_t min, Double_t max, Option_t *opt=" ")
virtual Package * Report() const
void AddObject(TObject *object)