]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOSQADataMakerRec.cxx
Use double precision everywhere (Federico)
[u/mrichter/AliRoot.git] / PHOS / AliPHOSQADataMakerRec.cxx
CommitLineData
04236e67 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
17/* $Id$ */
18
19/*
20 Produces the data needed to calculate the quality assurance.
21 All data must be mergeable objects.
22 Y. Schutz CERN July 2007
23*/
24
25// --- ROOT system ---
26#include <TClonesArray.h>
27#include <TFile.h>
28#include <TH1F.h>
29#include <TH1I.h>
30#include <TH2F.h>
3bffaa2f 31#include <TParameter.h>
04236e67 32
33// --- Standard library ---
34
35// --- AliRoot header files ---
36#include "AliESDCaloCluster.h"
37#include "AliESDEvent.h"
38#include "AliLog.h"
39#include "AliPHOSQADataMakerRec.h"
40#include "AliQAChecker.h"
44ed7a66 41#include "AliPHOSDigit.h"
04236e67 42#include "AliPHOSCpvRecPoint.h"
43#include "AliPHOSEmcRecPoint.h"
44#include "AliPHOSRecParticle.h"
45#include "AliPHOSTrackSegment.h"
46#include "AliPHOSRawDecoder.h"
ebde5500 47#include "AliPHOSRawDecoderv1.h"
48#include "AliPHOSRawDecoderv2.h"
04236e67 49#include "AliPHOSReconstructor.h"
04236e67 50
51ClassImp(AliPHOSQADataMakerRec)
52
53//____________________________________________________________________________
54 AliPHOSQADataMakerRec::AliPHOSQADataMakerRec() :
4e25ac79 55 AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kPHOS), "PHOS Quality Assurance Data Maker")
04236e67 56{
57 // ctor
58}
59
60//____________________________________________________________________________
61AliPHOSQADataMakerRec::AliPHOSQADataMakerRec(const AliPHOSQADataMakerRec& qadm) :
62 AliQADataMakerRec()
63{
64 //copy ctor
65 SetName((const char*)qadm.GetName()) ;
66 SetTitle((const char*)qadm.GetTitle());
67}
68
69//__________________________________________________________________
70AliPHOSQADataMakerRec& AliPHOSQADataMakerRec::operator = (const AliPHOSQADataMakerRec& qadm )
71{
72 // Equal operator.
73 this->~AliPHOSQADataMakerRec();
74 new(this) AliPHOSQADataMakerRec(qadm);
75 return *this;
76}
77
78//____________________________________________________________________________
4e25ac79 79void AliPHOSQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list)
04236e67 80{
81 //Detector specific actions at end of cycle
7285e69f 82 if(GetRawsData(kHGqualMod1) && GetRawsData(kHGmod1))
83 GetRawsData(kHGqualMod1)->Divide( GetRawsData(kHGmod1) ) ;
84 if(GetRawsData(kHGqualMod2) && GetRawsData(kHGmod2))
85 GetRawsData(kHGqualMod2)->Divide( GetRawsData(kHGmod2) ) ;
86 if(GetRawsData(kHGqualMod3) && GetRawsData(kHGmod3))
87 GetRawsData(kHGqualMod3)->Divide( GetRawsData(kHGmod3) ) ;
88 if(GetRawsData(kHGqualMod4) && GetRawsData(kHGmod4))
89 GetRawsData(kHGqualMod4)->Divide( GetRawsData(kHGmod4) ) ;
90 if(GetRawsData(kHGqualMod5) && GetRawsData(kHGmod5))
91 GetRawsData(kHGqualMod5)->Divide( GetRawsData(kHGmod5) ) ;
04236e67 92 // do the QA checking
4e25ac79 93 AliQAChecker::Instance()->Run(AliQAv1::kPHOS, task, list) ;
04236e67 94}
95
96//____________________________________________________________________________
97void AliPHOSQADataMakerRec::InitESDs()
98{
ebde5500 99 //Create histograms to controll ESD
100
7d297381 101 const Bool_t expert = kTRUE ;
102 const Bool_t image = kTRUE ;
33055c0e 103
db72ff3b 104 TH1F * h1 = new TH1F("hESDPhosSpectrum", "ESDs spectrum in PHOS; Energy [MeV];Counts" , 200, 0., 20.) ;
39569d36 105 h1->Sumw2() ;
7d297381 106 Add2ESDsList(h1, kESDSpec, !expert, image) ;
e862ee5c 107
db72ff3b 108 TH1I * h2 = new TH1I("hESDPhosMul", "ESDs multiplicity distribution in PHOS; # of clusters;Counts", 100, 0, 100 ) ;
39569d36 109 h2->Sumw2() ;
7d297381 110 Add2ESDsList(h2, kESDNtot, !expert, image) ;
ebde5500 111
db72ff3b 112 TH1F * h3 = new TH1F("hESDPhosEtot", "ESDs total energy;Energy [MeV];Counts" , 2000, 0, 200.) ;
39569d36 113 h3->Sumw2() ;
7d297381 114 Add2ESDsList(h3, kESDEtot, !expert, image) ; //Expert histo
ebde5500 115
db72ff3b 116 TH1F * h4 = new TH1F("hESDpid", "ESDs PID distribution in PHOS;Particle Id;Counts" , 100, 0., 1.) ;
39569d36 117 h4->Sumw2() ;
7d297381 118 Add2ESDsList(h4, kESDpid, !expert, image) ; //Expert histo
04236e67 119
04236e67 120}
121
44ed7a66 122//____________________________________________________________________________
123void AliPHOSQADataMakerRec::InitDigits()
124{
125 // create Digits histograms in Digits subdir
126 const Bool_t expert = kTRUE ;
127 const Bool_t image = kTRUE ;
db72ff3b 128 TH1I * h0 = new TH1I("hPhosDigits", "Digits amplitude distribution in PHOS;Amplitude [ADC counts];Counts", 500, 0, 1000) ;
44ed7a66 129 h0->Sumw2() ;
130 Add2DigitsList(h0, kDigits, !expert, image) ;
db72ff3b 131 TH1I * h1 = new TH1I("hPhosDigitsMul", "Digits multiplicity distribution in PHOS;# of Digits;Entries", 2000, 0, 10000) ;
44ed7a66 132 h1->Sumw2() ;
133 Add2DigitsList(h1, kDigitsMul, !expert, image) ;
134}
135
04236e67 136//____________________________________________________________________________
137void AliPHOSQADataMakerRec::InitRecPoints()
138{
139 // create Reconstructed Points histograms in RecPoints subdir
7d297381 140 const Bool_t expert = kTRUE ;
141 const Bool_t image = kTRUE ;
7285e69f 142
db72ff3b 143 TH2I * h0 = new TH2I("hRpPHOSxyMod1","RecPoints Rows x Columns for PHOS module 1;Row #;Column #", 64, -72., 72., 56, -63., 63.) ;
7d297381 144 Add2RecPointsList(h0,kRPmod1, expert, !image) ;
db72ff3b 145 TH2I * h1 = new TH2I("hRpPHOSxyMod2","RecPoints Rows x Columns for PHOS module 2;Row #;Column #", 64, -72., 72., 56, -63., 63.) ;
7d297381 146 Add2RecPointsList(h1,kRPmod2, expert, !image) ;
db72ff3b 147 TH2I * h2 = new TH2I("hRpPHOSxyMod3","RecPoints Rows x Columns for PHOS module 3;Row #;Column #", 64, -72., 72., 56, -63., 63.) ;
7d297381 148 Add2RecPointsList(h2,kRPmod3, expert, !image) ;
db72ff3b 149 TH2I * h3 = new TH2I("hRpPHOSxyMod4","RecPoints Rows x Columns for PHOS module 4;Row #;Column #", 64, -72., 72., 56, -63., 63.) ;
7d297381 150 Add2RecPointsList(h3,kRPmod4, expert, !image) ;
db72ff3b 151 TH2I * h4 = new TH2I("hRpPHOSxyMod5","RecPoints Rows x Columns for PHOS module 5;Row #;Column #", 64, -72., 72., 56, -63., 63.) ;
7d297381 152 Add2RecPointsList(h4,kRPmod5, expert, !image) ;
ebde5500 153
db72ff3b 154 TH1F * h5 = new TH1F("hEmcPhosRecPointsSpectrum", "EMC RecPoints spectrum in PHOS;Energy [MeV];Counts", 2000, 0., 20.) ;
ebde5500 155 h5->Sumw2() ;
7d297381 156 Add2RecPointsList(h5, kRPSpec, !expert, image) ;
ebde5500 157
db72ff3b 158 TH1I * h6 = new TH1I("hEmcPhosRecPointsMul", "EMC RecPoints multiplicity distribution in PHOS;# of EMC Clusters;Entries", 100, 0, 100) ;
ebde5500 159 h6->Sumw2() ;
7d297381 160 Add2RecPointsList(h6, kRPNtot, !expert, image) ;
ebde5500 161
db72ff3b 162 TH1I * h7 = new TH1I("hEmcPhosRecPointsEtot", "EMC RecPoints Etot;Energy [MeV];Counts", 200, 0, 200.) ;
ebde5500 163 h7->Sumw2() ;
7d297381 164 Add2RecPointsList(h7, kRPEtot, !expert, image) ;
04236e67 165
db72ff3b 166 TH1I * h8 = new TH1I("hCpvPhosRecPointsMul", "CPV RecPoints multiplicity distribution in PHOS;# of CPV clusters;Counts", 100, 0, 100) ;
ebde5500 167 h8->Sumw2() ;
7d297381 168 Add2RecPointsList(h8, kRPNcpv, !expert, image) ;
04236e67 169}
170
171//____________________________________________________________________________
172void AliPHOSQADataMakerRec::InitRaws()
173{
174 // create Raws histograms in Raws subdir
7d297381 175 const Bool_t expert = kTRUE ;
176 const Bool_t saveCorr = kTRUE ;
177 const Bool_t image = kTRUE ;
178
db72ff3b 179 TH2I * h0 = new TH2I("hHighPHOSxyMod1","High Gain Rows x Columns for PHOS module 1;Row #;Column #", 64, 0, 64, 56, 0, 56) ;
7d297381 180 Add2RawsList(h0,kHGmod1, expert, !image, !saveCorr) ;
db72ff3b 181 TH2I * h1 = new TH2I("hHighPHOSxyMod2","High Gain Rows x Columns for PHOS module 2;Row #;Column #", 64, 0, 64, 56, 0, 56) ;
7d297381 182 Add2RawsList(h1,kHGmod2, expert, !image, !saveCorr) ;
db72ff3b 183 TH2I * h2 = new TH2I("hHighPHOSxyMod3","High Gain Rows x Columns for PHOS module 3;Row #;Column #", 64, 0, 64, 56, 0, 56) ;
7d297381 184 Add2RawsList(h2,kHGmod3, expert, !image, !saveCorr) ;
db72ff3b 185 TH2I * h3 = new TH2I("hHighPHOSxyMod4","High Gain Rows x Columns for PHOS module 4;Row #;Column #", 64, 0, 64, 56, 0, 56) ;
7d297381 186 Add2RawsList(h3,kHGmod4, expert, !image, !saveCorr) ;
db72ff3b 187 TH2I * h4 = new TH2I("hHighPHOSxyMod5","High Gain Rows x Columns for PHOS module 5;Row #;Column #", 64, 0, 64, 56, 0, 56) ;
7d297381 188 Add2RawsList(h4,kHGmod5, expert, !image, !saveCorr) ;
db72ff3b 189 TH2I * h5 = new TH2I("hLowPHOSxyMod1","Low Gain Rows x Columns for PHOS module 1;Row #;Column #", 64, 0, 64, 56, 0, 56) ;
7d297381 190 Add2RawsList(h5,kLGmod1, expert, !image, !saveCorr) ;
db72ff3b 191 TH2I * h6 = new TH2I("hLowPHOSxyMod2","Low Gain Rows x Columns for PHOS module 2;Row #;Column #", 64, 0, 64, 56, 0, 56) ;
7d297381 192 Add2RawsList(h6,kLGmod2, expert, !image, !saveCorr) ;
db72ff3b 193 TH2I * h7 = new TH2I("hLowPHOSxyMod3","Low Gain Rows x Columns for PHOS module 3;Row #;Column #", 64, 0, 64, 56, 0, 56) ;
7d297381 194 Add2RawsList(h7,kLGmod3, expert, !image, !saveCorr) ;
db72ff3b 195 TH2I * h8 = new TH2I("hLowPHOSxyMod4","Low Gain Rows x Columns for PHOS module 4;Row #;Column #", 64, 0, 64, 56, 0, 56) ;
7d297381 196 Add2RawsList(h8,kLGmod4, expert, !image, !saveCorr) ;
db72ff3b 197 TH2I * h9 = new TH2I("hLowPHOSxyMod5","Low Gain Rows x Columns for PHOS module 5;Row #;Column #", 64, 0, 64, 56, 0, 56) ;
7d297381 198 Add2RawsList(h9,kLGmod5, expert, !image, !saveCorr) ;
98e3f48c 199
db72ff3b 200 TH1I * h10 = new TH1I("hLowPhosModules", "Low Gain Hits in EMCA PHOS modules;# of hit modules;Counts", 6, 0, 6) ;
98e3f48c 201 h10->Sumw2() ;
7d297381 202 Add2RawsList(h10, kNmodLG, !expert, image, !saveCorr) ;
db72ff3b 203 TH1I * h11 = new TH1I("hHighPhosModules", "High Gain Hits in EMCA PHOS modules;# of hit modules;Counts", 6, 0, 6) ;
98e3f48c 204 h11->Sumw2() ;
7d297381 205 Add2RawsList(h11, kNmodHG, !expert, image, !saveCorr) ;
98e3f48c 206
db72ff3b 207 TH1F * h12 = new TH1F("hLowPhosRawtime", "Low Gain Time of raw hits in PHOS;Time [ns];Counts", 500, -50., 200.) ;
98e3f48c 208 h12->Sumw2() ;
7d297381 209 Add2RawsList(h12, kLGtime, !expert, image, !saveCorr) ;
db72ff3b 210 TH1F * h13 = new TH1F("hHighPhosRawtime", "High Gain Time of raw hits in PHOS;Time [ns];Counts", 500, -50., 200.) ;
98e3f48c 211 h13->Sumw2() ;
7d297381 212 Add2RawsList(h13, kHGtime, !expert, image, !saveCorr) ;
98e3f48c 213
db72ff3b 214 TH1F * h14 = new TH1F("hLowPhosRawEnergy", "Low Gain Energy of raw hits in PHOS;Energy [MeV];Counts", 500, 0., 1000.) ;
98e3f48c 215 h14->Sumw2() ;
7d297381 216 Add2RawsList(h14, kSpecLG, !expert, image, !saveCorr) ;
db72ff3b 217 TH1F * h15 = new TH1F("hHighPhosRawEnergy", "High Gain Energy of raw hits in PHOS;Energy [MeV];Counts",500,0., 1000.) ;
98e3f48c 218 h15->Sumw2() ;
7d297381 219 Add2RawsList(h15, kSpecHG, !expert, image, !saveCorr) ;
98e3f48c 220
db72ff3b 221 TH1F * h16 = new TH1F("hLowNtot", "Low Gain Total Number of raw hits in PHOS;# of hits;Counts", 500, 0., 5000.) ;
98e3f48c 222 h16->Sumw2() ;
7d297381 223 Add2RawsList(h16, kNtotLG, !expert, saveCorr, image) ;
db72ff3b 224 TH1F * h17 = new TH1F("hHighNtot", "High Gain Total Number of raw hits in PHOS;# of hits;Counts",500,0., 5000.) ;
98e3f48c 225 h17->Sumw2() ;
7d297381 226 Add2RawsList(h17, kNtotHG, !expert, saveCorr, image) ;
98e3f48c 227
db72ff3b 228 TH1F * h18 = new TH1F("hLowEtot", "Low Gain Total Energy of raw hits in PHOS;Energy [MeV];Counts", 500, 0., 5000.) ;
98e3f48c 229 h18->Sumw2() ;
7d297381 230 Add2RawsList(h18, kEtotLG, !expert, saveCorr, image) ;
db72ff3b 231 TH1F * h19 = new TH1F("hHighEtot", "High Gain Total Energy of raw hits in PHOS;Energy [MeV];Counts",500,0., 100000.) ;
98e3f48c 232 h19->Sumw2() ;
7d297381 233 Add2RawsList(h19, kEtotHG, !expert, saveCorr, image) ;
7285e69f 234
db72ff3b 235 TH2F * h20 = new TH2F("hQualHGxyMod1","High Gain signal quality Rows x Columns module 1;Row #;Column #", 64, 0, 64, 56, 0, 56) ;
98e3f48c 236 h20->SetOption("colz");
7d297381 237 Add2RawsList(h20,kHGqualMod1, expert, !image, !saveCorr) ;
db72ff3b 238 TH2F * h21 = new TH2F("hQualHGxyMod2","High Gain signal quality Rows x Columns module 2;Row #;Column #", 64, 0, 64, 56, 0, 56) ;
98e3f48c 239 h21->SetOption("colz");
7d297381 240 Add2RawsList(h21,kHGqualMod2, expert, !image, !saveCorr) ;
db72ff3b 241 TH2F * h22 = new TH2F("hQualHGxyMod3","High Gain signal quality Rows x Columns module 3;Row #;Column #", 64, 0, 64, 56, 0, 56) ;
98e3f48c 242 h22->SetOption("colz");
7d297381 243 Add2RawsList(h22,kHGqualMod3, expert, !image, !saveCorr) ;
db72ff3b 244 TH2F * h23 = new TH2F("hQualHGxyMod4","High Gain signal quality Rows x Columns module 4;Row #;Column #", 64, 0, 64, 56, 0, 56) ;
98e3f48c 245 h23->SetOption("colz");
7d297381 246 Add2RawsList(h23,kHGqualMod4, expert, !image, !saveCorr) ;
db72ff3b 247 TH2F * h24 = new TH2F("hQualHGxyMod5","High Gain signal quality Rows x Columns module 5;Row #;Column #", 64, 0, 64, 56, 0, 56) ;
7285e69f 248 h24->SetOption("colz");
7d297381 249 Add2RawsList(h24,kHGqualMod5, expert, !image, !saveCorr) ;
db72ff3b 250 TH2F * h25 = new TH2F("hQualLGxyMod1","Low Gain signal quality Rows x Columns module 1;Row #;Column #", 64, 0, 64, 56, 0, 56) ;
7285e69f 251 h25->SetOption("colz");
7d297381 252 Add2RawsList(h25,kLGqualMod1, expert, !image, !saveCorr) ;
db72ff3b 253 TH2F * h26 = new TH2F("hQualLGxyMod2","Low Gain signal quality Rows x Columns module 2;Row #;Column #", 64, 0, 64, 56, 0, 56) ;
7285e69f 254 h26->SetOption("colz");
7d297381 255 Add2RawsList(h26,kLGqualMod2, expert, !image, !saveCorr) ;
db72ff3b 256 TH2F * h27 = new TH2F("hQualLGxyMod3","Low Gain signal quality Rows x Columns module 3;Row #;Column #", 64, 0, 64, 56, 0, 56) ;
7285e69f 257 h27->SetOption("colz");
7d297381 258 Add2RawsList(h27,kLGqualMod3, expert, !image, !saveCorr) ;
db72ff3b 259 TH2F * h28 = new TH2F("hQualLGxyMod4","Low Gain signal quality Rows x Columns module 4;Row #;Column #", 64, 0, 64, 56, 0, 56) ;
7285e69f 260 h28->SetOption("colz");
7d297381 261 Add2RawsList(h28,kLGqualMod4, expert, !image, !saveCorr) ;
db72ff3b 262 TH2F * h29 = new TH2F("hQualLGxyMod5","Low Gain signal quality Rows x Columns module 5;Row #;Column #", 64, 0, 64, 56, 0, 56) ;
7285e69f 263 h29->SetOption("colz");
7d297381 264 Add2RawsList(h29,kLGqualMod5, expert, !image, !saveCorr) ;
7285e69f 265
db72ff3b 266 TH1F * h30 = new TH1F("hLGpedRMS","Low Gain pedestal RMS;Width [ADC counts];Counts",200,0.,20.) ;
7285e69f 267 h30->Sumw2() ;
7d297381 268 Add2RawsList(h30,kLGpedRMS, !expert, image, !saveCorr) ;
db72ff3b 269 TH1F * h31 = new TH1F("hHGpedRMS","High Gain pedestal RMS;Width [ADC counts];Counts",200,0.,20.) ;
7285e69f 270 h31->Sumw2() ;
7d297381 271 Add2RawsList(h31,kHGpedRMS, !expert, image, !saveCorr) ;
7285e69f 272
db72ff3b 273 TH2F * h32 = new TH2F("hpedRMSHGxyMod1","High Gain pedestal RMS Rows x Columns module 1;Row #;Column #", 64, 0, 64, 56, 0, 56) ;
7285e69f 274 h32->SetOption("colz");
7d297381 275 Add2RawsList(h32,kHGpedRMSMod1, expert, !image, !saveCorr) ;
db72ff3b 276 TH2F * h33 = new TH2F("hpedRMSHGxyMod2","High Gain pedestal RMS Rows x Columns module 2;Row #;Column #", 64, 0, 64, 56, 0, 56) ;
7285e69f 277 h33->SetOption("colz");
7d297381 278 Add2RawsList(h33,kHGpedRMSMod2, expert, !image, !saveCorr) ;
db72ff3b 279 TH2F * h34 = new TH2F("hpedRMSHGxyMod3","High Gain pedestal RMS Rows x Columns module 3;Row #;Column #", 64, 0, 64, 56, 0, 56) ;
7285e69f 280 h34->SetOption("colz");
7d297381 281 Add2RawsList(h34,kHGpedRMSMod3, expert, !image, !saveCorr) ;
db72ff3b 282 TH2F * h35 = new TH2F("hpedRMSHGxyMod4","High Gain pedestal RMS Rows x Columns module 4;Row #;Column #", 64, 0, 64, 56, 0, 56) ;
7285e69f 283 h35->SetOption("colz");
7d297381 284 Add2RawsList(h35,kHGpedRMSMod4, expert, !image, !saveCorr) ;
db72ff3b 285 TH2F * h36 = new TH2F("hpedRMSHGxyMod5","High Gain pedestal RMS Rows x Columns module 5;Row #;Column #", 64, 0, 64, 56, 0, 56) ;
7285e69f 286 h36->SetOption("colz");
7d297381 287 Add2RawsList(h36,kHGpedRMSMod5, expert, !image, !saveCorr) ;
db72ff3b 288 TH2F * h37 = new TH2F("hpedRMSLGxyMod1","Low Gain pedestal RMS Rows x Columns module 1;Row #;Column #", 64, 0, 64, 56, 0, 56) ;
7285e69f 289 h37->SetOption("colz");
7d297381 290 Add2RawsList(h37,kLGpedRMSMod1, expert, !image, !saveCorr) ;
db72ff3b 291 TH2F * h38 = new TH2F("hpedRMSLGxyMod2","Low Gain pedestal RMS Rows x Columns module 2;Row #;Column #", 64, 0, 64, 56, 0, 56) ;
7285e69f 292 h38->SetOption("colz");
7d297381 293 Add2RawsList(h38,kLGpedRMSMod2, expert, !image, !saveCorr) ;
db72ff3b 294 TH2F * h39 = new TH2F("hpedRMSLGxyMod3","Low Gain pedestal RMS Rows x Columns module 3;Row #;Column #", 64, 0, 64, 56, 0, 56) ;
7285e69f 295 h39->SetOption("colz");
7d297381 296 Add2RawsList(h39,kLGpedRMSMod3, expert, !image, !saveCorr) ;
db72ff3b 297 TH2F * h40 = new TH2F("hpedRMSLGxyMod4","Low Gain pedestal RMS Rows x Columns module 4;Row #;Column #", 64, 0, 64, 56, 0, 56) ;
7285e69f 298 h40->SetOption("colz");
7d297381 299 Add2RawsList(h40,kLGpedRMSMod4, expert, !image, !saveCorr) ;
db72ff3b 300 TH2F * h41 = new TH2F("hpedRMSLGxyMod5","Low Gain pedestal RMS Rows x Columns module 5;Row #;Column #", 64, 0, 64, 56, 0, 56) ;
7285e69f 301 h41->SetOption("colz");
7d297381 302 Add2RawsList(h41,kLGpedRMSMod5, expert, !image, !saveCorr) ;
7285e69f 303
304 /*
305 TH1F * h42 = new TH1F("hLGpedMean","Low Gain pedestal Mean",200,0.,20.) ;
306 h42->Sumw2() ;
7d297381 307 Add2RawsList(h42,kLGpedMean, !expert, image, !saveCorr) ;
7285e69f 308 TH1F * h43 = new TH1F("hHGpedMean","High Gain pedestal Mean",200,0.,20.) ;
309 h43->Sumw2() ;
7d297381 310 Add2RawsList(h43,kHGpedMean, !expert, image, !saveCorr) ;
7285e69f 311
312 TH2F * h44 = new TH2F("hpedMeanHGxyMod1","High Gain pedestal Mean Rows x Columns module 1", 64, 0, 64, 56, 0, 56) ;
313 h44->SetOption("colz");
7d297381 314 Add2RawsList(h44,kHGpedMeanMod1, expert, !image, !saveCorr) ;
7285e69f 315 TH2F * h45 = new TH2F("hpedMeanHGxyMod2","High Gain pedestal Mean Rows x Columns module 2", 64, 0, 64, 56, 0, 56) ;
316 h45->SetOption("colz");
7d297381 317 Add2RawsList(h45,kHGpedMeanMod2, expert, !image, !saveCorr) ;
7285e69f 318 TH2F * h46 = new TH2F("hpedMeanHGxyMod3","High Gain pedestal Mean Rows x Columns module 3", 64, 0, 64, 56, 0, 56) ;
319 h46->SetOption("colz");
7d297381 320 Add2RawsList(h46,kHGpedMeanMod3, expert, !image, !saveCorr) ;
7285e69f 321 TH2F * h47 = new TH2F("hpedMeanHGxyMod4","High Gain pedestal Mean Rows x Columns module 4", 64, 0, 64, 56, 0, 56) ;
322 h47->SetOption("colz");
7d297381 323 Add2RawsList(h47,kHGpedMeanMod4, expert, !image, !saveCorr) ;
7285e69f 324 TH2F * h48 = new TH2F("hpedMeanHGxyMod5","High Gain pedestal Mean Rows x Columns module 5", 64, 0, 64, 56, 0, 56) ;
325 h48->SetOption("colz");
7d297381 326 Add2RawsList(h48,kHGpedMeanMod5, expert, !image, !saveCorr) ;
7285e69f 327 TH2F * h49 = new TH2F("hpedMeanLGxyMod1","Low Gain pedestal Mean Rows x Columns module 1", 64, 0, 64, 56, 0, 56) ;
328 h49->SetOption("colz");
7d297381 329 Add2RawsList(h49,kLGpedMeanMod1, expert, !image, !saveCorr) ;
7285e69f 330 TH2F * h50 = new TH2F("hpedMeanLGxyMod2","Low Gain pedestal Mean Rows x Columns module 2", 64, 0, 64, 56, 0, 56) ;
331 h50->SetOption("colz");
7d297381 332 Add2RawsList(h50,kLGpedMeanMod2, expert, !image, !saveCorr) ;
7285e69f 333 TH2F * h51 = new TH2F("hpedMeanLGxyMod3","Low Gain pedestal Mean Rows x Columns module 3", 64, 0, 64, 56, 0, 56) ;
334 h51->SetOption("colz");
7d297381 335 Add2RawsList(h51,kLGpedMeanMod3, expert, !image, !saveCorr) ;
7285e69f 336 TH2F * h52 = new TH2F("hpedMeanLGxyMod4","Low Gain pedestal Mean Rows x Columns module 4", 64, 0, 64, 56, 0, 56) ;
337 h52->SetOption("colz");
7d297381 338 Add2RawsList(h52,kLGpedMeanMod4, expert, !image, !saveCorr) ;
7285e69f 339 TH2F * h53 = new TH2F("hpedMeanLGxyMod5","Low Gain pedestal Mean Rows x Columns module 5", 64, 0, 64, 56, 0, 56) ;
340 h53->SetOption("colz");
7d297381 341 Add2RawsList(h53,kLGpedMeanMod5, expert, !image, !saveCorr) ;
7285e69f 342 */
04236e67 343}
344
04236e67 345//____________________________________________________________________________
346void AliPHOSQADataMakerRec::MakeESDs(AliESDEvent * esd)
347{
348 // make QA data from ESDs
349
eca4fa66 350 // Check id histograms already created for this Event Specie
351 if ( ! GetESDsData(kESDSpec) )
352 InitESDs() ;
353
ebde5500 354 Int_t nTot = 0 ;
355 Double_t eTot = 0 ;
04236e67 356 for ( Int_t index = 0; index < esd->GetNumberOfCaloClusters() ; index++ ) {
ebde5500 357 AliESDCaloCluster * clu = esd->GetCaloCluster(index) ;
358 if( clu->IsPHOS() ) {
359 GetESDsData(kESDSpec)->Fill(clu->E()) ;
360 Double_t *pid=clu->GetPid() ;
361 GetESDsData(kESDpid)->Fill(pid[AliPID::kPhoton]) ;
362 eTot+=clu->E() ;
363 nTot++ ;
364 }
04236e67 365 }
ebde5500 366 GetESDsData(kESDNtot)->Fill(nTot) ;
367 GetESDsData(kESDEtot)->Fill(eTot) ;
04236e67 368}
369
04236e67 370//____________________________________________________________________________
371void AliPHOSQADataMakerRec::MakeRaws(AliRawReader* rawReader)
372{
39569d36 373 //Fill prepared histograms with Raw digit properties
eca4fa66 374
375 // Check id histograms already created for this Event Specie
376 if ( ! GetRawsData(kLGpedRMS) )
377 InitRaws() ;
378
ebde5500 379 rawReader->Reset() ;
380 AliPHOSRawDecoder * decoder ;
b8bd1ab8 381 if(strcmp(GetRecoParam()->EMCDecoderVersion(),"v1")==0)
ebde5500 382 decoder=new AliPHOSRawDecoderv1(rawReader);
383 else
b8bd1ab8 384 if(strcmp(GetRecoParam()->EMCDecoderVersion(),"v2")==0)
ebde5500 385 decoder=new AliPHOSRawDecoderv2(rawReader);
386 else
387 decoder=new AliPHOSRawDecoder(rawReader);
7285e69f 388 //decoder->SubtractPedestals(GetRecoParam()->EMCSubtractPedestals());
389 decoder->SubtractPedestals(kTRUE);
ebde5500 390 Double_t lgEtot=0. ;
391 Double_t hgEtot=0. ;
392 Int_t lgNtot=0 ;
393 Int_t hgNtot=0 ;
394
395 while (decoder->NextDigit()) {
396 Int_t module = decoder->GetModule() ;
397 Int_t row = decoder->GetRow() ;
398 Int_t col = decoder->GetColumn() ;
399 Double_t time = decoder->GetTime() ;
400 Double_t energy = decoder->GetEnergy() ;
401 Bool_t lowGain = decoder->IsLowGain();
04236e67 402 if (lowGain) {
7285e69f 403 //if(GetRecoParam()->EMCSubtractPedestals())
404 GetRawsData(kLGpedRMS)->Fill(decoder->GetPedestalRMS()) ;
a5997872 405 if(energy<2.)
ebde5500 406 continue ;
407 switch(module){
a5997872 408 case 1: GetRawsData(kLGmod1)->Fill(row-0.5,col-0.5) ; break ;
409 case 2: GetRawsData(kLGmod2)->Fill(row-0.5,col-0.5) ; break ;
410 case 3: GetRawsData(kLGmod3)->Fill(row-0.5,col-0.5) ; break ;
411 case 4: GetRawsData(kLGmod4)->Fill(row-0.5,col-0.5) ; break ;
412 case 5: GetRawsData(kLGmod5)->Fill(row-0.5,col-0.5) ; break ;
7285e69f 413 }
414 switch (module){
415 case 1: ((TH2F*)GetRawsData(kLGpedRMSMod1))->Fill(row-0.5,col-0.5,decoder->GetPedestalRMS()) ; break ;
416 case 2: ((TH2F*)GetRawsData(kLGpedRMSMod2))->Fill(row-0.5,col-0.5,decoder->GetPedestalRMS()) ; break ;
417 case 3: ((TH2F*)GetRawsData(kLGpedRMSMod3))->Fill(row-0.5,col-0.5,decoder->GetPedestalRMS()) ; break ;
418 case 4: ((TH2F*)GetRawsData(kLGpedRMSMod4))->Fill(row-0.5,col-0.5,decoder->GetPedestalRMS()) ; break ;
419 case 5: ((TH2F*)GetRawsData(kLGpedRMSMod5))->Fill(row-0.5,col-0.5,decoder->GetPedestalRMS()) ; break ;
420 }
421 //if quality was evaluated, fill histo
422 if(strcmp(GetRecoParam()->EMCDecoderVersion(),"v1")==0){
423 switch (module){
424 case 1: ((TH2F*)GetRawsData(kLGqualMod1))->Fill(row-0.5,col-0.5,decoder->GetSampleQuality()) ; break ;
425 case 2: ((TH2F*)GetRawsData(kLGqualMod2))->Fill(row-0.5,col-0.5,decoder->GetSampleQuality()) ; break ;
426 case 3: ((TH2F*)GetRawsData(kLGqualMod3))->Fill(row-0.5,col-0.5,decoder->GetSampleQuality()) ; break ;
427 case 4: ((TH2F*)GetRawsData(kLGqualMod4))->Fill(row-0.5,col-0.5,decoder->GetSampleQuality()) ; break ;
428 case 5: ((TH2F*)GetRawsData(kLGqualMod5))->Fill(row-0.5,col-0.5,decoder->GetSampleQuality()) ; break ;
429 }
a5997872 430 }
431 GetRawsData(kNmodLG)->Fill(module) ;
432 GetRawsData(kLGtime)->Fill(time) ;
433 GetRawsData(kSpecLG)->Fill(energy) ;
434 lgEtot+=energy ;
435 lgNtot++ ;
436 } else {
2c832255 437 //if this isnon-ZS run - fill pedestal RMS
7285e69f 438 //if(GetRecoParam()->EMCSubtractPedestals())
2c832255 439 GetRawsData(kHGpedRMS)->Fill(decoder->GetPedestalRMS()) ;
a5997872 440 if(energy<8.)
ebde5500 441 continue ;
a5997872 442 switch (module){
443 case 1: GetRawsData(kHGmod1)->Fill(row-0.5,col-0.5) ; break ;
444 case 2: GetRawsData(kHGmod2)->Fill(row-0.5,col-0.5) ; break ;
445 case 3: GetRawsData(kHGmod3)->Fill(row-0.5,col-0.5) ; break ;
446 case 4: GetRawsData(kHGmod4)->Fill(row-0.5,col-0.5) ; break ;
447 case 5: GetRawsData(kHGmod5)->Fill(row-0.5,col-0.5) ; break ;
7285e69f 448 }
449 switch (module){
450 case 1: ((TH2F*)GetRawsData(kHGpedRMSMod1))->Fill(row-0.5,col-0.5,decoder->GetPedestalRMS()) ; break ;
451 case 2: ((TH2F*)GetRawsData(kHGpedRMSMod2))->Fill(row-0.5,col-0.5,decoder->GetPedestalRMS()) ; break ;
452 case 3: ((TH2F*)GetRawsData(kHGpedRMSMod3))->Fill(row-0.5,col-0.5,decoder->GetPedestalRMS()) ; break ;
453 case 4: ((TH2F*)GetRawsData(kHGpedRMSMod4))->Fill(row-0.5,col-0.5,decoder->GetPedestalRMS()) ; break ;
454 case 5: ((TH2F*)GetRawsData(kHGpedRMSMod5))->Fill(row-0.5,col-0.5,decoder->GetPedestalRMS()) ; break ;
455 }
2c832255 456 //if quality was evaluated, fill histo
457 if(strcmp(GetRecoParam()->EMCDecoderVersion(),"v1")==0){
458 switch (module){
459 case 1: ((TH2F*)GetRawsData(kHGqualMod1))->Fill(row-0.5,col-0.5,decoder->GetSampleQuality()) ; break ;
460 case 2: ((TH2F*)GetRawsData(kHGqualMod2))->Fill(row-0.5,col-0.5,decoder->GetSampleQuality()) ; break ;
461 case 3: ((TH2F*)GetRawsData(kHGqualMod3))->Fill(row-0.5,col-0.5,decoder->GetSampleQuality()) ; break ;
462 case 4: ((TH2F*)GetRawsData(kHGqualMod4))->Fill(row-0.5,col-0.5,decoder->GetSampleQuality()) ; break ;
463 case 5: ((TH2F*)GetRawsData(kHGqualMod5))->Fill(row-0.5,col-0.5,decoder->GetSampleQuality()) ; break ;
464 }
465 }
a5997872 466 GetRawsData(kNmodHG)->Fill(module) ;
467 GetRawsData(kHGtime)->Fill(time) ;
468 GetRawsData(kSpecHG)->Fill(energy) ;
469 hgEtot+=energy ;
470 hgNtot++ ;
471 }
ebde5500 472 }
372089c7 473 delete decoder;
a5997872 474 GetRawsData(kEtotLG)->Fill(lgEtot) ;
4e25ac79 475 TParameter<double> * p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(AliQAv1::kRAWS).Data(), GetRawsData(kEtotLG)->GetName()))) ;
719e870c 476 if (p) p->SetVal(lgEtot) ;
a5997872 477 GetRawsData(kEtotHG)->Fill(hgEtot) ;
4e25ac79 478 p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(AliQAv1::kRAWS).Data(), GetRawsData(kEtotHG)->GetName()))) ;
719e870c 479 if (p) p->SetVal(hgEtot) ;
a5997872 480 GetRawsData(kNtotLG)->Fill(lgNtot) ;
4e25ac79 481 p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(AliQAv1::kRAWS).Data(), GetRawsData(kNtotLG)->GetName()))) ;
719e870c 482 if (p) p->SetVal(lgNtot) ;
a5997872 483 GetRawsData(kNtotHG)->Fill(hgNtot) ;
4e25ac79 484 p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(AliQAv1::kRAWS).Data(), GetRawsData(kNtotHG)->GetName()))) ;
719e870c 485 if (p) p->SetVal(hgNtot) ;
04236e67 486}
44ed7a66 487
488//____________________________________________________________________________
489void AliPHOSQADataMakerRec::MakeDigits(TClonesArray * digits)
490{
491 // makes data from Digits
492
eca4fa66 493 // Check id histograms already created for this Event Specie
494 if ( ! GetDigitsData(kDigits) )
495 InitDigits() ;
496
497 TH1 * hist = GetDigitsData(kDigitsMul) ;
498 if ( ! hist )
499 InitDigits() ;
500 GetDigitsData(kDigitsMul)->Fill(digits->GetEntriesFast()) ;
44ed7a66 501 TIter next(digits) ;
502 AliPHOSDigit * digit ;
503 while ( (digit = dynamic_cast<AliPHOSDigit *>(next())) ) {
504 GetDigitsData(kDigits)->Fill( digit->GetEnergy()) ;
505 }
506}
507
508//____________________________________________________________________________
509void AliPHOSQADataMakerRec::MakeDigits(TTree * digitTree)
510{
511 // makes data from Digit Tree
512 TClonesArray * digits = new TClonesArray("AliPHOSDigit", 1000) ;
513
514 TBranch * branch = digitTree->GetBranch("PHOS") ;
515 if ( ! branch ) {
516 AliWarning("PHOS branch in Digit Tree not found") ;
517 } else {
518 branch->SetAddress(&digits) ;
519 branch->GetEntry(0) ;
520 MakeDigits(digits) ;
521 }
522}
523
04236e67 524//____________________________________________________________________________
525void AliPHOSQADataMakerRec::MakeRecPoints(TTree * clustersTree)
526{
527 {
528 // makes data from RecPoints
529 TBranch *emcbranch = clustersTree->GetBranch("PHOSEmcRP");
530 if (!emcbranch) {
531 AliError("can't get the branch with the PHOS EMC clusters !");
532 return;
533 }
eca4fa66 534
535 // Check id histograms already created for this Event Specie
536 if ( ! GetRecPointsData(kRPSpec) )
537 InitRecPoints() ;
538
04236e67 539 TObjArray * emcrecpoints = new TObjArray(100) ;
540 emcbranch->SetAddress(&emcrecpoints);
541 emcbranch->GetEntry(0);
542
ebde5500 543 GetRecPointsData(kRPNtot)->Fill(emcrecpoints->GetEntriesFast()) ;
04236e67 544 TIter next(emcrecpoints) ;
545 AliPHOSEmcRecPoint * rp ;
ebde5500 546 Double_t eTot = 0. ;
eca4fa66 547 while ( (rp = static_cast<AliPHOSEmcRecPoint *>(next())) ) {
ebde5500 548 GetRecPointsData(kRPSpec)->Fill( rp->GetEnergy()) ;
549 Int_t mod = rp->GetPHOSMod() ;
550 TVector3 pos ;
551 rp->GetLocalPosition(pos) ;
552 switch(mod){
553 case 1: GetRecPointsData(kRPmod1)->Fill(pos.X(),pos.Z()) ; break ;
554 case 2: GetRecPointsData(kRPmod2)->Fill(pos.X(),pos.Z()) ; break ;
555 case 3: GetRecPointsData(kRPmod3)->Fill(pos.X(),pos.Z()) ; break ;
556 case 4: GetRecPointsData(kRPmod4)->Fill(pos.X(),pos.Z()) ; break ;
557 case 5: GetRecPointsData(kRPmod5)->Fill(pos.X(),pos.Z()) ; break ;
558 }
559 eTot+= rp->GetEnergy() ;
04236e67 560 }
ebde5500 561 GetRecPointsData(kRPEtot)->Fill(eTot) ;
04236e67 562 emcrecpoints->Delete();
563 delete emcrecpoints;
564 }
565 {
566 TBranch *cpvbranch = clustersTree->GetBranch("PHOSCpvRP");
567 if (!cpvbranch) {
568 AliError("can't get the branch with the PHOS CPV clusters !");
569 return;
570 }
571 TObjArray *cpvrecpoints = new TObjArray(100) ;
572 cpvbranch->SetAddress(&cpvrecpoints);
573 cpvbranch->GetEntry(0);
574
ebde5500 575 GetRecPointsData(kRPNcpv)->Fill(cpvrecpoints->GetEntriesFast()) ;
04236e67 576 cpvrecpoints->Delete();
577 delete cpvrecpoints;
578 }
579}
580
04236e67 581//____________________________________________________________________________
582void AliPHOSQADataMakerRec::StartOfDetectorCycle()
583{
584 //Detector specific actions at start of cycle
585
586}