1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 Produces the data needed to calculate the quality assurance.
19 All data must be mergeable objects.
22 // --- ROOT system ---
23 #include <TClonesArray.h>
29 // --- Standard library ---
31 // --- AliRoot header files ---
32 #include "AliESDEvent.h"
34 #include "AliVZEROQADataMakerRec.h"
35 #include "AliQAChecker.h"
36 #include "AliRawReader.h"
37 #include "AliVZERORawStream.h"
38 #include "AliVZEROReconstructor.h"
41 ClassImp(AliVZEROQADataMakerRec)
43 //____________________________________________________________________________
44 AliVZEROQADataMakerRec::AliVZEROQADataMakerRec() :
45 AliQADataMakerRec(AliQA::GetDetName(AliQA::kVZERO), "VZERO Quality Assurance Data Maker")
50 //____________________________________________________________________________
51 AliVZEROQADataMakerRec::AliVZEROQADataMakerRec(const AliVZEROQADataMakerRec& qadm) :
55 SetName((const char*)qadm.GetName()) ;
56 SetTitle((const char*)qadm.GetTitle());
59 //__________________________________________________________________
60 AliVZEROQADataMakerRec& AliVZEROQADataMakerRec::operator = (const AliVZEROQADataMakerRec& qadm )
63 this->~AliVZEROQADataMakerRec();
64 new(this) AliVZEROQADataMakerRec(qadm);
68 //____________________________________________________________________________
69 void AliVZEROQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
71 //Detector specific actions at end of cycle
73 AliQAChecker::Instance()->Run(AliQA::kVZERO, task, list) ;
76 //____________________________________________________________________________
77 void AliVZEROQADataMakerRec::InitESDs()
79 //Create histograms to control ESD
81 TH1I * h1 = new TH1I("hVZERONbPMA", "Number of PMs fired in V0A", 80, 0, 79);
85 TH1I * h2 = new TH1I("hVZERONbPMC", "Number of PMs fired in V0C", 80, 0, 79);
89 TH1I * h3 = new TH1I("hVZEROMultA", "Multiplicity in V0A", 50, 0, 49) ;
93 TH1I * h4 = new TH1I("hVZEROMultC", "Multiplicity in V0C", 50, 0, 49) ;
97 TH2F * h5 = new TH2F("fVzeroMult", "Vzero multiplicity",
98 64, -0.5, 63.5,100, -0.5, 99.5);
99 h5->GetXaxis()->SetTitle("Vzero PMT");
100 h5->GetYaxis()->SetTitle("Multiplicity");
102 Add2ESDsList(h5, 4) ;
103 TH1F * h6 = new TH1F("fBBA","BB Vzero A", 32, -0.5,31.5);
105 Add2ESDsList(h6, 5) ;
106 TH1F * h7 = new TH1F("fBGA","BG Vzero A", 32, -0.5,31.5);
108 Add2ESDsList(h7, 6) ;
109 TH1F * h8 = new TH1F("fBBC","BB Vzero C", 32, -0.5,31.5);
111 Add2ESDsList(h8, 7) ;
112 TH1F * h9 = new TH1F("fBGC","BG Vzero C", 32, -0.5,31.5);
114 Add2ESDsList(h9, 8) ;
119 //____________________________________________________________________________
120 void AliVZEROQADataMakerRec::InitRaws()
122 // create Raws histograms in Raws subdir
129 TH2I * h0 = new TH2I("hCellADCMap0","ADC vs Cell for EVEN Integrator", 70, 0, 69, 512, 0, 1023);
132 TH2I * h1 = new TH2I("hCellADCMap1","ADC vs Cell for ODD Integrator", 70, 0, 69, 512, 0, 1023);
136 for (Int_t i=0; i<64; i++)
138 sprintf(ADCname,"hRaw0ADC%d",i);
139 sprintf(texte,"Raw ADC in cell %d for even integrator",i);
140 fhRawADC0[i]= new TH1I(ADCname,texte,1024,0,1023);
141 Add2RawsList(fhRawADC0[i],i+2);
143 sprintf(ADCname,"hRaw1ADC%d",i);
144 sprintf(texte,"Raw ADC in cell %d for odd integrator",i);
145 fhRawADC1[i]= new TH1I(ADCname,texte,1024,0,1023);
146 Add2RawsList(fhRawADC1[i],i+2+64);
151 //____________________________________________________________________________
152 void AliVZEROQADataMakerRec::MakeESDs(AliESDEvent * esd)
154 // make QA data from ESDs
156 AliESDVZERO *esdVZERO=esd->GetVZEROData();
159 GetESDsData(0)->Fill(esdVZERO->GetNbPMV0A());
160 GetESDsData(1)->Fill(esdVZERO->GetNbPMV0C());
161 GetESDsData(2)->Fill(esdVZERO->GetMTotV0A());
162 GetESDsData(3)->Fill(esdVZERO->GetMTotV0C());
163 for(Int_t i=0;i<64;i++)
164 GetESDsData(4)->Fill((Float_t) i,(Float_t) esdVZERO->GetMultiplicity(i));
165 for(Int_t i=0;i<32;i++) {
166 if (esdVZERO->BBTriggerV0A(i))
167 GetESDsData(5)->Fill((Float_t) i);
168 if (esdVZERO->BGTriggerV0A(i))
169 GetESDsData(6)->Fill((Float_t) i);
170 if (esdVZERO->BBTriggerV0C(i))
171 GetESDsData(7)->Fill((Float_t) i);
172 if (esdVZERO->BGTriggerV0C(i))
173 GetESDsData(8)->Fill((Float_t) i);
179 //____________________________________________________________________________
180 void AliVZEROQADataMakerRec::MakeRaws(AliRawReader* rawReader)
182 //Fill histograms with Raws
184 AliVZERORawStream* rawStream = new AliVZERORawStream(rawReader);
187 for(Int_t i=0; i<64; i++)
189 if(!rawStream->GetIntegratorFlag(i,10))
191 // even integrator - fills index 2 to 65
192 GetRawsData(0)->Fill(i,rawStream->GetADC(i)) ;
193 GetRawsData(i+2)->Fill(rawStream->GetADC(i)) ; }
196 // odd integrator - fills index 66 to 129
197 GetRawsData(1)->Fill(i,rawStream->GetADC(i)) ;
198 GetRawsData(i+2+64)->Fill(rawStream->GetADC(i)) ; }
203 //____________________________________________________________________________
204 void AliVZEROQADataMakerRec::StartOfDetectorCycle()
206 // Detector specific actions at start of cycle