]>
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 | ||
bf4d93eb | 16 | // $Id$ |
17 | ||
b1341ab0 | 18 | // --- MUON header files --- |
19 | #include "AliMUONQADataMakerRec.h" | |
04236e67 | 20 | |
f587a77d | 21 | #include "AliMUON2DMap.h" |
04236e67 | 22 | #include "AliMUONCluster.h" |
b1341ab0 | 23 | #include "AliMUONConstants.h" |
2346e1ad | 24 | #include "AliMUONDDLTrigger.h" |
2346e1ad | 25 | #include "AliMUONDarcHeader.h" |
f587a77d | 26 | #include "AliMUONDigitMaker.h" |
2346e1ad | 27 | #include "AliMUONLocalStruct.h" |
f587a77d | 28 | #include "AliMUONLocalTrigger.h" |
29 | #include "AliMUONRawStreamTracker.h" | |
30 | #include "AliMUONRawStreamTrigger.h" | |
31 | #include "AliMUONRegHeader.h" | |
b6f591ae | 32 | #include "AliMUONTrackerDataMaker.h" |
aef183f7 | 33 | #include "AliMUONTriggerDisplay.h" |
f587a77d | 34 | #include "AliMUONVCluster.h" |
35 | #include "AliMUONVClusterStore.h" | |
36 | #include "AliMUONVDigit.h" | |
37 | #include "AliMUONVDigitStore.h" | |
38 | #include "AliMUONVTrackerData.h" | |
39 | #include "AliMUONVTriggerStore.h" | |
c92a8c85 | 40 | #include "AliMUONTrack.h" |
41 | #include "AliMUONTrackParam.h" | |
42 | #include "AliMUONESDInterface.h" | |
49e110ec | 43 | #include "AliMUONCalibrationData.h" |
5bb54f70 | 44 | #include "AliMpBusPatch.h" |
f587a77d | 45 | #include "AliMpCDB.h" |
2346e1ad | 46 | #include "AliMpConstants.h" |
f587a77d | 47 | #include "AliMpDDLStore.h" |
48 | #include "AliMpDEIterator.h" | |
49 | #include "AliMpDEManager.h" | |
b1341ab0 | 50 | #include "AliMpLocalBoard.h" |
f587a77d | 51 | #include "AliMpStationType.h" |
52 | #include "AliMpTriggerCrate.h" | |
49e110ec | 53 | #include "AliMpDCSNamer.h" |
f587a77d | 54 | #include "AliRawEventHeaderBase.h" |
2346e1ad | 55 | |
b1341ab0 | 56 | // --- AliRoot header files --- |
f587a77d | 57 | #include "AliCDBManager.h" |
58 | #include "AliCDBStorage.h" | |
b1341ab0 | 59 | #include "AliESDEvent.h" |
60 | #include "AliESDMuonTrack.h" | |
61 | #include "AliESDMuonCluster.h" | |
62 | #include "AliLog.h" | |
63 | #include "AliRawReader.h" | |
64 | #include "AliQAChecker.h" | |
f587a77d | 65 | #include "AliCodeTimer.h" |
49e110ec | 66 | #include "AliDCSValue.h" |
44ed7a66 | 67 | #include "AliMUONVDigit.h" |
b1341ab0 | 68 | |
69 | // --- ROOT system --- | |
70 | #include <TClonesArray.h> | |
71 | #include <TFile.h> | |
72 | #include <TH1F.h> | |
73 | #include <TH1I.h> | |
74 | #include <TH2F.h> | |
75 | #include <TH3F.h> | |
b1341ab0 | 76 | #include <Riostream.h> |
04236e67 | 77 | |
78 | //----------------------------------------------------------------------------- | |
79 | /// \class AliMUONQADataMakerRec | |
80 | /// | |
81 | /// MUON base class for quality assurance data (histo) maker | |
82 | /// | |
f587a77d | 83 | /// \author C. Finck, D. Stocco, L. Aphecetche |
04236e67 | 84 | |
85 | /// \cond CLASSIMP | |
86 | ClassImp(AliMUONQADataMakerRec) | |
87 | /// \endcond | |
88 | ||
89 | //____________________________________________________________________________ | |
b8bd1ab8 | 90 | AliMUONQADataMakerRec::AliMUONQADataMakerRec() : |
4e25ac79 | 91 | AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kMUON), "MUON Quality Assurance Data Maker"), |
f587a77d | 92 | fDigitStore(0x0), |
93 | fTriggerStore(0x0), | |
94 | fDigitMaker(0x0), | |
95 | fClusterStore(0x0), | |
abcfd6d0 | 96 | fTrackerDataMaker(0x0) |
04236e67 | 97 | { |
98 | /// ctor | |
f587a77d | 99 | |
5379c4a3 | 100 | AliDebug(AliQAv1::GetQADebugLevel(),""); |
d874bd09 | 101 | |
f587a77d | 102 | Ctor(); |
103 | } | |
104 | ||
105 | //____________________________________________________________________________ | |
106 | void | |
107 | AliMUONQADataMakerRec::Ctor() | |
108 | { | |
109 | /// Init some members | |
110 | fDigitStore = AliMUONVDigitStore::Create("AliMUONDigitStoreV1"); | |
111 | fDigitMaker = new AliMUONDigitMaker(kTRUE); | |
04236e67 | 112 | } |
113 | ||
114 | //____________________________________________________________________________ | |
115 | AliMUONQADataMakerRec::AliMUONQADataMakerRec(const AliMUONQADataMakerRec& qadm) : | |
f587a77d | 116 | AliQADataMakerRec(qadm), |
f587a77d | 117 | fDigitStore(0x0), |
118 | fTriggerStore(0x0), | |
119 | fDigitMaker(0x0), | |
120 | fClusterStore(0x0), | |
abcfd6d0 | 121 | fTrackerDataMaker(0x0) |
04236e67 | 122 | { |
123 | ///copy ctor | |
d874bd09 | 124 | |
5379c4a3 | 125 | AliDebug(AliQAv1::GetQADebugLevel(),""); |
d874bd09 | 126 | |
127 | ||
04236e67 | 128 | SetName((const char*)qadm.GetName()) ; |
129 | SetTitle((const char*)qadm.GetTitle()); | |
7035694f | 130 | |
f587a77d | 131 | // Do not copy the digit store and digit maker, but create its own ones |
132 | ||
133 | Ctor(); | |
134 | ||
04236e67 | 135 | } |
136 | ||
137 | //__________________________________________________________________ | |
138 | AliMUONQADataMakerRec& AliMUONQADataMakerRec::operator = (const AliMUONQADataMakerRec& qadm ) | |
139 | { | |
7035694f | 140 | /// Assignment operator |
141 | ||
5379c4a3 | 142 | AliDebug(AliQAv1::GetQADebugLevel(),""); |
d874bd09 | 143 | |
7035694f | 144 | // check assignment to self |
145 | if (this == &qadm) return *this; | |
146 | ||
147 | this->~AliMUONQADataMakerRec(); | |
148 | new(this) AliMUONQADataMakerRec(qadm); | |
149 | return *this; | |
04236e67 | 150 | } |
151 | ||
152 | //__________________________________________________________________ | |
153 | AliMUONQADataMakerRec::~AliMUONQADataMakerRec() | |
154 | { | |
155 | /// dtor | |
f587a77d | 156 | |
5379c4a3 | 157 | AliDebug(AliQAv1::GetQADebugLevel(),""); |
d874bd09 | 158 | |
f587a77d | 159 | AliCodeTimerAuto(""); |
160 | ||
161 | delete fDigitStore; | |
162 | delete fTriggerStore; | |
163 | delete fDigitMaker; | |
c92a8c85 | 164 | delete fClusterStore; |
165 | delete fTrackerDataMaker; | |
04236e67 | 166 | } |
167 | ||
168 | //____________________________________________________________________________ | |
4e25ac79 | 169 | void AliMUONQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray** list) |
04236e67 | 170 | { |
c92a8c85 | 171 | ///Detector specific actions at end of cycle |
172 | ||
5bb54f70 | 173 | AliCodeTimerAuto(""); |
174 | ||
c92a8c85 | 175 | // Display trigger histos in a more user friendly way |
176 | DisplayTriggerInfo(task); | |
177 | ||
c455c5fb | 178 | for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) |
179 | { | |
6252ceeb | 180 | if (! IsValidEventSpecie(specie, list) ) |
eca4fa66 | 181 | continue ; |
182 | SetEventSpecie(AliRecoParam::ConvertIndex(specie)) ; | |
4e25ac79 | 183 | if ( task == AliQAv1::kRAWS && fTrackerDataMaker ) |
5bb54f70 | 184 | { |
c455c5fb | 185 | |
186 | if ( !GetRawsData(kTrackerBusPatchOccupancy) ) continue; | |
187 | ||
57acd2d2 | 188 | TIter next(list[specie]); |
189 | TObject* o; | |
190 | Bool_t alreadyThere(kFALSE); | |
191 | while ( ( o = next() ) && !alreadyThere ) | |
192 | { | |
193 | TString classname(o->ClassName()); | |
194 | if ( classname.Contains("TrackerData") ) alreadyThere = kTRUE; | |
195 | } | |
196 | if (!alreadyThere && fTrackerDataMaker) | |
197 | { | |
5379c4a3 | 198 | AliDebug(AliQAv1::GetQADebugLevel(), "Adding fTrackerDataMaker to the list of qa objects"); |
57acd2d2 | 199 | list[specie]->AddAt(fTrackerDataMaker->Data(),(Int_t)kTrackerData); |
200 | } | |
201 | if ( fTrackerDataMaker ) | |
202 | { | |
203 | TH1* hbp = GetRawsData(kTrackerBusPatchOccupancy); | |
204 | hbp->Reset(); | |
205 | TIter nextBP(AliMpDDLStore::Instance()->CreateBusPatchIterator()); | |
206 | AliMpBusPatch* bp(0x0); | |
207 | AliMUONVTrackerData* data = fTrackerDataMaker->Data(); | |
208 | Int_t occDim = 2; | |
209 | ||
210 | while ( ( bp = static_cast<AliMpBusPatch*>(nextBP())) ) | |
211 | { | |
212 | Int_t busPatchId = bp->GetId(); | |
213 | Int_t bin = hbp->FindBin(busPatchId); | |
214 | hbp->SetBinContent(bin,data->BusPatch(busPatchId,occDim)); | |
215 | } | |
216 | } | |
5bb54f70 | 217 | } |
2d114b34 | 218 | |
219 | // Normalize RecPoints histos | |
4e25ac79 | 220 | if ( task == AliQAv1::kRECPOINTS ) { |
2d114b34 | 221 | |
c455c5fb | 222 | if (!GetRecPointsData(kTrackerClusterChargePerChMean)) continue; |
223 | ||
2d114b34 | 224 | TH1* hTrackerClusterChargePerChMean = GetRecPointsData(kTrackerClusterChargePerChMean); |
225 | TH1* hTrackerClusterChargePerChSigma = GetRecPointsData(kTrackerClusterChargePerChSigma); | |
226 | TH1* hTrackerClusterMultiplicityPerChMean = GetRecPointsData(kTrackerClusterMultiplicityPerChMean); | |
227 | TH1* hTrackerClusterMultiplicityPerChSigma = GetRecPointsData(kTrackerClusterMultiplicityPerChSigma); | |
228 | TH1* hTrackerClusterChargePerDEMean = GetRecPointsData(kTrackerClusterChargePerDEMean); | |
229 | TH1* hTrackerClusterMultiplicityPerDEMean = GetRecPointsData(kTrackerClusterMultiplicityPerDEMean); | |
230 | ||
231 | // loop over chambers | |
232 | for (Int_t iCh = 0; iCh < AliMUONConstants::NTrackingCh(); iCh++) { | |
233 | ||
eca4fa66 | 234 | TH1* hTrackerClusterChargePerChamber = GetRecPointsData(kTrackerClusterChargePerChamber+iCh); |
235 | Double_t sigmaCharge = hTrackerClusterChargePerChamber->GetRMS(); | |
236 | hTrackerClusterChargePerChMean->SetBinContent(iCh+1, hTrackerClusterChargePerChamber->GetMean()); | |
237 | hTrackerClusterChargePerChMean->SetBinError(iCh+1, hTrackerClusterChargePerChamber->GetMeanError()); | |
238 | hTrackerClusterChargePerChSigma->SetBinContent(iCh+1, sigmaCharge); | |
239 | hTrackerClusterChargePerChSigma->SetBinError(iCh+1, hTrackerClusterChargePerChamber->GetRMSError()); | |
240 | ||
241 | TH1* hTrackerClusterMultiplicityPerChamber = GetRecPointsData(kTrackerClusterMultiplicityPerChamber+iCh); | |
242 | Double_t sigmaSize = hTrackerClusterMultiplicityPerChamber->GetRMS(); | |
243 | hTrackerClusterMultiplicityPerChMean->SetBinContent(iCh+1, hTrackerClusterMultiplicityPerChamber->GetMean()); | |
244 | hTrackerClusterMultiplicityPerChMean->SetBinError(iCh+1, hTrackerClusterMultiplicityPerChamber->GetMeanError()); | |
245 | hTrackerClusterMultiplicityPerChSigma->SetBinContent(iCh+1, sigmaSize); | |
246 | hTrackerClusterMultiplicityPerChSigma->SetBinError(iCh+1, hTrackerClusterMultiplicityPerChamber->GetRMSError()); | |
247 | ||
248 | // loop over DE into chamber iCh | |
249 | AliMpDEIterator it; | |
250 | it.First(iCh); | |
251 | while ( !it.IsDone()) { | |
252 | ||
253 | Int_t iDE = it.CurrentDEId(); | |
254 | ||
255 | TH1* hTrackerClusterChargePerDE = GetRecPointsData(kTrackerClusterChargePerDE+iDE); | |
256 | hTrackerClusterChargePerDEMean->SetBinContent(iDE+1, hTrackerClusterChargePerDE->GetMean()); | |
257 | Double_t nClusters = hTrackerClusterChargePerDE->GetEntries(); | |
258 | if (nClusters > 1) hTrackerClusterChargePerDEMean->SetBinError(iDE+1, sigmaCharge/TMath::Sqrt(nClusters)); | |
259 | else hTrackerClusterChargePerDEMean->SetBinError(iDE+1, hTrackerClusterChargePerChamber->GetXaxis()->GetXmax()); | |
260 | ||
261 | TH1* hTrackerClusterMultiplicityPerDE = GetRecPointsData(kTrackerClusterMultiplicityPerDE+iDE); | |
262 | hTrackerClusterMultiplicityPerDEMean->SetBinContent(iDE+1, hTrackerClusterMultiplicityPerDE->GetMean()); | |
263 | nClusters = hTrackerClusterMultiplicityPerDE->GetEntries(); | |
264 | if (nClusters > 1) hTrackerClusterMultiplicityPerDEMean->SetBinError(iDE+1, sigmaSize/TMath::Sqrt(nClusters)); | |
265 | else hTrackerClusterMultiplicityPerDEMean->SetBinError(iDE+1, hTrackerClusterMultiplicityPerChamber->GetXaxis()->GetXmax()); | |
266 | ||
267 | it.Next(); | |
268 | } | |
269 | ||
2d114b34 | 270 | } |
271 | ||
272 | } | |
273 | ||
5a240757 | 274 | // Normalize ESD histos |
4e25ac79 | 275 | if ( task == AliQAv1::kESDS ) { |
c92a8c85 | 276 | |
c455c5fb | 277 | if (!GetESDsData(kESDnClustersPerTrack)) continue; |
278 | ||
5a240757 | 279 | Double_t nTracks = GetESDsData(kESDnClustersPerTrack)->GetEntries(); |
280 | if (nTracks <= 0) continue; | |
281 | ||
282 | TH1* hESDnClustersPerCh = GetESDsData(kESDnClustersPerCh); | |
283 | TH1* hESDnClustersPerDE = GetESDsData(kESDnClustersPerDE); | |
284 | TH1* hESDClusterChargePerChMean = GetESDsData(kESDClusterChargePerChMean); | |
285 | TH1* hESDClusterChargePerChSigma = GetESDsData(kESDClusterChargePerChSigma); | |
286 | TH1* hESDClusterSizePerChMean = GetESDsData(kESDClusterSizePerChMean); | |
287 | TH1* hESDClusterSizePerChSigma = GetESDsData(kESDClusterSizePerChSigma); | |
288 | TH1* hESDResidualXPerChMean = GetESDsData(kESDResidualXPerChMean); | |
289 | TH1* hESDResidualXPerChSigma = GetESDsData(kESDResidualXPerChSigma); | |
290 | TH1* hESDResidualYPerChMean = GetESDsData(kESDResidualYPerChMean); | |
291 | TH1* hESDResidualYPerChSigma = GetESDsData(kESDResidualYPerChSigma); | |
292 | TH1* hESDLocalChi2XPerChMean = GetESDsData(kESDLocalChi2XPerChMean); | |
293 | TH1* hESDLocalChi2YPerChMean = GetESDsData(kESDLocalChi2YPerChMean); | |
d1e6fdee | 294 | TH1* hESDLocalChi2PerChMean = GetESDsData(kESDLocalChi2PerChMean); |
5a240757 | 295 | TH1* hESDClusterChargePerDE = GetESDsData(kESDClusterChargePerDE); |
296 | TH1* hESDClusterSizePerDE = GetESDsData(kESDClusterSizePerDE); | |
297 | TH1* hESDResidualXPerDEMean = GetESDsData(kESDResidualXPerDEMean); | |
298 | TH1* hESDResidualXPerDESigma = GetESDsData(kESDResidualXPerDESigma); | |
299 | TH1* hESDResidualYPerDEMean = GetESDsData(kESDResidualYPerDEMean); | |
300 | TH1* hESDResidualYPerDESigma = GetESDsData(kESDResidualYPerDESigma); | |
301 | TH1* hESDLocalChi2XPerDEMean = GetESDsData(kESDLocalChi2XPerDEMean); | |
302 | TH1* hESDLocalChi2YPerDEMean = GetESDsData(kESDLocalChi2YPerDEMean); | |
d1e6fdee | 303 | TH1* hESDLocalChi2PerDEMean = GetESDsData(kESDLocalChi2PerDEMean); |
abcfd6d0 | 304 | TH1* hESDnTotClustersPerCh = GetESDsData(kESDnTotClustersPerCh); |
305 | TH1* hESDnTotClustersPerDE = GetESDsData(kESDnTotClustersPerDE); | |
306 | TH1* hESDnTotFullClustersPerDE = GetESDsData(kESDnTotFullClustersPerDE); | |
307 | TH1* hESDSumClusterChargePerDE = GetESDsData(kESDSumClusterChargePerDE); | |
308 | TH1* hESDSumClusterSizePerDE = GetESDsData(kESDSumClusterSizePerDE); | |
309 | TH1* hESDSumResidualXPerDE = GetESDsData(kESDSumResidualXPerDE); | |
310 | TH1* hESDSumResidualYPerDE = GetESDsData(kESDSumResidualYPerDE); | |
311 | TH1* hESDSumResidualX2PerDE = GetESDsData(kESDSumResidualX2PerDE); | |
312 | TH1* hESDSumResidualY2PerDE = GetESDsData(kESDSumResidualY2PerDE); | |
313 | TH1* hESDSumLocalChi2XPerDE = GetESDsData(kESDSumLocalChi2XPerDE); | |
314 | TH1* hESDSumLocalChi2YPerDE = GetESDsData(kESDSumLocalChi2YPerDE); | |
d1e6fdee | 315 | TH1* hESDSumLocalChi2PerDE = GetESDsData(kESDSumLocalChi2PerDE); |
316 | ||
5a240757 | 317 | hESDnClustersPerCh->Reset(); |
318 | hESDnClustersPerDE->Reset(); | |
abcfd6d0 | 319 | hESDnClustersPerCh->Add(hESDnTotClustersPerCh, 1./nTracks); |
320 | hESDnClustersPerDE->Add(hESDnTotClustersPerDE, 1./nTracks); | |
c92a8c85 | 321 | |
5a240757 | 322 | // loop over chambers |
323 | for (Int_t iCh = 0; iCh < AliMUONConstants::NTrackingCh(); iCh++) { | |
324 | ||
325 | TH1* hESDClusterChargeInCh = GetESDsData(kESDClusterChargeInCh+iCh); | |
326 | Double_t sigmaCharge = hESDClusterChargeInCh->GetRMS(); | |
327 | hESDClusterChargePerChMean->SetBinContent(iCh+1, hESDClusterChargeInCh->GetMean()); | |
328 | hESDClusterChargePerChMean->SetBinError(iCh+1, hESDClusterChargeInCh->GetMeanError()); | |
329 | hESDClusterChargePerChSigma->SetBinContent(iCh+1, sigmaCharge); | |
330 | hESDClusterChargePerChSigma->SetBinError(iCh+1, hESDClusterChargeInCh->GetRMSError()); | |
331 | ||
332 | TH1* hESDClusterSizeInCh = GetESDsData(kESDClusterSizeInCh+iCh); | |
333 | Double_t sigmaSize = hESDClusterSizeInCh->GetRMS(); | |
334 | hESDClusterSizePerChMean->SetBinContent(iCh+1, hESDClusterSizeInCh->GetMean()); | |
335 | hESDClusterSizePerChMean->SetBinError(iCh+1, hESDClusterSizeInCh->GetMeanError()); | |
336 | hESDClusterSizePerChSigma->SetBinContent(iCh+1, sigmaSize); | |
337 | hESDClusterSizePerChSigma->SetBinError(iCh+1, hESDClusterSizeInCh->GetRMSError()); | |
338 | ||
339 | TH1* hESDResidualXInCh = GetESDsData(kESDResidualXInCh+iCh); | |
340 | Double_t sigmaResidualX = hESDResidualXInCh->GetRMS(); | |
341 | hESDResidualXPerChMean->SetBinContent(iCh+1, hESDResidualXInCh->GetMean()); | |
342 | hESDResidualXPerChMean->SetBinError(iCh+1, hESDResidualXInCh->GetMeanError()); | |
343 | hESDResidualXPerChSigma->SetBinContent(iCh+1, sigmaResidualX); | |
344 | hESDResidualXPerChSigma->SetBinError(iCh+1, hESDResidualXInCh->GetRMSError()); | |
345 | ||
346 | TH1* hESDResidualYInCh = GetESDsData(kESDResidualYInCh+iCh); | |
347 | Double_t sigmaResidualY = hESDResidualYInCh->GetRMS(); | |
348 | hESDResidualYPerChMean->SetBinContent(iCh+1, hESDResidualYInCh->GetMean()); | |
349 | hESDResidualYPerChMean->SetBinError(iCh+1, hESDResidualYInCh->GetMeanError()); | |
350 | hESDResidualYPerChSigma->SetBinContent(iCh+1, sigmaResidualY); | |
351 | hESDResidualYPerChSigma->SetBinError(iCh+1, hESDResidualYInCh->GetRMSError()); | |
352 | ||
353 | TH1* hESDLocalChi2XInCh = GetESDsData(kESDLocalChi2XInCh+iCh); | |
354 | Double_t sigmaLocalChi2X = hESDLocalChi2XInCh->GetRMS(); | |
355 | hESDLocalChi2XPerChMean->SetBinContent(iCh+1, hESDLocalChi2XInCh->GetMean()); | |
356 | hESDLocalChi2XPerChMean->SetBinError(iCh+1, hESDLocalChi2XInCh->GetMeanError()); | |
357 | ||
358 | TH1* hESDLocalChi2YInCh = GetESDsData(kESDLocalChi2YInCh+iCh); | |
359 | Double_t sigmaLocalChi2Y = hESDLocalChi2YInCh->GetRMS(); | |
360 | hESDLocalChi2YPerChMean->SetBinContent(iCh+1, hESDLocalChi2YInCh->GetMean()); | |
361 | hESDLocalChi2YPerChMean->SetBinError(iCh+1, hESDLocalChi2YInCh->GetMeanError()); | |
362 | ||
d1e6fdee | 363 | TH1* hESDLocalChi2InCh = GetESDsData(kESDLocalChi2InCh+iCh); |
364 | Double_t sigmaLocalChi2 = hESDLocalChi2InCh->GetRMS(); | |
365 | hESDLocalChi2PerChMean->SetBinContent(iCh+1, hESDLocalChi2InCh->GetMean()); | |
366 | hESDLocalChi2PerChMean->SetBinError(iCh+1, hESDLocalChi2InCh->GetMeanError()); | |
367 | ||
5a240757 | 368 | // loop over DE into chamber iCh |
369 | AliMpDEIterator it; | |
370 | it.First(iCh); | |
371 | while ( !it.IsDone()) { | |
372 | ||
373 | Int_t iDE = it.CurrentDEId(); | |
374 | ||
abcfd6d0 | 375 | Double_t nClusters = hESDnTotClustersPerDE->GetBinContent(iDE+1); |
5a240757 | 376 | if (nClusters > 1) { |
377 | ||
abcfd6d0 | 378 | hESDClusterChargePerDE->SetBinContent(iDE+1, hESDSumClusterChargePerDE->GetBinContent(iDE+1)/nClusters); |
5a240757 | 379 | hESDClusterChargePerDE->SetBinError(iDE+1, sigmaCharge/TMath::Sqrt(nClusters)); |
380 | ||
abcfd6d0 | 381 | Double_t meanResX = hESDSumResidualXPerDE->GetBinContent(iDE+1)/nClusters; |
5a240757 | 382 | hESDResidualXPerDEMean->SetBinContent(iDE+1, meanResX); |
383 | hESDResidualXPerDEMean->SetBinError(iDE+1, sigmaResidualX/TMath::Sqrt(nClusters)); | |
abcfd6d0 | 384 | hESDResidualXPerDESigma->SetBinContent(iDE+1, TMath::Sqrt(hESDSumResidualX2PerDE->GetBinContent(iDE+1)/nClusters - meanResX*meanResX)); |
5a240757 | 385 | hESDResidualXPerDESigma->SetBinError(iDE+1, sigmaResidualX/TMath::Sqrt(2.*nClusters)); |
386 | ||
abcfd6d0 | 387 | Double_t meanResY = hESDSumResidualYPerDE->GetBinContent(iDE+1)/nClusters; |
5a240757 | 388 | hESDResidualYPerDEMean->SetBinContent(iDE+1, meanResY); |
389 | hESDResidualYPerDEMean->SetBinError(iDE+1, sigmaResidualY/TMath::Sqrt(nClusters)); | |
abcfd6d0 | 390 | hESDResidualYPerDESigma->SetBinContent(iDE+1, TMath::Sqrt(hESDSumResidualY2PerDE->GetBinContent(iDE+1)/nClusters - meanResY*meanResY)); |
5a240757 | 391 | hESDResidualYPerDESigma->SetBinError(iDE+1, sigmaResidualY/TMath::Sqrt(2.*nClusters)); |
392 | ||
abcfd6d0 | 393 | hESDLocalChi2XPerDEMean->SetBinContent(iDE+1, hESDSumLocalChi2XPerDE->GetBinContent(iDE+1)/nClusters); |
5a240757 | 394 | hESDLocalChi2XPerDEMean->SetBinError(iDE+1, sigmaLocalChi2X/TMath::Sqrt(nClusters)); |
395 | ||
abcfd6d0 | 396 | hESDLocalChi2YPerDEMean->SetBinContent(iDE+1, hESDSumLocalChi2YPerDE->GetBinContent(iDE+1)/nClusters); |
5a240757 | 397 | hESDLocalChi2YPerDEMean->SetBinError(iDE+1, sigmaLocalChi2Y/TMath::Sqrt(nClusters)); |
398 | ||
d1e6fdee | 399 | hESDLocalChi2PerDEMean->SetBinContent(iDE+1, hESDSumLocalChi2PerDE->GetBinContent(iDE+1)/nClusters); |
400 | hESDLocalChi2PerDEMean->SetBinError(iDE+1, sigmaLocalChi2/TMath::Sqrt(nClusters)); | |
401 | ||
5a240757 | 402 | } else { |
403 | ||
abcfd6d0 | 404 | hESDClusterChargePerDE->SetBinContent(iDE+1, hESDSumClusterChargePerDE->GetBinContent(iDE+1)); |
5a240757 | 405 | hESDClusterChargePerDE->SetBinError(iDE+1, hESDClusterChargeInCh->GetXaxis()->GetXmax()); |
406 | ||
abcfd6d0 | 407 | hESDResidualXPerDEMean->SetBinContent(iDE+1, hESDSumResidualXPerDE->GetBinContent(iDE+1)); |
5a240757 | 408 | hESDResidualXPerDEMean->SetBinError(iDE+1, hESDResidualXInCh->GetXaxis()->GetXmax()); |
409 | hESDResidualXPerDESigma->SetBinContent(iDE+1, 0.); | |
410 | hESDResidualXPerDESigma->SetBinError(iDE+1, hESDResidualXInCh->GetXaxis()->GetXmax()); | |
411 | ||
abcfd6d0 | 412 | hESDResidualYPerDEMean->SetBinContent(iDE+1, hESDSumResidualYPerDE->GetBinContent(iDE+1)); |
5a240757 | 413 | hESDResidualYPerDEMean->SetBinError(iDE+1, hESDResidualYInCh->GetXaxis()->GetXmax()); |
414 | hESDResidualYPerDESigma->SetBinContent(iDE+1, 0.); | |
415 | hESDResidualYPerDESigma->SetBinError(iDE+1, hESDResidualYInCh->GetXaxis()->GetXmax()); | |
416 | ||
abcfd6d0 | 417 | hESDLocalChi2XPerDEMean->SetBinContent(iDE+1, hESDSumLocalChi2XPerDE->GetBinContent(iDE+1)); |
5a240757 | 418 | hESDLocalChi2XPerDEMean->SetBinError(iDE+1, hESDLocalChi2XInCh->GetXaxis()->GetXmax()); |
419 | ||
abcfd6d0 | 420 | hESDLocalChi2YPerDEMean->SetBinContent(iDE+1, hESDSumLocalChi2YPerDE->GetBinContent(iDE+1)); |
5a240757 | 421 | hESDLocalChi2YPerDEMean->SetBinError(iDE+1, hESDLocalChi2YInCh->GetXaxis()->GetXmax()); |
422 | ||
d1e6fdee | 423 | hESDLocalChi2PerDEMean->SetBinContent(iDE+1, hESDSumLocalChi2PerDE->GetBinContent(iDE+1)); |
424 | hESDLocalChi2PerDEMean->SetBinError(iDE+1, hESDLocalChi2InCh->GetXaxis()->GetXmax()); | |
425 | ||
5a240757 | 426 | } |
427 | ||
abcfd6d0 | 428 | Double_t nFullClusters = hESDnTotFullClustersPerDE->GetBinContent(iDE+1); |
5a240757 | 429 | if (nFullClusters > 1) { |
430 | ||
abcfd6d0 | 431 | hESDClusterSizePerDE->SetBinContent(iDE+1, hESDSumClusterSizePerDE->GetBinContent(iDE+1)/nFullClusters); |
5a240757 | 432 | hESDClusterSizePerDE->SetBinError(iDE+1, sigmaSize/TMath::Sqrt(nFullClusters)); |
433 | ||
434 | } else { | |
435 | ||
abcfd6d0 | 436 | hESDClusterSizePerDE->SetBinContent(iDE+1, hESDSumClusterSizePerDE->GetBinContent(iDE+1)); |
5a240757 | 437 | hESDClusterSizePerDE->SetBinError(iDE+1, hESDClusterSizeInCh->GetXaxis()->GetXmax()); |
438 | ||
439 | } | |
440 | ||
441 | it.Next(); | |
442 | } | |
443 | ||
435844ac | 444 | } |
5a240757 | 445 | |
435844ac | 446 | } |
5a240757 | 447 | |
c92a8c85 | 448 | } |
5a240757 | 449 | |
c92a8c85 | 450 | // do the QA checking |
4e25ac79 | 451 | AliQAChecker::Instance()->Run(AliQAv1::kMUON, task, list) ; |
04236e67 | 452 | } |
453 | ||
454 | //____________________________________________________________________________ | |
455 | void AliMUONQADataMakerRec::InitRaws() | |
456 | { | |
457 | /// create Raws histograms in Raws subdir | |
f587a77d | 458 | |
5bb54f70 | 459 | AliCodeTimerAuto(""); |
460 | ||
7d297381 | 461 | const Bool_t expert = kTRUE ; |
462 | const Bool_t saveCorr = kTRUE ; | |
463 | const Bool_t image = kTRUE ; | |
5bb54f70 | 464 | |
f587a77d | 465 | if ( ! AliCDBManager::Instance()->GetDefaultStorage() ) |
466 | { | |
467 | AliError("CDB default storage not set. Cannot work."); | |
f587a77d | 468 | } |
469 | ||
470 | TH3F* h3 = new TH3F("hTriggerScalersBendPlane", "Trigger scalers in bending plane", | |
471 | 4, 10.5, 14.5, | |
472 | 234, 0.5, 234.5, | |
473 | 16, -0.5, 15.5); | |
474 | h3->GetXaxis()->SetTitle("Chamber"); | |
475 | h3->GetYaxis()->SetTitle("Board"); | |
476 | h3->GetZaxis()->SetTitle("Strip"); | |
7d297381 | 477 | Add2RawsList(h3, kTriggerScalersBP, expert, !image, !saveCorr); |
f587a77d | 478 | |
479 | TH3F* h4 = new TH3F("hTriggerScalersNonBendPlane", "Trigger scalers in non-bending plane", | |
480 | 4, 10.5, 14.5, | |
481 | 234, 0.5, 234.5, | |
482 | 16, -0.5, 15.5); | |
483 | h4->GetXaxis()->SetTitle("Chamber"); | |
484 | h4->GetYaxis()->SetTitle("Board"); | |
485 | h4->GetZaxis()->SetTitle("Strip"); | |
7d297381 | 486 | Add2RawsList(h4, kTriggerScalersNBP, expert, !image, !saveCorr); |
f587a77d | 487 | |
488 | AliMUONTriggerDisplay triggerDisplay; | |
489 | TString histoName, histoTitle; | |
490 | for(Int_t iCath=0; iCath<AliMpConstants::NofCathodes(); iCath++){ | |
491 | TString cathName = ( iCath==0 ) ? "BendPlane" : "NonBendPlane"; | |
492 | for(Int_t iChamber=0; iChamber<AliMpConstants::NofTriggerChambers(); iChamber++){ | |
493 | histoName = Form("hScalers%sChamber%i", cathName.Data(), 11+iChamber); | |
494 | histoTitle = Form("Chamber %i: Scalers %s", 11+iChamber, cathName.Data()); | |
495 | TH2F* h5 = (TH2F*)triggerDisplay.GetEmptyDisplayHisto(histoName, AliMUONTriggerDisplay::kDisplayStrips, | |
c92a8c85 | 496 | iCath, iChamber, histoTitle); |
7d297381 | 497 | Add2RawsList(h5, kTriggerScalersDisplay + AliMpConstants::NofTriggerChambers()*iCath + iChamber, !expert, image, !saveCorr); |
f587a77d | 498 | } |
499 | } | |
49e110ec | 500 | |
501 | TH2F* h6 = new TH2F("hTriggerRPCI", "Trigger RPC currents", | |
502 | 4, 10.5, 14.5, | |
503 | 18, -0.5, 17.5); | |
504 | h6->GetXaxis()->SetTitle("Chamber"); | |
505 | h6->GetYaxis()->SetTitle("RPC"); | |
7d297381 | 506 | Add2RawsList(h6, kTriggerRPCi, expert, !image, !saveCorr); |
49e110ec | 507 | |
508 | TH2F* h7 = new TH2F("hTriggerRPCHV", "Trigger RPC HV", | |
509 | 4, 10.5, 14.5, | |
510 | 18, -0.5, 17.5); | |
511 | h7->GetXaxis()->SetTitle("Chamber"); | |
512 | h7->GetYaxis()->SetTitle("RPC"); | |
7d297381 | 513 | Add2RawsList(h7, kTriggerRPChv, expert, !image, !saveCorr); |
49e110ec | 514 | |
515 | for(Int_t iChamber=0; iChamber<AliMpConstants::NofTriggerChambers(); iChamber++){ | |
516 | histoName = Form("hRPCIChamber%i", 11+iChamber); | |
517 | histoTitle = Form("Chamber %i: RPC Currents (#muA)", 11+iChamber); | |
518 | TH2F* h8 = (TH2F*)triggerDisplay.GetEmptyDisplayHisto(histoName, AliMUONTriggerDisplay::kDisplaySlats, | |
519 | 0, iChamber, histoTitle); | |
7d297381 | 520 | Add2RawsList(h8, kTriggerIDisplay + iChamber, !expert, image, !saveCorr); |
49e110ec | 521 | } |
522 | ||
523 | for(Int_t iChamber=0; iChamber<AliMpConstants::NofTriggerChambers(); iChamber++){ | |
524 | histoName = Form("hRPCHVChamber%i", 11+iChamber); | |
525 | histoTitle = Form("Chamber %i: RPC HV (V)", 11+iChamber); | |
526 | TH2F* h9 = (TH2F*)triggerDisplay.GetEmptyDisplayHisto(histoName, AliMUONTriggerDisplay::kDisplaySlats, | |
527 | 0, iChamber, histoTitle); | |
7d297381 | 528 | Add2RawsList(h9, kTriggerHVDisplay + iChamber, !expert, image, !saveCorr); |
49e110ec | 529 | } |
530 | ||
eb3886c8 | 531 | TH1F* h10 = new TH1F("hTriggerScalersTime", "Trigger scalers acquisition time", 1, 0.5, 1.5); |
532 | h10->GetXaxis()->SetBinLabel(1, "One-bin histogram: bin is filled at each scaler event."); | |
533 | h10->GetYaxis()->SetTitle("Cumulated scaler time (s)"); | |
7d297381 | 534 | Add2RawsList(h10, kTriggerScalersTime, !expert, image, !saveCorr); |
f587a77d | 535 | |
5bb54f70 | 536 | Int_t nbp(0); |
537 | TIter next(AliMpDDLStore::Instance()->CreateBusPatchIterator()); | |
538 | while (next()) | |
539 | { | |
540 | ++nbp; | |
541 | } | |
542 | ||
543 | TH1* hbp = new TH1F("hTrackerBusPatchOccupancy","Occupancy of bus patches", | |
544 | nbp,-0.5,nbp-0.5); | |
545 | ||
7d297381 | 546 | Add2RawsList(hbp,kTrackerBusPatchOccupancy, !expert, image, !saveCorr); |
de1d4a53 | 547 | |
548 | const Bool_t histogram(kFALSE); | |
b6f591ae | 549 | |
ac624e6b | 550 | fTrackerDataMaker = new AliMUONTrackerDataMaker(GetMUONRecoParam(), |
b6f591ae | 551 | AliCDBManager::Instance()->GetRun(), |
552 | 0x0, | |
553 | AliCDBManager::Instance()->GetDefaultStorage()->GetURI(), | |
554 | "NOGAIN", | |
555 | histogram, | |
556 | 0.0,0.0); | |
de1d4a53 | 557 | |
558 | fTrackerDataMaker->Data()->DisableChannelLevel(); // to save up disk space, we only store starting at the manu level | |
559 | ||
560 | fTrackerDataMaker->SetRunning(kTRUE); | |
f587a77d | 561 | } |
04236e67 | 562 | |
44ed7a66 | 563 | //__________________________________________________________________ |
564 | void AliMUONQADataMakerRec::InitDigits() | |
565 | { | |
566 | /// Initialized Digits spectra | |
567 | const Bool_t expert = kTRUE ; | |
568 | const Bool_t image = kTRUE ; | |
569 | ||
db72ff3b | 570 | TH1I* h0 = new TH1I("hDigitsDetElem", "Detection element distribution in Digits;Detection element Id;Counts", 1400, 100, 1500); |
44ed7a66 | 571 | Add2DigitsList(h0, 0, !expert, image); |
572 | ||
db72ff3b | 573 | TH1I* h1 = new TH1I("hDigitsADC", "ADC distribution in Digits;ACD value;Counts", 4096, 0, 4095); |
574 | Add2DigitsList(h1, 1, !expert, image); | |
44ed7a66 | 575 | } |
576 | ||
f587a77d | 577 | //____________________________________________________________________________ |
578 | void AliMUONQADataMakerRec::InitRecPoints() | |
579 | { | |
580 | /// create Reconstructed Points histograms in RecPoints subdir | |
5bb54f70 | 581 | |
582 | AliCodeTimerAuto(""); | |
583 | ||
f587a77d | 584 | InitRecPointsTrigger(); |
585 | InitRecPointsTracker(); | |
586 | } | |
587 | ||
588 | //____________________________________________________________________________ | |
589 | void AliMUONQADataMakerRec::InitRecPointsTracker() | |
590 | { | |
2d114b34 | 591 | /// create Reconstructed Points histograms in RecPoints subdir for the |
592 | /// MUON tracker subsystem. | |
7d297381 | 593 | const Bool_t expert = kTRUE ; |
594 | const Bool_t image = kTRUE ; | |
2d114b34 | 595 | |
5bb54f70 | 596 | AliCodeTimerAuto(""); |
597 | ||
2d114b34 | 598 | TH1I *h1I; |
599 | TH1F *h1F; | |
600 | TH2F *h2F; | |
5bb54f70 | 601 | |
2d114b34 | 602 | // histograms per chamber |
603 | Int_t nCh = AliMpConstants::NofTrackingChambers(); | |
604 | for ( Int_t i = 0; i < nCh; ++i ) | |
605 | { | |
db72ff3b | 606 | h1I = new TH1I(Form("hTrackerClusterMultiplicityForChamber%d",i+1), Form("cluster size distribution in chamber %d;size (n_{pads};Counts)",i+1), 100,0,100); |
7d297381 | 607 | Add2RecPointsList(h1I,kTrackerClusterMultiplicityPerChamber+i, expert, !image); |
2d114b34 | 608 | |
db72ff3b | 609 | h1I = new TH1I(Form("hTrackerClusterChargeForChamber%d",i+1), Form("cluster charge distribution in chamber %d;charge (ADC counts);Counts",i+1), 500,0,5000); |
7d297381 | 610 | Add2RecPointsList(h1I,kTrackerClusterChargePerChamber+i, expert, !image); |
2d114b34 | 611 | |
612 | Float_t rMax = AliMUONConstants::Rmax(i/2); | |
613 | h2F = new TH2F(Form("hTrackerClusterHitMapForChamber%d",i+1), Form("cluster position distribution in chamber %d;X (cm);Y (cm)",i+1), 100, -rMax, rMax, 100, -rMax, rMax); | |
7d297381 | 614 | Add2RecPointsList(h2F, kTrackerClusterHitMapPerChamber+i, expert, !image); |
2d114b34 | 615 | } |
616 | ||
617 | // summary histograms per chamber | |
618 | h1I = new TH1I("hTrackerNumberOfClustersPerChamber", "Number of clusters per chamber;chamber ID;n_{clusters}", nCh,-0.5,nCh-0.5); | |
d1e6fdee | 619 | Add2RecPointsList(h1I,kTrackerNumberOfClustersPerChamber, !expert, image); |
2d114b34 | 620 | |
621 | h1F = new TH1F("hTrackerClusterMultiplicityPerChMean", "cluster mean size per chamber;chamber ID;<size> (n_{pads})", nCh,-0.5,nCh-0.5); | |
622 | h1F->SetOption("P"); | |
623 | h1F->SetMarkerStyle(kFullDotMedium); | |
624 | h1F->SetMarkerColor(kRed); | |
d1e6fdee | 625 | Add2RecPointsList(h1F, kTrackerClusterMultiplicityPerChMean, !expert, image); |
2d114b34 | 626 | |
627 | h1F = new TH1F("hTrackerClusterMultiplicityPerChSigma", "cluster size dispersion per chamber;chamber ID;#sigma_{size} (n_{pads})", nCh,-0.5,nCh-0.5); | |
628 | h1F->SetOption("P"); | |
629 | h1F->SetMarkerStyle(kFullDotMedium); | |
630 | h1F->SetMarkerColor(kRed); | |
d1e6fdee | 631 | Add2RecPointsList(h1F, kTrackerClusterMultiplicityPerChSigma, !expert, image); |
2d114b34 | 632 | |
633 | h1F = new TH1F("hTrackerClusterChargePerChMean", "cluster mean charge per chamber;chamber ID;<charge> (ADC counts)", nCh,-0.5,nCh-0.5); | |
634 | h1F->SetOption("P"); | |
635 | h1F->SetMarkerStyle(kFullDotMedium); | |
636 | h1F->SetMarkerColor(kRed); | |
d1e6fdee | 637 | Add2RecPointsList(h1F, kTrackerClusterChargePerChMean, !expert, image); |
2d114b34 | 638 | |
639 | h1F = new TH1F("hTrackerClusterChargePerChSigma", "cluster charge dispersion per chamber;chamber ID;#sigma_{charge} (ADC counts)", nCh,-0.5,nCh-0.5); | |
640 | h1F->SetOption("P"); | |
641 | h1F->SetMarkerStyle(kFullDotMedium); | |
642 | h1F->SetMarkerColor(kRed); | |
d1e6fdee | 643 | Add2RecPointsList(h1F, kTrackerClusterChargePerChSigma, !expert, image); |
2d114b34 | 644 | |
645 | // histograms per DE | |
646 | Int_t ndes(0); | |
647 | AliMpDEIterator it; | |
648 | it.First(); | |
649 | while ( !it.IsDone()) | |
650 | { | |
651 | Int_t detElemId = it.CurrentDEId(); | |
652 | ||
653 | if ( AliMpDEManager::GetStationType(detElemId) != AliMp::kStationTrigger ) | |
654 | { | |
655 | ndes = TMath::Max(ndes,detElemId); | |
656 | ||
657 | h1I = new TH1I(Form("hTrackerClusterMultiplicityForDE%04d",detElemId), Form("cluster size distribution in detection element %d;size (n_{pads})",detElemId), 100,0,100); | |
7d297381 | 658 | Add2RecPointsList(h1I,kTrackerClusterMultiplicityPerDE+detElemId, expert, !image); |
2d114b34 | 659 | |
660 | h1I = new TH1I(Form("hTrackerClusterChargeForDE%04d",detElemId), Form("cluster charge distribution in detection element %d;charge (ADC counts)",detElemId), 500,0,5000); | |
7d297381 | 661 | Add2RecPointsList(h1I,kTrackerClusterChargePerDE+detElemId, expert, !image); |
2d114b34 | 662 | } |
663 | ||
664 | it.Next(); | |
665 | } | |
666 | ||
667 | // summary histograms per DE | |
668 | h1I = new TH1I("hTrackerNumberOfClustersPerDE", "Number of clusters per detection element;DetElem ID;n_{clusters}", ndes+1,-0.5,ndes+0.5); | |
7d297381 | 669 | Add2RecPointsList(h1I, kTrackerNumberOfClustersPerDE, !expert, image); |
2d114b34 | 670 | |
671 | h1F = new TH1F("hTrackerClusterMultiplicityPerDEMean", "cluster mean size per DE;DetElem ID;<size> (n_{pads})", ndes+1,-0.5,ndes+0.5); | |
672 | h1F->SetOption("P"); | |
673 | h1F->SetMarkerStyle(kFullDotMedium); | |
674 | h1F->SetMarkerColor(kRed); | |
d1e6fdee | 675 | Add2RecPointsList(h1F, kTrackerClusterMultiplicityPerDEMean, !expert, image); |
2d114b34 | 676 | |
677 | h1F = new TH1F("hTrackerClusterChargePerDEMean", "cluster mean charge per DE;DetElem ID;<charge> (ADC counts)", ndes+1,-0.5,ndes+0.5); | |
678 | h1F->SetOption("P"); | |
679 | h1F->SetMarkerStyle(kFullDotMedium); | |
680 | h1F->SetMarkerColor(kRed); | |
d1e6fdee | 681 | Add2RecPointsList(h1F, kTrackerClusterChargePerDEMean, !expert, image); |
04236e67 | 682 | } |
683 | ||
684 | //____________________________________________________________________________ | |
f587a77d | 685 | void AliMUONQADataMakerRec::InitRecPointsTrigger() |
04236e67 | 686 | { |
f587a77d | 687 | /// create Reconstructed Points histograms in RecPoints subdir for the |
688 | /// MUON Trigger subsystem. | |
689 | ||
7d297381 | 690 | const Bool_t expert = kTRUE ; |
691 | const Bool_t image = kTRUE ; | |
5bb54f70 | 692 | |
2346e1ad | 693 | TH3F* h0 = new TH3F("hTriggerDigitsBendPlane", "Trigger digits in bending plane", |
694 | 4, 10.5, 14.5, | |
695 | 234, 0.5, 234.5, | |
696 | 16, -0.5, 15.5); | |
697 | h0->GetXaxis()->SetTitle("Chamber"); | |
698 | h0->GetYaxis()->SetTitle("Board"); | |
699 | h0->GetZaxis()->SetTitle("Strip"); | |
7d297381 | 700 | Add2RecPointsList(h0, kTriggerDigitsBendPlane, expert, !image); |
2346e1ad | 701 | |
702 | TH3F* h1 = new TH3F("hTriggerDigitsNonBendPlane", "Trigger digits in non-bending plane", | |
703 | 4, 10.5, 14.5, | |
704 | 234, 0.5, 234.5, | |
705 | 16, -0.5, 15.5); | |
706 | h1->GetXaxis()->SetTitle("Chamber"); | |
707 | h1->GetYaxis()->SetTitle("Board"); | |
708 | h1->GetZaxis()->SetTitle("Strip"); | |
7d297381 | 709 | Add2RecPointsList(h1, kTriggerDigitsNonBendPlane, expert, !image); |
2346e1ad | 710 | |
711 | TH1F* h2 = new TH1F("hTriggeredBoards", "Triggered boards", 234, 0.5, 234.5); | |
7d297381 | 712 | Add2RecPointsList(h2, kTriggeredBoards, expert, !image); |
2346e1ad | 713 | |
aef183f7 | 714 | AliMUONTriggerDisplay triggerDisplay; |
715 | TString histoName, histoTitle; | |
716 | for(Int_t iCath=0; iCath<AliMpConstants::NofCathodes(); iCath++){ | |
717 | TString cathName = ( iCath==0 ) ? "BendPlane" : "NonBendPlane"; | |
718 | for(Int_t iChamber=0; iChamber<AliMpConstants::NofTriggerChambers(); iChamber++){ | |
719 | histoName = Form("hTriggerDigits%sChamber%i", cathName.Data(), 11+iChamber); | |
720 | histoTitle = Form("Chamber %i: Fired pads %s", 11+iChamber, cathName.Data()); | |
721 | TH2F* h3 = (TH2F*)triggerDisplay.GetEmptyDisplayHisto(histoName, AliMUONTriggerDisplay::kDisplayStrips, | |
722 | iCath, iChamber, histoTitle); | |
7d297381 | 723 | Add2RecPointsList(h3, kTriggerDigitsDisplay + AliMpConstants::NofTriggerChambers()*iCath + iChamber, !expert, image); |
aef183f7 | 724 | } |
725 | } | |
726 | ||
727 | TH2F* h4 = (TH2F*)triggerDisplay.GetEmptyDisplayHisto("hFiredBoardsDisplay", AliMUONTriggerDisplay::kDisplayBoards, | |
728 | 0, 0, "Fired boards"); | |
7d297381 | 729 | Add2RecPointsList(h4, kTriggerBoardsDisplay, !expert, image); |
04236e67 | 730 | } |
731 | ||
732 | ||
733 | //____________________________________________________________________________ | |
734 | void AliMUONQADataMakerRec::InitESDs() | |
735 | { | |
c92a8c85 | 736 | ///create ESDs histograms in ESDs subdir |
5bb54f70 | 737 | |
7d297381 | 738 | const Bool_t expert = kTRUE ; |
739 | const Bool_t image = kTRUE ; | |
5bb54f70 | 740 | |
c92a8c85 | 741 | Int_t nCh = AliMUONConstants::NTrackingCh(); |
742 | Int_t nDE = 1100; | |
743 | ||
744 | // track info | |
5a240757 | 745 | TH1F* hESDnTracks = new TH1F("hESDnTracks", "number of tracks;n_{tracks}", 20, 0., 20.); |
7d297381 | 746 | Add2ESDsList(hESDnTracks, kESDnTracks, !expert, image); |
04236e67 | 747 | |
5a240757 | 748 | TH1F* hESDMatchTrig = new TH1F("hESDMatchTrig", "number of tracks matched with trigger;n_{tracks}", 20, 0., 20.); |
7d297381 | 749 | Add2ESDsList(hESDMatchTrig, kESDMatchTrig, !expert, image); |
c92a8c85 | 750 | |
5a240757 | 751 | TH1F* hESDMomentum = new TH1F("hESDMomentum", "momentum distribution;p (GeV/c)", 300, 0., 300); |
d1e6fdee | 752 | Add2ESDsList(hESDMomentum, kESDMomentum, !expert, image); |
04236e67 | 753 | |
5a240757 | 754 | TH1F* hESDPt = new TH1F("hESDPt", "transverse momentum distribution;p_{t} (GeV/c)", 200, 0., 50); |
d1e6fdee | 755 | Add2ESDsList(hESDPt, kESDPt, !expert, image); |
04236e67 | 756 | |
5a240757 | 757 | TH1F* hESDRapidity = new TH1F("hESDRapidity", "rapidity distribution;rapidity", 200, -4.5, -2.); |
d1e6fdee | 758 | Add2ESDsList(hESDRapidity, kESDRapidity, !expert, image); |
b62881f2 | 759 | |
5a240757 | 760 | TH1F* hESDChi2 = new TH1F("hESDChi2", "normalized #chi^{2} distribution;#chi^{2} / ndf", 500, 0., 50.); |
d1e6fdee | 761 | Add2ESDsList(hESDChi2, kESDChi2, !expert, image); |
c92a8c85 | 762 | |
5a240757 | 763 | TH1F* hESDProbChi2 = new TH1F("hESDProbChi2", "distribution of probability of #chi^{2};prob(#chi^{2})", 100, 0., 1.); |
d1e6fdee | 764 | Add2ESDsList(hESDProbChi2, kESDProbChi2, !expert, image); |
765 | ||
766 | TH1F* hESDThetaX = new TH1F("hESDThetaX", "#theta_{X} distribution;#theta_{X} (degree)", 360, -180., 180); | |
767 | Add2ESDsList(hESDThetaX, kESDThetaX, !expert, image); | |
768 | ||
769 | TH1F* hESDThetaY = new TH1F("hESDThetaY", "#theta_{Y} distribution;#theta_{Y} (degree)", 360, -180., 180); | |
770 | Add2ESDsList(hESDThetaY, kESDThetaY, !expert, image); | |
5a240757 | 771 | |
c92a8c85 | 772 | // cluster info |
773 | for (Int_t i = 0; i < nCh; i++) { | |
774 | Float_t rMax = AliMUONConstants::Rmax(i/2); | |
5a240757 | 775 | TH2F* hESDClusterHitMap = new TH2F(Form("hESDClusterHitMap%d",i+1), Form("cluster position distribution in chamber %d;X (cm);Y (cm)",i+1), |
c92a8c85 | 776 | 100, -rMax, rMax, 100, -rMax, rMax); |
7d297381 | 777 | Add2ESDsList(hESDClusterHitMap, kESDClusterHitMap+i, expert, !image); |
c92a8c85 | 778 | } |
779 | ||
5a240757 | 780 | TH1F* hESDnClustersPerTrack = new TH1F("hESDnClustersPerTrack", "number of associated clusters per track;n_{clusters}", 20, 0., 20.); |
7d297381 | 781 | Add2ESDsList(hESDnClustersPerTrack, kESDnClustersPerTrack, !expert, image); |
c92a8c85 | 782 | |
2d114b34 | 783 | TH1F* hESDnClustersPerCh = new TH1F("hESDnClustersPerCh", "averaged number of clusters per chamber per track;chamber ID;<n_{clusters}>", nCh, -0.5, nCh-0.5); |
c92a8c85 | 784 | hESDnClustersPerCh->SetFillColor(kRed); |
d1e6fdee | 785 | Add2ESDsList(hESDnClustersPerCh, kESDnClustersPerCh, !expert, image); |
c92a8c85 | 786 | |
2d114b34 | 787 | TH1F* hESDnClustersPerDE = new TH1F("hESDnClustersPerDE", "averaged number of clusters per DE per track;DetElem ID;<n_{clusters}>", nDE+1, -0.5, nDE+0.5); |
c92a8c85 | 788 | hESDnClustersPerDE->SetFillColor(kRed); |
d1e6fdee | 789 | Add2ESDsList(hESDnClustersPerDE, kESDnClustersPerDE, !expert, image); |
c92a8c85 | 790 | |
c92a8c85 | 791 | for (Int_t i = 0; i < nCh; i++) { |
5a240757 | 792 | TH1F* hESDClusterChargeInCh = new TH1F(Form("hESDClusterChargeInCh%d",i+1), Form("cluster charge distribution in chamber %d;charge (ADC counts)",i+1), 500, 0., 5000.); |
7d297381 | 793 | Add2ESDsList(hESDClusterChargeInCh, kESDClusterChargeInCh+i, expert, !image); |
c92a8c85 | 794 | } |
795 | ||
2d114b34 | 796 | TH1F* hESDClusterChargePerChMean = new TH1F("hESDClusterChargePerChMean", "cluster mean charge per chamber;chamber ID;<charge> (ADC counts)", nCh, -0.5, nCh-0.5); |
5a240757 | 797 | hESDClusterChargePerChMean->SetOption("P"); |
798 | hESDClusterChargePerChMean->SetMarkerStyle(kFullDotMedium); | |
799 | hESDClusterChargePerChMean->SetMarkerColor(kRed); | |
d1e6fdee | 800 | Add2ESDsList(hESDClusterChargePerChMean, kESDClusterChargePerChMean, !expert, image); |
5a240757 | 801 | |
2d114b34 | 802 | TH1F* hESDClusterChargePerChSigma = new TH1F("hESDClusterChargePerChSigma", "cluster charge dispersion per chamber;chamber ID;#sigma_{charge} (ADC counts)", nCh, -0.5, nCh-0.5); |
5a240757 | 803 | hESDClusterChargePerChSigma->SetOption("P"); |
804 | hESDClusterChargePerChSigma->SetMarkerStyle(kFullDotMedium); | |
805 | hESDClusterChargePerChSigma->SetMarkerColor(kRed); | |
d1e6fdee | 806 | Add2ESDsList(hESDClusterChargePerChSigma, kESDClusterChargePerChSigma, !expert, image); |
5a240757 | 807 | |
2d114b34 | 808 | TH1F* hESDClusterChargePerDE = new TH1F("hESDClusterChargePerDE", "cluster mean charge per DE;DetElem ID;<charge> (ADC counts)", nDE+1, -0.5, nDE+0.5); |
c92a8c85 | 809 | hESDClusterChargePerDE->SetOption("P"); |
810 | hESDClusterChargePerDE->SetMarkerStyle(kFullDotMedium); | |
811 | hESDClusterChargePerDE->SetMarkerColor(kRed); | |
d1e6fdee | 812 | Add2ESDsList(hESDClusterChargePerDE, kESDClusterChargePerDE, !expert, image); |
c92a8c85 | 813 | |
c92a8c85 | 814 | for (Int_t i = 0; i < nCh; i++) { |
5a240757 | 815 | TH1F* hESDClusterSizeInCh = new TH1F(Form("hESDClusterSizeInCh%d",i+1), Form("cluster size distribution in chamber %d;size (n_{pads})",i+1), 200, 0., 200.); |
7d297381 | 816 | Add2ESDsList(hESDClusterSizeInCh, kESDClusterSizeInCh+i, expert, !image); |
b62881f2 | 817 | } |
b1341ab0 | 818 | |
2d114b34 | 819 | TH1F* hESDClusterSizePerChMean = new TH1F("hESDClusterSizePerChMean", "cluster mean size per chamber;chamber ID;<size> (n_{pads})", nCh, -0.5, nCh-0.5); |
5a240757 | 820 | hESDClusterSizePerChMean->SetOption("P"); |
821 | hESDClusterSizePerChMean->SetMarkerStyle(kFullDotMedium); | |
822 | hESDClusterSizePerChMean->SetMarkerColor(kRed); | |
d1e6fdee | 823 | Add2ESDsList(hESDClusterSizePerChMean, kESDClusterSizePerChMean, !expert, image); |
c92a8c85 | 824 | |
2d114b34 | 825 | TH1F* hESDClusterSizePerChSigma = new TH1F("hESDClusterSizePerChSigma", "cluster size dispersion per chamber;chamber ID;#sigma_{size} (n_{pads})", nCh, -0.5, nCh-0.5); |
5a240757 | 826 | hESDClusterSizePerChSigma->SetOption("P"); |
827 | hESDClusterSizePerChSigma->SetMarkerStyle(kFullDotMedium); | |
828 | hESDClusterSizePerChSigma->SetMarkerColor(kRed); | |
d1e6fdee | 829 | Add2ESDsList(hESDClusterSizePerChSigma, kESDClusterSizePerChSigma, !expert, image); |
c92a8c85 | 830 | |
2d114b34 | 831 | TH1F* hESDClusterSizePerDE = new TH1F("hESDClusterSizePerDE", "cluster mean size per DE;DetElem ID;<size> (n_{pads})", nDE+1, -0.5, nDE+0.5); |
5a240757 | 832 | hESDClusterSizePerDE->SetOption("P"); |
833 | hESDClusterSizePerDE->SetMarkerStyle(kFullDotMedium); | |
834 | hESDClusterSizePerDE->SetMarkerColor(kRed); | |
d1e6fdee | 835 | Add2ESDsList(hESDClusterSizePerDE, kESDClusterSizePerDE, !expert, image); |
c92a8c85 | 836 | |
5a240757 | 837 | // cluster - track info |
c92a8c85 | 838 | for (Int_t i = 0; i < nCh; i++) { |
5a240757 | 839 | TH1F* hESDResidualXInCh = new TH1F(Form("hESDResidualXInCh%d",i+1), Form("cluster-track residual-X distribution in chamber %d;#Delta_{X} (cm)",i+1), 1000, -5., 5.); |
7d297381 | 840 | Add2ESDsList(hESDResidualXInCh, kESDResidualXInCh+i, expert, !image); |
c92a8c85 | 841 | |
5a240757 | 842 | TH1F* hESDResidualYInCh = new TH1F(Form("hESDResidualYInCh%d",i+1), Form("cluster-track residual-Y distribution in chamber %d;#Delta_{Y} (cm)",i+1), 1000, -1., 1.); |
7d297381 | 843 | Add2ESDsList(hESDResidualYInCh, kESDResidualYInCh+i, expert, !image); |
5a240757 | 844 | |
845 | TH1F* hESDLocalChi2XInCh = new TH1F(Form("hESDLocalChi2XInCh%d",i+1), Form("local chi2-X distribution in chamber %d;local #chi^{2}_{X}",i+1), 1000, 0., 25); | |
7d297381 | 846 | Add2ESDsList(hESDLocalChi2XInCh, kESDLocalChi2XInCh+i, expert, !image); |
5a240757 | 847 | |
848 | TH1F* hESDLocalChi2YInCh = new TH1F(Form("hESDLocalChi2YInCh%d",i+1), Form("local chi2-Y distribution in chamber %d;local #chi^{2}_{Y}",i+1), 1000, 0., 25); | |
7d297381 | 849 | Add2ESDsList(hESDLocalChi2YInCh, kESDLocalChi2YInCh+i, expert, !image); |
d1e6fdee | 850 | |
851 | TH1F* hESDLocalChi2InCh = new TH1F(Form("hESDLocalChi2InCh%d",i+1), Form("local chi2 (~0.5*(#chi^{2}_{X}+#chi^{2}_{Y})) distribution in chamber %d;local #chi^{2}",i+1), 1000, 0., 25); | |
852 | Add2ESDsList(hESDLocalChi2InCh, kESDLocalChi2InCh+i, expert, !image); | |
c92a8c85 | 853 | } |
854 | ||
2d114b34 | 855 | TH1F* hESDResidualXPerChMean = new TH1F("hESDResidualXPerChMean", "cluster-track residual-X per Ch: mean;chamber ID;<#Delta_{X}> (cm)", nCh, -0.5, nCh-0.5); |
5a240757 | 856 | hESDResidualXPerChMean->SetOption("P"); |
857 | hESDResidualXPerChMean->SetMarkerStyle(kFullDotMedium); | |
858 | hESDResidualXPerChMean->SetMarkerColor(kRed); | |
d1e6fdee | 859 | Add2ESDsList(hESDResidualXPerChMean, kESDResidualXPerChMean, !expert, image); |
5a240757 | 860 | |
2d114b34 | 861 | TH1F* hESDResidualYPerChMean = new TH1F("hESDResidualYPerChMean", "cluster-track residual-Y per Ch: mean;chamber ID;<#Delta_{Y}> (cm)", nCh, -0.5, nCh-0.5); |
5a240757 | 862 | hESDResidualYPerChMean->SetOption("P"); |
863 | hESDResidualYPerChMean->SetMarkerStyle(kFullDotMedium); | |
864 | hESDResidualYPerChMean->SetMarkerColor(kRed); | |
d1e6fdee | 865 | Add2ESDsList(hESDResidualYPerChMean, kESDResidualYPerChMean, !expert, image); |
5a240757 | 866 | |
2d114b34 | 867 | TH1F* hESDResidualXPerChSigma = new TH1F("hESDResidualXPerChSigma", "cluster-track residual-X per Ch: sigma;chamber ID;#sigma_{X} (cm)", nCh, -0.5, nCh-0.5); |
5a240757 | 868 | hESDResidualXPerChSigma->SetOption("P"); |
869 | hESDResidualXPerChSigma->SetMarkerStyle(kFullDotMedium); | |
870 | hESDResidualXPerChSigma->SetMarkerColor(kRed); | |
d1e6fdee | 871 | Add2ESDsList(hESDResidualXPerChSigma, kESDResidualXPerChSigma, !expert, image); |
5a240757 | 872 | |
2d114b34 | 873 | TH1F* hESDResidualYPerChSigma = new TH1F("hESDResidualYPerChSigma", "cluster-track residual-Y per Ch: sigma;chamber ID;#sigma_{Y} (cm)", nCh, -0.5, nCh-0.5); |
5a240757 | 874 | hESDResidualYPerChSigma->SetOption("P"); |
875 | hESDResidualYPerChSigma->SetMarkerStyle(kFullDotMedium); | |
876 | hESDResidualYPerChSigma->SetMarkerColor(kRed); | |
d1e6fdee | 877 | Add2ESDsList(hESDResidualYPerChSigma, kESDResidualYPerChSigma, !expert, image); |
5a240757 | 878 | |
2d114b34 | 879 | TH1F* hESDLocalChi2XPerChMean = new TH1F("hESDLocalChi2XPerChMean", "local chi2-X per Ch: mean;chamber ID;<local #chi^{2}_{X}>", nCh, -0.5, nCh-0.5); |
5a240757 | 880 | hESDLocalChi2XPerChMean->SetOption("P"); |
881 | hESDLocalChi2XPerChMean->SetMarkerStyle(kFullDotMedium); | |
882 | hESDLocalChi2XPerChMean->SetMarkerColor(kRed); | |
d1e6fdee | 883 | Add2ESDsList(hESDLocalChi2XPerChMean, kESDLocalChi2XPerChMean, !expert, image); |
5a240757 | 884 | |
2d114b34 | 885 | TH1F* hESDLocalChi2YPerChMean = new TH1F("hESDLocalChi2YPerChMean", "local chi2-Y per Ch: mean;chamber ID;<local #chi^{2}_{Y}>", nCh, -0.5, nCh-0.5); |
5a240757 | 886 | hESDLocalChi2YPerChMean->SetOption("P"); |
887 | hESDLocalChi2YPerChMean->SetMarkerStyle(kFullDotMedium); | |
888 | hESDLocalChi2YPerChMean->SetMarkerColor(kRed); | |
d1e6fdee | 889 | Add2ESDsList(hESDLocalChi2YPerChMean, kESDLocalChi2YPerChMean, !expert, image); |
890 | ||
891 | TH1F* hESDLocalChi2PerChMean = new TH1F("hESDLocalChi2PerChMean", "local chi2 (~0.5*(#chi^{2}_{X}+#chi^{2}_{Y})) per Ch: mean;chamber ID;<local #chi^{2}>", nCh, -0.5, nCh-0.5); | |
892 | hESDLocalChi2PerChMean->SetOption("P"); | |
893 | hESDLocalChi2PerChMean->SetMarkerStyle(kFullDotMedium); | |
894 | hESDLocalChi2PerChMean->SetMarkerColor(kRed); | |
895 | Add2ESDsList(hESDLocalChi2PerChMean, kESDLocalChi2PerChMean, !expert, image); | |
5a240757 | 896 | |
2d114b34 | 897 | TH1F* hESDResidualXPerDEMean = new TH1F("hESDResidualXPerDEMean", "cluster-track residual-X per DE: mean;DetElem ID;<#Delta_{X}> (cm)", nDE+1, -0.5, nDE+0.5); |
c92a8c85 | 898 | hESDResidualXPerDEMean->SetOption("P"); |
899 | hESDResidualXPerDEMean->SetMarkerStyle(kFullDotMedium); | |
900 | hESDResidualXPerDEMean->SetMarkerColor(kRed); | |
d1e6fdee | 901 | Add2ESDsList(hESDResidualXPerDEMean, kESDResidualXPerDEMean, !expert, image); |
c92a8c85 | 902 | |
2d114b34 | 903 | TH1F* hESDResidualYPerDEMean = new TH1F("hESDResidualYPerDEMean", "cluster-track residual-Y per DE: mean;DetElem ID;<#Delta_{Y}> (cm)", nDE+1, -0.5, nDE+0.5); |
c92a8c85 | 904 | hESDResidualYPerDEMean->SetOption("P"); |
905 | hESDResidualYPerDEMean->SetMarkerStyle(kFullDotMedium); | |
906 | hESDResidualYPerDEMean->SetMarkerColor(kRed); | |
d1e6fdee | 907 | Add2ESDsList(hESDResidualYPerDEMean, kESDResidualYPerDEMean, !expert, image); |
c92a8c85 | 908 | |
2d114b34 | 909 | TH1F* hESDResidualXPerDESigma = new TH1F("hESDResidualXPerDESigma", "cluster-track residual-X per DE: sigma;DetElem ID;#sigma_{X} (cm)", nDE+1, -0.5, nDE+0.5); |
c92a8c85 | 910 | hESDResidualXPerDESigma->SetOption("P"); |
911 | hESDResidualXPerDESigma->SetMarkerStyle(kFullDotMedium); | |
912 | hESDResidualXPerDESigma->SetMarkerColor(kRed); | |
d1e6fdee | 913 | Add2ESDsList(hESDResidualXPerDESigma, kESDResidualXPerDESigma, !expert, image); |
c92a8c85 | 914 | |
2d114b34 | 915 | TH1F* hESDResidualYPerDESigma = new TH1F("hESDResidualYPerDESigma", "cluster-track residual-Y per DE: sigma;DetElem ID;#sigma_{Y} (cm)", nDE+1, -0.5, nDE+0.5); |
c92a8c85 | 916 | hESDResidualYPerDESigma->SetOption("P"); |
917 | hESDResidualYPerDESigma->SetMarkerStyle(kFullDotMedium); | |
918 | hESDResidualYPerDESigma->SetMarkerColor(kRed); | |
d1e6fdee | 919 | Add2ESDsList(hESDResidualYPerDESigma, kESDResidualYPerDESigma, !expert, image); |
c92a8c85 | 920 | |
2d114b34 | 921 | TH1F* hESDLocalChi2XPerDEMean = new TH1F("hESDLocalChi2XPerDEMean", "local chi2-X per DE: mean;DetElem ID;<local #chi^{2}_{X}>", nDE+1, -0.5, nDE+0.5); |
5a240757 | 922 | hESDLocalChi2XPerDEMean->SetOption("P"); |
923 | hESDLocalChi2XPerDEMean->SetMarkerStyle(kFullDotMedium); | |
924 | hESDLocalChi2XPerDEMean->SetMarkerColor(kRed); | |
d1e6fdee | 925 | Add2ESDsList(hESDLocalChi2XPerDEMean, kESDLocalChi2XPerDEMean, !expert, image); |
5a240757 | 926 | |
2d114b34 | 927 | TH1F* hESDLocalChi2YPerDEMean = new TH1F("hESDLocalChi2YPerDEMean", "local chi2-Y per DE: mean;DetElem ID;<local #chi^{2}_{Y}>", nDE+1, -0.5, nDE+0.5); |
5a240757 | 928 | hESDLocalChi2YPerDEMean->SetOption("P"); |
929 | hESDLocalChi2YPerDEMean->SetMarkerStyle(kFullDotMedium); | |
930 | hESDLocalChi2YPerDEMean->SetMarkerColor(kRed); | |
d1e6fdee | 931 | Add2ESDsList(hESDLocalChi2YPerDEMean, kESDLocalChi2YPerDEMean, !expert, image); |
932 | ||
933 | TH1F* hESDLocalChi2PerDEMean = new TH1F("hESDLocalChi2PerDEMean", "local chi2 (~0.5*(#chi^{2}_{X}+#chi^{2}_{Y})) per DE: mean;DetElem ID;<local #chi^{2}>", nDE+1, -0.5, nDE+0.5); | |
934 | hESDLocalChi2PerDEMean->SetOption("P"); | |
935 | hESDLocalChi2PerDEMean->SetMarkerStyle(kFullDotMedium); | |
936 | hESDLocalChi2PerDEMean->SetMarkerColor(kRed); | |
937 | Add2ESDsList(hESDLocalChi2PerDEMean, kESDLocalChi2PerDEMean, !expert, image); | |
5a240757 | 938 | |
abcfd6d0 | 939 | // intermediate histograms |
2d114b34 | 940 | TH1F* hESDnTotClustersPerCh = new TH1F("hESDnTotClustersPerCh", "total number of associated clusters per chamber;chamber ID;#Sigma(n_{clusters})", nCh, -0.5, nCh-0.5); |
7d297381 | 941 | Add2ESDsList(hESDnTotClustersPerCh, kESDnTotClustersPerCh, expert, !image); |
2d114b34 | 942 | TH1F* hESDnTotClustersPerDE = new TH1F("hESDnTotClustersPerDE", "total number of associated clusters per DE;DetElem ID;#Sigma(n_{clusters})", nDE+1, -0.5, nDE+0.5); |
7d297381 | 943 | Add2ESDsList(hESDnTotClustersPerDE, kESDnTotClustersPerDE, expert, !image); |
2d114b34 | 944 | TH1F* hESDnTotFullClustersPerDE = new TH1F("hESDnTotFullClustersPerDE", "total number of associated clusters containing pad info per DE;DetElem ID;#Sigma(n_{full clusters})", nDE+1, -0.5, nDE+0.5); |
7d297381 | 945 | Add2ESDsList(hESDnTotFullClustersPerDE, kESDnTotFullClustersPerDE, expert, !image); |
2d114b34 | 946 | TH1F* hESDSumClusterChargePerDE = new TH1F("hESDSumClusterChargePerDE", "sum of cluster charge per DE;DetElem ID;#Sigma(charge) (ADC counts)", nDE+1, -0.5, nDE+0.5); |
7d297381 | 947 | Add2ESDsList(hESDSumClusterChargePerDE, kESDSumClusterChargePerDE, expert, !image); |
2d114b34 | 948 | TH1F* hESDSumClusterSizePerDE = new TH1F("hESDSumClusterSizePerDE", "sum of cluster size per DE;DetElem ID;#Sigma(size) (n_{pads})", nDE+1, -0.5, nDE+0.5); |
7d297381 | 949 | Add2ESDsList(hESDSumClusterSizePerDE, kESDSumClusterSizePerDE, expert, !image); |
2d114b34 | 950 | TH1F* hESDSumResidualXPerDE = new TH1F("hESDSumResidualXPerDE", "sum of cluster-track residual-X per DE;DetElem ID;#Sigma(#Delta_{X}) (cm)", nDE+1, -0.5, nDE+0.5); |
7d297381 | 951 | Add2ESDsList(hESDSumResidualXPerDE, kESDSumResidualXPerDE, expert, !image); |
2d114b34 | 952 | TH1F* hESDSumResidualYPerDE = new TH1F("hESDSumResidualYPerDE", "sum of cluster-track residual-Y per DE;DetElem ID;#Sigma(#Delta_{Y}) (cm)", nDE+1, -0.5, nDE+0.5); |
7d297381 | 953 | Add2ESDsList(hESDSumResidualYPerDE, kESDSumResidualYPerDE, expert, !image); |
2d114b34 | 954 | TH1F* hESDSumResidualX2PerDE = new TH1F("hESDSumResidualX2PerDE", "sum of cluster-track residual-X**2 per DE;DetElem ID;#Sigma(#Delta_{X}^{2}) (cm^{2})", nDE+1, -0.5, nDE+0.5); |
7d297381 | 955 | Add2ESDsList(hESDSumResidualX2PerDE, kESDSumResidualX2PerDE, expert, !image); |
2d114b34 | 956 | TH1F* hESDSumResidualY2PerDE = new TH1F("hESDSumResidualY2PerDE", "sum of cluster-track residual-Y**2 per DE;DetElem ID;#Sigma(#Delta_{Y}^{2}) (cm^{2})", nDE+1, -0.5, nDE+0.5); |
7d297381 | 957 | Add2ESDsList(hESDSumResidualY2PerDE, kESDSumResidualY2PerDE, expert, !image); |
2d114b34 | 958 | TH1F* hESDSumLocalChi2XPerDE = new TH1F("hESDSumLocalChi2XPerDE", "sum of local chi2-X per DE;DetElem ID;#Sigma(local #chi^{2}_{X})", nDE+1, -0.5, nDE+0.5); |
7d297381 | 959 | Add2ESDsList(hESDSumLocalChi2XPerDE, kESDSumLocalChi2XPerDE, expert, !image); |
2d114b34 | 960 | TH1F* hESDSumLocalChi2YPerDE = new TH1F("hESDSumLocalChi2YPerDE", "sum of local chi2-Y per DE;DetElem ID;#Sigma(local #chi^{2}_{Y})", nDE+1, -0.5, nDE+0.5); |
7d297381 | 961 | Add2ESDsList(hESDSumLocalChi2YPerDE, kESDSumLocalChi2YPerDE, expert, !image); |
d1e6fdee | 962 | TH1F* hESDSumLocalChi2PerDE = new TH1F("hESDSumLocalChi2PerDE", "sum of local chi2 (~0.5*(#chi^{2}_{X}+#chi^{2}_{Y})) per DE;DetElem ID;#Sigma(local #chi^{2})", nDE+1, -0.5, nDE+0.5); |
963 | Add2ESDsList(hESDSumLocalChi2PerDE, kESDSumLocalChi2PerDE, expert, !image); | |
04236e67 | 964 | } |
965 | ||
966 | //____________________________________________________________________________ | |
967 | void AliMUONQADataMakerRec::MakeRaws(AliRawReader* rawReader) | |
968 | { | |
969 | /// make QA for rawdata | |
b1341ab0 | 970 | |
eca4fa66 | 971 | // Check id histograms already created for this Event Specie |
972 | ||
f587a77d | 973 | if ( rawReader->GetType() == AliRawEventHeaderBase::kPhysicsEvent ) |
974 | { | |
04236e67 | 975 | rawReader->Reset(); |
f587a77d | 976 | MakeRawsTracker(rawReader); |
977 | } | |
04236e67 | 978 | |
f587a77d | 979 | rawReader->Reset(); |
980 | MakeRawsTrigger(rawReader); | |
981 | } | |
2346e1ad | 982 | |
f587a77d | 983 | //____________________________________________________________________________ |
984 | void AliMUONQADataMakerRec::MakeRawsTracker(AliRawReader* rawReader) | |
985 | { | |
986 | /// make QA for rawdata tracker | |
de1d4a53 | 987 | |
bb22d2a6 | 988 | /// forces init |
989 | GetRawsData(kTrackerBusPatchOccupancy); | |
990 | ||
b6f591ae | 991 | ((AliMUONTrackerDataMaker*)fTrackerDataMaker)->SetRawReader(rawReader); |
f587a77d | 992 | |
993 | fTrackerDataMaker->ProcessEvent(); | |
994 | } | |
2346e1ad | 995 | |
f587a77d | 996 | //____________________________________________________________________________ |
997 | void AliMUONQADataMakerRec::MakeRawsTrigger(AliRawReader* rawReader) | |
998 | { | |
999 | /// make QA for rawdata trigger | |
1000 | ||
2346e1ad | 1001 | // Get trigger scalers |
1002 | ||
1003 | Int_t loCircuit=0; | |
1004 | AliMpCDB::LoadDDLStore(); | |
1005 | ||
1006 | AliMUONRawStreamTrigger rawStreamTrig(rawReader); | |
1007 | while (rawStreamTrig.NextDDL()) | |
1008 | { | |
1009 | // If not a scaler event, do nothing | |
1010 | Bool_t scalerEvent = rawReader->GetDataHeader()->GetL1TriggerMessage() & 0x1; | |
d72d7b9e | 1011 | if(!scalerEvent) break; |
2346e1ad | 1012 | |
1013 | AliMUONDDLTrigger* ddlTrigger = rawStreamTrig.GetDDLTrigger(); | |
1014 | AliMUONDarcHeader* darcHeader = ddlTrigger->GetDarcHeader(); | |
1015 | ||
eb3886c8 | 1016 | if (darcHeader->GetGlobalFlag()){ |
1017 | UInt_t nOfClocks = darcHeader->GetGlobalClock(); | |
1018 | Double_t nOfSeconds = ((Double_t) nOfClocks) / 40e6; // 1 clock each 25 ns | |
1019 | ((TH1F*)GetRawsData(kTriggerScalersTime))->Fill(1., nOfSeconds); | |
1020 | } | |
1021 | ||
2346e1ad | 1022 | Int_t nReg = darcHeader->GetRegHeaderEntries(); |
1023 | ||
1024 | for(Int_t iReg = 0; iReg < nReg ;iReg++) | |
1025 | { //reg loop | |
1026 | ||
1027 | // crate info | |
1028 | AliMpTriggerCrate* crate = AliMpDDLStore::Instance()-> | |
1029 | GetTriggerCrate(rawStreamTrig.GetDDL(), iReg); | |
1030 | ||
1031 | AliMUONRegHeader* regHeader = darcHeader->GetRegHeaderEntry(iReg); | |
1032 | ||
1033 | // loop over local structures | |
1034 | Int_t nLocal = regHeader->GetLocalEntries(); | |
1035 | for(Int_t iLocal = 0; iLocal < nLocal; iLocal++) | |
1036 | { | |
1037 | AliMUONLocalStruct* localStruct = regHeader->GetLocalEntry(iLocal); | |
1038 | ||
1039 | // if card exist | |
1040 | if (!localStruct) continue; | |
1041 | ||
1042 | loCircuit = crate->GetLocalBoardId(localStruct->GetId()); | |
1043 | ||
1044 | if ( !loCircuit ) continue; // empty slot | |
1045 | ||
1046 | AliMpLocalBoard* localBoard = AliMpDDLStore::Instance()->GetLocalBoard(loCircuit, false); | |
1047 | ||
1048 | // skip copy cards | |
1049 | if( !localBoard->IsNotified()) | |
1050 | continue; | |
1051 | ||
1052 | Int_t cathode = localStruct->GetComptXY()%2; | |
1053 | ||
1054 | ERaw hindex = (cathode==0) ? kTriggerScalersBP : kTriggerScalersNBP; | |
1055 | ||
1056 | // loop over strips | |
1057 | for (Int_t ibitxy = 0; ibitxy < 16; ++ibitxy) { | |
1058 | if(localStruct->GetXY1(ibitxy) > 0) | |
1059 | ((TH3F*)GetRawsData(hindex))->Fill(11+0, loCircuit, ibitxy, 2*localStruct->GetXY1(ibitxy)); | |
1060 | if(localStruct->GetXY2(ibitxy) > 0) | |
1061 | ((TH3F*)GetRawsData(hindex))->Fill(11+1, loCircuit, ibitxy, 2*localStruct->GetXY2(ibitxy)); | |
1062 | if(localStruct->GetXY3(ibitxy) > 0) | |
1063 | ((TH3F*)GetRawsData(hindex))->Fill(11+2, loCircuit, ibitxy, 2*localStruct->GetXY3(ibitxy)); | |
1064 | if(localStruct->GetXY4(ibitxy) > 0) | |
1065 | ((TH3F*)GetRawsData(hindex))->Fill(11+3, loCircuit, ibitxy, 2*localStruct->GetXY4(ibitxy)); | |
1066 | } // loop on strips | |
1067 | } // iLocal | |
1068 | } // iReg | |
1069 | } // NextDDL | |
04236e67 | 1070 | } |
1071 | ||
44ed7a66 | 1072 | //__________________________________________________________________ |
1073 | void AliMUONQADataMakerRec::MakeDigits(TTree* digitsTree) | |
1074 | { | |
1075 | /// makes data from Digits | |
eca4fa66 | 1076 | |
44ed7a66 | 1077 | if (!fDigitStore) |
1078 | fDigitStore = AliMUONVDigitStore::Create(*digitsTree); | |
1079 | fDigitStore->Connect(*digitsTree, false); | |
1080 | digitsTree->GetEvent(0); | |
1081 | ||
1082 | TIter next(fDigitStore->CreateIterator()); | |
1083 | ||
1084 | AliMUONVDigit* dig = 0x0; | |
1085 | ||
1086 | while ( ( dig = static_cast<AliMUONVDigit*>(next()) ) ) | |
1087 | { | |
1088 | GetDigitsData(0)->Fill(dig->DetElemId()); | |
1089 | GetDigitsData(1)->Fill(dig->ADC()); | |
1090 | } | |
1091 | } | |
1092 | ||
04236e67 | 1093 | //____________________________________________________________________________ |
1094 | void AliMUONQADataMakerRec::MakeRecPoints(TTree* clustersTree) | |
1095 | { | |
f587a77d | 1096 | /// Fill histograms from treeR |
1097 | ||
bb22d2a6 | 1098 | MakeRecPointsTracker(clustersTree); |
1099 | MakeRecPointsTrigger(clustersTree); | |
f587a77d | 1100 | } |
1101 | ||
1102 | //____________________________________________________________________________ | |
1103 | void AliMUONQADataMakerRec::MakeRecPointsTracker(TTree* clustersTree) | |
1104 | { | |
1105 | /// Fill histograms related to tracker clusters | |
1106 | ||
1107 | // First things first : do we have clusters in the TreeR ? | |
1108 | // In "normal" production mode, it should be perfectly normal | |
1109 | // *not* to have them. | |
1110 | // But if for some reason we de-activated the combined tracking, | |
1111 | // then we have clusters in TreeR, so let's take that opportunity | |
1112 | // to QA them... | |
1113 | ||
1114 | if (!fClusterStore) | |
1115 | { | |
1116 | AliCodeTimerAuto("ClusterStore creation"); | |
1117 | fClusterStore = AliMUONVClusterStore::Create(*clustersTree); | |
1118 | if (!fClusterStore) | |
1119 | { | |
f587a77d | 1120 | return; |
1121 | } | |
1122 | } | |
1123 | ||
1124 | AliCodeTimerAuto(""); | |
1125 | ||
1126 | fClusterStore->Connect(*clustersTree,kFALSE); | |
1127 | clustersTree->GetEvent(0); | |
1128 | ||
1129 | TIter next(fClusterStore->CreateIterator()); | |
1130 | AliMUONVCluster* cluster; | |
1131 | ||
1132 | while ( ( cluster = static_cast<AliMUONVCluster*>(next()) ) ) | |
1133 | { | |
1134 | Int_t detElemId = cluster->GetDetElemId(); | |
1135 | Int_t chamberId = AliMpDEManager::GetChamberId(detElemId); | |
1136 | ||
1137 | GetRecPointsData(kTrackerNumberOfClustersPerDE)->Fill(detElemId); | |
1138 | GetRecPointsData(kTrackerClusterChargePerDE+detElemId)->Fill(cluster->GetCharge()); | |
1139 | GetRecPointsData(kTrackerClusterMultiplicityPerDE+detElemId)->Fill(cluster->GetNDigits()); | |
b1341ab0 | 1140 | |
f587a77d | 1141 | GetRecPointsData(kTrackerNumberOfClustersPerChamber)->Fill(chamberId); |
1142 | GetRecPointsData(kTrackerClusterChargePerChamber+chamberId)->Fill(cluster->GetCharge()); | |
1143 | GetRecPointsData(kTrackerClusterMultiplicityPerChamber+chamberId)->Fill(cluster->GetNDigits()); | |
2d114b34 | 1144 | GetRecPointsData(kTrackerClusterHitMapPerChamber+chamberId)->Fill(cluster->GetX(),cluster->GetY()); |
f587a77d | 1145 | |
1146 | } | |
1147 | ||
1148 | fClusterStore->Clear(); | |
1149 | } | |
1150 | ||
1151 | //____________________________________________________________________________ | |
1152 | void AliMUONQADataMakerRec::MakeRecPointsTrigger(TTree* clustersTree) | |
1153 | { | |
1154 | /// makes data from trigger response | |
1155 | ||
7035694f | 1156 | // Fired pads info |
1157 | fDigitStore->Clear(); | |
1158 | ||
1159 | if (!fTriggerStore) fTriggerStore = AliMUONVTriggerStore::Create(*clustersTree); | |
1160 | fTriggerStore->Clear(); | |
1161 | fTriggerStore->Connect(*clustersTree, false); | |
04236e67 | 1162 | clustersTree->GetEvent(0); |
04236e67 | 1163 | |
7035694f | 1164 | AliMUONLocalTrigger* locTrg; |
1165 | TIter nextLoc(fTriggerStore->CreateLocalIterator()); | |
1166 | ||
1167 | while ( ( locTrg = static_cast<AliMUONLocalTrigger*>(nextLoc()) ) ) | |
1168 | { | |
1169 | if (locTrg->IsNull()) continue; | |
1170 | ||
1171 | TArrayS xyPattern[2]; | |
1172 | locTrg->GetXPattern(xyPattern[0]); | |
1173 | locTrg->GetYPattern(xyPattern[1]); | |
1174 | ||
1175 | Int_t nBoard = locTrg->LoCircuit(); | |
2346e1ad | 1176 | |
d72d7b9e | 1177 | Bool_t xTrig=locTrg->IsTrigX(); |
1178 | Bool_t yTrig=locTrg->IsTrigY(); | |
2346e1ad | 1179 | |
1180 | if (xTrig && yTrig) | |
1181 | ((TH1F*)GetRecPointsData(kTriggeredBoards))->Fill(nBoard); | |
1182 | ||
1183 | fDigitMaker->TriggerDigits(nBoard, xyPattern, *fDigitStore); | |
7035694f | 1184 | } |
04236e67 | 1185 | |
7035694f | 1186 | TIter nextDigit(fDigitStore->CreateIterator()); |
1187 | AliMUONVDigit* mDigit; | |
1188 | while ( ( mDigit = static_cast<AliMUONVDigit*>(nextDigit()) ) ) | |
04236e67 | 1189 | { |
7035694f | 1190 | Int_t detElemId = mDigit->DetElemId(); |
2346e1ad | 1191 | Int_t ch = detElemId/100; |
1192 | Int_t localBoard = mDigit->ManuId(); | |
1193 | Int_t channel = mDigit->ManuChannel(); | |
7035694f | 1194 | Int_t cathode = mDigit->Cathode(); |
b62881f2 | 1195 | ERecPoints hindex |
1196 | = ( cathode == 0 ) ? kTriggerDigitsBendPlane : kTriggerDigitsNonBendPlane; | |
1197 | ||
2346e1ad | 1198 | ((TH3F*)GetRecPointsData(hindex))->Fill(ch, localBoard, channel); |
04236e67 | 1199 | } |
1200 | } | |
1201 | ||
1202 | //____________________________________________________________________________ | |
1203 | void AliMUONQADataMakerRec::MakeESDs(AliESDEvent* esd) | |
1204 | { | |
c92a8c85 | 1205 | /// make QA data from ESDs |
1206 | ||
c92a8c85 | 1207 | // load ESD event in the interface |
1208 | AliMUONESDInterface esdInterface; | |
ac624e6b | 1209 | if (GetMUONRecoParam()) AliMUONESDInterface::ResetTracker(GetMUONRecoParam()); |
c92a8c85 | 1210 | else AliError("Unable to get recoParam: use default ones for residual calculation"); |
1211 | esdInterface.LoadEvent(*esd); | |
1212 | ||
1213 | GetESDsData(kESDnTracks)->Fill(esdInterface.GetNTracks()); | |
1214 | ||
1215 | Int_t nTrackMatchTrig = 0; | |
1216 | ||
1217 | // loop over tracks | |
1218 | Int_t nTracks = (Int_t) esd->GetNumberOfMuonTracks(); | |
1219 | for (Int_t iTrack = 0; iTrack < nTracks; ++iTrack) { | |
1220 | ||
1221 | // get the ESD track and skip "ghosts" | |
1222 | AliESDMuonTrack* esdTrack = esd->GetMuonTrack(iTrack); | |
1223 | if (!esdTrack->ContainTrackerData()) continue; | |
1224 | ||
1225 | // get corresponding MUON track | |
1226 | AliMUONTrack* track = esdInterface.FindTrack(esdTrack->GetUniqueID()); | |
1227 | ||
1228 | if (esdTrack->ContainTriggerData()) nTrackMatchTrig++; | |
1229 | ||
1230 | GetESDsData(kESDMomentum)->Fill(esdTrack->P()); | |
1231 | GetESDsData(kESDPt)->Fill(esdTrack->Pt()); | |
1232 | GetESDsData(kESDRapidity)->Fill(esdTrack->Y()); | |
1233 | GetESDsData(kESDChi2)->Fill(track->GetNormalizedChi2()); | |
5a240757 | 1234 | GetESDsData(kESDProbChi2)->Fill(TMath::Prob(track->GetGlobalChi2(),track->GetNDF())); |
d1e6fdee | 1235 | GetESDsData(kESDThetaX)->Fill(esdTrack->GetThetaXUncorrected() / TMath::Pi() * 180.); |
1236 | GetESDsData(kESDThetaY)->Fill(esdTrack->GetThetaYUncorrected() / TMath::Pi() * 180.); | |
c92a8c85 | 1237 | GetESDsData(kESDnClustersPerTrack)->Fill(track->GetNClusters()); |
1238 | ||
1239 | // loop over clusters | |
1240 | AliMUONTrackParam* trackParam = static_cast<AliMUONTrackParam*>(track->GetTrackParamAtCluster()->First()); | |
1241 | while (trackParam) { | |
b1fea02e | 1242 | |
c92a8c85 | 1243 | AliMUONVCluster* cluster = trackParam->GetClusterPtr(); |
1244 | Int_t chId = cluster->GetChamberId(); | |
1245 | Int_t deID = cluster->GetDetElemId(); | |
1246 | Double_t residualX = cluster->GetX() - trackParam->GetNonBendingCoor(); | |
1247 | Double_t residualY = cluster->GetY() - trackParam->GetBendingCoor(); | |
d1e6fdee | 1248 | Double_t sigmaResidualX2 = cluster->GetErrX2() - trackParam->GetCovariances()(0,0); |
1249 | Double_t sigmaResidualY2 = cluster->GetErrY2() - trackParam->GetCovariances()(2,2); | |
1250 | Double_t localChi2X = (sigmaResidualX2 > 0.) ? residualX*residualX/sigmaResidualX2 : 0.; | |
1251 | Double_t localChi2Y = (sigmaResidualY2 > 0.) ? residualY*residualY/sigmaResidualY2 : 0.; | |
1252 | Double_t localChi2 = 0.5 * trackParam->GetLocalChi2(); | |
b1fea02e | 1253 | |
c92a8c85 | 1254 | GetESDsData(kESDClusterHitMap+chId)->Fill(cluster->GetX(), cluster->GetY()); |
1255 | ||
abcfd6d0 | 1256 | GetESDsData(kESDnTotClustersPerCh)->Fill(chId); |
1257 | GetESDsData(kESDnTotClustersPerDE)->Fill(deID); | |
c92a8c85 | 1258 | |
c92a8c85 | 1259 | GetESDsData(kESDClusterChargeInCh+chId)->Fill(cluster->GetCharge()); |
abcfd6d0 | 1260 | GetESDsData(kESDSumClusterChargePerDE)->Fill(deID, cluster->GetCharge()); |
c92a8c85 | 1261 | |
1262 | if (cluster->GetNDigits() > 0) { // discard clusters with pad not stored in ESD | |
abcfd6d0 | 1263 | GetESDsData(kESDnTotFullClustersPerDE)->Fill(deID); |
5a240757 | 1264 | GetESDsData(kESDClusterSizeInCh+chId)->Fill(cluster->GetNDigits()); |
abcfd6d0 | 1265 | GetESDsData(kESDSumClusterSizePerDE)->Fill(deID, cluster->GetNDigits()); |
b62881f2 | 1266 | } |
c92a8c85 | 1267 | |
c92a8c85 | 1268 | GetESDsData(kESDResidualXInCh+chId)->Fill(residualX); |
1269 | GetESDsData(kESDResidualYInCh+chId)->Fill(residualY); | |
abcfd6d0 | 1270 | GetESDsData(kESDSumResidualXPerDE)->Fill(deID, residualX); |
1271 | GetESDsData(kESDSumResidualYPerDE)->Fill(deID, residualY); | |
1272 | GetESDsData(kESDSumResidualX2PerDE)->Fill(deID, residualX*residualX); | |
1273 | GetESDsData(kESDSumResidualY2PerDE)->Fill(deID, residualY*residualY); | |
5a240757 | 1274 | |
1275 | GetESDsData(kESDLocalChi2XInCh+chId)->Fill(localChi2X); | |
1276 | GetESDsData(kESDLocalChi2YInCh+chId)->Fill(localChi2Y); | |
d1e6fdee | 1277 | GetESDsData(kESDLocalChi2InCh+chId)->Fill(localChi2); |
abcfd6d0 | 1278 | GetESDsData(kESDSumLocalChi2XPerDE)->Fill(deID, localChi2X); |
1279 | GetESDsData(kESDSumLocalChi2YPerDE)->Fill(deID, localChi2Y); | |
d1e6fdee | 1280 | GetESDsData(kESDSumLocalChi2PerDE)->Fill(deID, localChi2); |
c92a8c85 | 1281 | |
1282 | trackParam = static_cast<AliMUONTrackParam*>(track->GetTrackParamAtCluster()->After(trackParam)); | |
04236e67 | 1283 | } |
c92a8c85 | 1284 | |
1285 | } | |
1286 | ||
1287 | GetESDsData(kESDMatchTrig)->Fill(nTrackMatchTrig); | |
1288 | ||
04236e67 | 1289 | } |
1290 | ||
1291 | //____________________________________________________________________________ | |
1292 | void AliMUONQADataMakerRec::StartOfDetectorCycle() | |
1293 | { | |
1294 | /// Detector specific actions at start of cycle | |
1295 | ||
1296 | } | |
2346e1ad | 1297 | |
1298 | //____________________________________________________________________________ | |
4e25ac79 | 1299 | void AliMUONQADataMakerRec::DisplayTriggerInfo(AliQAv1::TASKINDEX_t task) |
2346e1ad | 1300 | { |
1301 | // | |
1302 | /// Display trigger information in a user-friendly way: | |
1303 | /// from local board and strip numbers to their position on chambers | |
1304 | // | |
eca4fa66 | 1305 | |
49e110ec | 1306 | |
4e25ac79 | 1307 | if(task!=AliQAv1::kRECPOINTS && task!=AliQAv1::kRAWS) return; |
2346e1ad | 1308 | |
c455c5fb | 1309 | // check we get histograms, otherwise return right now |
1310 | if ( task == AliQAv1::kRECPOINTS ) | |
1311 | { | |
1312 | if ( !GetRecPointsData(kTriggerDigitsBendPlane) ) return; | |
1313 | } | |
1314 | ||
1315 | if ( task == AliQAv1::kRAWS ) | |
1316 | { | |
1317 | if ( !GetRawsData(kTriggerScalersBP) ) return; | |
1318 | } | |
1319 | ||
aef183f7 | 1320 | AliMUONTriggerDisplay triggerDisplay; |
1321 | ||
2346e1ad | 1322 | TH3F* histoStrips=0x0; |
1323 | TH2F* histoDisplayStrips=0x0; | |
2346e1ad | 1324 | |
aef183f7 | 1325 | for (Int_t iCath = 0; iCath < AliMpConstants::NofCathodes(); iCath++) |
2346e1ad | 1326 | { |
4e25ac79 | 1327 | if(task==AliQAv1::kRECPOINTS){ |
2346e1ad | 1328 | ERecPoints hindex |
1329 | = ( iCath == 0 ) ? kTriggerDigitsBendPlane : kTriggerDigitsNonBendPlane; | |
1330 | histoStrips = (TH3F*)GetRecPointsData(hindex); | |
2346e1ad | 1331 | } |
4e25ac79 | 1332 | else if(task==AliQAv1::kRAWS){ |
2346e1ad | 1333 | ERaw hindex |
1334 | = ( iCath == 0 ) ? kTriggerScalersBP : kTriggerScalersNBP; | |
1335 | histoStrips = (TH3F*)GetRawsData(hindex); | |
49e110ec | 1336 | if(histoStrips->GetEntries()==0) continue; // No scalers found |
2346e1ad | 1337 | } |
1338 | ||
aef183f7 | 1339 | for (Int_t iChamber = 0; iChamber < AliMpConstants::NofTriggerChambers(); iChamber++) |
2346e1ad | 1340 | { |
4e25ac79 | 1341 | if(task==AliQAv1::kRECPOINTS){ |
aef183f7 | 1342 | histoDisplayStrips = (TH2F*)GetRecPointsData(kTriggerDigitsDisplay + AliMpConstants::NofTriggerChambers()*iCath + iChamber); |
2346e1ad | 1343 | } |
4e25ac79 | 1344 | else if(task==AliQAv1::kRAWS){ |
aef183f7 | 1345 | histoDisplayStrips = (TH2F*)GetRawsData(kTriggerScalersDisplay + AliMpConstants::NofTriggerChambers()*iCath + iChamber); |
2346e1ad | 1346 | } |
aef183f7 | 1347 | Int_t bin = histoStrips->GetXaxis()->FindBin(11+iChamber); |
1348 | histoStrips->GetXaxis()->SetRange(bin,bin); | |
1349 | TH2F* inputHisto = (TH2F*)histoStrips->Project3D("zy"); | |
1350 | triggerDisplay.FillDisplayHistogram(inputHisto, histoDisplayStrips, AliMUONTriggerDisplay::kDisplayStrips, iCath, iChamber); | |
4e25ac79 | 1351 | if(task==AliQAv1::kRAWS) { |
eb3886c8 | 1352 | Float_t acquisitionTime = ((TH1F*)GetRawsData(kTriggerScalersTime))->GetBinContent(1); |
1353 | histoDisplayStrips->Scale(1./acquisitionTime); | |
1354 | } | |
2346e1ad | 1355 | } // iChamber |
1356 | } // iCath | |
2346e1ad | 1357 | |
4e25ac79 | 1358 | if(task==AliQAv1::kRAWS){ |
49e110ec | 1359 | TH2F* histoI = (TH2F*) GetRawsData(kTriggerRPCi); |
1360 | TH2F* histoHV = (TH2F*) GetRawsData(kTriggerRPChv); | |
1361 | FillTriggerDCSHistos(); | |
1362 | for (Int_t iChamber = 0; iChamber < AliMpConstants::NofTriggerChambers(); iChamber++) { | |
1363 | Int_t bin = histoI->GetXaxis()->FindBin(11+iChamber); | |
1364 | TH2F* histoDisplayI = (TH2F*)GetRawsData(kTriggerIDisplay + iChamber); | |
1365 | triggerDisplay.FillDisplayHistogram(histoI->ProjectionY("_px", bin, bin), histoDisplayI, AliMUONTriggerDisplay::kDisplaySlats, 0, iChamber); | |
1366 | TH2F* histoDisplayHV = (TH2F*)GetRawsData(kTriggerHVDisplay + iChamber); | |
1367 | bin = histoHV->GetXaxis()->FindBin(11+iChamber); | |
1368 | triggerDisplay.FillDisplayHistogram(histoHV->ProjectionY("_px", bin, bin), histoDisplayHV, AliMUONTriggerDisplay::kDisplaySlats, 0, iChamber); | |
1369 | } | |
1370 | } | |
1371 | ||
4e25ac79 | 1372 | if(task==AliQAv1::kRECPOINTS){ |
49e110ec | 1373 | TH1F* histoBoards = (TH1F*)GetRecPointsData(kTriggeredBoards); |
1374 | TH2F* histoDisplayBoards = (TH2F*)GetRecPointsData(kTriggerBoardsDisplay); | |
1375 | triggerDisplay.FillDisplayHistogram(histoBoards, histoDisplayBoards, AliMUONTriggerDisplay::kDisplayBoards, 0, 0); | |
1376 | } | |
1377 | } | |
1378 | ||
1379 | ||
1380 | //_____________________________________________________________________________ | |
1381 | Bool_t | |
1382 | AliMUONQADataMakerRec::FillTriggerDCSHistos() | |
1383 | { | |
1384 | /// Get HV and currents values for one trigger chamber | |
1385 | ||
1386 | AliCodeTimerAuto(""); | |
1387 | ||
49e110ec | 1388 | AliMUONCalibrationData calibrationData(AliCDBManager::Instance()->GetRun()); |
1389 | ||
1390 | TMap* triggerDcsMap = calibrationData.TriggerDCS(); | |
1391 | ||
2d114b34 | 1392 | if ( !triggerDcsMap ) |
1393 | { | |
1394 | AliError("Cannot fill DCS histos, as triggerDcsMap is NULL"); | |
1395 | return kFALSE; | |
1396 | } | |
1397 | ||
1398 | AliMpDEIterator deIt; | |
1399 | ||
1400 | deIt.First(); | |
1401 | ||
49e110ec | 1402 | AliMpDCSNamer triggerDcsNamer("TRIGGER"); |
1403 | ||
1404 | TH2* currHisto = 0x0; | |
1405 | ||
1406 | Bool_t error = kFALSE; | |
1407 | ||
1408 | while ( !deIt.IsDone() ) | |
1409 | { | |
1410 | Int_t detElemId = deIt.CurrentDEId(); | |
1411 | ||
1412 | if ( AliMpDEManager::GetStationType(detElemId) == AliMp::kStationTrigger) { | |
1413 | ||
1414 | Int_t iChamber = AliMpDEManager::GetChamberId(detElemId); | |
1415 | Int_t slat = detElemId%100; | |
1416 | ||
1417 | for(Int_t iMeas=0; iMeas<AliMpDCSNamer::kNDCSMeas; iMeas++){ | |
1418 | TString currAlias = triggerDcsNamer.DCSChannelName(detElemId, 0, iMeas); | |
1419 | ||
5379c4a3 | 1420 | AliDebug(AliQAv1::GetQADebugLevel(), Form("\nDetElemId %i dcsAlias %s", detElemId, currAlias.Data())); |
49e110ec | 1421 | |
1422 | TPair* triggerDcsPair = static_cast<TPair*>(triggerDcsMap->FindObject(currAlias.Data())); | |
1423 | ||
1424 | if (!triggerDcsPair) | |
1425 | { | |
1426 | AliError(Form("Did not find expected alias (%s) for DE %d", | |
1427 | currAlias.Data(),detElemId)); | |
1428 | error = kTRUE; | |
1429 | } | |
1430 | else | |
1431 | { | |
1432 | TObjArray* values = static_cast<TObjArray*>(triggerDcsPair->Value()); | |
1433 | if (!values) | |
1434 | { | |
1435 | AliError(Form("Could not get values for alias %s",currAlias.Data())); | |
1436 | error = kTRUE; | |
1437 | } | |
1438 | else | |
1439 | { | |
1440 | TIter next(values); | |
1441 | AliDCSValue* val; | |
1442 | ||
1443 | while ( ( val = static_cast<AliDCSValue*>(next()) ) ) | |
1444 | { | |
1445 | Float_t hvi = val->GetFloat(); | |
1446 | ||
5379c4a3 | 1447 | AliDebug(AliQAv1::GetQADebugLevel(), Form("Value %f", hvi)); |
49e110ec | 1448 | |
1449 | switch(iMeas){ | |
1450 | case AliMpDCSNamer::kDCSI: | |
1451 | currHisto = (TH2F*) GetRawsData(kTriggerRPCi); | |
1452 | break; | |
1453 | case AliMpDCSNamer::kDCSHV: | |
1454 | currHisto = (TH2F*) GetRawsData(kTriggerRPChv); | |
1455 | break; | |
1456 | } | |
1457 | Int_t binX = currHisto->GetXaxis()->FindBin(iChamber+1); | |
1458 | Int_t binY = currHisto->GetYaxis()->FindBin(slat); | |
1459 | currHisto->SetBinContent(binX, binY, hvi); | |
1460 | } // loop on values | |
1461 | } // if (!values) | |
1462 | } // if (!triggerDcsPair) | |
1463 | } // loop on measured types (HV and currents) | |
1464 | } // if (stationType == kStationTrigger) | |
1465 | ||
1466 | deIt.Next(); | |
1467 | } | |
1468 | return error; | |
2346e1ad | 1469 | } |
de1d4a53 | 1470 | |
1471 | //____________________________________________________________________________ | |
1472 | AliMUONVTrackerData* AliMUONQADataMakerRec::GetTrackerData() const | |
1473 | { | |
cddcc1f3 | 1474 | /// Return tracker data |
de1d4a53 | 1475 | |
1476 | return fTrackerDataMaker->Data(); | |
1477 | ||
1478 | } |