R3BROOT
R3B analysis software
Loading...
Searching...
No Matches
R3BNeulandMappingPar.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// -------------------------------------------------------------
15// ----- R3BTofDMappingPar source file -----
16// ----- Created 18/03/22 by J.L. Rodriguez-Sanchez -----
17// -------------------------------------------------------------
18
19#ifndef R3BNeulandMappingPar_H
20#define R3BNeulandMappingPar_H 1
21
22#include "FairParGenericSet.h"
23
24#include "TArrayI.h"
25#include "TObjArray.h"
26#include <Rtypes.h>
27#include <stdint.h>
28#include <vector>
29
30class FairParamList;
31
32class R3BNeulandMappingPar : public FairParGenericSet
33{
34 public:
36 R3BNeulandMappingPar(const TString& name = "neulandMappingPar",
37 const TString& title = "Neuland Mapping parameters",
38 const TString& context = "neulandMappingContext");
39
41 virtual ~R3BNeulandMappingPar();
42
44 virtual void clear();
45
47 virtual void putParams(FairParamList* list);
48
50 Bool_t getParams(FairParamList* list);
51
53 virtual void print();
54 void printParams();
55
57 const Int_t GetNbPlanes() { return fNumPlanes; }
58 const Int_t GetNbPaddles() { return fNumPaddles; }
59 // GetTrigMap in 1-base for plane(1-4), paddle(1-44) and pmt(1-2)
60 const Int_t GetTrigMap(UInt_t plane, UInt_t paddle, UInt_t pmt)
61 {
62 return fTrigmap[pmt - 1][plane - 1]->GetAt(paddle - 1);
63 }
64
65 void SetNbPlanes(Int_t p) { fNumPlanes = p; }
66 void SetNbPaddles(Int_t p) { fNumPaddles = p; }
67 // SetTrigMap in 1-base for plane(1-4), paddle(1-44) and pmt(1-2)
68 void SetTrigMap(Int_t value, UInt_t plane, UInt_t paddle, UInt_t pmt)
69 {
70 fTrigmap[pmt - 1][plane - 1]->AddAt(value, paddle - 1);
71 }
72
73 private:
74 Int_t fNumPlanes;
75 Int_t fNumPaddles;
76 Int_t fNumPmts;
77 std::vector<TArrayI*> fTrigmap[2]; // Two PMTs per paddle
78
79 const R3BNeulandMappingPar& operator=(const R3BNeulandMappingPar&);
81
82 ClassDef(R3BNeulandMappingPar, 1);
83};
84
85#endif /* R3BNeulandMappingPar_H */
virtual ~R3BNeulandMappingPar()
Destructor.
virtual void putParams(FairParamList *list)
Store all parameters using FairRuntimeDB.
Bool_t getParams(FairParamList *list)
Retrieve all parameters using FairRuntimeDB.
virtual void print()
Print values of parameters to the standard output.
virtual void clear()
Reset all parameters.
void SetTrigMap(Int_t value, UInt_t plane, UInt_t paddle, UInt_t pmt)
const Int_t GetTrigMap(UInt_t plane, UInt_t paddle, UInt_t pmt)
const Int_t GetNbPlanes()
Accessor functions.
R3BNeulandMappingPar(const TString &name="neulandMappingPar", const TString &title="Neuland Mapping parameters", const TString &context="neulandMappingContext")
Standard constructor.