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