Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef TICPHYSICS_H
#define TICPHYSICS_H
/*****************************************************************************
* Copyright (C) 2009-2020 this file is part of the NPTool Project *
* *
* For the licensing terms see $NPTOOL/Licence/NPTool_Licence *
* For the list of contributors see $NPTOOL/Licence/Contributors *
*****************************************************************************/
/*****************************************************************************
* Original Author: P. Morfouace contact address: pierre.morfouace@cea.fr *
* *
* Creation Date : October 2023 *
* Last update : *
*---------------------------------------------------------------------------*
* Decription: *
* This class hold IC Treated data *
* *
*---------------------------------------------------------------------------*
* Comment: *
* *
* *
*****************************************************************************/
// C++ headers
#include <vector>
#include <map>
#include <set>
#include <string>
using namespace std;
// ROOT headers
#include "TObject.h"
#include "TH1.h"
#include "TVector3.h"
#include "TSpline.h"
// NPTool headers
#include "TICData.h"
#include "NPCalibrationManager.h"
#include "NPVDetector.h"
#include "NPInputParser.h"
class TICPhysics : public TObject, public NPL::VDetector {
//////////////////////////////////////////////////////////////
// constructor and destructor
public:
TICPhysics();
~TICPhysics() {};
//////////////////////////////////////////////////////////////
// Inherited from TObject and overriden to avoid warnings
public:
void Clear();
void Clear(const Option_t*) {};
//////////////////////////////////////////////////////////////
// data obtained after BuildPhysicalEvent() and stored in
// output ROOT file
public:
double DE;
double Eres;
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
/// A usefull method to bundle all operation to add a detector
void AddDetector(TVector3 Pos);
void AddDetector(double R, double Theta, double Phi);
//////////////////////////////////////////////////////////////
// methods inherited from the VDetector ABC class
public:
// read stream from ConfigFile to pick-up detector parameters
void ReadConfiguration(NPL::InputParser);
// add parameters to the CalibrationManger
void AddParameterToCalibrationManager();
// method called event by event, aiming at extracting the
// physical information from detector
void BuildPhysicalEvent();
// same as BuildPhysicalEvent() method but with a simpler
// treatment
void BuildSimplePhysicalEvent();
// same as above but for online analysis
void BuildOnlinePhysicalEvent() {BuildPhysicalEvent();};
// activate raw data object and branches from input TChain
// in this method mother branches (Detector) AND daughter leaves
// (fDetector_parameter) have to be activated
void InitializeRootInputRaw();
// activate physics data object and branches from input TChain
// in this method mother branches (Detector) AND daughter leaves
// (fDetector_parameter) have to be activated
void InitializeRootInputPhysics();
// create branches of output ROOT file
void InitializeRootOutput();
// clear the raw and physical data objects event by event
void ClearEventPhysics() {Clear();}
void ClearEventData() {m_EventData->Clear();}
//////////////////////////////////////////////////////////////
// specific methods to IC array
public:
// remove bad channels, calibrate the data and apply thresholds
void PreTreat();
// clear the pre-treated object
void ClearPreTreatedData() {m_PreTreatedData->Clear();}
// read the user configuration file. If no file is found, load standard one
void ReadAnalysisConfig();
// give and external TICData object to TICPhysics.
// needed for online analysis for example
void SetRawDataPointer(TICData* rawDataPointer) {m_EventData = rawDataPointer;}
void SetFPMWSection(int section) {m_FPMW_Section = section;}
int GetFPMWSection() {return m_FPMW_Section;}
// objects are not written in the TTree
private:
TICData* m_EventData; //!
TICData* m_PreTreatedData; //!
TICPhysics* m_EventPhysics; //!
// getters for raw and pre-treated data object
public:
TICData* GetRawData() const {return m_EventData;}
TICData* GetPreTreatedData() const {return m_PreTreatedData;}
// parameters used in the analysis
private:
double m_E_Threshold; //!
// number of detectors
private:
int m_NumberOfDetectors; //!
string m_Z_SPLINE_PATH; //!
bool m_Z_SPLINE_CORRECTION; //!
TSpline3* m_Zspline; //!