PandaRoot
PndFTSTopoPerformance.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 //-*- Mode: C++ -*-
14 // ************************************************************************
15 // This file is property of and copyright by the ALICE HLT Project *
16 // ALICE Experiment at CERN, All rights reserved. *
17 // See cxx source for full Copyright notice *
18 // *
19 //*************************************************************************
20 #ifdef DO_TPCCATRACKER_EFF_PERFORMANCE
21 
22 #ifndef PNDFTSTOPOPERFORMANCE_H
23 #define PNDFTSTOPOPERFORMANCE_H
24 
26 
27 #include "PndFTSCADef.h"
28 #include "PndFTSArray.h"
29 
30 #include "PndFTSCAMCTrack.h"
31 #include "PndFTSCAMCPoint.h"
32 #include "PndFTSCAMCVertex.h"
33 #include <fstream>
34 #include <cstdio>
35 #include <map>
36 
37 #include "KFPartMatch.h"
38 #include "KFMCParticle.h"
39 
40 class TObject;
41 class TParticle;
42 class PndFTSCAMCPoint;
43 class PndFTSCAGBTracker;
45 class TDirectory;
46 class TH1D;
47 class TH2D;
48 class TProfile;
49 
50 class TFile;
51 class PndFTSCATracker;
52 
56 class PndFTSTopoPerformance : public PndFTSParticlePerformanceBase {
57  public:
58  PndFTSTopoPerformance();
59  virtual ~PndFTSTopoPerformance(){};
60 
61  virtual void SetNewEvent(const PndFTSCAGBTracker *const Tracker, PndFTSResizableArray<PndFTSCAHitLabel> *hitLabels, PndFTSResizableArray<PndFTSCAMCTrack> *mcTracks,
63 
64  void SetNewEvent2(const PndFTSTopoReconstructor *const TopoReconstructor); // use together with SetNewEvent !!!
65 
67  // Check if MC track is reconstructable. Calculate set of MC track. Etc.
68  virtual void CheckMCTracks(); // fill mcData.
69  // Find reco-MCTracks correspondence
70  virtual void MatchTracks(); // fill recoData.
71  // Calculate efficiencies
72  virtual void EfficiencyPerformance(){}; // current don't use eff
73 
74  virtual void PrintEfficiencyStatistic(){}; // current don't use eff
75  virtual void PrintEfficiency(){};
76 
78  // virtual void CreateHistos(string histoDir);
79  virtual void FillHistos();
80 
81  private:
82  void GetMCParticles();
83  void MatchParticles();
84  void CalculateEfficiency();
85  void FindReconstructableMCParticles();
86  void CheckMCParticleIsReconstructable(KFMCParticle &part);
87 
88  const PndFTSTopoReconstructor *fTopoReconstructor;
89 
90  vector<PndFTSCAMCVertex> fPrimVertices; // primary vertex positions (currently only one vertex is implemented)
91 
92  vector<KFMCParticle> vMCParticles; // MC particles
93 
94  vector<KFPartMatch> MCtoRParticleId; // array for match MC and reco particles
95  vector<KFPartMatch> RtoMCParticleId;
96 
97  // defines the mode of an efficiency calculation
98  // 1 - efficiency is normalized on the all MCParticles
99  // 2 - efficiency is normalized on the MCParticles, which has all daughters reconstructable
100  // 3 - efficiency is normalized on the MCParticles, which has all daughters reconstructed by the track finder
101  const int fFindParticlesMode;
102 };
103 
104 #endif
105 #endif // DO_TPCCATRACKER_EFF_PERFORMANCE