CbmRoot
Loading...
Searching...
No Matches
CbmFastSim.h
Go to the documentation of this file.
1/* Copyright (C) 2016 Justus-Liebig-Universitaet Giessen, Giessen
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Julian Book [committer] */
4
5#ifndef CBMFASTSIM_H
6#define CBMFASTSIM_H 1
7
8
9#include "FairTask.h"
10
11#include "TClonesArray.h"
12#include "TH1.h"
13#include "TH2.h"
14#include "TH3.h"
15#include "TMatrixD.h"
16#include "TString.h"
17#include "TVector3.h"
18
19#include <list>
20#include <string>
21
22class TObjectArray;
23class TRandom3;
24class TLorentzVector;
25class TParticle;
26class TF1;
27class TH2;
28class TProfile3D;
29class THnBase;
30class TDatabasePDG;
32
33class CbmFastSim : public FairTask {
34
35public:
45
54
56 CbmFastSim(bool persist = true);
57
60
61 void Register();
62
64 virtual InitStatus Init();
65 virtual void InitTask();
66
67 virtual void Finish();
68
69
71 virtual void Exec(Option_t* opt);
72
73 void SetLookupEfficiency(THnBase* nom, THnBase* denom, EParticleType part);
74 void SetLookupResolutionP(TH2F* obj, EParticleType part) { fRFp[part] = obj; }
76
77 void SetSeed(unsigned int seed = 65539);
78
79private:
80 TRandom3* fRand;
81 TDatabasePDG* fdbPdg;
82 static const Int_t fgkNParts = 8; // numer of different particle species
83 EEfficiencyMethod fMethod = kIgnoreFluct; // efficiency caluclations
84
86 Bool_t PassEfficiencyFilter(Int_t pdg, Double_t* vals, Int_t* coord);
87 Double_t GetEfficiency(Int_t idx, Double_t* vals, Int_t* coord);
88
89 Bool_t Smearing(TLorentzVector* p4, Int_t pdg);
90 Double_t AnalyzeMap(TH2F* map, Double_t refValue);
91
92 virtual Bool_t IsSelected(TObject* sel, Int_t opt);
93
95 TClonesArray* fFastTracks = NULL;
96
98 THnBase* fEFF[fgkNParts]; // efficiency(nominator) map
99 THnBase* fEFFdenom[fgkNParts]; // denominator map
100 TH1* fEFFproj[fgkNParts][10]; // projections (method dependent)
101
102 TH2F* fRFp[fgkNParts]; // smearing matrix
103
105 virtual void SetParContainers();
106
109
111};
112
113#endif
CbmFastSim(bool persist=true)
Double_t GetEfficiency(Int_t idx, Double_t *vals, Int_t *coord)
void SetEfficiencyMethod(EEfficiencyMethod method)
Definition CbmFastSim.h:75
CbmFastSim(const CbmFastSim &obj)
void SetLookupEfficiency(THnBase *nom, THnBase *denom, EParticleType part)
TClonesArray * fFastTracks
Definition CbmFastSim.h:95
virtual void Exec(Option_t *opt)
Bool_t Smearing(TLorentzVector *p4, Int_t pdg)
CbmFastSim & operator=(const CbmFastSim &obj)
virtual InitStatus Init()
THnBase * fEFFdenom[fgkNParts]
Definition CbmFastSim.h:99
TDatabasePDG * fdbPdg
Definition CbmFastSim.h:81
virtual void SetParContainers()
Bool_t PassEfficiencyFilter(Int_t pdg, Double_t *vals, Int_t *coord)
virtual void InitTask()
void SetLookupResolutionP(TH2F *obj, EParticleType part)
Definition CbmFastSim.h:74
static const Int_t fgkNParts
Definition CbmFastSim.h:82
EEfficiencyMethod fMethod
Definition CbmFastSim.h:83
TRandom3 * fRand
Definition CbmFastSim.h:80
THnBase * fEFF[fgkNParts]
Definition CbmFastSim.h:98
ClassDef(CbmFastSim, 1)
void SetSeed(unsigned int seed=65539)
virtual Bool_t IsSelected(TObject *sel, Int_t opt)
void Register()
TH2F * fRFp[fgkNParts]
Definition CbmFastSim.h:102
TH1 * fEFFproj[fgkNParts][10]
Definition CbmFastSim.h:100
virtual void Finish()
Double_t AnalyzeMap(TH2F *map, Double_t refValue)