29 #include <THnSparse.h>
30 #include <TObjArray.h>
31 #include <TObjString.h>
32 #include <TGeoGlobalMagField.h>
40 #include "AliESDEvent.h"
41 #include "AliESDMuonTrack.h"
42 #include "AliGeomManager.h"
43 #include "AliCDBManager.h"
44 #include "AliInputEventHandler.h"
45 #include "AliCounterCollection.h"
48 #include "AliAnalysisDataSlot.h"
49 #include "AliAnalysisDataContainer.h"
50 #include "AliAnalysisManager.h"
51 #include "AliCentrality.h"
55 #include "AliMUONCDB.h"
56 #include "AliMUONESDInterface.h"
57 #include "AliMUONVTrackReconstructor.h"
58 #include "AliMUONRecoParam.h"
59 #include "AliMUONGeometryTransformer.h"
60 #include "AliMUONTrack.h"
61 #include "AliMUONTrackParam.h"
62 #include "AliMUONTrackExtrap.h"
63 #include "AliMUONVCluster.h"
64 #include "AliMUONConstants.h"
65 #include "AliMUON2DMap.h"
66 #include "AliMUONVCalibParam.h"
67 #include "AliMUONCalibParamNI.h"
68 #include "AliMUONTrackerData.h"
71 #include "AliMpDEManager.h"
72 #include "AliMpSegmentation.h"
73 #include "AliMpVSegmentation.h"
75 #include "AliMpArea.h"
76 #include "AliMpDEIterator.h"
77 #include "AliMpConstants.h"
78 #include "AliMpDDLStore.h"
82 const Int_t
AliAnalysisTaskMuonTrackingEff::fgkNofDE[11] = {4, 4, 4, 4, 18, 18, 26, 26, 26, 26, 156};
92 fRecoParamOCDBpath(
""),
98 fEnableDisplay(kFALSE),
103 fChamberTDHistList(0x0),
104 fChamberTTHistList(0x0),
105 fChamberSDHistList(0x0),
113 AliAnalysisTaskSE(name),
117 fRecoParamOCDBpath(
""),
123 fEnableDisplay(kFALSE),
128 fChamberTDHistList(0x0),
129 fChamberTTHistList(0x0),
130 fChamberSDHistList(0x0),
136 DefineOutput(1, AliCounterCollection::Class());
137 DefineOutput(2, AliCounterCollection::Class());
138 DefineOutput(3, TList::Class());
139 DefineOutput(4, TList::Class());
140 DefineOutput(5, TList::Class());
141 DefineOutput(6, TList::Class());
148 if (!AliAnalysisManager::GetAnalysisManager()->IsProofMode()) {
170 AliCDBManager* man = AliCDBManager::Instance();
171 if (man->IsDefaultStorageSet()) printf(
"EfficiencyTask: CDB default storage already set!\n");
173 man->SetDefaultStorage(
fOCDBpath.Data());
177 if (man->GetRun() > -1) printf(
"EfficiencyTask: run number already set!\n");
178 else man->SetRun(fCurrentRunNumber);
181 if (!AliGeomManager::GetGeometry()) {
182 AliGeomManager::LoadGeometry();
183 if (!AliGeomManager::GetGeometry())
return;
184 if (!AliGeomManager::ApplyAlignObjsFromCDB(
"MUON"))
return;
190 if (!AliMpSegmentation::Instance(kFALSE) || !AliMpDDLStore::Instance(kFALSE)) {
191 if (!AliMUONCDB::LoadMapping())
return;
195 Double_t pl0[3] = {0., 0., 0.};
196 Double_t pl1[3] = {0., 0., 1.};
197 Double_t pg0[3], pg1[3];
200 for (Int_t i = 0; i < AliMUONConstants::NTrackingCh(); i++) {
203 while (!it.IsDone()) {
204 Int_t deId = it.CurrentDEId();
205 fTransformer->Local2Global(deId, pl0[0], pl0[1], pl0[2], pg0[0], pg0[1], pg0[2]);
206 fTransformer->Local2Global(deId, pl1[0], pl1[1], pl1[2], pg1[0], pg1[1], pg1[2]);
207 TVectorD *plane =
new TVectorD(6);
208 (*plane)[0] = pg0[0];
209 (*plane)[1] = pg0[1];
210 (*plane)[2] = pg0[2];
211 (*plane)[3] = pg1[0] - pg0[0];
212 (*plane)[4] = pg1[1] - pg0[1];
213 (*plane)[5] = pg1[2] - pg0[2];
220 if (!AliMUONESDInterface::GetTracker()) AliMUONESDInterface::ResetTracker();
223 if (!
fMuonTrackCuts) AliFatal(
"You must specify the requested selections (AliMuonTrackCut obj is missing)");
236 fClusters =
new AliCounterCollection(GetOutputSlot(1)->GetContainer()->GetName());
237 fClusters->AddRubric(
"Cluster",
"Detected/Accepted/Expected");
238 fClusters->AddRubric(
"Chamber", AliMpConstants::NofTrackingChambers());
242 fClusters->AddRubric(
"Channel", AliMpConstants::ManuNofChannels());
246 fEvents =
new AliCounterCollection(GetOutputSlot(2)->GetContainer()->GetName());
247 fEvents->AddRubric(
"event",
"any");
248 fEvents->AddRubric(
"run", 100000);
261 TString histName, histTitle;
264 Int_t nCentBins = 22;
265 Double_t centRange[2] = {-5., 105.};
274 const Int_t nDims = 6;
275 Int_t nBins[nDims] = {0, nCentBins, 20, 15, 15, 2};
276 Double_t xMin[nDims] = {0., centRange[0], 0., -4., 0., -2.};
277 Double_t xMax[nDims] = {0., centRange[1], 20., -2.5, TMath::TwoPi(), 2.};
279 for (Int_t iCh = 0; iCh < 10; iCh++)
283 xMin[0] = 0.; xMax[0] =
static_cast<Double_t
>(
fgkNofDE[iCh]);
284 histTitle.Form(
"ChamberNbr %d", iCh+1);
285 histName.Form(
"TD_ChamberNbr%d", iCh+1);
286 hn =
new THnSparseT<TArrayF>(histName, histTitle, nDims, nBins, xMin, xMax);
288 histName.Form(
"TT_ChamberNbr%d",iCh+1);
289 hn =
new THnSparseT<TArrayF>(histName, histTitle, nDims, nBins, xMin, xMax);
291 histName.Form(
"SD_ChamberNbr%d", iCh+1);
292 hn =
new THnSparseT<TArrayF>(histName, histTitle, nDims, nBins, xMin, xMax);
299 xMin[0] = 0.5; xMax[0] = 10.5;
300 hn =
new THnSparseT<TArrayF>(
"TD_Chambers 11",
"Chambers 11", nDims, nBins, xMin, xMax);
302 hn =
new THnSparseT<TArrayF>(
"TT_Chambers 11",
"Chambers 11", nDims, nBins, xMin, xMax);
304 hn =
new THnSparseT<TArrayF>(
"SD_Chambers 11",
"Chambers 11", nDims, nBins, xMin, xMax);
308 TH1F *fHistCent =
new TH1F(
"fHistCent",
"centrality distribution", nCentBins, centRange[0], centRange[1]);
310 TH1F *fHistPt =
new TH1F(
"fHistPt",
"pt distribution", 250, 0., 50.);
312 TH1F *fHistY =
new TH1F(
"fHistY",
"y distribution", 60, -4., -2.5);
314 TH1F *fHistTheta =
new TH1F(
"fHistTheta",
"theta distribution", 120, 2.8, 3.2);
316 TH1F *fHistP =
new TH1F(
"fHistP",
"momentum distribution", 250, 0., 500.);
318 TH1F *fHistZ =
new TH1F(
"fHistZ",
"Z distribution", 200, -100., 100.);
320 TH1F *fHistPhi =
new TH1F(
"fHistPhi",
"phi distribution", 60, 0., TMath::TwoPi());
322 TH1F *fHistPtRap2p5To2p75 =
new TH1F(
"fHistPtRap2p5To2p75",
"2.5 < y < 2.75", 250, 0., 50.);
324 TH1F *fHistPtRap2p75To3p0 =
new TH1F(
"fHistPtRap2p75To3p0",
"2.75 < y < 3.0", 250, 0., 50.);
326 TH1F *fHistPtRap3p0To3p25 =
new TH1F(
"fHistPtRap3p0To3p25",
"3.0 < y < 3.25", 250, 0., 50.);
328 TH1F *fHistPtRap3p25To3p5 =
new TH1F(
"fHistPtRap3p25To3p5",
"3.25 < y < 3.5", 250, 0., 50.);
330 TH1F *fHistPtRap3p5To3p75 =
new TH1F(
"fHistPtRap3p5To3p75",
"3.5 < y < 3.75", 250, 0., 50.);
332 TH1F *fHistPtRap3p75To4p0 =
new TH1F(
"fHistPtRap3p75To4p0",
"3.75 < y < 4.0", 250, 0., 50.);
334 TH1F *fHistRapPt1p0To2p0 =
new TH1F(
"fHistRapPt1p0To2p0",
"1.0 < pT < 2.0", 60, -4., -2.5);
336 TH1F *fHistRapPt2p0To5p0 =
new TH1F(
"fHistRapPt2p0To5p0",
"2.0 < pT < 5.0", 60, -4., -2.5);
338 TH1F *fHistRapPt5p0To8p0 =
new TH1F(
"fHistRapPt5p0To8p0",
"5.0 < pT < 8.0", 60, -4., -2.5);
340 TH1F *fHistRapPt2p0To4p0 =
new TH1F(
"fHistRapPt2p0To4p0",
"2.0 < pT < 4.0", 60, -4., -2.5);
342 TH1F *fHistRapPt4p0To8p0 =
new TH1F(
"fHistRapPt4p0To8p0",
"4.0 < pT < 8.0", 60, -4., -2.5);
345 TH2D *hDXYOverDXYMax =
new TH2D(
"hDXYOverDXYMax",
"DXY / DXYMax;DX / DXMax;DY / DYMax", 100, -1., 1., 100, -1., 1.);
347 TH2D *hDXOverDXMax =
new TH2D(
"hDXOverDXMax",
"DX / DXMax vs pXZ;pXZ;DX / DXMax", 50, 0., 500., 100, -1., 1.);
349 TH2D *hDYOverDYMax =
new TH2D(
"hDYOverDYMax",
"DY / DYMax vs pYZ;pYZ;DY / DYMax", 50, 0., 500., 100, -1., 1.);
352 THnSparse *hKine =
new THnSparseT<TArrayF>(
"hKine",
"kinematics distribution", nDims-1, &nBins[1], &xMin[1], &xMax[1]);
370 if (!
fOCDBLoaded) AliFatal(
"Problem occur while loading OCDB objects");
373 AliESDEvent* esd =
dynamic_cast<AliESDEvent*
>(InputEvent());
377 Double_t cent = esd->GetCentrality()->GetCentralityPercentileUnchecked(
"V0M");
378 if (cent <= fCentMin || cent >
fCentMax)
return;
382 fEvents->Count(Form(
"event:any/run:%d",fCurrentRunNumber));
386 Int_t nTracks = (Int_t)esd->GetNumberOfMuonTracks();
387 for (Int_t iTrack = 0; iTrack < nTracks; iTrack++) {
388 AliESDMuonTrack *esdTrack = esd->GetMuonTrack(iTrack);
391 Double_t pT = esdTrack->Pt();
393 (
fUseMCLabel && (esdTrack->GetLabel() < 0 || esdTrack->TestBit(BIT(22)))))
continue;
396 Double_t y = esdTrack->Y();
397 Double_t phi = esdTrack->Phi();
400 static_cast<TH1F*
>(
fExtraHistList->At(3))->Fill(esdTrack->Theta());
402 static_cast<TH1F*
>(
fExtraHistList->At(5))->Fill(esdTrack->GetZ());
404 if ( (y < -2.5) && (y > -2.75) ) static_cast<TH1F*>(
fExtraHistList->At(7))->Fill(pT);
405 if ( (y < -2.75) && (y > -3.0) ) static_cast<TH1F*>(
fExtraHistList->At(8))->Fill(pT);
406 if ( (y < -3.0) && (y > -3.25) ) static_cast<TH1F*>(
fExtraHistList->At(9))->Fill(pT);
407 if ( (y < -3.25) && (y > -3.5) ) static_cast<TH1F*>(
fExtraHistList->At(10))->Fill(pT);
408 if ( (y < -3.5) && (y > -3.75) ) static_cast<TH1F*>(
fExtraHistList->At(11))->Fill(pT);
409 if ( (y < -3.75) && (y > -4.0) ) static_cast<TH1F*>(
fExtraHistList->At(12))->Fill(pT);
410 if ( (pT > 1.0) && (pT < 2.0) ) static_cast<TH1F*>(
fExtraHistList->At(13))->Fill(y);
411 if ( (pT > 2.0) && (pT < 5.0) ) static_cast<TH1F*>(
fExtraHistList->At(14))->Fill(y);
412 if ( (pT > 5.0) && (pT < 8.0) ) static_cast<TH1F*>(
fExtraHistList->At(15))->Fill(y);
413 if ( (pT > 2.0) && (pT < 4.0) ) static_cast<TH1F*>(
fExtraHistList->At(16))->Fill(y);
414 if ( (pT > 4.0) && (pT < 8.0) ) static_cast<TH1F*>(
fExtraHistList->At(17))->Fill(y);
417 AliMUONESDInterface::ESDToMUON(*esdTrack, track);
418 Double_t trackInfo[6] = {0., cent, pT, y, phi,
static_cast<Double_t
>(esdTrack->Charge())};
419 static_cast<THnSparse*
>(
fExtraHistList->At(21))->Fill(&trackInfo[1]);
422 Bool_t removableChambers[10];
426 Int_t previousCh = -1;
427 TObjArray *trackParams = track.GetTrackParamAtCluster();
428 AliMUONTrackParam *trackParam =
static_cast<AliMUONTrackParam*
>(trackParams->First());
431 AliMUONVCluster* cluster = trackParam->GetClusterPtr();
432 Int_t currentCh = cluster->GetChamberId();
433 Int_t currentDE = cluster->GetDetElemId();
436 Double_t pos[3] = {cluster->GetX(), cluster->GetY(), cluster->GetZ()};
440 AliMUONTrackParam *nextTrackParam =
static_cast<AliMUONTrackParam*
>(trackParams->After(trackParam));
441 Int_t nextCh = nextTrackParam ? nextTrackParam->GetClusterPtr()->GetChamberId() : 10;
447 if (trackParam->IsRemovable()) {
448 Bool_t recordChamber = (removableChambers[currentCh] && currentCh != nextCh);
454 while (previousCh < currentCh-1 && (isValidTrack || previousCh < 5))
458 if (!isValidTrack && currentCh > 5)
break;
461 if (currentCh != previousCh && currentCh != nextCh)
464 if (nextTrackParam) {
467 previousCh = currentCh;
468 trackParam = nextTrackParam;
473 while (++currentCh < 10 && (isValidTrack || currentCh < 6))
499 fClusters =
static_cast<AliCounterCollection*
>(GetOutputData(1));
503 AliCDBManager* man = AliCDBManager::Instance();
504 if (!man->IsDefaultStorageSet()) {
505 if (gROOT->IsBatch()) man->SetDefaultStorage(
"alien://folder=/alice/simulation/2008/v4-15-Release/Ideal");
506 else man->SetDefaultStorage(
"local://$ALICE_ROOT/OCDB");
508 if (man->GetRun() < 0) man->SetRun(0);
509 if (!AliMpSegmentation::Instance(kFALSE) || !AliMpDDLStore::Instance(kFALSE)) {
510 if (!AliMUONCDB::LoadMapping())
return;
513 TString clusterKey[3] = {
"Detected",
"Accepted",
"Expected"};
516 TObjArray *deKeys =
fClusters->GetKeyWords(
"DE").Tokenize(
",");
517 Int_t nDEs = deKeys->GetEntriesFast();
520 for (Int_t iKey = 0; iKey < 3; iKey++) {
523 AliMUON2DMap clustersStore(kTRUE);
526 for (Int_t iDE = 0; iDE < nDEs; iDE++) {
529 TString deKey =
static_cast<TObjString*
>(deKeys->UncheckedAt(iDE))->GetString();
530 Int_t deId = deKey.Atoi();
533 TH2D *channelVsManu =
fClusters->Get(
"channel",
"Manu",
534 Form(
"Cluster:%s/DE:%s", clusterKey[iKey].
Data(), deKey.Data()));
535 Int_t nManus = channelVsManu->GetNbinsX();
536 Int_t nChannels = channelVsManu->GetNbinsY();
539 for (Int_t iManu = 1; iManu <= nManus; iManu++) {
542 TString manuKey = channelVsManu->GetXaxis()->GetBinLabel(iManu);
543 Int_t manuId = manuKey.Atoi();
546 for (Int_t iChannel = 1; iChannel <= nChannels; iChannel++) {
549 TString channelKey = channelVsManu->GetYaxis()->GetBinLabel(iChannel);
550 Int_t channelId = channelKey.Atoi();
553 Int_t nClusters =
static_cast<Int_t
>(channelVsManu->GetBinContent(iManu, iChannel));
554 if (nClusters < 1)
continue;
557 AliMUONVCalibParam* c =
static_cast<AliMUONVCalibParam*
>(clustersStore.FindObject(deId, manuId));
559 c =
new AliMUONCalibParamNI(1, AliMpConstants::ManuNofChannels(), deId, manuId);
560 clustersStore.Add(c);
562 c->SetValueAsInt(channelId, 0, nClusters);
569 delete channelVsManu;
574 TString
suffix = GetName();
575 suffix.ReplaceAll(
"MuonTrackingEfficiency",
"");
576 AliMUONTrackerData clustersData(Form(
"%sClusters%s", clusterKey[iKey].
Data(), suffix.Data()),
577 Form(
"%s clusters %s", clusterKey[iKey].
Data(), suffix.Data()), 1, kFALSE);
578 clustersData.SetDimensionName(0,
"count");
579 clustersData.Add(clustersStore);
582 TFile *outFile = TFile::Open(
"DisplayResults.root",
"UPDATE");
583 if (outFile && outFile->IsOpen()) {
584 clustersData.Write(0x0, TObject::kOverwrite);
601 for (Int_t i = 0; i < 10; i++) removableChambers[i] = kFALSE;
604 UInt_t requestedStationMask = AliMUONESDInterface::GetTracker()->GetRecoParam()->RequestedStationMask();
605 Bool_t request2ChInSameSt45 = !AliMUONESDInterface::GetTracker()->GetRecoParam()->MakeMoreTrackCandidates();
606 Bool_t isValidTrack = track.IsValid(requestedStationMask, request2ChInSameSt45);
609 Int_t nClInCh[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
610 Int_t nChInSt[5] = {0, 0, 0, 0, 0};
611 Int_t previousCh = -1;
612 Int_t nClusters = track.GetNClusters();
613 for (Int_t i = 0; i < nClusters; i++) {
615 AliMUONTrackParam *trackParam =
static_cast<AliMUONTrackParam*
>(track.GetTrackParamAtCluster()->UncheckedAt(i));
616 Int_t currentCh = trackParam->GetClusterPtr()->GetChamberId();
617 Int_t currentSt = currentCh/2;
619 nClInCh[currentCh]++;
621 if (currentCh != previousCh) {
622 previousCh = currentCh;
623 nChInSt[currentSt]++;
629 for (Int_t i = 0; i < nClusters; i++) {
631 AliMUONTrackParam *trackParam =
static_cast<AliMUONTrackParam*
>(track.GetTrackParamAtCluster()->UncheckedAt(i));
632 Int_t currentCh = trackParam->GetClusterPtr()->GetChamberId();
633 Int_t currentSt = currentCh/2;
638 if (!((1 << currentSt) & requestedStationMask) ||
639 nChInSt[currentSt] == 2) {
641 removableChambers[currentCh] = kTRUE;
642 trackParam->SetRemovable(kTRUE);
644 }
else if (nClInCh[currentCh] == 2) {
646 trackParam->SetRemovable(kTRUE);
653 if (!isValidTrack)
continue;
655 if (((request2ChInSameSt45 &&
656 nChInSt[4-currentSt/4] == 2) ||
657 (!request2ChInSameSt45 &&
658 nChInSt[3]+nChInSt[4] >= 3)) &&
659 (!((1 << currentSt) & requestedStationMask) ||
660 nChInSt[currentSt] == 2)) {
662 removableChambers[currentCh] = kTRUE;
663 trackParam->SetRemovable(kTRUE);
665 }
else if (nClInCh[currentCh] == 2) {
667 trackParam->SetRemovable(kTRUE);
681 Double_t trackInfo[6])
685 static const Double_t maxDZ = 0.01;
686 static const Double_t maxDevX = 0.01;
687 static const Double_t maxDevY = 0.1;
688 static const Double_t minDXY = 1.;
690 Bool_t missingChamber = (chamber != param.GetClusterPtr()->GetChamberId());
691 Int_t startDE = param.GetClusterPtr()->GetDetElemId();
692 Double_t pos[3], maxDX, maxDY, dZ = 0.;
693 AliMUONTrackParam param1, param2;
697 param1.SetParameters(param.GetParameters());
698 param1.SetZ(param.GetZ());
699 if (missingChamber && !AliMUONTrackExtrap::ExtrapToZ(¶m1, AliMUONConstants::DefaultChamberZ(chamber)))
return;
701 Double_t pX = param1.Px();
702 Double_t pY = param1.Py();
703 Double_t pZ = param1.Pz();
704 Double_t pXZ = TMath::Sqrt(pX*pX + pZ*pZ);
705 Double_t pYZ = TMath::Sqrt(pY*pY + pZ*pZ);
710 while (!it.IsDone()) {
711 Int_t deId = it.CurrentDEId();
714 if (deId == startDE) {
720 param2.SetParameters(param1.GetParameters());
721 param2.SetZ(param1.GetZ());
725 Bool_t crossDE = kFALSE;
726 Bool_t extrapOk = kTRUE;
731 Double_t dX = pos[0]-param2.GetNonBendingCoor();
732 Double_t dY = pos[1]-param2.GetBendingCoor();
733 Double_t dXOverDXMax = (dZ > 0.) ? dX*pXZ/(maxDevX*dZ) : 0.;
734 Double_t dYOverDYMax = (dZ > 0.) ? dY*pYZ/(maxDevY*dZ) : 0.;
735 static_cast<TH2D*
>(
fExtraHistList->At(18))->Fill(dXOverDXMax, dYOverDYMax);
736 static_cast<TH2D*
>(
fExtraHistList->At(19))->Fill(pXZ, dXOverDXMax);
737 static_cast<TH2D*
>(
fExtraHistList->At(20))->Fill(pYZ, dYOverDYMax);
738 if (dXOverDXMax >= 1.) printf(
"st = %d; pXZ = %f; dZ = %f; dX = %f; dX*PXZ/(dZ*maxDevX) = %f\n",
739 chamber/2, pXZ, dZ, dX, dXOverDXMax);
740 if (dYOverDYMax >= 1.) printf(
"st = %d; pYZ = %f; dZ = %f; dY = %f; dY*PYZ/(dZ*maxDevY) = %f\n",
741 chamber/2, pYZ, dZ, dY, dYOverDYMax);
747 dZ = TMath::Abs(pos[2]-param2.GetZ());
748 maxDX = minDXY + maxDevX*dZ/pXZ;
749 maxDY = minDXY + maxDevY*dZ/pYZ;
750 AliMpArea area(pos[0], pos[1], maxDX, maxDY);
753 }
while(crossDE && dZ > maxDZ && (extrapOk = AliMUONTrackExtrap::ExtrapToZ(¶m2, pos[2])));
756 if (crossDE && extrapOk &&
FindPads(deId, pos, pad)) {
758 missingChamber = kFALSE;
771 Double_t pos[3] = {param.GetNonBendingCoor(), param.GetBendingCoor(), param.GetZ()};
772 Double_t slope[2] = {param.GetNonBendingSlope(), param.GetBendingSlope()};
773 TVectorD &plane = *(
static_cast<TVectorD*
>(
fDEPlanes->UncheckedAt(deId)));
775 p[2] = (plane[3]*(slope[0]*pos[2]-pos[0]+plane[0]) + plane[4]*(slope[1]*pos[2]-pos[1]+plane[1]) + plane[5]*plane[2]) /
776 (plane[3]*slope[0] + plane[4]*slope[1] + plane[5]);
777 p[0] = slope[0]*(p[2]-pos[2]) + pos[0];
778 p[1] = slope[1]*(p[2]-pos[2]) + pos[1];
787 AliMpArea* globalDEArea =
fTransformer->GetDEArea(deId);
788 if (!globalDEArea)
return kFALSE;
790 return area.Overlap(*globalDEArea);
796 TString clusterKey, TList *chamberHistList, Bool_t recordChamber)
801 for (Int_t iCath = 0; iCath < 2; iCath++)
if (pad[iCath].IsValid()) {
802 Int_t manuId = pad[iCath].GetManuId();
803 Int_t busPatchId = AliMpDDLStore::Instance()->GetBusPatchId(deId,manuId);
804 fClusters->Count(Form(
"Cluster:%s/Chamber:%d/DE:%d/BusPatch:%d/Manu:%d/Channel:%d",
805 clusterKey.Data(), chamber, deId, busPatchId, manuId, pad[iCath].GetManuChannel()));
809 trackInfo[0] =
static_cast<Double_t
>(deId%100);
810 static_cast<THnSparse*
>(chamberHistList->At(chamber))->Fill(trackInfo);
814 trackInfo[0] =
static_cast<Double_t
>(chamber+1);
815 static_cast<THnSparse*
>(chamberHistList->At(10))->Fill(trackInfo);
825 static const AliMpPad emptyPad;
828 Double_t localPos[3];
829 fTransformer->Global2Local(deId, pos[0], pos[1], pos[2], localPos[0], localPos[1], localPos[2]);
832 for (Int_t iCath = 0; iCath < 2; iCath++) {
833 const AliMpVSegmentation* seg = AliMpSegmentation::Instance()->GetMpSegmentation(deId, AliMp::GetCathodType(iCath));
834 if (seg) pad[iCath] = seg->PadByPosition(localPos[0], localPos[1], kFALSE);
835 else pad[iCath] = emptyPad;
838 return (pad[0].IsValid() || pad[1].IsValid());
Bool_t OverlapDE(AliMpArea &area, Int_t deId)
virtual void Terminate(Option_t *)
virtual ~AliAnalysisTaskMuonTrackingEff()
ClassImp(AliAnalysisTaskMuonTrackingEff) const Int_t AliAnalysisTaskMuonTrackingEff
TList * fExtraHistList
List of extra histograms.
TList * fChamberTTHistList
List of histograms of the tracks which have passed through the chambers.
Bool_t TagRemovableClusters(AliMUONTrack &track, Bool_t removableChambers[10])
TString fRecoParamOCDBpath
OCDB path to the recoParam file.
Bool_t fOCDBLoaded
Determine if the OCDB and =geometry have been loaded.
Double_t fCentMax
select centrality <= fCentMax
tracking chamber efficiency from ESD data
void RecordCluster(Int_t chamber, Int_t deId, AliMpPad pad[2], Double_t trackInfo[6], TString clusterKey, TList *chamberHistList, Bool_t recordChamber)
AliAnalysisTaskMuonTrackingEff()
Bool_t fEnableDisplay
enable the display in the terminate
TList * fChamberTDHistList
List of histograms of the tracks detected in the chambers.
Bool_t FindPads(Int_t deId, Double_t pos[3], AliMpPad pad[2])
Look for pads at the cluster's location.
static const Int_t fgkNofDE[11]
Total number of detection elements in each chamber.
AliMUONGeometryTransformer * fTransformer
Transformer object.
void Intersect(AliMUONTrackParam ¶m, Int_t deId, Double_t p[3])
Bool_t fUseMCLabel
select tracks using MC label
TString fOCDBpath
OCDB path.
static const Int_t fgkNofManu
Total number of manus.
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
Double_t fPtCut
cut on minimum pt
void FindAndRecordMissingClusters(AliMUONTrackParam ¶m, Int_t chamber, Double_t trackInfo[6])
AliCounterCollection * fClusters
detected (all), accepted (for efficiency calculation) and expected clusters
virtual void UserExec(Option_t *)
AliCounterCollection * fEvents
number of analyzed events
static const Int_t fgkNofBusPath
Total number of bus patches.
AliMuonTrackCuts * fMuonTrackCuts
cuts to select tracks to be considered
TList * fChamberSDHistList
List of histograms of the tracks only detected by one chamber of the station.
virtual void UserCreateOutputObjects()
TObjArray * fDEPlanes
vectors (x0, y0, z0, a, b, c) defining the plane of each DE in the global frame
TString fAlignOCDBpath
OCDB path to the alignment file.