BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnTwoParticleDecay.h
Go to the documentation of this file.
1// @(#)bmnroot/physics/particles:$Id$
2// Author: Pavel Batyuk <pavel.batyuk@jinr.ru> 2017-12-27
3
4////////////////////////////////////////////////////////////////////////////////
5// //
6// BmnTwoParticleDecay //
7// //
8// A supplementary class for two-body decay reconstruction //
9// //
10////////////////////////////////////////////////////////////////////////////////
11
12#ifndef BMNTWOPARTICLEDECAY_H
13#define BMNTWOPARTICLEDECAY_H 1
14
15#include "BmnFieldMap.h"
16#include "BmnGemStripHit.h"
17#include "BmnGemStripStationSet.h"
18#include "BmnGemStripStationSet_RunSpring2017.h"
19#include "BmnGemStripStationSet_RunWinter2016.h"
20#include "BmnGlobalTrack.h"
21#include "BmnKalmanFilter.h"
22#include "BmnNewFieldMap.h"
23#include "BmnSiliconPoint.h"
24#include "BmnTrackMatch.h"
25#include "BmnVertex.h"
26#include "CbmMCTrack.h"
27#include "CbmStsPoint.h"
28#include "CbmVertex.h"
29#include "FairTask.h"
30
31#include <BmnEventHeader.h>
32#include <BmnParticlePair.h>
33#include <DstEventHeader.h>
34#include <TClonesArray.h>
35#include <TDatabasePDG.h>
36#include <TF1.h>
37#include <TFitResult.h>
38#include <TGraph.h>
39#include <TH1F.h>
40#include <TH1I.h>
41#include <TH2F.h>
42#include <TLorentzVector.h>
43#include <TMath.h>
44#include <TString.h>
45#include <TVector2.h>
46#include <TVector3.h>
47#include <UniDetectorParameter.h>
48#include <UniRun.h>
49#include <iostream>
50#include <vector>
51
52using namespace std;
53using namespace TMath;
54
55// Extenion of "standard" dst event header by info to be used in dec. particle anal ...
56
58{
59 private:
60 /** Event Header branch name **/
61 TString fHeaderName; //!
62
63 Int_t fRecoTracks; // track multiplicity
64 Int_t fBD; // number of BD-counts per event
65 Int_t fFD; // number of FD-counts per event
66
67 TVector3 fVp; // reconstructed prim. vertex
68
69 public:
71 {
72 fHeaderName = "DstEventHeaderExtended.";
73
74 fBD = 0;
75 fFD = 0;
76 fRecoTracks = 0;
77
78 fVp.SetXYZ(-1., -1., -1.);
79 }
80
81 DstEventHeaderExtended(UInt_t run_id, UInt_t event_id)
82 {
83 fBD = 0;
84 fFD = 0;
85 fRecoTracks = 0;
86
87 fVp.SetXYZ(-1., -1., -1.);
88 }
89
90 // Getters ...
91
92 Int_t bd() { return fBD; }
93
94 Int_t fd() { return fFD; }
95
97
98 TVector3 Vp() { return fVp; }
99
100 // Setters ...
101
102 void SetBd(Int_t n) { fBD = n; }
103
104 void SetFd(Int_t n) { fFD = n; }
105
106 void SetVp(Double_t x, Double_t y, Double_t z) { fVp.SetXYZ(x, y, z); }
107
109
111
113};
114
115class BmnTwoParticleDecay : public FairTask
116{
117 private:
118 Int_t fRunPeriod; // run period
119 Int_t fRunId; // runID
120 UInt_t fEventCounter; //! event counter
121 TDatabasePDG* fPDG; //! PDG database
122
123 TClonesArray* fGemPoints;
124 TClonesArray* fSilPoints;
125 TClonesArray* fSilHits;
126
127 TClonesArray* fGlobalTracks;
128 TClonesArray* fGemTracks;
129 TClonesArray* fSiliconTracks;
130
131 TClonesArray* fMCTracks;
132 TClonesArray* fGlobalMatches;
133 TClonesArray* fVertex;
134
135 TVector3 fMcVertex;
136 BmnVertex* fEventVertex;
137
138 TString fBranchGemPoints;
139 TString fBranchSilPoints;
140 TString fBranchGlobalTracks;
141 TString fBranchMCTracks;
142 TString fBranchGlobalMatch;
143 TString fBranchVertex;
144
145 BmnGemStripStationSet* fDetector; // Detector geometry
147
148 FairField* fField;
149 BmnFieldMap* fMagField;
150 BmnKalmanFilter* fKalman;
151
152 TClonesArray* fParticlePair;
153 TClonesArray* fParticlePair_MC;
154 TClonesArray* fParticlePair_RECO;
155
157
158 vector<TString> fAnalType;
159 vector<double> fWeightsModel;
160
162 TString fGeomFile;
163 TString fDigiDir;
164 TString fEoSNode;
165
166 // Dst event header ...
167 DstEventHeader* fDstHeader;
168
169 // Adding PhysInfo ...
170 DstEventHeaderExtended* fPhysInfo;
171
172 map<UInt_t, pair<Int_t, Int_t>> fTrigCountMap; // evId --> (bd, fd)
173
174 public:
178
179 virtual void Exec(Option_t* option);
180 virtual InitStatus Init();
181 virtual void Finish();
182
183 void SetParticlePDG(Int_t pdg1, Int_t pdg2)
184 {
185 fPDG1 = pdg1;
186 fPDG2 = pdg2;
187 }
188
189 void SetGeometryFile(TString file) { fGeomFile = file; }
190
191 void SetDigiDir(TString dir) { fDigiDir = dir; }
192
193 void SetEoSNode(TString node) { fEoSNode = node; }
194
195 private:
196 void Analysis();
199 vector<Double_t> GeomTopology(FairTrackParam, FairTrackParam, FairTrackParam, FairTrackParam);
201
202 inline Int_t recoToMcIdx(Int_t iTrack)
203 {
204 BmnTrackMatch* globTrackMatch = (BmnTrackMatch*)(fGlobalMatches->UncheckedAt(iTrack));
205 return globTrackMatch->GetMatchedLink().GetIndex();
206 }
207
208 inline Int_t CheckSign(Double_t val) { return (val > 0) ? 1 : ((val < 0) ? -1 : 0); }
209
210 TVector2 ArmenterosPodol(FairTrackParam, FairTrackParam);
212
214};
215
216#endif
bool Bool_t
int Int_t
unsigned int UInt_t
double Double_t
const char Option_t
#define ClassDef(name, id)
BmnStatus
Define status code.
Definition BmnEnums.h:93
BmnGlobalTrack.h.
const BmnLink & GetMatchedLink() const
Definition BmnMatch.h:40
BmnStatus FindFirstPointOnMCTrack(Int_t, BmnGlobalTrack *, Int_t)
Int_t CheckSign(Double_t val)
vector< TString > fAnalType
DstEventHeader * fDstHeader
Bool_t CheckTrack(BmnGlobalTrack *, Int_t, Double_t &, Double_t &)
void SetGeometryFile(TString file)
vector< Double_t > GeomTopology(FairTrackParam, FairTrackParam, FairTrackParam, FairTrackParam)
BmnGemStripStationSet * fDetector
TDatabasePDG * fPDG
event counter
virtual ~BmnTwoParticleDecay()
BmnGemStripConfiguration::GEM_CONFIG fGeometry
TClonesArray * fGemPoints
PDG database.
BmnKalmanFilter * fKalman
void SetDigiDir(TString dir)
void SetEoSNode(TString node)
DstEventHeaderExtended * fPhysInfo
vector< double > fWeightsModel
BmnTwoParticleDecay(BmnGemStripConfiguration::GEM_CONFIG config, Int_t runId=4649)
Double_t FindV0ByVirtualPlanes(BmnGlobalTrack *, BmnGlobalTrack *, Double_t, Double_t range=50.)
TClonesArray * fSiliconTracks
TClonesArray * fParticlePair_MC
TClonesArray * fGlobalMatches
void SetParticlePDG(Int_t pdg1, Int_t pdg2)
map< UInt_t, pair< Int_t, Int_t > > fTrigCountMap
TClonesArray * fParticlePair_RECO
virtual void Exec(Option_t *option)
FairTrackParam KalmanTrackPropagation(BmnGlobalTrack *track, Int_t, Double_t)
virtual void Finish()
virtual InitStatus Init()
TVector2 ArmenterosPodol(FairTrackParam, FairTrackParam)
Int_t recoToMcIdx(Int_t iTrack)
TString fHeaderName
Event Header branch name.
void SetVp(Double_t x, Double_t y, Double_t z)
DstEventHeaderExtended(UInt_t run_id, UInt_t event_id)
*brief user defined string literal for JSON values *sa std::size_t n
Definition json.hpp:20362
Definition json.hpp:4446