Line data Source code
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: AliTRDqaBuildReference.cxx 26344 2008-06-03 10:28:50Z cblume $ */
17 :
18 : ////////////////////////////////////////////////////////////////////////////
19 : // //
20 : // Build the reference histograms //
21 : // //
22 : // Author: //
23 : // Sylwester Radomski (radomski@physi.uni-heidelberg.de) //
24 : // //
25 : ////////////////////////////////////////////////////////////////////////////
26 :
27 : #include "TH1D.h"
28 : #include "TFile.h"
29 :
30 : #include "AliTRDqaBuildReference.h"
31 :
32 : //////////////////////////////////////////////////////////////////////////////////////
33 :
34 : //_____________________________________________________________________________
35 : AliTRDqaBuildReference &AliTRDqaBuildReference::operator=(const AliTRDqaBuildReference &qadm)
36 : {
37 : //
38 : // Assignment operator
39 : //
40 :
41 0 : if (this != &qadm) {
42 0 : ((AliTRDqaBuildReference &) qadm).Copy(*this);
43 0 : }
44 :
45 0 : return *this;
46 :
47 : }
48 :
49 : //_____________________________________________________________________________
50 : void AliTRDqaBuildReference::Copy(TObject &/*qadm*/) const
51 : {
52 : //
53 : // Copy function
54 : //
55 :
56 0 : }
57 :
58 : void AliTRDqaBuildReference::BuildRefHistos(TFile *file) const
59 : {
60 : //
61 : // Build the reference histograms
62 : //
63 :
64 : // check
65 0 : if (!file) return;
66 0 : if (file->IsZombie()) return;
67 :
68 : // recpoints
69 0 : Int_t cd = file->cd("TRD/RecPoints");
70 0 : if (cd) {
71 :
72 : // MPV distribution
73 :
74 0 : TH1D *r = new TH1D("qaTRD_recPoints_ampMPV_ref", "", 150, 0, 150);
75 0 : for(Int_t i=0; i<r->GetNbinsX(); i++) {
76 0 : Double_t x = r->GetBinCenter(i+1);
77 0 : if (x < 10 || x > 70) r->Fill(x, 1);
78 0 : else if (x < 25 || x > 55) r->Fill(x, 0.5);
79 : }
80 :
81 0 : r->Fill(-1e3, 1);
82 0 : r->Fill(1e3, 1);
83 :
84 : // number of clusters
85 0 : r = new TH1D("qaTRD_recPoints_nCls_ref", "", 500, -0.5, 499.5);
86 0 : for(Int_t i=0; i<r->GetNbinsX(); i++) {
87 0 : Double_t x = r->GetBinCenter(i+1);
88 0 : if ( (i+4)%22 > 9 || i < 10) r->Fill(x, 0.5);
89 0 : if (x > 350) r->Fill(x, 1);
90 : }
91 :
92 0 : file->Write();
93 0 : }
94 :
95 : // esds
96 :
97 0 : }
98 :
99 :
100 : //////////////////////////////////////////////////////////////////////////////////////
|