R3BROOT
R3B analysis software
Loading...
Searching...
No Matches
R3BDigitizingTacQuila.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (C) 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH *
3 * Copyright (C) 2019-2025 Members of R3B Collaboration *
4 * *
5 * This software is distributed under the terms of the *
6 * GNU General Public Licence (GPL) version 3, *
7 * copied verbatim in the file "LICENSE". *
8 * *
9 * In applying this license GSI does not waive the privileges and immunities *
10 * granted to it by virtue of its status as an Intergovernmental Organization *
11 * or submit itself to any jurisdiction. *
12 ******************************************************************************/
13
14#ifndef NEULAND_DIGITIZING_TACQUILA_H
15#define NEULAND_DIGITIZING_TACQUILA_H
16
18#include "R3BShared.h"
19#include "TRandom3.h"
20#include "Validated.h"
21#include <RtypesCore.h>
22#include <memory>
23#include <vector>
24
26{
27 struct Params
28 {
29 double fPMTThresh; // [MeV]
32 double fTimeRes; // time + Gaus(0., fTimeRes) [ns]
33 double fEResRel; // Gaus(e, fEResRel * e) []
34 double fIntegrationTime; // [ns]
35 std::shared_ptr<TRandom3> fRnd;
36
37 Params();
38 };
39
40 extern const Params TACQUILA_DEFAULT_PARAM;
42 {
43 public:
44 Channel(const Channel&) = delete;
45 Channel(Channel&&) = delete;
46 auto operator=(const Channel&) -> Channel& = delete;
47 auto operator=(Channel&&) -> Channel& = delete;
49 ~Channel() override = default;
50 void add_signal(Signal newHit) override;
51 auto HasFired() -> bool override;
52 auto GetQDC() -> double;
53 auto GetTDC() -> double;
54 auto GetEnergy() -> double;
55
56 private:
57 static constexpr double DEFAULT_LAMBDA = 1. / 2.1;
59 std::vector<Signal> fPMTHits;
64
65 void extra_reset() override;
66
67 // NOTE: Some expensive calculations and random distributions are cached
68 // so they do not need to be recomputed every time a Getter is called
69 void construct_hits(Hits& signals) override;
70
71 auto BuildQDC() -> double;
72 auto BuildTDC() -> double;
73 auto BuildEnergy() -> double;
74 auto FindThresholdExceedingHit() const -> std::vector<Signal>::const_iterator;
75 };
76
77} // namespace R3B::Digitizing::Neuland::TacQuila
78
79#endif // NEULAND_DIGITIZING_TACQUILA_H
Validated< std::vector< Signal >::const_iterator > cachedFirstHitOverThresh
auto operator=(Channel &&) -> Channel &=delete
auto operator=(const Channel &) -> Channel &=delete
auto FindThresholdExceedingHit() const -> std::vector< Signal >::const_iterator