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),
fOutputEventTree(0),
fMuonForwardTracks(0),
fMatchingMode(-1),
- fMinResearchRadiusAtLastPlane(0),
fGRPData(0),
- fRunInfo(0)
+ fRunInfo(0),
+ fBransonCorrection(kTRUE)
{
fIsPlaneMandatory[iPlane] = kFALSE;
+ fMinResearchRadiusAtPlane[iPlane] = 0.;
+
}
// fNextTrack = 0;
AliMuonForwardTrackFinder::~AliMuonForwardTrackFinder() {
- delete *fMFTClusterArray;
- delete *fMFTClusterArrayFront;
- delete *fMFTClusterArrayBack;
+ for (Int_t iPlane=0; iPlane<AliMFTConstants::fNMaxPlanes; iPlane++) {
+
+ delete fHistNTracksAfterExtrapolation[iPlane];
+ delete fHistChi2Cluster_GoodCluster[iPlane];
+ delete fHistChi2Cluster_BadCluster[iPlane];
+ delete fHistResearchRadius[iPlane];
+
+ delete fHistChi2Cluster_GoodCluster[iPlane];
+ delete fHistChi2Cluster_BadCluster[iPlane];
+
+ delete fHistGlobalChi2AtPlaneFor_GOOD_CandidatesOfTrackableMuons[iPlane];
+ delete fHistGlobalChi2AtPlaneFor_BAD_CandidatesOfTrackableMuons[iPlane];
+
+ for (Int_t i=0; i<4; i++) delete fGrMFTPlane[i][iPlane];
+ delete fCircleExt[iPlane];
+ delete fCircleInt[iPlane];
+
+ delete fTxtTrackChi2[iPlane];
+
+ delete fMFTClusterArray[iPlane];
+ delete fMFTClusterArrayFront[iPlane];
+ delete fMFTClusterArrayBack[iPlane];
+
+ }
+
+ delete fNtuFinalCandidates;
+ delete fNtuFinalBestCandidates;
+
+ delete fHistRadiusEndOfAbsorber;
+
+ delete fHistNGoodClustersForFinalTracks;
+ delete fHistDistanceGoodClusterFromTrackMinusDistanceBestClusterFromTrackAtLastPlane; //
+ delete fHistDistanceGoodClusterFromTrackAtLastPlane; //
+
+ delete fCanvas;
+
+ delete fTxtMuonHistory;
+ delete fTxtTrackGoodClusters;
+ delete fTxtTrackFinalChi2;
+ delete fTxtTrackMomentum;
+ delete fTxtFinalCandidates;
+ delete fTxtDummy;
+ delete fTxtAllClust;
+ delete fTxtClustGoodChi2;
+ delete fTxtClustMC;
+ delete fTxtClustOfTrack;
+ delete fMrkAllClust;
+ delete fMrkClustGoodChi2;
+ delete fMrkClustMC;
+ delete fMrkClustOfTrack;
+
+ delete fFileCluster;
+ delete fFileESD;
+ delete fFile_gAlice;
- delete fIsPlaneMandatory;
+ delete fRunLoader;
+ delete fMFTLoader;
+ delete fMuonRecoCheck;
- delete fZPlane;
- delete fRPlaneMax;
- delete fRPlaneMin;
+ delete fMFTClusterTree;
- delete *fHistNTracksAfterExtrapolation;
- delete *fHistResearchRadius;
- delete *fHistChi2Cluster_GoodCluster;
- delete *fHistChi2Cluster_BadCluster;
+ delete fMuonTrackReco;
+ delete fCurrentTrack;
+ delete fFinalBestCandidate;
- delete *fHistGlobalChi2AtPlaneFor_GOOD_CandidatesOfTrackableMuons;
- delete *fHistGlobalChi2AtPlaneFor_BAD_CandidatesOfTrackableMuons;
+ delete fCandidateTracks;
- for (Int_t i=0; i<4; i++) delete *fGrMFTPlane[i];
- delete *fCircleExt;
- delete *fCircleInt;
+ delete fTrackStore;
+ delete fTrackRefStore;
+
+ delete fNextTrack;
+
+ delete fStack;
+
+ delete fMFT;
+ delete fSegmentation;
- delete *fTxtTrackChi2;
+ delete fOutputTreeFile;
+ delete fOutputQAFile;
+ delete fOutputEventTree;
- delete fNClustersGlobalTrack;
- delete fNDFGlobalTrack;
+ delete fMuonForwardTracks;
- delete fIsGoodClusterInPlane;
+ delete fGRPData;
+ delete fRunInfo;
}
Char_t gAliceName[300];
Char_t clusterName[300];
- sprintf(geoFileName , "%s/geometry.root", fReadDir.Data());
- sprintf(esdFileName , "%s/AliESDs.root" , fReadDir.Data());
- sprintf(gAliceName , "%s/galice.root" , fReadDir.Data());
- sprintf(clusterName , "%s/MFT.RecPoints.root", fReadDir.Data());
+ snprintf(geoFileName , 300, "%s/geometry.root", fReadDir.Data());
+ snprintf(esdFileName , 300, "%s/AliESDs.root" , fReadDir.Data());
+ snprintf(gAliceName , 300, "%s/galice.root" , fReadDir.Data());
+ snprintf(clusterName , 300, "%s/MFT.RecPoints.root", fReadDir.Data());
// Import TGeo geometry (needed by AliMUONTrackExtrap::ExtrapToVertex)
if (!gGeoManager) {
SetNFinalCandidatesCut(10);
SetRAbsorberCut(26.4);
SetLowPtCut(0.5);
- SetExtrapOriginTransvError(1.0);
}
AliInfo(Form(" **** analyzing event # %d \n", fEv));
fTrackStore = fMuonRecoCheck->ReconstructedTracks(fEv);
+ if (fTrackStore->IsEmpty()) return kFALSE;
fTrackRefStore = fMuonRecoCheck->ReconstructibleTracks(fEv);
fRunLoader->GetEvent(fEv);
fRunLoader -> LoadKinematics();
fStack = fRunLoader->Stack();
fNextTrack = fTrackStore->CreateIterator();
- fMuonForwardTracks->Clear();
+ fMuonForwardTracks->Delete();
fEv++;
fCountRealTracksAnalyzed++;
- fCandidateTracks -> Clear();
+ fCandidateTracks -> Delete();
fLabelMC = -1;
fDistanceFromGoodClusterAndTrackAtLastPlane = -1.;
// ------------------------------------- ...done!
- if (fMuonTrackReco->GetMCLabel()>=0) fCountRealTracksWithRefMC++;
-
fLabelMC = fMuonTrackReco->GetMCLabel();
+ Int_t motherPdg=0;
+ if (fLabelMC>=0) {
+ fCountRealTracksWithRefMC++;
+ if (fStack->Particle(fLabelMC)->GetFirstMother() != -1) {
+ motherPdg = fStack->Particle(fStack->Particle(fLabelMC)->GetFirstMother())->GetPdgCode();
+ }
+ }
+
CheckCurrentMuonTrackable();
if (fMuonTrackReco->GetMatchTrigger()) fCountRealTracksWithRefMC_andTrigger++;
// 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));
+ track -> SetMUONTrack(new AliMUONTrack(*fMuonTrackReco));
+ if (fLabelMC>=0 && fStack->Particle(fLabelMC)) track->SetMCTrackRef(new TParticle(*(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) {
AliMuonForwardTrack *newTrack = (AliMuonForwardTrack*) fCandidateTracks->UncheckedAt(0);
new ((*fMuonForwardTracks)[fMuonForwardTracks->GetEntries()]) AliMuonForwardTrack(*newTrack);
AliDebug(1, "...track added!\n");
- fCandidateTracks->Clear();
+ fCandidateTracks->Delete();
fCountRealTracksAnalyzedOfEvent++;
fCountRealTracksAnalyzedWithFinalCandidates++;
PrintParticleHistory();
Double_t(fEv),
Double_t(fCountRealTracksAnalyzedOfEvent),
Double_t(nFinalTracks),
+ Double_t(fLabelMC>=0),
+ xVtx, yVtx, zVtx,
+ motherPdg,
+ Double_t(fMuonTrackReco->GetMatchTrigger()),
Double_t(nClustersMC),
Double_t(nGoodClusters),
- ptSpectrometer,
- thetaSpectrometer,
- etaSpectrometer,
+ pt, theta, eta,
chi2AtPlane[0],
chi2AtPlane[1],
chi2AtPlane[2],
FillPlanesWithTrackHistory();
AliMuonForwardTrack *newTrack = (AliMuonForwardTrack*) fCandidateTracks->UncheckedAt(idBestCandidate);
newTrack -> SetNWrongClustersMC(newTrack->GetNMFTClusters() - nGoodClustersBestCandidate);
+ newTrack -> SetTrackMCId(fRun*100000+fEv*1000+fCountRealTracksAnalyzedOfEvent);
new ((*fMuonForwardTracks)[fMuonForwardTracks->GetEntries()]) AliMuonForwardTrack(*newTrack);
}
Double_t(fEv),
Double_t(fCountRealTracksAnalyzedOfEvent),
Double_t(nFinalTracks),
+ Double_t(fLabelMC>=0),
+ xVtx, yVtx, zVtx,
+ motherPdg,
+ 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();
+ fCandidateTracks->Delete();
fFinalBestCandidate = NULL;
fCountRealTracksAnalyzedOfEvent++;
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);
+ if (fBransonCorrection) {
+ AliMUONTrackExtrap::ExtrapToVertex(¤tParamFront, xExtrap, yExtrap, zExtrap, fVertexErrorX, fVertexErrorY);
+ AliMUONTrackExtrap::ExtrapToVertex(¤tParamBack, xExtrap, yExtrap, zExtrap, fVertexErrorX, fVertexErrorY);
+ }
+ else {
+ AliMUONTrackExtrap::ExtrapToVertexWithoutBranson(¤tParamFront, zExtrap);
+ AliMUONTrackExtrap::ExtrapToVertexWithoutBranson(¤tParamBack, zExtrap);
+ }
+ 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())));
Double_t researchRadiusFront = TMath::Sqrt(squaredError_X_Front + squaredError_Y_Front);
Double_t researchRadiusBack = TMath::Sqrt(squaredError_X_Back + squaredError_Y_Back);
- if (planeId==fNPlanesMFT-1 && 0.5*(researchRadiusFront+researchRadiusBack)<fMinResearchRadiusAtLastPlane) {
- corrFact = fMinResearchRadiusAtLastPlane/(0.5*(researchRadiusFront+researchRadiusBack));
+ if (0.5*(researchRadiusFront+researchRadiusBack)<fMinResearchRadiusAtPlane[planeId]) {
+ corrFact = fMinResearchRadiusAtPlane[planeId]/(0.5*(researchRadiusFront+researchRadiusBack));
}
if (fIsCurrentMuonTrackable) {
// fOutputQAFile->cd();
AliDebug(3, Form("accepting cluster: chi2=%f (cut = %f)\n", chi2, chi2cut));
AliMuonForwardTrack *newTrack = new ((*fCandidateTracks)[fCandidateTracks->GetEntriesFast()]) AliMuonForwardTrack(*fCurrentTrack);
newTrack->AddTrackParamAtMFTCluster(currentParamFront, *cluster); // creating new track param and attaching the cluster
- AliDebug(1, Form("After plane %02d: newTrack->GetNMFTClusters() = %d (fCurrentTrack->GetNMFTClusters() = %d)",
+ AliDebug(2, Form("After plane %02d: newTrack->GetNMFTClusters() = %d (fCurrentTrack->GetNMFTClusters() = %d)",
planeId, newTrack->GetNMFTClusters(), fCurrentTrack->GetNMFTClusters()));
newTrack->SetPlaneExists(planeId);
AliDebug(2, Form("current muon is trackable: %d\n", fIsCurrentMuonTrackable));
AliDebug(3,Form("accepting cluster: chi2=%f (cut = %f)\n", chi2, chi2cut));
AliMuonForwardTrack *newTrack = new ((*fCandidateTracks)[fCandidateTracks->GetEntriesFast()]) AliMuonForwardTrack(*fCurrentTrack);
newTrack->AddTrackParamAtMFTCluster(currentParamBack, *cluster); // creating new track param and attaching the cluster
- AliDebug(1, Form("After plane %02d: newTrack->GetNMFTClusters() = %d (fCurrentTrack->GetNMFTClusters() = %d)",
+ AliDebug(2, Form("After plane %02d: newTrack->GetNMFTClusters() = %d (fCurrentTrack->GetNMFTClusters() = %d)",
planeId, newTrack->GetNMFTClusters(), fCurrentTrack->GetNMFTClusters()));
newTrack->SetPlaneExists(planeId);
AliDebug(2, Form("current muon is trackable: %d\n", fIsCurrentMuonTrackable));
void AliMuonForwardTrackFinder::SeparateFrontBackClusters() {
for (Int_t iPlane=0; iPlane<fNPlanesMFT; iPlane++) {
- fMFTClusterArrayFront[iPlane]->Clear();
- fMFTClusterArrayBack[iPlane] ->Clear();
+ fMFTClusterArrayFront[iPlane]->Delete();
+ fMFTClusterArrayBack[iPlane] ->Delete();
for (Int_t iCluster=0; iCluster<fMFTClusterArray[iPlane]->GetEntries(); iCluster++) {
AliMFTCluster *cluster = (AliMFTCluster*) fMFTClusterArray[iPlane]->At(iCluster);
if (TMath::Abs(cluster->GetZ())<TMath::Abs(fSegmentation->GetPlane(iPlane)->GetZCenter())) {
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:motherPdg: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:motherPdg: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}");
TParticle *part = 0;
if (fLabelMC>=0) part = fStack->Particle(fLabelMC);
- AliDebug(1, Form("fStack->Particle(fLabelMC) = %p", part));
+ AliDebug(1, Form("fStack->Particle(%d) = %p", fLabelMC, part));
+ AliDebug(1, Form("fStack->Particle(%d)->GetPdgCode() = %d", fLabelMC, part->GetPdgCode()));
if (part) {
if (part->GetFirstMother() != -1) {
TParticle *partMother = fStack->Particle(part->GetFirstMother());
- AliDebug(1, Form("fStack->Particle(part->GetFirstMother() = %p", partMother));
+ AliDebug(1, Form("fStack->Particle(%d) = %p", part->GetFirstMother(), partMother));
if (partMother) {
Char_t newName[100];
if (partMother->GetFirstMother() != -1) history += "... #rightarrow ";
}
}
Char_t newName[100];
+ AliDebug(1, Form("fStack->Particle(%d)->GetPdgCode() = %d", fLabelMC, part->GetPdgCode()));
+ AliDebug(1, Form("fStack->Particle(%d)->GetName() = %s", fLabelMC, part->GetName()));
PDGNameConverter(part->GetName(), newName);
history += Form("%s at z = %5.1f cm", newName, part->Vz());
// printf("%s", history.Data());
//===========================================================================================================================================
-Bool_t AliMuonForwardTrackFinder::IsMother(Char_t *nameMother) {
+Bool_t AliMuonForwardTrackFinder::IsMother(const Char_t *nameMother) {
Bool_t result = kFALSE;
fOutputQAFile = new TFile(Form("MuonGlobalTracking.QA.run%d.root", fRun), "recreate");
fOutputQAFile -> cd();
- fHistPtSpectrometer -> Write();
- fHistPtMuonTrackWithGoodMatch -> Write();
- fHistPtMuonTrackWithBadMatch -> Write();
fHistRadiusEndOfAbsorber -> Write();
fHistNGoodClustersForFinalTracks -> Write();
void AliMuonForwardTrackFinder::PDGNameConverter(const Char_t *nameIn, Char_t *nameOut) {
- if (!strcmp(nameIn, "mu+")) sprintf(nameOut, "#mu^{+}");
- else if (!strcmp(nameIn, "mu-")) sprintf(nameOut, "#mu^{-}");
- else if (!strcmp(nameIn, "pi+")) sprintf(nameOut, "#pi^{+}");
- else if (!strcmp(nameIn, "pi-")) sprintf(nameOut, "#pi^{-}");
- else if (!strcmp(nameIn, "K+")) sprintf(nameOut, "K^{+}");
- else if (!strcmp(nameIn, "K-")) sprintf(nameOut, "K^{-}");
- else if (!strcmp(nameIn, "K*+")) sprintf(nameOut, "K^{*+}");
- else if (!strcmp(nameIn, "K*-")) sprintf(nameOut, "K^{*-}");
- else if (!strcmp(nameIn, "K_S0")) sprintf(nameOut, "K_{S}^{0}");
- else if (!strcmp(nameIn, "K_L0")) sprintf(nameOut, "K_{L}^{0}");
- else if (!strcmp(nameIn, "K0")) sprintf(nameOut, "K^{0}");
- else if (!strcmp(nameIn, "K0_bar")) sprintf(nameOut, "#bar{K}^{0}");
- else if (!strcmp(nameIn, "K*0")) sprintf(nameOut, "K^{*0}");
- else if (!strcmp(nameIn, "K*0_bar")) sprintf(nameOut, "#bar{K}^{*0}");
- else if (!strcmp(nameIn, "rho0")) sprintf(nameOut, "#rho^{0}");
- else if (!strcmp(nameIn, "rho+")) sprintf(nameOut, "#rho^{+}");
- else if (!strcmp(nameIn, "rho-")) sprintf(nameOut, "#rho^{-}");
- else if (!strcmp(nameIn, "omega")) sprintf(nameOut, "#omega");
- else if (!strcmp(nameIn, "eta'")) sprintf(nameOut, "#eta'");
- else if (!strcmp(nameIn, "phi")) sprintf(nameOut, "#phi");
-
- else if (!strcmp(nameIn, "D-")) sprintf(nameOut, "D^{-}");
- else if (!strcmp(nameIn, "D+")) sprintf(nameOut, "D^{+}");
- else if (!strcmp(nameIn, "D0")) sprintf(nameOut, "D^{0}");
- else if (!strcmp(nameIn, "D0_bar")) sprintf(nameOut, "#bar{D}^{0}");
- else if (!strcmp(nameIn, "D*-")) sprintf(nameOut, "D^{*-}");
- else if (!strcmp(nameIn, "D*+")) sprintf(nameOut, "D^{*+}");
- else if (!strcmp(nameIn, "D_s+")) sprintf(nameOut, "D_{s}^{+}");
- else if (!strcmp(nameIn, "D*_s+")) sprintf(nameOut, "D_{s}^{*+}");
-
- else if (!strcmp(nameIn, "B-")) sprintf(nameOut, "B^{-}");
- else if (!strcmp(nameIn, "B+")) sprintf(nameOut, "B^{+}");
- else if (!strcmp(nameIn, "B_s0_bar")) sprintf(nameOut, "#bar{B}_{s}^{0}");
-
- else if (!strcmp(nameIn, "antiproton")) sprintf(nameOut, "#bar{p}");
- else if (!strcmp(nameIn, "proton")) sprintf(nameOut, "p");
- else if (!strcmp(nameIn, "neutron")) sprintf(nameOut, "n");
- else if (!strcmp(nameIn, "Sigma+")) sprintf(nameOut, "#Sigma^{+}");
- else if (!strcmp(nameIn, "Delta+")) sprintf(nameOut, "#Delta{+}");
- else if (!strcmp(nameIn, "Delta--")) sprintf(nameOut, "#Delta{--}");
- else if (!strcmp(nameIn, "Lambda0")) sprintf(nameOut, "#Lambda_0");
- else if (!strcmp(nameIn, "Lambda0_bar")) sprintf(nameOut, "#bar{Lambda}_0");
-
- else sprintf(nameOut, "%s", nameIn);
+ if (!strcmp(nameIn, "mu+")) snprintf(nameOut, 50, "#mu^{+}");
+ else if (!strcmp(nameIn, "mu-")) snprintf(nameOut, 50, "#mu^{-}");
+ else if (!strcmp(nameIn, "pi+")) snprintf(nameOut, 50, "#pi^{+}");
+ else if (!strcmp(nameIn, "pi-")) snprintf(nameOut, 50, "#pi^{-}");
+ else if (!strcmp(nameIn, "K+")) snprintf(nameOut, 50, "K^{+}");
+ else if (!strcmp(nameIn, "K-")) snprintf(nameOut, 50, "K^{-}");
+ else if (!strcmp(nameIn, "K*+")) snprintf(nameOut, 50, "K^{*+}");
+ else if (!strcmp(nameIn, "K*-")) snprintf(nameOut, 50, "K^{*-}");
+ else if (!strcmp(nameIn, "K_S0")) snprintf(nameOut, 50, "K_{S}^{0}");
+ else if (!strcmp(nameIn, "K_L0")) snprintf(nameOut, 50, "K_{L}^{0}");
+ else if (!strcmp(nameIn, "K0")) snprintf(nameOut, 50, "K^{0}");
+ else if (!strcmp(nameIn, "K0_bar")) snprintf(nameOut, 50, "#bar{K}^{0}");
+ else if (!strcmp(nameIn, "K*0")) snprintf(nameOut, 50, "K^{*0}");
+ else if (!strcmp(nameIn, "K*0_bar")) snprintf(nameOut, 50, "#bar{K}^{*0}");
+ else if (!strcmp(nameIn, "rho0")) snprintf(nameOut, 50, "#rho^{0}");
+ else if (!strcmp(nameIn, "rho+")) snprintf(nameOut, 50, "#rho^{+}");
+ else if (!strcmp(nameIn, "rho-")) snprintf(nameOut, 50, "#rho^{-}");
+ else if (!strcmp(nameIn, "omega")) snprintf(nameOut, 50, "#omega");
+ else if (!strcmp(nameIn, "eta'")) snprintf(nameOut, 50, "#eta'");
+ else if (!strcmp(nameIn, "phi")) snprintf(nameOut, 50, "#phi");
+
+ else if (!strcmp(nameIn, "D-")) snprintf(nameOut, 50, "D^{-}");
+ else if (!strcmp(nameIn, "D+")) snprintf(nameOut, 50, "D^{+}");
+ else if (!strcmp(nameIn, "D0")) snprintf(nameOut, 50, "D^{0}");
+ else if (!strcmp(nameIn, "D0_bar")) snprintf(nameOut, 50, "#bar{D}^{0}");
+ else if (!strcmp(nameIn, "D*-")) snprintf(nameOut, 50, "D^{*-}");
+ else if (!strcmp(nameIn, "D*+")) snprintf(nameOut, 50, "D^{*+}");
+ else if (!strcmp(nameIn, "D_s+")) snprintf(nameOut, 50, "D_{s}^{+}");
+ else if (!strcmp(nameIn, "D*_s+")) snprintf(nameOut, 50, "D_{s}^{*+}");
+
+ else if (!strcmp(nameIn, "B-")) snprintf(nameOut, 50, "B^{-}");
+ else if (!strcmp(nameIn, "B+")) snprintf(nameOut, 50, "B^{+}");
+ else if (!strcmp(nameIn, "B_s0_bar")) snprintf(nameOut, 50, "#bar{B}_{s}^{0}");
+
+ else if (!strcmp(nameIn, "antiproton")) snprintf(nameOut, 50, "#bar{p}");
+ else if (!strcmp(nameIn, "proton")) snprintf(nameOut, 50, "p");
+ else if (!strcmp(nameIn, "neutron")) snprintf(nameOut, 50, "n");
+ else if (!strcmp(nameIn, "Sigma+")) snprintf(nameOut, 50, "#Sigma^{+}");
+ else if (!strcmp(nameIn, "Delta+")) snprintf(nameOut, 50, "#Delta{+}");
+ else if (!strcmp(nameIn, "Delta--")) snprintf(nameOut, 50, "#Delta{--}");
+ else if (!strcmp(nameIn, "Lambda0")) snprintf(nameOut, 50, "#Lambda_0");
+ else if (!strcmp(nameIn, "Lambda0_bar")) snprintf(nameOut, 50, "#bar{Lambda}_0");
+
+ else snprintf(nameOut, 50, "%s", nameIn);
}