]>
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 | |
7754cd1f | 55 | } |
6c1053a8 | 56 | //_____________________________________________________________________________ |
1a278748 | 57 | TH2D* AliTRDCalChamberStatus::Plot(Int_t sm) |
6c1053a8 | 58 | { |
59 | // | |
60 | // Plot chamber status for supermodule and halfchamberside | |
61 | // as a function of layer and stack | |
62 | // | |
63 | ||
1a278748 | 64 | TH2D *h2 = new TH2D(Form("sm_%d",sm),Form("sm_%d",sm),5,0.0,5.0,6,0.0,6.0); |
6c1053a8 | 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); | |
1a278748 | 76 | h2->Fill(stack,layer,status); |
6c1053a8 | 77 | } |
78 | ||
79 | return h2; | |
80 | ||
81 | } | |
82 |