-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSimulation.h
68 lines (62 loc) · 1.92 KB
/
Simulation.h
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// Copyright (c) 2013 Patrick Huck
#ifndef STROOT_BESCOCKTAIL_SIMULATION_H_
#define STROOT_BESCOCKTAIL_SIMULATION_H_
#include <string>
#include <vector>
#include <TRandom3.h>
#include <TLorentzVector.h>
#include <TF1.h>
#include <TH1D.h>
#include "StRoot/BesCocktail/Database.h"
#include "StRoot/BesCocktail/Functions.h"
class Simulation {
private:
std::string particle;
double energy;
std::vector<TRandom3*> rndm;
double mass; // hadron mass
double mass_dec; // daughter hadron mass
double mPt; // hadron pt
double mEta; // hadron eta
double mPhi; // hadron phi
double mBR; // fraction of dalitz in total branching ratio (ee+dalitz)
double sigma0; // crystal ball gaussian width
int mode; // decay mode
DatabaseManager* dbm;
TLorentzVector* ep;
TLorentzVector* em;
TLorentzVector* dh;
TLorentzVector* dlp;
Functions* fp;
TF1* fPt; // input pt distribution
TF1* fM; // input mass distribution
TF1* fRes; // pt momentum resolution
TF1* fCB; // CrystalBall for momentum smearing
TF1* fKW; // KrollWada for dalitz decays
//TF1* fRapJpsi; // jpsi gaussian rapidity distribution
std::vector<double> vfill;
Float_t* afill;
bool isDhKin; // flag true if decay hadron kinematics
//TH1D* hPtInv; // test input pT histo
TH1D* hPt; // pT histo (hPtInv*pT@200)
TH1D* hM;
TH1D* hCB;
TH1D* hKW;
//TH1D* hRapJpsi;
double getEta(const double&);
void applyMomSmear(TLorentzVector&);
void doTwoBodyDecay();
void doDalitzDecay();
void twoBodyKinematics(const double&, double&, double&, double&);
void eeDecayVM(const double&);
void hDecayVM(const double&);
void pushNtVars();
public:
Simulation(const std::string&, const double&);
virtual ~Simulation() {}
void sampleInput();
void decay();
void smear();
Float_t* getFillArray();
};
#endif // STROOT_BESCOCKTAIL_SIMULATION_H_