R3BROOT
R3B analysis software
Loading...
Searching...
No Matches
R3BNeulandCal2Hit.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 R3BNEULANDCAL2HIT_H
15#define R3BNEULANDCAL2HIT_H
16
17#include "FairTask.h"
18#include "R3BNeulandCalData.h"
19#include "R3BNeulandHit.h"
21#include "TCAConnector.h"
22#include <map>
23#include <vector>
24
26class R3BEventHeader;
27
28class R3BNeulandCal2Hit : public FairTask
29{
30 public:
31 R3BNeulandCal2Hit(const char* name = "R3BNeulandCal2Hit", const Int_t iVerbose = 0);
32 ~R3BNeulandCal2Hit() override = default;
33
34 InitStatus Init() override;
35 InitStatus ReInit() override;
36 void SetParContainers() override;
37 void Exec(Option_t*) override;
38 void FinishTask() override;
39
40 inline void SetFirstPlaneHorizontal() { fFirstPlaneHorizontal = kTRUE; }
41
42 // Distance to target in cm
43 inline void SetDistanceToTarget(Double_t d) { fDistanceToTarget = d; }
44
45 // Global time offset in ns
46 inline void SetGlobalTimeOffset(Double_t t0) { fGlobalTimeOffset = t0; }
47
48 // Energy cutoff in MeV
49 inline void SetEnergyCutoff(Double_t enecut) { fEnergyCutoff = enecut; }
50
51 // Walk correction
52 inline void EnableWalk(Bool_t walk = kFALSE) { fWalkEnabled = walk; }
53
54 private:
55 void SetParameter();
56 Double_t GetUnsaturatedEnergy(const Int_t qdc, const Double_t gain, const Double_t saturation) const;
57
58 R3BEventHeader* fEventHeader;
59
62
63 R3BNeulandHitPar* fPar;
64
65 Bool_t fFirstPlaneHorizontal;
66 Int_t fNumberOfPlanes;
67 Double_t fDistanceToTarget;
68 std::vector<Double_t> fDistancesToFirstPlane;
69 std::vector<Double_t> fAttenuationValues;
70 Double_t fGlobalTimeOffset;
71 Double_t fEnergyCutoff;
72
73 Bool_t fWalkEnabled;
74 Double_t WalkCorrection(Double_t);
75
76 std::map<Int_t, R3BNeulandHitModulePar> fParMap;
77
78 std::map<Int_t, R3BNeulandCalData*> fHitMap;
79
80 UInt_t fEventNumber = 0;
81
82 public:
83 ClassDefOverride(R3BNeulandCal2Hit, 0)
84};
85
86#endif
Double_t walk(Double_t x)
InitStatus Init() override
void EnableWalk(Bool_t walk=kFALSE)
R3BNeulandCal2Hit(const char *name="R3BNeulandCal2Hit", const Int_t iVerbose=0)
void SetParContainers() override
InitStatus ReInit() override
void FinishTask() override
~R3BNeulandCal2Hit() override=default
void SetDistanceToTarget(Double_t d)
void SetEnergyCutoff(Double_t enecut)
void SetGlobalTimeOffset(Double_t t0)
void Exec(Option_t *) override