-
Notifications
You must be signed in to change notification settings - Fork 121
Expand file tree
/
Copy pathR3BIncomingBeta.h
More file actions
151 lines (129 loc) · 4.57 KB
/
Copy pathR3BIncomingBeta.h
File metadata and controls
151 lines (129 loc) · 4.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
/******************************************************************************
* Copyright (C) 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH *
* Copyright (C) 2019-2025 Members of R3B Collaboration *
* *
* This software is distributed under the terms of the *
* GNU General Public Licence (GPL) version 3, *
* copied verbatim in the file "LICENSE". *
* *
* In applying this license GSI does not waive the privileges and immunities *
* granted to it by virtue of its status as an Intergovernmental Organization *
* or submit itself to any jurisdiction. *
******************************************************************************/
#pragma once
// ROOT header
#include "TMath.h"
#include <TArrayF.h>
#include <array>
#include <vector>
// R3B headers
#include "R3BEventHeader.h"
#include "R3BFrsData.h"
#include "R3BFrsSciPosCalData.h"
#include "R3BMusicHitData.h"
// FAIR headers
#include "FairLogger.h"
#include "FairRootManager.h"
#include "FairRunAna.h"
#include "FairRuntimeDb.h"
#include "FairTask.h"
class R3BIncomingIDPar;
class TClonesArray;
class R3BEventHeader;
class R3BCoarseTimeStitch;
class R3BIncomingBeta : public FairTask
{
public:
/**
* Default constructor.
* Creates an instance of the task with default parameters.
*/
R3BIncomingBeta();
/**
* Standard constructor.
* Creates an instance of the task.
* @param name a name of the task.
* @param iVerbose a verbosity level.
*/
R3BIncomingBeta(const char* name, Int_t iVerbose = 1);
/**
* Destructor.
* Frees the memory used by the object.
*/
virtual ~R3BIncomingBeta();
/**
* Method for task initialization.
* This function is called by the framework before
* the event loop.
* @return Initialization status. kSUCCESS, kERROR or kFATAL.
*/
virtual InitStatus Init();
virtual InitStatus ReInit();
/**
* Method for event loop implementation.
* Is called by the framework every time a new event is read.
* @param option an execution option.
*/
virtual void Exec(Option_t* option);
/**
* A method for finish of processing of an event.
* Is called by the framework for each event after executing
* the tasks.
*/
virtual void FinishEvent();
virtual void SetParContainers();
virtual void Reset();
// Accessor to select online mode
void SetOnline(Bool_t option) { fOnline = option; }
void SetUseTref() { fUseTref = kTRUE; }
void SetUseMultHit() { fUseMultHit = kTRUE; }
void SetNumDets(int val) { fNumDet = val; }
void SetStaId(int val) { fStaId = val; }
void SetStoId(int val) { fStoId = val; } // if id == 0 and bFrsSci = true, then LOS will be used
void SetLosRefCh(int val) { fLosRefCh = val; }
void UseFrsSci(bool val) { fUseFrsSci = val; } // If false, sci2 will be used
void SetLosCalRange(Double_t low, Double_t high)
{
fLosCalTrig_Low = low;
fLosCalTrig_High = high;
} // Only for S118/S091
protected:
R3BEventHeader* fHeader{}; // Event header
private:
void SetParameter();
R3BCoarseTimeStitch* fTimeStitch;
R3BIncomingIDPar* fIncomingID_Par; // Parameter container
TClonesArray* fFrsDataCA; /**< Array with FRS-output data. >*/
TClonesArray* fHitSci2;
TClonesArray* fPosCalFrsSci;
TClonesArray* fHitLos;
TClonesArray* fCalLos;
TClonesArray* fCalLosTrig;
TClonesArray* fTcalSci2; /**< Array with Tcal items. */
int fStaId;
int fStoId;
int fLosRefCh;
Double_t fLosCalTrig_Low, fLosCalTrig_High;
Bool_t fOnline; // Don't store data for online
UInt_t fNumDet;
TArrayF* fToFoffset;
TArrayF *fPosS2Left, *fPosS2Right;
TArrayF *fTof2InvV_p0, *fTof2InvV_p1;
Float_t fBeta_max, fBeta_min;
Bool_t fUseTref;
Bool_t fUseMultHit;
bool fUseFrsSci;
/** Private method FrsData **/
//** Adds a FrsData to the analysis
R3BFrsData* AddData(Int_t StaId,
Int_t StoId,
Double_t z,
Double_t aq,
Double_t betaval,
Double_t brhoval,
Double_t xs2,
Double_t xc,
Double_t tof);
public:
ClassDef(R3BIncomingBeta, 1)
};