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
7d703cfe
Commit
7d703cfe
authored
Jun 24, 2021
by
Pierre Morfouace
Browse files
* Adding Physics class for sofia active target and Fission Fragment class
parent
96103e33
Pipeline
#125587
passed with stages
in 8 minutes and 41 seconds
Changes
11
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
753 additions
and
19 deletions
+753
-19
NPLib/Detectors/Sofia/CMakeLists.txt
NPLib/Detectors/Sofia/CMakeLists.txt
+5
-2
NPLib/Detectors/Sofia/TSofAtPhysics.cxx
NPLib/Detectors/Sofia/TSofAtPhysics.cxx
+273
-0
NPLib/Detectors/Sofia/TSofAtPhysics.h
NPLib/Detectors/Sofia/TSofAtPhysics.h
+149
-0
NPLib/Detectors/Sofia/TSofFissionFragment.cxx
NPLib/Detectors/Sofia/TSofFissionFragment.cxx
+72
-0
NPLib/Detectors/Sofia/TSofFissionFragment.h
NPLib/Detectors/Sofia/TSofFissionFragment.h
+92
-0
NPLib/Detectors/Sofia/TSofTwimPhysics.cxx
NPLib/Detectors/Sofia/TSofTwimPhysics.cxx
+30
-12
NPLib/Detectors/Sofia/TSofTwimPhysics.h
NPLib/Detectors/Sofia/TSofTwimPhysics.h
+3
-0
Projects/s455/Analysis.cxx
Projects/s455/Analysis.cxx
+115
-5
Projects/s455/Analysis.h
Projects/s455/Analysis.h
+10
-0
Projects/s455/calibration.txt
Projects/s455/calibration.txt
+1
-0
Projects/s455/s455.detector
Projects/s455/s455.detector
+3
-0
No files found.
NPLib/Detectors/Sofia/CMakeLists.txt
View file @
7d703cfe
...
...
@@ -7,6 +7,7 @@ add_custom_command(OUTPUT TSofTofWPhysicsDict.cxx COMMAND ${CMAKE_BINARY_DIR}/sc
add_custom_command
(
OUTPUT TSofMwpcDataDict.cxx COMMAND
${
CMAKE_BINARY_DIR
}
/scripts/build_dict.sh TSofMwpcData.h TSofMwpcDataDict.cxx TSofMwpcData.rootmap libNPSofia.dylib DEPENDS TSofMwpcData.h
)
add_custom_command
(
OUTPUT TSofAtDataDict.cxx COMMAND
${
CMAKE_BINARY_DIR
}
/scripts/build_dict.sh TSofAtData.h TSofAtDataDict.cxx TSofAtData.rootmap libNPSofia.dylib DEPENDS TSofAtData.h
)
add_custom_command
(
OUTPUT TSofAtPhysicsDict.cxx COMMAND
${
CMAKE_BINARY_DIR
}
/scripts/build_dict.sh TSofAtPhysics.h TSofAtPhysicsDict.cxx TSofAtPhysics.rootmap libNPSofia.dylib DEPENDS TSofAtPhysics.h
)
add_custom_command
(
OUTPUT TSofTrimDataDict.cxx COMMAND
${
CMAKE_BINARY_DIR
}
/scripts/build_dict.sh TSofTrimData.h TSofTrimDataDict.cxx TSofTrimData.rootmap libNPSofia.dylib DEPENDS TSofTrimData.h
)
add_custom_command
(
OUTPUT TSofTrimPhysicsDict.cxx COMMAND
${
CMAKE_BINARY_DIR
}
/scripts/build_dict.sh TSofTrimPhysics.h TSofTrimPhysicsDict.cxx TSofTrimPhysics.rootmap libNPSofia.dylib DEPENDS TSofTrimPhysics.h
)
...
...
@@ -16,9 +17,11 @@ add_custom_command(OUTPUT TSofTwimPhysicsDict.cxx COMMAND ${CMAKE_BINARY_DIR}/sc
add_custom_command
(
OUTPUT TSofBeamIDDict.cxx COMMAND
${
CMAKE_BINARY_DIR
}
/scripts/build_dict.sh TSofBeamID.h TSofBeamIDDict.cxx TSofBeamID.rootmap libNPSofia.dylib DEPENDS TSofBeamID.h
)
add_library
(
NPSofia SHARED TSofSciData.cxx TSofSciDataDict.cxx TSofSciPhysics.cxx TSofSciPhysicsDict.cxx TSofMwpcData.cxx TSofMwpcDataDict.cxx TSofAtData.cxx TSofAtDataDict.cxx TSofTrimData.cxx TSofTrimDataDict.cxx TSofTrimPhysics.cxx TSofTrimPhysicsDict.cxx TSofTwimData.cxx TSofTwimDataDict.cxx TSofTwimPhysics.cxx TSofTwimPhysicsDict.cxx TSofTofWData.cxx TSofTofWDataDict.cxx TSofTofWPhysics.cxx TSofTofWPhysicsDict.cxx TSofBeamID.cxx TSofBeamIDDict.cxx
)
add_custom_command
(
OUTPUT TSofFissionFragmentDict.cxx COMMAND
${
CMAKE_BINARY_DIR
}
/scripts/build_dict.sh TSofFissionFragment.h TSofFissionFragmentDict.cxx TSofFissionFragment.rootmap libNPSofia.dylib DEPENDS TSofFissionFragment.h
)
add_library
(
NPSofia SHARED TSofSciData.cxx TSofSciDataDict.cxx TSofSciPhysics.cxx TSofSciPhysicsDict.cxx TSofMwpcData.cxx TSofMwpcDataDict.cxx TSofAtData.cxx TSofAtDataDict.cxx TSofAtPhysics.cxx TSofAtPhysicsDict.cxx TSofTrimData.cxx TSofTrimDataDict.cxx TSofTrimPhysics.cxx TSofTrimPhysicsDict.cxx TSofTwimData.cxx TSofTwimDataDict.cxx TSofTwimPhysics.cxx TSofTwimPhysicsDict.cxx TSofTofWData.cxx TSofTofWDataDict.cxx TSofTofWPhysics.cxx TSofTofWPhysicsDict.cxx TSofBeamID.cxx TSofBeamIDDict.cxx TSofFissionFragment.cxx TSofFissionFragmentDict.cxx
)
target_link_libraries
(
NPSofia
${
ROOT_LIBRARIES
}
NPCore NPPhysics
)
install
(
FILES TSofSciData.h TSofSciPhysics.h TSofMwpcData.h TSofAtData.h TSofTrimData.h TSofTrimPhysics.h TSofTwimData.h TSofTwimPhysics.h TSofTofWData.h TSofTofWPhysics.h TSofBeamID.h DESTINATION
${
CMAKE_INCLUDE_OUTPUT_DIRECTORY
}
)
install
(
FILES TSofSciData.h TSofSciPhysics.h TSofMwpcData.h TSofAtData.h
TSofAtPhysics.h
TSofTrimData.h TSofTrimPhysics.h TSofTwimData.h TSofTwimPhysics.h TSofTofWData.h TSofTofWPhysics.h TSofBeamID.h
TSofFissionFragment.h
DESTINATION
${
CMAKE_INCLUDE_OUTPUT_DIRECTORY
}
)
NPLib/Detectors/Sofia/TSofAtPhysics.cxx
0 → 100644
View file @
7d703cfe
/*****************************************************************************
* 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 : November 2020 *
* Last update : *
*---------------------------------------------------------------------------*
* Decription: *
* This class hold SofAt Treated data *
* *
*---------------------------------------------------------------------------*
* Comment: *
* *
* *
*****************************************************************************/
#include "TSofAtPhysics.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
(
TSofAtPhysics
)
///////////////////////////////////////////////////////////////////////////
TSofAtPhysics
::
TSofAtPhysics
()
:
m_EventData
(
new
TSofAtData
),
m_PreTreatedData
(
new
TSofAtData
),
m_EventPhysics
(
this
),
m_NumberOfDetectors
(
0
){
}
///////////////////////////////////////////////////////////////////////////
/// A usefull method to bundle all operation to add a detector
void
TSofAtPhysics
::
AddDetector
(
TVector3
){
// 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
TSofAtPhysics
::
AddDetector
(
double
R
,
double
Theta
,
double
Phi
){
// 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
);
}
///////////////////////////////////////////////////////////////////////////
void
TSofAtPhysics
::
BuildSimplePhysicalEvent
()
{
BuildPhysicalEvent
();
}
///////////////////////////////////////////////////////////////////////////
void
TSofAtPhysics
::
BuildPhysicalEvent
()
{
PreTreat
();
unsigned
int
mysizeE
=
m_PreTreatedData
->
GetMultiplicity
();
for
(
UShort_t
e
=
0
;
e
<
mysizeE
;
e
++
)
{
if
(
m_PreTreatedData
->
GetPileUp
(
e
)
!=
1
&&
m_PreTreatedData
->
GetOverflow
(
e
)
!=
1
){
AnodeNbr
.
push_back
(
m_PreTreatedData
->
GetAnodeNbr
(
e
));
Energy
.
push_back
(
m_PreTreatedData
->
GetEnergy
(
e
));
}
}
}
///////////////////////////////////////////////////////////////////////////
void
TSofAtPhysics
::
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
();
unsigned
int
mysize
=
m_EventData
->
GetMultiplicity
();
for
(
unsigned
int
i
=
0
;
i
<
mysize
;
++
i
)
{
//double Energy = Cal->ApplyCalibration("SofAt/SEC"+NPL::itoa(m_EventData->GetSectionNbr(i))+"_ANODE"+NPL::itoa(m_EventData->GetAnodeNbr(i))+"_ENERGY",m_EventData->GetEnergy(i));
m_PreTreatedData
->
SetAnodeNbr
(
m_EventData
->
GetAnodeNbr
(
i
));
m_PreTreatedData
->
SetEnergy
(
m_EventData
->
GetEnergy
(
i
));
m_PreTreatedData
->
SetPileUp
(
m_EventData
->
GetPileUp
(
i
));
m_PreTreatedData
->
SetOverflow
(
m_EventData
->
GetOverflow
(
i
));
}
}
///////////////////////////////////////////////////////////////////////////
void
TSofAtPhysics
::
ReadAnalysisConfig
()
{
bool
ReadingStatus
=
false
;
// path to file
string
FileName
=
"./configs/ConfigSofAt.dat"
;
// open analysis config file
ifstream
AnalysisConfigFile
;
AnalysisConfigFile
.
open
(
FileName
.
c_str
());
if
(
!
AnalysisConfigFile
.
is_open
())
{
cout
<<
" No ConfigSofAt.dat found: Default parameter loaded for Analayis "
<<
FileName
<<
endl
;
return
;
}
cout
<<
" Loading user parameter for Analysis from ConfigSofAt.dat "
<<
endl
;
// Save it in a TAsciiFile
TAsciiFile
*
asciiConfig
=
RootOutput
::
getInstance
()
->
GetAsciiFileAnalysisConfig
();
asciiConfig
->
AppendLine
(
"%%% ConfigSofAt.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
=
"ConfigSofAt"
;
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_THRESHOLD"
)
{
AnalysisConfigFile
>>
DataBuffer
;
m_E_Threshold
=
atof
(
DataBuffer
.
c_str
());
cout
<<
whatToDo
<<
" "
<<
m_E_Threshold
<<
endl
;
}
else
{
ReadingStatus
=
false
;
}
}
}
}
///////////////////////////////////////////////////////////////////////////
void
TSofAtPhysics
::
Clear
()
{
AnodeNbr
.
clear
();
Energy
.
clear
();
}
///////////////////////////////////////////////////////////////////////////
void
TSofAtPhysics
::
ReadConfiguration
(
NPL
::
InputParser
parser
)
{
vector
<
NPL
::
InputBlock
*>
blocks
=
parser
.
GetAllBlocksWithToken
(
"SofAt"
);
if
(
NPOptionManager
::
getInstance
()
->
GetVerboseLevel
())
cout
<<
"//// "
<<
blocks
.
size
()
<<
" detectors found "
<<
endl
;
vector
<
string
>
cart
=
{
"POS"
};
vector
<
string
>
sphe
=
{
"R"
,
"Theta"
,
"Phi"
};
for
(
unsigned
int
i
=
0
;
i
<
blocks
.
size
()
;
i
++
){
if
(
blocks
[
i
]
->
HasTokenList
(
cart
)){
if
(
NPOptionManager
::
getInstance
()
->
GetVerboseLevel
())
cout
<<
endl
<<
"//// SofAt "
<<
i
+
1
<<
endl
;
TVector3
Pos
=
blocks
[
i
]
->
GetTVector3
(
"POS"
,
"mm"
);
AddDetector
(
Pos
);
}
else
if
(
blocks
[
i
]
->
HasTokenList
(
sphe
)){
if
(
NPOptionManager
::
getInstance
()
->
GetVerboseLevel
())
cout
<<
endl
<<
"//// SofAt "
<<
i
+
1
<<
endl
;
double
R
=
blocks
[
i
]
->
GetDouble
(
"R"
,
"mm"
);
double
Theta
=
blocks
[
i
]
->
GetDouble
(
"Theta"
,
"deg"
);
double
Phi
=
blocks
[
i
]
->
GetDouble
(
"Phi"
,
"deg"
);
AddDetector
(
R
,
Theta
,
Phi
);
}
else
{
cout
<<
"ERROR: check your input file formatting "
<<
endl
;
exit
(
1
);
}
}
ReadAnalysisConfig
();
}
///////////////////////////////////////////////////////////////////////////
void
TSofAtPhysics
::
AddParameterToCalibrationManager
()
{
CalibrationManager
*
Cal
=
CalibrationManager
::
getInstance
();
for
(
int
sec
=
0
;
sec
<
m_NumberOfDetectors
;
sec
++
){
Cal
->
AddParameter
(
"SofAt"
,
"SEC"
+
NPL
::
itoa
(
sec
+
1
)
+
"_ALIGN"
,
"SofAt_SEC"
+
NPL
::
itoa
(
sec
+
1
)
+
"_ALIGN"
);
}
}
///////////////////////////////////////////////////////////////////////////
void
TSofAtPhysics
::
InitializeRootInputRaw
()
{
TChain
*
inputChain
=
RootInput
::
getInstance
()
->
GetChain
();
inputChain
->
SetBranchStatus
(
"SofAt"
,
true
);
inputChain
->
SetBranchAddress
(
"SofAt"
,
&
m_EventData
);
}
///////////////////////////////////////////////////////////////////////////
void
TSofAtPhysics
::
InitializeRootInputPhysics
()
{
TChain
*
inputChain
=
RootInput
::
getInstance
()
->
GetChain
();
inputChain
->
SetBranchAddress
(
"SofAt"
,
&
m_EventPhysics
);
}
///////////////////////////////////////////////////////////////////////////
void
TSofAtPhysics
::
InitializeRootOutput
()
{
TTree
*
outputTree
=
RootOutput
::
getInstance
()
->
GetTree
();
outputTree
->
Branch
(
"SofAt"
,
"TSofAtPhysics"
,
&
m_EventPhysics
);
}
////////////////////////////////////////////////////////////////////////////////
// Construct Method to be pass to the DetectorFactory //
////////////////////////////////////////////////////////////////////////////////
NPL
::
VDetector
*
TSofAtPhysics
::
Construct
()
{
return
(
NPL
::
VDetector
*
)
new
TSofAtPhysics
();
}
////////////////////////////////////////////////////////////////////////////////
// Registering the construct method to the factory //
////////////////////////////////////////////////////////////////////////////////
extern
"C"
{
class
proxy_SofAt
{
public:
proxy_SofAt
(){
NPL
::
DetectorFactory
::
getInstance
()
->
AddToken
(
"SofAt"
,
"SofAt"
);
NPL
::
DetectorFactory
::
getInstance
()
->
AddDetector
(
"SofAt"
,
TSofAtPhysics
::
Construct
);
}
};
proxy_SofAt
p_SofAt
;
}
NPLib/Detectors/Sofia/TSofAtPhysics.h
0 → 100644
View file @
7d703cfe
#ifndef TSofAtPHYSICS_H
#define TSofAtPHYSICS_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 : November 2020 *
* Last update : *
*---------------------------------------------------------------------------*
* Decription: *
* This class hold SofAt 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"
#include "TSpline.h"
// NPTool headers
#include "TSofAtData.h"
#include "NPCalibrationManager.h"
#include "NPVDetector.h"
#include "NPInputParser.h"
class
TSofAtPhysics
:
public
TObject
,
public
NPL
::
VDetector
{
//////////////////////////////////////////////////////////////
// constructor and destructor
public:
TSofAtPhysics
();
~
TSofAtPhysics
()
{};
//////////////////////////////////////////////////////////////
// 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
>
AnodeNbr
;
vector
<
double
>
Energy
;
/// 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 SofAt 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 TSofAtData object to TSofAtPhysics.
// needed for online analysis for example
void
SetRawDataPointer
(
TSofAtData
*
rawDataPointer
)
{
m_EventData
=
rawDataPointer
;}
// objects are not written in the TTree
private:
TSofAtData
*
m_EventData
;
//!
TSofAtData
*
m_PreTreatedData
;
//!
TSofAtPhysics
*
m_EventPhysics
;
//!
// getters for raw and pre-treated data object
public:
TSofAtData
*
GetRawData
()
const
{
return
m_EventData
;}
TSofAtData
*
GetPreTreatedData
()
const
{
return
m_PreTreatedData
;}
// parameters used in the analysis
private:
double
m_E_Threshold
;
//!
// number of detectors
private:
int
m_NumberOfDetectors
;
//!
// Static constructor to be passed to the Detector Factory
public:
static
NPL
::
VDetector
*
Construct
();
ClassDef
(
TSofAtPhysics
,
1
)
// SofAtPhysics structure
};
#endif
NPLib/Detectors/Sofia/TSofFissionFragment.cxx
0 → 100644
View file @
7d703cfe
/*****************************************************************************
* 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 2021 *
* Last update : *
*---------------------------------------------------------------------------*
* Decription: *
* This class hold FissionFragment Raw data *
* *
*---------------------------------------------------------------------------*
* Comment: *
* *
* *
*****************************************************************************/
#include "TSofFissionFragment.h"
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
using
namespace
std
;
ClassImp
(
TSofFissionFragment
)
//////////////////////////////////////////////////////////////////////
TSofFissionFragment
::
TSofFissionFragment
()
{
}
//////////////////////////////////////////////////////////////////////
TSofFissionFragment
::~
TSofFissionFragment
()
{
}
//////////////////////////////////////////////////////////////////////
void
TSofFissionFragment
::
Clear
()
{
fFF_Z
.
clear
();
fFF_Qmax
.
clear
();
fFF_AoQ
.
clear
();
fFF_A
.
clear
();
fFF_Beta
.
clear
();
fFF_Gamma
.
clear
();
fFF_Brho
.
clear
();
fFF_Zsum
=
-
1
;
}
//////////////////////////////////////////////////////////////////////
void
TSofFissionFragment
::
Dump
()
const
{
// This method is very useful for debuging and worth the dev.
cout
<<
"XXXXXXXXXXXXXXXXXXXXXXXX New Event [TSofFissionFragment::Dump()] XXXXXXXXXXXXXXXXX"
<<
endl
;
for
(
int
i
=
0
;
i
<
fFF_Z
.
size
();
i
++
){
cout
<<
"fFF_Z: "
<<
fFF_Z
[
i
]
<<
endl
;
cout
<<
"fFF_AoQ: "
<<
fFF_AoQ
[
i
]
<<
endl
;
cout
<<
"fFF_A: "
<<
fFF_A
[
i
]
<<
endl
;
cout
<<
"fFF_Beta: "
<<
fFF_Beta
[
i
]
<<
endl
;
cout
<<
"fFF_Gamma: "
<<
fFF_Gamma
[
i
]
<<
endl
;
cout
<<
"fFF_Brho: "
<<
fFF_Brho
[
i
]
<<
endl
;
}
}
NPLib/Detectors/Sofia/TSofFissionFragment.h
0 → 100644
View file @
7d703cfe
#ifndef __FissionFragmentDATA__
#define __FissionFragmentDATA__
/*****************************************************************************
* 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 2021 *
* Last update : *
*---------------------------------------------------------------------------*
* Decription: *
* This class hold FissionFragment Raw data *
* *
*---------------------------------------------------------------------------*
* Comment: *
* *
* *
*****************************************************************************/
// STL
#include <vector>
using
namespace
std
;
// ROOT
#include "TObject.h"
class
TSofFissionFragment
:
public
TObject
{
//////////////////////////////////////////////////////////////
// data members are hold into vectors in order
// to allow multiplicity treatment
private:
vector
<
double
>
fFF_Z
;
vector
<
double
>
fFF_Qmax
;
vector
<
double
>
fFF_AoQ
;
vector
<
double
>
fFF_A
;
vector
<
double
>
fFF_Beta
;
vector
<
double
>
fFF_Gamma
;
vector
<
double
>
fFF_Brho
;
double
fFF_Zsum
;
//////////////////////////////////////////////////////////////
// Constructor and destructor
public:
TSofFissionFragment
();
~
TSofFissionFragment
();
//////////////////////////////////////////////////////////////
// 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 ////////////////////////
inline
void
SetZsum
(
double
val
){
fFF_Zsum
=
val
;};
//!
inline
void
SetZ
(
double
val
){
fFF_Z
.
push_back
(
val
);};
//!
inline
void
SetQmax
(
double
val
){
fFF_Qmax
.
push_back
(
val
);};
//!
inline
void
SetAoQ
(
double
val
){
fFF_AoQ
.
push_back
(
val
);};
//!
inline
void
SetA
(
double
val
){
fFF_A
.
push_back
(
val
);};
//!
inline
void
SetBeta
(
double
val
){
fFF_Beta
.
push_back
(
val
);};
//!
inline
void
SetGamma
(
double
val
){
fFF_Gamma
.
push_back
(
val
);};
//!
inline
void
SetBrho
(
double
val
){
fFF_Brho
.
push_back
(
val
);};
//!
////////////////////// GETTERS ////////////////////////
inline
double
GetZsum
()
const
{
return
fFF_Zsum
;}
//!
inline
double
GetZ
(
int
i
)
const
{
return
fFF_Z
[
i
];}
//!
inline
double
GetQmax
(
int
i
)
const
{
return
fFF_Qmax
[
i
];}
//!
inline
double
GetAoQ
(
int
i
)
const
{
return
fFF_AoQ
[
i
];}
//!
inline
double
GetA
(
int
i
)
const
{
return
fFF_A
[
i
];}
//!
inline
double
GetBeta
(
int
i
)
const
{
return
fFF_Beta
[
i
];}
//!
inline
double
GetGamma
(
int
i
)
const
{
return
fFF_Gamma
[
i
];}
//!
inline
double
GetBrho
(
int
i
)
const
{
return
fFF_Brho
[
i
];}
//!
//////////////////////////////////////////////////////////////