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