]>
Commit | Line | Data |
---|---|---|
2060b217 | 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 | //----------------------------------------------------------------------------- | |
19 | /// \class AliMUONVCluster | |
20 | /// | |
21 | /// An abstract base class for clusters | |
22 | /// | |
23 | /// \author Philippe Pillot, Subatech | |
24 | //----------------------------------------------------------------------------- | |
25 | ||
26 | #include "AliMUONVCluster.h" | |
27 | ||
28 | #include "AliLog.h" | |
29 | ||
30 | #include <Riostream.h> | |
31 | ||
32 | /// \cond CLASSIMP | |
33 | ClassImp(AliMUONVCluster) | |
34 | /// \endcond | |
35 | ||
2060b217 | 36 | //_____________________________________________________________________________ |
37 | AliMUONVCluster::AliMUONVCluster() | |
38 | { | |
39 | /// default constructor | |
40 | } | |
41 | ||
42 | //_____________________________________________________________________________ | |
43 | AliMUONVCluster::AliMUONVCluster(Int_t chamberId, Int_t detElemId, Int_t clusterIndex) | |
44 | : TObject() | |
45 | { | |
46 | /// constructor | |
47 | SetUniqueID(BuildUniqueID(chamberId, detElemId, clusterIndex)); | |
48 | } | |
49 | ||
50 | //_____________________________________________________________________________ | |
51 | AliMUONVCluster::~AliMUONVCluster() | |
52 | { | |
53 | /// destructor | |
54 | } | |
55 | ||
56 | //_____________________________________________________________________________ | |
57 | void AliMUONVCluster::Print(Option_t *option) const | |
58 | { | |
59 | /// print cluster content | |
60 | /// if option=FULL print also all Digit ID | |
61 | UInt_t cId = GetUniqueID(); | |
62 | Int_t nDigits = GetNDigits(); | |
63 | ||
64 | cout<<Form("clusterID=%u (ch=%d, det=%d, index=%d)", | |
65 | cId,GetChamberId(),GetDetElemId(),GetClusterIndex(cId))<<endl; | |
66 | ||
2e2d0c44 | 67 | cout<<Form("position=(%5.2f, %5.2f, %5.2f), sigma=(%5.2f, %5.2f, 0.0), charge=%5.2f, chi2=%5.2f, MClabel=%d", |
68 | GetX(),GetY(),GetZ(),GetErrX(),GetErrY(),GetCharge(),GetChi2(),GetMCLabel())<<endl; | |
2060b217 | 69 | |
70 | if (strcmp(option,"FULL") == 0) { | |
71 | cout<<"nDigits="<<nDigits<<" digitID=("; | |
72 | for (Int_t i=0; i<nDigits; i++) cout<<GetDigitId(i)<<", "; | |
73 | cout<<")"<<endl; | |
74 | } | |
75 | ||
76 | } |