Skip to content

Commit dda983b

Browse files
committed
New implementation of the FOOT online
New implementation of the hit level (probably wrong) Error fixed on Hit level New implementation of the hit level Efficiency improvement Minor modification Map2Cal class optimized for FOOTs Modifications on the online spectra of the FOOTs Modification in the reader to allow a remapping on the foot IDs New author Zenodo updated Zenodo updated Zenodo updated New label on the X and Y axis of the correlation plot Modification regarding memory management Minor change Minor modification
1 parent 98263f7 commit dda983b

20 files changed

Lines changed: 704 additions & 333 deletions

.zenodo.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,12 @@
129129
"orcid": "0000-0002-5022-3312",
130130
"affiliation": "RBI Zagreb, HR10000 Zagreb, Croatia"
131131
},
132+
{
133+
"name": "González-Rusell, Pablo",
134+
"orcid": "0009-0007-2579-9479",
135+
"email": "pablo.grusell@udc.es",
136+
"affiliation": "CITENI, Industrial Campus of Ferrol, University of Coruña, 15403 Ferrol, Spain"
137+
},
132138
{
133139
"name": "Graña-González, Antia",
134140
"orcid": "0000-0002-0842-4110",

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Chatillon, Audrey [CEA, DAM, DIF, 91297 Arpajon, France]
88
Feijoo-Fontán, Martina [https://orcid.org/0000-0002-8507-5137] [IGFAE, University of Santiago de Compostela, 15782 Santiago de Compostela, Spain]
99
García-Jiménez, Gabriel [https://orcid.org/0000-0002-4435-0163] [IGFAE, University of Santiago de Compostela, 15782 Santiago de Compostela, Spain]
1010
Gasparic, Igor [https://orcid.org/0000-0002-5022-3312] [RBI Zagreb, HR10000 Zagreb, Croatia]
11+
González-Rusell, Pablo [pablo.grusell@udc.es] [https://orcid.org/0009-0007-2579-9479] [CITENI, Industrial Campus of Ferrol, University of Coruña, 15403 Ferrol, Spain]
1112
Graña-González, Antia [https://orcid.org/0000-0002-0842-4110] [CITENI, Industrial Campus of Ferrol, University of Coruña, 15403 Ferrol, Spain]
1213
Heil, Michael [https://orcid.org/0009-0000-9562-6644] [GSI Helmholtzzentrum für Schwerionenforschung, 64291 Darmstadt, Germany]
1314
Horvat, Andrea [https://orcid.org/0009-0004-6882-5591] [RBI Zagreb, HR10000 Zagreb, Croatia]

r3bdata/footData/R3BFootCalData.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@
1818
#include "R3BFootCalData.h"
1919

2020
// ----- Standard constructor ------------------------------------------
21-
R3BFootCalData::R3BFootCalData(uint8_t detid, uint16_t stripid, double energy)
21+
R3BFootCalData::R3BFootCalData(uint8_t detid, uint16_t stripid, double energy, double sigma)
2222
: fDetId(detid)
2323
, fStripId(stripid)
2424
, fEnergy(energy)
25+
, fSigma(sigma)
2526
{
2627
}
2728

r3bdata/footData/R3BFootCalData.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ class R3BFootCalData : public TObject
3232
*@param fDetId Detector unique identifier
3333
*@param fStripId Strip unique identifier
3434
*@param fEnergy Total energy deposited on the strip ([GeV] in sim)
35+
*@param fSigma Sigma of the energy after some corrections
3536
**/
36-
explicit R3BFootCalData(uint8_t detid, uint16_t stripid, double energy);
37+
explicit R3BFootCalData(uint8_t detid, uint16_t stripid, double energy, double sigma);
3738

3839
/** Destructor **/
3940
virtual ~R3BFootCalData() = default;
@@ -42,16 +43,19 @@ class R3BFootCalData : public TObject
4243
[[nodiscard]] inline const uint8_t& GetDetId() const { return fDetId; }
4344
[[nodiscard]] inline const uint16_t& GetStripId() const { return fStripId; }
4445
[[nodiscard]] inline const double& GetEnergy() const { return fEnergy; }
46+
[[nodiscard]] inline const double& GetSigma() const { return fSigma; }
4547

4648
// Modifiers
4749
inline void SetDetId(uint8_t detid) { fDetId = detid; }
4850
inline void SetStripId(uint16_t stripid) { fStripId = stripid; }
4951
inline void SetEnergy(double energy) { fEnergy = energy; }
52+
inline void SetSigma(double sigma) { fSigma = sigma; }
5053

5154
protected:
5255
uint8_t fDetId = 0; // detector unique identifier
5356
uint16_t fStripId = 0; // strip unique identifier
5457
double fEnergy = std::nan(""); // total energy in the strip
58+
double fSigma = std::nan(""); // sigma of the energy after corrections
5559

5660
public:
5761
ClassDefOverride(R3BFootCalData, 1)

r3bdata/footData/R3BFootHitData.cxx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ R3BFootHitData::R3BFootHitData(uint8_t detid,
2323
double pos,
2424
TVector3 master,
2525
double energy,
26-
uint16_t mulstrip)
26+
uint16_t mulstrip,
27+
double eta)
2728
: fDetId(detid)
2829
, fNbHit(nbhit)
2930
, fPos(pos)
@@ -32,6 +33,7 @@ R3BFootHitData::R3BFootHitData(uint8_t detid,
3233
, fmaster(master)
3334
, fEnergy(energy)
3435
, fMulStrip(mulstrip)
36+
, fEta(eta)
3537
{
3638
}
3739

@@ -45,6 +47,7 @@ R3BFootHitData::R3BFootHitData(const R3BFootHitData& right)
4547
, fmaster(right.fmaster)
4648
, fEnergy(right.fEnergy)
4749
, fMulStrip(right.fMulStrip)
50+
, fEta(right.fEta)
4851
{
4952
}
5053

r3bdata/footData/R3BFootHitData.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,15 @@ class R3BFootHitData : public TObject
3636
*@param fTheta Master: Angle theta [rad] (lab frame)
3737
*@param fPhi Master: Angle Phi [rad] (lab frame)
3838
*@param fEnergy Total energy deposited by the hit ([GeV] in sim)
39+
*@param fEta Difference between the integer part of the cluster position and the cluster position
3940
**/
4041
explicit R3BFootHitData(uint8_t detid,
4142
uint16_t nbhit,
4243
double pos,
4344
TVector3 master,
4445
double energy,
45-
uint16_t mulstrip = 0);
46+
uint16_t mulstrip = 0,
47+
double eta = 0);
4648

4749
/** Copy constructor **/
4850
R3BFootHitData(const R3BFootHitData&);
@@ -61,6 +63,7 @@ class R3BFootHitData : public TObject
6163
[[nodiscard]] inline const double& GetPhi() const { return fPhi; }
6264
[[nodiscard]] inline const TVector3 GetPosLab() const { return fmaster; }
6365
[[nodiscard]] inline const double& GetEnergy() const { return fEnergy; }
66+
[[nodiscard]] inline const double& GetEta() const { return fEta; }
6467

6568
protected:
6669
uint8_t fDetId = 0;
@@ -71,6 +74,7 @@ class R3BFootHitData : public TObject
7174
TVector3 fmaster;
7275
double fEnergy = std::nan("");
7376
uint16_t fMulStrip = 0;
77+
double fEta = 0;
7478

7579
public:
7680
ClassDefOverride(R3BFootHitData, 1)

r3bsource/foot/R3BFootSiReader.cxx

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
#include "TClonesArray.h"
2222
#include "ext_data_struct_info.hh"
2323

24+
#include <numeric>
25+
2426
/**
2527
** ext_h101_foot.h was created by running
2628
** $unpacker --ntuple=STRUCT_HH,RAW:FOOT,id=h101_FOOT,NOTRIGEVENTNO,ext_h101_foot.h
@@ -42,7 +44,10 @@ R3BFootSiReader::R3BFootSiReader(EXT_STR_h101_FOOT_onion* data, size_t offset)
4244
//, fNbDet(sizeof(EXT_STR_h101_FOOT_onion) / sizeof(EXT_STR_h101_FOOT_onion.FOOT[0])) // Auto-gets # FEET from
4345
// struct!
4446
, fArray(new TClonesArray("R3BFootMappedData"))
47+
, fMappedDetId(16)
4548
{
49+
// Trivial mapping 1 - 1 by default
50+
std::iota(fMappedDetId.begin(), fMappedDetId.end(), 1);
4651
}
4752

4853
R3BFootSiReader::~R3BFootSiReader() { delete fArray; }
@@ -71,14 +76,29 @@ Bool_t R3BFootSiReader::Init(ext_data_struct_info* a_struct_info)
7176
Bool_t R3BFootSiReader::R3BRead()
7277
{
7378
R3BLOG(debug1, "Event data");
79+
80+
int kDet;
7481
// Read FOOT detectors
7582
for (Int_t d = 0; d < fNbDet; d++)
7683
{
84+
85+
// Remap of the det number to order them from 1 to 8
86+
87+
for (int i = 0; i < fMappedDetId.size(); i++)
88+
{
89+
90+
if (d + 1 == fMappedDetId[i])
91+
{
92+
kDet = i;
93+
}
94+
}
95+
7796
if (fData->FOOT[d]._ == 640)
7897
{
7998
for (Int_t strip = 0; strip < fData->FOOT[d]._; ++strip)
8099
{
81-
new ((*fArray)[fArray->GetEntriesFast()]) R3BFootMappedData(d + 1, strip + 1, fData->FOOT[d].E[strip]);
100+
new ((*fArray)[fArray->GetEntriesFast()])
101+
R3BFootMappedData(kDet + 1, strip + 1, fData->FOOT[d].E[strip]);
82102
}
83103
}
84104
else if (fData->FOOT[d]._ == 0)

r3bsource/foot/R3BFootSiReader.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
// ----- Created 19/07/21 by J.L. Rodriguez-Sanchez -----
1717
// ----------------------------------------------------------------------
1818

19-
#ifndef R3BFootSiReader_H
20-
#define R3BFootSiReader_H
19+
#pragma once
2120

2221
#include "R3BReader.h"
2322
#include <Rtypes.h>
@@ -50,6 +49,8 @@ class R3BFootSiReader : public R3BReader
5049
// Accessor to select online mode
5150
void SetOnline(Bool_t option) { fOnline = option; }
5251

52+
void SetMapping(const std::vector<int>& map) { fMappedDetId = map; }
53+
5354
private:
5455
// An event counter
5556
unsigned int fNEvent;
@@ -63,9 +64,9 @@ class R3BFootSiReader : public R3BReader
6364
Int_t fNbDet;
6465
// Output array
6566
TClonesArray* fArray;
67+
// Vector with the remapped detector ids
68+
std::vector<int> fMappedDetId;
6669

6770
public:
6871
ClassDefOverride(R3BFootSiReader, 0);
6972
};
70-
71-
#endif /* R3BFootSiReader_H */

ssd/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,6 @@ add_library_with_dictionary(
8888
pars
8989
sim
9090
DEPENDENCIES
91-
R3BTracking R3BTCal)
91+
R3BTracking R3BTCal R3BNeulandShared)
9292

9393
add_subdirectory(test)

ssd/SsdLinkDef.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#pragma link C++ class R3BAmsStripCal2Hit+;
4444
#pragma link C++ class R3BAmsOnlineSpectra+;
4545
#pragma link C++ class R3BAmsCalifaCorrelatedOnlineSpectra+;
46+
#pragma link C++ class vector<R3B::DetectorMappedData>+;
4647

4748
#pragma link C++ class R3BFootMappingPar+;
4849
#pragma link C++ class R3BFootCalPar+;

0 commit comments

Comments
 (0)