AliRoot Core  3dc7879 (3dc7879)
AliMUONESDInterface.cxx
Go to the documentation of this file.
1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15 
16 // $Id$
17 
18 #include "AliMUONESDInterface.h"
19 #include "AliMUONTrack.h"
20 #include "AliMUONVTrackStore.h"
21 #include "AliMUONVCluster.h"
22 #include "AliMUONVClusterStore.h"
23 #include "AliMUONVDigit.h"
24 #include "AliMUONVDigitStore.h"
25 #include "AliMUONLocalTrigger.h"
26 #include "AliMUONTriggerTrack.h"
27 #include "AliMUONVTriggerStore.h"
29 #include "AliMUON2DMapIterator.h"
30 #include "AliMUONTrackParam.h"
31 #include "AliMUONTrackExtrap.h"
32 #include "AliMUONConstants.h"
33 #include "AliMUONTracker.h"
34 #include "AliMUONRecoParam.h"
36 #include "AliMUONCDB.h"
37 
38 #include "AliMpExMapIterator.h"
39 #include "AliMpVSegmentation.h"
40 #include "AliMpSegmentation.h"
41 #include "AliMpPad.h"
42 
43 #include "AliESDEvent.h"
44 #include "AliESDMuonTrack.h"
45 #include "AliESDMuonCluster.h"
46 #include "AliESDMuonPad.h"
47 #include "AliLog.h"
48 
49 #include <TROOT.h>
50 #include <TClass.h>
51 #include <TIterator.h>
52 #include <TMath.h>
53 #include <TMatrixD.h>
54 #include <Riostream.h>
55 #include <TGeoGlobalMagField.h>
56 #include <TVirtualMagField.h>
57 
58 //-----------------------------------------------------------------------------
73 //-----------------------------------------------------------------------------
74 
75 using std::endl;
76 using std::cout;
78 ClassImp(AliMUONESDInterface)
80 
81 AliMUONRecoParam* AliMUONESDInterface::fgRecoParam = 0x0;
83 
84 TString AliMUONESDInterface::fgTrackStoreName = "AliMUONTrackStoreV1";
85 TString AliMUONESDInterface::fgClusterStoreName = "AliMUONClusterStoreV2";
86 TString AliMUONESDInterface::fgDigitStoreName = "AliMUONDigitStoreV2R";
87 TString AliMUONESDInterface::fgTriggerStoreName = "AliMUONTriggerStoreV1";
88 TString AliMUONESDInterface::fgTriggerTrackStoreName = "AliMUONTriggerTrackStoreV1";
89 
90 //_____________________________________________________________________________
92 : TObject(),
93 fTracks(0x0),
94 fDigits(0x0),
95 fTriggers(0x0),
96 fClusterMap(0x0),
97 fDigitMap(0x0)
98 {
100 }
101 
102 //_____________________________________________________________________________
104 {
106  delete fTracks;
107  delete fDigits;
108  delete fTriggers;
109  delete fClusterMap;
110  delete fDigitMap;
111 }
112 
113 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
114 // methods to play with internal objects //
115 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
116 
117 //_____________________________________________________________________________
119 {
121  delete fTracks; fTracks = 0x0;
122  delete fDigits; fDigits = 0x0;
123  delete fTriggers; fTriggers = 0x0;
124  delete fClusterMap; fClusterMap = 0x0;
125  delete fDigitMap; fDigitMap = 0x0;
126 }
127 
128 //_____________________________________________________________________________
130 {
132 
133  if (fTracks) fTracks->Clear("C");
134  else fTracks = NewTrackStore();
135 
136  if (fDigits) fDigits->Clear("C");
137  else fDigits = NewDigitStore();
138 
139  if (fTriggers) fTriggers->Clear("C");
140  else fTriggers = NewTriggerStore();
141 
142  if (fClusterMap) fClusterMap->Clear();
143  else fClusterMap = new AliMpExMap;
144  fClusterMap->SetOwner(kTRUE);
145 
146  if (fDigitMap) fDigitMap->Clear();
147  else fDigitMap = new AliMpExMap;
148  fDigitMap->SetOwner(kTRUE);
149 }
150 
151 //_____________________________________________________________________________
152 void AliMUONESDInterface::LoadEvent(AliESDEvent& esdEvent, Bool_t refit)
153 {
155 
156  // reset data members
157  Reset();
158 
159  // loop over ESD pads and fill the digit store
160  for (Int_t iPad = 0; iPad < esdEvent.GetNumberOfMuonPads(); iPad++)
161  Add(*(esdEvent.GetMuonPad(iPad)), *fDigits);
162 
163  // loop over ESD tracks and fill the stores
164  for (Int_t iTrack = 0; iTrack < esdEvent.GetNumberOfMuonTracks(); iTrack++) {
165 
166  // get ESD track
167  AliESDMuonTrack* esdTrack = esdEvent.GetMuonTrack(iTrack);
168 
169  // fill trigger store if related info are availables
170  if (esdTrack->ContainTriggerData()) Add(*esdTrack, *fTriggers);
171 
172  // fill tracker data if availables
173  if (!esdTrack->ContainTrackerData()) continue;
174 
175  // add it to track store
176  AliMUONTrack* track = Add(*esdTrack, *fTracks, refit);
177 
178  // prepare cluster map
179  AliMpExMap* cMap = new AliMpExMap;
180  cMap->SetOwner(kFALSE);
181  fClusterMap->Add(esdTrack->GetUniqueID(), cMap);
182 
183  // prepare digit maps
184  AliMpExMap* dMaps = new AliMpExMap;
185  dMaps->SetOwner(kTRUE);
186  fDigitMap->Add(esdTrack->GetUniqueID(), dMaps);
187 
188  // loop over clusters
189  for (Int_t iCluster = 0; iCluster < track->GetNClusters(); iCluster++) {
190 
191  // get cluster
192  AliMUONVCluster* cluster = ((AliMUONTrackParam*)track->GetTrackParamAtCluster()->UncheckedAt(iCluster))->GetClusterPtr();
193 
194  // fill cluster map
195  cMap->Add(cluster->GetUniqueID(), cluster);
196 
197  // prepare digit map
198  AliMpExMap* dMap =new AliMpExMap;
199  dMap->SetOwner(kFALSE);
200  dMaps->Add(cluster->GetUniqueID(), dMap);
201 
202  // loop over digits
203  for (Int_t iDigit = 0; iDigit < cluster->GetNDigits(); iDigit++) {
204 
205  // find the digit
206  AliMUONVDigit* digit = fDigits->FindObject(cluster->GetDigitId(iDigit));
207 
208  // fill digit map
209  if (digit) dMap->Add(digit->GetUniqueID(), digit);
210  else AliError("a digit is missing");
211 
212  } // end of loop over pads
213 
214  } // end of loop over clusters
215 
216  } // end of loop over tracks
217 
218 }
219 
220 //___________________________________________________________________________
222 {
224  return fTracks ? fTracks->GetSize() : 0;
225 }
226 
227 //___________________________________________________________________________
229 {
231  Int_t nClusters = 0;
233  TIter next(CreateTrackIterator());
234  while ((track = static_cast<AliMUONTrack*>(next()))) nClusters += track->GetNClusters();
235  return nClusters;
236 }
237 
238 //___________________________________________________________________________
239 Int_t AliMUONESDInterface::GetNClusters(UInt_t trackId) const
240 {
242  AliMUONTrack* track = FindTrack(trackId);
243  return track ? track->GetNClusters() : 0;
244 }
245 
246 //___________________________________________________________________________
248 {
250  return fDigits ? fDigits->GetSize() : 0;
251 }
252 
253 //___________________________________________________________________________
254 Int_t AliMUONESDInterface::GetNDigits(UInt_t trackId) const
255 {
257  Int_t nDigits = 0;
258  AliMUONVCluster *cluster;
259  TIter next(CreateClusterIterator(trackId));
260  while ((cluster = static_cast<AliMUONVCluster*>(next()))) nDigits += cluster->GetNDigits();
261  return nDigits;
262 }
263 
264 //___________________________________________________________________________
265 Int_t AliMUONESDInterface::GetNDigits(UInt_t trackId, UInt_t clusterId) const
266 {
268  AliMUONVCluster* cluster = FindCluster(trackId, clusterId);
269  return cluster ? cluster->GetNDigits() : 0;
270 }
271 
272 //___________________________________________________________________________
273 Int_t AliMUONESDInterface::GetNDigitsInCluster(UInt_t clusterId) const
274 {
276  AliMUONVCluster* cluster = FindCluster(clusterId);
277  return cluster ? cluster->GetNDigits() : 0;
278 }
279 
280 //___________________________________________________________________________
282 {
284  return fTriggers ? fTriggers->GetSize() : 0;
285 }
286 
287 //___________________________________________________________________________
288 Bool_t AliMUONESDInterface::DigitsStored(UInt_t trackId) const
289 {
291  AliMUONVCluster *cluster;
292  TIter next(CreateClusterIterator(trackId));
293  while ((cluster = static_cast<AliMUONVCluster*>(next())))
294  if (cluster->GetNDigits() == 0) return kFALSE;
295  return kTRUE;
296 }
297 
298 //___________________________________________________________________________
300 {
302  AliMUONTrack *track = fTracks ? static_cast<AliMUONTrack*>(fTracks->FindObject(trackId)) : 0x0;
303  if (!track) AliWarning(Form("track %d does not exist",trackId));
304  return track;
305 }
306 
307 //___________________________________________________________________________
309 {
311  AliMpExMap *cMap;
312  AliMUONVCluster* cluster = 0x0;
313 
314  if (fClusterMap) {
315 
316  TIter next(fClusterMap->CreateIterator());
317  while ((cMap = static_cast<AliMpExMap*>(next()))) {
318 
319  cluster = static_cast<AliMUONVCluster*>(cMap->GetValue(clusterId));
320  if (cluster) return cluster;
321 
322  }
323 
324  }
325 
326  if (!cluster) AliWarning(Form("cluster %d does not exist",clusterId));
327  return 0x0;
328 }
329 
330 //___________________________________________________________________________
331 AliMUONVCluster* AliMUONESDInterface::FindCluster(UInt_t trackId, UInt_t clusterId) const
332 {
334  AliMpExMap *cMap = fClusterMap ? static_cast<AliMpExMap*>(fClusterMap->GetValue(trackId)) : 0x0;
335  AliMUONVCluster* cluster = cMap ? static_cast<AliMUONVCluster*>(cMap->GetValue(clusterId)) : 0x0;
336  if (!cluster) AliWarning(Form("cluster %d does not exist in track %d", clusterId, trackId));
337  return cluster;
338 }
339 
340 //___________________________________________________________________________
342 {
344  AliMUONVDigit *digit = fDigits ? fDigits->FindObject(digitId) : 0x0;
345  if (!digit) AliWarning(Form("digit %d does not exist",digitId));
346  return digit;
347 }
348 
349 //___________________________________________________________________________
351 {
353  return (fTriggers) ? fTriggers->FindLocal(boardNumber) : 0x0;
354 }
355 
356 //___________________________________________________________________________
358 {
360  return fTracks ? fTracks->CreateIterator() : 0x0;
361 }
362 
363 //___________________________________________________________________________
365 {
367  return fClusterMap ? new AliMUON2DMapIterator(*fClusterMap) : 0x0;
368 }
369 
370 //___________________________________________________________________________
371 TIterator* AliMUONESDInterface::CreateClusterIterator(UInt_t trackId) const
372 {
374  AliMpExMap *cMap = fClusterMap ? static_cast<AliMpExMap*>(fClusterMap->GetValue(trackId)) : 0x0;
375  return cMap ? cMap->CreateIterator() : 0x0;
376 }
377 
378 //___________________________________________________________________________
380 {
382  return fDigits ? fDigits->CreateIterator() : 0x0;
383 }
384 
385 //___________________________________________________________________________
386 TIterator* AliMUONESDInterface::CreateDigitIterator(UInt_t trackId) const
387 {
389  AliMpExMap* dMaps = fDigitMap ? static_cast<AliMpExMap*>(fDigitMap->GetValue(trackId)) : 0x0;
390  return dMaps ? new AliMUON2DMapIterator(*dMaps) : 0x0;
391 }
392 
393 //___________________________________________________________________________
394 TIterator* AliMUONESDInterface::CreateDigitIterator(UInt_t trackId, UInt_t clusterId) const
395 {
397  AliMpExMap* dMaps = fDigitMap ? static_cast<AliMpExMap*>(fDigitMap->GetValue(trackId)) : 0x0;
398  AliMpExMap* dMap = dMaps ? static_cast<AliMpExMap*>(dMaps->GetValue(clusterId)) : 0x0;
399  return dMap ? dMap->CreateIterator() : 0x0;
400 }
401 
402 //___________________________________________________________________________
403 TIterator* AliMUONESDInterface::CreateDigitIteratorInCluster(UInt_t clusterId) const
404 {
406  AliMpExMap *dMaps;
407  AliMpExMap* dMap = 0x0;
408 
409  if (fDigitMap) {
410 
411  TIter next(fDigitMap->CreateIterator());
412  while ((dMaps = static_cast<AliMpExMap*>(next()))) {
413 
414  dMap = static_cast<AliMpExMap*>(dMaps->GetValue(clusterId));
415  if (dMap) return dMap->CreateIterator();
416 
417  }
418 
419  }
420 
421  return 0x0;
422 }
423 
424 //___________________________________________________________________________
426 {
428  return fTriggers ? fTriggers->CreateLocalIterator() : 0x0;
429 }
430 
431 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
432 // static methods //
433 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
434 
435 //_____________________________________________________________________________
437 {
441 
442  delete fgTracker;
443  delete fgRecoParam;
444 
445  if (recoParam) {
446 
447  // use provided recoParam
448  fgRecoParam = new AliMUONRecoParam(*recoParam);
449 
450  if (info) AliInfoClass("will refit tracks with provided RecoParam:");
451 
452  } else {
453 
454  // or get them from OCDB
456 
457  if (!fgRecoParam) AliFatalClass("RecoParam have not been set!");
458 
459  }
460 
461  // print useful parameters for refitting
462  if (info) {
463  cout<<" --> Tracking mode = "<<fgRecoParam->GetTrackingMode()<<endl;
464  if (fgRecoParam->UseSmoother()) cout<<" --> Use Smoother"<<endl;
465  else cout<<" --> Do not use smoother"<<endl;
466  cout<<" --> Vertex dispersion in bending direction = "
467  <<fgRecoParam->GetBendingVertexDispersion()<<" cm"<<endl;
468  }
469 
470  // load magnetic field for track extrapolation if not already set
471  if (!TGeoGlobalMagField::Instance()->GetField() && !AliMUONCDB::LoadField())
472  AliFatalClass("Magnetic field has not been set!");
473 
475 
476 }
477 
478 //_____________________________________________________________________________
480 {
482  TClass* classPtr = TClass::GetClass(fgTrackStoreName);
483  if (!classPtr || !classPtr->InheritsFrom("AliMUONVTrackStore")) {
484  AliErrorClass(Form("Unable to create store of type %s", fgTrackStoreName.Data()));
485  return 0x0;
486  }
487  return reinterpret_cast<AliMUONVTrackStore*>(gROOT->ProcessLineFast(Form("new %s()",fgTrackStoreName.Data())));
488 }
489 
490 //_____________________________________________________________________________
492 {
494  TClass* classPtr = TClass::GetClass(fgClusterStoreName);
495  if (!classPtr || !classPtr->InheritsFrom("AliMUONVClusterStore")) {
496  AliErrorClass(Form("Unable to create store of type %s", fgClusterStoreName.Data()));
497  return 0x0;
498  }
499  return reinterpret_cast<AliMUONVClusterStore*>(gROOT->ProcessLineFast(Form("new %s()",fgClusterStoreName.Data())));
500 }
501 
502 //_____________________________________________________________________________
504 {
506  TClass* classPtr = TClass::GetClass(fgClusterStoreName);
507  if (!classPtr || !classPtr->InheritsFrom("AliMUONVClusterStore")) {
508  AliErrorClass(Form("Unable to create store of type %s", fgClusterStoreName.Data()));
509  return 0x0;
510  }
511  AliMUONVClusterStore* cStore = reinterpret_cast<AliMUONVClusterStore*>(classPtr->New());
512  AliMUONVCluster* cluster = cStore->CreateCluster(0,0,0);
513  delete cStore;
514  return cluster;
515 }
516 
517 //_____________________________________________________________________________
519 {
521  TClass* classPtr = TClass::GetClass(fgDigitStoreName);
522  if (!classPtr || !classPtr->InheritsFrom("AliMUONVDigitStore")) {
523  AliErrorClass(Form("Unable to create store of type %s", fgDigitStoreName.Data()));
524  return 0x0;
525  }
526  return reinterpret_cast<AliMUONVDigitStore*>(gROOT->ProcessLineFast(Form("new %s()",fgDigitStoreName.Data())));
527 }
528 
529 //_____________________________________________________________________________
531 {
533  TClass* classPtr = TClass::GetClass(fgDigitStoreName);
534  if (!classPtr || !classPtr->InheritsFrom("AliMUONVDigitStore")) {
535  AliErrorClass(Form("Unable to create store of type %s", fgDigitStoreName.Data()));
536  return 0x0;
537  }
538  AliMUONVDigitStore* dStore = reinterpret_cast<AliMUONVDigitStore*>(classPtr->New());
539  AliMUONVDigit* digit = dStore->CreateDigit(0,0,0,0);
540  delete dStore;
541  return digit;
542 }
543 
544 //_____________________________________________________________________________
546 {
548  TClass* classPtr = TClass::GetClass(fgTriggerStoreName);
549  if (!classPtr || !classPtr->InheritsFrom("AliMUONVTriggerStore")) {
550  AliErrorClass(Form("Unable to create store of type %s", fgTriggerStoreName.Data()));
551  return 0x0;
552  }
553  return reinterpret_cast<AliMUONVTriggerStore*>(gROOT->ProcessLineFast(Form("new %s()",fgTriggerStoreName.Data())));
554 }
555 
556 //_____________________________________________________________________________
558 {
560  TClass* classPtr = TClass::GetClass(fgTriggerTrackStoreName);
561  if (!classPtr || !classPtr->InheritsFrom("AliMUONVTriggerTrackStore")) {
562  AliErrorClass(Form("Unable to create store of type %s", fgTriggerTrackStoreName.Data()));
563  return 0x0;
564  }
565  return reinterpret_cast<AliMUONVTriggerTrackStore*>(gROOT->ProcessLineFast(Form("new %s()",fgTriggerTrackStoreName.Data())));
566 }
567 
568 //_________________________________________________________________________
570 {
572  trackParam.SetZ(esdTrack.GetZ());
573  trackParam.SetNonBendingCoor(esdTrack.GetNonBendingCoor());
574  trackParam.SetNonBendingSlope(TMath::Tan(esdTrack.GetThetaX()));
575  trackParam.SetBendingCoor(esdTrack.GetBendingCoor());
576  trackParam.SetBendingSlope(TMath::Tan(esdTrack.GetThetaY()));
578 }
579 
580 //_________________________________________________________________________
582 {
584  trackParam.SetZ(esdTrack.GetZ());
585  trackParam.SetNonBendingCoor(esdTrack.GetNonBendingCoorAtDCA());
586  trackParam.SetNonBendingSlope(TMath::Tan(esdTrack.GetThetaXAtDCA()));
587  trackParam.SetBendingCoor(esdTrack.GetBendingCoorAtDCA());
588  trackParam.SetBendingSlope(TMath::Tan(esdTrack.GetThetaYAtDCA()));
590 }
591 
592 //_________________________________________________________________________
594 {
596  trackParam.SetZ(esdTrack.GetZUncorrected());
597  trackParam.SetNonBendingCoor(esdTrack.GetNonBendingCoorUncorrected());
598  trackParam.SetNonBendingSlope(TMath::Tan(esdTrack.GetThetaXUncorrected()));
599  trackParam.SetBendingCoor(esdTrack.GetBendingCoorUncorrected());
600  trackParam.SetBendingSlope(TMath::Tan(esdTrack.GetThetaYUncorrected()));
602 }
603 
604 //_________________________________________________________________________
606 {
608 
609  // get ESD covariance matrix
610  TMatrixD covariances(5,5);
611  esdTrack.GetCovariances(covariances);
612 
613  // compute Jacobian to change the coordinate system
614  // from (X,thetaX,Y,thetaY,c/pYZ) to (X,slopeX,Y,slopeY,c/pYZ)
615  Double_t cosThetaX = TMath::Cos(esdTrack.GetThetaXUncorrected());
616  Double_t cosThetaY = TMath::Cos(esdTrack.GetThetaYUncorrected());
617  TMatrixD jacob(5,5);
618  jacob.Zero();
619  jacob(0,0) = 1.;
620  jacob(1,1) = 1. / cosThetaX / cosThetaX;
621  jacob(2,2) = 1.;
622  jacob(3,3) = 1. / cosThetaY / cosThetaY;
623  jacob(4,4) = 1.;
624 
625  // compute covariance matrix in ESD coordinate system
626  TMatrixD tmp(covariances,TMatrixD::kMultTranspose,jacob);
627  trackParam.SetCovariances(TMatrixD(jacob,TMatrixD::kMult,tmp));
628 
629 }
630 
631 //_________________________________________________________________________
633 {
635  esdTrack.SetZ(trackParam.GetZ());
636  esdTrack.SetNonBendingCoor(trackParam.GetNonBendingCoor());
637  esdTrack.SetThetaX(TMath::ATan(trackParam.GetNonBendingSlope()));
638  esdTrack.SetBendingCoor(trackParam.GetBendingCoor());
639  esdTrack.SetThetaY(TMath::ATan(trackParam.GetBendingSlope()));
641 }
642 
643 //_________________________________________________________________________
645 {
647  esdTrack.SetNonBendingCoorAtDCA(trackParam.GetNonBendingCoor());
648  esdTrack.SetThetaXAtDCA(TMath::ATan(trackParam.GetNonBendingSlope()));
649  esdTrack.SetBendingCoorAtDCA(trackParam.GetBendingCoor());
650  esdTrack.SetThetaYAtDCA(TMath::ATan(trackParam.GetBendingSlope()));
652 }
653 
654 //_________________________________________________________________________
656 {
658  esdTrack.SetZUncorrected(trackParam.GetZ());
659  esdTrack.SetNonBendingCoorUncorrected(trackParam.GetNonBendingCoor());
660  esdTrack.SetThetaXUncorrected(TMath::ATan(trackParam.GetNonBendingSlope()));
661  esdTrack.SetBendingCoorUncorrected(trackParam.GetBendingCoor());
662  esdTrack.SetThetaYUncorrected(TMath::ATan(trackParam.GetBendingSlope()));
664 }
665 
666 //_________________________________________________________________________
668 {
670 
671  // set null matrix if covariances does not exist
672  if (!trackParam.CovariancesExist()) {
673  TMatrixD tmp(5,5);
674  tmp.Zero();
675  esdTrack.SetCovariances(tmp);
676  return;
677  }
678 
679  // compute Jacobian to change the coordinate system
680  // from (X,slopeX,Y,slopeY,c/pYZ) to (X,thetaX,Y,thetaY,c/pYZ)
681  Double_t cosThetaX = TMath::Cos(TMath::ATan(trackParam.GetNonBendingSlope()));
682  Double_t cosThetaY = TMath::Cos(TMath::ATan(trackParam.GetBendingSlope()));
683  TMatrixD jacob(5,5);
684  jacob.Zero();
685  jacob(0,0) = 1.;
686  jacob(1,1) = cosThetaX * cosThetaX;
687  jacob(2,2) = 1.;
688  jacob(3,3) = cosThetaY * cosThetaY;
689  jacob(4,4) = 1.;
690 
691  // compute covariance matrix in ESD coordinate system
692  TMatrixD tmp(trackParam.GetCovariances(),TMatrixD::kMultTranspose,jacob);
693  esdTrack.SetCovariances(TMatrixD(jacob,TMatrixD::kMult,tmp));
694 
695 }
696 
697 //_____________________________________________________________________________
699 {
707 
708  // if the ESDMuon track is a ghost then return an empty MUON track
709  if (!esdTrack.ContainTrackerData()) {
710  track.Reset();
711  track.SetUniqueID(esdTrack.GetUniqueID());
712  return;
713  }
714 
715  track.Clear("C");
716 
717  // global info
718  track.SetUniqueID(esdTrack.GetUniqueID());
719  track.FitWithVertex(kFALSE);
720  track.FitWithMCS(kFALSE);
721  track.SetImproved(kFALSE);
722  track.SetVertexErrXY2(0.,0.);
723  track.SetGlobalChi2(esdTrack.GetChi2());
724  track.SetMatchTrigger(esdTrack.GetMatchTrigger());
725  track.SetChi2MatchTrigger(esdTrack.GetChi2MatchTrigger());
728  track.SetLocalTrigger(esdTrack.LoCircuit(), esdTrack.LoStripX(), esdTrack.LoStripY(),
729  esdTrack.LoDev(), esdTrack.LoLpt(), esdTrack.LoHpt(),
730  esdTrack.GetTriggerWithoutChamber());
731  track.Connected(esdTrack.IsConnected());
732 
733  // track parameters at vertex
734  AliMUONTrackParam paramAtVertex;
735  GetParamAtVertex(esdTrack, paramAtVertex);
736  track.SetTrackParamAtVertex(&paramAtVertex);
737 
738  // track parameters at first cluster
739  AliMUONTrackParam param;
740  GetParamAtFirstCluster(esdTrack, param);
741  GetParamCov(esdTrack, param);
742 
743  // create empty cluster
744  AliMUONVCluster* cluster = NewCluster();
745 
746  // fill TrackParamAtCluster with track parameters at each cluster if available
747  Bool_t clusterFound = kFALSE;
748  if(esdTrack.GetESDEvent()) {
749 
750  // loop over cluster Id
751  for (Int_t i = 0; i < esdTrack.GetNClusters(); i++) {
752 
753  // recover the ESDMuon cluster
754  AliESDMuonCluster *esdCluster = esdTrack.GetESDEvent()->FindMuonCluster(esdTrack.GetClusterId(i));
755  if (esdCluster) clusterFound = kTRUE;
756  else {
757  AliErrorClass("a cluster is missing in ESD");
758  continue;
759  }
760 
761  // copy cluster information
762  ESDToMUON(*esdCluster, *cluster);
763 
764  // only set the Z parameter to avoid error in the AddTrackParamAtCluster(...) method
765  param.SetZ(cluster->GetZ());
766 
767  // add common track parameters at current cluster
768  track.AddTrackParamAtCluster(param, *cluster, kTRUE);
769 
770  }
771 
772  // refit the track to get better parameters and covariances at each cluster (temporary disable track improvement)
773  if (clusterFound && refit) {
774 
775  AliMUONTrackParam *firstTrackParam = (AliMUONTrackParam*) track.GetTrackParamAtCluster()->First();
776  AliMUONTrackParam paramSave(*firstTrackParam);
777 
778  if (!fgTracker) ResetTracker();
779 
780  if (!fgTracker->RefitTrack(track, kFALSE) && track.GetGlobalChi2() < AliMUONTrack::MaxChi2()) {
781  *firstTrackParam = paramSave;
783  }
784 
785  }
786 
787  }
788 
789  // fill TrackParamAtCluster with only track parameters at first (fake) cluster if no cluster found in ESD
790  if (!clusterFound) {
791 
792  // get number of the first hit chamber according to the MUONClusterMap
793  Int_t firstCh = 0;
794  while (firstCh < 10 && !esdTrack.IsInMuonClusterMap(firstCh)) firstCh++;
795 
796  // produce fake cluster at this chamber
797  cluster->SetUniqueID(AliMUONVCluster::BuildUniqueID(firstCh, 0, 0));
798  cluster->SetXYZ(param.GetNonBendingCoor(), param.GetBendingCoor(), param.GetZ());
799  cluster->SetErrXY(0., 0.);
800 
801  // add track parameters at first (fake) cluster
802  track.AddTrackParamAtCluster(param, *cluster, kTRUE);
803 
804  }
805 
806  // set the MC label from ESD track
807  track.SetMCLabel(esdTrack.GetLabel());
808 
809  delete cluster;
810 
811 }
812 
813 //_____________________________________________________________________________
815 {
817 
818  // reset the local trigger content
819  AliMUONLocalTrigger emptyLocTrg;
820  locTrg = emptyLocTrg;
821 
822  // if the ESDMuon track is a ghost then return an empty local trigger
823  if (!esdTrack.ContainTriggerData()) return;
824 
825  locTrg.SetUniqueID(esdTrack.GetUniqueID());
826  locTrg.SetLoCircuit(esdTrack.LoCircuit());
827  locTrg.SetLoStripX(esdTrack.LoStripX());
828  locTrg.SetLoStripY(esdTrack.LoStripY());
829  locTrg.SetDeviation(esdTrack.LoDev());
830  locTrg.SetLoLpt(esdTrack.LoLpt());
831  locTrg.SetLoHpt(esdTrack.LoHpt());
832  for (Int_t ich = 0; ich < 4; ich++)
833  if (esdTrack.TriggerFiredWithoutChamber(ich))
834  locTrg.SetTriggerWithoutChamber(ich);
835  locTrg.SetLoTrigY(0);
836  locTrg.SetX1Pattern(esdTrack.GetTriggerX1Pattern());
837  locTrg.SetX2Pattern(esdTrack.GetTriggerX2Pattern());
838  locTrg.SetX3Pattern(esdTrack.GetTriggerX3Pattern());
839  locTrg.SetX4Pattern(esdTrack.GetTriggerX4Pattern());
840  locTrg.SetY1Pattern(esdTrack.GetTriggerY1Pattern());
841  locTrg.SetY2Pattern(esdTrack.GetTriggerY2Pattern());
842  locTrg.SetY3Pattern(esdTrack.GetTriggerY3Pattern());
843  locTrg.SetY4Pattern(esdTrack.GetTriggerY4Pattern());
844 
845 }
846 
847 //_____________________________________________________________________________
849 {
851 
852  cluster.Clear("C");
853 
854  cluster.SetUniqueID(esdCluster.GetUniqueID());
855  cluster.SetXYZ(esdCluster.GetX(), esdCluster.GetY(), esdCluster.GetZ());
856  cluster.SetErrXY(esdCluster.GetErrX(),esdCluster.GetErrY());
857  cluster.SetCharge(esdCluster.GetCharge());
858  cluster.SetChi2(esdCluster.GetChi2());
859  cluster.SetMCLabel(esdCluster.GetLabel());
860 
861  cluster.SetDigitsId(esdCluster.GetNPads(), esdCluster.GetPadsId());
862 
863 }
864 
865 //___________________________________________________________________________
867 {
870 
872  AliFatalClass("mapping segmentation has not been set!");
873 
875  AliMpPad pad = seg->PadByLocation(esdPad.GetManuId(), esdPad.GetManuChannel(), kFALSE);
876 
877  digit.Saturated(esdPad.IsSaturated());
878  digit.Used(kFALSE);
879  digit.Calibrated(esdPad.IsCalibrated());
880  digit.SetUniqueID(esdPad.GetUniqueID());
881  digit.SetCharge(esdPad.GetCharge());
882  digit.SetADC(esdPad.GetADC());
883  digit.SetPadXY(pad.GetIx(), pad.GetIy());
884 
885 }
886 
887 //_____________________________________________________________________________
888 void AliMUONESDInterface::MUONToESD(const AliMUONTrack& track, AliESDEvent& esd, const Double_t vertex[3],
889  const AliMUONVDigitStore* digits, const AliMUONLocalTrigger* locTrg)
890 {
894 
895  // transfert track info
896  AliESDMuonTrack *esdTrack = esd.NewMuonTrack();
897  MUONToESD(track, *esdTrack, vertex, locTrg);
898 
899  // transfert cluster info if any
900  for (Int_t i = 0; i < track.GetNClusters(); i++) {
901  AliMUONTrackParam *param = static_cast<AliMUONTrackParam*>(track.GetTrackParamAtCluster()->UncheckedAt(i));
902  MUONToESD(*(param->GetClusterPtr()), esd, digits);
903  }
904 
905 }
906 
907 //_____________________________________________________________________________
909  const Double_t vertex[3], const AliMUONLocalTrigger* locTrg)
910 {
913 
914  // empty MUON track -> produce a ghost ESDMuon track if trigger info are available otherwise produce an empty track
915  if (track.GetNClusters() == 0) {
916  if (locTrg) MUONToESD(*locTrg, esdTrack, track.GetUniqueID());
917  else {
918  cout<<"W-AliMUONESDInterface::MUONToESD: will produce an empty ESDMuon track"<<endl;
919  esdTrack.Reset();
920  esdTrack.SetUniqueID(0xFFFFFFFF);
921  }
922  return;
923  }
924 
925  esdTrack.Clear("C");
926 
927  // set global info
928  esdTrack.SetUniqueID(track.GetUniqueID());
929  esdTrack.SetChi2(track.GetGlobalChi2());
930  esdTrack.SetLabel(track.GetMCLabel());
931 
932  // set param at first cluster
933  AliMUONTrackParam* trackParam = static_cast<AliMUONTrackParam*>((track.GetTrackParamAtCluster())->First());
934  SetParamAtFirstCluster(*trackParam, esdTrack);
935  SetParamCov(*trackParam, esdTrack);
936 
937  // set transverse position at the end of the absorber
938  AliMUONTrackParam trackParamAtAbsEnd(*trackParam);
940  Double_t xAbs = trackParamAtAbsEnd.GetNonBendingCoor();
941  Double_t yAbs = trackParamAtAbsEnd.GetBendingCoor();
942  esdTrack.SetRAtAbsorberEnd(TMath::Sqrt(xAbs*xAbs + yAbs*yAbs));
943 
944  // set param at vertex
945  AliMUONTrackParam trackParamAtVtx(*trackParam);
946  AliMUONTrackExtrap::ExtrapToVertex(&trackParamAtVtx, vertex[0], vertex[1], vertex[2], 0., 0.);
947  SetParamAtVertex(trackParamAtVtx, esdTrack);
948 
949  // set param at Distance of Closest Approach
950  AliMUONTrackParam trackParamAtDCA(*trackParam);
951  AliMUONTrackExtrap::ExtrapToVertexWithoutBranson(&trackParamAtDCA, vertex[2]);
952  SetParamAtDCA(trackParamAtDCA, esdTrack);
953 
954  // set muon cluster info
955  esdTrack.SetMuonClusterMap(0);
956  while (trackParam) {
957  AliMUONVCluster *cluster = trackParam->GetClusterPtr();
958  esdTrack.AddClusterId(cluster->GetUniqueID());
959  esdTrack.AddInMuonClusterMap(cluster->GetChamberId());
960  trackParam = static_cast<AliMUONTrackParam*>(track.GetTrackParamAtCluster()->After(trackParam));
961  }
962 
963  // set connected flag
964  esdTrack.Connected(track.IsConnected());
965 
966  // set trigger info
967  esdTrack.SetLocalTrigger(track.GetLocalTrigger());
968  esdTrack.SetChi2MatchTrigger(track.GetChi2MatchTrigger());
971  if (locTrg) {
972  esdTrack.SetTriggerX1Pattern(locTrg->GetX1Pattern());
973  esdTrack.SetTriggerY1Pattern(locTrg->GetY1Pattern());
974  esdTrack.SetTriggerX2Pattern(locTrg->GetX2Pattern());
975  esdTrack.SetTriggerY2Pattern(locTrg->GetY2Pattern());
976  esdTrack.SetTriggerX3Pattern(locTrg->GetX3Pattern());
977  esdTrack.SetTriggerY3Pattern(locTrg->GetY3Pattern());
978  esdTrack.SetTriggerX4Pattern(locTrg->GetX4Pattern());
979  esdTrack.SetTriggerY4Pattern(locTrg->GetY4Pattern());
980  } else {
981  esdTrack.SetTriggerX1Pattern(0);
982  esdTrack.SetTriggerY1Pattern(0);
983  esdTrack.SetTriggerX2Pattern(0);
984  esdTrack.SetTriggerY2Pattern(0);
985  esdTrack.SetTriggerX3Pattern(0);
986  esdTrack.SetTriggerY3Pattern(0);
987  esdTrack.SetTriggerX4Pattern(0);
988  esdTrack.SetTriggerY4Pattern(0);
989  }
990 
991 }
992 
993 //_____________________________________________________________________________
995  UInt_t trackId, const AliMUONTriggerTrack* triggerTrack)
996 {
998  AliESDMuonTrack *esdTrack = esd.NewMuonTrack();
999  MUONToESD(locTrg, *esdTrack, trackId, triggerTrack);
1000 }
1001 
1002 //_____________________________________________________________________________
1004  UInt_t trackId, const AliMUONTriggerTrack* triggerTrack)
1005 {
1007 
1008  esdTrack.Reset();
1009  esdTrack.SetUniqueID(trackId);
1010 
1011  // set trigger info
1012  AliMUONTrack muonTrack;
1013  muonTrack.SetLocalTrigger(locTrg.LoCircuit(),
1014  locTrg.LoStripX(),
1015  locTrg.LoStripY(),
1016  locTrg.GetDeviation(),
1017  locTrg.LoLpt(),
1018  locTrg.LoHpt(),
1019  locTrg.GetTriggerWithoutChamber());
1020  esdTrack.SetLocalTrigger(muonTrack.GetLocalTrigger());
1021  esdTrack.SetChi2MatchTrigger(0.);
1022  esdTrack.SetTriggerX1Pattern(locTrg.GetX1Pattern());
1023  esdTrack.SetTriggerY1Pattern(locTrg.GetY1Pattern());
1024  esdTrack.SetTriggerX2Pattern(locTrg.GetX2Pattern());
1025  esdTrack.SetTriggerY2Pattern(locTrg.GetY2Pattern());
1026  esdTrack.SetTriggerX3Pattern(locTrg.GetX3Pattern());
1027  esdTrack.SetTriggerY3Pattern(locTrg.GetY3Pattern());
1028  esdTrack.SetTriggerX4Pattern(locTrg.GetX4Pattern());
1029  esdTrack.SetTriggerY4Pattern(locTrg.GetY4Pattern());
1030  UShort_t hitPattern = 0;
1031  esdTrack.SetHitsPatternInTrigChTrk(hitPattern);
1032  if(triggerTrack){
1033  hitPattern = triggerTrack->GetHitsPatternInTrigCh();
1034  esdTrack.SetHitsPatternInTrigCh(hitPattern);
1035  esdTrack.SetThetaXUncorrected(triggerTrack->GetThetax());
1036  esdTrack.SetThetaYUncorrected(triggerTrack->GetThetay());
1037  esdTrack.SetNonBendingCoorUncorrected(triggerTrack->GetX11());
1038  esdTrack.SetBendingCoorUncorrected(triggerTrack->GetY11());
1039  esdTrack.SetZUncorrected(triggerTrack->GetZ11());
1040  }
1041 }
1042 
1043 //_____________________________________________________________________________
1045 {
1048 
1049  AliESDMuonCluster *esdCluster = esd.FindMuonCluster(cluster.GetUniqueID());
1050  if (!esdCluster) esdCluster = esd.NewMuonCluster();
1051  else if (!digits || esdCluster->GetNPads() > 0) return;
1052 
1053  if (digits) {
1054 
1055  MUONToESD(cluster, *esdCluster, kTRUE);
1056 
1057  for (Int_t i=0; i<cluster.GetNDigits(); i++) {
1058  AliMUONVDigit* digit = digits->FindObject(cluster.GetDigitId(i));
1059  if (!digit) {
1060  AliErrorClass(Form("digit %u not found", cluster.GetDigitId(i)));
1061  continue;
1062  }
1063  MUONToESD(*digit, esd);
1064  }
1065 
1066  } else {
1067 
1068  MUONToESD(cluster, *esdCluster, kFALSE);
1069 
1070  }
1071 
1072 }
1073 
1074 //_____________________________________________________________________________
1075 void AliMUONESDInterface::MUONToESD(const AliMUONVCluster& cluster, AliESDMuonCluster& esdCluster, Bool_t copyPadsId)
1076 {
1079 
1080  esdCluster.Clear("C");
1081 
1082  esdCluster.SetUniqueID(cluster.GetUniqueID());
1083  esdCluster.SetXYZ(cluster.GetX(), cluster.GetY(), cluster.GetZ());
1084  esdCluster.SetErrXY(cluster.GetErrX(), cluster.GetErrY());
1085  esdCluster.SetCharge(cluster.GetCharge());
1086  esdCluster.SetChi2(cluster.GetChi2());
1087  esdCluster.SetLabel(cluster.GetMCLabel());
1088 
1089  if (copyPadsId) esdCluster.SetPadsId(cluster.GetNDigits(), cluster.GetDigitsId());
1090 
1091 }
1092 
1093 //_____________________________________________________________________________
1095 {
1097  if (esd.FindMuonPad(digit.GetUniqueID())) return;
1098  AliESDMuonPad *esdPad = esd.NewMuonPad();
1099  MUONToESD(digit, *esdPad);
1100 }
1101 
1102 //_____________________________________________________________________________
1104 {
1106  esdPad.SetUniqueID(digit.GetUniqueID());
1107  esdPad.SetADC(digit.ADC());
1108  esdPad.SetCharge(digit.Charge());
1109  esdPad.SetCalibrated(digit.IsCalibrated());
1110  esdPad.SetSaturated(digit.IsSaturated());
1111 }
1112 
1113 //___________________________________________________________________________
1114 AliMUONTrack* AliMUONESDInterface::Add(const AliESDMuonTrack& esdTrack, AliMUONVTrackStore& trackStore, Bool_t refit)
1115 {
1119  if(trackStore.FindObject(esdTrack.GetUniqueID())) return 0x0;
1120  AliMUONTrack* track = trackStore.Add(AliMUONTrack());
1121  ESDToMUON(esdTrack, *track, refit);
1122  return track;
1123 }
1124 
1125 //___________________________________________________________________________
1127 {
1129  if (!triggerStore.FindLocal(esdTrack.LoCircuit())->IsNull()) return;
1130  AliMUONLocalTrigger locTrg;
1131  ESDToMUON(esdTrack, locTrg);
1132  triggerStore.Add(locTrg);
1133 }
1134 
1135 //___________________________________________________________________________
1137 {
1140  AliMUONVCluster* cluster = clusterStore.Add(esdCluster.GetChamberId(), esdCluster.GetDetElemId(), esdCluster.GetClusterIndex());
1141  if (cluster) ESDToMUON(esdCluster, *cluster);
1142  return cluster;
1143 }
1144 
1145 //___________________________________________________________________________
1147 {
1150  AliMUONVDigit* digit = digitStore.Add(esdPad.GetDetElemId(), esdPad.GetManuId(), esdPad.GetManuChannel(), esdPad.GetCathode(), AliMUONVDigitStore::kDeny);
1151  if (digit) ESDToMUON(esdPad, *digit);
1152  return digit;
1153 }
1154 
Int_t LoStripX(void) const
AliMUONVDigitStore * fDigits
digit container
Int_t GetADC() const
Return the raw charge.
Definition: AliESDMuonPad.h:30
static Double_t AbsZEnd()
Return z-position of absorber end.
Class to describe the MUON pads in the Event Summary Data.
Definition: AliESDMuonPad.h:16
Double_t GetBendingCoor(void) const
void SetLocalTrigger(Int_t locTrig)
Base class of a track container.
UShort_t GetHitsPatternInTrigCh() const
Get word telling which trigger chambers where hit by track.
UInt_t GetHitsPatternInTrigChTrk() const
set word telling which trigger chambers where hit by track (from tracker track extrapolation) ...
Definition: AliMUONTrack.h:106
static void ESDToMUON(const AliESDMuonTrack &esdTrack, AliMUONTrack &track, Bool_t refit=kTRUE)
Virtual class for the MUON track reconstruction.
static void MUONToESD(const AliMUONTrack &track, AliESDEvent &esd, const Double_t vertex[3], const AliMUONVDigitStore *digits=0x0, const AliMUONLocalTrigger *locTrg=0x0)
Int_t GetNClusters() const
return the number of clusters attached to the track
Definition: AliMUONTrack.h:46
static AliMUONVCluster * NewCluster()
Int_t GetManuId() const
Return electronic card id, part of the uniqueID.
Definition: AliESDMuonPad.h:40
static void ExtrapToVertex(AliMUONTrackParam *trackParam, Double_t xVtx, Double_t yVtx, Double_t zVtx, Double_t errXVtx, Double_t errYVtx)
virtual TIterator * CreateLocalIterator() const =0
Create iterator on local trigger.
AliMUONVCluster * FindCluster(UInt_t clusterId) const
void SetThetaXAtDCA(Double_t ThetaX)
Double_t GetNonBendingCoorAtDCA(void) const
AliMUONVTriggerStore * fTriggers
trigger container
void SetTriggerY1Pattern(UShort_t pat)
AliESDMuonTrack * GetMuonTrack(Int_t i)
Double_t GetThetaY(void) const
Double_t GetBendingCoorAtDCA(void) const
Interface for a digit container.
void SetY3Pattern(UShort_t pat)
Set Y strip pattern for chamber 21.
AliESDMuonTrack * NewMuonTrack()
void SetLoTrigY(Int_t loTrigY)
Set Trig Y.
Implementation of AliMUONVTriggerStore.
TIterator * CreateDigitIteratorInCluster(UInt_t clusterId) const
static AliMpSegmentation * Instance(Bool_t warn=true)
virtual Double_t GetZ() const =0
Return coordinate Z (cm)
Class to describe the MUON tracks in the Event Summary Data class.
virtual Bool_t RefitTrack(AliMUONTrack &track, Bool_t enableImprovement=kTRUE)=0
Re-fit the given track.
Concrete implementation of AliMUONVDigitStore for real digits.
Double_t GetThetaX(void) const
void SetVertexErrXY2(Double_t nonBendingErr2, Double_t bendingErr2)
set the vertex resolution square used during the tracking procedure
Definition: AliMUONTrack.h:56
void SetLoStripX(Int_t loStrX)
Set X strip in MT11.
Int_t GetIy() const
Definition: AliMpPad.cxx:280
Double_t GetBendingCoor() const
return bending coordinate (cm)
virtual TIterator * CreateIterator() const =0
Create an iterator to loop over tracks.
void SetX1Pattern(UShort_t pat)
Set X strip pattern for chamber 11.
AliESDEvent * GetESDEvent() const
void SetTriggerX4Pattern(UShort_t pat)
void LoadEvent(AliESDEvent &esdEvent, Bool_t refit=kTRUE)
void SetPadsId(Int_t nPads, const UInt_t *padsId)
void SetHitsPatternInTrigChTrk(UInt_t hitsPatternInTrigChTrk)
set word telling which trigger chambers where hit by track (from tracker track extrapolation) ...
Definition: AliMUONTrack.h:108
Int_t LoDev(void) const
static void ResetTracker(const AliMUONRecoParam *recoParam=0x0, Bool_t info=kTRUE)
static UInt_t BuildUniqueID(Int_t chamberId, Int_t detElemId, Int_t clusterIndex)
Build a single integer with id information.
virtual Int_t ADC() const =0
Raw ADC value of this digit.
Bool_t CovariancesExist() const
return kTRUE if the covariance matrix exist, kFALSE if not
Bool_t FitWithVertex() const
return kTrue if the vertex must be used to constrain the fit, kFalse if not
Definition: AliMUONTrack.h:49
static void SetParamAtVertex(const AliMUONTrackParam &trackParam, AliESDMuonTrack &esdTrack)
virtual Int_t GetSize() const =0
The number of objects stored.
Implementation of AliMUONVTriggerTrackStore.
void SetInverseBendingMomentum(Double_t InverseBendingMomentum)
TROOT * gROOT
virtual Double_t GetErrX() const =0
Return resolution (cm) on coordinate X.
Double_t GetZ() const
return Z coordinate (cm)
UShort_t GetTriggerY3Pattern() const
Int_t LoLpt() const
Return Low pt.
void SetCalibrated(Bool_t calibrated=kTRUE)
Set the pad as being calibrated or not.
Definition: AliESDMuonPad.h:47
void GetCovariances(TMatrixD &cov) const
void SetTriggerX1Pattern(UShort_t pat)
Double_t GetThetaXAtDCA(void) const
const AliMpVSegmentation * GetMpSegmentationByElectronics(Int_t detElemId, Int_t elCardID, Bool_t warn=true) const
Double_t GetY() const
Return Y-position (cm)
Bool_t IsInMuonClusterMap(Int_t chamber) const
TIterator * CreateTrackIterator() const
Track parameters in ALICE dimuon spectrometer.
UShort_t GetTriggerX3Pattern() const
UInt_t GetHitsPatternInTrigChTrk() const
UShort_t GetHitsPatternInTrigCh() const
Class with MUON reconstruction parameters.
AliTPCfastTrack * track
void SetNonBendingCoor(Double_t nonBendingCoor)
set non bending coordinate (cm)
static Bool_t ExtrapToZ(AliMUONTrackParam *trackParam, Double_t zEnd)
virtual void Calibrated(Bool_t value)=0
Set the calibrated status (see note 1 in AliMUONVDigit.cxx)
UShort_t GetTriggerY1Pattern() const
Reconstructed trigger track in ALICE dimuon spectrometer.
void SetCharge(Double_t charge)
Set the calibrated charge.
Definition: AliESDMuonPad.h:33
Bool_t LoadMapping(Bool_t segmentationOnly)
Definition: AliMUONCDB.cxx:502
virtual void SetCharge(Float_t q)=0
Set the charge of this digit.
virtual Float_t Charge() const =0
The charge of this digit, calibrated or not depending on IsCalibrated()
virtual Bool_t IsCalibrated() const =0
Whether this digit has been calibrated or not (see note 1 in AliMUONVDigit.cxx)
void SetBendingCoorAtDCA(Double_t BendingCoor)
void SetMCLabel(Int_t label)
set the corresponding MC track number
Definition: AliMUONTrack.h:133
void SetDeviation(Int_t deviation)
virtual void SetErrXY(Double_t errX, Double_t errY)=0
Set resolution (cm) on coordinates (X,Y)
void SetErrXY(Double_t errX, Double_t errY)
Set (X,Y) resolution (cm)
Implementation of VClusterStore.
Double_t GetChi2() const
Return the chi2 value.
Option_t * GetTrackingMode() const
get the tracking mode
Bool_t ContainTrackerData() const
Int_t LoHpt() const
Return High p.
#define AliFatalClass(message)
Definition: AliLog.h:645
UShort_t GetX3Pattern() const
Return X strip pattern for chamber 21.
AliMUONVDigit * FindDigit(UInt_t digitId) const
Int_t LoStripY() const
Return Y strip in MT11.
Float_t GetX11() const
Return x position of fired Y strip in MC11.
Int_t GetLocalTrigger(void) const
return local trigger information for the matched trigger track
Definition: AliMUONTrack.h:113
Int_t GetNumberOfMuonPads()
#define AliInfoClass(message)
Definition: AliLog.h:489
void SetChi2(Double_t Chi2)
Base class of a trigger information store.
void SetNonBendingCoorUncorrected(Double_t NonBendingCoor)
Double_t GetInverseBendingMomentum() const
return inverse bending momentum (GeV/c ** -1) times the charge (assumed forward motion) ...
static void SetParamAtFirstCluster(const AliMUONTrackParam &trackParam, AliESDMuonTrack &esdTrack)
Float_t GetThetay() const
Return track theta angle in Y.
Double_t GetBendingVertexDispersion() const
return the vertex dispersion (cm) in bending plane
static TString fgTriggerTrackStoreName
class name of the trigger track store to use
virtual TIterator * CreateIterator() const =0
Create an iterator to loop over all our digits.
#define AliWarning(message)
Definition: AliLog.h:541
virtual void Used(Bool_t value)=0
Set the used status.
Int_t GetChamberId() const
Return chamber id (0..), part of the uniqueID.
virtual Int_t GetSize() const =0
Number of digits we store.
Bool_t LoadField()
Definition: AliMUONCDB.cxx:478
UShort_t GetY4Pattern() const
Return Y strip pattern for chamber 22.
static TString fgClusterStoreName
class name of the cluster store to use
UShort_t GetTriggerY4Pattern() const
virtual void Clear(Option_t *opt="")
AliExternalInfo info
UShort_t GetX4Pattern() const
Return X strip pattern for chamber 22.
Int_t LoHpt(void) const
Double_t GetChi2MatchTrigger(void) const
return the chi2 of trigger/track matching
Definition: AliMUONTrack.h:85
virtual void Clear(Option_t *opt="")
virtual Bool_t Add(TObject *object)
Add an object to the store.
static TString fgTriggerStoreName
class name of the trigger store to use
Bool_t UpdateCovTrackParamAtCluster()
virtual UInt_t GetDigitId(Int_t i) const =0
Return Id of digits i.
void SetTriggerWithoutChamber(Int_t ich)
The board would provide a trigger even after removing chamber ich [0,3].
Int_t LoCircuit(void) const
static void GetParamAtFirstCluster(const AliESDMuonTrack &esdTrack, AliMUONTrackParam &trackParam)
void SetThetaX(Double_t ThetaX)
#define AliErrorClass(message)
Definition: AliLog.h:596
void UseSmoother(Bool_t flag)
switch on/off the use of the smoother
virtual void SetXYZ(Double_t x, Double_t y, Double_t z)=0
Set coordinates (cm)
AliESDMuonPad * FindMuonPad(UInt_t padId)
Double_t GetBendingSlope() const
return bending slope (cm ** -1)
Int_t LoStripX() const
Return X strip in MT11.
void SetY4Pattern(UShort_t pat)
Set Y strip pattern for chamber 22.
UShort_t GetX1Pattern() const
Return X strip pattern for chamber 11.
Double_t GetInverseBendingMomentumAtDCA(void) const
void SetLoLpt(Int_t loLpt)
Set Low pt.
static AliMUONRecoParam * fgRecoParam
reconstruction parameters for refitting
void SetBendingSlope(Double_t bendingSlope)
set bending slope (cm ** -1)
void SetThetaY(Double_t ThetaY)
abstract base class for clusters
Int_t GetCathode() const
Return the cathode number, part of the uniqueID.
Definition: AliESDMuonPad.h:44
Bool_t IsSaturated() const
return kTRUE if the pad is saturated
Definition: AliESDMuonPad.h:53
static AliMUONVClusterStore * NewClusterStore()
void SetLabel(Int_t label)
Set the corresponding MC track number.
Double_t GetZ(void) const
UShort_t GetTriggerX4Pattern() const
void SetLoStripY(Int_t loStrY)
Set Y strip in MT11.
Reconstructed Local Trigger object.
void SetADC(Int_t adc)
Set the raw charge.
Definition: AliESDMuonPad.h:28
TIterator * CreateLocalTriggerIterator() const
void SetTrackParamAtVertex(const AliMUONTrackParam *trackParam)
Int_t GetNumberOfMuonTracks() const
Definition: AliESDEvent.h:545
virtual void SetADC(Int_t adc)=0
Set the ADC value.
void SetImproved(Bool_t improved)
set the flag telling whether the track has been improved or not
Definition: AliMUONTrack.h:76
Implementation of TIterator for 2D maps.
void SetBendingCoorUncorrected(Double_t BendingCoor)
Bool_t FitWithMCS() const
return kTrue if the multiple scattering must be accounted for in the fit, kFalse if not ...
Definition: AliMUONTrack.h:60
static AliMUONTrack * Add(const AliESDMuonTrack &esdTrack, AliMUONVTrackStore &trackStore, Bool_t refit=kTRUE)
void SetNonBendingCoor(Double_t NonBendingCoor)
Double_t GetGlobalChi2() const
return the minimum value of the function minimized by the fit
Definition: AliMUONTrack.h:69
static AliMUONVTrackStore * NewTrackStore()
Double_t GetInverseBendingMomentum(void) const
void SetBendingCoor(Double_t BendingCoor)
void SetTriggerY3Pattern(UShort_t pat)
Double_t GetNonBendingCoorUncorrected(void) const
static AliMUONVTrackReconstructor * fgTracker
track reconstructor for refitting
void SetTriggerY2Pattern(UShort_t pat)
TIterator * CreateDigitIterator() const
UShort_t GetY1Pattern() const
Return Y strip pattern for chamber 11.
Converter between MUON track/cluster/digit and ESDMuon track/cluster/pad.
virtual void SetMCLabel(Int_t label)=0
Set the corresponding MC track number.
Class to describe the MUON clusters in the Event Summary Data.
UShort_t GetY3Pattern() const
Return Y strip pattern for chamber 21.
void AddTrackParamAtCluster(const AliMUONTrackParam &trackParam, AliMUONVCluster &cluster, Bool_t copy=kFALSE)
void SetRAtAbsorberEnd(Double_t r)
AliESDMuonCluster * FindMuonCluster(UInt_t clusterId)
Int_t GetClusterIndex() const
Return the index of this cluster (0..), part of the uniqueID.
Double_t GetCharge() const
Return the calibrated charge.
Definition: AliESDMuonPad.h:35
void SetLocalTrigger(Int_t loCirc, Int_t loStripX, Int_t loStripY, Int_t loDev, Int_t loLpt, Int_t loHpt, UChar_t respWithoutChamber=0)
set local trigger information for the matched trigger track
void SetX3Pattern(UShort_t pat)
Set X strip pattern for chamber 21.
virtual Double_t GetErrY() const =0
Return resolution (cm) on coordinate Y.
Double_t GetThetaXUncorrected(void) const
virtual void Clear(Option_t *opt="")
Bool_t IsCalibrated() const
return kTRUE if the pad is calibrated
Definition: AliESDMuonPad.h:49
void SetZ(Double_t Z)
Bool_t IsConnected() const
static AliMUONVTriggerStore * NewTriggerStore()
Float_t GetY11() const
Return y position of fired X strip in MC11.
void SetTriggerX3Pattern(UShort_t pat)
static void GetParamAtDCA(const AliESDMuonTrack &esdTrack, AliMUONTrackParam &trackParam)
Double_t GetZ() const
Return Z-position (cm)
virtual Int_t GetNDigits() const =0
Return number of associated digits.
AliMUONVTrackStore * fTracks
track container
Interface of a cluster container.
TObject * GetValue(Int_t keyFirst, Int_t keySecond) const
Definition: AliMpExMap.cxx:365
Int_t GetNPads() const
Return the number of pads associated to this cluster.
Int_t GetMCLabel() const
return the corresponding MC track number
Definition: AliMUONTrack.h:135
virtual Double_t GetChi2() const =0
Return chi2 of cluster.
UShort_t GetTriggerY2Pattern() const
void SetCharge(Double_t charge)
Set the total charge.
UShort_t GetY2Pattern() const
Return Y strip pattern for chamber 12.
void SetThetaYUncorrected(Double_t ThetaY)
void SetZUncorrected(Double_t Z)
virtual void SetPadXY(Int_t padx, Int_t pady)=0
Set the ix and iy of this digit.
Double_t GetInverseBendingMomentumUncorrected(void) const
Float_t GetThetax() const
Return track theta angle in X.
Double_t GetChi2(void) const
void SetNonBendingSlope(Double_t nonBendingSlope)
set non bending slope (cm ** -1)
Base class of a trigger track store.
void SetMatchTrigger(Int_t matchTrigger)
set the flag telling whether track matches with trigger track or not
Definition: AliMUONTrack.h:83
void SetMuonClusterMap(UInt_t muonClusterMap)
Double_t GetCharge() const
Return the total charge.
void Add(Int_t keyFirst, Int_t keySecond, TObject *object)
Definition: AliMpExMap.cxx:292
Double_t GetErrX() const
Return X-resolution (cm)
virtual void SetChi2(Double_t chi2)=0
Set chi2 of cluster.
AliESDMuonPad * GetMuonPad(Int_t i)
void SetX2Pattern(UShort_t pat)
Set X strip pattern for chamber 12.
Implementation of AliMUONVTrackStore.
void SetLabel(Int_t label)
Set the corresponding MC track number.
Double_t GetNonBendingCoor(void) const
Int_t GetLabel() const
Return the corresponding MC track number.
Int_t LoStripY(void) const
virtual void SetDigitsId(Int_t nDigits, const UInt_t *digitsId)=0
Set Id of associated digits.
Double_t GetBendingCoorUncorrected(void) const
Int_t GetMatchTrigger() const
AliESDMuonCluster * NewMuonCluster()
Float_t GetZ11() const
Return z position of fired X strip in MC11.
Int_t GetLabel() const
Return the corresponding MC track number.
void SetThetaXUncorrected(Double_t ThetaX)
void SetOwner(Bool_t owner)
Definition: AliMpExMap.cxx:332
void SetY2Pattern(UShort_t pat)
Set Y strip pattern for chamber 12.
AliMpExMap * fClusterMap
map of clusters
Int_t GetNDigitsInCluster(UInt_t clusterId) const
static Int_t GetChamberId(UInt_t uniqueID)
Return chamber id (0..), part of the uniqueID.
void Connected(Bool_t flag=kTRUE)
set the flag which is kTRUE if that track shares cluster(s) with another
Definition: AliMUONTrack.h:147
AliMpExMap * fDigitMap
map of digits
void SetInverseBendingMomentumAtDCA(Double_t InverseBendingMomentum)
void SetInverseBendingMomentum(Double_t inverseBendingMomentum)
set inverse bending momentum (GeV/c ** -1) times the charge (assumed forward motion) ...
UInt_t GetClusterId(Int_t i) const
virtual Double_t GetY() const =0
Return coordinate Y (cm)
void SetTriggerX2Pattern(UShort_t pat)
Int_t GetIx() const
Definition: AliMpPad.cxx:272
virtual void SetCharge(Double_t charge)=0
Set the cluster charge.
static AliMUONVTriggerTrackStore * NewTriggerTrackStore()
static void GetParamAtVertex(const AliESDMuonTrack &esdTrack, AliMUONTrackParam &trackParam)
static void GetParamCov(const AliESDMuonTrack &esdTrack, AliMUONTrackParam &trackParam)
void Connected(Bool_t flag=kTRUE)
static void ExtrapToVertexWithoutBranson(AliMUONTrackParam *trackParam, Double_t zVtx)
Double_t GetThetaYAtDCA(void) const
void SetBendingCoor(Double_t bendingCoor)
set bending coordinate (cm)
Double_t GetChi2MatchTrigger() const
The abstract base class for the segmentation.
Int_t GetDetElemId() const
Return detection element id, part of the uniqueID.
static AliMUONVDigitStore * NewDigitStore()
void SetHitsPatternInTrigCh(UShort_t hitsPatternInTrigCh)
set word telling which trigger chambers where hit by track
Definition: AliMUONTrack.h:104
UChar_t GetTriggerWithoutChamber() const
Triggers from the re-calculated trigger response after removing chambers one-by-one.
UShort_t GetTriggerX2Pattern() const
Double_t GetNonBendingCoor() const
return non bending coordinate (cm)
AliMUONTrack * FindTrack(UInt_t trackId) const
Int_t GetTriggerWithoutChamber(void) const
void SetThetaYAtDCA(Double_t ThetaY)
virtual void Saturated(Bool_t saturated=kTRUE)=0
Set the saturation status.
void AddClusterId(UInt_t clusterId)
ABC of a MUON digit.
Definition: AliMUONVDigit.h:18
AliMUONVCluster * GetClusterPtr() const
get pointeur to associated cluster
UShort_t GetX2Pattern() const
Return X strip pattern for chamber 12.
Double_t GetZUncorrected(void) const
AliMUONLocalTrigger * FindLocalTrigger(Int_t boardNumber) const
Class which encapsuate all information about a pad.
Definition: AliMpPad.h:22
virtual Bool_t IsSaturated() const =0
Whether the ADC has saturated.
AliESDMuonPad * NewMuonPad()
virtual AliMUONVCluster * CreateCluster(Int_t chamberId, Int_t detElemId, Int_t clusterIndex) const =0
Create a cluster.
Double_t GetX() const
Return X-position (cm)
virtual Double_t GetX() const =0
Return coordinate X (cm)
virtual Bool_t Add(TObject *object)
Add an object, if of the right type.
virtual void Clear(Option_t *opt="")=0
Clear ourselves (i.e. Reset)
Bool_t ContainTriggerData() const
void SetLoHpt(Int_t loHpt)
Set High pt.
Reconstructed track in ALICE dimuon spectrometer.
Definition: AliMUONTrack.h:24
#define AliError(message)
Definition: AliLog.h:591
Double_t GetErrY() const
Return Y-resolution (cm)
void AddInMuonClusterMap(Int_t chamber)
void SetHitsPatternInTrigChTrk(UInt_t hitsPatternInTrigChTrk)
virtual const UInt_t * GetDigitsId() const
Return the array of digits&#39;id.
Bool_t DigitsStored(UInt_t trackId) const
Int_t LoLpt(void) const
virtual Bool_t Add(TObject *object)
Add an object, if of the right type.
void SetChi2MatchTrigger(Double_t Chi2MatchTrigger)
virtual AliMUONVDigit * FindObject(const TObject *object) const
Find an object (default is to forward to FindObject(object->GetUniqueID())
Int_t GetNClusters() const
static AliMUONVDigit * NewDigit()
void SetCovariances(const TMatrixD &covariances)
static AliMUONVTrackReconstructor * CreateTrackReconstructor(const AliMUONRecoParam *recoParam, AliMUONVClusterServer *clusterServer, const AliMUONGeometryTransformer *transformer)
virtual AliMpPad PadByLocation(Int_t manuId, Int_t manuChannel, Bool_t warning=true) const =0
Find pad by location.
virtual AliMUONVDigit * CreateDigit(Int_t detElemId, Int_t manuId, Int_t manuChannel, Int_t cathode) const =0
Create a digit.
virtual void Clear(Option_t *)=0
Clear method (used by TClonesArray)
Double_t GetThetaYUncorrected(void) const
Int_t GetDetElemId() const
Return detection element id, part of the uniqueID.
Definition: AliESDMuonPad.h:38
static void SetParamCov(const AliMUONTrackParam &trackParam, AliESDMuonTrack &esdTrack)
void SetChi2(Double_t chi2)
Set the chi2 value.
void SetSaturated(Bool_t saturated=kTRUE)
Set the pad as being saturated or not.
Definition: AliESDMuonPad.h:51
void SetTriggerY4Pattern(UShort_t pat)
virtual Double_t GetCharge() const =0
Set the cluster charge.
void SetX4Pattern(UShort_t pat)
Set X strip pattern for chamber 22.
static TString fgDigitStoreName
class name of the digit store to use
void SetZ(Double_t z)
set Z coordinate (cm)
virtual void Clear(Option_t *opt="")
Definition: AliMpExMap.cxx:259
void SetY1Pattern(UShort_t pat)
Set Y strip pattern for chamber 11.
void SetNonBendingCoorAtDCA(Double_t NonBendingCoor)
const TMatrixD & GetCovariances() const
virtual AliMUONLocalTrigger * FindLocal(Int_t boardNumber) const =0
Find a local trigger by the board number (not an index, it is a number really)
TIterator * CreateClusterIterator() const
Int_t LoCircuit() const
Return Circuit number.
void SetCovariances(const TMatrixD &cov)
void SetLoCircuit(Int_t loCir)
Set Circuit number.
static TString fgTrackStoreName
class name of the track store to use
void SetHitsPatternInTrigCh(UShort_t hitsPatternInTrigCh)
void SetChi2MatchTrigger(Double_t chi2MatchTrigger)
set the chi2 of trigger/track matching
Definition: AliMUONTrack.h:87
virtual TObject * FindObject(const char *name) const
Find an object by name.
void SetInverseBendingMomentumUncorrected(Double_t InverseBendingMomentum)
UShort_t GetTriggerX1Pattern() const
Helper class making Root persistent TExMap.
Definition: AliMpExMap.h:28
Bool_t TriggerFiredWithoutChamber(Int_t ich) const
virtual Bool_t Add(TObject *object)
Add an object, if it is of the right class.
AliMpExMapIterator * CreateIterator() const
Definition: AliMpExMap.cxx:357
AliMUONRecoParam * LoadRecoParam()
Definition: AliMUONCDB.cxx:535
static Double_t MaxChi2()
return the maximum chi2 above which the track can be considered as abnormal (due to extrapolation fai...
Definition: AliMUONTrack.h:144
Bool_t IsConnected() const
return the flag which is kTRUE if that track shares cluster(s) with another
Definition: AliMUONTrack.h:149
static void SetParamAtDCA(const AliMUONTrackParam &trackParam, AliESDMuonTrack &esdTrack)
TObjArray * GetTrackParamAtCluster() const
UShort_t GetHitsPatternInTrigCh() const
set word telling which trigger chambers where hit by track
Definition: AliMUONTrack.h:102
virtual Int_t GetMCLabel() const =0
Return the corresponding MC track number.
const UInt_t * GetPadsId() const
Return the array of pads&#39;Id.
void SetGlobalChi2(Double_t chi2)
set the minimum value of the function minimized by the fit
Definition: AliMUONTrack.h:71
void SetXYZ(Double_t x, Double_t y, Double_t z)
Set coordinates (cm)
virtual void Clear(Option_t *="")
Double_t GetNonBendingSlope() const
return non bending slope (cm ** -1)
Int_t GetManuChannel() const
Return the channel within ManuId(), part of the uniqueID.
Definition: AliESDMuonPad.h:42