Reads CHeT data from ROOT files and processes it into high-level objects.
More...
#include <CHeTReader.hh>
|
| | Reader (const std::string &filename, const std::string &treeName="auto") |
| | Constructor.
|
| |
| | Reader (const Reader &)=delete |
| |
| Reader & | operator= (const Reader &)=delete |
| |
| void | SetCuts (double toaMin, double toaMax, unsigned int totMin, unsigned int totMax) |
| | Set cuts for hit selection. Must be called before GetCHeTTree().
|
| |
| void | SetSingleEntry (long entry) |
| | Restricts the analysis to a single entry index. Replaces any previous range or filter on the entry index.
|
| |
| void | SetEventByID (int eventID) |
| | Restricts the analysis to a specific EventID. Filters the dataset where the EventID branch matches the given ID.
|
| |
| void | SetEnabledBoards (const std::vector< int > &boards) |
| | Restricts the analysis to specific boards. Only hits from these boards will be processed.
|
| |
| void | SetEnabledCylinders (const std::vector< int > &cylinders) |
| | Restricts the analysis to specific cylinders. Only hits belonging to these cylinders will be included in the output.
|
| |
| void | SetEnabledLayers (const std::vector< int > &layers) |
| | Restricts the analysis to specific layers. Only hits belonging to these layers will be included in the output.
|
| |
| void | SetEnabledGeometries (const std::vector< std::pair< int, int > > &geometries) |
| | Restricts the analysis to specific (cylinder, layer) combinations. Only hits matching one of the provided pairs will be included.
|
| |
| ROOT::RDF::RNode | GetRaw () |
| | Returns the Raw node (the original tree).
|
| |
| void | SaveToTree (const std::string &filename, const std::string &treeName="chet") |
| | Saves the processed high-level data to a new ROOT file.
|
| |
| ROOT::RDF::RNode | GetCHeTTree () |
| | Returns the node with calculated high-level variables.
|
| |
Reads CHeT data from ROOT files and processes it into high-level objects.
The Reader class wraps RDataFrame to provide a convenient interface for:
- Loading raw TTree data.
- Applying time and energy cuts.
- Filtering specific events.
- Generating "Estimators" (calibrated and mapped hits).
Definition at line 37 of file CHeTReader.hh.
◆ Reader() [1/2]
| CHeT::Data::Reader::Reader |
( |
const std::string & |
filename, |
|
|
const std::string & |
treeName = "auto" |
|
) |
| |
Constructor.
- Parameters
-
| filename | Path to the ROOT file (or glob pattern). |
| treeName | Name of the tree (default: "auto"). |
Definition at line 43 of file CHeTReader.cc.
◆ Reader() [2/2]
| CHeT::Data::Reader::Reader |
( |
const Reader & |
| ) |
|
|
delete |
◆ GetCHeTTree()
| ROOT::RDF::RNode CHeT::Data::Reader::GetCHeTTree |
( |
| ) |
|
Returns the node with calculated high-level variables.
Performs:
- Time correction (ToA alignment w.r.t. board 0).
- Hit filtering based on cuts (ToA/ToT).
- Geometric mapping (Channel ID -> Global Bundle ID -> Layer/Cylinder).
- Aggregation of all hits into unique vectors (All_Bundle, All_Lay...).
Definition at line 95 of file CHeTReader.cc.
◆ GetRaw()
| ROOT::RDF::RNode CHeT::Data::Reader::GetRaw |
( |
| ) |
|
Returns the Raw node (the original tree).
Definition at line 90 of file CHeTReader.cc.
◆ operator=()
◆ SaveToTree()
| void CHeT::Data::Reader::SaveToTree |
( |
const std::string & |
filename, |
|
|
const std::string & |
treeName = "chet" |
|
) |
| |
Saves the processed high-level data to a new ROOT file.
- Parameters
-
| filename | Output ROOT file name. |
| treeName | Output tree name (default: "chet"). |
Definition at line 446 of file CHeTReader.cc.
◆ SetCuts()
| void CHeT::Data::Reader::SetCuts |
( |
double |
toaMin, |
|
|
double |
toaMax, |
|
|
unsigned int |
totMin, |
|
|
unsigned int |
totMax |
|
) |
| |
Set cuts for hit selection. Must be called before GetCHeTTree().
- Parameters
-
| toaMin | Minimum Time of Arrival [ns] |
| toaMax | Maximum Time of Arrival [ns] |
| totMin | Minimum Time over Threshold [LSB] |
| totMax | Maximum Time over Threshold [LSB] |
Definition at line 52 of file CHeTReader.cc.
◆ SetEnabledBoards()
| void CHeT::Data::Reader::SetEnabledBoards |
( |
const std::vector< int > & |
boards | ) |
|
Restricts the analysis to specific boards. Only hits from these boards will be processed.
- Parameters
-
| boards | Vector of board IDs (0, 1, 2, 3). |
Definition at line 70 of file CHeTReader.cc.
◆ SetEnabledCylinders()
| void CHeT::Data::Reader::SetEnabledCylinders |
( |
const std::vector< int > & |
cylinders | ) |
|
Restricts the analysis to specific cylinders. Only hits belonging to these cylinders will be included in the output.
- Parameters
-
| cylinders | Vector of cylinder IDs. |
Definition at line 75 of file CHeTReader.cc.
◆ SetEnabledGeometries()
| void CHeT::Data::Reader::SetEnabledGeometries |
( |
const std::vector< std::pair< int, int > > & |
geometries | ) |
|
Restricts the analysis to specific (cylinder, layer) combinations. Only hits matching one of the provided pairs will be included.
- Parameters
-
| geometries | Vector of pairs {cylinderId, layerId}. |
Definition at line 85 of file CHeTReader.cc.
◆ SetEnabledLayers()
| void CHeT::Data::Reader::SetEnabledLayers |
( |
const std::vector< int > & |
layers | ) |
|
Restricts the analysis to specific layers. Only hits belonging to these layers will be included in the output.
- Parameters
-
| layers | Vector of layer IDs. |
Definition at line 80 of file CHeTReader.cc.
◆ SetEventByID()
| void CHeT::Data::Reader::SetEventByID |
( |
int |
eventID | ) |
|
Restricts the analysis to a specific EventID. Filters the dataset where the EventID branch matches the given ID.
- Parameters
-
| eventID | The EventID to process. |
Definition at line 65 of file CHeTReader.cc.
◆ SetSingleEntry()
| void CHeT::Data::Reader::SetSingleEntry |
( |
long |
entry | ) |
|
Restricts the analysis to a single entry index. Replaces any previous range or filter on the entry index.
- Parameters
-
| entry | The row index in the TTree. |
Definition at line 60 of file CHeTReader.cc.
◆ fDF
| ROOT::RDataFrame CHeT::Data::Reader::fDF |
|
private |
◆ fEnabledBoards
| std::vector<int> CHeT::Data::Reader::fEnabledBoards |
|
private |
◆ fEnabledCylinders
| std::vector<int> CHeT::Data::Reader::fEnabledCylinders |
|
private |
◆ fEnabledGeometries
| std::vector<std::pair<int, int> > CHeT::Data::Reader::fEnabledGeometries |
|
private |
◆ fEnabledLayers
| std::vector<int> CHeT::Data::Reader::fEnabledLayers |
|
private |
◆ fFilename
| std::string CHeT::Data::Reader::fFilename |
|
private |
◆ fHeadNode
| ROOT::RDF::RNode CHeT::Data::Reader::fHeadNode |
|
private |
◆ fToaMax
| double CHeT::Data::Reader::fToaMax = 1e9 |
|
private |
◆ fToaMin
| double CHeT::Data::Reader::fToaMin = -1e9 |
|
private |
◆ fTotMax
| unsigned int CHeT::Data::Reader::fTotMax = 99999 |
|
private |
◆ fTotMin
| unsigned int CHeT::Data::Reader::fTotMin = 0 |
|
private |
◆ fTreeName
| std::string CHeT::Data::Reader::fTreeName |
|
private |
The documentation for this class was generated from the following files: