]>
Commit | Line | Data |
---|---|---|
7754cd1f | 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 | // // | |
20 | // TRD calibration class for status of chambers // | |
21 | // // | |
22 | /////////////////////////////////////////////////////////////////////////////// | |
23 | ||
6c1053a8 | 24 | #include "TH2D.h" |
7754cd1f | 25 | #include "AliTRDCalChamberStatus.h" |
26 | ||
27 | ClassImp(AliTRDCalChamberStatus) | |
28 | ||
29 | //_____________________________________________________________________________ | |
2745a409 | 30 | AliTRDCalChamberStatus::AliTRDCalChamberStatus() |
31 | :TNamed() | |
7754cd1f | 32 | { |
33 | // | |
34 | // AliTRDCalChamberStatus default constructor | |
35 | // | |
36 | ||
37 | for (Int_t idet = 0; idet < kNdet; idet++) { | |
38 | fStatus[idet] = 0; | |
39 | } | |
2745a409 | 40 | |
7754cd1f | 41 | } |
42 | ||
43 | //_____________________________________________________________________________ | |
44 | AliTRDCalChamberStatus::AliTRDCalChamberStatus(const Text_t *name, const Text_t *title) | |
2745a409 | 45 | :TNamed(name,title) |
7754cd1f | 46 | { |
47 | // | |
48 | // AliTRDCalChamberStatus constructor | |
49 | // | |
50 | ||
51 | for (Int_t idet = 0; idet < kNdet; idet++) { | |
52 | fStatus[idet] = 0; | |
53 | } | |
2745a409 | 54 | |
fd50bb14 | 55 | } |
56 | //_____________________________________________________________________________ | |
57 | TH2D* AliTRDCalChamberStatus::Plot(Int_t sm, Int_t rphi) | |
58 | { | |
59 | // | |
60 | // Plot chamber status for supermodule and halfchamberside | |
61 | // as a function of layer and stack | |
62 | // | |
63 | ||
64 | TH2D *h2 = new TH2D(Form("sm_%d_rphi_%d",sm,rphi),Form("sm_%d_rphi_%d",sm,rphi),5,0.0,5.0,6,0.0,6.0); | |
65 | ||
66 | h2->SetXTitle("stack"); | |
67 | h2->SetYTitle("layer"); | |
68 | ||
69 | Int_t start = sm*30; | |
70 | Int_t end = (sm+1)*30; | |
71 | ||
72 | for(Int_t i=start; i<end; i++) { | |
73 | Int_t layer = i%6; | |
74 | Int_t stack = static_cast<int>((i-start)/6.); | |
75 | Int_t status = GetStatus(i); | |
76 | if(rphi == 0) { | |
77 | if(status!=4) h2->Fill(stack,layer,status); | |
78 | } | |
79 | else if(rphi == 1) { | |
80 | if(status!=3) h2->Fill(stack,layer,status); | |
81 | } | |
82 | ||
83 | } | |
84 | ||
85 | return h2; | |
86 | ||
7754cd1f | 87 | } |
6c1053a8 | 88 | //_____________________________________________________________________________ |
1a278748 | 89 | TH2D* AliTRDCalChamberStatus::Plot(Int_t sm) |
6c1053a8 | 90 | { |
91 | // | |
92 | // Plot chamber status for supermodule and halfchamberside | |
93 | // as a function of layer and stack | |
94 | // | |
95 | ||
1a278748 | 96 | TH2D *h2 = new TH2D(Form("sm_%d",sm),Form("sm_%d",sm),5,0.0,5.0,6,0.0,6.0); |
6c1053a8 | 97 | |
98 | h2->SetXTitle("stack"); | |
99 | h2->SetYTitle("layer"); | |
100 | ||
101 | Int_t start = sm*30; | |
102 | Int_t end = (sm+1)*30; | |
103 | ||
104 | for(Int_t i=start; i<end; i++) { | |
105 | Int_t layer = i%6; | |
106 | Int_t stack = static_cast<int>((i-start)/6.); | |
107 | Int_t status = GetStatus(i); | |
1a278748 | 108 | h2->Fill(stack,layer,status); |
6c1053a8 | 109 | } |
110 | ||
111 | return h2; | |
112 | ||
113 | } |