fSigmaClusterCut(0),
fChi2GlobalCut(0),
fSigmaSpectrometerCut(0),
- fExtrapOriginTransvError(0),
- fGaussianBlurZVert(0),
+ fVertexErrorX(0.015),
+ fVertexErrorY(0.015),
+ fVertexErrorZ(0.010),
fNFinalCandidatesCut(0),
fReadDir(0),
fOutDir(0),
fEv(0),
fLabelMC(0),
- fHistPtSpectrometer(0),
- fHistPtMuonTrackWithGoodMatch(0),
- fHistPtMuonTrackWithBadMatch(0),
fHistRadiusEndOfAbsorber(0),
fHistNGoodClustersForFinalTracks(0),
fHistDistanceGoodClusterFromTrackMinusDistanceBestClusterFromTrackAtLastPlane(0),
delete fNtuFinalCandidates;
delete fNtuFinalBestCandidates;
- delete fHistPtSpectrometer;
- delete fHistPtMuonTrackWithGoodMatch;
- delete fHistPtMuonTrackWithBadMatch;
delete fHistRadiusEndOfAbsorber;
delete fHistNGoodClustersForFinalTracks;
SetNFinalCandidatesCut(10);
SetRAbsorberCut(26.4);
SetLowPtCut(0.5);
- SetExtrapOriginTransvError(1.0);
}
// the track we are going to build, starting from fMuonTrackReco and adding the MFT clusters
AliMuonForwardTrack *track = new ((*fCandidateTracks)[0]) AliMuonForwardTrack();
track -> SetMUONTrack(fMuonTrackReco);
- if (fLabelMC>=0 && fStack->Particle(fLabelMC)) track -> SetMCTrackRef(fStack->Particle(fLabelMC));
+ if (fLabelMC>=0 && fStack->Particle(fLabelMC)) track->SetMCTrackRef(fStack->Particle(fLabelMC));
track -> SetMCLabel(fMuonTrackReco->GetMCLabel());
track -> SetMatchTrigger(fMuonTrackReco->GetMatchTrigger());
-
- // track parameters at the first tracking station in the Muon Spectrometer
- AliMUONTrackParam *param = (AliMUONTrackParam*) (fMuonTrackReco->GetTrackParamAtCluster()->First());
- Double_t ptSpectrometer = TMath::Sqrt(param->Px()*param->Px() + param->Py()*param->Py());
- Double_t thetaSpectrometer = TMath::ATan(ptSpectrometer/param->Pz());
- if (thetaSpectrometer<0.) thetaSpectrometer += TMath::Pi();
- Double_t etaSpectrometer = -1.*TMath::Log(TMath::Tan(0.5*thetaSpectrometer));
- // fOutputQAFile->cd();
- fHistPtSpectrometer -> Fill(ptSpectrometer);
-
- // if the transverse momentum in the Muon Spectrometer is smaller than the threshold, skip to the next track
- if (ptSpectrometer < fLowPtCut) return 3;
+
+ // track origin
+ Double_t xVtx=-999., yVtx=-999., zVtx=-999999.;
+ if (track->GetMCTrackRef()) {
+ xVtx = track->GetMCTrackRef()->Vx();
+ yVtx = track->GetMCTrackRef()->Vy();
+ zVtx = track->GetMCTrackRef()->Vz();
+ }
+
+ // track kinematics
+ Double_t pt=-999., theta=-999., eta=-999.;
+ if (track->GetMCTrackRef()) {
+ pt = track->GetMCTrackRef()->Pt();
+ theta = track->GetMCTrackRef()->Theta();
+ if (theta<0.) theta += TMath::Pi();
+ eta = track->GetMCTrackRef()->Eta();
+ }
+ else {
+ AliMUONTrackParam *param = (AliMUONTrackParam*) (fMuonTrackReco->GetTrackParamAtCluster()->First());
+ pt = TMath::Sqrt(param->Px()*param->Px() + param->Py()*param->Py());
+ theta = TMath::ATan(pt/param->Pz());
+ if (theta<0.) theta += TMath::Pi();
+ eta = -1.*TMath::Log(TMath::Tan(0.5*theta));
+ }
+ // if the transverse momentum is smaller than the threshold, skip to the next track
+ if (pt < fLowPtCut) return 3;
// track parameters linearly extrapolated from the first tracking station to the end of the absorber
AliMUONTrackParam trackParamEndOfAbsorber(*((AliMUONTrackParam*)(fMuonTrackReco->GetTrackParamAtCluster()->First())));
Double_t xEndOfAbsorber = trackParamEndOfAbsorber.GetNonBendingCoor();
Double_t yEndOfAbsorber = trackParamEndOfAbsorber.GetBendingCoor();
Double_t rAbsorber = TMath::Sqrt(xEndOfAbsorber*xEndOfAbsorber + yEndOfAbsorber*yEndOfAbsorber);
- // fOutputQAFile->cd();
fHistRadiusEndOfAbsorber -> Fill(rAbsorber);
- // if the radial distance of the track at the end of the absorber is smaller than a radius corresponding to
- // 3 degrees as seen from the interaction point, skip to the next track
+ // if the radial distance of the track at the end of the absorber is smaller than a given radius, skip to the next track
if (rAbsorber < fRAbsorberCut) return 4;
//------------------------- NOW THE CYCLE OVER THE MFT PLANES STARTS ---------------------------------------
AliDebug(1, "Finished cycle over planes");
- Double_t momentum = ptSpectrometer * TMath::CosH(etaSpectrometer);
+ Double_t momentum = pt * TMath::CosH(eta);
fTxtTrackMomentum = new TLatex(0.10, 0.70, Form("P_{spectro} = %3.1f GeV/c", momentum));
if (fMatchingMode==kIdealMatching) {
Double_t(fEv),
Double_t(fCountRealTracksAnalyzedOfEvent),
Double_t(nFinalTracks),
+ Double_t(fLabelMC>=0),
+ xVtx, yVtx, zVtx,
+ Double_t(fMuonTrackReco->GetMatchTrigger()),
Double_t(nClustersMC),
Double_t(nGoodClusters),
- ptSpectrometer,
- thetaSpectrometer,
- etaSpectrometer,
+ pt, theta, eta,
chi2AtPlane[0],
chi2AtPlane[1],
chi2AtPlane[2],
Double_t(fEv),
Double_t(fCountRealTracksAnalyzedOfEvent),
Double_t(nFinalTracks),
+ Double_t(fLabelMC>=0),
+ xVtx, yVtx, zVtx,
+ Double_t(fMuonTrackReco->GetMatchTrigger()),
Double_t(nClustersMC),
Double_t(nGoodClustersBestCandidate),
- ptSpectrometer,
- thetaSpectrometer,
- etaSpectrometer,
+ pt, theta, eta,
chi2HistoryForBestCandidate[0],
chi2HistoryForBestCandidate[1],
chi2HistoryForBestCandidate[2],
DrawPlanes();
}
- if (fIsCurrentMuonTrackable) {
- // fOutputQAFile->cd();
- if (nGoodClustersBestCandidate==5) fHistPtMuonTrackWithGoodMatch -> Fill(ptSpectrometer);
- else fHistPtMuonTrackWithBadMatch -> Fill(ptSpectrometer);
- }
-
// -------------------------------------------------------------------------------------------
fCandidateTracks->Clear();
currentParamBack = (*((AliMUONTrackParam*)(fMuonTrackReco->GetTrackParamAtCluster()->First())));
currentParamForResearchFront = currentParamFront;
currentParamForResearchBack = currentParamBack;
- AliMUONTrackExtrap::ExtrapToVertexWithoutBranson(¤tParamFront, 0.);
- AliMUONTrackExtrap::ExtrapToVertexWithoutBranson(¤tParamBack, 0.);
- AliMUONTrackExtrap::ExtrapToVertex(¤tParamForResearchFront, 0., 0., gRandom->Gaus(0,fGaussianBlurZVert), fExtrapOriginTransvError, fExtrapOriginTransvError);
- AliMUONTrackExtrap::ExtrapToVertex(¤tParamForResearchBack, 0., 0., gRandom->Gaus(0,fGaussianBlurZVert), fExtrapOriginTransvError, fExtrapOriginTransvError);
+ Double_t xExtrap = gRandom->Gaus(0,fVertexErrorX);
+ Double_t yExtrap = gRandom->Gaus(0,fVertexErrorY);
+ Double_t zExtrap = gRandom->Gaus(0,fVertexErrorZ);
+ AliMUONTrackExtrap::ExtrapToVertex(¤tParamFront, xExtrap, yExtrap, zExtrap, fVertexErrorX, fVertexErrorY);
+ AliMUONTrackExtrap::ExtrapToVertex(¤tParamBack, xExtrap, yExtrap, zExtrap, fVertexErrorX, fVertexErrorY);
+ AliMUONTrackExtrap::ExtrapToVertex(¤tParamForResearchFront, xExtrap, yExtrap, zExtrap, fVertexErrorX, fVertexErrorY);
+ AliMUONTrackExtrap::ExtrapToVertex(¤tParamForResearchBack, xExtrap, yExtrap, zExtrap, fVertexErrorX, fVertexErrorY);
}
else { // MFT planes others than the last one: mult. scattering correction because of the upstream MFT planes is performed
currentParamFront = (*((AliMUONTrackParam*)(fCurrentTrack->GetTrackParamAtCluster()->First())));
const Int_t nMaxNewTracks[] = {150, 200, 250, 600, 1000};
const Double_t radiusPlane[] = {0.010, 0.010, 0.050, 0.5, 1.5};
- fHistPtSpectrometer = new TH1D("hPtSpectrometer", "p_{T} as given by the Muon Spectrometer", 200, 0, 20.);
-
- fHistPtMuonTrackWithGoodMatch = new TH1D("fHistPtMuonTrackWithGoodMatch", "p_{T} of muon track with good match", 200, 0, 20.);
- fHistPtMuonTrackWithBadMatch = new TH1D("fHistPtMuonTrackWithBadMatch", "p_{T} of muon track with bad match", 200, 0, 20.);
-
fHistRadiusEndOfAbsorber = new TH1D("hRadiusEndOfAbsorber", "Track radial distance at the end of the absorber", 1000, 0, 100.);
fHistNGoodClustersForFinalTracks = new TH1D("hNGoodClustersForFinalTracks", "Number of Good Clusters per Final Track", 20, -0.25, 9.75);
//------------------------------------------
- fHistPtSpectrometer -> Sumw2();
- fHistPtMuonTrackWithGoodMatch -> Sumw2();
- fHistPtMuonTrackWithBadMatch -> Sumw2();
fHistRadiusEndOfAbsorber -> Sumw2();
fHistNGoodClustersForFinalTracks -> Sumw2();
}
- fNtuFinalCandidates = new TNtuple("ntuFinalCandidates", "Final Candidates (ALL)", "run:event:muonTrack:nFinalCandidates:nClustersMC:nGoodClusters:ptSpectrometer:thetaSpectrometer:etaSpectrometer:chi2AtPlane0:chi2AtPlane1:chi2AtPlane2:chi2AtPlane3:chi2AtPlane4:chi2AtPlane5:chi2AtPlane6:chi2AtPlane7:chi2AtPlane8");
+ fNtuFinalCandidates = new TNtuple("ntuFinalCandidates", "Final Candidates (ALL)", "run:event:muonTrack:nFinalCandidates:MCTrackRefExists:xVtx:yVtx:zVtx:triggerMatch:nClustersMC:nGoodClusters:pt:theta:eta:chi2AtPlane0:chi2AtPlane1:chi2AtPlane2:chi2AtPlane3:chi2AtPlane4:chi2AtPlane5:chi2AtPlane6:chi2AtPlane7:chi2AtPlane8");
- fNtuFinalBestCandidates = new TNtuple("ntuFinalBestCandidates", "Final Best Candidates", "run:event:muonTrack:nFinalCandidates:nClustersMC:nGoodClusters:ptSpectrometer:thetaSpectrometer:etaSpectrometer:chi2AtPlane0:chi2AtPlane1:chi2AtPlane2:chi2AtPlane3:chi2AtPlane4:chi2AtPlane5:chi2AtPlane6:chi2AtPlane7:chi2AtPlane8:nClustersAtPlane0:nClustersAtPlane1:nClustersAtPlane2:nClustersAtPlane3:nClustersAtPlane4:nClustersAtPlane5:nClustersAtPlane6:nClustersAtPlane7:nClustersAtPlane8");
+ fNtuFinalBestCandidates = new TNtuple("ntuFinalBestCandidates", "Final Best Candidates", "run:event:muonTrack:nFinalCandidates:MCTrackRefExists:xVtx:yVtx:zVtx:triggerMatch:nClustersMC:nGoodClusters:pt:theta:eta:chi2AtPlane0:chi2AtPlane1:chi2AtPlane2:chi2AtPlane3:chi2AtPlane4:chi2AtPlane5:chi2AtPlane6:chi2AtPlane7:chi2AtPlane8:nClustersAtPlane0:nClustersAtPlane1:nClustersAtPlane2:nClustersAtPlane3:nClustersAtPlane4:nClustersAtPlane5:nClustersAtPlane6:nClustersAtPlane7:nClustersAtPlane8");
}
void AliMuonForwardTrackFinder::SetTitleHistos() {
- fHistPtSpectrometer -> SetXTitle("p_{T} [GeV/c]");
- fHistPtMuonTrackWithGoodMatch -> SetXTitle("p_{T} [GeV/c]");
- fHistPtMuonTrackWithBadMatch -> SetXTitle("p_{T} [GeV/c]");
fHistRadiusEndOfAbsorber -> SetXTitle("R_{abs} [cm]");
fHistNGoodClustersForFinalTracks -> SetXTitle("N_{GoodClusters}");
fOutputQAFile = new TFile(Form("MuonGlobalTracking.QA.run%d.root", fRun), "recreate");
fOutputQAFile -> cd();
- fHistPtSpectrometer -> Write();
- fHistPtMuonTrackWithGoodMatch -> Write();
- fHistPtMuonTrackWithBadMatch -> Write();
fHistRadiusEndOfAbsorber -> Write();
fHistNGoodClustersForFinalTracks -> Write();
void SetRAbsorberCut(Double_t rAbsorberCut) { fRAbsorberCut = rAbsorberCut; }
void SetLowPtCut(Double_t lowPtCut) { fLowPtCut = lowPtCut; }
void SetNFinalCandidatesCut(Int_t nFinalCandidatesCut) { fNFinalCandidatesCut = nFinalCandidatesCut; }
- void SetExtrapOriginTransvError(Double_t extrapOriginTransvError) { fExtrapOriginTransvError = extrapOriginTransvError; }
- void SetGaussianBlurZVert(Double_t gaussianBlurZVert) { fGaussianBlurZVert = gaussianBlurZVert; }
+ void SetVertexError(Double_t xErr, Double_t yErr, Double_t zErr) { fVertexErrorX=xErr; fVertexErrorY=yErr; fVertexErrorZ=zErr; }
Int_t GetRun() { return fRun; }
Int_t GetNEvents() { return fNEventsToAnalyze; }
Double_t GetChi2GlobalCut() { return fChi2GlobalCut; }
Double_t GetRAbsorberCut() { return fRAbsorberCut; }
Double_t GetLowPtCut() { return fLowPtCut; }
- Double_t GetExtrapOriginTransvError() { return fExtrapOriginTransvError; }
Int_t GetNPlanesMFT() { return fNPlanesMFT; }
Int_t GetNFinalCandidatesCut() { return fNFinalCandidatesCut; }
Int_t GetCurrentEvent() { return fEv; }
Double_t fSigmaClusterCut; // to select the clusters in the MFT planes which are compatible with the extrapolated muon track
Double_t fChi2GlobalCut; // cut on the final chi2 of the global muon track
Double_t fSigmaSpectrometerCut; // for the selection of the tracks in the muon spectrometer
- Double_t fExtrapOriginTransvError; // uncertainty on the x and y position of the muon's origin
- Double_t fGaussianBlurZVert; // smearing of the z position of the vertex, to simulate real case when the simulation was performed at fixed zVert=0.
+ Double_t fVertexErrorX; // uncertainty on the x position of the muon's origin
+ Double_t fVertexErrorY; // uncertainty on the y position of the muon's origin
+ Double_t fVertexErrorZ; // uncertainty on the z position of the muon's origin
Int_t fNFinalCandidatesCut; // cut on the number of the final candidates for the muon track
TString fReadDir;
TString fOutDir;
Double_t fRPlaneMax[fNMaxPlanes]; // max radius of the MFT planes (the support)
Double_t fRPlaneMin[fNMaxPlanes]; // min radius of the MFT planes (the support)
- TH1D *fHistPtSpectrometer, *fHistPtMuonTrackWithGoodMatch, *fHistPtMuonTrackWithBadMatch; //
TH1D *fHistRadiusEndOfAbsorber, *fHistNTracksAfterExtrapolation[fNMaxPlanes]; //
TH1D *fHistNGoodClustersForFinalTracks, *fHistResearchRadius[fNMaxPlanes]; //
TH1D *fHistDistanceGoodClusterFromTrackMinusDistanceBestClusterFromTrackAtLastPlane; //