]>
Commit | Line | Data |
---|---|---|
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 | ||
04236e67 | 19 | // --- ROOT system --- |
20 | #include <TClonesArray.h> | |
21 | #include <TFile.h> | |
22 | #include <TH1F.h> | |
23 | #include <TH2F.h> | |
aa21372e | 24 | #include <TProfile.h> |
04236e67 | 25 | #include <Riostream.h> |
26 | // --- Standard library --- | |
27 | ||
28 | // --- AliRoot header files --- | |
29 | #include "AliESDCaloCluster.h" | |
30 | #include "AliESDEvent.h" | |
cc1abc7f | 31 | #include "AliQAChecker.h" |
04236e67 | 32 | #include "AliLog.h" |
33 | #include "AliHMPIDDigit.h" | |
34 | #include "AliHMPIDHit.h" | |
44ed7a66 | 35 | #include "AliHMPIDDigit.h" |
04236e67 | 36 | #include "AliHMPIDCluster.h" |
37 | #include "AliHMPIDQADataMakerRec.h" | |
7656d8ac | 38 | #include "AliHMPIDQAChecker.h" |
cc1abc7f | 39 | #include "AliHMPIDParam.h" |
40 | #include "AliHMPIDRawStream.h" | |
41 | #include "AliLog.h" | |
b38ac33a | 42 | |
606697a8 | 43 | //. |
b38ac33a | 44 | // HMPID AliHMPIDQADataMakerRec base class |
45 | // for QA of reconstruction | |
46 | // here also errors are calculated | |
47 | //. | |
48 | ||
04236e67 | 49 | ClassImp(AliHMPIDQADataMakerRec) |
50 | ||
ec575c20 | 51 | //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
04236e67 | 52 | AliHMPIDQADataMakerRec::AliHMPIDQADataMakerRec() : |
6252ceeb | 53 | AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kHMPID), "HMPID Quality Assurance Data Maker"),fEvtRaw(0), fChannel(0) |
04236e67 | 54 | { |
55 | // ctor | |
04236e67 | 56 | } |
57 | ||
ec575c20 | 58 | //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
04236e67 | 59 | AliHMPIDQADataMakerRec::AliHMPIDQADataMakerRec(const AliHMPIDQADataMakerRec& qadm) : |
6252ceeb | 60 | AliQADataMakerRec(),fEvtRaw(qadm.fEvtRaw), fChannel(qadm.fChannel) |
04236e67 | 61 | { |
62 | //copy ctor | |
04236e67 | 63 | SetName((const char*)qadm.GetName()) ; |
64 | SetTitle((const char*)qadm.GetTitle()); | |
65 | } | |
66 | ||
ec575c20 | 67 | //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
04236e67 | 68 | AliHMPIDQADataMakerRec& AliHMPIDQADataMakerRec::operator = (const AliHMPIDQADataMakerRec& qadm ) |
69 | { | |
70 | // Equal operator. | |
71 | this->~AliHMPIDQADataMakerRec(); | |
72 | new(this) AliHMPIDQADataMakerRec(qadm); | |
73 | return *this; | |
74 | } | |
75 | ||
44ed7a66 | 76 | //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
77 | void AliHMPIDQADataMakerRec::InitDigits() | |
78 | { | |
79 | // create Digits histograms in Digits subdir | |
80 | const Bool_t expert = kTRUE ; | |
81 | const Bool_t image = kTRUE ; | |
82 | ||
db72ff3b | 83 | TH1F *hDigChEvt = new TH1F("hDigChEvt","Chamber occupancy per event;Occupancy [%];Counts",AliHMPIDParam::kMaxCh+1,AliHMPIDParam::kMinCh,AliHMPIDParam::kMaxCh+1); |
44ed7a66 | 84 | TH1F *hDigPcEvt = new TH1F("hDigPcEvt","PC occupancy",156,-1,77); |
85 | TH2F *hDigMap[7]; | |
86 | TH1F *hDigQ[42]; | |
87 | for(Int_t iCh =0; iCh < 7; iCh++){ | |
88 | hDigMap[iCh] = new TH2F(Form("MapCh%i",iCh),Form("Digit Map in Chamber %i",iCh),159,0,159,143,0,143); | |
89 | for(Int_t iPc =0; iPc < 6; iPc++ ){ | |
db72ff3b | 90 | hDigQ[iCh*6+iPc] = new TH1F(Form("QCh%iPc%i ",iCh,iPc),Form("Charge of digits (ADC) in Chamber %i and PC %i;Charge [ADC counts];Counts",iCh,iPc),4100,0,4100); |
44ed7a66 | 91 | } |
92 | } | |
93 | ||
94 | Add2DigitsList(hDigChEvt,0, !expert, image); | |
95 | Add2DigitsList(hDigPcEvt,1,expert, !image); | |
96 | for(Int_t iMap=0; iMap < 7; iMap++) Add2DigitsList(hDigMap[iMap],2+iMap,expert, !image); | |
97 | for(Int_t iH =0; iH < 42 ; iH++) Add2DigitsList(hDigQ[iH] ,9+iH,expert,!image); | |
98 | } | |
99 | ||
ec575c20 | 100 | //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
04236e67 | 101 | void AliHMPIDQADataMakerRec::InitRecPoints() |
102 | { | |
103 | // create cluster histograms in RecPoint subdir | |
7d297381 | 104 | const Bool_t expert = kTRUE ; |
105 | const Bool_t image = kTRUE ; | |
41391bd4 | 106 | |
db72ff3b | 107 | TProfile *hCluMult = new TProfile("CluMult" ,"Cluster multiplicity per chamber;Chamber Id;# of clusters" , 16, -1 , 7 , 0, 500); |
7d297381 | 108 | Add2RecPointsList(hCluMult , 0,expert, !image); |
aa21372e | 109 | |
db72ff3b | 110 | TH2F *hCluFlg = new TH2F("CluFlg" ,"Cluster flag;??;??" , 56 ,-1.5, 12.5, 70, -0.5, 6.5); |
7d297381 | 111 | Add2RecPointsList(hCluFlg , 1,expert, !image); |
aa21372e | 112 | |
113 | TH1F *hCluSizeMip[7], *hCluSizePho[7]; | |
114 | ||
115 | TH1F *hCluQSect[42], *hCluQSectZoom[42]; | |
116 | ||
7656d8ac | 117 | for(Int_t iCh =0; iCh <7; iCh++){ |
db72ff3b | 118 | hCluSizeMip[iCh] = new TH1F(Form("CluSizeMipCh%i",iCh),Form("Cluster size MIP (cluster Q > 100 ADC) in Chamber %i;Size [MIP];Counts",iCh), 50 , 0 , 50 ); |
7d297381 | 119 | Add2RecPointsList(hCluSizeMip[iCh], iCh+2,expert,!image); |
aa21372e | 120 | |
db72ff3b | 121 | hCluSizePho[iCh] = new TH1F(Form("CluSizePho%i",iCh ),Form("Cluster size Phots(cluster Q < 100 ADC) in Chamber %i;Size [MIP];Counts",iCh), 50 , 0 , 50 ); |
7d297381 | 122 | Add2RecPointsList(hCluSizePho[iCh], iCh+7+2,expert,!image); |
123 | ||
aa21372e | 124 | for(Int_t iSect =0; iSect < 6; iSect++){ |
db72ff3b | 125 | hCluQSectZoom[iCh*6+iSect] = new TH1F(Form("QClusCh%iSect%iZoom",iCh,iSect) ,Form("Zoom on Cluster charge (ADC) in Chamber %i and sector %i;Charge [ADC counts];Counts",iCh,iSect),100,0,100); |
7d297381 | 126 | Add2RecPointsList(hCluQSectZoom[iCh*6+iSect],2+14+iCh*6+iSect,expert,!image); |
127 | ||
db72ff3b | 128 | hCluQSect[iCh*6+iSect] = new TH1F(Form("QClusCh%iSect%i",iCh,iSect) ,Form("Cluster charge (ADC) in Chamber %i and sector %i;Charge [ADC counts];Counts",iCh,iSect),250,0,5000); |
7d297381 | 129 | Add2RecPointsList(hCluQSect[iCh*6+iSect],2+14+42+iCh*6+iSect, !expert, image); |
aa21372e | 130 | } |
131 | } | |
cc1abc7f | 132 | } |
ec575c20 | 133 | //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
cc1abc7f | 134 | void AliHMPIDQADataMakerRec::InitRaws() |
135 | { | |
136 | // | |
137 | // Booking QA histo for Raw data | |
138 | // | |
64f2781e | 139 | // All histograms implemented in InitRaws are used in AMORE. Any change here should be propagated to the amoreHMP-QA as well!!! (clm) |
140 | // | |
141 | ||
7d297381 | 142 | const Bool_t expert = kTRUE ; |
143 | const Bool_t saveCorr = kTRUE ; | |
144 | const Bool_t image = kTRUE ; | |
145 | ||
b38ac33a | 146 | const Int_t kNerr = (Int_t)AliHMPIDRawStream::kSumErr+1; |
aa21372e | 147 | TH1F *hSumErr[14]; |
148 | TH2F *hDilo[14]; | |
64f2781e | 149 | TH2I *hPadMap[42]; //AMORE monitoring |
150 | TH1I *hPadQ[42]; //AMORE monitoring | |
a39cc5ff | 151 | |
152 | ||
3c8e86a0 | 153 | for(Int_t iddl =0; iddl<AliHMPIDRawStream::kNDDL; iddl++) { |
3c8e86a0 | 154 | |
db72ff3b | 155 | hSumErr[iddl] = new TH1F(Form("hSumErrDDL%i",iddl), Form("Error summary for DDL %i;??;??",iddl), 2*kNerr,0,2*kNerr); |
b38ac33a | 156 | for(Int_t ilabel=0; ilabel< kNerr; ilabel++) { |
3c8e86a0 | 157 | hSumErr[iddl]->GetXaxis()->CenterLabels(kTRUE); |
3c8e86a0 | 158 | hSumErr[iddl]->GetXaxis()->SetBinLabel((2*ilabel+1),Form("%i %s",ilabel+1,AliHMPIDRawStream::GetErrName(ilabel))); |
7d297381 | 159 | } |
160 | ||
a39cc5ff | 161 | Add2RawsList(hSumErr[iddl],iddl,expert,!image, !saveCorr); |
aa21372e | 162 | |
64f2781e | 163 | hDilo[iddl] = new TH2F(Form("hDiloDDL%i",iddl),Form("Dilogic response at DDL;Row # ;Dilogic #",iddl),24,1,25,10,1,11); |
7d297381 | 164 | Add2RawsList(hDilo[iddl],14+iddl,expert,!image, !saveCorr); |
64f2781e | 165 | }//DDL loop |
7d297381 | 166 | for(Int_t iCh = AliHMPIDParam::kMinCh; iCh <=AliHMPIDParam::kMaxCh ;iCh++) { |
167 | for(Int_t iPc = AliHMPIDParam::kMinPc; iPc <= AliHMPIDParam::kMaxPc ;iPc++) { | |
64f2781e | 168 | hPadMap[iPc+6*iCh] = new TH2I(Form("hPadMap_Ch_%i_Pc%i",iCh,iPc),Form("Pad Map of Ch: %i Pc: %i;Pad X;Pad Y;",iCh,iPc),80,0,80,48,0,48); |
a39cc5ff | 169 | Add2RawsList(hPadMap[iPc+6*iCh],28+iPc+6*iCh,expert,!image, !saveCorr); |
64f2781e | 170 | hPadQ[iPc+6*iCh] = new TH1I(Form("hPadQ_Ch_%i_Pc%i",iCh,iPc),Form("Pad Charge of Ch: %i Pc: %i;Pad Q;Entries;",iCh,iPc),4100,0,4100); |
7d297381 | 171 | Add2RawsList(hPadQ[iPc+6*iCh],70+iPc+6*iCh,expert,!image, !saveCorr); |
64f2781e | 172 | }//PC loop |
173 | }//Ch loop | |
174 | ||
7d297381 | 175 | TH2I *hGeneralErrorSummary = new TH2I("GeneralErrorSummary"," DDL index vs Error type plot", 2*kNerr, 0, 2*kNerr, 2*AliHMPIDRawStream::kNDDL,0,2*AliHMPIDRawStream::kNDDL); |
176 | for(Int_t igenlabel =0 ; igenlabel< kNerr; igenlabel++) hGeneralErrorSummary->GetXaxis()->SetBinLabel((2*igenlabel+1),Form("%i %s",igenlabel+1,AliHMPIDRawStream::GetErrName(igenlabel))); | |
a39cc5ff | 177 | Add2RawsList(hGeneralErrorSummary,14+14+42+42, expert, image, !saveCorr); |
178 | ||
179 | //for DQM shifter | |
180 | TH2F *hHmpPadMapRaws = new TH2F("hHmpPadMapRaws","HMP Pad Map;pad x;pad y;Q (ADC)",480,0,480,432,0,432); | |
181 | Add2RawsList(hHmpPadMapRaws,14+14+42+42+1,!expert,image,!saveCorr); | |
182 | ||
183 | TProfile *fHmpPadOcc = new TProfile("fHmpPadOcc","HMP Average pad occupancy per DDL;;Pad occupancy (%)",14,0.5,14.5); | |
184 | fHmpPadOcc->SetFillColor(5); | |
185 | for(Int_t iddl=0;iddl<14;iddl++) fHmpPadOcc->GetXaxis()->SetBinLabel(iddl+1,Form("DDL_%d",iddl+1)); | |
186 | Add2RawsList(fHmpPadOcc,14+14+42+42+2,!expert,image,!saveCorr); | |
187 | ||
188 | TH1F *hHmpPadQ = new TH1F("hHmpPadQ","HMP Pad charge distribution;pad Q (ADC);Entries",4100,0,4100); | |
189 | hHmpPadQ->Sumw2(); | |
190 | Add2RawsList(hHmpPadQ,14+14+42+42+3,!expert,image,!saveCorr); | |
191 | ||
04236e67 | 192 | } |
ec575c20 | 193 | //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
04236e67 | 194 | void AliHMPIDQADataMakerRec::InitESDs() |
195 | { | |
cc1abc7f | 196 | // |
197 | //Booking ESDs histograms | |
7d297381 | 198 | const Bool_t expert = kTRUE ; |
199 | const Bool_t image = kTRUE ; | |
200 | ||
201 | TH2F* hCkovP = new TH2F("CkovP" , "#theta_{c}, [rad];P, [GeV]" , 150, 0, 7 ,100, 0, 1) ; | |
202 | TH2F* hSigP = new TH2F("SigP" ,"#sigma_{#theta_c} [mrad];[GeV]", 150, 0, 7 ,100, 0, 1) ; | |
203 | TH2F* hDifXY = new TH2F("DifXY" ,"diff" , 200, -10, 10 ,200,-10,10) ; | |
204 | TH2F* hMvsP = new TH2F("MvsP","Reconstructed Mass vs P",60,0,6,1000,0,1) ; | |
205 | TH1F* hPid[5]; | |
206 | hPid[0] = new TH1F("PidE" ,"electron response" , 101, -0.005,1.005) ; | |
207 | hPid[1] = new TH1F("PidMu","#mu response" , 101, -0.005,1.005) ; | |
208 | hPid[2] = new TH1F("PidPi","#pi response" , 101, -0.005,1.005) ; | |
209 | hPid[3] = new TH1F("PidK" ,"K response" , 101, -0.005,1.005) ; | |
210 | hPid[4] = new TH1F("PidP" ,"p response" , 101, -0.005,1.005) ; | |
211 | ||
212 | Add2ESDsList(hCkovP,0, !expert, image); | |
213 | Add2ESDsList(hSigP ,1, expert, !image); | |
214 | Add2ESDsList(hDifXY,2, !expert, image); | |
215 | Add2ESDsList(hMvsP,3, expert, !image); | |
216 | for(Int_t i=0; i< 5; i++) Add2ESDsList(hPid[i],i+4, expert, !image); | |
04236e67 | 217 | } |
ec575c20 | 218 | //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
cc1abc7f | 219 | void AliHMPIDQADataMakerRec::MakeRaws(AliRawReader *rawReader) |
04236e67 | 220 | { |
cc1abc7f | 221 | // |
222 | // Filling Raws QA histos | |
223 | // | |
a39cc5ff | 224 | rawReader->Reset() ; |
225 | AliHMPIDRawStream stream(rawReader); | |
226 | Int_t shiftX[7]={320,160,320,160,0,160,0}; | |
227 | Int_t shiftY[7]={0,0,144,144,144,288,288}; | |
228 | Int_t ddlOcc[14]={0}; | |
229 | Bool_t isHMPin=kFALSE; | |
aa21372e | 230 | fEvtRaw++; |
cc1abc7f | 231 | while(stream.Next()) |
232 | { | |
233 | UInt_t ddl=stream.GetDDLNumber(); //returns 0,1,2 ... 13 | |
a39cc5ff | 234 | isHMPin=kFALSE; |
64f2781e | 235 | if(ddl > 13) continue; |
cc1abc7f | 236 | for(Int_t iErr =1; iErr<(Int_t)AliHMPIDRawStream::kSumErr; iErr++){ |
a39cc5ff | 237 | Int_t numOfErr = stream.GetErrors(ddl,iErr); |
238 | GetRawsData(ddl)->Fill(iErr,numOfErr); | |
239 | ((TH2I*)GetRawsData(14+14+42+42))->Fill(iErr,ddl,iErr); // | |
cc1abc7f | 240 | } |
64f2781e | 241 | UInt_t word; Int_t Nddl, r, d, a;//pc,pcX,pcY; |
aa21372e | 242 | for(Int_t iPad=0;iPad<stream.GetNPads();iPad++) { |
a39cc5ff | 243 | isHMPin=kTRUE; |
244 | AliHMPIDDigit dig(stream.GetPadArray()[iPad],stream.GetChargeArray()[iPad]);dig.Raw(word,Nddl,r,d,a); | |
245 | //for DQM shifter | |
246 | ((TH2F*)GetRawsData(14+14+42+42+1))->Fill(shiftX[(Int_t)(dig.Ch())]+dig.PadChX(),shiftY[(Int_t)(dig.Ch())]+dig.PadChY(),dig.Q()); | |
247 | GetRawsData(14+14+42+42+3)->Fill(dig.Q()); | |
248 | ddlOcc[ddl]++; | |
249 | ||
aa21372e | 250 | GetRawsData(ddl+14)->Fill(r,d); |
64f2781e | 251 | GetRawsData(28+stream.Pc(Nddl,r,d,a)+6*AliHMPIDParam::DDL2C(ddl))->Fill(stream.PadPcX(Nddl,r,d,a),stream.PadPcY(Nddl,r,d,a)); |
252 | GetRawsData(70+stream.Pc(Nddl,r,d,a)+6*AliHMPIDParam::DDL2C(ddl))->Fill(stream.GetChargeArray()[iPad]); | |
a39cc5ff | 253 | } |
254 | if(isHMPin==kTRUE) { | |
255 | for(Int_t iddl=0;iddl<14;iddl++){ | |
ebaaa487 | 256 | GetRawsData(14+14+42+42+2)->Fill(iddl+1,ddlOcc[iddl]*100.0/(6.0*24.0*80)); |
a39cc5ff | 257 | } |
258 | } | |
cc1abc7f | 259 | } |
41391bd4 | 260 | |
bc6cefce | 261 | // stream.Delete(); |
a39cc5ff | 262 | |
263 | ||
aa21372e | 264 | |
cc1abc7f | 265 | } |
44ed7a66 | 266 | |
267 | //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
6252ceeb | 268 | void AliHMPIDQADataMakerRec::MakeDigits() |
44ed7a66 | 269 | { |
270 | // | |
271 | //filling QA histos for Digits | |
272 | // | |
eca4fa66 | 273 | |
6252ceeb | 274 | Int_t i = fChannel ; |
275 | GetDigitsData(0)->Fill(i,fDigitsArray->GetEntriesFast()/(48.*80.*6.)); | |
276 | TIter next(fDigitsArray); | |
277 | AliHMPIDDigit * digit; | |
278 | while ( (digit = dynamic_cast<AliHMPIDDigit *>(next())) ) { | |
279 | GetDigitsData(1)->Fill(10.*i+digit->Pc(),1./(48.*80.)); | |
280 | GetDigitsData(2+i)->Fill(digit->PadChX(),digit->PadChY()); | |
281 | GetDigitsData(9+i*6+digit->Pc())->Fill(digit->Q()); | |
282 | } | |
283 | } | |
44ed7a66 | 284 | |
44ed7a66 | 285 | //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
286 | void AliHMPIDQADataMakerRec::MakeDigits(TTree * data) | |
287 | { | |
288 | // | |
289 | //Opening the Digit Tree | |
290 | // | |
eca4fa66 | 291 | |
6252ceeb | 292 | if(fDigitsArray) |
293 | fDigitsArray->Clear() ; | |
294 | else | |
295 | fDigitsArray=new TClonesArray("AliHMPIDDigit"); | |
44ed7a66 | 296 | |
297 | for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++){ | |
6252ceeb | 298 | fChannel = iCh ; |
299 | fDigitsArray->Clear() ; | |
300 | data->SetBranchAddress(Form("HMPID%i",iCh),&fDigitsArray); | |
301 | data->GetEntry(0); | |
302 | MakeDigits(); | |
44ed7a66 | 303 | } |
44ed7a66 | 304 | } |
305 | ||
ec575c20 | 306 | //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
cc1abc7f | 307 | void AliHMPIDQADataMakerRec::MakeRecPoints(TTree * clustersTree) |
308 | { | |
309 | // | |
310 | //filling QA histos for clusters | |
311 | // | |
7656d8ac | 312 | AliHMPIDParam *pPar =AliHMPIDParam::Instance(); |
6252ceeb | 313 | |
314 | if (fRecPointsArray) | |
315 | fRecPointsArray->Clear() ; | |
316 | else | |
317 | fRecPointsArray = new TClonesArray("AliHMPIDCluster"); | |
c2df1ef0 | 318 | |
aa21372e | 319 | for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++){ |
320 | TBranch *branch = clustersTree->GetBranch(Form("HMPID%d",iCh)); | |
6252ceeb | 321 | branch->SetAddress(&fRecPointsArray); |
04236e67 | 322 | branch->GetEntry(0); |
6252ceeb | 323 | GetRecPointsData(0)->Fill(iCh,fRecPointsArray->GetEntries()); |
324 | TIter next(fRecPointsArray); | |
04236e67 | 325 | AliHMPIDCluster *clu; |
cc1abc7f | 326 | while ( (clu = dynamic_cast<AliHMPIDCluster *>(next())) ) { |
aa21372e | 327 | GetRecPointsData(1)->Fill(clu->Status(),iCh); |
328 | Int_t sect = pPar->InHVSector(clu->Y()); | |
329 | if(clu->Q()>100) GetRecPointsData(2+iCh)->Fill(clu->Size()); | |
330 | else { | |
331 | GetRecPointsData(2+7+iCh)->Fill(clu->Size()); | |
6252ceeb | 332 | GetRecPointsData(2+14+iCh*6+sect)->Fill(clu->Q()); |
aa21372e | 333 | } |
334 | GetRecPointsData(2+14+42+iCh*6+sect)->Fill(clu->Q()); | |
04236e67 | 335 | } |
336 | } | |
04236e67 | 337 | } |
ec575c20 | 338 | //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
04236e67 | 339 | void AliHMPIDQADataMakerRec::MakeESDs(AliESDEvent * esd) |
340 | { | |
cc1abc7f | 341 | // |
04236e67 | 342 | //fills QA histos for ESD |
cc1abc7f | 343 | // |
6252ceeb | 344 | |
04236e67 | 345 | for(Int_t iTrk = 0 ; iTrk < esd->GetNumberOfTracks() ; iTrk++){ |
346 | AliESDtrack *pTrk = esd->GetTrack(iTrk) ; | |
cc1abc7f | 347 | GetESDsData(0)->Fill(pTrk->GetP(),pTrk->GetHMPIDsignal()); |
348 | GetESDsData(1)->Fill( pTrk->GetP(),TMath::Sqrt(pTrk->GetHMPIDchi2())); | |
04236e67 | 349 | Float_t xm,ym; Int_t q,np; |
350 | pTrk->GetHMPIDmip(xm,ym,q,np); //mip info | |
04236e67 | 351 | Float_t xRad,yRad,th,ph; |
352 | pTrk->GetHMPIDtrk(xRad,yRad,th,ph); //track info at the middle of the radiator | |
353 | Float_t xPc = xRad+9.25*TMath::Tan(th)*TMath::Cos(ph); // temporar: linear extrapol (B=0!) | |
354 | Float_t yPc = yRad+9.25*TMath::Tan(th)*TMath::Sin(ph); // temporar: " | |
7656d8ac | 355 | GetESDsData(2)->Fill(xm-xPc,ym-yPc); //track info |
356 | if(pTrk->GetHMPIDsignal()>0) { | |
357 | Double_t a = 1.292*1.292*TMath::Cos(pTrk->GetHMPIDsignal())*TMath::Cos(pTrk->GetHMPIDsignal())-1.; | |
358 | if(a > 0) { | |
359 | Double_t mass = pTrk->P()*TMath::Sqrt(1.292*1.292*TMath::Cos(pTrk->GetHMPIDsignal())*TMath::Cos(pTrk->GetHMPIDsignal())-1.); | |
360 | GetESDsData(3)->Fill( pTrk->GetP(),mass); | |
361 | } | |
362 | } | |
363 | Double_t pid[5] ; pTrk->GetHMPIDpid(pid) ; | |
cc1abc7f | 364 | for(Int_t i = 0 ; i < 5 ; i++) GetESDsData(4+i)->Fill(pid[i]) ; |
365 | } | |
366 | } | |
ec575c20 | 367 | //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
cc1abc7f | 368 | void AliHMPIDQADataMakerRec::StartOfDetectorCycle() |
369 | { | |
370 | //Detector specific actions at start of cycle | |
371 | ||
372 | } | |
ec575c20 | 373 | //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
cc1abc7f | 374 | |
4e25ac79 | 375 | void AliHMPIDQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray **histos) |
cc1abc7f | 376 | { |
377 | //Detector specific actions at end of cycle | |
378 | // do the QA checking | |
fdd7f404 | 379 | |
4e25ac79 | 380 | if(task==AliQAv1::kRAWS) { |
57acd2d2 | 381 | for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) { |
6252ceeb | 382 | if (! IsValidEventSpecie(specie, histos) ) |
eca4fa66 | 383 | continue ; |
57acd2d2 | 384 | for(Int_t iddl=0;iddl<14;iddl++) { |
385 | TH1F *h = (TH1F*)histos[specie]->At(14+iddl); //ddl histos scaled by the number of events | |
386 | h->Scale(1./(Float_t)fEvtRaw); | |
387 | } | |
a39cc5ff | 388 | } |
aa21372e | 389 | } |
4e25ac79 | 390 | AliQAChecker::Instance()->Run(AliQAv1::kHMPID, task, histos); |
04236e67 | 391 | } |
392 |