AliRoot Core  v5-06-30 (35d6c57)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONVCluster.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 //-----------------------------------------------------------------------------
24 //-----------------------------------------------------------------------------
25 
26 #include "AliMUONVCluster.h"
27 
28 #include "AliLog.h"
29 
30 #include <Riostream.h>
31 
32 using std::endl;
33 using std::cout;
37 
38 //_____________________________________________________________________________
40 {
42 }
43 
44 //_____________________________________________________________________________
45 AliMUONVCluster::AliMUONVCluster(Int_t chamberId, Int_t detElemId, Int_t clusterIndex)
46  : TObject()
47 {
49  SetUniqueID(BuildUniqueID(chamberId, detElemId, clusterIndex));
50 }
51 
52 //_____________________________________________________________________________
54 {
56 }
57 
58 //_____________________________________________________________________________
59 void AliMUONVCluster::Print(Option_t *option) const
60 {
63  UInt_t cId = GetUniqueID();
64  Int_t nDigits = GetNDigits();
65 
66  cout<<Form("clusterID=%u (ch=%d, det=%d, index=%d)",
67  cId,GetChamberId(),GetDetElemId(),GetClusterIndex(cId))<<endl;
68 
69  cout<<Form("position=(%5.2f, %5.2f, %5.2f), sigma=(%5.2f, %5.2f, 0.0), charge=%5.2f, chi2=%5.2f, MClabel=%d",
70  GetX(),GetY(),GetZ(),GetErrX(),GetErrY(),GetCharge(),GetChi2(),GetMCLabel())<<endl;
71 
72  if (strcmp(option,"FULL") == 0) {
73  cout<<"nDigits="<<nDigits<<" digitID=(";
74  for (Int_t i=0; i<nDigits; i++) cout<<GetDigitId(i)<<", ";
75  cout<<")"<<endl;
76  }
77 
78 }
virtual Int_t GetDetElemId() const =0
Return detection element Id.
virtual Double_t GetZ() const =0
Return coordinate Z (cm)
static UInt_t BuildUniqueID(Int_t chamberId, Int_t detElemId, Int_t clusterIndex)
Build a single integer with id information.
virtual Int_t GetChamberId() const =0
Return chamber Id.
virtual Double_t GetErrX() const =0
Return resolution (cm) on coordinate X.
ClassImp(TPCGenInfo)
Definition: AliTPCCmpNG.C:254
virtual UInt_t GetDigitId(Int_t i) const =0
Return Id of digits i.
virtual void Print(Option_t *option="") const
static Int_t GetClusterIndex(UInt_t uniqueID)
The index of this cluster (0..), part of the uniqueID.
abstract base class for clusters
virtual ~AliMUONVCluster()
virtual Double_t GetErrY() const =0
Return resolution (cm) on coordinate Y.
virtual Int_t GetNDigits() const =0
Return number of associated digits.
virtual Double_t GetChi2() const =0
Return chi2 of cluster.
virtual Double_t GetY() const =0
Return coordinate Y (cm)
virtual Double_t GetX() const =0
Return coordinate X (cm)
virtual Double_t GetCharge() const =0
Set the cluster charge.
virtual Int_t GetMCLabel() const =0
Return the corresponding MC track number.