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