Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
np
nptool
Commits
4dd00f5b
Commit
4dd00f5b
authored
May 07, 2020
by
Morfouace
Browse files
Adding PISTA (Trapezoidal silicon telescope detector) detector to NPTool
parent
f2a2e9d1
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
1500 additions
and
0 deletions
+1500
-0
NPLib/Detectors/PISTA/CMakeLists.txt
NPLib/Detectors/PISTA/CMakeLists.txt
+6
-0
NPLib/Detectors/PISTA/TPISTAData.cxx
NPLib/Detectors/PISTA/TPISTAData.cxx
+79
-0
NPLib/Detectors/PISTA/TPISTAData.h
NPLib/Detectors/PISTA/TPISTAData.h
+104
-0
NPLib/Detectors/PISTA/TPISTAPhysics.cxx
NPLib/Detectors/PISTA/TPISTAPhysics.cxx
+344
-0
NPLib/Detectors/PISTA/TPISTAPhysics.h
NPLib/Detectors/PISTA/TPISTAPhysics.h
+180
-0
NPLib/Detectors/PISTA/TPISTASpectra.cxx
NPLib/Detectors/PISTA/TPISTASpectra.cxx
+174
-0
NPLib/Detectors/PISTA/TPISTASpectra.h
NPLib/Detectors/PISTA/TPISTASpectra.h
+62
-0
NPSimulation/Detectors/PISTA/CMakeLists.txt
NPSimulation/Detectors/PISTA/CMakeLists.txt
+2
-0
NPSimulation/Detectors/PISTA/PISTA.cc
NPSimulation/Detectors/PISTA/PISTA.cc
+292
-0
NPSimulation/Detectors/PISTA/PISTA.hh
NPSimulation/Detectors/PISTA/PISTA.hh
+117
-0
Projects/PISTA/Analysis.cxx
Projects/PISTA/Analysis.cxx
+68
-0
Projects/PISTA/Analysis.h
Projects/PISTA/Analysis.h
+42
-0
Projects/PISTA/CMakeLists.txt
Projects/PISTA/CMakeLists.txt
+5
-0
Projects/PISTA/PISTA.detector
Projects/PISTA/PISTA.detector
+25
-0
No files found.
NPLib/Detectors/PISTA/CMakeLists.txt
0 → 100644
View file @
4dd00f5b
add_custom_command
(
OUTPUT TPISTAPhysicsDict.cxx COMMAND ../../scripts/build_dict.sh TPISTAPhysics.h TPISTAPhysicsDict.cxx TPISTAPhysics.rootmap libNPPISTA.dylib DEPENDS TPISTAPhysics.h
)
add_custom_command
(
OUTPUT TPISTADataDict.cxx COMMAND ../../scripts/build_dict.sh TPISTAData.h TPISTADataDict.cxx TPISTAData.rootmap libNPPISTA.dylib DEPENDS TPISTAData.h
)
add_library
(
NPPISTA SHARED TPISTASpectra.cxx TPISTAData.cxx TPISTAPhysics.cxx TPISTADataDict.cxx TPISTAPhysicsDict.cxx
)
target_link_libraries
(
NPPISTA
${
ROOT_LIBRARIES
}
NPCore
)
install
(
FILES TPISTAData.h TPISTAPhysics.h TPISTASpectra.h DESTINATION
${
CMAKE_INCLUDE_OUTPUT_DIRECTORY
}
)
NPLib/Detectors/PISTA/TPISTAData.cxx
0 → 100644
View file @
4dd00f5b
/*****************************************************************************
* 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: Pierre Morfouace contact address: pierre.morfouace2@cea.fr *
* *
* Creation Date : May 2020 *
* Last update : *
*---------------------------------------------------------------------------*
* Decription: *
* This class hold PISTA Raw data *
* *
*---------------------------------------------------------------------------*
* Comment: *
* *
* *
*****************************************************************************/
#include "TPISTAData.h"
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
using
namespace
std
;
ClassImp
(
TPISTAData
)
//////////////////////////////////////////////////////////////////////
TPISTAData
::
TPISTAData
()
{
}
//////////////////////////////////////////////////////////////////////
TPISTAData
::~
TPISTAData
()
{
}
//////////////////////////////////////////////////////////////////////
void
TPISTAData
::
Clear
()
{
// Energy
fPISTA_E_DetectorNbr
.
clear
();
fPISTA_Energy
.
clear
();
// Time
fPISTA_T_DetectorNbr
.
clear
();
fPISTA_Time
.
clear
();
}
//////////////////////////////////////////////////////////////////////
void
TPISTAData
::
Dump
()
const
{
// This method is very useful for debuging and worth the dev.
cout
<<
"XXXXXXXXXXXXXXXXXXXXXXXX New Event [TPISTAData::Dump()] XXXXXXXXXXXXXXXXX"
<<
endl
;
// Energy
size_t
mysize
=
fPISTA_E_DetectorNbr
.
size
();
cout
<<
"PISTA_E_Mult: "
<<
mysize
<<
endl
;
for
(
size_t
i
=
0
;
i
<
mysize
;
i
++
){
cout
<<
"DetNbr: "
<<
fPISTA_E_DetectorNbr
[
i
]
<<
" Energy: "
<<
fPISTA_Energy
[
i
];
}
// Time
mysize
=
fPISTA_T_DetectorNbr
.
size
();
cout
<<
"PISTA_T_Mult: "
<<
mysize
<<
endl
;
for
(
size_t
i
=
0
;
i
<
mysize
;
i
++
){
cout
<<
"DetNbr: "
<<
fPISTA_T_DetectorNbr
[
i
]
<<
" Time: "
<<
fPISTA_Time
[
i
];
}
}
NPLib/Detectors/PISTA/TPISTAData.h
0 → 100644
View file @
4dd00f5b
#ifndef __PISTADATA__
#define __PISTADATA__
/*****************************************************************************
* 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: Pierre Morfouace contact address: pierre.morfouace2@cea.fr *
* *
* Creation Date : May 2020 *
* Last update : *
*---------------------------------------------------------------------------*
* Decription: *
* This class hold PISTA Raw data *
* *
*---------------------------------------------------------------------------*
* Comment: *
* *
* *
*****************************************************************************/
// STL
#include <vector>
using
namespace
std
;
// ROOT
#include "TObject.h"
class
TPISTAData
:
public
TObject
{
//////////////////////////////////////////////////////////////
// data members are hold into vectors in order
// to allow multiplicity treatment
private:
// Energy
vector
<
UShort_t
>
fPISTA_E_DetectorNbr
;
vector
<
Double_t
>
fPISTA_Energy
;
// Time
vector
<
UShort_t
>
fPISTA_T_DetectorNbr
;
vector
<
Double_t
>
fPISTA_Time
;
//////////////////////////////////////////////////////////////
// Constructor and destructor
public:
TPISTAData
();
~
TPISTAData
();
//////////////////////////////////////////////////////////////
// Inherited from TObject and overriden to avoid warnings
public:
void
Clear
();
void
Clear
(
const
Option_t
*
)
{};
void
Dump
()
const
;
//////////////////////////////////////////////////////////////
// Getters and Setters
// Prefer inline declaration to avoid unnecessary called of
// frequently used methods
// add //! to avoid ROOT creating dictionnary for the methods
public:
////////////////////// SETTERS ////////////////////////
// Energy
inline
void
SetEnergy
(
const
UShort_t
&
DetNbr
,
const
Double_t
&
Energy
){
fPISTA_E_DetectorNbr
.
push_back
(
DetNbr
);
fPISTA_Energy
.
push_back
(
Energy
);
};
//!
// Time
inline
void
SetTime
(
const
UShort_t
&
DetNbr
,
const
Double_t
&
Time
)
{
fPISTA_T_DetectorNbr
.
push_back
(
DetNbr
);
fPISTA_Time
.
push_back
(
Time
);
};
//!
////////////////////// GETTERS ////////////////////////
// Energy
inline
UShort_t
GetMultEnergy
()
const
{
return
fPISTA_E_DetectorNbr
.
size
();}
inline
UShort_t
GetE_DetectorNbr
(
const
unsigned
int
&
i
)
const
{
return
fPISTA_E_DetectorNbr
[
i
];}
//!
inline
Double_t
Get_Energy
(
const
unsigned
int
&
i
)
const
{
return
fPISTA_Energy
[
i
];}
//!
// Time
inline
UShort_t
GetMultTime
()
const
{
return
fPISTA_T_DetectorNbr
.
size
();}
inline
UShort_t
GetT_DetectorNbr
(
const
unsigned
int
&
i
)
const
{
return
fPISTA_T_DetectorNbr
[
i
];}
//!
inline
Double_t
Get_Time
(
const
unsigned
int
&
i
)
const
{
return
fPISTA_Time
[
i
];}
//!
//////////////////////////////////////////////////////////////
// Required for ROOT dictionnary
ClassDef
(
TPISTAData
,
1
)
// PISTAData structure
};
#endif
NPLib/Detectors/PISTA/TPISTAPhysics.cxx
0 → 100644
View file @
4dd00f5b
/*****************************************************************************
* 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: Pierre Morfouace contact address: pierre.morfouace2@cea.fr *
* *
* Creation Date : May 2020 *
* Last update : *
*---------------------------------------------------------------------------*
* Decription: *
* This class hold PISTA Treated data *
* *
*---------------------------------------------------------------------------*
* Comment: *
* *
* *
*****************************************************************************/
#include "TPISTAPhysics.h"
// STL
#include <sstream>
#include <iostream>
#include <cmath>
#include <stdlib.h>
#include <limits>
using
namespace
std
;
// NPL
#include "RootInput.h"
#include "RootOutput.h"
#include "NPDetectorFactory.h"
#include "NPOptionManager.h"
// ROOT
#include "TChain.h"
ClassImp
(
TPISTAPhysics
)
///////////////////////////////////////////////////////////////////////////
TPISTAPhysics
::
TPISTAPhysics
()
:
m_EventData
(
new
TPISTAData
),
m_PreTreatedData
(
new
TPISTAData
),
m_EventPhysics
(
this
),
m_Spectra
(
0
),
m_E_RAW_Threshold
(
0
),
// adc channels
m_E_Threshold
(
0
),
// MeV
m_NumberOfDetectors
(
0
)
{
}
///////////////////////////////////////////////////////////////////////////
/// A usefull method to bundle all operation to add a detector
void
TPISTAPhysics
::
AddDetector
(
TVector3
,
string
){
// In That simple case nothing is done
// Typically for more complex detector one would calculate the relevant
// positions (stripped silicon) or angles (gamma array)
m_NumberOfDetectors
++
;
}
///////////////////////////////////////////////////////////////////////////
void
TPISTAPhysics
::
AddDetector
(
double
R
,
double
Theta
,
double
Phi
,
string
shape
){
// Compute the TVector3 corresponding
TVector3
Pos
(
R
*
sin
(
Theta
)
*
cos
(
Phi
),
R
*
sin
(
Theta
)
*
sin
(
Phi
),
R
*
cos
(
Theta
));
// Call the cartesian method
AddDetector
(
Pos
,
shape
);
}
///////////////////////////////////////////////////////////////////////////
void
TPISTAPhysics
::
BuildSimplePhysicalEvent
()
{
BuildPhysicalEvent
();
}
///////////////////////////////////////////////////////////////////////////
void
TPISTAPhysics
::
BuildPhysicalEvent
()
{
// apply thresholds and calibration
PreTreat
();
// match energy and time together
unsigned
int
mysizeE
=
m_PreTreatedData
->
GetMultEnergy
();
unsigned
int
mysizeT
=
m_PreTreatedData
->
GetMultTime
();
for
(
UShort_t
e
=
0
;
e
<
mysizeE
;
e
++
)
{
for
(
UShort_t
t
=
0
;
t
<
mysizeT
;
t
++
)
{
if
(
m_PreTreatedData
->
GetE_DetectorNbr
(
e
)
==
m_PreTreatedData
->
GetT_DetectorNbr
(
t
))
{
DetectorNumber
.
push_back
(
m_PreTreatedData
->
GetE_DetectorNbr
(
e
));
Energy
.
push_back
(
m_PreTreatedData
->
Get_Energy
(
e
));
Time
.
push_back
(
m_PreTreatedData
->
Get_Time
(
t
));
}
}
}
}
///////////////////////////////////////////////////////////////////////////
void
TPISTAPhysics
::
PreTreat
()
{
// This method typically applies thresholds and calibrations
// Might test for disabled channels for more complex detector
// clear pre-treated object
ClearPreTreatedData
();
// instantiate CalibrationManager
static
CalibrationManager
*
Cal
=
CalibrationManager
::
getInstance
();
// Energy
unsigned
int
mysize
=
m_EventData
->
GetMultEnergy
();
for
(
UShort_t
i
=
0
;
i
<
mysize
;
++
i
)
{
if
(
m_EventData
->
Get_Energy
(
i
)
>
m_E_RAW_Threshold
)
{
Double_t
Energy
=
Cal
->
ApplyCalibration
(
"PISTA/ENERGY"
+
NPL
::
itoa
(
m_EventData
->
GetE_DetectorNbr
(
i
)),
m_EventData
->
Get_Energy
(
i
));
if
(
Energy
>
m_E_Threshold
)
{
m_PreTreatedData
->
SetEnergy
(
m_EventData
->
GetE_DetectorNbr
(
i
),
Energy
);
}
}
}
// Time
mysize
=
m_EventData
->
GetMultTime
();
for
(
UShort_t
i
=
0
;
i
<
mysize
;
++
i
)
{
Double_t
Time
=
Cal
->
ApplyCalibration
(
"PISTA/TIME"
+
NPL
::
itoa
(
m_EventData
->
GetT_DetectorNbr
(
i
)),
m_EventData
->
Get_Time
(
i
));
m_PreTreatedData
->
SetTime
(
m_EventData
->
GetT_DetectorNbr
(
i
),
Time
);
}
}
///////////////////////////////////////////////////////////////////////////
void
TPISTAPhysics
::
ReadAnalysisConfig
()
{
bool
ReadingStatus
=
false
;
// path to file
string
FileName
=
"./configs/ConfigPISTA.dat"
;
// open analysis config file
ifstream
AnalysisConfigFile
;
AnalysisConfigFile
.
open
(
FileName
.
c_str
());
if
(
!
AnalysisConfigFile
.
is_open
())
{
cout
<<
" No ConfigPISTA.dat found: Default parameter loaded for Analayis "
<<
FileName
<<
endl
;
return
;
}
cout
<<
" Loading user parameter for Analysis from ConfigPISTA.dat "
<<
endl
;
// Save it in a TAsciiFile
TAsciiFile
*
asciiConfig
=
RootOutput
::
getInstance
()
->
GetAsciiFileAnalysisConfig
();
asciiConfig
->
AppendLine
(
"%%% ConfigPISTA.dat %%%"
);
asciiConfig
->
Append
(
FileName
.
c_str
());
asciiConfig
->
AppendLine
(
""
);
// read analysis config file
string
LineBuffer
,
DataBuffer
,
whatToDo
;
while
(
!
AnalysisConfigFile
.
eof
())
{
// Pick-up next line
getline
(
AnalysisConfigFile
,
LineBuffer
);
// search for "header"
string
name
=
"ConfigPISTA"
;
if
(
LineBuffer
.
compare
(
0
,
name
.
length
(),
name
)
==
0
)
ReadingStatus
=
true
;
// loop on tokens and data
while
(
ReadingStatus
)
{
whatToDo
=
""
;
AnalysisConfigFile
>>
whatToDo
;
// Search for comment symbol (%)
if
(
whatToDo
.
compare
(
0
,
1
,
"%"
)
==
0
)
{
AnalysisConfigFile
.
ignore
(
numeric_limits
<
streamsize
>::
max
(),
'\n'
);
}
else
if
(
whatToDo
==
"E_RAW_THRESHOLD"
)
{
AnalysisConfigFile
>>
DataBuffer
;
m_E_RAW_Threshold
=
atof
(
DataBuffer
.
c_str
());
cout
<<
whatToDo
<<
" "
<<
m_E_RAW_Threshold
<<
endl
;
}
else
if
(
whatToDo
==
"E_THRESHOLD"
)
{
AnalysisConfigFile
>>
DataBuffer
;
m_E_Threshold
=
atof
(
DataBuffer
.
c_str
());
cout
<<
whatToDo
<<
" "
<<
m_E_Threshold
<<
endl
;
}
else
{
ReadingStatus
=
false
;
}
}
}
}
///////////////////////////////////////////////////////////////////////////
void
TPISTAPhysics
::
Clear
()
{
DetectorNumber
.
clear
();
Energy
.
clear
();
Time
.
clear
();
}
///////////////////////////////////////////////////////////////////////////
void
TPISTAPhysics
::
ReadConfiguration
(
NPL
::
InputParser
parser
)
{
vector
<
NPL
::
InputBlock
*>
blocks
=
parser
.
GetAllBlocksWithToken
(
"PISTA"
);
if
(
NPOptionManager
::
getInstance
()
->
GetVerboseLevel
())
cout
<<
"//// "
<<
blocks
.
size
()
<<
" detectors found "
<<
endl
;
vector
<
string
>
cart
=
{
"POS"
,
"Shape"
};
vector
<
string
>
sphe
=
{
"R"
,
"Theta"
,
"Phi"
,
"Shape"
};
for
(
unsigned
int
i
=
0
;
i
<
blocks
.
size
()
;
i
++
){
if
(
blocks
[
i
]
->
HasTokenList
(
cart
)){
if
(
NPOptionManager
::
getInstance
()
->
GetVerboseLevel
())
cout
<<
endl
<<
"//// PISTA "
<<
i
+
1
<<
endl
;
TVector3
Pos
=
blocks
[
i
]
->
GetTVector3
(
"POS"
,
"mm"
);
string
Shape
=
blocks
[
i
]
->
GetString
(
"Shape"
);
AddDetector
(
Pos
,
Shape
);
}
else
if
(
blocks
[
i
]
->
HasTokenList
(
sphe
)){
if
(
NPOptionManager
::
getInstance
()
->
GetVerboseLevel
())
cout
<<
endl
<<
"//// PISTA "
<<
i
+
1
<<
endl
;
double
R
=
blocks
[
i
]
->
GetDouble
(
"R"
,
"mm"
);
double
Theta
=
blocks
[
i
]
->
GetDouble
(
"Theta"
,
"deg"
);
double
Phi
=
blocks
[
i
]
->
GetDouble
(
"Phi"
,
"deg"
);
string
Shape
=
blocks
[
i
]
->
GetString
(
"Shape"
);
AddDetector
(
R
,
Theta
,
Phi
,
Shape
);
}
else
{
cout
<<
"ERROR: check your input file formatting "
<<
endl
;
exit
(
1
);
}
}
}
///////////////////////////////////////////////////////////////////////////
void
TPISTAPhysics
::
InitSpectra
()
{
m_Spectra
=
new
TPISTASpectra
(
m_NumberOfDetectors
);
}
///////////////////////////////////////////////////////////////////////////
void
TPISTAPhysics
::
FillSpectra
()
{
m_Spectra
->
FillRawSpectra
(
m_EventData
);
m_Spectra
->
FillPreTreatedSpectra
(
m_PreTreatedData
);
m_Spectra
->
FillPhysicsSpectra
(
m_EventPhysics
);
}
///////////////////////////////////////////////////////////////////////////
void
TPISTAPhysics
::
CheckSpectra
()
{
m_Spectra
->
CheckSpectra
();
}
///////////////////////////////////////////////////////////////////////////
void
TPISTAPhysics
::
ClearSpectra
()
{
// To be done
}
///////////////////////////////////////////////////////////////////////////
map
<
string
,
TH1
*>
TPISTAPhysics
::
GetSpectra
()
{
if
(
m_Spectra
)
return
m_Spectra
->
GetMapHisto
();
else
{
map
<
string
,
TH1
*>
empty
;
return
empty
;
}
}
///////////////////////////////////////////////////////////////////////////
void
TPISTAPhysics
::
WriteSpectra
()
{
m_Spectra
->
WriteSpectra
();
}
///////////////////////////////////////////////////////////////////////////
void
TPISTAPhysics
::
AddParameterToCalibrationManager
()
{
CalibrationManager
*
Cal
=
CalibrationManager
::
getInstance
();
for
(
int
i
=
0
;
i
<
m_NumberOfDetectors
;
++
i
)
{
Cal
->
AddParameter
(
"PISTA"
,
"D"
+
NPL
::
itoa
(
i
+
1
)
+
"_ENERGY"
,
"PISTA_D"
+
NPL
::
itoa
(
i
+
1
)
+
"_ENERGY"
);
Cal
->
AddParameter
(
"PISTA"
,
"D"
+
NPL
::
itoa
(
i
+
1
)
+
"_TIME"
,
"PISTA_D"
+
NPL
::
itoa
(
i
+
1
)
+
"_TIME"
);
}
}
///////////////////////////////////////////////////////////////////////////
void
TPISTAPhysics
::
InitializeRootInputRaw
()
{
TChain
*
inputChain
=
RootInput
::
getInstance
()
->
GetChain
();
inputChain
->
SetBranchStatus
(
"PISTA"
,
true
);
inputChain
->
SetBranchAddress
(
"PISTA"
,
&
m_EventData
);
}
///////////////////////////////////////////////////////////////////////////
void
TPISTAPhysics
::
InitializeRootInputPhysics
()
{
TChain
*
inputChain
=
RootInput
::
getInstance
()
->
GetChain
();
inputChain
->
SetBranchAddress
(
"PISTA"
,
&
m_EventPhysics
);
}
///////////////////////////////////////////////////////////////////////////
void
TPISTAPhysics
::
InitializeRootOutput
()
{
TTree
*
outputTree
=
RootOutput
::
getInstance
()
->
GetTree
();
outputTree
->
Branch
(
"PISTA"
,
"TPISTAPhysics"
,
&
m_EventPhysics
);
}
////////////////////////////////////////////////////////////////////////////////
// Construct Method to be pass to the DetectorFactory //
////////////////////////////////////////////////////////////////////////////////
NPL
::
VDetector
*
TPISTAPhysics
::
Construct
()
{
return
(
NPL
::
VDetector
*
)
new
TPISTAPhysics
();
}
////////////////////////////////////////////////////////////////////////////////
// Registering the construct method to the factory //
////////////////////////////////////////////////////////////////////////////////
extern
"C"
{
class
proxy_PISTA
{
public:
proxy_PISTA
(){
NPL
::
DetectorFactory
::
getInstance
()
->
AddToken
(
"PISTA"
,
"PISTA"
);
NPL
::
DetectorFactory
::
getInstance
()
->
AddDetector
(
"PISTA"
,
TPISTAPhysics
::
Construct
);
}
};
proxy_PISTA
p_PISTA
;
}
NPLib/Detectors/PISTA/TPISTAPhysics.h
0 → 100644
View file @
4dd00f5b
#ifndef TPISTAPHYSICS_H
#define TPISTAPHYSICS_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: Pierre Morfouace contact address: pierre.morfouace2@cea.fr *
* *
* Creation Date : May 2020 *
* Last update : *
*---------------------------------------------------------------------------*
* Decription: *
* This class hold PISTA Treated data *
* *
*---------------------------------------------------------------------------*
* Comment: *
* *
* *
*****************************************************************************/
// C++ headers
#include <vector>
#include <map>
#include <string>
using
namespace
std
;
// ROOT headers
#include "TObject.h"
#include "TH1.h"
#include "TVector3.h"
// NPTool headers
#include "TPISTAData.h"
#include "TPISTASpectra.h"
#include "NPCalibrationManager.h"
#include "NPVDetector.h"
#include "NPInputParser.h"
// forward declaration
class
TPISTASpectra
;
class
TPISTAPhysics
:
public
TObject
,
public
NPL
::
VDetector
{
//////////////////////////////////////////////////////////////
// constructor and destructor
public:
TPISTAPhysics
();
~
TPISTAPhysics
()
{};
//////////////////////////////////////////////////////////////
// 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:
vector
<
int
>
DetectorNumber
;
vector
<
double
>
Energy
;
vector
<
double
>
Time
;
/// A usefull method to bundle all operation to add a detector
void
AddDetector
(
TVector3
POS
,
string
shape
);
void
AddDetector
(
double
R
,
double
Theta
,
double
Phi
,
string
shape
);