1 #include "KVDataAnalyser.h"
2 #define KVDSTTreeConverter_cxx
4 #include "KVINDRADSTConverter.h"
5 #include "KVUserAnalysisOptionList.h"
7 #include <KVDetectorStack.h>
8 #include <KVReconNucTrajectory.h>
115 auto idtelescope_code =
idcode[i];
120 else if (
icou[i] < 10)
122 else if (
icou[i] >= 10) {
132 else if (
icou[i] > 9) {
148 else if (
icou[i] > 9) {
158 else if (
icou[i] > 9) {
181 "Got no detector with id=%d cou=%d mod=%d z=%d a=%d ecod=%d ener=%f",
189 if (node->GetNTrajForwards() > 1) {
196 etalon_dets.
Add(chio);
199 if (
z[i] > 0 &&
z[i] < 92 && std::abs(
a[i]) > 0 &&
ecode[i] > 0 &&
ecode[i] < 4 &&
ener[i] > 0) {
202 traj = (
KVGeoDNTrajectory*)node->GetTrajectories()->FindObjectWithMethod(
"2",
"GetN");
206 traj = (
KVGeoDNTrajectory*)node->GetTrajectories()->FindObjectWithMethod(
"4",
"GetN");
209 traj = (
KVGeoDNTrajectory*)node->GetTrajectories()->FindObjectWithMethod(
"4",
"GetN");
212 traj = (
KVGeoDNTrajectory*)node->GetTrajectories()->FindObjectWithMethod(
"2",
"GetN");
222 if (!node->GetTrajectories()) {
223 Warning(
"Process",
"node %s has no trajectories", node->GetName());
226 TIter next_id(rtraj->GetIDTelescopes());
229 if (idt->
GetIDCode() == idtelescope_code)
break;
231 if (!idt || idt->
GetIDCode() != idtelescope_code) {
240 nuc->SetReconstructionTrajectory(rtraj);
261 auto idr = nuc->GetIdentificationResult(1);
262 idr->IDattempted =
true;
264 idr->SetIDType(idt->
GetType());
277 idr->Aident = (
a[i] > 0);
278 if (idr->Aident) idr->PID =
a_indra[i];
280 if (
z[i] < 0 ||
z[i] > 92)
290 nuc->SetIsIdentified();
291 nuc->SetIdentification(idr, idt);
294 nuc->SetIsCalibrated();
295 nuc->SetECode(
ecode[i]);
296 nuc->SetEnergy(
ener[i]);
297 nuc->GetAnglesFromReconstructionTrajectory();
299 nuc->SetParameter(
"INDRA.EPHOS",
de1[i]);
302 nuc->SetParameter(
"INDRA.ECHIO",
de1[i]);
303 nuc->SetParameter(
"INDRA.DE_MYLAR",
de_mylar[i]);
306 nuc->SetParameter(
"INDRA.ESI",
de2[i]);
309 nuc->SetParameter(
"INDRA.ECSI",
de3[i]);
315 nuc->SetIsUncalibrated();
char * Form(const char *fmt,...)
virtual const Char_t * GetType() const
virtual Bool_t IsCalled(const Char_t *name) const
void WriteBatchInfo(TTree *)
void CommitRunfile(const KVString &type, const run_index_t &run, TFile *file)
TFile * NewRunfile(const KVString &type, const run_index_t &run)
Easily calculate energy losses etc. in a stack of detectors.
Double_t GetPunchThroughEnergy(Int_t Z, Int_t A)
Base class for detector geometry description, interface to energy-loss calculations.
KVGroup * GetGroup() const
KVGeoDetectorNode * GetNode()
KVNameValueList * GetParameters() const
static void MakeEventBranch(TTree *tree, const TString &branchname, T &event, Int_t bufsize=10000000)
void Clear(Option_t *opt="") override
void SetParameter(const Char_t *name, ValType value) const
const KVDBRunFile & GetDBRunFile(const run_index_t &r) const
Path taken by particles through multidetector geometry.
const KVSeqCollection * GetTrajectories() const
const KVGeoDNTrajectory * GetTrajectoryForReconstruction(const KVGeoDNTrajectory *t, const KVGeoDetectorNode *n) const
Base class for all detectors or associations of detectors in array which can identify charged particl...
virtual UShort_t GetIDCode()
TTreeReaderArray< Float_t > si_gg
TTreeReaderArray< Int_t > z
TTreeReaderArray< Float_t > de1
TTreeReaderArray< Float_t > z_indra
KVINDRADetector * get_sili(int i)
bool stopped_in_si75(int i)
TTreeReaderValue< Int_t > npart_traite
pointer to the analyzed TTree or TChain
TTreeReaderArray< Float_t > a_indra
bool stopped_in_sili(int i)
KVINDRADetector * get_ci(int i)
bool stopped_in_si(int i)
void SlaveBegin(TTree *tree) override
bool stopped_in_ci(int i)
TTreeReaderArray< Float_t > de5
TTreeReaderArray< Float_t > de3
TTreeReaderArray< Float_t > de4
TTreeReaderArray< Float_t > ci_gg
TTreeReaderArray< Float_t > si_pg
TTreeReaderArray< Int_t > a
void Terminate() override
TTreeReaderArray< Float_t > csi_r
KVINDRADetector * get_phos(int i)
bool stopped_in_csi(int i)
KVINDRADetector * get_si75(int i)
Bool_t Process(Long64_t entry) override
TTreeReaderArray< Float_t > csi_l
bool stopped_in_phos(int i)
TTreeReaderArray< Float_t > ci_pg
TTreeReaderArray< Int_t > icou
KVINDRADetector * get_csi(int i)
TTreeReaderArray< Float_t > de_mylar
TTreeReaderArray< Int_t > imod
KVReconstructedEvent * the_event
TTreeReaderArray< Int_t > idcode
TTreeReaderArray< Float_t > ener
TTreeReader fReader
the tree reader
void SlaveTerminate() override
KVINDRADetector * get_si(int i)
TTreeReaderArray< Float_t > de2
TTreeReaderArray< Int_t > ecode
void Begin(TTree *tree) override
Base class for detectors of INDRA array.
KVINDRADetector * GetChIo() const
@ ID_CI_SI75
particle identified in ChIo-Si75 etalon telescope
@ ID_SI_CSI
particle identified in Si-CsI telescope
@ ID_NEUTRON
'neutron' discriminated by coherency between CsI and Si-CsI identifications
@ ID_CI_SI
particle identified in ChIo-Si telescope
@ ID_CI_SI_COHERENCY
particle identified in ChIo-Si telescope in coincidence with light particle identified in CsI
@ ID_STOPPED_IN_FIRST_STAGE
particle stopped in first detector of telescope, only minimum Z can be estimated
@ ID_CSI_PSA
particle identified in CsI detector by pulse shape analysis
@ ID_PHOSWICH
particle identified in phoswich (campaigns 1-3)
@ NO_IDENTIFICATION
no identification either attempted or available for particle
@ ID_CI_COHERENCY
particle stopped in ChIo revealed by coherency tests (Zmin)
@ ID_CI_MULTIHIT
particles stopped in multiple Si (ring<10) or CsI (ring>9) behind same ChIo, bad identification
@ ID_CSI_FRAGMENT
particle partially identified in CsI detector, with Z greater than identifiable
@ ID_GAMMA
'gamma' particle detected in CsI
@ ID_CSI_MASS_OUT_OF_RANGE
particle partially identified in CsI detector, mass out of range of apparent Z (pile-up?...
@ ID_SI75_SILI
particle identified in Si75-SiLi etalon telescope
@ ID_CI_CSI
particle identified in ChIo-CsI telescope
virtual KVINDRADetector * GetDetectorByType(UInt_t cou, UInt_t mod, UInt_t type) const
const KVSeqCollection * GetListOfPhoswich() const
static KVMultiDetArray * MakeMultiDetector(const Char_t *dataset_name, Int_t run=-1, TString classname="KVMultiDetArray", KVExpDB *db=nullptr)
virtual void SetParameters(UInt_t n, Bool_t physics_parameters_only=kFALSE)
void IncrementValue(const Char_t *name, value_type value)
void SetParameter(const Char_t *name, ValType value) const
Path through detector array used to reconstruct detected particle.
Event containing KVReconstructedNucleus nuclei reconstructed from hits in detectors.
TObject * First() const override
Handle list of options and input parameters for user analyis .
TString GetOpt(const Char_t *opt) const
void ParseOptions(const KVString &optlist)
virtual Bool_t IsEmpty() const
const char * GetName() const override
const char * GetTitle() const override
virtual void Warning(const char *method, const char *msgfmt,...) const
virtual void Error(const char *method, const char *msgfmt,...) const
virtual void Info(const char *method, const char *msgfmt,...) const
const char * GetOption() const override
EEntryStatus SetLocalEntry(Long64_t entry)
Int_t Write(const char *name=nullptr, Int_t option=0, Int_t bufsize=0) const override