]>
Commit | Line | Data |
---|---|---|
379510c2 | 1 | /************************************************************************** |
2 | * Copyright(c) 2007-2009, 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 | // Checks the quality assurance | |
19 | // by comparing with reference data | |
20 | // contained in a DB | |
21 | // ------------------------------------------------------------- | |
22 | // W. Ferrarese + P. Cerello INFN Torino Feb 2008 | |
23 | // M. Nicassio D. Elia INFN Bari April 2008 | |
24 | // maria.nicassio@ba.infn.it | |
25 | ||
26 | // --- ROOT system --- | |
27 | #include <TTree.h> | |
28 | #include <TH2.h> | |
29 | #include <TH1.h> | |
30 | // --- Standard library --- | |
31 | ||
32 | // --- AliRoot header files --- | |
33 | #include "AliRun.h" | |
34 | #include "AliITSQADataMakerSim.h" | |
35 | #include "AliITSQASPDDataMakerSim.h" | |
4e25ac79 | 36 | #include "AliQAv1.h" |
379510c2 | 37 | #include "AliQAChecker.h" |
38 | #include "AliITSdigit.h" | |
39 | #include "AliITSdigitSPD.h" | |
40 | #include "AliITS.h" | |
41 | #include "AliITSmodule.h" | |
42 | #include "AliITShit.h" | |
43 | #include "AliITSLoader.h" | |
44 | #include "AliRunLoader.h" | |
45 | ||
46 | ClassImp(AliITSQASPDDataMakerSim) | |
47 | ||
48 | //____________________________________________________________________________ | |
49 | AliITSQASPDDataMakerSim::AliITSQASPDDataMakerSim(AliITSQADataMakerSim *aliITSQADataMakerSim) : | |
50 | TObject(), | |
51 | fAliITSQADataMakerSim(aliITSQADataMakerSim), | |
7a0e5776 | 52 | fSPDhHTask(0), |
53 | fSPDhSTask(0), | |
54 | fSPDhDTask(0), | |
3f905799 | 55 | fGenOffsetH(0), |
56 | fGenOffsetS(0), | |
57 | fGenOffsetD(0) | |
379510c2 | 58 | { |
59 | //ctor used to discriminate OnLine-Offline analysis | |
4a903927 | 60 | fGenOffsetH= new Int_t[AliRecoParam::kNSpecies]; |
61 | fGenOffsetS= new Int_t[AliRecoParam::kNSpecies]; | |
62 | fGenOffsetD= new Int_t[AliRecoParam::kNSpecies]; | |
63 | for(Int_t i=0; i<AliRecoParam::kNSpecies; i++) { | |
64 | fGenOffsetH[i]= 0; | |
65 | fGenOffsetS[i]= 0; | |
66 | fGenOffsetD[i]= 0; | |
67 | } | |
379510c2 | 68 | } |
69 | ||
70 | //____________________________________________________________________________ | |
71 | AliITSQASPDDataMakerSim::AliITSQASPDDataMakerSim(const AliITSQASPDDataMakerSim& qadm) : | |
72 | TObject(), | |
73 | fAliITSQADataMakerSim(qadm.fAliITSQADataMakerSim), | |
7a0e5776 | 74 | fSPDhHTask(qadm.fSPDhHTask), |
75 | fSPDhSTask(qadm.fSPDhSTask), | |
76 | fSPDhDTask(qadm.fSPDhDTask), | |
3f905799 | 77 | fGenOffsetH(qadm.fGenOffsetH), |
78 | fGenOffsetS(qadm.fGenOffsetS), | |
79 | fGenOffsetD(qadm.fGenOffsetD) | |
379510c2 | 80 | { |
81 | //copy ctor | |
82 | fAliITSQADataMakerSim->SetName((const char*)qadm.fAliITSQADataMakerSim->GetName()) ; | |
83 | fAliITSQADataMakerSim->SetTitle((const char*)qadm.fAliITSQADataMakerSim->GetTitle()); | |
4a903927 | 84 | |
85 | } | |
379510c2 | 86 | |
87 | //__________________________________________________________________ | |
88 | AliITSQASPDDataMakerSim& AliITSQASPDDataMakerSim::operator = (const AliITSQASPDDataMakerSim& qac ) | |
89 | { | |
90 | // Equal operator. | |
91 | this->~AliITSQASPDDataMakerSim(); | |
92 | new(this) AliITSQASPDDataMakerSim(qac); | |
93 | return *this; | |
94 | } | |
95 | ||
96 | //____________________________________________________________________________ | |
97 | void AliITSQASPDDataMakerSim::StartOfDetectorCycle() | |
98 | { | |
99 | //Detector specific actions at start of cycle | |
5379c4a3 | 100 | AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM::Start of SPD Cycle\n"); |
379510c2 | 101 | } |
102 | ||
103 | //____________________________________________________________________________ | |
4e25ac79 | 104 | void AliITSQASPDDataMakerSim::EndOfDetectorCycle(AliQAv1::TASKINDEX_t /*task*/, TObjArray* /*list*/) |
379510c2 | 105 | { |
106 | // launch the QA checking | |
5379c4a3 | 107 | AliDebug(AliQAv1::GetQADebugLevel(),"AliITSDM instantiates checker with Run(AliQAv1::kITS, task, list)\n"); |
379510c2 | 108 | |
4e25ac79 | 109 | //AliQAChecker::Instance()->Run( AliQAv1::kITS , task, list); |
379510c2 | 110 | } |
111 | ||
112 | //____________________________________________________________________________ | |
eca4fa66 | 113 | Int_t AliITSQASPDDataMakerSim::InitDigits() |
379510c2 | 114 | { |
115 | // Initialization for DIGIT data - SPD - | |
7d297381 | 116 | const Bool_t expert = kTRUE ; |
117 | const Bool_t image = kTRUE ; | |
eca4fa66 | 118 | Int_t rv = 0 ; |
119 | //fGenOffsetD = (fAliITSQADataMakerSim->fDigitsQAList[AliRecoParam::kDefault])->GetEntries(); | |
7a0e5776 | 120 | //fSPDhDTask must be incremented by one unit every time a histogram is ADDED to the QA List |
379510c2 | 121 | |
e3c90d69 | 122 | Char_t name[51]; |
123 | Char_t title[51]; | |
379510c2 | 124 | |
26ee9565 | 125 | TH1F *hlayer = new TH1F("SPDLayPattern_SPD","Layer map - SPD",6,0.,6.); |
379510c2 | 126 | hlayer->GetXaxis()->SetTitle("Layer number"); |
127 | hlayer->GetYaxis()->SetTitle("Entries"); | |
4a903927 | 128 | rv = fAliITSQADataMakerSim->Add2DigitsList(hlayer,fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()], expert, !image); |
7a0e5776 | 129 | fSPDhDTask++; |
379510c2 | 130 | |
131 | TH1F **hmod = new TH1F*[2]; | |
132 | for (Int_t iLay=0; iLay<2; iLay++) { | |
e3c90d69 | 133 | snprintf(name,50,"SPDModPattern_SPD%d",iLay+1); |
134 | snprintf(title,50,"Module map - SPD Layer %d",iLay+1); | |
379510c2 | 135 | hmod[iLay]=new TH1F(name,title,240,0,240); |
136 | hmod[iLay]->GetXaxis()->SetTitle("Module number"); | |
137 | hmod[iLay]->GetYaxis()->SetTitle("Entries"); | |
4a903927 | 138 | rv = fAliITSQADataMakerSim->Add2DigitsList(hmod[iLay],1+iLay+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()], !expert, image); |
7a0e5776 | 139 | fSPDhDTask++; |
379510c2 | 140 | } |
141 | ||
26ee9565 | 142 | TH1F *hcolumns = new TH1F("SPDColumns_SPD","Columns - SPD",160,0.,160.); |
379510c2 | 143 | hcolumns->GetXaxis()->SetTitle("Column number"); |
144 | hcolumns->GetYaxis()->SetTitle("Entries"); | |
4a903927 | 145 | fAliITSQADataMakerSim->Add2DigitsList(hcolumns,3+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()], expert, !image); |
7a0e5776 | 146 | fSPDhDTask++; |
379510c2 | 147 | |
26ee9565 | 148 | TH1F *hrows = new TH1F("SPDRows_SPD","Rows - SPD",256,0.,256.); |
379510c2 | 149 | hrows->GetXaxis()->SetTitle("Row number"); |
150 | hrows->GetYaxis()->SetTitle("Entries"); | |
4a903927 | 151 | rv = fAliITSQADataMakerSim->Add2DigitsList(hrows,4+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()], expert, !image); |
7a0e5776 | 152 | fSPDhDTask++; |
379510c2 | 153 | |
154 | TH1F** hMultSPDdigits = new TH1F*[2]; | |
155 | for (Int_t iLay=0; iLay<2; ++iLay) { | |
e3c90d69 | 156 | snprintf(name,50,"SPDDigitMultiplicity_SPD%d",iLay+1); |
157 | snprintf(title,50,"Digit multiplicity - SPD Layer %d",iLay+1); | |
379510c2 | 158 | hMultSPDdigits[iLay]=new TH1F(name,title,200,0.,200.); |
159 | hMultSPDdigits[iLay]->GetXaxis()->SetTitle("Digit multiplicity"); | |
160 | hMultSPDdigits[iLay]->GetYaxis()->SetTitle("Entries"); | |
4a903927 | 161 | rv = fAliITSQADataMakerSim->Add2DigitsList(hMultSPDdigits[iLay], 5+iLay+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()], !expert, image); |
7a0e5776 | 162 | fSPDhDTask++; |
379510c2 | 163 | } |
164 | ||
954ef57a | 165 | TH2F *hMultSPDdig2MultSPDdig1 |
26ee9565 | 166 | = new TH2F("SPDDigitMultCorrelation_SPD","Digit multiplicity correlation - SPD",200,0.,200.,200,0.,200.); |
379510c2 | 167 | hMultSPDdig2MultSPDdig1->GetXaxis()->SetTitle("Digit multiplicity (Layer 1)"); |
168 | hMultSPDdig2MultSPDdig1->GetYaxis()->SetTitle("Digit multiplicity (Layer 2)"); | |
4a903927 | 169 | rv = fAliITSQADataMakerSim->Add2DigitsList(hMultSPDdig2MultSPDdig1,7+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()], !expert, image); |
7a0e5776 | 170 | fSPDhDTask++; |
379510c2 | 171 | |
5379c4a3 | 172 | AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SPD Digits histograms booked\n",fSPDhDTask)); |
e3c90d69 | 173 | delete [] hmod; |
174 | delete [] hMultSPDdigits; | |
eca4fa66 | 175 | return rv ; |
379510c2 | 176 | } |
177 | ||
178 | //____________________________________________________________________________ | |
eca4fa66 | 179 | Int_t AliITSQASPDDataMakerSim::MakeDigits(TTree *digits) |
379510c2 | 180 | { |
181 | // Fill QA for DIGIT - SPD - | |
eca4fa66 | 182 | Int_t rv = 0 ; |
6252ceeb | 183 | |
379510c2 | 184 | AliITS *fITS = (AliITS*)gAlice->GetModule("ITS"); |
185 | fITS->SetTreeAddress(); | |
186 | TClonesArray *iITSdigits = fITS->DigitsAddress(0); // 0->SPD | |
187 | ||
188 | Int_t nDigitsL1=0; | |
189 | Int_t nDigitsL2=0; | |
190 | ||
191 | for (Int_t imod=0; imod<240; ++imod){ | |
192 | digits->GetEvent(imod); | |
193 | Int_t ndigits = iITSdigits->GetEntries(); | |
194 | if (imod<80) { | |
4a903927 | 195 | fAliITSQADataMakerSim->GetDigitsData(0+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(0.5,ndigits); |
196 | fAliITSQADataMakerSim->GetDigitsData(1+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(imod,ndigits); | |
379510c2 | 197 | nDigitsL1+=ndigits; |
198 | } | |
199 | else { | |
4a903927 | 200 | fAliITSQADataMakerSim->GetDigitsData(0+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(1,ndigits); |
201 | fAliITSQADataMakerSim->GetDigitsData(2+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(imod,ndigits); | |
379510c2 | 202 | nDigitsL2+=ndigits; |
203 | } | |
204 | for (Int_t idig=0; idig<ndigits; ++idig) { | |
205 | AliITSdigit *dig=(AliITSdigit*)iITSdigits->UncheckedAt(idig); | |
206 | Int_t col=dig->GetCoord1(); // cell number z | |
207 | Int_t row=dig->GetCoord2(); // cell number x | |
4a903927 | 208 | fAliITSQADataMakerSim->GetDigitsData(3+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(col); |
209 | fAliITSQADataMakerSim->GetDigitsData(4+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(row); | |
379510c2 | 210 | } |
211 | } | |
4a903927 | 212 | fAliITSQADataMakerSim->GetDigitsData(5+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(nDigitsL1); |
213 | fAliITSQADataMakerSim->GetDigitsData(6+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(nDigitsL2); | |
214 | fAliITSQADataMakerSim->GetDigitsData(7+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(nDigitsL1,nDigitsL2); | |
eca4fa66 | 215 | return rv ; |
379510c2 | 216 | } |
217 | ||
218 | //____________________________________________________________________________ | |
eca4fa66 | 219 | Int_t AliITSQASPDDataMakerSim::InitSDigits() |
379510c2 | 220 | { |
221 | // Initialization for SDIGIT data - SPD - | |
7d297381 | 222 | const Bool_t expert = kTRUE ; |
223 | const Bool_t image = kTRUE ; | |
eca4fa66 | 224 | Int_t rv = 0 ; |
225 | //fGenOffsetS = (fAliITSQADataMakerSim->fSDigitsQAList[AliRecoParam::kDefault])->GetEntries(); | |
c71529b0 | 226 | //printf("--W-- AliITSQASPDDataMakerSim::InitSDigits() fGenOffset= %d \n",fGenOffset); |
7a0e5776 | 227 | //fSPDhSTask must be incremented by one unit every time a histogram is ADDED to the QA List |
c71529b0 | 228 | |
e3c90d69 | 229 | Char_t name[51]; |
230 | Char_t title[51]; | |
379510c2 | 231 | |
26ee9565 | 232 | TH1F *hlayer = new TH1F("SPDLayPattern_SPD","Layer map - SPD",6,0.,6.); |
379510c2 | 233 | hlayer->GetXaxis()->SetTitle("Layer number"); |
234 | hlayer->GetYaxis()->SetTitle("Entries"); | |
4a903927 | 235 | rv = fAliITSQADataMakerSim->Add2SDigitsList(hlayer,fGenOffsetS[fAliITSQADataMakerSim->GetEventSpecie()], expert, !image); |
7a0e5776 | 236 | fSPDhSTask++; |
379510c2 | 237 | |
238 | TH1F **hmod = new TH1F*[2]; | |
239 | for (Int_t iLay=0; iLay<2; ++iLay) { | |
e3c90d69 | 240 | snprintf(name,50,"SPDModPattern_SPD%d",iLay+1); |
241 | snprintf(title,50,"Module map - SPD Layer %d",iLay+1); | |
379510c2 | 242 | hmod[iLay]=new TH1F(name,title,240,0,240); |
243 | hmod[iLay]->GetXaxis()->SetTitle("Module number"); | |
244 | hmod[iLay]->GetYaxis()->SetTitle("Entries"); | |
4a903927 | 245 | rv = fAliITSQADataMakerSim->Add2SDigitsList(hmod[iLay],1+iLay+fGenOffsetS[fAliITSQADataMakerSim->GetEventSpecie()], !expert, image); |
7a0e5776 | 246 | fSPDhSTask++; |
379510c2 | 247 | } |
379510c2 | 248 | |
5379c4a3 | 249 | AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SPD SDigits histograms booked\n",fSPDhSTask)); |
e3c90d69 | 250 | delete [] hmod; |
eca4fa66 | 251 | return rv ; |
379510c2 | 252 | } |
253 | ||
254 | //____________________________________________________________________________ | |
eca4fa66 | 255 | Int_t AliITSQASPDDataMakerSim::MakeSDigits(TTree *sdigits) |
379510c2 | 256 | { |
257 | // Fill QA for SDIGIT - SPD - | |
eca4fa66 | 258 | Int_t rv = 0 ; |
6252ceeb | 259 | |
260 | static TClonesArray * sdig ; | |
261 | if (! sdig ) | |
262 | sdig = new TClonesArray( "AliITSpListItem",1000 ); | |
263 | ||
379510c2 | 264 | TBranch *brchSDigits = sdigits->GetBranch("ITS"); |
265 | for (Int_t imod=0; imod<240; ++imod){ | |
379510c2 | 266 | brchSDigits->SetAddress( &sdig ); |
267 | brchSDigits->GetEvent(imod); | |
268 | Int_t nsdig=sdig->GetEntries(); | |
269 | if (imod<80) { | |
4a903927 | 270 | fAliITSQADataMakerSim->GetSDigitsData(0+fGenOffsetS[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(0.5,nsdig); |
271 | fAliITSQADataMakerSim->GetSDigitsData(1+fGenOffsetS[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(imod,nsdig); | |
379510c2 | 272 | } |
273 | else { | |
4a903927 | 274 | fAliITSQADataMakerSim->GetSDigitsData(0+fGenOffsetS[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(1,nsdig); |
275 | fAliITSQADataMakerSim->GetSDigitsData(2+fGenOffsetS[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(imod,nsdig); | |
379510c2 | 276 | } |
6252ceeb | 277 | sdig->Clear() ; |
379510c2 | 278 | } |
eca4fa66 | 279 | return rv ; |
379510c2 | 280 | } |
281 | ||
282 | //____________________________________________________________________________ | |
eca4fa66 | 283 | Int_t AliITSQASPDDataMakerSim::InitHits() |
379510c2 | 284 | { |
285 | // Initialization for HITS data - SPD - | |
7d297381 | 286 | const Bool_t expert = kTRUE ; |
287 | const Bool_t image = kTRUE ; | |
eca4fa66 | 288 | Int_t rv = 0 ; |
7d297381 | 289 | |
eca4fa66 | 290 | //fGenOffsetH = (fAliITSQADataMakerSim->fHitsQAList[AliRecoParam::kDefault])->GetEntries(); |
c71529b0 | 291 | //printf("--W-- AliITSQASPDDataMakerSim::InitHits() fGenOffset= %d \n",fGenOffset); |
7a0e5776 | 292 | //fSPDhHTask must be incremented by one unit every time a histogram is ADDED to the QA List |
379510c2 | 293 | Char_t name[50]; |
294 | Char_t title[50]; | |
295 | ||
26ee9565 | 296 | TH1F *hlayer = new TH1F("SPDLayPattern_SPD","Layer map - SPD",6,0.,6.); |
379510c2 | 297 | hlayer->GetXaxis()->SetTitle("Layer number"); |
298 | hlayer->GetYaxis()->SetTitle("Entries"); | |
4a903927 | 299 | rv = fAliITSQADataMakerSim->Add2HitsList(hlayer,fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()], expert, !image); |
7a0e5776 | 300 | fSPDhHTask++; |
379510c2 | 301 | |
302 | TH1F **hmod = new TH1F*[2]; | |
303 | for (Int_t iLay=0; iLay<2; ++iLay) { | |
5e24ec01 | 304 | snprintf(name,49,"SPDModPattern_SPD%d",iLay+1); |
305 | snprintf(title,49,"Module map - SPD Layer %d",iLay+1); | |
379510c2 | 306 | hmod[iLay]=new TH1F(name,title,240,0,240); |
307 | hmod[iLay]->GetXaxis()->SetTitle("Module number"); | |
308 | hmod[iLay]->GetYaxis()->SetTitle("Entries"); | |
4a903927 | 309 | rv = fAliITSQADataMakerSim->Add2HitsList(hmod[iLay],1+iLay+fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()], !expert, image); |
7a0e5776 | 310 | fSPDhHTask++; |
379510c2 | 311 | } |
312 | ||
db72ff3b | 313 | TH1F *hhitlenght = new TH1F("SPDLenght_SPD","SPD Hit lenght along y_{loc} coord",210,0.,210.); |
379510c2 | 314 | hhitlenght->GetXaxis()->SetTitle("Hit lenght [#mum]"); |
315 | hhitlenght->GetYaxis()->SetTitle("# hits"); | |
4a903927 | 316 | rv = fAliITSQADataMakerSim->Add2HitsList(hhitlenght,3+fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()], !expert, image); |
7a0e5776 | 317 | fSPDhHTask++; |
379510c2 | 318 | |
db72ff3b | 319 | TH1F *hEdepos = new TH1F("SPDEnergyDeposit_SPD","SPD Deposited energy distribution (y_{loc}>180 #mum)",150,0.,300.); |
379510c2 | 320 | hEdepos->GetXaxis()->SetTitle("Deposited energy [keV]"); |
321 | hEdepos->GetYaxis()->SetTitle("# hits"); | |
4a903927 | 322 | rv = fAliITSQADataMakerSim->Add2HitsList(hEdepos,4+fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()], !expert, image); |
7a0e5776 | 323 | fSPDhHTask++; |
379510c2 | 324 | |
5379c4a3 | 325 | AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SPD Hits histograms booked\n",fSPDhHTask)); |
e3c90d69 | 326 | delete [] hmod; |
eca4fa66 | 327 | return rv ; |
379510c2 | 328 | } |
329 | ||
330 | //____________________________________________________________________________ | |
eca4fa66 | 331 | Int_t AliITSQASPDDataMakerSim::MakeHits(TTree *hits) |
379510c2 | 332 | { |
333 | // Fill QA for HITS - SPD - | |
eca4fa66 | 334 | Int_t rv = 0 ; |
eca4fa66 | 335 | |
379510c2 | 336 | AliITS *fITS = (AliITS*)gAlice->GetModule("ITS"); |
337 | fITS->SetTreeAddress(); | |
338 | Int_t nmodules; | |
339 | fITS->InitModules(-1,nmodules); //-1->number of modules taken from AliITSgeom class kept in fITSgeom | |
340 | //nmodules is set | |
341 | ||
342 | fITS->FillModules(hits,0); | |
343 | ||
344 | for (Int_t imod=0; imod<240; ++imod){ | |
345 | AliITSmodule *module = fITS->GetModule(imod); | |
346 | TObjArray *arrHits = module->GetHits(); | |
347 | Int_t nhits = arrHits->GetEntriesFast(); | |
348 | if (imod<80) { | |
4a903927 | 349 | fAliITSQADataMakerSim->GetHitsData(fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(0.5,nhits); |
350 | fAliITSQADataMakerSim->GetHitsData(1+fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(imod,nhits); | |
379510c2 | 351 | } else { |
4a903927 | 352 | fAliITSQADataMakerSim->GetHitsData(fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(1,nhits); |
353 | fAliITSQADataMakerSim->GetHitsData(2+fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(imod,nhits); | |
379510c2 | 354 | } |
379510c2 | 355 | for (Int_t iHit=0; iHit<nhits; ++iHit) { |
356 | AliITShit *hit = (AliITShit*) arrHits->At(iHit); | |
357 | Double_t xl,yl,zl,xl0,yl0,zl0; | |
358 | Double_t tof,tof0; | |
359 | hit->GetPositionL(xl,yl,zl,tof); | |
360 | hit->GetPositionL0(xl0,yl0,zl0,tof0); | |
361 | Float_t dyloc=TMath::Abs(yl-yl0)*10000.; | |
4a903927 | 362 | fAliITSQADataMakerSim->GetHitsData(3+fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(dyloc); |
379510c2 | 363 | Float_t edep=hit->GetIonization()*1000000; |
364 | if(dyloc>180.){ | |
4a903927 | 365 | fAliITSQADataMakerSim->GetHitsData(4+fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(edep); |
379510c2 | 366 | } |
367 | } | |
368 | } | |
eca4fa66 | 369 | return rv ; |
379510c2 | 370 | } |
7a0e5776 | 371 | |
372 | ||
373 | //_______________________________________________________________ | |
374 | ||
80b9610c | 375 | Int_t AliITSQASPDDataMakerSim::GetOffset(AliQAv1::TASKINDEX_t task,Int_t specie){ |
7a0e5776 | 376 | // Returns histogram offset according to the specified task |
377 | Int_t offset=0; | |
4e25ac79 | 378 | if( task == AliQAv1::kHITS){ |
80b9610c | 379 | offset=fGenOffsetH[specie]; |
7a0e5776 | 380 | } |
4e25ac79 | 381 | else if( task == AliQAv1::kSDIGITS) { |
80b9610c | 382 | offset=fGenOffsetS[specie]; |
7a0e5776 | 383 | } |
4e25ac79 | 384 | else if( task == AliQAv1::kDIGITS) { |
80b9610c | 385 | offset=fGenOffsetD[specie]; |
7a0e5776 | 386 | } |
387 | else { | |
388 | AliInfo("No task has been selected. TaskHisto set to zero.\n"); | |
389 | } | |
390 | ||
391 | return offset; | |
392 | } | |
393 | ||
eca4fa66 | 394 | //____________________________________________________________________________ |
4a903927 | 395 | void AliITSQASPDDataMakerSim::SetOffset(AliQAv1::TASKINDEX_t task, Int_t offset,Int_t specie ){ |
eca4fa66 | 396 | // Returns histogram offset according to the specified task |
397 | if( task == AliQAv1::kHITS){ | |
4a903927 | 398 | fGenOffsetH[specie] = offset; |
eca4fa66 | 399 | } |
400 | else if( task == AliQAv1::kSDIGITS) { | |
4a903927 | 401 | fGenOffsetS[specie] = offset; |
eca4fa66 | 402 | } |
403 | else if( task == AliQAv1::kDIGITS) { | |
4a903927 | 404 | fGenOffsetD[specie] = offset; |
eca4fa66 | 405 | } |
406 | else { | |
407 | AliInfo("No task has been selected. TaskHisto set to zero.\n"); | |
408 | } | |
409 | } | |
7a0e5776 | 410 | |
411 | //_______________________________________________________________ | |
412 | ||
4e25ac79 | 413 | Int_t AliITSQASPDDataMakerSim::GetTaskHisto(AliQAv1::TASKINDEX_t task) { |
7a0e5776 | 414 | // Returns the number of booked histograms for the selected task |
415 | Int_t histotot=0; | |
4e25ac79 | 416 | if( task == AliQAv1::kHITS) { |
7a0e5776 | 417 | histotot=fSPDhHTask ; |
418 | } | |
4e25ac79 | 419 | else if( task == AliQAv1::kSDIGITS) { |
7a0e5776 | 420 | histotot=fSPDhSTask; |
421 | } | |
4e25ac79 | 422 | else if( task == AliQAv1::kDIGITS) { |
7a0e5776 | 423 | histotot=fSPDhDTask ; |
424 | } | |
425 | else { | |
426 | AliInfo("No task has been selected. TaskHisto set to zero.\n"); | |
427 | } | |
428 | return histotot; | |
429 | ||
430 | } |