// File for histograms and histogram booking
TFile *histoFile = new TFile("DiFakes.root", "RECREATE");
- TH1F *hMass = new TH1F("hMass", "Muon mass distribution (GeV/c^{2})", 100, 0., 12.);
+ TH1F *hMass = new TH1F("hMass", "Dimuon mass distribution (GeV/c^{2})", 100, 0., 12.);
TH1F *hMassM = new TH1F("hMassM", "matched track mass distribution (GeV/c^{2})", 100, 0., 12.);
TH1F *hMassF = new TH1F("hMassF", "fake track mass distribution (GeV/c^{2})", 100, 0., 12.);
- TH1F *hP = new TH1F("hP", "Muon P distribution (GeV/c)", 100, 0., 200.);
+ TH1F *hP = new TH1F("hP", "Dimuon P distribution (GeV/c)", 100, 0., 200.);
TH1F *hPM = new TH1F("hPM", "matched track P distribution (GeV/c)", 100, 0., 200.);
TH1F *hPF = new TH1F("hPF", "fake track P distribution (GeV/c)", 100, 0., 200.);
- TH1F *hPt = new TH1F("hPt", "Muon Pt distribution (GeV/c)", 100, 0., 20.);
+ TH1F *hPt = new TH1F("hPt", "Dimuon Pt distribution (GeV/c)", 100, 0., 20.);
TH1F *hPtM = new TH1F("hPtM", "matched track Pt distribution (GeV/c)", 100, 0., 20.);
TH1F *hPtF = new TH1F("hPtF", "fake track Pt distribution (GeV/c)", 100, 0., 20.);
- TH1F *hY = new TH1F("hY"," Muon rapidity distribution",100,-10,0);
+ TH1F *hY = new TH1F("hY"," Dimuon rapidity distribution",100,-10,0);
TH1F *hYM = new TH1F("hYM"," matched track rapidity distribution",100,-10,0);
TH1F *hYF = new TH1F("hYF"," fake track rapidity distribution",100,-10,0);
- TH1F *hEta = new TH1F("hEta"," Muon pseudo-rapidity distribution",100,-10,0);
+ TH1F *hEta = new TH1F("hEta"," Dimuon pseudo-rapidity distribution",100,-10,0);
TH1F *hEtaM = new TH1F("hEtaM"," matched track pseudo-rapidity distribution",100,-10,0);
TH1F *hEtaF = new TH1F("hEtaF"," fake track pseudo-rapidity distribution",100,-10,0);
- TH1F *hPhi = new TH1F("hPhi"," Muon phi distribution",100,-1.,9.);
+ TH1F *hPhi = new TH1F("hPhi"," Dimuon phi distribution",100,-1.,9.);
TH1F *hPhiM = new TH1F("hPhiM"," matched track phi distribution",100,-1.,9.);
TH1F *hPhiF = new TH1F("hPhiF"," fake track phi distribution",100,-1.,9.);
Float_t pt = vDiMu.Pt();
Float_t y = vDiMu.Rapidity();
Float_t eta = vDiMu.Eta();
- Float_t phi = vMu1.Phi();
+ Float_t phi = vDiMu.Phi();
if (phi < 0) phi += 2.*TMath::Pi();
// fill global histograms
#include <TROOT.h>
#include <TClonesArray.h>
#include <TGeoGlobalMagField.h>
+#include <TArrayI.h>
// STEER includes
#include "AliLog.h"
AliMUONRecoCheck rc(esdFileName, SimDir);
// initialize global counters
+ Int_t nReconstructibleTracks = 0;
+ Int_t nReconstructedTracks = 0;
+ Int_t nEventsWithTrackReconstructedYet = 0;
Int_t nEventsWithFake = 0;
Int_t nEventsWithAdditionalFake = 0;
Int_t nTotMatchedTracks = 0;
Int_t nTotTracksReconstructedYet = 0;
Int_t nTotFakeTracks = 0;
+ Int_t nTotConnectedTracks = 0;
Int_t nTotAdditionalTracks = 0;
+ Bool_t trackReconstructedYet;
+ TArrayI eventsWithTrackReconstructedYet(10);
+ TArrayI eventsWithFake(10);
+ TArrayI eventsWithAdditionalFake(10);
// Loop over ESD events
FirstEvent = TMath::Max(0, FirstEvent);
// convert TrackRef to MUON tracks
AliMUONVTrackStore* trackRefStore = rc.TrackRefs(iEvent);
+ // count the number of reconstructible tracks
+ TIter next(trackRefStore->CreateIterator());
+ AliMUONTrack* trackRef;
+ while ( ( trackRef = static_cast<AliMUONTrack*>(next()) ) ) {
+ if (IsRecontructible(*trackRef,*recoParam)) nReconstructibleTracks++;
+ }
+
// loop over ESD tracks
Int_t nTrackerTracks = 0;
+ trackReconstructedYet = kFALSE;
AliMUONVTrackStore *fakeTrackStore = AliMUONESDInterface::NewTrackStore();
Int_t nTracks = (Int_t)esd->GetNumberOfMuonTracks() ;
for (Int_t iTrack = 0; iTrack < nTracks; iTrack++) {
// global counter
nTotMatchedTracks++;
- if (!IsRecontructible(*matchedTrackRef,*recoParam)) nTotTracksReconstructedYet++;
+ if (!IsRecontructible(*matchedTrackRef,*recoParam)) {
+ trackReconstructedYet = kTRUE;
+ nTotTracksReconstructedYet++;
+ }
// fill histograms
hFractionOfMatchedClusters->Fill(fractionOfMatchCluster);
// fill histograms
hNumberOfTracks->Fill(nTrackerTracks);
+ nReconstructedTracks += nTrackerTracks;
+ if (trackReconstructedYet) eventsWithTrackReconstructedYet[nEventsWithTrackReconstructedYet++] = iEvent;
// count the number the additional fake tracks
if (fakeTrackStore->GetSize() > 0) {
Int_t nAdditionalTracks = fakeTrackStore->GetSize() - nFreeMissingTracks;
// fill histograms
+ eventsWithFake[nEventsWithFake] = iEvent;
nEventsWithFake++;
if (nAdditionalTracks > 0) {
+ eventsWithAdditionalFake[nEventsWithAdditionalFake] = iEvent;
nEventsWithAdditionalFake++;
nTotAdditionalTracks += nAdditionalTracks;
hNumberOfAdditionalTracks->Fill(nAdditionalTracks);
delete fakeTrackStore;
} // end of loop over events
+
+ // total number of connected tracks
+ nTotConnectedTracks = hFractionOfConnectedClusters->GetEntries();
// plot results
TCanvas cFakesSummary("cFakesSummary","cFakesSummary",900,600);
// print results
cout << endl;
+ cout << "- Number of reconstructible tracks: " << nReconstructibleTracks << endl;
+ cout << "- Number of reconstructed tracks: " << nReconstructedTracks << endl;
cout << "- Number of matched tracks: " << nTotMatchedTracks << endl;
- cout << " (including " << nTotTracksReconstructedYet << " tracks matched with a TrackRef that is not reconstructible)" << endl;
+ cout << " (including " << nTotTracksReconstructedYet << " track(s) matched with a TrackRef that is not reconstructible";
+ if (nTotTracksReconstructedYet > 0) {
+ for(Int_t i=0; i<nEventsWithTrackReconstructedYet; i++){
+ if (i==0) cout << " (eventID = " << eventsWithTrackReconstructedYet[i];
+ else cout << ", " << eventsWithTrackReconstructedYet[i];
+ }
+ cout << "))" << endl;
+ } else cout << ")" << endl;
cout << "- Number of fake tracks: " << nTotFakeTracks << endl;
- cout << " (including " << nTotAdditionalTracks << " additional tracks (compared to the number of expected ones))" << endl;
- cout << "- Number of events with fake track(s): " << nEventsWithFake << endl;
- cout << " (including " << nEventsWithAdditionalFake << " events with additional tracks)" << endl;
+ cout << " (including " << nTotConnectedTracks << " track(s) still connected to a reconstructible one)" << endl;
+ cout << " (including " << nTotAdditionalTracks << " additional track(s) (compared to the number of expected ones))" << endl;
+ cout << "- Number of events with fake track(s): " << nEventsWithFake;
+ if (nEventsWithFake > 0) {
+ for(Int_t i=0; i<nEventsWithFake; i++){
+ if (i==0) cout << " (eventID = " << eventsWithFake[i];
+ else cout << ", " << eventsWithFake[i];
+ }
+ cout << ")" << endl;
+ } else cout << endl;
+ cout << " (including " << nEventsWithAdditionalFake << " events with additional track(s)";
+ if (nEventsWithAdditionalFake > 0) {
+ for(Int_t i=0; i<nEventsWithAdditionalFake; i++){
+ if (i==0) cout << " (eventID = " << eventsWithAdditionalFake[i];
+ else cout << ", " << eventsWithAdditionalFake[i];
+ }
+ cout << "))" << endl;
+ } else cout << ")" << endl;
cout << endl;
cout << "REMINDER: results are relevent provided that you use the same recoParams as for the reconstruction" << endl;
cout << endl;