Skip to content

Commit 97677fb

Browse files
committed
Add plastic wall for HYDRA
1 parent 3f9ed9a commit 97677fb

45 files changed

Lines changed: 3533 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.zenodo.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,11 @@
274274
"name": "Xarepe, Manuel",
275275
"orcid": "0000-0003-1966-2234",
276276
"affiliation": "Faculty of Science of the University of Lisbon, 1749-016 Lisboa, Portugal"
277+
},
278+
{
279+
"name": "Duer, Meytal",
280+
"orcid": "0000-0002-4241-1938",
281+
"affiliation": "GSI Helmholtzzentrum für Schwerionenforschung, 64291 Darmstadt, Germany"
277282
}
278283
],
279284
"contributors": [

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Audouin, Laurent [laurent.audouin@ijclab.in2p3.fr] [https://orcid.org/0000-0001-
66
Barriere, Antoine [https://orcid.org/0009-0005-2204-3516] [GANIL, 14000 Caen, France]
77
Bott, Lukas [https://orcid.org/0000-0002-9554-6246] [Goethe University Frankfurt, 60629 Frankfurt am Main, Germany]
88
Chatillon, Audrey [CEA, DAM, DIF, 91297 Arpajon, France]
9+
Duer, Meytal [https://orcid.org/0000-0002-4241-1938] [GSI Helmholtzzentrum für Schwerionenforschung, 64291 Darmstadt, Germany]
910
Feijoo-Fontán, Martina [https://orcid.org/0000-0002-8507-5137] [IGFAE, University of Santiago de Compostela, 15782 Santiago de Compostela, Spain]
1011
García-Jiménez, Gabriel [https://orcid.org/0000-0002-4435-0163] [IGFAE, University of Santiago de Compostela, 15782 Santiago de Compostela, Spain]
1112
Gasparic, Igor [https://orcid.org/0000-0002-5022-3312] [RBI Zagreb, HR10000 Zagreb, Croatia]

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,7 @@ if(NOT MODULE)
576576
add_subdirectory(evtvis)
577577
add_subdirectory(psp)
578578
add_subdirectory(rpc)
579+
add_subdirectory(pw)
579580
add_subdirectory(alpide)
580581
add_subdirectory(mwpc)
581582
add_subdirectory(twim)

codemeta.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,12 @@
308308
"email": "mrunmoy.jena@tum.de",
309309
"affiliation": "Technische Universit\u00e4t M\u00fcnchen, 85748 Garching, Germany",
310310
"identifier": "https://orcid.org/0000-0003-1199-5181"
311+
},
312+
{
313+
"@type": "Person",
314+
"givenName": "Meytal",
315+
"familyName": "Duer",
316+
"affiliation": "GSI Helmholtzzentrum f\u00fcr Schwerionenforschung, 64291 Darmstadt, Germany"
311317
}
312318
],
313319
"contributor": [

pw/CMakeLists.txt

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
##############################################################################
2+
# Copyright (C) 2022 GSI Helmholtzzentrum für Schwerionenforschung GmbH #
3+
# Copyright (C) 2022-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+
set(SRCS
15+
pars/R3BPWContFact.cxx
16+
calibration/R3BPWMapped2PreCalPar.cxx
17+
calibration/R3BPWMapped2PreCal.cxx
18+
calibration/R3BPWPreCal2CalPar.cxx
19+
calibration/R3BPWPreCal2Cal.cxx
20+
pars/R3BPWTotCalPar.cxx
21+
calibration/R3BPWCal2Hit.cxx
22+
calibration/R3BPWCal2HitPar.cxx
23+
pars/R3BPWHitPar.cxx
24+
online/R3BPWOnlineSpectra.cxx
25+
)
26+
set(HEADERS
27+
pars/R3BPWContFact.h
28+
calibration/R3BPWMapped2PreCalPar.h
29+
calibration/R3BPWMapped2PreCal.h
30+
calibration/R3BPWPreCal2CalPar.h
31+
calibration/R3BPWPreCal2Cal.h
32+
pars/R3BPWTotCalPar.h
33+
calibration/R3BPWCal2Hit.h
34+
calibration/R3BPWCal2HitPar.h
35+
pars/R3BPWHitPar.h
36+
online/R3BPWOnlineSpectra.h
37+
)
38+
add_library_with_dictionary(
39+
LIBNAME
40+
R3BPW
41+
LINKDEF
42+
PWLinkDef.h
43+
HEADERS
44+
${HEADERS}
45+
SRCS
46+
${SRCS}
47+
INCLUDEDIRS
48+
${CMAKE_CURRENT_SOURCE_DIR}
49+
calibration
50+
online
51+
pars
52+
DEPENDENCIES
53+
R3BTracking
54+
R3BTCal)
55+
56+

pw/PWLinkDef.h

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// clang-format off
2+
3+
/******************************************************************************
4+
* Copyright (C) 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH *
5+
* Copyright (C) 2019-2025 Members of R3B Collaboration *
6+
* *
7+
* This software is distributed under the terms of the *
8+
* GNU General Public Licence (GPL) version 3, *
9+
* copied verbatim in the file "LICENSE". *
10+
* *
11+
* In applying this license GSI does not waive the privileges and immunities *
12+
* granted to it by virtue of its status as an Intergovernmental Organization *
13+
* or submit itself to any jurisdiction. *
14+
******************************************************************************/
15+
16+
#ifdef __CINT__
17+
18+
#pragma link off all globals;
19+
#pragma link off all classes;
20+
#pragma link off all functions;
21+
22+
#pragma link C++ class R3BPWContFact;
23+
24+
#pragma link C++ class R3BPWMapped2PreCalPar+;
25+
#pragma link C++ class R3BPWMapped2PreCal+;
26+
27+
#pragma link C++ class R3BPWPreCal2CalPar+;
28+
#pragma link C++ class R3BPWPreCal2Cal+;
29+
#pragma link C++ class R3BPWTotCalPar+;
30+
31+
#pragma link C++ class R3BPWCal2Hit+;
32+
#pragma link C++ class R3BPWCal2HitPar+;
33+
#pragma link C++ class R3BPWHitPar+;
34+
35+
#pragma link C++ class R3BPWOnlineSpectra+;
36+
37+
#endif

pw/calibration/R3BPWCal2Hit.cxx

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
/******************************************************************************
2+
* Copyright (C) 2026 GSI Helmholtzzentrum für Schwerionenforschung GmbH *
3+
* Copyright (C) 2026 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+
#include "R3BPWCal2Hit.h"
15+
#include "TClonesArray.h"
16+
#include "TMath.h"
17+
#include "TObjArray.h"
18+
#include "TRandom.h"
19+
20+
#include "FairLogger.h"
21+
#include "FairRootManager.h"
22+
#include "FairRunAna.h"
23+
#include "FairRuntimeDb.h"
24+
25+
#include "TGeoManager.h"
26+
#include "TGeoMatrix.h"
27+
28+
#include "R3BPWCalData.h"
29+
#include <list>
30+
#include <vector>
31+
32+
R3BPWCal2Hit::R3BPWCal2Hit()
33+
: FairTask("R3B PW Cal to Hit")
34+
{
35+
}
36+
37+
R3BPWCal2Hit::~R3BPWCal2Hit()
38+
{
39+
LOG(info) << "R3BPWCal2Hit: Delete instance";
40+
if (fPWHitDataCA)
41+
delete fPWHitDataCA;
42+
}
43+
44+
InitStatus R3BPWCal2Hit::Init()
45+
{
46+
47+
// Parameter Container
48+
// Reading PWHitPar from FairRuntimeDb
49+
FairRuntimeDb* rtdb = FairRuntimeDb::instance();
50+
if (!rtdb)
51+
{
52+
LOG(error) << "R3BPWCal2Hit:: FairRuntimeDb not opened";
53+
}
54+
55+
FairRootManager* rootManager = FairRootManager::Instance();
56+
if (!rootManager)
57+
{
58+
LOG(fatal) << "R3BPWCal2Hit::FairRootManager not found";
59+
return kFATAL;
60+
}
61+
62+
fHitPar = dynamic_cast<R3BPWHitPar*>(rtdb->getContainer("PWHitPar"));
63+
if (!fHitPar)
64+
{
65+
LOG(error) << "R3BPWCal2Hit::Init() Couldn't get handle on PWHitPar container";
66+
}
67+
else
68+
{
69+
LOG(info) << "R3BPWCal2Hit:: PWHitPar container open";
70+
}
71+
72+
fPWCalDataCA = dynamic_cast<TClonesArray*>(rootManager->GetObject("R3BPWCalData"));
73+
if (!fPWCalDataCA)
74+
{
75+
LOG(error) << "R3BPWCal2HitPar::Init() R3BPWCalData not found";
76+
return kFATAL;
77+
}
78+
79+
// Register output array
80+
fPWHitDataCA = new TClonesArray("R3BPWHitData");
81+
rootManager->Register("R3BPWHitData", "PW Bar Hit", fPWHitDataCA, !fOnline);
82+
83+
fParCont = fHitPar->GetCalParams();
84+
85+
return kSUCCESS;
86+
}
87+
88+
InitStatus R3BPWCal2Hit::ReInit()
89+
{
90+
SetParContainers();
91+
return kSUCCESS;
92+
}
93+
94+
void R3BPWCal2Hit::Exec(Option_t* opt)
95+
{
96+
Reset();
97+
// loop over si data
98+
Int_t nHits = fPWCalDataCA->GetEntriesFast();
99+
UInt_t iDetector = 0;
100+
double charge_left = -1000;
101+
double charge_right = -1000;
102+
double time_left = 0;
103+
double time_right = 0;
104+
UInt_t ibar = 0;
105+
106+
for (Int_t i = 0; i < nHits; i++)
107+
{
108+
auto map1 = dynamic_cast<R3BPWCalData*>(fPWCalDataCA->At(i));
109+
iDetector = map1->GetDetId();
110+
111+
if (iDetector == 0)
112+
{
113+
charge_right = map1->GetTot0();
114+
time_right = map1->GetTime0();
115+
ibar = map1->GetChannelId();
116+
117+
charge_left = map1->GetTot1();
118+
time_left = map1->GetTime1();
119+
120+
double position = double(ibar - 1) * (2.3 + 0.2) - 6.35; // relative to pad plane coordinates
121+
double charge = (charge_left + charge_right) / 2.;
122+
double time = (time_left + time_right) / 2. + fParCont->GetAt(ibar - 1);
123+
124+
auto tof = time; // will be later relative to start (diamond)
125+
AddHitBar(iDetector, ibar, time, position, charge, tof);
126+
}
127+
}
128+
}
129+
130+
R3BPWHitData* R3BPWCal2Hit::AddHitBar(UInt_t detId, UInt_t channel, double time, double pos, double charge, double tof)
131+
{
132+
133+
TClonesArray& clref = *fPWHitDataCA;
134+
Int_t size = clref.GetEntriesFast();
135+
return new (clref[size]) R3BPWHitData(detId, channel, time, pos, charge, tof);
136+
}
137+
138+
void R3BPWCal2Hit::Reset()
139+
{
140+
LOG(debug) << "Clearing PWHitStructure Structure";
141+
if (fPWHitDataCA)
142+
{
143+
fPWHitDataCA->Clear();
144+
}
145+
}
146+
147+
ClassImp(R3BPWCal2Hit);

pw/calibration/R3BPWCal2Hit.h

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/******************************************************************************
2+
* Copyright (C) 2026 GSI Helmholtzzentrum für Schwerionenforschung GmbH *
3+
* Copyright (C) 2026 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+
#pragma once
15+
16+
#include "FairTask.h"
17+
#include "R3BPWHitData.h"
18+
#include "R3BPWHitPar.h"
19+
#include "Rtypes.h"
20+
21+
class TClonesArray;
22+
class R3BTGeoPar;
23+
24+
class R3BPWCal2Hit : public FairTask
25+
{
26+
27+
public:
28+
/** Default constructor **/
29+
R3BPWCal2Hit();
30+
31+
/** Destructor **/
32+
~R3BPWCal2Hit() override;
33+
34+
/** Virtual method Exec **/
35+
void Exec(Option_t* opt) override;
36+
37+
/** Virtual method Reset **/
38+
virtual void Reset();
39+
40+
/** Accessor to select online mode **/
41+
void SetOnline(bool option = true) { fOnline = option; }
42+
43+
/** Virtual method Init **/
44+
InitStatus Init() override;
45+
46+
/** Virtual method ReInit **/
47+
InitStatus ReInit() override;
48+
49+
private:
50+
TArrayF* fParCont = nullptr;
51+
TClonesArray* fPWCalDataCA = nullptr;
52+
TClonesArray* fPWHitDataCA = nullptr;
53+
Bool_t fOnline = false; // Selector for online data storage
54+
R3BPWHitPar* fHitPar; // Parameter class
55+
56+
R3BPWHitData* AddHitBar(UInt_t iDet, UInt_t bar, double time, double pos, double charge, double tof);
57+
58+
public:
59+
ClassDefOverride(R3BPWCal2Hit, 1);
60+
};

0 commit comments

Comments
 (0)