CbmRoot
Loading...
Searching...
No Matches
CbmAnaDimuonAnalysis.cxx
Go to the documentation of this file.
1/* Copyright (C) 2009-2021 Petersburg Nuclear Physics Institute named by B.P.Konstantinov of National Research Centre "Kurchatov Institute", Gatchina
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Evgeny Kryshen [committer], Anna Senger */
4
5//----------------------------------------
6//
7// 2019 A. Senger a.senger@gsi.de
8//
9//----------------------------------------
10#define PBINNING 100, 0., 20.
11#define THETABINNING 180, 0., 180.
12#define PTBINNING 100, 0., 10.
13#define YBINNING 100, -2., 6.
14#define MBINNING 400, 0., 4.
15
17
18#include "CbmAnaMuonCandidate.h"
19#include "CbmGlobalTrack.h"
20#include "CbmMCTrack.h"
21#include "CbmMatch.h"
22#include "CbmMuchGeoScheme.h"
23#include "CbmMuchPixelHit.h"
24#include "CbmMuchTrack.h"
25#include "CbmStsKFTrackFitter.h"
26#include "CbmStsTrack.h"
27#include "CbmTofHit.h"
28#include "CbmTofPoint.h"
29#include "CbmTrackMatch.h"
30#include "CbmTrackMatchNew.h"
31#include "CbmTrdHit.h"
32#include "CbmTrdTrack.h"
33#include "CbmVertex.h"
34#include "FairEventHeader.h"
35#include "FairRootManager.h"
36#include "FairTrackParam.h"
37#include "PParticle.h"
38#include "TClonesArray.h"
39#include "TDirectory.h"
40#include "TFile.h"
41#include "TH2D.h"
42#include "TH3D.h"
43#include "TLorentzVector.h"
44#include "TMCProcess.h"
45#include "TMath.h"
46#include "TMultiLayerPerceptron.h"
47#include "TProfile.h"
48#include "TSystem.h"
49#include "TTree.h"
50#include "TVector3.h"
51#include "vector"
52
53#include <Logger.h>
54using std::vector;
55
56#include <fstream>
57#include <iostream>
58
59#include <sys/stat.h>
60using namespace std;
61
62// ----- Default constructor -------------------------------------------
64 : FairTask("AnaDimuonAnalysis")
65 , fEvent(0)
66 , fEvtHeader()
67 , fMCTracks(NULL)
68 , fStsTracks(NULL)
69 , fStsTrackMatches(NULL)
70 , fMuchTracks(NULL)
71 , fMuchTrackMatches(NULL)
72 , fGlobalTracks(NULL)
73 , fTrdTracks(NULL)
74 , fTofHit(NULL)
75 , fMuPlus(new TClonesArray("CbmAnaMuonCandidate", 1))
76 , fMuMinus(new TClonesArray("CbmAnaMuonCandidate", 1))
77 , fParticles(NULL)
78 , fInputTree(NULL)
79 , fPlutoFile(NULL)
80 , fFitter(NULL)
81 , fVertex(NULL)
82 , fChi2StsCut(2)
83 , fChi2MuchCut(3)
84 , fChi2VertexCut(3)
85 , fAnnCut(-1)
86 , fNeurons(0)
87 , fSigmaTofCut(2)
88 , fMass(0.105658)
89 , fUseCuts(kTRUE)
90 , fUseMC(kTRUE)
91 , fNofMuchCut(11)
92 , fNofStsCut(7)
93 , fNofTrdCut(1)
94 , fFileAnnName("")
95 ,
96 // fFileName("histo.root"),
97 // fEffFileName("eff_histo.root"),
98 fGeoScheme(NULL)
99
100{
101 fPlutoFileName = name;
102 fSetupName = setup;
103}
104// -------------------------------------------------------------------------
105
106
107// ----- SetParContainers -------------------------------------------------
109// -------------------------------------------------------------------------
110
111
112// ----- Public method Init (abstract in base class) --------------------
114{
115 // Get and check FairRootManager
116 FairRootManager* fManager = FairRootManager::Instance();
117 fMCTracks = (TClonesArray*) fManager->GetObject("MCTrack");
118 if (nullptr == fMCTracks) LOG(fatal) << "No MCTrack in input";
119
120 fStsTracks = (TClonesArray*) fManager->GetObject("StsTrack");
121 if (nullptr == fStsTracks) LOG(fatal) << "No StsTrack in input";
122
123 if (fUseMC) fStsTrackMatches = (TClonesArray*) fManager->GetObject("StsTrackMatch");
124 if (nullptr == fStsTrackMatches && fUseMC) LOG(fatal) << "No StsTrackMatch in input";
125
126 fMuchTracks = (TClonesArray*) fManager->GetObject("MuchTrack");
127 if (nullptr == fMuchTracks) LOG(fatal) << "No MuchTrack in input";
128
129 if (fUseMC) fMuchTrackMatches = (TClonesArray*) fManager->GetObject("MuchTrackMatch");
130 if (nullptr == fMuchTrackMatches && fUseMC) LOG(fatal) << "No MuchTrackMatch in input";
131
132 fGlobalTracks = (TClonesArray*) fManager->GetObject("GlobalTrack");
133 if (nullptr == fGlobalTracks) LOG(fatal) << "No GlobalTrack in input";
134
135 fTrdTracks = (TClonesArray*) fManager->GetObject("TrdTrack");
136 if (nullptr == fTrdTracks) LOG(fatal) << "No TrdTrack in input";
137
138 fTofHit = (TClonesArray*) fManager->GetObject("TofHit");
139 if (nullptr == fTofHit) LOG(fatal) << "No TofHit in input";
140
141 fVertex = dynamic_cast<CbmVertex*>(fManager->GetObject("PrimaryVertex."));
142 fEvtHeader = dynamic_cast<FairEventHeader*>(fManager->GetObject("EventHeader."));
143
144 fEvent = 0;
145
146 fManager->Register("MuPlus", "Much", fMuPlus, kTRUE);
147 fManager->Register("MuMinus", "Much", fMuMinus, kTRUE);
148
150 // fGeoScheme->Init(fDigiFileName);
151 // fLastStationIndex = fGeoScheme->GetNStations()-1;
152 // fNLayers = 0;
153 // for (Int_t i=0;i<=fLastStationIndex;i++){
154 // fNLayers+=fGeoScheme->GetLayerSides(i).size()/2;
155 // }
157 fFitter->Init();
158
159 YPt_pluto = new TH2D("YPt_pluto", "PLUTO signal", YBINNING, PTBINNING);
160
161 if (fPlutoFileName != "") {
162 if (fPlutoFileName.Contains("root")) {
163 fParticles = new TClonesArray("PParticle", 100);
164
166 TFile* oldFile = gFile;
167 TDirectory* oldDir = gDirectory;
168
169 fPlutoFile = new TFile(fPlutoFileName.Data());
170 LOG_IF(fatal, !fPlutoFile) << "Could not open file " << fPlutoFileName;
171 fInputTree = fPlutoFile->Get<TTree>("data");
172 LOG_IF(fatal, !fInputTree) << "Could not read data tree from file " << fPlutoFileName;
173 fInputTree->SetBranchAddress("Particles", &fParticles);
174 for (int iEvent = 0; iEvent < fInputTree->GetEntries(); iEvent++) {
175 fInputTree->GetEntry(iEvent);
176 Int_t NofPart = fParticles->GetEntriesFast();
177 PParticle* Part1 = (PParticle*) fParticles->At(NofPart - 2);
178 PParticle* Part2 = (PParticle*) fParticles->At(NofPart - 1);
179 TLorentzVector mom1 = Part1->Vect4();
180 TLorentzVector mom2 = Part2->Vect4();
181 TLorentzVector Mom = mom1 + mom2;
182 YPt_pluto->Fill(Mom.Rapidity(), Mom.Pt(), 1. / (Double_t) fInputTree->GetEntries());
183 }
184
186 gFile = oldFile;
187 gDirectory = oldDir;
188 }
189 }
190
191 TString title1 = "STS accepted MC signal";
192 TString title2 = "STS+MUCH accepted MC signal";
193 TString title3 = "STS+MUCH+TRD accepted MC signal";
194 TString title4 = "STS+MUCH+TRD+TOF accepted MC signal";
195
196 YPt_StsAcc = new TH2D("YPt_StsAcc", title1, YBINNING, PTBINNING);
197 YPt_StsAcc->GetXaxis()->SetTitle("Y");
198 YPt_StsAcc->GetYaxis()->SetTitle("P_{t} (GeV/c)");
199
200 YPt_StsMuchAcc = (TH2D*) YPt_StsAcc->Clone("YPt_StsMuchAcc");
201 YPt_StsMuchAcc->SetTitle(title2);
202 YPt_StsMuchTrdAcc = (TH2D*) YPt_StsAcc->Clone("YPt_StsMuchTrdAcc");
203 YPt_StsMuchTrdAcc->SetTitle(title3);
204 YPt_StsMuchTrdTofAcc = (TH2D*) YPt_StsAcc->Clone("YPt_StsMuchTrdTofAcc");
205 YPt_StsMuchTrdTofAcc->SetTitle(title4);
206
207 YPtM = new TH3D("YPtM", "Reconstrcuted YPtM spectrum", YBINNING, PTBINNING, MBINNING);
208
209 acc_P[0][0] = new TProfile("signal_accP_Sts", title1, PBINNING);
210 acc_P[0][0]->GetXaxis()->SetTitle("P (GeV/c)");
211 acc_P[0][0]->GetYaxis()->SetTitle("%");
212
213 acc_P[1][0] = (TProfile*) acc_P[0][0]->Clone("signal_accP_StsMuch");
214 acc_P[1][0]->SetTitle(title2);
215 acc_P[2][0] = (TProfile*) acc_P[0][0]->Clone("signal_accP_StsMuchTrd");
216 acc_P[2][0]->SetTitle(title3);
217 acc_P[3][0] = (TProfile*) acc_P[0][0]->Clone("signal_accP_StsMuchTrdTof");
218 acc_P[3][0]->SetTitle(title4);
219
220 acc_Theta[0][0] = new TProfile("signal_accTheta_Sts", title1, THETABINNING);
221 acc_Theta[0][0]->GetXaxis()->SetTitle("#Theta (#circ)");
222 acc_Theta[0][0]->GetYaxis()->SetTitle("%");
223
224 acc_Theta[1][0] = (TProfile*) acc_Theta[0][0]->Clone("signal_accTheta_StsMuch");
225 acc_Theta[1][0]->SetTitle(title2);
226 acc_Theta[2][0] = (TProfile*) acc_Theta[0][0]->Clone("signal_accTheta_StsMuchTrd");
227 acc_Theta[2][0]->SetTitle(title3);
228 acc_Theta[3][0] = (TProfile*) acc_Theta[0][0]->Clone("signal_accTheta_StsMuchTrdTof");
229 acc_Theta[3][0]->SetTitle(title4);
230
231 title1 = "STS accepted MC #mu+";
232 title2 = "STS+MUCH accepted MC #mu+";
233 title3 = "STS+MUCH+TRD accepted MC #mu+";
234 title4 = "STS+MUCH+TRD+TOF accepted MC #mu+";
235
236 acc_P[0][1] = (TProfile*) acc_P[0][0]->Clone("muPl_accP_Sts");
237 acc_P[0][1]->SetTitle(title1);
238 acc_P[1][1] = (TProfile*) acc_P[0][0]->Clone("muPl_accP_StsMuch");
239 acc_P[1][1]->SetTitle(title2);
240 acc_P[2][1] = (TProfile*) acc_P[0][0]->Clone("muPl_accP_StsMuchTrd");
241 acc_P[2][1]->SetTitle(title3);
242 acc_P[3][1] = (TProfile*) acc_P[0][0]->Clone("muPl_accP_StsMuchTrdTof");
243 acc_P[3][1]->SetTitle(title4);
244
245 acc_Theta[0][1] = (TProfile*) acc_Theta[0][0]->Clone("muPl_accTheta_Sts");
246 acc_Theta[0][1]->SetTitle(title1);
247 acc_Theta[1][1] = (TProfile*) acc_Theta[0][0]->Clone("muPl_accTheta_StsMuch");
248 acc_Theta[1][1]->SetTitle(title2);
249 acc_Theta[2][1] = (TProfile*) acc_Theta[0][0]->Clone("muPl_accTheta_StsMuchTrd");
250 acc_Theta[2][1]->SetTitle(title3);
251 acc_Theta[3][1] = (TProfile*) acc_Theta[0][0]->Clone("muPl_accTheta_StsMuchTrdTof");
252 acc_Theta[3][1]->SetTitle(title4);
253
254 title1 = "STS accepted MC #mu-";
255 title2 = "STS+MUCH accepted MC #mu-";
256 title3 = "STS+MUCH+TRD accepted MC #mu-";
257 title4 = "STS+MUCH+TRD+TOF accepted MC #mu-";
258
259 acc_P[0][2] = (TProfile*) acc_P[0][0]->Clone("muMn_accP_Sts");
260 acc_P[0][2]->SetTitle(title1);
261 acc_P[1][2] = (TProfile*) acc_P[0][0]->Clone("muMn_accP_StsMuch");
262 acc_P[1][2]->SetTitle(title2);
263 acc_P[2][2] = (TProfile*) acc_P[0][0]->Clone("muMn_accP_StsMuchTrd");
264 acc_P[2][2]->SetTitle(title3);
265 acc_P[3][2] = (TProfile*) acc_P[0][0]->Clone("muMn_accP_StsMuchTrdTof");
266 acc_P[3][2]->SetTitle(title4);
267
268 acc_Theta[0][2] = (TProfile*) acc_Theta[0][0]->Clone("muMn_accTheta_Sts");
269 acc_Theta[0][2]->SetTitle(title1);
270 acc_Theta[1][2] = (TProfile*) acc_Theta[0][0]->Clone("muMn_accTheta_StsMuch");
271 acc_Theta[1][2]->SetTitle(title2);
272 acc_Theta[2][2] = (TProfile*) acc_Theta[0][0]->Clone("muMn_accTheta_StsMuchTrd");
273 acc_Theta[2][2]->SetTitle(title3);
274 acc_Theta[3][2] = (TProfile*) acc_Theta[0][0]->Clone("muMn_accTheta_StsMuchTrdTof");
275 acc_Theta[3][2]->SetTitle(title4);
276
277 TString title0 = "reconstructed MC signal after primary vertex cut (PVC)"; // PVC: chi2 of STS track in target
278 title1 = "reconstructed MC signal after PVC and STS cuts (StsCs)"; // StsCs: chi2 of STS track and number of STS hits
279 title2 =
280 "reconstructed MC signal after PVC+StsCs and MUCH cuts (MuchCs)"; // MuchCs: chi2 of MUCH track and number of MUCH hits
281 title3 = "reconstructed MC signal after PVC+StsCs+MuchCs and TRD cut (TrdC)"; // TrdC: number of TRD hits
282 title4 =
283 "reconstructed MC signal after PVC+StsCs+MuchCs+TrdC and TOF cut"; // TOF: cut using mass distribution from time measurement
284
285 effReco_P[0][0] = (TProfile*) acc_P[0][0]->Clone("signal_effRecoP_VtxSts");
286 effReco_P[0][0]->SetTitle(title1);
287 effReco_P[1][0] = (TProfile*) acc_P[0][0]->Clone("signal_effRecoP_VtxStsMuch");
288 effReco_P[1][0]->SetTitle(title2);
289 effReco_P[2][0] = (TProfile*) acc_P[0][0]->Clone("signal_effRecoP_VtxStsMuchTrd");
290 effReco_P[2][0]->SetTitle(title3);
291 effReco_P[3][0] = (TProfile*) acc_P[0][0]->Clone("signal_effRecoP_VtxStsMuchTrdTof");
292 effReco_P[3][0]->SetTitle(title4);
293
294 effReco_Theta[0][0] = (TProfile*) acc_Theta[0][0]->Clone("signal_effRecoTheta_VtxSts");
295 effReco_Theta[0][0]->SetTitle(title1);
296 effReco_Theta[1][0] = (TProfile*) acc_Theta[0][0]->Clone("signal_effRecoTheta_VtxStsMuch");
297 effReco_Theta[1][0]->SetTitle(title2);
298 effReco_Theta[2][0] = (TProfile*) acc_Theta[0][0]->Clone("signal_effRecoTheta_VtxStsMuchTrd");
299 effReco_Theta[2][0]->SetTitle(title3);
300 effReco_Theta[3][0] = (TProfile*) acc_Theta[0][0]->Clone("signal_effRecoTheta_VtxStsMuchTrdTof");
301 effReco_Theta[3][0]->SetTitle(title4);
302
303 eff4pi_P[0][0] = (TProfile*) acc_P[0][0]->Clone("signal_eff4piP_Vtx");
304 eff4pi_P[0][0]->SetTitle(title0);
305 eff4pi_P[1][0] = (TProfile*) acc_P[0][0]->Clone("signal_eff4piP_VtxSts");
306 eff4pi_P[1][0]->SetTitle(title1);
307 eff4pi_P[2][0] = (TProfile*) acc_P[0][0]->Clone("signal_eff4piP_VtxStsMuch");
308 eff4pi_P[2][0]->SetTitle(title2);
309 eff4pi_P[3][0] = (TProfile*) acc_P[0][0]->Clone("signal_eff4piP_VtxStsMuchTrd");
310 eff4pi_P[3][0]->SetTitle(title3);
311 eff4pi_P[4][0] = (TProfile*) acc_P[0][0]->Clone("signal_eff4piP_VtxStsMuchTrdTof");
312 eff4pi_P[4][0]->SetTitle(title4);
313
314 eff4pi_Theta[0][0] = (TProfile*) acc_Theta[0][0]->Clone("signal_eff4piTheta_Vtx");
315 eff4pi_Theta[0][0]->SetTitle(title0);
316 eff4pi_Theta[1][0] = (TProfile*) acc_Theta[0][0]->Clone("signal_eff4piTheta_VtxSts");
317 eff4pi_Theta[1][0]->SetTitle(title1);
318 eff4pi_Theta[2][0] = (TProfile*) acc_Theta[0][0]->Clone("signal_eff4piTheta_VtxStsMuch");
319 eff4pi_Theta[2][0]->SetTitle(title2);
320 eff4pi_Theta[3][0] = (TProfile*) acc_Theta[0][0]->Clone("signal_eff4piTheta_VtxStsMuchTrd");
321 eff4pi_Theta[3][0]->SetTitle(title3);
322 eff4pi_Theta[4][0] = (TProfile*) acc_Theta[0][0]->Clone("signal_eff4piTheta_VtxStsMuchTrdTof");
323 eff4pi_Theta[4][0]->SetTitle(title4);
324
325 YPt_VtxReco = (TH2D*) YPt_StsAcc->Clone("YPt_VtxReco");
326 YPt_VtxReco->SetTitle(title0);
327 YPt_VtxStsReco = (TH2D*) YPt_StsAcc->Clone("YPt_VtxStsReco");
328 YPt_VtxStsReco->SetTitle(title1);
329 YPt_VtxStsMuchReco = (TH2D*) YPt_StsAcc->Clone("YPt_VtxStsMuchReco");
330 YPt_VtxStsMuchReco->SetTitle(title2);
331 YPt_VtxStsMuchTrdReco = (TH2D*) YPt_StsAcc->Clone("YPt_VtxStsMuchTrdReco");
332 YPt_VtxStsMuchTrdReco->SetTitle(title3);
333 YPt_VtxStsMuchTrdTofReco = (TH2D*) YPt_StsAcc->Clone("YPt_VtxStsMuchTrdTofReco");
334 YPt_VtxStsMuchTrdTofReco->SetTitle(title4);
335
336 title0 = "reconstructed MC #mu+ after primary vertex cut (PVC)";
337 title1 = "reconstructed MC #mu+ after PVC and STS cuts (StsCs)";
338 title2 = "reconstructed MC #mu+ after PVC+StsCs and MUCH cuts (MuchCs)";
339 title3 = "reconstructed MC #mu+ after PVC+StsCs+MuchCs and TRD cut (TrdC)";
340 title4 = "reconstructed MC #mu+ after PVC+StsCs+MuchCs+TrdC and TOF cut";
341
342 effReco_P[0][1] = (TProfile*) acc_P[0][0]->Clone("muPl_effRecoP_VtxSts");
343 effReco_P[0][1]->SetTitle(title1);
344 effReco_P[1][1] = (TProfile*) acc_P[0][0]->Clone("muPl_effRecoP_VtxStsMuch");
345 effReco_P[1][1]->SetTitle(title2);
346 effReco_P[2][1] = (TProfile*) acc_P[0][0]->Clone("muPl_effRecoP_VtxStsMuchTrd");
347 effReco_P[2][1]->SetTitle(title3);
348 effReco_P[3][1] = (TProfile*) acc_P[0][0]->Clone("muPl_effRecoP_VtxStsMuchTrdTof");
349 effReco_P[3][1]->SetTitle(title4);
350
351 effReco_Theta[0][1] = (TProfile*) acc_Theta[0][0]->Clone("muPl_effRecoTheta_VtxSts");
352 effReco_Theta[0][1]->SetTitle(title1);
353 effReco_Theta[1][1] = (TProfile*) acc_Theta[0][0]->Clone("muPl_effRecoTheta_VtxStsMuch");
354 effReco_Theta[1][1]->SetTitle(title2);
355 effReco_Theta[2][1] = (TProfile*) acc_Theta[0][0]->Clone("muPl_effRecoTheta_VtxStsMuchTrd");
356 effReco_Theta[2][1]->SetTitle(title3);
357 effReco_Theta[3][1] = (TProfile*) acc_Theta[0][0]->Clone("muPl_effRecoTheta_VtxStsMuchTrdTof");
358 effReco_Theta[3][1]->SetTitle(title4);
359
360 eff4pi_P[0][1] = (TProfile*) acc_P[0][0]->Clone("muPl_eff4piP_Vtx");
361 eff4pi_P[0][1]->SetTitle(title0);
362 eff4pi_P[1][1] = (TProfile*) acc_P[0][0]->Clone("muPl_eff4piP_VtxSts");
363 eff4pi_P[1][1]->SetTitle(title1);
364 eff4pi_P[2][1] = (TProfile*) acc_P[0][0]->Clone("muPl_eff4piP_VtxStsMuch");
365 eff4pi_P[2][1]->SetTitle(title2);
366 eff4pi_P[3][1] = (TProfile*) acc_P[0][0]->Clone("muPl_eff4piP_VtxStsMuchTrd");
367 eff4pi_P[3][1]->SetTitle(title3);
368 eff4pi_P[4][1] = (TProfile*) acc_P[0][0]->Clone("muPl_eff4piP_VtxStsMuchTrdTof");
369 eff4pi_P[4][1]->SetTitle(title4);
370
371 eff4pi_Theta[0][1] = (TProfile*) acc_Theta[0][0]->Clone("muPl_eff4piTheta_Vtx");
372 eff4pi_Theta[0][1]->SetTitle(title0);
373 eff4pi_Theta[1][1] = (TProfile*) acc_Theta[0][0]->Clone("muPl_eff4piTheta_VtxSts");
374 eff4pi_Theta[1][1]->SetTitle(title1);
375 eff4pi_Theta[2][1] = (TProfile*) acc_Theta[0][0]->Clone("muPl_eff4piTheta_VtxStsMuch");
376 eff4pi_Theta[2][1]->SetTitle(title2);
377 eff4pi_Theta[3][1] = (TProfile*) acc_Theta[0][0]->Clone("muPl_eff4piTheta_VtxStsMuchTrd");
378 eff4pi_Theta[3][1]->SetTitle(title3);
379 eff4pi_Theta[4][1] = (TProfile*) acc_Theta[0][0]->Clone("muPl_eff4piTheta_VtxStsMuchTrdTof");
380 eff4pi_Theta[4][1]->SetTitle(title4);
381
382 title0 = "reconstructed MC #mu- after primary vertex cut (PVC)";
383 title1 = "reconstructed MC #mu- after PVC and STS cuts (StsCs)";
384 title2 = "reconstructed MC #mu- after PVC+StsCs and MUCH cuts (MuchCs)";
385 title3 = "reconstructed MC #mu- after PVC+StsCs+MuchCs and TRD cut (TrdC)";
386 title4 = "reconstructed MC #mu- after PVC+StsCs+MuchCs+TrdC and TOF cut";
387
388 effReco_P[0][2] = (TProfile*) acc_P[0][0]->Clone("muMn_effRecoP_VtxSts");
389 effReco_P[0][2]->SetTitle(title1);
390 effReco_P[1][2] = (TProfile*) acc_P[0][0]->Clone("muMn_effRecoP_VtxStsMuch");
391 effReco_P[1][2]->SetTitle(title2);
392 effReco_P[2][2] = (TProfile*) acc_P[0][0]->Clone("muMn_effRecoP_VtxStsMuchTrd");
393 effReco_P[2][2]->SetTitle(title3);
394 effReco_P[3][2] = (TProfile*) acc_P[0][0]->Clone("muMn_effRecoP_VtxStsMuchTrdTof");
395 effReco_P[3][2]->SetTitle(title4);
396
397 effReco_Theta[0][2] = (TProfile*) acc_Theta[0][0]->Clone("muMn_effRecoTheta_VtxSts");
398 effReco_Theta[0][2]->SetTitle(title1);
399 effReco_Theta[1][2] = (TProfile*) acc_Theta[0][0]->Clone("muMn_effRecoTheta_VtxStsMuch");
400 effReco_Theta[1][2]->SetTitle(title2);
401 effReco_Theta[2][2] = (TProfile*) acc_Theta[0][0]->Clone("muMn_effRecoTheta_VtxStsMuchTrd");
402 effReco_Theta[2][2]->SetTitle(title3);
403 effReco_Theta[3][2] = (TProfile*) acc_Theta[0][0]->Clone("muMn_effRecoTheta_VtxStsMuchTrdTof");
404 effReco_Theta[3][2]->SetTitle(title4);
405
406 eff4pi_P[0][2] = (TProfile*) acc_P[0][0]->Clone("muMn_eff4piP_Vtx");
407 eff4pi_P[0][2]->SetTitle(title0);
408 eff4pi_P[1][2] = (TProfile*) acc_P[0][0]->Clone("muMn_eff4piP_VtxSts");
409 eff4pi_P[1][2]->SetTitle(title1);
410 eff4pi_P[2][2] = (TProfile*) acc_P[0][0]->Clone("muMn_eff4piP_VtxStsMuch");
411 eff4pi_P[2][2]->SetTitle(title2);
412 eff4pi_P[3][2] = (TProfile*) acc_P[0][0]->Clone("muMn_eff4piP_VtxStsMuchTrd");
413 eff4pi_P[3][2]->SetTitle(title3);
414 eff4pi_P[4][2] = (TProfile*) acc_P[0][0]->Clone("muMn_eff4piP_VtxStsMuchTrdTof");
415 eff4pi_P[4][2]->SetTitle(title4);
416
417 eff4pi_Theta[0][2] = (TProfile*) acc_Theta[0][0]->Clone("muMn_eff4piTheta_Vtx");
418 eff4pi_Theta[0][2]->SetTitle(title0);
419 eff4pi_Theta[1][2] = (TProfile*) acc_Theta[0][0]->Clone("muMn_eff4piTheta_VtxSts");
420 eff4pi_Theta[1][2]->SetTitle(title1);
421 eff4pi_Theta[2][2] = (TProfile*) acc_Theta[0][0]->Clone("muMn_eff4piTheta_VtxStsMuch");
422 eff4pi_Theta[2][2]->SetTitle(title2);
423 eff4pi_Theta[3][2] = (TProfile*) acc_Theta[0][0]->Clone("muMn_eff4piTheta_VtxStsMuchTrd");
424 eff4pi_Theta[3][2]->SetTitle(title3);
425 eff4pi_Theta[4][2] = (TProfile*) acc_Theta[0][0]->Clone("muMn_eff4piTheta_VtxStsMuchTrdTof");
426 eff4pi_Theta[4][2]->SetTitle(title4);
427
428 BgSup[0] = new TH1D("h0", "all STS tracks", PBINNING);
429 BgSup[0]->GetXaxis()->SetTitle("P (GeV/c)");
430 BgSup[0]->GetYaxis()->SetTitle("suppression");
431
432 title0 = "reconstructed tracks after primary vertex cut (PVC)";
433 title1 = "reconstructed tracks after PVC and STS cuts (StsCs)";
434 title2 = "reconstructed tracks after PVC+StsCs and MUCH cuts (MuchCs)";
435 title3 = "reconstructed tracks after PVC+StsCs+MuchCs and TRD cut (TrdC)";
436 title4 = "reconstructed tracks after PVC+StsCs+MuchCs+TrdC and TOF cut";
437
438 BgSup[1] = (TH1D*) BgSup[0]->Clone("h1");
439 BgSup[1]->SetTitle(title0);
440 BgSup[2] = (TH1D*) BgSup[0]->Clone("h2");
441 BgSup[2]->SetTitle(title1);
442 BgSup[3] = (TH1D*) BgSup[0]->Clone("h3");
443 BgSup[3]->SetTitle(title2);
444 BgSup[4] = (TH1D*) BgSup[0]->Clone("h4");
445 BgSup[4]->SetTitle(title3);
446 BgSup[5] = (TH1D*) BgSup[0]->Clone("h5");
447 BgSup[5]->SetTitle(title4);
448
449 TString dir = getenv("VMCWORKDIR");
450 TString name =
451 dir + "/parameters/much/TOF8gev_fitParam_sigma" + std::to_string(fSigmaTofCut) + "." + fSetupName + ".root";
452
454 TFile* oldFile = gFile;
455 TDirectory* oldDir = gDirectory;
456
457 TFile* FF = new TFile(name);
458 LOG_IF(fatal, !FF) << "Could not open file " << name;
459
460
461 TTree* MinParamMu = FF->Get<TTree>("MinParam");
462 LOG_IF(fatal, !MinParamMu) << "Could not read MinParam tree from file " << name;
463 MinParamMu->SetBranchAddress("p0", &p0min);
464 MinParamMu->SetBranchAddress("p1", &p1min);
465 MinParamMu->SetBranchAddress("p2", &p2min);
466 MinParamMu->GetEntry(0);
467
468 TTree* MaxParamMu = FF->Get<TTree>("MaxParam");
469 LOG_IF(fatal, !MaxParamMu) << "Could not read MaxParam tree from file " << name;
470 MaxParamMu->SetBranchAddress("p0", &p0max);
471 MaxParamMu->SetBranchAddress("p1", &p1max);
472 MaxParamMu->SetBranchAddress("p2", &p2max);
473 MaxParamMu->GetEntry(0);
474
476 gFile = oldFile;
477 gDirectory = oldDir;
478
479 if (fFileAnnName == "") {
480 if (fNeurons > 0)
481 fFileAnnName = dir + "/parameters/much/muid_ann_" + std::to_string(fNeurons) + "_" + +fSetupName + "_weights.txt";
482 else
483 fFileAnnName = dir + "/parameters/much/muid_ann_16_sis100_muon_lmvm_weights.txt";
484 }
485
486 FILE* file = fopen(fFileAnnName.Data(), "r");
487 char buffer[100];
488
489 if (fgets(buffer, 100, file) == NULL) {
490 LOG(info) << "======================================================";
491 LOG(info) << "The ANN weights file " << fFileAnnName << " does not exist";
492
493 fFileAnnName = dir + "/parameters/much/muid_ann_16_sis100_muon_lmvm_weights.txt";
494
495 LOG(info) << "The default ANN weights file " << fFileAnnName << " will be used";
496 LOG(info) << "======================================================";
497 fNeurons = 16;
498 }
499
500 if (fAnnCut > 0) fUseCuts = kFALSE;
501
502 return kSUCCESS;
503}
504// -------------------------------------------------------------------------
505
506
507// ----- Public method Exec --------------------------------------------
508void CbmAnaDimuonAnalysis::Exec(Option_t* /*opt*/)
509{
510 Int_t nMCTracks = fMCTracks->GetEntriesFast();
511 Int_t nStsTracks = fStsTracks->GetEntriesFast();
512 Int_t nMuchTracks = fMuchTracks->GetEntriesFast();
513 Int_t nGlobalTracks = fGlobalTracks->GetEntriesFast();
514
515 LOG(debug) << "------------------------";
516 LOG(debug) << GetName() << ": Event " << fEvent;
517 LOG(debug) << "Number of tracks: MC - " << nMCTracks << ", global - " << nGlobalTracks << ", STS - " << nStsTracks
518 << ", MUCH - " << nMuchTracks;
519 LOG(debug) << "------------------------";
520
521 TLorentzVector pMC1, pMC2, M;
522
523 struct CbmMuon {
524 Bool_t Mu;
525 Bool_t Nsts;
526 Bool_t Nmuch;
527 Bool_t Ntrd;
528 Bool_t Ntof;
529 Bool_t Chi2V;
530 Bool_t Chi2sts;
531 Bool_t Chi2much;
532 CbmMuon()
533 : Mu(kFALSE)
534 , Nsts(kFALSE)
535 , Nmuch(kFALSE)
536 , Ntrd(kFALSE)
537 , Ntof(kFALSE)
538 , Chi2V(kFALSE)
539 , Chi2sts(kFALSE)
540 , Chi2much(kFALSE)
541 {
542 ;
543 }
544 };
545
546 struct CbmMuonMC {
547 Bool_t Mu;
548 Bool_t Nsts;
549 Bool_t Nmuch;
550 Bool_t Ntrd;
551 Bool_t Ntof;
552 CbmMuonMC() : Mu(kFALSE), Nsts(kFALSE), Nmuch(kFALSE), Ntrd(kFALSE), Ntof(kFALSE) { ; }
553 };
554 //----------------- Sort MC tracks for acceptance histograms
555
556 CbmMuon muPl_reco;
557 CbmMuon muMn_reco;
558 CbmMuon signal_reco;
559
560 CbmMuonMC muPl_mc;
561 CbmMuonMC muMn_mc;
562 CbmMuonMC signal_mc;
563
564 for (Int_t iMCTrack = 0; iMCTrack < nMCTracks; iMCTrack++) {
565 CbmMCTrack* mcTrack = (CbmMCTrack*) fMCTracks->At(iMCTrack);
566 if (mcTrack->GetGeantProcessId() != kPPrimary) continue;
567 if (TMath::Abs(mcTrack->GetPdgCode()) != 13) continue;
568 if (mcTrack->GetCharge() < 0) {
569 muMn_mc.Mu = kTRUE;
570 if (mcTrack->GetNPoints(ECbmModuleId::kSts) >= fNofStsCut) {
571 muMn_mc.Nsts = kTRUE;
572 if (mcTrack->GetNPoints(ECbmModuleId::kMuch) >= fNofMuchCut) {
573 muMn_mc.Nmuch = kTRUE;
574 if (mcTrack->GetNPoints(ECbmModuleId::kTrd) >= fNofTrdCut) {
575 muMn_mc.Ntrd = kTRUE;
576 if (mcTrack->GetNPoints(ECbmModuleId::kTof) >= 1) muMn_mc.Ntof = kTRUE;
577 }
578 }
579 }
580 }
581 else {
582 muPl_mc.Mu = kTRUE;
583 if (mcTrack->GetNPoints(ECbmModuleId::kSts) >= fNofStsCut) {
584 muPl_mc.Nsts = kTRUE;
585 if (mcTrack->GetNPoints(ECbmModuleId::kMuch) >= fNofMuchCut) {
586 muPl_mc.Nmuch = kTRUE;
587 if (mcTrack->GetNPoints(ECbmModuleId::kTrd) >= fNofTrdCut) {
588 muPl_mc.Ntrd = kTRUE;
589 if (mcTrack->GetNPoints(ECbmModuleId::kTof) >= 1) muPl_mc.Ntof = kTRUE;
590 }
591 }
592 }
593 }
594 }
595
596 if (muPl_mc.Mu && muMn_mc.Mu) signal_mc.Mu = kTRUE;
597 if (muPl_mc.Nsts && muMn_mc.Nsts) signal_mc.Nsts = kTRUE;
598 if (muPl_mc.Nmuch && muMn_mc.Nmuch) signal_mc.Nmuch = kTRUE;
599 if (muPl_mc.Ntrd && muMn_mc.Ntrd) signal_mc.Ntrd = kTRUE;
600 if (muPl_mc.Ntof && muMn_mc.Ntof) signal_mc.Ntof = kTRUE;
601 //-----------------
602
603 fMuPlus->Clear();
604 fMuMinus->Clear();
605
606 Int_t iMuPlus = 0;
607 Int_t iMuMinus = 0;
608
609 for (Int_t iTrack = 0; iTrack < nGlobalTracks; iTrack++) {
610
611 Bool_t analysis = kFALSE;
612
613 //----------------- Global track parameters
614
615 CbmGlobalTrack* globalTrack = (CbmGlobalTrack*) fGlobalTracks->At(iTrack);
616
617 // Double_t chi2global = globalTrack->GetChi2()/globalTrack->GetNDF();
618
619 Int_t iMuchTrack = globalTrack->GetMuchTrackIndex();
620 Int_t iStsTrack = globalTrack->GetStsTrackIndex();
621 Int_t iTrdTrack = globalTrack->GetTrdTrackIndex();
622 Int_t iTofHit = globalTrack->GetTofHitIndex();
623
624 if (iStsTrack < 0) continue;
625
626 //----------------- STS track parameters
627
628 CbmStsTrack* stsTrack = (CbmStsTrack*) fStsTracks->At(iStsTrack);
629 if (!stsTrack) continue;
630
631 Int_t nStsHits = stsTrack->GetTotalNofHits();
632 Double_t chi2vertex = fFitter->GetChiToVertex(stsTrack);
633 Double_t chi2sts = 1000;
634 if (stsTrack->GetNDF() != 0) chi2sts = stsTrack->GetChiSq() / stsTrack->GetNDF();
635
636 FairTrackParam par;
637 TLorentzVector mom;
638 TVector3 p;
639
640 fFitter->Extrapolate(stsTrack, fVertex->GetZ(), &par);
641 par.Momentum(p);
642 mom.SetVectM(p, fMass);
643
644 Double_t momentum = mom.P();
645
646 BgSup[0]->Fill(momentum);
647
648 Int_t q = par.GetQp() > 0 ? 1 : -1;
649
650 //----------------- MUCH track parameters
651
652 Int_t nMuchHits = 0;
653 Double_t chi2much = 1000;
654
655 if (iMuchTrack > -1) {
656 CbmMuchTrack* muchTrack = (CbmMuchTrack*) fMuchTracks->At(iMuchTrack);
657 if (muchTrack) {
658 nMuchHits = muchTrack->GetNofHits();
659 if (muchTrack->GetNDF() != 0) chi2much = muchTrack->GetChiSq() / muchTrack->GetNDF();
660 }
661 }
662
663 //----------------- TRD track parameters
664
665 Int_t nTrdHits = 0;
666 Double_t chi2trd = 1000;
667
668 if (iTrdTrack > -1) {
669 CbmTrdTrack* trdTrack = (CbmTrdTrack*) fTrdTracks->At(iTrdTrack);
670 if (trdTrack) {
671 nTrdHits = trdTrack->GetNofHits();
672 if (trdTrack->GetNDF() != 0) chi2trd = trdTrack->GetChiSq() / trdTrack->GetNDF(); // study of TRD chi2 !
673 }
674 }
675
676 //----------------- TOF hit parameters
677
678 Int_t nTofHits = 0;
679 Double_t mass = -1000;
680
681 if (iTofHit > -1) {
682 CbmTofHit* th = (CbmTofHit*) fTofHit->At(iTofHit);
683 if (th) {
684 nTofHits = 1;
685
686 //Double_t time = th->GetTime()-1000;
687 Double_t time = th->GetTime() - fEvtHeader->GetEventTime();
688 Double_t beta = globalTrack->GetLength() * 0.01 / (time * 1e-9 * TMath::C());
689
690 TVector3 momL;
691
692 FairTrackParam* stpl = (FairTrackParam*) globalTrack->GetParamLast();
693 stpl->Momentum(momL);
694
695 if (beta != 0) mass = momL.Mag() * momL.Mag() * (1. / beta / beta - 1.);
696 }
697 }
698 //----------------- STS MC matching
699
700 Int_t isMu = 0;
701 Int_t stsPDG = 0;
702
703 if (fUseMC) {
704
705 CbmTrackMatchNew* stsMatch = (CbmTrackMatchNew*) fStsTrackMatches->At(iStsTrack);
706
707 if (stsMatch) {
708 if (stsMatch->GetNofLinks() != 0) {
709 int stsMcTrackId = stsMatch->GetMatchedLink().GetIndex();
710 CbmMCTrack* mcTrack = (CbmMCTrack*) fMCTracks->At(stsMcTrackId);
711 if (mcTrack) {
712 int pdg = TMath::Abs(mcTrack->GetPdgCode());
713 stsPDG = pdg;
714 if (mcTrack->GetGeantProcessId() == kPPrimary && pdg == 13) {
715 /*
716 if (pdg == 13) {
717 CbmMCTrack* mcTrack = (CbmMCTrack*) fMCTracks->At(stsMcTrackId);
718 CbmMCTrack* mmct=(CbmMCTrack*)fMCTracks->At(mcTrack->GetMotherId());
719 if(TMath::Abs(mmct->GetPdgCode()) != 211 && TMath::Abs(mmct->GetPdgCode()) != 321){
720 */
721 isMu = 1;
722 if (mcTrack->GetCharge() < 0) {
723 muMn_reco.Mu = kTRUE;
724
725 if (chi2vertex <= fChi2VertexCut) {
726 muMn_reco.Chi2V = kTRUE;
727
728 if (nStsHits >= fNofStsCut && chi2sts <= fChi2StsCut) {
729 muMn_reco.Nsts = kTRUE;
730
731 if (nMuchHits >= fNofMuchCut && chi2much <= fChi2MuchCut) {
732 muMn_reco.Nmuch = kTRUE;
733
734 if (nTrdHits >= fNofTrdCut) {
735 muMn_reco.Ntrd = kTRUE;
736
737 if (mass > (p0min + p1min * momentum + p2min * momentum * momentum)
738 && mass < (p0max + p1max * momentum + p2max * momentum * momentum) && fAnnCut < 0)
739 muMn_reco.Ntof = kTRUE;
740 }
741 }
742 }
743 }
744 }
745 else {
746 muPl_reco.Mu = kTRUE;
747 if (chi2vertex <= fChi2VertexCut) {
748 muPl_reco.Chi2V = kTRUE;
749
750 if (nStsHits >= fNofStsCut && chi2sts <= fChi2StsCut) {
751 muPl_reco.Nsts = kTRUE;
752
753 if (nMuchHits >= fNofMuchCut && chi2much <= fChi2MuchCut) {
754 muPl_reco.Nmuch = kTRUE;
755
756 if (nTrdHits >= fNofTrdCut) {
757 muPl_reco.Ntrd = kTRUE;
758
759 if (mass > (p0min + p1min * momentum + p2min * momentum * momentum)
760 && mass < (p0max + p1max * momentum + p2max * momentum * momentum) && fAnnCut < 0)
761 muPl_reco.Ntof = kTRUE;
762 }
763 }
764 }
765 }
766 }
767 }
768 } //}
769 }
770 }
771 }
772 if (muPl_reco.Mu && muMn_reco.Mu) signal_reco.Mu = kTRUE;
773 if (muPl_reco.Chi2V && muMn_reco.Chi2V) signal_reco.Chi2V = kTRUE;
774 if (muPl_reco.Nsts && muMn_reco.Nsts) signal_reco.Nsts = kTRUE;
775 if (muPl_reco.Nmuch && muMn_reco.Nmuch) signal_reco.Nmuch = kTRUE;
776 if (muPl_reco.Ntrd && muMn_reco.Ntrd) signal_reco.Ntrd = kTRUE;
777 if (muPl_reco.Ntof && muMn_reco.Ntof && fAnnCut < 0) signal_reco.Ntof = kTRUE;
778
779 if (chi2vertex <= fChi2VertexCut) {
780 BgSup[1]->Fill(momentum);
781
782 if (nStsHits >= fNofStsCut && chi2sts <= fChi2StsCut) {
783 BgSup[2]->Fill(momentum);
784
785 if (nMuchHits >= fNofMuchCut && chi2much <= fChi2MuchCut) {
786 BgSup[3]->Fill(momentum);
787
788 if (nTrdHits >= fNofTrdCut) {
789 BgSup[4]->Fill(momentum);
790
791 if (mass > (p0min + p1min * momentum + p2min * momentum * momentum)
792 && mass < (p0max + p1max * momentum + p2max * momentum * momentum) && fAnnCut < 0)
793 BgSup[5]->Fill(momentum);
794 }
795 }
796 }
797 }
798
799 //----------------- Muon track candidates
800 Double_t id = -1;
801
802 if (!fUseCuts && fAnnCut < 0)
803 analysis = kTRUE;
804 else if (fUseCuts) {
805 if (nStsHits >= fNofStsCut && nMuchHits >= fNofMuchCut && nTrdHits >= fNofTrdCut && nTofHits >= 1
806 && chi2vertex <= fChi2VertexCut && chi2sts <= fChi2StsCut && chi2much <= fChi2MuchCut
807 && (mass > (p0min + p1min * momentum + p2min * momentum * momentum)
808 && mass < (p0max + p1max * momentum + p2max * momentum * momentum)))
809 analysis = kTRUE;
810 }
811 else if (!fUseCuts && fAnnCut > 0) {
812 id = CalculateAnnValue(mom.P(), mass, chi2vertex, chi2sts, chi2much, chi2trd, nStsHits, nMuchHits, nTrdHits,
813 nTofHits);
814 if (id > fAnnCut) {
815 analysis = kTRUE;
816 BgSup[5]->Fill(momentum);
817 if (isMu == 1 && q > 0)
818 muPl_reco.Ntof = kTRUE;
819 else if (isMu == 1 && q < 0)
820 muMn_reco.Ntof = kTRUE;
821 if (muPl_reco.Ntof && muMn_reco.Ntof) signal_reco.Ntof = kTRUE;
822 }
823 }
824
825 if (!analysis) continue;
826
828 if (q > 0) {
829 new ((*fMuPlus)[iMuPlus++]) CbmAnaMuonCandidate();
830 mu = (CbmAnaMuonCandidate*) (*fMuPlus)[iMuPlus - 1];
831 }
832 else {
833 new ((*fMuMinus)[iMuMinus++]) CbmAnaMuonCandidate();
834 mu = (CbmAnaMuonCandidate*) (*fMuMinus)[iMuMinus - 1];
835 }
836
838 mu->SetNMuchHits(nMuchHits);
839 mu->SetNTrdHits(nTrdHits);
841
842 mu->SetChiToVertex(chi2vertex);
843 mu->SetChiSts(chi2sts);
844 mu->SetChiMuch(chi2much);
845 mu->SetChiTrd(chi2trd);
846
847 mu->SetTrueMu(isMu);
848 mu->SetStsPdg(stsPDG);
849 mu->SetTofM(mass);
850 mu->SetSign(q);
851 mu->SetMomentum(mom);
852
853 if (!fUseCuts && fAnnCut < 0) id = CalculateAnnValue(mu);
854 mu->SetAnnId(id);
855 }
856
857 //----------------- Fill YPtM spectrum
858
859 int NofPlus = fMuPlus->GetEntriesFast();
860 int NofMinus = fMuMinus->GetEntriesFast();
861 for (int iPart = 0; iPart < NofPlus; iPart++) {
862 CbmAnaMuonCandidate* mu_pl = (CbmAnaMuonCandidate*) fMuPlus->At(iPart);
863 TLorentzVector* P_pl = mu_pl->GetMomentum();
864 for (int jPart = 0; jPart < NofMinus; jPart++) {
865 CbmAnaMuonCandidate* mu_mn = (CbmAnaMuonCandidate*) fMuMinus->At(jPart);
866 TLorentzVector* P_mn = mu_mn->GetMomentum();
867 M = *P_pl + *P_mn;
868 YPtM->Fill(M.Rapidity(), M.Pt(), M.M());
869 }
870 }
871
872 //----------------- Fill acceptance and efficiency spectra for MC signal muons and signal signal
873 //----------------- Fill YPt spectra for signal signal
874
875 if (fPlutoFileName != "") {
876 fInputTree->GetEntry(fEvent);
877 Int_t NofPart = fParticles->GetEntriesFast();
878 PParticle* Part1 = (PParticle*) fParticles->At(NofPart - 1);
879 PParticle* Part2 = (PParticle*) fParticles->At(NofPart - 2);
880 TLorentzVector mom1 = Part1->Vect4();
881 TLorentzVector mom2 = Part2->Vect4();
882
883 if (muPl_mc.Mu) {
884 FillProfile(acc_P[0][1], mom2.P(), muPl_mc.Nsts);
885 FillProfile(acc_P[1][1], mom2.P(), muPl_mc.Nmuch);
886 FillProfile(acc_P[2][1], mom2.P(), muPl_mc.Ntrd);
887 FillProfile(acc_P[3][1], mom2.P(), muPl_mc.Ntof);
888 FillProfile(acc_Theta[0][1], mom2.Theta() * TMath::RadToDeg(), muPl_mc.Nsts);
889 FillProfile(acc_Theta[1][1], mom2.Theta() * TMath::RadToDeg(), muPl_mc.Nmuch);
890 FillProfile(acc_Theta[2][1], mom2.Theta() * TMath::RadToDeg(), muPl_mc.Ntrd);
891 FillProfile(acc_Theta[3][1], mom2.Theta() * TMath::RadToDeg(), muPl_mc.Ntof);
892 if (muPl_mc.Nsts) {
893 FillProfile(effReco_P[0][1], mom2.P(), muPl_reco.Nsts);
894 FillProfile(effReco_Theta[0][1], mom2.Theta() * TMath::RadToDeg(), muPl_reco.Nsts);
895 }
896 if (muPl_mc.Nmuch) {
897 FillProfile(effReco_P[1][1], mom2.P(), muPl_reco.Nmuch);
898 FillProfile(effReco_Theta[1][1], mom2.Theta() * TMath::RadToDeg(), muPl_reco.Nmuch);
899 }
900 if (muPl_mc.Ntrd) {
901 FillProfile(effReco_P[2][1], mom2.P(), muPl_reco.Ntrd);
902 FillProfile(effReco_Theta[2][1], mom2.Theta() * TMath::RadToDeg(), muPl_reco.Ntrd);
903 }
904 if (muPl_mc.Ntof) {
905 FillProfile(effReco_P[3][1], mom2.P(), muPl_reco.Ntof);
906 FillProfile(effReco_Theta[3][1], mom2.Theta() * TMath::RadToDeg(), muPl_reco.Ntof);
907 }
908 }
909
910 if (muPl_reco.Mu) {
911 FillProfile(eff4pi_P[0][1], mom2.P(), muPl_reco.Chi2V);
912 FillProfile(eff4pi_P[1][1], mom2.P(), muPl_reco.Nsts);
913 FillProfile(eff4pi_P[2][1], mom2.P(), muPl_reco.Nmuch);
914 FillProfile(eff4pi_P[3][1], mom2.P(), muPl_reco.Ntrd);
915 FillProfile(eff4pi_P[4][1], mom2.P(), muPl_reco.Ntof);
916 FillProfile(eff4pi_Theta[0][1], mom2.Theta() * TMath::RadToDeg(), muPl_reco.Chi2V);
917 FillProfile(eff4pi_Theta[1][1], mom2.Theta() * TMath::RadToDeg(), muPl_reco.Nsts);
918 FillProfile(eff4pi_Theta[2][1], mom2.Theta() * TMath::RadToDeg(), muPl_reco.Nmuch);
919 FillProfile(eff4pi_Theta[3][1], mom2.Theta() * TMath::RadToDeg(), muPl_reco.Ntrd);
920 FillProfile(eff4pi_Theta[4][1], mom2.Theta() * TMath::RadToDeg(), muPl_reco.Ntof);
921 }
922
923 if (muMn_mc.Mu) {
924 FillProfile(acc_P[0][2], mom1.P(), muMn_mc.Nsts);
925 FillProfile(acc_P[1][2], mom1.P(), muMn_mc.Nmuch);
926 FillProfile(acc_P[2][2], mom1.P(), muMn_mc.Ntrd);
927 FillProfile(acc_P[3][2], mom1.P(), muMn_mc.Ntof);
928 FillProfile(acc_Theta[0][2], mom1.Theta() * TMath::RadToDeg(), muMn_mc.Nsts);
929 FillProfile(acc_Theta[1][2], mom1.Theta() * TMath::RadToDeg(), muMn_mc.Nmuch);
930 FillProfile(acc_Theta[2][2], mom1.Theta() * TMath::RadToDeg(), muMn_mc.Ntrd);
931 FillProfile(acc_Theta[3][2], mom1.Theta() * TMath::RadToDeg(), muMn_mc.Ntof);
932 if (muMn_mc.Nsts) {
933 FillProfile(effReco_P[0][2], mom1.P(), muMn_reco.Nsts);
934 FillProfile(effReco_Theta[0][2], mom1.Theta() * TMath::RadToDeg(), muMn_reco.Nsts);
935 }
936 if (muMn_mc.Nmuch) {
937 FillProfile(effReco_P[1][2], mom1.P(), muMn_reco.Nmuch);
938 FillProfile(effReco_Theta[1][2], mom1.Theta() * TMath::RadToDeg(), muMn_reco.Nmuch);
939 }
940 if (muMn_mc.Ntrd) {
941 FillProfile(effReco_P[2][2], mom1.P(), muMn_reco.Ntrd);
942 FillProfile(effReco_Theta[2][2], mom1.Theta() * TMath::RadToDeg(), muMn_reco.Ntrd);
943 }
944 if (muMn_mc.Ntof) {
945 FillProfile(effReco_P[3][2], mom1.P(), muMn_reco.Ntof);
946 FillProfile(effReco_Theta[3][2], mom1.Theta() * TMath::RadToDeg(), muMn_reco.Ntof);
947 }
948 }
949
950 if (muMn_reco.Mu) {
951 FillProfile(eff4pi_P[0][2], mom1.P(), muMn_reco.Chi2V);
952 FillProfile(eff4pi_P[1][2], mom1.P(), muMn_reco.Nsts);
953 FillProfile(eff4pi_P[2][2], mom1.P(), muMn_reco.Nmuch);
954 FillProfile(eff4pi_P[3][2], mom1.P(), muMn_reco.Ntrd);
955 FillProfile(eff4pi_P[4][2], mom1.P(), muMn_reco.Ntof);
956 FillProfile(eff4pi_Theta[0][2], mom1.Theta() * TMath::RadToDeg(), muMn_reco.Chi2V);
957 FillProfile(eff4pi_Theta[1][2], mom1.Theta() * TMath::RadToDeg(), muMn_reco.Nsts);
958 FillProfile(eff4pi_Theta[2][2], mom1.Theta() * TMath::RadToDeg(), muMn_reco.Nmuch);
959 FillProfile(eff4pi_Theta[3][2], mom1.Theta() * TMath::RadToDeg(), muMn_reco.Ntrd);
960 FillProfile(eff4pi_Theta[4][2], mom1.Theta() * TMath::RadToDeg(), muMn_reco.Ntof);
961 }
962
963 TLorentzVector Mom = mom1 + mom2;
964 if (signal_mc.Mu) {
965 FillProfile(acc_P[0][0], Mom.P(), signal_mc.Nsts);
966 FillProfile(acc_P[1][0], Mom.P(), signal_mc.Nmuch);
967 FillProfile(acc_P[2][0], Mom.P(), signal_mc.Ntrd);
968 FillProfile(acc_P[3][0], Mom.P(), signal_mc.Ntof);
969 FillProfile(acc_Theta[0][0], Mom.Theta() * TMath::RadToDeg(), signal_mc.Nsts);
970 FillProfile(acc_Theta[1][0], Mom.Theta() * TMath::RadToDeg(), signal_mc.Nmuch);
971 FillProfile(acc_Theta[2][0], Mom.Theta() * TMath::RadToDeg(), signal_mc.Ntrd);
972 FillProfile(acc_Theta[3][0], Mom.Theta() * TMath::RadToDeg(), signal_mc.Ntof);
973 if (signal_mc.Nsts) {
974 FillProfile(effReco_P[0][0], Mom.P(), signal_reco.Nsts);
975 FillProfile(effReco_Theta[0][0], Mom.Theta() * TMath::RadToDeg(), signal_reco.Nsts);
976 YPt_StsAcc->Fill(Mom.Rapidity(), Mom.Pt());
977 }
978 if (signal_mc.Nmuch) {
979 FillProfile(effReco_P[1][0], Mom.P(), signal_reco.Nmuch);
980 FillProfile(effReco_Theta[1][0], Mom.Theta() * TMath::RadToDeg(), signal_reco.Nmuch);
981 YPt_StsMuchAcc->Fill(Mom.Rapidity(), Mom.Pt());
982 }
983 if (signal_mc.Ntrd) {
984 FillProfile(effReco_P[2][0], Mom.P(), signal_reco.Ntrd);
985 FillProfile(effReco_Theta[2][0], Mom.Theta() * TMath::RadToDeg(), signal_reco.Ntrd);
986 YPt_StsMuchTrdAcc->Fill(Mom.Rapidity(), Mom.Pt());
987 }
988 if (signal_mc.Ntof) {
989 FillProfile(effReco_P[3][0], Mom.P(), signal_reco.Ntof);
990 FillProfile(effReco_Theta[3][0], Mom.Theta() * TMath::RadToDeg(), signal_reco.Ntof);
991 YPt_StsMuchTrdTofAcc->Fill(Mom.Rapidity(), Mom.Pt());
992 }
993 }
994 if (signal_reco.Mu) {
995 if (signal_reco.Chi2V) YPt_VtxReco->Fill(Mom.Rapidity(), Mom.Pt());
996 if (signal_reco.Nsts) YPt_VtxStsReco->Fill(Mom.Rapidity(), Mom.Pt());
997 if (signal_reco.Nmuch) YPt_VtxStsMuchReco->Fill(Mom.Rapidity(), Mom.Pt());
998 if (signal_reco.Ntrd) YPt_VtxStsMuchTrdReco->Fill(Mom.Rapidity(), Mom.Pt());
999 if (signal_reco.Ntof) YPt_VtxStsMuchTrdTofReco->Fill(Mom.Rapidity(), Mom.Pt());
1000 }
1001 FillProfile(eff4pi_P[0][0], Mom.P(), signal_reco.Chi2V);
1002 FillProfile(eff4pi_P[1][0], Mom.P(), signal_reco.Nsts);
1003 FillProfile(eff4pi_P[2][0], Mom.P(), signal_reco.Nmuch);
1004 FillProfile(eff4pi_P[3][0], Mom.P(), signal_reco.Ntrd);
1005 FillProfile(eff4pi_P[4][0], Mom.P(), signal_reco.Ntof);
1006 FillProfile(eff4pi_Theta[0][0], Mom.Theta() * TMath::RadToDeg(), signal_reco.Chi2V);
1007 FillProfile(eff4pi_Theta[1][0], Mom.Theta() * TMath::RadToDeg(), signal_reco.Nsts);
1008 FillProfile(eff4pi_Theta[2][0], Mom.Theta() * TMath::RadToDeg(), signal_reco.Nmuch);
1009 FillProfile(eff4pi_Theta[3][0], Mom.Theta() * TMath::RadToDeg(), signal_reco.Ntrd);
1010 FillProfile(eff4pi_Theta[4][0], Mom.Theta() * TMath::RadToDeg(), signal_reco.Ntof);
1011 }
1012 fEvent++;
1013}
1014// -------------------------------------------------------------------------
1015// used default ANN (16 neurons) weights generated for 8 GeV/c Au beam (UrQMD) and omega->µµ (PLUTO)
1016// sis100_muon_lmvm setup
1017//
1019{
1020
1021 Double_t ID = -1;
1022 Double_t Chi2Vertex, Chi2STS, Chi2MUCH, Chi2TRD;
1023 Int_t NofSTS, NofMUCH, NofTRD, NofTOF, type;
1024 Double_t P, M;
1025 TLorentzVector* PP = mu->GetMomentum();
1026 M = mu->GetTofM();
1027 P = PP->P();
1028 Chi2Vertex = mu->GetChiToVertex();
1029 Chi2STS = mu->GetChiSts();
1030 Chi2MUCH = mu->GetChiMuch();
1031 Chi2TRD = mu->GetChiTrd();
1032 NofSTS = mu->GetNStsHits();
1033 NofMUCH = mu->GetNMuchHits();
1034 NofTRD = mu->GetNTrdHits();
1035 NofTOF = mu->GetNTofHits();
1036
1037 Double_t MUCHchi2 = 10.;
1038 Double_t STSchi2 = 10.;
1039 Double_t Vchi2 = 10.;
1040
1041 if ((Chi2Vertex <= Vchi2 && Chi2Vertex >= 0) && (Chi2STS <= STSchi2 && Chi2STS >= 0)
1042 && (Chi2MUCH <= MUCHchi2 && Chi2MUCH >= 0) && NofTOF > 0) {
1043 Double_t params[9];
1044
1045 TTree* simu = new TTree("MonteCarlo", "Filtered Monte Carlo Events");
1046 simu->Branch("P", &P, "P/D");
1047 simu->Branch("M", &M, "M/D");
1048 simu->Branch("Chi2Vertex", &Chi2Vertex, "Chi2Vertex/D");
1049 simu->Branch("Chi2STS", &Chi2STS, "Chi2STS/D");
1050 simu->Branch("Chi2MUCH", &Chi2MUCH, "Chi2MUCH/D");
1051 simu->Branch("Chi2TRD", &Chi2TRD, "Chi2TRD/D");
1052 simu->Branch("NofSTS", &NofSTS, "NofSTS/I");
1053 simu->Branch("NofMUCH", &NofMUCH, "NofMUCH/I");
1054 simu->Branch("NofTRD", &NofTRD, "NofTRD/I");
1055 simu->Branch("type", &type, "type/I");
1056
1057 simu->Fill();
1058
1059 TMultiLayerPerceptron* mlp = new TMultiLayerPerceptron("@P,@M,@Chi2Vertex,@Chi2STS,@Chi2MUCH,@Chi2TRD,"
1060 "@NofSTS,@NofMUCH,@NofTRD:16:type",
1061 simu);
1062 mlp->LoadWeights(fFileAnnName);
1063
1064 params[0] = P;
1065 params[1] = M;
1066 params[2] = Chi2Vertex;
1067 params[3] = Chi2STS;
1068 params[4] = Chi2MUCH;
1069 params[5] = Chi2TRD;
1070 params[6] = (Double_t) NofSTS;
1071 params[7] = (Double_t) NofMUCH;
1072 params[8] = (Double_t) NofTRD;
1073 ID = mlp->Evaluate(0, params);
1074
1075 mlp->Delete();
1076 simu->Delete();
1077 }
1078
1079 return ID;
1080}
1081// -------------------------------------------------------------------------
1082Double_t CbmAnaDimuonAnalysis::CalculateAnnValue(Double_t P, Double_t M, Double_t Chi2Vertex, Double_t Chi2STS,
1083 Double_t Chi2MUCH, Double_t Chi2TRD, Int_t NofSTS, Int_t NofMUCH,
1084 Int_t NofTRD, Int_t NofTOF)
1085{
1086
1087 Double_t ID = -1;
1088
1089 Double_t MUCHchi2 = 10.;
1090 Double_t STSchi2 = 10.;
1091 Double_t Vchi2 = 10.;
1092
1093 if ((Chi2Vertex <= Vchi2 && Chi2Vertex >= 0) && (Chi2STS <= STSchi2 && Chi2STS >= 0)
1094 && (Chi2MUCH <= MUCHchi2 && Chi2MUCH >= 0) && NofTOF > 0) {
1095 Int_t type;
1096 Double_t params[9];
1097
1098 TTree* simu = new TTree("MonteCarlo", "Filtered Monte Carlo Events");
1099 simu->Branch("P", &P, "P/D");
1100 simu->Branch("M", &M, "M/D");
1101 simu->Branch("Chi2Vertex", &Chi2Vertex, "Chi2Vertex/D");
1102 simu->Branch("Chi2STS", &Chi2STS, "Chi2STS/D");
1103 simu->Branch("Chi2MUCH", &Chi2MUCH, "Chi2MUCH/D");
1104 simu->Branch("Chi2TRD", &Chi2TRD, "Chi2TRD/D");
1105 simu->Branch("NofSTS", &NofSTS, "NofSTS/I");
1106 simu->Branch("NofMUCH", &NofMUCH, "NofMUCH/I");
1107 simu->Branch("NofTRD", &NofTRD, "NofTRD/I");
1108 simu->Branch("type", &type, "type/I");
1109
1110 simu->Fill();
1111
1112 TString input;
1113 input.Form("@P,@M,@Chi2Vertex,@Chi2STS,@Chi2MUCH,@Chi2TRD,@NofSTS,@NofMUCH,"
1114 "@NofTRD:%d:type",
1115 fNeurons);
1116 TMultiLayerPerceptron* mlp = new TMultiLayerPerceptron(input.Data(), simu);
1117 mlp->LoadWeights(fFileAnnName);
1118
1119 params[0] = P;
1120 params[1] = M;
1121 params[2] = Chi2Vertex;
1122 params[3] = Chi2STS;
1123 params[4] = Chi2MUCH;
1124 params[5] = Chi2TRD;
1125
1126 params[6] = (Double_t) NofSTS;
1127 params[7] = (Double_t) NofMUCH;
1128 params[8] = (Double_t) NofTRD;
1129
1130 ID = mlp->Evaluate(0, params);
1131
1132 mlp->Delete();
1133 simu->Delete();
1134 }
1135 return ID;
1136}
1137// -------------------------------------------------------------------------
1138void CbmAnaDimuonAnalysis::FillProfile(TProfile* profile, Double_t param, Bool_t trigger)
1139{
1140 if (trigger)
1141 profile->Fill(param, 100);
1142 else
1143 profile->Fill(param, 0);
1144}
1145// ----- Public method Finish ------------------------------------------
1147{
1148
1149 TString name;
1150
1152 TFile* oldFile = gFile;
1153 TDirectory* oldDir = gDirectory;
1154
1155 if (fPlutoFileName != "") {
1156
1157 if (fAnnCut > 0)
1158 name = Form("YPt_histo_ANN_%1.2f.root", fAnnCut);
1159 else
1160 name = "YPt_histo.root";
1161
1162 TFile* f = new TFile(name, "recreate");
1163
1164 YPt_StsAcc->Scale(1. / (Double_t) fEvent);
1165 YPt_StsMuchAcc->Scale(1. / (Double_t) fEvent);
1166 YPt_StsMuchTrdAcc->Scale(1. / (Double_t) fEvent);
1167 YPt_StsMuchTrdTofAcc->Scale(1. / (Double_t) fEvent);
1168
1169 YPt_VtxReco->Scale(1. / (Double_t) fEvent);
1170 YPt_VtxStsReco->Scale(1. / (Double_t) fEvent);
1171 YPt_VtxStsMuchReco->Scale(1. / (Double_t) fEvent);
1172 YPt_VtxStsMuchTrdReco->Scale(1. / (Double_t) fEvent);
1173 YPt_VtxStsMuchTrdTofReco->Scale(1. / (Double_t) fEvent);
1174
1175 YPt_pluto->Write();
1176 YPt_StsAcc->Write();
1177 YPt_StsMuchAcc->Write();
1178 YPt_StsMuchTrdAcc->Write();
1179 YPt_StsMuchTrdTofAcc->Write();
1180
1181 if (fAnnCut < 0) {
1182 YPt_VtxReco->Write();
1183 YPt_VtxStsReco->Write();
1184 YPt_VtxStsMuchReco->Write();
1185 YPt_VtxStsMuchTrdReco->Write();
1186 }
1187 YPt_VtxStsMuchTrdTofReco->Write();
1188
1189 f->Close();
1190
1191 if (fAnnCut > 0)
1192 name = Form("eff_histo_ANN_%1.2f.root", fAnnCut);
1193 else
1194 name = "eff_histo.root";
1195 TFile* ff = new TFile(name, "recreate");
1196
1197 TDirectory* dir1 = ff->mkdir("mu Plus");
1198 dir1->cd();
1199
1200 TDirectory* dir1a = dir1->mkdir("accepted mu Plus");
1201 dir1a->cd();
1202 for (int j = 0; j < 4; j++)
1203 acc_P[j][1]->Write();
1204 for (int j = 0; j < 4; j++)
1205 acc_Theta[j][1]->Write();
1206
1207 dir1->cd();
1208 TDirectory* dir1b = dir1->mkdir("reconstructed mu Plus");
1209 dir1b->cd();
1210 if (fAnnCut < 0) {
1211 for (int j = 0; j < 3; j++)
1212 effReco_P[j][1]->Write();
1213 for (int j = 0; j < 3; j++)
1214 effReco_Theta[j][1]->Write();
1215 for (int j = 0; j < 4; j++)
1216 eff4pi_P[j][1]->Write();
1217 for (int j = 0; j < 4; j++)
1218 eff4pi_Theta[j][1]->Write();
1219 }
1220 effReco_P[3][1]->Write();
1221 effReco_Theta[3][1]->Write();
1222 eff4pi_P[4][1]->Write();
1223 eff4pi_Theta[4][1]->Write();
1224
1225 TDirectory* dir2 = ff->mkdir("mu Minus");
1226 dir2->cd();
1227
1228 TDirectory* dir2a = dir2->mkdir("accepted mu Minus");
1229 dir2a->cd();
1230 for (int j = 0; j < 4; j++)
1231 acc_P[j][2]->Write();
1232 for (int j = 0; j < 4; j++)
1233 acc_Theta[j][2]->Write();
1234
1235 dir2->cd();
1236 TDirectory* dir2b = dir2->mkdir("reconstructed mu Minus");
1237 dir2b->cd();
1238 if (fAnnCut < 0) {
1239 for (int j = 0; j < 3; j++)
1240 effReco_P[j][2]->Write();
1241 for (int j = 0; j < 3; j++)
1242 effReco_Theta[j][2]->Write();
1243 for (int j = 0; j < 4; j++)
1244 eff4pi_P[j][2]->Write();
1245 for (int j = 0; j < 4; j++)
1246 eff4pi_Theta[j][2]->Write();
1247 }
1248 effReco_P[3][2]->Write();
1249 effReco_Theta[3][2]->Write();
1250 eff4pi_P[4][2]->Write();
1251 eff4pi_Theta[4][2]->Write();
1252
1253 TDirectory* dir3 = ff->mkdir("signal");
1254 dir3->cd();
1255
1256 TDirectory* dir3a = dir3->mkdir("accepted signal");
1257 dir3a->cd();
1258 for (int j = 0; j < 4; j++)
1259 acc_P[j][0]->Write();
1260 for (int j = 0; j < 4; j++)
1261 acc_Theta[j][0]->Write();
1262
1263 dir3->cd();
1264 TDirectory* dir3b = dir3->mkdir("reconstructed signal");
1265 dir3b->cd();
1266 if (fAnnCut < 0) {
1267 for (int j = 0; j < 3; j++)
1268 effReco_P[j][0]->Write();
1269 for (int j = 0; j < 3; j++)
1270 effReco_Theta[j][0]->Write();
1271 for (int j = 0; j < 4; j++)
1272 eff4pi_P[j][0]->Write();
1273 for (int j = 0; j < 4; j++)
1274 eff4pi_Theta[j][0]->Write();
1275 }
1276 effReco_P[3][0]->Write();
1277 effReco_Theta[3][0]->Write();
1278 eff4pi_P[4][0]->Write();
1279 eff4pi_Theta[4][0]->Write();
1280
1281 ff->Close();
1282 // fPlutoFile->Close();
1283 }
1284 else {
1285 if (fAnnCut > 0)
1286 name = Form("sup_histo_ANN_%1.2f.root", fAnnCut);
1287 else
1288 name = "sup_histo.root";
1289 TFile* f = new TFile(name, "recreate");
1290
1291 if (fAnnCut < 0)
1292 for (int j = 0; j < 5; j++)
1293 BgSup[j]->Write();
1294 BgSup[5]->Write();
1295 f->Close();
1296 }
1297
1298 if (fAnnCut > 0)
1299 name = Form("YPtM_ANN_%1.2f.root", fAnnCut);
1300 else
1301 name = "YPtM.root";
1302 TFile* f = new TFile(name, "recreate");
1303
1304 YPtM->Scale(1. / (Double_t) fEvent);
1305 YPtM->Write();
1306
1308 gFile = oldFile;
1309 gDirectory = oldDir;
1310
1311 f->Close();
1312}
1313// -------------------------------------------------------------------------
1314
1315
#define PTBINNING
#define YBINNING
ClassImp(CbmAnaDimuonAnalysis)
#define PBINNING
#define MBINNING
#define THETABINNING
@ kTrd
Transition Radiation Detector.
@ kTof
Time-of-flight Detector.
@ kSts
Silicon Tracking System.
@ kMuch
Muon detection system.
Int_t nTofHits
Int_t nStsHits
Int_t nMCTracks
Class for pixel hits in MUCH detector.
Data class for STS tracks.
Class for hits in TRD detector.
TProfile * eff4pi_Theta[5][3]
TClonesArray * fStsTrackMatches
CbmAnaDimuonAnalysis(TString name, TString setup)
CbmMuchGeoScheme * fGeoScheme
TProfile * effReco_Theta[4][3]
TClonesArray * fMuchTrackMatches
virtual void Exec(Option_t *opt)
FairEventHeader * fEvtHeader
void FillProfile(TProfile *profile, Double_t param, Bool_t trigger)
CbmStsKFTrackFitter * fFitter
virtual InitStatus Init()
Double_t CalculateAnnValue(CbmAnaMuonCandidate *mu)
void SetNMuchHits(Int_t nHits)
void SetTofM(Double_t m)
void SetNTrdHits(Int_t nHits)
void SetChiMuch(Double_t chi)
void SetMomentum(TLorentzVector mom)
void SetChiSts(Double_t chi)
void SetNStsHits(Int_t nHits)
void SetAnnId(Double_t tID)
void SetChiToVertex(Double_t chi)
void SetNTofHits(Int_t nHits)
void SetChiTrd(Double_t chi)
void SetStsPdg(Int_t pdg)
TLorentzVector * GetMomentum()
void SetSign(Int_t sign)
const FairTrackParam * GetParamLast() const
int32_t GetStsTrackIndex() const
int32_t GetTofHitIndex() const
int32_t GetMuchTrackIndex() const
double GetLength() const
int32_t GetTrdTrackIndex() const
double GetTime() const
Definition CbmHit.h:76
double GetCharge() const
Charge of the associated particle.
uint32_t GetGeantProcessId() const
Definition CbmMCTrack.h:67
int32_t GetPdgCode() const
Definition CbmMCTrack.h:68
int32_t GetNPoints(ECbmModuleId detId) const
int32_t GetNofLinks() const
Definition CbmMatch.h:42
const CbmLink & GetMatchedLink() const
Definition CbmMatch.h:41
static CbmMuchGeoScheme * Instance()
void Extrapolate(CbmStsTrack *track, Double_t z, FairTrackParam *e_track)
Double_t GetChiToVertex(CbmStsTrack *track, CbmVertex *vtx=nullptr)
virtual int32_t GetTotalNofHits() const
Definition CbmStsTrack.h:81
int32_t GetNDF() const
Definition CbmTrack.h:64
virtual int32_t GetNofHits() const
Definition CbmTrack.h:58
double GetChiSq() const
Definition CbmTrack.h:63
double GetZ() const
Definition CbmVertex.h:69
TLorentzVector Vect4() const
Definition PParticle.h:69
Hash for CbmL1LinkKey.