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