Skip to content
Snippets Groups Projects
Commit cfa174ba authored by Damien Thisse's avatar Damien Thisse
Browse files

ACTAR: Added the reading of the branch "ReactionConditions" if it is a simulation

parent b6ef9968
No related branches found
No related tags found
1 merge request!27Draft: [Epic] Preparation of the environement for the new GaseousDetectorScorers...
Pipeline #367288 passed
......@@ -740,9 +740,9 @@ void TActarPhysics::InitSpectra() {
}
///////////////////////////////////////////////////////////////////////////
void TActarPhysics::SetTreeReader(TTreeReader* TreeReader) {TActarPhysicsReader::r_SetTreeReader(TreeReader);}
void TActarPhysics::SetTreeReader(TTreeReader* TreeReader) {
TActarPhysicsReader::r_SetTreeReader(TreeReader, fIsSimulation);
}
///////////////////////////////////////////////////////////////////////////
void TActarPhysics::FillSpectra() {
......
......@@ -217,6 +217,7 @@ public:
string GetGasName() {return fGas;}
bool IsGoodEvent() {return fIsGoodEvent;}
bool IsSimulation() {return fIsSimulation;}
// parameters used in the analysis
private:
......
......@@ -30,6 +30,11 @@ TActarPhysicsReader::TActarPhysicsReader()
{
};
void TActarPhysicsReader::r_SetTreeReader(TTreeReader* TreeReader){
void TActarPhysicsReader::r_SetTreeReader(TTreeReader* TreeReader, bool is_simulation){
r_ReaderEventData = new TTreeReaderValue<MEventReduced>(*TreeReader, "data");
if (is_simulation)
{
r_ReaderReactionCondition = new TTreeReaderValue<TReactionConditions>(*TreeReader, "ReactionConditions");
}
};
\ No newline at end of file
......@@ -35,6 +35,7 @@
#include "RootOutput.h"
#include "TTree.h"
#include "NPVTreeReader.h"
#include "TReactionConditions.h"
using namespace std;
......@@ -45,11 +46,12 @@ public:
~TActarPhysicsReader(){};
public:
void r_SetTreeReader(TTreeReader* TreeReader);
void r_SetTreeReader(TTreeReader* TreeReader, bool is_simulation);
private:
TTreeReader *dummy = new TTreeReader();
public:
TTreeReaderValue<MEventReduced>* r_ReaderEventData = new TTreeReaderValue<MEventReduced>(*dummy,"");
TTreeReaderValue<TReactionConditions>* r_ReaderReactionCondition= new TTreeReaderValue<TReactionConditions>(*dummy,"");
public:
ClassDef(TActarPhysicsReader,0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment