Project
Loading...
Searching...
No Matches
CompareTask.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
12#ifndef O2_MCH_EVALUATION_COMPARE_TASK_H__
13#define O2_MCH_EVALUATION_COMPARE_TASK_H__
14
21#include <TFile.h>
22#include <array>
23#include <gsl/span>
24#include <list>
25#include <memory>
26#include <string>
27#include <vector>
28
29class TH1;
30
31namespace o2::mch::eval
32{
34{
35 public:
36 CompareTask(std::shared_ptr<o2::base::GRPGeomRequest> req);
37
38 void finaliseCCDB(o2::framework::ConcreteDataMatcher& matcher, void* obj);
39
41
42 std::list<ExtendedTrack> convert(gsl::span<const TrackMCH> mchTracks,
43 gsl::span<const Cluster> clusters);
44
45 void dump(std::string prefix,
46 const std::list<ExtendedTrack>& tracks1,
47 const std::list<ExtendedTrack>& tracks2);
48
49 std::list<ExtendedTrack> getExtendedTracks(const ROFRecord& rof,
50 gsl::span<const TrackMCH> tfTracks,
51 gsl::span<const Cluster> tfClusters);
52
54
55 private:
56 void pdfOutput();
57 void printStat();
58
59 private:
60 std::shared_ptr<o2::base::GRPGeomRequest> mCcdbRequest;
61 std::unique_ptr<TFile> mOutputRootFile;
62 std::string mOutputPdfFileName;
63 std::array<std::vector<TH1*>, 2> mHistosAtVertex;
64 std::vector<TH1*> mTrackResidualsAtFirstCluster{};
65 std::array<std::vector<TH1*>, 5> mComparisonsAtVertex;
66 std::array<std::vector<TH1*>, 5> mClusterResiduals;
67 std::array<int, 2> mNTracksAll{};
68 std::array<int, 2> mNTracksMatch{};
69 bool mApplyTrackSelection;
70 double mPrecision;
71 bool mPrintDiff;
72 bool mPrintAll;
73 int mNofDifferences;
74};
75} // namespace o2::mch::eval
76
77#endif
Helper for geometry and GRP related CCDB requests.
Definition of the MCH ROFrame record.
Definition of the MCH track.
void finaliseCCDB(o2::framework::ConcreteDataMatcher &matcher, void *obj)
std::list< ExtendedTrack > convert(gsl::span< const TrackMCH > mchTracks, gsl::span< const Cluster > clusters)
std::list< ExtendedTrack > getExtendedTracks(const ROFRecord &rof, gsl::span< const TrackMCH > tfTracks, gsl::span< const Cluster > tfClusters)
void run(o2::framework::ProcessingContext &pc)
void dump(std::string prefix, const std::list< ExtendedTrack > &tracks1, const std::list< ExtendedTrack > &tracks2)
void init(o2::framework::InitContext &ic)
std::vector< Cluster > clusters