CbmRoot
Loading...
Searching...
No Matches
CbmSeedFinderQa.h
Go to the documentation of this file.
1/* Copyright (C) 2007-2022 Facility for Antiproton and Ion Research in Europe, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Dominik Smith [committer] */
4
17#ifndef CbmSeedFinderQa_h
18#define CbmSeedFinderQa_h
19
20#include "CbmMatch.h"
21
22#include <TFolder.h>
23
24#include <cstdint>
25#include <iostream>
26#include <vector>
27
28class TH1F;
29class TH2I;
30class CbmMCEventList;
31class CbmQaCanvas;
32
34 public:
41
44
46 std::vector<CbmMatch> fvEventMatches;
48 std::vector<uint32_t> fvLinkedMCEventsCount;
50 std::vector<double> fvSeedTimesFull;
52 std::vector<int32_t> fvFullDigiCount;
54 std::vector<int32_t> fvNoiseDigiCount;
56 std::vector<double> fvCorrectDigiRatio;
58 std::vector<double> fvCorrectDigiRatioNoNoise;
60 std::vector<double> fvFoundDigiRatio;
62 std::vector<double> fvTimeOffset;
63
65 std::vector<CbmMatch> fvEventMatchesPerTs;
67 std::vector<double> fvSeedTimesPerTs;
68
75 void FillQaSeedInfo(const int32_t WinStart, const int32_t WinEnd, const std::vector<CbmMatch>* vDigiMatch,
76 const double seedTime);
77
79 void OutputQa();
80
82 void FillQaMCInfo();
83
85 void ResetPerTsStorage();
86
88 void WriteHistos();
89
91 void Init();
92
93 private:
94 TFolder* histFolder = nullptr;
95 TFolder fOutFolder;
96
101 TH1F* fhCorrectDigiRatio = nullptr;
103 TH1F* fhNoiseDigiRatio = nullptr;
104 TH1F* fhFoundDigiRatio = nullptr;
105 TH2I* fhCorrectVsFound = nullptr;
106 TH2I* fhCorrectVsFoundNoNoise = nullptr;
107 TH1F* fhTimeOffset = nullptr;
108 TH1F* fhTimeOffsetClosest = nullptr;
110 nullptr;
111
113
114 CbmMCEventList* fEventList = nullptr; // to access MC truth
115
117 void FillHistos();
118};
119#endif //CbmSeedFinderQa_h
Container class for MC events with number, file and start time.
void FillQaSeedInfo(const int32_t WinStart, const int32_t WinEnd, const std::vector< CbmMatch > *vDigiMatch, const double seedTime)
Gather QA Information. @params WinStart Starting position of seed window. @params WinStart End positi...
std::vector< double > fvCorrectDigiRatio
Ratio of digis from matched MC event.
std::vector< uint32_t > fvLinkedMCEventsCount
Counts how many MC events contributed to a seed.
void Init()
Initialize communication with FairRootManager (needed for MC events).
TH2I * fhCorrectVsFound
digis found per event
void FillHistos()
Fill output histograms with data from current timeslice.
TH1F * fhFoundDigiRatio
noise digis per event
CbmQaCanvas * fCanv
difference between true event time and seed time for one-to-one matched cases
void WriteHistos()
Finalize histograms and canvases and write to file.
void OutputQa()
Output QA Information.
TH1F * fhTimeOffset
correct digis per event vs found digis per event, disregarding noise
std::vector< double > fvCorrectDigiRatioNoNoise
Ratio of digis from matched MC event (disregarding noise).
TH1F * fhNoiseDigiRatio
correct digis per event, disregarding noise
TFolder fOutFolder
subfolder for histograms
CbmSeedFinderQa()
Create the CbmSeedFinderQa object.
std::vector< double > fvSeedTimesFull
Full vector of all event seeds that is not cleared at the end of a timeslice.
TH1F * fhTimeOffsetClosest
difference between true event time and seed time
TH1F * fhCorrectDigiRatioNoNoise
correct digis per event
std::vector< int32_t > fvNoiseDigiCount
Counts how many noise digis contributed to a seed.
TH1F * fhCorrectDigiRatio
linked MC events per trigger
std::vector< CbmMatch > fvEventMatchesPerTs
Matches that link constructed event seeds to MC events, current timeslice only.
void ResetPerTsStorage()
Reset containers that are persistent for one TS.
std::vector< double > fvTimeOffset
Difference between true event time and seed time.
CbmSeedFinderQa(const CbmSeedFinderQa &)=delete
std::vector< double > fvSeedTimesPerTs
Vector of event seeds, current TS only.
TH1F * fhMatchedTriggersPerMCEvent
linked triggers per MC event
CbmMCEventList * fEventList
summary canvas
std::vector< CbmMatch > fvEventMatches
Matches that link constructed event seeds to MC events.
TH1F * fhTimeOffsetSingletOnly
difference between seed time and closest MC event time
~CbmSeedFinderQa()
Destructor.
std::vector< int32_t > fvFullDigiCount
Counts how many digis contributed to a seed.
TH1F * fhLinkedMCEventsPerTrigger
matchted triggers per MC event
TH1F * fhLinkedTriggersPerMCEvent
output folder with histos and canvases
CbmSeedFinderQa operator=(const CbmSeedFinderQa &)=delete
void FillQaMCInfo()
Fill QA Information that uses the full list of MC events per TS.
std::vector< double > fvFoundDigiRatio
Ratio of digis of matched events that were included in event seed.
TH2I * fhCorrectVsFoundNoNoise
correct digis per event vs found digis per event