CbmRoot
CbmMuchFindVectorsQA.cxx
Go to the documentation of this file.
1 
5 #include "CbmMuchFindVectorsQA.h"
6 #include "CbmMuchCluster.h"
7 #include "CbmMuchDigiMatch.h"
8 #include "CbmMuchFindHitsStraws.h"
9 #include "CbmMuchFindVectors.h"
10 #include "CbmMuchModule.h"
11 #include "CbmMuchPixelHit.h"
12 #include "CbmMuchPoint.h"
13 #include "CbmMuchStation.h"
14 #include "CbmMuchStrawHit.h"
15 #include "CbmMuchTrack.h"
16 
17 #include "FairEventHeader.h"
18 #include "FairRootManager.h"
19 #include "FairRunAna.h"
20 
21 #include <TClonesArray.h>
22 #include <TF1.h>
23 #include <TH1D.h>
24 #include <TH2D.h>
25 #include <TMath.h>
26 #include <TROOT.h>
27 
28 #include <iostream>
29 
30 using std::cout;
31 using std::endl;
32 using std::map;
33 using std::multiset;
34 using std::pair;
35 using std::set;
36 
37 // ----- Default (stabdard) constructor --------------------------------
39  : FairTask("MuchFindVectorsQA")
40  , fGeoScheme(CbmMuchGeoScheme::Instance())
41  , fStatFirst(-1)
42  , fNstat(0) {}
43 // -------------------------------------------------------------------------
44 
45 // ----- Destructor ----------------------------------------------------
47 // -------------------------------------------------------------------------
48 
49 // ----- Public method Init (abstract in base class) --------------------
51 
52  // Get and check FairRootManager
53  FairRootManager* ioman = FairRootManager::Instance();
54  if (ioman == NULL)
55  Fatal("CbmMuchFindTracksQA::Init", "RootManager not instantiated!");
56 
57  //CbmMuchFindHitsStraws *hitFinder = (CbmMuchFindHitsStraws*)
58  //FairRun::Instance()->GetTask("CbmMuchFindHitsStraws");
59  //if (hitFinder == NULL) Fatal("CbmMuchFindTracks::Init", "CbmMuchFindHitsStraws not run!");
60 
61  fVectors = static_cast<TClonesArray*>(ioman->GetObject("MuchVector"));
62  fMCTracks = static_cast<TClonesArray*>(ioman->GetObject("MCTrack"));
63  fPoints = static_cast<TClonesArray*>(ioman->GetObject("MuchPoint"));
64  fHits = static_cast<TClonesArray*>(ioman->GetObject("MuchStrawHit"));
65  fHitsGem = static_cast<TClonesArray*>(ioman->GetObject("MuchPixelHit"));
66  fDigis = static_cast<TClonesArray*>(ioman->GetObject("MuchStrawDigi"));
67  fDigisGem = static_cast<TClonesArray*>(ioman->GetObject("MuchDigi"));
68  fDigiMatches =
69  static_cast<TClonesArray*>(ioman->GetObject("MuchStrawDigiMatch"));
71  static_cast<TClonesArray*>(ioman->GetObject("MuchDigiMatch"));
72  fClusters = static_cast<TClonesArray*>(ioman->GetObject("MuchCluster"));
73 
74  // Get straw system configuration
75  Int_t nSt = fGeoScheme->GetNStations();
76 
77  for (Int_t i = 0; i < nSt; ++i) {
79  CbmMuchModule* mod = fGeoScheme->GetModule(i, 0, 0, 0);
81  if (mod->GetDetectorType() == 2 && fStatFirst < 0) fStatFirst = stat;
82  ++fNstat;
83  Int_t nLays = st->GetNLayers();
84  fNdoubl[stat] = nLays;
85 
86  for (Int_t lay = 0; lay < nLays; ++lay) {
87  CbmMuchLayer* layer = st->GetLayer(lay);
88 
89  for (Int_t iside = 0; iside < 2; ++iside) {
90  CbmMuchLayerSide* side = layer->GetSide(iside);
91  Int_t plane = lay * 2 + iside;
92  fZpos[stat][plane] = side->GetZ();
93  }
94  }
95  }
96  if (fStatFirst < 0) fStatFirst = 99; // all GEM stations
97 
98  // Create directory for histograms
99  TDirectory* dir = new TDirectory("muchQA", "", "");
100  dir->cd();
101 
102  BookHistos();
103 
104  return kSUCCESS;
105 }
106 // -------------------------------------------------------------------------
107 
108 // ----- SetParContainers -------------------------------------------------
110 // -------------------------------------------------------------------------
111 
112 // ----- Private method BookHistos -------------------------------------
114  // Book histograms
115 
116  fhNvec = new TH1D*[fNstat];
117  fhNdoubl = new TH1D*[fNstat];
118  fhNhits = new TH1D*[fNstat];
119  fhNhitsOk = new TH1D*[fNstat];
120  fhChi2 = new TH1D*[fNstat];
121  fhNgood = new TH1D*[fNstat];
122  fhNghost = new TH1D*[fNstat];
123  fhChi2ok = new TH1D*[fNstat];
124  fhChi2bad = new TH1D*[fNstat];
125  fhDx = new TH1D*[fNstat];
126  fhDy = new TH1D*[fNstat];
127  fhDtx = new TH1D*[fNstat];
128  fhDty = new TH1D*[fNstat];
129  fhIds = new TH1D*[fNstat];
130  fhIdVsEv = new TH2D*[fNstat];
131  fhDtxAll = new TH1D*[fNstat];
132  fhDtyAll = new TH1D*[fNstat];
133  fhDtxOk = new TH1D*[fNstat];
134  fhDtyOk = new TH1D*[fNstat];
135  fhShort = new TH1D*[fNstat];
136  fhOverlap = new TH2D*[fNstat];
137  fhChi2mat = new TH1D*[fNstat];
138  fhMatchMult = new TH1D*[fNstat];
139  fhOccup = new TH1D*[fNstat];
140  //fhSim = new TH1D*[fNstat];
141  //fhRec = new TH1D*[fNstat];
142  fhDx12 = new TH2D*[fNstat];
143  fhDx23 = new TH2D*[fNstat];
144  fhDy12 = new TH2D*[fNstat];
145  fhDy23 = new TH2D*[fNstat];
146 
147  for (Int_t ist = 0; ist < fNstat; ++ist) {
148  Int_t stat = ist;
149  fhNvec[ist] = new TH1D(Form("hNvec%i", stat),
150  Form("Number of vectors in station %i", stat),
151  200,
152  0,
153  1000);
154  fhNdoubl[ist] =
155  new TH1D(Form("hNdoubl%i", stat),
156  Form("Number of tubes in lay. 1 in station %i", stat),
157  200,
158  0,
159  200);
160  fhNhits[ist] = new TH1D(Form("hNhits%i", stat),
161  Form("Number of hits/vector in station %i", stat),
162  20,
163  0,
164  20);
165  fhNhitsOk[ist] =
166  new TH1D(Form("hNhitsOk%i", stat),
167  Form("Number of hits/good vector in station %i", stat),
168  20,
169  0,
170  20);
171  fhChi2[ist] = new TH1D(Form("hChi2all%i", stat),
172  Form("Chi2 of all vectors in station %i", stat),
173  200,
174  0,
175  200);
176  fhNgood[ist] = new TH1D(Form("hNgood%i", stat),
177  Form("Number of good vectors in station %i", stat),
178  100,
179  0,
180  100);
181  fhNghost[ist] =
182  new TH1D(Form("hNghost%i", stat),
183  Form("Number of ghost vectors in station %i", stat),
184  200,
185  0,
186  200);
187  fhChi2ok[ist] = new TH1D(Form("hChi2ok%i", stat),
188  Form("Chi2 of good vectors in station %i", stat),
189  200,
190  0,
191  200);
192  fhChi2bad[ist] = new TH1D(Form("hChi2bad%i", stat),
193  Form("Chi2 of ghost vectors in station %i", stat),
194  200,
195  0,
196  200);
197  fhDx[ist] = new TH1D(
198  Form("hDx%i", stat), Form("Xrec-Xmc in station %i", stat), 100, -2, 2);
199  fhDy[ist] = new TH1D(
200  Form("hDy%i", stat), Form("Yrec-Ymc in station %i", stat), 100, -15, 15);
201  fhDtx[ist] = new TH1D(Form("hDtx%i", stat),
202  Form("TXrec-TXmc in station %i", stat),
203  100,
204  -0.2,
205  0.2);
206  fhDty[ist] = new TH1D(
207  Form("hDty%i", stat), Form("TYrec-TYmc in station %i", stat), 100, -1, 1);
208  fhIds[ist] = new TH1D(Form("hIds%i", stat),
209  Form("Good track ID in station %i", stat),
210  100,
211  0,
212  100);
213  fhIdVsEv[ist] =
214  new TH2D(Form("hIdVsEv%i", stat),
215  Form("Good track ID vs ev. No. in station %i", stat),
216  100,
217  -1,
218  99,
219  20,
220  -1,
221  19);
222  fhIdVsEv[ist]->SetOption("box");
223  fhDtxAll[ist] = new TH1D(Form("hDtxAll%i", stat),
224  Form("TXvec-TXhit in station %i", stat),
225  100,
226  -2,
227  2);
228  fhDtyAll[ist] = new TH1D(Form("hDtyAll%i", stat),
229  Form("TYvec-TYhit in station %i", stat),
230  100,
231  -2,
232  2);
233  fhDtxOk[ist] = new TH1D(Form("hDtxOk%i", stat),
234  Form("TXvec-TXhit in station %i (ok)", stat),
235  100,
236  -2,
237  2);
238  fhDtyOk[ist] = new TH1D(Form("hDtyOk%i", stat),
239  Form("TYvec-TYhit in station %i (ok)", stat),
240  100,
241  -2,
242  2);
243  fhDtube[ist][0] = new TH1D(Form("hDtube21_%i", stat),
244  Form("Dtube 21 vs tube in station %i", stat),
245  100,
246  -50,
247  50);
248  fhDtube[ist][1] = new TH1D(Form("hDtube32_%i", stat),
249  Form("Dtube 32 vs tube in station %i", stat),
250  100,
251  -100,
252  100);
253  fhDtube[ist][2] = new TH1D(Form("hDtube43_%i", stat),
254  Form("Dtube 43 vs tube in station %i", stat),
255  100,
256  -200,
257  200);
258  fhShort[ist] = new TH1D(Form("hShort%i", stat),
259  Form("Number of shared hits in station %i", stat),
260  20,
261  0,
262  20);
263  fhOverlap[ist] = new TH2D(Form("hOverlap%i", stat),
264  Form("Overlap multipl. in station %i", stat),
265  20,
266  0,
267  20,
268  20,
269  0,
270  20);
271  fhChi2mat[ist] = new TH1D(Form("hChi2mat%i", stat),
272  Form("Chi2 of matching in station %i", stat),
273  100,
274  0,
275  50);
276  fhMatchMult[ist] =
277  new TH1D(Form("hMatchMult%i", stat),
278  Form("Multiplicity of matching in station %i", stat),
279  10,
280  0,
281  10);
282  fhOccup[ist] = new TH1D(Form("hOccup%i", stat),
283  Form("Occupancy in station %i", stat),
284  600,
285  -300,
286  300);
287  fhDtube2[ist][0] = new TH2D(Form("hDtube31_%i", stat),
288  Form("Dtube 31 vs tube in station %i", stat),
289  100,
290  -300,
291  300,
292  100,
293  -200,
294  200);
295  fhDtube2[ist][1] = new TH2D(Form("hDtube42_%i", stat),
296  Form("Dtube 42 vs tube in station %i", stat),
297  100,
298  -300,
299  300,
300  100,
301  -100,
302  100);
303  fhMCFit[ist][0] = new TH1D(Form("hMCFitX_%i", stat),
304  Form("Chi2 of fit in X in station %i", stat),
305  100,
306  0,
307  50);
308  fhMCFit[ist][1] = new TH1D(Form("hMCFitY_%i", stat),
309  Form("Chi2 of fit in Y in station %i", stat),
310  100,
311  0,
312  50);
313  fhDx12[ist] = new TH2D(Form("hDx12_%i", stat),
314  Form("Dx2 vs Dx1 in station %i", stat),
315  50,
316  -10,
317  10,
318  50,
319  -10,
320  10);
321  fhDx23[ist] = new TH2D(Form("hDx23_%i", stat),
322  Form("Dx3 vs Dx2 in station %i", stat),
323  50,
324  -10,
325  10,
326  50,
327  -10,
328  10);
329  fhDy12[ist] = new TH2D(Form("hDy12_%i", stat),
330  Form("Dy2 vs Dy1 in station %i", stat),
331  50,
332  -10,
333  10,
334  50,
335  -10,
336  10);
337  fhDy23[ist] = new TH2D(Form("hDy23_%i", stat),
338  Form("Dy3 vs Dy2 in station %i", stat),
339  50,
340  -10,
341  10,
342  50,
343  -10,
344  10);
345  }
346  fhSim = new TH1D("hSim", "Number of reconstructable muons", 10, 0, 10);
347  fhRec = new TH1D("hRec", "Number of reconstructed muons", 10, 0, 10);
348  fhZXY[0] = new TH1D("hZX", "Z - X", 180, 0, 45);
349  fhZXY[1] = new TH1D("hZY", "Z - Y", 180, 0, 45);
350  fhEvents = new TH1D("hEvents", "Number of processed events", 5, 0, 5);
351 }
352 // -------------------------------------------------------------------------
353 
354 // ----- Public method Exec --------------------------------------------
355 void CbmMuchFindVectorsQA::Exec(Option_t* opt) {
356  // Do all processing
357 
358  Int_t* mult = new Int_t[fNstat];
359  Int_t* multOk = new Int_t[fNstat];
360  Int_t* multBad = new Int_t[fNstat];
361  for (Int_t i = 0; i < fNstat; ++i)
362  mult[i] = multOk[i] = multBad[i] = 0;
363  fhEvents->Fill(1);
364 
365  Int_t nvec = fVectors->GetEntriesFast();
366  cout << " nvec " << nvec << endl;
367  for (Int_t iv = 0; iv < nvec; ++iv) {
368  CbmMuchTrack* vec = (CbmMuchTrack*) fVectors->UncheckedAt(iv);
369  Int_t ista = vec->GetUniqueID();
370  const FairTrackParam* params = vec->GetParamFirst();
371  ++mult[ista];
372  fhChi2[ista]->Fill(vec->GetChiSq());
373  fhNhits[ista]->Fill(vec->GetNofHits());
374  fhDtxAll[ista]->Fill(params->GetTx() - params->GetX() / params->GetZ());
375  fhDtyAll[ista]->Fill(params->GetTy() - params->GetY() / params->GetZ());
376  if (CheckMatch(vec)) {
377  // "Good" vector
378  ++multOk[ista];
379  fhChi2ok[ista]->Fill(vec->GetChiSq());
380  } else {
381  // Ghost
382  ++multBad[ista];
383  fhChi2bad[ista]->Fill(vec->GetChiSq());
384  }
385  }
386  cout << mult[0] << " " << mult[1] << endl;
387 
388  for (Int_t i = 0; i < fNstat; ++i) {
389  fhNvec[i]->Fill(mult[i]);
390  fhNgood[i]->Fill(multOk[i]);
391  fhNghost[i]->Fill(multBad[i]);
392  }
393 
394  // Check short tracks
396 
397  // Check efficiency
398  CheckEffic();
399 
400  // For straws: fill occupancy histos as well (for completeness)
401  // and number of hits in the first layer of the first doublet
402  Int_t nhits = fHits->GetEntriesFast(), nDouble[10] = {0};
403  for (Int_t i = 0; i < nhits; ++i) {
404  CbmMuchStrawHit* hit = (CbmMuchStrawHit*) fHits->UncheckedAt(i);
405  Int_t ista = fGeoScheme->GetStationIndex(hit->GetAddress());
406  fhOccup[ista]->Fill(hit->GetTube());
407  Int_t lay = fGeoScheme->GetLayerIndex(hit->GetAddress());
408  Int_t side = fGeoScheme->GetLayerSideIndex(hit->GetAddress());
409  if (lay == 0 && side == 0) ++nDouble[ista];
410  }
411  //for (Int_t ista = 0; ista < 2; ++ista) fhNdoubl[ista]->Fill(nDouble[ista]);
412  for (Int_t ista = 0; ista < fNstat; ++ista)
413  fhNdoubl[ista]->Fill(nDouble[ista]);
414 
415  delete[] mult;
416  delete[] multOk;
417  delete[] multBad;
418 }
419 // -------------------------------------------------------------------------
420 
421 // ----- Private method CheckMatch -------------------------------------
423  // Check matching quality of the vector
424 
425  Int_t ista = vec->GetUniqueID();
426  if (ista < fStatFirst) return CheckMatchGem(vec);
427 
428  Int_t nhits = vec->GetNofHits(), nthr = nhits / 2, id = 0;
429  //Int_t nhits = vec->GetNofHits(), nthr = nhits - 1, id = 0;
430  map<Int_t, Int_t> ids;
431 
432  for (Int_t ih = 0; ih < nhits; ++ih) {
433  CbmMuchStrawHit* hit =
434  (CbmMuchStrawHit*) fHits->UncheckedAt(vec->GetHitIndex(ih));
435  //if (hit->GetFlag() > 1) { cout << " hit " << hit->GetFlag() << endl; /*exit(0);*/ }
436  if (hit->GetFlag() % 2) {
437  //if (0) {
438  // Mirror hit
439  id = -1;
440  if (ids.find(id) == ids.end())
441  ids.insert(pair<Int_t, Int_t>(id, 1));
442  else
443  ++ids[id];
444  } else {
445  CbmMuchDigiMatch* digiM =
446  (CbmMuchDigiMatch*) fDigiMatches->UncheckedAt(hit->GetRefId());
447  Int_t np = digiM->GetNofLinks();
448  for (Int_t ip = 0; ip < np; ++ip) {
449  //CbmMuchPoint* point = (CbmMuchPoint*) fPoints->UncheckedAt(digiM->GetLink(0).GetIndex());
450  CbmMuchPoint* point =
451  (CbmMuchPoint*) fPoints->UncheckedAt(digiM->GetLink(ip).GetIndex());
452  id = point->GetTrackID();
453  //if (np > 1) cout << ip << " " << id << endl;
454  if (ids.find(id) == ids.end())
455  ids.insert(pair<Int_t, Int_t>(id, 1));
456  else
457  ++ids[id];
458  }
459  //if (np > 1) { cout << " digi " << digiM->GetNofLinks() << " " << ista << " " << hit->GetX() << " " << hit->GetY() << endl; exit(0); }
460  }
461  }
462  Int_t maxim = -1, idmax = -9;
463  for (map<Int_t, Int_t>::iterator it = ids.begin(); it != ids.end(); ++it) {
464  if (it->second > maxim) {
465  maxim = it->second;
466  idmax = it->first;
467  }
468  }
469  // Set vector ID as its flag
470  //vec->SetFlag(idmax);
471  if (maxim <= nthr || idmax < 0) return kFALSE;
472 
473  if (idmax > 1) return kFALSE; // !!! look only at muons from Pluto
474 
475  fhNhitsOk[ista]->Fill(vec->GetNofHits());
476  fhIds[ista]->Fill(idmax);
477  Int_t evID = FairRunAna::Instance()->GetEventHeader()->GetMCEntryNumber() + 1;
478  fhIdVsEv[ista]->Fill(evID, idmax);
479 
480  // Fill true track parameters
481  Double_t zp = 0.0, parsTr[4] = {0.0};
482  Int_t ok = 0;
483  for (Int_t ih = 0; ih < nhits; ++ih) {
484  CbmMuchStrawHit* hit =
485  (CbmMuchStrawHit*) fHits->UncheckedAt(vec->GetHitIndex(ih));
486  CbmMuchDigiMatch* digiM =
487  (CbmMuchDigiMatch*) fDigiMatches->UncheckedAt(hit->GetRefId());
488  Int_t np = digiM->GetNofLinks();
489  for (Int_t ip = 0; ip < np; ++ip) {
490  CbmMuchPoint* point =
491  (CbmMuchPoint*) fPoints->UncheckedAt(digiM->GetLink(ip).GetIndex());
492  id = point->GetTrackID();
493  if (id != idmax) continue;
494  parsTr[0] = (point->GetXIn() + point->GetXOut()) / 2;
495  parsTr[1] = (point->GetYIn() + point->GetYOut()) / 2;
496  zp = (point->GetZIn() + point->GetZOut()) / 2;
497  parsTr[2] = point->GetPx() / point->GetPz();
498  parsTr[3] = point->GetPy() / point->GetPz();
499  ok = 1;
500  break;
501  }
502  if (ok) break;
503  }
504  // Adjust track coordinates
505  const FairTrackParam* params = vec->GetParamFirst();
506  parsTr[0] += parsTr[2] * (params->GetZ() - zp);
507  parsTr[1] += parsTr[3] * (params->GetZ() - zp);
508  fhDx[ista]->Fill(params->GetX() - parsTr[0]);
509  fhDy[ista]->Fill(params->GetY() - parsTr[1]);
510  fhDtx[ista]->Fill(params->GetTx() - parsTr[2]);
511  fhDty[ista]->Fill(params->GetTy() - parsTr[3]);
512  fhDtxOk[ista]->Fill(params->GetTx() - params->GetX() / params->GetZ());
513  fhDtyOk[ista]->Fill(params->GetTy() - params->GetY() / params->GetZ());
514  cout << " Good: " << idmax << " " << zp << " " << params->GetZ() << " "
515  << parsTr[0] << " " << params->GetX() << " " << parsTr[1] << " "
516  << params->GetY() << " " << parsTr[2] << " " << params->GetTx() << " "
517  << parsTr[3] << " " << params->GetTy() << " " << vec->GetChiSq() << endl;
518 
519  // Fill tube difference between doublets
520  map<Int_t, Int_t> tubes[2];
521  Int_t id0 = -1;
522  // Check configuration
523  Int_t combi = 0;
524  if (fNdoubl[fNstat - 1] == 3)
525  combi = 3; // combined stations for 3-layer config.
526 
527  for (Int_t ih = 0; ih < nhits; ++ih) {
528  CbmMuchStrawHit* hit =
529  (CbmMuchStrawHit*) fHits->UncheckedAt(vec->GetHitIndex(ih));
530  CbmMuchDigiMatch* digiM =
531  (CbmMuchDigiMatch*) fDigiMatches->UncheckedAt(hit->GetRefId());
532  Int_t np = digiM->GetNofLinks();
533  for (Int_t ip = 0; ip < np; ++ip) {
534  CbmMuchPoint* point =
535  (CbmMuchPoint*) fPoints->UncheckedAt(digiM->GetLink(ip).GetIndex());
536  id = point->GetTrackID();
537  if (id > 1) continue; // look only at muons from vector mesons
538  if (id0 < 0) id0 = id;
539  break;
540  }
541  if (id0 < 0 || id != id0) continue;
542  Int_t stat = fGeoScheme->GetStationIndex(hit->GetAddress()) - fStatFirst;
543  Int_t lay = fGeoScheme->GetLayerIndex(hit->GetAddress());
544  tubes[id].insert(pair<Int_t, Int_t>(lay + stat * combi, hit->GetTube()));
545  }
546  Double_t slope[2] = {0.08, 0.06};
547  for (Int_t j = 0; j < 2; ++j) {
548  // Loop over trackID
549  Int_t nd = tubes[j].size();
550  if (nd < 2) continue;
551  Int_t tubeNos[6] = {1000, 1000, 1000, 1000, 1000, 1000};
552  map<Int_t, Int_t>::iterator it = tubes[j].begin();
553  tubeNos[it->first] = it->second;
554  ++it;
555  for (; it != tubes[j].end(); ++it)
556  tubeNos[it->first] = it->second;
557  for (Int_t lay = 1; lay < 4; ++lay) {
558  if (tubeNos[lay] < 1000 & tubeNos[lay - 1] < 1000)
559  fhDtube[ista][lay - 1]->Fill(tubeNos[lay] - tubeNos[lay - 1]);
560  if (combi == 0) {
561  // 4-layer config.
562  if (lay == 2 && tubeNos[lay] < 1000 & tubeNos[lay - 2] < 1000)
563  fhDtube2[ista][lay - 2]->Fill(tubeNos[lay - 2],
564  tubeNos[lay] - tubeNos[lay - 2]);
565  if (lay == 3 && tubeNos[lay] < 1000 & tubeNos[lay - 2] < 1000) {
566  //fhDtube2[ista][lay-2]->Fill(tubeNos[lay-2],tubeNos[lay]-tubeNos[lay-2]-slope[ista]*tubeNos[lay-2]);
567  Double_t dzz = (fZpos[ista][lay * 2] - fZpos[ista][lay * 2 - 4])
568  / fZpos[ista][lay * 2 - 4];
569  fhDtube2[ista][lay - 2]->Fill(tubeNos[lay - 2],
570  tubeNos[lay] - tubeNos[lay - 2]
571  - dzz * tubeNos[lay - 2]);
572  }
573  } else {
574  // 3-layer config.
575  if (lay == 3 && tubeNos[lay] < 1000 & tubeNos[lay - 3] < 1000)
576  fhDtube2[ista][lay - 3]->Fill(tubeNos[lay - 3],
577  tubeNos[lay] - tubeNos[lay - 3]);
578  if (lay == 1 && tubeNos[lay] < 1000 & tubeNos[lay + 3] < 1000) {
579  //fhDtube2[ista][lay-2]->Fill(tubeNos[lay-2],tubeNos[lay]-tubeNos[lay-2]-slope[ista]*tubeNos[lay-2]);
580  Double_t dzz = (fZpos[ista + 1][lay * 2] - fZpos[ista][lay * 2])
581  / fZpos[ista][lay * 2];
582  fhDtube2[ista][lay]->Fill(
583  tubeNos[lay], tubeNos[lay + 3] - tubeNos[lay] - dzz * tubeNos[lay]);
584  }
585  }
586  }
587  if (ok) break;
588  }
589 
590  return kTRUE;
591 }
592 // -------------------------------------------------------------------------
593 
594 // ----- Private method CheckMatchGem ----------------------------------
596  // Check matching quality of the vector for GEM stations
597 
598  Int_t ista = vec->GetUniqueID();
599  Int_t nhits = vec->GetNofHits(), nthr = nhits / 2, id = 0;
600  //Int_t nhits = vec->GetNofHits(), nthr = nhits - 1, id = 0;
601  map<Int_t, Int_t> ids;
602 
603  for (Int_t ih = 0; ih < nhits; ++ih) {
604  CbmMuchPixelHit* hit =
605  (CbmMuchPixelHit*) fHitsGem->UncheckedAt(vec->GetHitIndex(ih));
606  CbmMuchCluster* clus =
607  (CbmMuchCluster*) fClusters->UncheckedAt(hit->GetRefId());
608  Int_t nDigis = clus->GetNofDigis();
609  for (Int_t j = 0; j < nDigis; ++j) {
610  CbmMuchDigiMatch* digiM =
611  (CbmMuchDigiMatch*) fDigiMatchesGem->UncheckedAt(clus->GetDigi(j));
612  Int_t np = digiM->GetNofLinks();
613  for (Int_t ip = 0; ip < np; ++ip) {
614  //CbmMuchPoint* point = (CbmMuchPoint*) fPoints->UncheckedAt(digiM->GetLink(0).GetIndex());
615  CbmMuchPoint* point =
616  (CbmMuchPoint*) fPoints->UncheckedAt(digiM->GetLink(ip).GetIndex());
617  id = point->GetTrackID();
618  //if (np > 1) cout << ip << " " << id << endl;
619  ids[id]++;
620  }
621  //if (np > 1) { cout << " digi " << digiM->GetNofLinks() << " " << ista << " " << hit->GetX() << " " << hit->GetY() << endl; exit(0); }
622  }
623  }
624 
625  Int_t maxim = -1, idmax = -9;
626  for (map<Int_t, Int_t>::iterator it = ids.begin(); it != ids.end(); ++it) {
627  if (it->second > maxim) {
628  maxim = it->second;
629  idmax = it->first;
630  }
631  }
632  //cout << " GEMS: " << ista << " " << nhits << " " << maxim << " " << idmax << endl;
633  // Set vector ID as its flag
634  //vec->SetFlag(idmax);
635  if (maxim <= nthr || idmax < 0) return kFALSE;
636 
637  if (idmax > 1) return kFALSE; // !!! look only at muons from Pluto
638 
639  fhNhitsOk[ista]->Fill(vec->GetNofHits());
640  fhIds[ista]->Fill(idmax);
641  Int_t evID = FairRunAna::Instance()->GetEventHeader()->GetMCEntryNumber() + 1;
642  fhIdVsEv[ista]->Fill(evID, idmax);
643 
644  // Fill true track parameters
645  Double_t zp = 0.0, parsTr[4] = {0.0};
646  Int_t ok = 0;
647 
648  for (Int_t ih = 0; ih < nhits; ++ih) {
649  CbmMuchPixelHit* hit =
650  (CbmMuchPixelHit*) fHitsGem->UncheckedAt(vec->GetHitIndex(ih));
651  CbmMuchCluster* clus =
652  (CbmMuchCluster*) fClusters->UncheckedAt(hit->GetRefId());
653  Int_t nDigis = clus->GetNofDigis();
654  for (Int_t j = 0; j < nDigis; ++j) {
655  CbmMuchDigiMatch* digiM =
656  (CbmMuchDigiMatch*) fDigiMatchesGem->UncheckedAt(clus->GetDigi(j));
657  Int_t np = digiM->GetNofLinks();
658  for (Int_t ip = 0; ip < np; ++ip) {
659  CbmMuchPoint* point =
660  (CbmMuchPoint*) fPoints->UncheckedAt(digiM->GetLink(ip).GetIndex());
661  id = point->GetTrackID();
662  if (id != idmax) continue;
663  parsTr[0] = (point->GetXIn() + point->GetXOut()) / 2;
664  parsTr[1] = (point->GetYIn() + point->GetYOut()) / 2;
665  zp = (point->GetZIn() + point->GetZOut()) / 2;
666  parsTr[2] = point->GetPx() / point->GetPz();
667  parsTr[3] = point->GetPy() / point->GetPz();
668  ok = 1;
669  break;
670  }
671  if (ok) break;
672  }
673  if (ok) break;
674  }
675  // Adjust track coordinates
676  const FairTrackParam* params = vec->GetParamFirst();
677  parsTr[0] += parsTr[2] * (params->GetZ() - zp);
678  parsTr[1] += parsTr[3] * (params->GetZ() - zp);
679  fhDx[ista]->Fill(params->GetX() - parsTr[0]);
680  fhDy[ista]->Fill(params->GetY() - parsTr[1]);
681  fhDtx[ista]->Fill(params->GetTx() - parsTr[2]);
682  fhDty[ista]->Fill(params->GetTy() - parsTr[3]);
683  fhDtxOk[ista]->Fill(params->GetTx() - params->GetX() / params->GetZ());
684  fhDtyOk[ista]->Fill(params->GetTy() - params->GetY() / params->GetZ());
685  cout << " Good: " << idmax << " " << zp << " " << params->GetZ() << " "
686  << parsTr[0] << " " << params->GetX() << " " << parsTr[1] << " "
687  << params->GetY() << " " << parsTr[2] << " " << params->GetTx() << " "
688  << parsTr[3] << " " << params->GetTy() << " " << vec->GetChiSq() << endl;
689 
690  return kTRUE;
691 }
692 // -------------------------------------------------------------------------
693 
694 // ----- Private method CheckShorts ------------------------------------
695 void CbmMuchFindVectorsQA::CheckShorts(TClonesArray* hitArray) {
696  // Check short tracks
697 
698  Int_t nvec = fVectors->GetEntriesFast();
699  Int_t nhits0 = 4;
700  for (Int_t iv = 0; iv < nvec; ++iv) {
701  CbmMuchTrack* vec = (CbmMuchTrack*) fVectors->UncheckedAt(iv);
702  Int_t nhits = vec->GetNofHits();
703  if (nhits != nhits0) continue;
704  Int_t ista = vec->GetUniqueID();
705  set<Int_t> overlap;
706  multiset<Int_t> overlap1;
707 
708  for (Int_t iv1 = iv + 1; iv1 < nvec; ++iv1) {
709  CbmMuchTrack* vec1 = (CbmMuchTrack*) fVectors->UncheckedAt(iv1);
710  if (vec1->GetUniqueID() != ista) continue;
711  Int_t nhits1 = vec1->GetNofHits();
712 
713  // Compare hits
714  Int_t ih1 = 0;
715  for (Int_t ih = 0; ih < nhits; ++ih) {
716  //CbmMuchStrawHit *hit = (CbmMuchStrawHit*) hitArray->UncheckedAt(vec->GetHitIndex(ih));
717  CbmHit* hit = (CbmHit*) hitArray->UncheckedAt(vec->GetHitIndex(ih));
718  Int_t lay = fGeoScheme->GetLayerIndex(hit->GetAddress());
719  Int_t side = fGeoScheme->GetLayerSideIndex(hit->GetAddress());
720  Int_t plane = lay * 2 + side;
721 
722  for (; ih1 < nhits1; ++ih1) {
723  //CbmMuchStrawHit *hit1 = (CbmMuchStrawHit*) hitArray->UncheckedAt(vec1->GetHitIndex(ih1));
724  CbmHit* hit1 =
725  (CbmHit*) hitArray->UncheckedAt(vec1->GetHitIndex(ih1));
726  Int_t lay1 = fGeoScheme->GetLayerIndex(hit1->GetAddress());
727  Int_t side1 = fGeoScheme->GetLayerSideIndex(hit1->GetAddress());
728  Int_t plane1 = lay1 * 2 + side1;
729  if (plane1 < plane) continue;
730  if (plane1 > plane) break;
731  if (hit == hit1) {
732  overlap.insert(ih);
733  overlap1.insert(ih);
734  }
735  }
736  }
737  if (overlap.size() == nhits0) {
738  // All hits are shared with other tracks
739  //break;
740  }
741  } // for (Int_t iv1 = iv + 1;
742  fhShort[ista]->Fill(overlap.size());
743  if (overlap.size()) fhOverlap[ista]->Fill(overlap.size(), overlap1.size());
744  } // for (Int_t iv = 0; iv < nvec;
745 }
746 // -------------------------------------------------------------------------
747 
748 // ----- Private method CheckEffic -------------------------------------
750  // Check efficiency of the vector reco
751 
752  // Find "reconstructable" vectors - having points in all doublets (GEM or straw)
753  // !!! Take only trackID = 0, 1 (from signal mesons)
754  const Int_t nMu = 2;
755  set<Int_t> doublets[20][nMu], singlets[20][nMu];
756  Int_t nPoints = fPoints->GetEntriesFast();
757  Double_t xp[7][20][nMu], yp[7][20][nMu];
758  Bool_t lstraws = kFALSE;
759 
760  for (Int_t ip = 0; ip < nPoints; ++ip) {
761  CbmMuchPoint* p = (CbmMuchPoint*) fPoints->UncheckedAt(ip);
762  Int_t id = p->GetTrackID();
763  if (id > 1) continue;
764  if (p->GetZ() < fZpos[0][0] - 2.0) continue;
765  Int_t ista = fGeoScheme->GetStationIndex(p->GetDetectorId());
766  Int_t lay = fGeoScheme->GetLayerIndex(p->GetDetectorId());
767  Int_t side = fGeoScheme->GetLayerSideIndex(p->GetDetectorId());
768 
769  doublets[ista][id].insert(lay);
770  singlets[ista][id].insert(lay * 2 + side);
771  xp[ista][lay * 2 + side][id] = (p->GetXIn() + p->GetXOut()) / 2;
772  yp[ista][lay * 2 + side][id] = (p->GetYIn() + p->GetYOut()) / 2;
773 
774  if (!lstraws) {
775  if (fGeoScheme->GetModuleByDetId(p->GetDetectorId())->GetDetectorType()
776  == 2)
777  lstraws = kTRUE;
778  }
779  }
780 
781  Int_t muons[7][nMu] = {{0}, {0}}, nMuVec = 0;
782  for (Int_t ista = 0; ista < fNstat; ++ista) {
783  if (doublets[ista][0].size() == fNdoubl[ista]) {
784  fhSim->Fill(ista);
785  muons[ista][0] = 1;
786  ++nMuVec;
787  }
788  if (doublets[ista][1].size() == fNdoubl[ista]) {
789  fhSim->Fill(ista);
790  muons[ista][1] = 1;
791  ++nMuVec;
792  }
793  }
794  //if (muons[0][0] == 0 && muons[0][1] == 0 && muons[1][0] == 0 && muons[1][1] == 0) return;
795  if (nMuVec == 0) return;
796 
797  // Fit to straight lines in 2 projections
798  /*
799  for (Int_t ista = 0; ista < fNstat; ++ista) {
800 
801  for (Int_t mu = 0; mu < 2; ++ mu) {
802  if (muons[ista][mu] == 0) continue;
803 
804  fhZXY[0]->Reset();
805  fhZXY[1]->Reset();
806  for (Int_t plane = 0; plane < nLays2; ++plane) {
807  if (singlets[ista][mu].find(plane) == singlets[ista][mu].end()) continue;
808  fhZXY[0]->Fill(zPos[ista][plane]-zPos[ista][0]+5, xp[ista][plane][mu]);
809  Int_t ib = fhZXY[1]->Fill(zPos[ista][plane]-zPos[ista][0]+5, yp[ista][plane][mu]);
810  fhZXY[0]->SetBinError(ib, 0.1);
811  fhZXY[1]->SetBinError(ib, 0.1);
812  }
813  for (Int_t jxy = 0; jxy < 2; ++jxy) {
814  fhZXY[jxy]->Fit("pol1","Q0");
815  TF1 *f = fhZXY[jxy]->GetFunction("pol1");
816  fhMCFit[ista][jxy]->Fill(f->GetChisquare() / f->GetNDF());
817  }
818  }
819  }
820  */
821 
822  // Match reconstructed vectors
823  Int_t nvec = fVectors->GetEntriesFast();
824  Int_t pluto = 1; // !!! set to 1 to check exact matching for Pluto
825  //Double_t errx = 0.22, erry = 1.41, chi2cut = 10.0; // 10 deg
826  //Double_t errx = 0.2, erry = 1.9, chi2cut = 10.0; // 5 doublets
827  Double_t errxS[6] = {0.33, 0.50, 0.2, 0.2, 1, 1};
828  Double_t erryS[6] = {0.33, 0.50, 1.9, 1.9, 1, 1},
829  chi2cut = 10.0; // 2 GEMS, 2 straws
830  //Double_t errxS[6] = {0.33, 0.50, 0.03, 0.03, 1, 1};
831  //Double_t erryS[6] = {0.33, 0.50, 0.26, 0.26, 1, 1}, chi2cut = 10.0; // 2 GEMS, 2 straws
832  Double_t errxG[6] = {0.33, 0.54, 1.0, 1.7, 1, 1};
833  Double_t erryG[6] = {0.33, 0.54, 1.0, 1.7, 1, 1}; // 4 GEMS
834  Int_t nMatch[7][nMu] = {{0}, {0}}, combi = 0;
835  Double_t *errx = errxG, *erry = erryG;
836  if (lstraws) {
837  errx = errxS;
838  erry = erryS;
839  if (fNdoubl[fNstat - 1] == 3)
840  combi = 6; // combined stations for 3-layer config.
841  }
842 
843  for (Int_t iv = 0; iv < nvec; ++iv) {
844  CbmMuchTrack* vec = (CbmMuchTrack*) fVectors->UncheckedAt(iv);
845  Int_t nhits = vec->GetNofHits();
846  Int_t ista = vec->GetUniqueID();
847  if (muons[ista][0] == 0 && muons[ista][1] == 0) continue;
848  Int_t id = vec->GetFlag();
849  if (pluto && id > 1)
850  continue; // !!! this is only for Pluto sample - exact ID match!!!
851  const FairTrackParam* params = vec->GetParamFirst();
852  TClonesArray* hitArray = (ista < fStatFirst) ? fHitsGem : fHits;
853 
854  Double_t chi2[nMu] = {0.0};
855  for (Int_t mu = 0; mu < nMu; ++mu) {
856  if (!muons[ista][mu]) {
857  chi2[mu] = 999999.;
858  continue;
859  }
860  Int_t nm = 0;
861  Double_t dx0 = 0, dy0 = 0;
862 
863  for (Int_t ih = 0; ih < nhits; ++ih) {
864  //CbmMuchStrawHit *hit = (CbmMuchStrawHit*) fHits->UncheckedAt(vec->GetHitIndex(ih));
865  CbmHit* hit = (CbmHit*) hitArray->UncheckedAt(vec->GetHitIndex(ih));
866  Int_t stat =
868  Int_t lay = fGeoScheme->GetLayerIndex(hit->GetAddress());
869  Int_t side = fGeoScheme->GetLayerSideIndex(hit->GetAddress());
870  Int_t plane = lay * 2 + side;
871  plane += stat * combi;
872  if (singlets[ista][mu].find(plane) == singlets[ista][mu].end())
873  continue;
874  Double_t x = params->GetX()
875  + params->GetTx() * (fZpos[ista][plane] - params->GetZ());
876  Double_t y = params->GetY()
877  + params->GetTy() * (fZpos[ista][plane] - params->GetZ());
878  Double_t dx = x - xp[ista][plane][mu];
879  Double_t dy = y - yp[ista][plane][mu];
880  chi2[mu] += dx * dx / errx[ista] / errx[ista];
881  chi2[mu] += dy * dy / erry[ista] / erry[ista];
882  ++nm;
883  if (lay) {
884  if (lay == 1) {
885  fhDx12[ista]->Fill(dx0, dx);
886  fhDy12[ista]->Fill(dy0, dy);
887  } else if (lay == 2) {
888  fhDx23[ista]->Fill(dx0, dx);
889  fhDy23[ista]->Fill(dy0, dy);
890  }
891  }
892  dx0 = dx;
893  dy0 = dy;
894  //cout << nm << " " << dx << " " << dy << endl;
895  }
896  nm *= 2;
897  if (nm > 4) chi2[mu] /= (nm - 4); // per NDF
898  }
899  if (pluto)
900  fhChi2mat[ista]->Fill(
901  chi2[id]); // !!! this is only for Pluto sample - exact ID match!!!
902  else
903  fhChi2mat[ista]->Fill(TMath::Min(chi2[0], chi2[1]));
904  if (chi2[0] < chi2cut) ++nMatch[ista][0];
905  if (chi2[1] < chi2cut) ++nMatch[ista][1];
906  cout << chi2[0] << " " << chi2[1] << endl;
907  } // for (Int_t iv = 0; iv < nvec;
908  for (Int_t ista = 0; ista < fNstat; ++ista) {
909  if (combi && ista == fNstat - 1) continue; // 2 combined stations
910  for (Int_t id = 0; id < nMu; ++id) {
911  if (muons[ista][id]) {
912  if (combi && ista == fNstat - 2 && muons[ista + 1][id] == 0)
913  continue; // 2 combined stations
914  fhMatchMult[ista]->Fill(nMatch[ista][id]);
915  if (nMatch[ista][id] == 0)
916  cout << " !!! No match found !!! " << ista << " " << id << endl;
917  }
918  }
919  }
920 }
921 // -------------------------------------------------------------------------
922 
923 // ----- Public method Finish ------------------------------------------
925  for (Int_t ista = 0; ista < fNstat; ++ista) {
926  if (fNdoubl[ista])
927  fhOccup[ista]->Scale(1. / 2 / fNdoubl[ista] / 2 / fhEvents->GetEntries());
928  }
929 
930  TDirectory* dir = (TDirectory*) gROOT->FindObjectAny("muchQA");
931  gDirectory->mkdir("muchQA");
932  gDirectory->cd("muchQA");
933  dir->GetList()->Write();
934 }
935 // -------------------------------------------------------------------------
936 
937 // -------------------------------------------------------------------------
938 
CbmMuchPoint::GetXOut
Double_t GetXOut() const
Definition: CbmMuchPoint.h:73
CbmMuchModule.h
CbmTrack::GetChiSq
Double_t GetChiSq() const
Definition: CbmTrack.h:58
CbmMuchGeoScheme
Definition: CbmMuchGeoScheme.h:43
CbmMuchFindVectorsQA::fDigisGem
TClonesArray * fDigisGem
Definition: CbmMuchFindVectorsQA.h:58
CbmMuchPoint
Definition: CbmMuchPoint.h:21
CbmMuchGeoScheme::GetModule
CbmMuchModule * GetModule(Int_t iStation, Int_t iLayer, Bool_t iSide, Int_t iModule) const
Definition: CbmMuchGeoScheme.cxx:238
CbmMuchFindVectorsQA::fhZXY
TH1D * fhZXY[2]
Definition: CbmMuchFindVectorsQA.h:92
CbmMuchStation::GetLayer
CbmMuchLayer * GetLayer(Int_t iLayer) const
Definition: CbmMuchStation.h:58
CbmMuchStation
Definition: CbmMuchStation.h:22
CbmMuchFindVectorsQA::BookHistos
void BookHistos()
Definition: CbmMuchFindVectorsQA.cxx:113
CbmMuchFindVectorsQA::fhDx12
TH2D ** fhDx12
transient histo
Definition: CbmMuchFindVectorsQA.h:94
CbmMatch::GetLink
const CbmLink & GetLink(Int_t i) const
Definition: CbmMatch.h:35
CbmMatch::GetNofLinks
Int_t GetNofLinks() const
Definition: CbmMatch.h:38
CbmTrack::GetNofHits
virtual Int_t GetNofHits() const
Definition: CbmTrack.h:53
CbmMuchFindVectorsQA::fhDx
TH1D ** fhDx
Definition: CbmMuchFindVectorsQA.h:72
CbmMuchFindVectorsQA::fhOccup
TH1D ** fhOccup
Definition: CbmMuchFindVectorsQA.h:90
CbmTrack::GetFlag
Int_t GetFlag() const
Definition: CbmTrack.h:57
CbmMuchFindVectorsQA::fStatFirst
Int_t fStatFirst
Definition: CbmMuchFindVectorsQA.h:47
CbmMuchFindVectorsQA::fhSim
TH1D * fhSim
Definition: CbmMuchFindVectorsQA.h:86
CbmMuchCluster
Data container for MUCH clusters.
Definition: CbmMuchCluster.h:20
CbmMuchFindVectorsQA::fhChi2
TH1D ** fhChi2
Definition: CbmMuchFindVectorsQA.h:67
CbmMuchFindVectorsQA::fVectors
TClonesArray * fVectors
Definition: CbmMuchFindVectorsQA.h:52
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
CbmMuchFindVectorsQA::fhChi2ok
TH1D ** fhChi2ok
Definition: CbmMuchFindVectorsQA.h:70
CbmMuchFindVectors.h
CbmMuchFindVectorsQA::fhDty
TH1D ** fhDty
Definition: CbmMuchFindVectorsQA.h:75
CbmMuchFindVectorsQA::fDigiMatchesGem
TClonesArray * fDigiMatchesGem
Definition: CbmMuchFindVectorsQA.h:60
CbmMuchFindVectorsQA::fPoints
TClonesArray * fPoints
Definition: CbmMuchFindVectorsQA.h:54
CbmMuchPoint::GetDetectorId
Int_t GetDetectorId() const
Definition: CbmMuchPoint.h:69
CbmMuchFindVectorsQA::fhDx23
TH2D ** fhDx23
Definition: CbmMuchFindVectorsQA.h:95
CbmMuchFindVectorsQA::fhDy12
TH2D ** fhDy12
Definition: CbmMuchFindVectorsQA.h:96
CbmHit::GetRefId
Int_t GetRefId() const
Definition: CbmHit.h:72
CbmMuchFindVectorsQA::CheckMatchGem
Bool_t CheckMatchGem(CbmMuchTrack *vec)
Definition: CbmMuchFindVectorsQA.cxx:595
CbmMuchFindVectorsQA::Exec
virtual void Exec(Option_t *opt)
Definition: CbmMuchFindVectorsQA.cxx:355
CbmMuchFindVectorsQA::Init
virtual InitStatus Init()
Definition: CbmMuchFindVectorsQA.cxx:50
CbmMuchFindVectorsQA::CheckEffic
void CheckEffic()
Definition: CbmMuchFindVectorsQA.cxx:749
CbmMuchLayer::GetSide
CbmMuchLayerSide * GetSide(Bool_t side)
Definition: CbmMuchLayer.h:49
CbmMuchTrack
Definition: CbmMuchTrack.h:16
CbmMuchFindVectorsQA::fhRec
TH1D * fhRec
Definition: CbmMuchFindVectorsQA.h:87
CbmMuchDigiMatch
Definition: CbmMuchDigiMatch.h:17
CbmMuchFindVectorsQA::fhDtube
TH1D * fhDtube[7][10]
Definition: CbmMuchFindVectorsQA.h:82
CbmMuchFindVectorsQA::fGeoScheme
CbmMuchGeoScheme * fGeoScheme
Definition: CbmMuchFindVectorsQA.h:46
CbmCluster::GetNofDigis
Int_t GetNofDigis() const
Number of digis in cluster.
Definition: CbmCluster.h:69
CbmMuchFindVectorsQA::fhIdVsEv
TH2D ** fhIdVsEv
Definition: CbmMuchFindVectorsQA.h:77
CbmMuchPoint::GetYOut
Double_t GetYOut() const
Definition: CbmMuchPoint.h:74
CbmMuchCluster.h
Data container for MUCH clusters.
CbmMuchGeoScheme::GetLayerSideIndex
static Int_t GetLayerSideIndex(Int_t address)
Definition: CbmMuchGeoScheme.h:74
CbmMuchFindVectorsQA::CheckShorts
void CheckShorts(TClonesArray *hitArray)
Definition: CbmMuchFindVectorsQA.cxx:695
CbmMuchFindVectorsQA::fhDy
TH1D ** fhDy
Definition: CbmMuchFindVectorsQA.h:73
CbmMuchFindVectorsQA::Finish
virtual void Finish()
Definition: CbmMuchFindVectorsQA.cxx:924
CbmMuchFindVectorsQA::fhNhits
TH1D ** fhNhits
Definition: CbmMuchFindVectorsQA.h:65
CbmMuchGeoScheme::GetNStations
Int_t GetNStations() const
Definition: CbmMuchGeoScheme.h:79
CbmMuchGeoScheme::GetLayerIndex
static Int_t GetLayerIndex(Int_t address)
Definition: CbmMuchGeoScheme.h:71
CbmMuchGeoScheme::GetStationIndex
static Int_t GetStationIndex(Int_t address)
Definition: CbmMuchGeoScheme.h:68
CbmMuchFindVectorsQA::fhChi2mat
TH1D ** fhChi2mat
Definition: CbmMuchFindVectorsQA.h:88
CbmMuchFindVectorsQA::fhDtxOk
TH1D ** fhDtxOk
Definition: CbmMuchFindVectorsQA.h:80
CbmMuchPoint.h
CbmMuchFindVectorsQA::fZpos
Double_t fZpos[7][10]
Definition: CbmMuchFindVectorsQA.h:50
CbmMuchFindVectorsQA::fhNhitsOk
TH1D ** fhNhitsOk
Definition: CbmMuchFindVectorsQA.h:66
CbmMuchTrack.h
CbmMuchFindVectorsQA::fhDtube2
TH2D * fhDtube2[7][10]
Definition: CbmMuchFindVectorsQA.h:83
CbmMuchFindVectorsQA::fhMCFit
TH1D * fhMCFit[7][10]
Definition: CbmMuchFindVectorsQA.h:91
CbmMuchPoint::GetZOut
Double_t GetZOut() const
Definition: CbmMuchPoint.h:75
CbmMuchFindVectorsQA::fhDy23
TH2D ** fhDy23
Definition: CbmMuchFindVectorsQA.h:97
CbmMuchFindVectorsQA::fMCTracks
TClonesArray * fMCTracks
Definition: CbmMuchFindVectorsQA.h:53
CbmTrack::GetHitIndex
Int_t GetHitIndex(Int_t iHit) const
Definition: CbmTrack.h:54
CbmHit::GetAddress
Int_t GetAddress() const
Definition: CbmHit.h:73
CbmMuchFindVectorsQA::fhNgood
TH1D ** fhNgood
Definition: CbmMuchFindVectorsQA.h:68
CbmMuchFindVectorsQA::fhDtx
TH1D ** fhDtx
Definition: CbmMuchFindVectorsQA.h:74
CbmMuchFindVectorsQA
Definition: CbmMuchFindVectorsQA.h:22
CbmMuchFindVectorsQA::fNdoubl
Int_t fNdoubl[10]
Definition: CbmMuchFindVectorsQA.h:49
CbmMuchStation::GetDetectorId
Int_t GetDetectorId() const
Definition: CbmMuchStation.h:48
CbmMuchLayerSide
Definition: CbmMuchLayerSide.h:22
CbmMuchPoint::GetZIn
Double_t GetZIn() const
Definition: CbmMuchPoint.h:72
CbmMuchFindVectorsQA::~CbmMuchFindVectorsQA
virtual ~CbmMuchFindVectorsQA()
Definition: CbmMuchFindVectorsQA.cxx:46
CbmTrack::GetParamFirst
const FairTrackParam * GetParamFirst() const
Definition: CbmTrack.h:61
CbmMuchModule
Definition: CbmMuchModule.h:24
CbmMuchAddress::GetStationIndex
static Int_t GetStationIndex(Int_t address)
Definition: CbmMuchAddress.h:103
CbmMuchFindVectorsQA::SetParContainers
virtual void SetParContainers()
Definition: CbmMuchFindVectorsQA.cxx:109
CbmMuchFindVectorsQA::fhEvents
TH1D * fhEvents
transient histos
Definition: CbmMuchFindVectorsQA.h:93
CbmMuchFindVectorsQA::fhOverlap
TH2D ** fhOverlap
Definition: CbmMuchFindVectorsQA.h:85
CbmMuchFindVectorsQA::fClusters
TClonesArray * fClusters
Definition: CbmMuchFindVectorsQA.h:61
CbmMuchFindVectorsQA::fHitsGem
TClonesArray * fHitsGem
Definition: CbmMuchFindVectorsQA.h:56
CbmMuchModule::GetDetectorType
Int_t GetDetectorType() const
Definition: CbmMuchModule.h:52
CbmMuchFindVectorsQA::fhChi2bad
TH1D ** fhChi2bad
Definition: CbmMuchFindVectorsQA.h:71
CbmMuchFindVectorsQA::fNstat
Int_t fNstat
Definition: CbmMuchFindVectorsQA.h:48
CbmMuchFindVectorsQA::CbmMuchFindVectorsQA
CbmMuchFindVectorsQA()
Definition: CbmMuchFindVectorsQA.cxx:38
CbmHit
Definition: CbmHit.h:38
CbmMuchPoint::GetYIn
Double_t GetYIn() const
Definition: CbmMuchPoint.h:71
x
Double_t x
Definition: CbmMvdSensorDigiToHitTask.cxx:68
CbmMuchFindVectorsQA::fhDtxAll
TH1D ** fhDtxAll
Definition: CbmMuchFindVectorsQA.h:78
CbmMuchPixelHit.h
Class for pixel hits in MUCH detector.
y
Double_t y
Definition: CbmMvdSensorDigiToHitTask.cxx:68
CbmMuchPoint::GetXIn
Double_t GetXIn() const
Definition: CbmMuchPoint.h:70
ClassImp
ClassImp(CbmMuchFindVectorsQA)
CbmMuchGeoScheme::GetStation
CbmMuchStation * GetStation(Int_t iStation) const
Definition: CbmMuchGeoScheme.cxx:209
CbmMuchStation::GetNLayers
Int_t GetNLayers() const
Definition: CbmMuchStation.h:50
CbmMuchDigiMatch.h
CbmMuchFindVectorsQA::CheckMatch
Bool_t CheckMatch(CbmMuchTrack *vec)
Definition: CbmMuchFindVectorsQA.cxx:422
CbmMuchPixelHit
Definition: CbmMuchPixelHit.h:17
CbmMuchFindVectorsQA::fhDtyAll
TH1D ** fhDtyAll
Definition: CbmMuchFindVectorsQA.h:79
CbmMuchFindVectorsQA::fhDtyOk
TH1D ** fhDtyOk
Definition: CbmMuchFindVectorsQA.h:81
CbmMuchLayer
Definition: CbmMuchLayer.h:21
CbmMuchFindVectorsQA::fhNdoubl
TH1D ** fhNdoubl
Definition: CbmMuchFindVectorsQA.h:64
CbmMuchLayerSide::GetZ
Double_t GetZ()
Definition: CbmMuchLayerSide.h:49
CbmMuchFindVectorsQA::fhShort
TH1D ** fhShort
Definition: CbmMuchFindVectorsQA.h:84
CbmMuchFindVectorsQA::fDigis
TClonesArray * fDigis
Definition: CbmMuchFindVectorsQA.h:57
CbmMuchGeoScheme::GetModuleByDetId
CbmMuchModule * GetModuleByDetId(Int_t detId) const
Definition: CbmMuchGeoScheme.cxx:278
PairAnalysisStyler::Fill
static Int_t Fill[]
Definition: PairAnalysisStyleDefs.h:82
CbmMuchStation.h
CbmCluster::GetDigi
Int_t GetDigi(Int_t index) const
Get digi at position index.
Definition: CbmCluster.h:76
CbmMuchFindVectorsQA::fhIds
TH1D ** fhIds
Definition: CbmMuchFindVectorsQA.h:76
CbmMuchFindVectorsQA::fHits
TClonesArray * fHits
Definition: CbmMuchFindVectorsQA.h:55
CbmMuchFindVectorsQA::fhMatchMult
TH1D ** fhMatchMult
Definition: CbmMuchFindVectorsQA.h:89
CbmMuchFindVectorsQA::fhNghost
TH1D ** fhNghost
Definition: CbmMuchFindVectorsQA.h:69
CbmMuchFindVectorsQA::fDigiMatches
TClonesArray * fDigiMatches
Definition: CbmMuchFindVectorsQA.h:59
CbmMuchFindVectorsQA::fhNvec
TH1D ** fhNvec
Definition: CbmMuchFindVectorsQA.h:63
CbmMuchFindVectorsQA.h