Belle II Software development
NtuplePhase1_v6Module Class Reference

Read SKB PVs, simulated measurements of BEAST sensors, and write scaled simulated Ntuple in BEAST phase 1 data format. More...

#include <NtuplePhase1_v6Module.h>

Inheritance diagram for NtuplePhase1_v6Module:
Module PathElement

Public Types

enum  EModulePropFlags {
  c_Input = 1 ,
  c_Output = 2 ,
  c_ParallelProcessingCertified = 4 ,
  c_HistogramManager = 8 ,
  c_InternalSerializer = 16 ,
  c_TerminateInAllProcesses = 32 ,
  c_DontCollectStatistics = 64
}
 Each module can be tagged with property flags, which indicate certain features of the module. More...
 
typedef ModuleCondition::EAfterConditionPath EAfterConditionPath
 Forward the EAfterConditionPath definition from the ModuleCondition.
 

Public Member Functions

 NtuplePhase1_v6Module ()
 Constructor.
 
virtual ~NtuplePhase1_v6Module ()
 Destructor.
 
virtual void initialize () override
 Initialize the Module.
 
virtual void beginRun () override
 Called when entering a new run.
 
virtual void event () override
 Event processor.
 
virtual void endRun () override
 End-of-run action.
 
virtual void terminate () override
 Termination action.
 
void printModuleParams () const
 Prints module parameters.
 
virtual std::vector< std::string > getFileNames (bool outputFiles)
 Return a list of output filenames for this modules.
 
const std::string & getName () const
 Returns the name of the module.
 
const std::string & getType () const
 Returns the type of the module (i.e.
 
const std::string & getPackage () const
 Returns the package this module is in.
 
const std::string & getDescription () const
 Returns the description of the module.
 
void setName (const std::string &name)
 Set the name of the module.
 
void setPropertyFlags (unsigned int propertyFlags)
 Sets the flags for the module properties.
 
LogConfiggetLogConfig ()
 Returns the log system configuration.
 
void setLogConfig (const LogConfig &logConfig)
 Set the log system configuration.
 
void setLogLevel (int logLevel)
 Configure the log level.
 
void setDebugLevel (int debugLevel)
 Configure the debug messaging level.
 
void setAbortLevel (int abortLevel)
 Configure the abort log level.
 
void setLogInfo (int logLevel, unsigned int logInfo)
 Configure the printed log information for the given level.
 
void if_value (const std::string &expression, const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
 Add a condition to the module.
 
void if_false (const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
 A simplified version to add a condition to the module.
 
void if_true (const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
 A simplified version to set the condition of the module.
 
bool hasCondition () const
 Returns true if at least one condition was set for the module.
 
const ModuleConditiongetCondition () const
 Return a pointer to the first condition (or nullptr, if none was set)
 
const std::vector< ModuleCondition > & getAllConditions () const
 Return all set conditions for this module.
 
bool evalCondition () const
 If at least one condition was set, it is evaluated and true returned if at least one condition returns true.
 
std::shared_ptr< PathgetConditionPath () const
 Returns the path of the last true condition (if there is at least one, else reaturn a null pointer).
 
Module::EAfterConditionPath getAfterConditionPath () const
 What to do after the conditional path is finished.
 
std::vector< std::shared_ptr< Path > > getAllConditionPaths () const
 Return all condition paths currently set (no matter if the condition is true or not).
 
bool hasProperties (unsigned int propertyFlags) const
 Returns true if all specified property flags are available in this module.
 
bool hasUnsetForcedParams () const
 Returns true and prints error message if the module has unset parameters which the user has to set in the steering file.
 
const ModuleParamListgetParamList () const
 Return module param list.
 
template<typename T >
ModuleParam< T > & getParam (const std::string &name) const
 Returns a reference to a parameter.
 
bool hasReturnValue () const
 Return true if this module has a valid return value set.
 
int getReturnValue () const
 Return the return value set by this module.
 
std::shared_ptr< PathElementclone () const override
 Create an independent copy of this module.
 
std::shared_ptr< boost::python::list > getParamInfoListPython () const
 Returns a python list of all parameters.
 

Static Public Member Functions

static void exposePythonAPI ()
 Exposes methods of the Module class to Python.
 

Protected Member Functions

virtual void def_initialize ()
 Wrappers to make the methods without "def_" prefix callable from Python.
 
virtual void def_beginRun ()
 Wrapper method for the virtual function beginRun() that has the implementation to be used in a call from Python.
 
virtual void def_event ()
 Wrapper method for the virtual function event() that has the implementation to be used in a call from Python.
 
virtual void def_endRun ()
 This method can receive that the current run ends as a call from the Python side.
 
virtual void def_terminate ()
 Wrapper method for the virtual function terminate() that has the implementation to be used in a call from Python.
 
void setDescription (const std::string &description)
 Sets the description of the module.
 
void setType (const std::string &type)
 Set the module type.
 
template<typename T >
void addParam (const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
 Adds a new parameter to the module.
 
template<typename T >
void addParam (const std::string &name, T &paramVariable, const std::string &description)
 Adds a new enforced parameter to the module.
 
void setReturnValue (int value)
 Sets the return value for this module as integer.
 
void setReturnValue (bool value)
 Sets the return value for this module as bool.
 
void setParamList (const ModuleParamList &params)
 Replace existing parameter list.
 

Private Member Functions

std::list< ModulePtrgetModules () const override
 no submodules, return empty list
 
std::string getPathString () const override
 return the module name.
 
void setParamPython (const std::string &name, const boost::python::object &pyObj)
 Implements a method for setting boost::python objects.
 
void setParamPythonDict (const boost::python::dict &dictionary)
 Implements a method for reading the parameter values from a boost::python dictionary.
 

Private Attributes

double m_input_Time_eqv
 time stamp eqv
 
std::vector< Int_t > m_input_ts
 time stamp start and stop
 
std::vector< std::string > m_inputFileNames
 list of file names
 
Double_t m_input_Z_scaling [4]
 time stamp start and stop
 
std::vector< Double_t > m_input_Z
 input Z
 
Int_t m_input_BGSol
 time stamp start and stop
 
Int_t m_input_ToSol
 time stamp start and stop
 
Int_t m_input_part
 which components to take into account
 
std::vector< Double_t > m_input_GasCorrection
 time stamp start and stop
 
std::vector< std::string > m_inputRateHistoNames
 list of file names
 
std::vector< std::string > m_inputDoseHistoNames
 list of file names
 
std::vector< std::string > m_inputRateHistoNamesVrs
 list of file names
 
std::vector< std::string > m_inputDoseHistoNamesVrs
 list of file names
 
std::vector< Double_t > m_input_LT_DIA_dose
 list of DIA LT dose
 
std::vector< Double_t > m_input_HT_DIA_dose
 list of DIA HT dose
 
std::vector< Double_t > m_input_LC_DIA_dose [12]
 list of DIA LC dose
 
std::vector< Double_t > m_input_HC_DIA_dose [12]
 list of DIA HC dose
 
std::vector< Double_t > m_input_LB_DIA_dose [12]
 list of DIA LB dose
 
std::vector< Double_t > m_input_HB_DIA_dose [12]
 list of DIA HB dose
 
std::vector< Double_t > m_input_LC_DIA_dose_av
 list of DIA LC dose
 
std::vector< Double_t > m_input_HC_DIA_dose_av
 list of DIA HC dose
 
std::vector< Double_t > m_input_LB_DIA_dose_av
 list of DIA LB dose
 
std::vector< Double_t > m_input_HB_DIA_dose_av
 list of DIA HB dose
 
std::vector< Double_t > m_input_LT_PIN_dose
 list of PIN LT dose
 
std::vector< Double_t > m_input_HT_PIN_dose
 list of PIN HT dose
 
std::vector< Double_t > m_input_LC_PIN_dose [12]
 list of PIN LC dose
 
std::vector< Double_t > m_input_HC_PIN_dose [12]
 list of PIN HC dose
 
std::vector< Double_t > m_input_LB_PIN_dose [12]
 list of PIN LB dose
 
std::vector< Double_t > m_input_HB_PIN_dose [12]
 list of PIN HB dose
 
std::vector< Double_t > m_input_LC_PIN_dose_av
 list of PIN LC dose
 
std::vector< Double_t > m_input_HC_PIN_dose_av
 list of PIN HC dose
 
std::vector< Double_t > m_input_LB_PIN_dose_av
 list of PIN LB dose
 
std::vector< Double_t > m_input_HB_PIN_dose_av
 list of PIN HB dose
 
std::vector< Double_t > m_input_LT_BGO_dose
 list of BGO LT dose
 
std::vector< Double_t > m_input_HT_BGO_dose
 list of BGO HT dose
 
std::vector< Double_t > m_input_LC_BGO_dose [12]
 list of BGO LC dose
 
std::vector< Double_t > m_input_HC_BGO_dose [12]
 list of BGO HC dose
 
std::vector< Double_t > m_input_LB_BGO_dose [12]
 list of BGO LB dose
 
std::vector< Double_t > m_input_HB_BGO_dose [12]
 list of BGO HB dose
 
std::vector< Double_t > m_input_LC_BGO_dose_av
 list of BGO LC dose
 
std::vector< Double_t > m_input_HC_BGO_dose_av
 list of BGO HC dose
 
std::vector< Double_t > m_input_LB_BGO_dose_av
 list of BGO LB dose
 
std::vector< Double_t > m_input_HB_BGO_dose_av
 list of BGO HB dose
 
std::vector< Double_t > m_input_LT_HE3_rate
 list of HE3 LT rate
 
std::vector< Double_t > m_input_HT_HE3_rate
 list of HE3 HT rate
 
std::vector< Double_t > m_input_LC_HE3_rate [12]
 list of HE3 LC rate
 
std::vector< Double_t > m_input_HC_HE3_rate [12]
 list of HE3 HC rate
 
std::vector< Double_t > m_input_LB_HE3_rate [12]
 list of HE3 LB rate
 
std::vector< Double_t > m_input_HB_HE3_rate [12]
 list of HE3 HB rate
 
std::vector< Double_t > m_input_LC_HE3_rate_av
 list of HE3 LC rate
 
std::vector< Double_t > m_input_HC_HE3_rate_av
 list of HE3 HC rate
 
std::vector< Double_t > m_input_LB_HE3_rate_av
 list of HE3 LB rate
 
std::vector< Double_t > m_input_HB_HE3_rate_av
 list of HE3 HB rate
 
std::vector< Double_t > m_input_LT_TPC_rate
 list of TPC LT rate
 
std::vector< Double_t > m_input_HT_TPC_rate
 list of TPC HT rate
 
std::vector< Double_t > m_input_LC_TPC_rate [12]
 list of TPC LC rate
 
std::vector< Double_t > m_input_HC_TPC_rate [12]
 list of TPC HC rate
 
std::vector< Double_t > m_input_LB_TPC_rate [12]
 list of TPC LB rate
 
std::vector< Double_t > m_input_HB_TPC_rate [12]
 list of TPC HB rate
 
std::vector< Double_t > m_input_LC_TPC_rate_av
 list of TPC LC rate
 
std::vector< Double_t > m_input_HC_TPC_rate_av
 list of TPC HC rate
 
std::vector< Double_t > m_input_LB_TPC_rate_av
 list of TPC LB rate
 
std::vector< Double_t > m_input_HB_TPC_rate_av
 list of TPC HB rate
 
std::vector< Double_t > m_input_LT_TPC_dose
 list of TPC LT dose
 
std::vector< Double_t > m_input_HT_TPC_dose
 list of TPC HT dose
 
std::vector< Double_t > m_input_LC_TPC_dose [12]
 list of TPC LC dose
 
std::vector< Double_t > m_input_HC_TPC_dose [12]
 list of TPC HC dose
 
std::vector< Double_t > m_input_LB_TPC_dose [12]
 list of TPC LB dose
 
std::vector< Double_t > m_input_HB_TPC_dose [12]
 list of TPC HB dose
 
std::vector< Double_t > m_input_LC_TPC_dose_av
 list of TPC LC dose
 
std::vector< Double_t > m_input_HC_TPC_dose_av
 list of TPC HC dose
 
std::vector< Double_t > m_input_LB_TPC_dose_av
 list of TPC LB dose
 
std::vector< Double_t > m_input_HB_TPC_dose_av
 list of TPC HB dose
 
std::vector< Double_t > m_input_LT_TPC_angular_rate
 list of TPC_angular LT rate
 
std::vector< Double_t > m_input_HT_TPC_angular_rate
 list of TPC_angular HT rate
 
std::vector< Double_t > m_input_LC_TPC_angular_rate [12]
 list of TPC_angular LC rate
 
std::vector< Double_t > m_input_HC_TPC_angular_rate [12]
 list of TPC_angular HC rate
 
std::vector< Double_t > m_input_LB_TPC_angular_rate [12]
 list of TPC_angular LB rate
 
std::vector< Double_t > m_input_HB_TPC_angular_rate [12]
 list of TPC_angular HB rate
 
std::vector< Double_t > m_input_LC_TPC_angular_rate_av
 list of TPC_angular LC rate
 
std::vector< Double_t > m_input_HC_TPC_angular_rate_av
 list of TPC_angular HC rate
 
std::vector< Double_t > m_input_LB_TPC_angular_rate_av
 list of TPC_angular LB rate
 
std::vector< Double_t > m_input_HB_TPC_angular_rate_av
 list of TPC_angular HB rate
 
std::vector< Double_t > m_input_LT_TPC_angular_dose
 list of TPC_angular LT dose
 
std::vector< Double_t > m_input_HT_TPC_angular_dose
 list of TPC_angular HT dose
 
std::vector< Double_t > m_input_LC_TPC_angular_dose [12]
 list of TPC_angular LC dose
 
std::vector< Double_t > m_input_HC_TPC_angular_dose [12]
 list of TPC_angular HC dose
 
std::vector< Double_t > m_input_LB_TPC_angular_dose [12]
 list of TPC_angular LB dose
 
std::vector< Double_t > m_input_HB_TPC_angular_dose [12]
 list of TPC_angular HB dose
 
std::vector< Double_t > m_input_LC_TPC_angular_dose_av
 list of TPC_angular LC dose
 
std::vector< Double_t > m_input_HC_TPC_angular_dose_av
 list of TPC_angular HC dose
 
std::vector< Double_t > m_input_LB_TPC_angular_dose_av
 list of TPC_angular LB dose
 
std::vector< Double_t > m_input_HB_TPC_angular_dose_av
 list of TPC_angular HB dose
 
std::vector< Double_t > m_input_LT_CSI_dose
 list of CSI LT dose
 
std::vector< Double_t > m_input_HT_CSI_dose
 list of CSI HT dose
 
std::vector< Double_t > m_input_LC_CSI_dose [12]
 list of CSI LC dose
 
std::vector< Double_t > m_input_HC_CSI_dose [12]
 list of CSI HC dose
 
std::vector< Double_t > m_input_LB_CSI_dose [12]
 list of CSI LB dose
 
std::vector< Double_t > m_input_HB_CSI_dose [12]
 list of CSI HB dose
 
std::vector< Double_t > m_input_LC_CSI_dose_av
 list of CSI LC dose
 
std::vector< Double_t > m_input_HC_CSI_dose_av
 list of CSI HC dose
 
std::vector< Double_t > m_input_LB_CSI_dose_av
 list of CSI LB dose
 
std::vector< Double_t > m_input_HB_CSI_dose_av
 list of CSI HB dose
 
std::vector< Double_t > m_input_LT_CSI_dose_binE
 list of CSI LT dose_binE
 
std::vector< Double_t > m_input_HT_CSI_dose_binE
 list of CSI HT dose_binE
 
std::vector< Double_t > m_input_LC_CSI_dose_binE [12]
 list of CSI LC dose_binE
 
std::vector< Double_t > m_input_HC_CSI_dose_binE [12]
 list of CSI HC dose_binE
 
std::vector< Double_t > m_input_LB_CSI_dose_binE [12]
 list of CSI LB dose_binE
 
std::vector< Double_t > m_input_HB_CSI_dose_binE [12]
 list of CSI HB dose_binE
 
std::vector< Double_t > m_input_LC_CSI_dose_binE_av
 list of CSI LC dose_binE
 
std::vector< Double_t > m_input_HC_CSI_dose_binE_av
 list of CSI HC dose_binE
 
std::vector< Double_t > m_input_LB_CSI_dose_binE_av
 list of CSI LB dose_binE
 
std::vector< Double_t > m_input_HB_CSI_dose_binE_av
 list of CSI HB dose_binE
 
std::vector< Double_t > m_input_LT_CSI_rate
 list of CSI LT rate
 
std::vector< Double_t > m_input_HT_CSI_rate
 list of CSI HT rate
 
std::vector< Double_t > m_input_LC_CSI_rate [12]
 list of CSI LC rate
 
std::vector< Double_t > m_input_HC_CSI_rate [12]
 list of CSI HC rate
 
std::vector< Double_t > m_input_LB_CSI_rate [12]
 list of CSI LB rate
 
std::vector< Double_t > m_input_HB_CSI_rate [12]
 list of CSI HB rate
 
std::vector< Double_t > m_input_LC_CSI_rate_av
 list of CSI LC rate
 
std::vector< Double_t > m_input_HC_CSI_rate_av
 list of CSI HC rate
 
std::vector< Double_t > m_input_LB_CSI_rate_av
 list of CSI LB rate
 
std::vector< Double_t > m_input_HB_CSI_rate_av
 list of CSI HB rate
 
std::vector< Double_t > m_input_LT_CLAWS_rate
 list of CLAWS_rate LT

 
std::vector< Double_t > m_input_HT_CLAWS_rate
 list of CLAWS_rate HT

 
std::vector< Double_t > m_input_LC_CLAWS_rate [12]
 list of CLAWS_rate LC

 
std::vector< Double_t > m_input_HC_CLAWS_rate [12]
 list of CLAWS_rate HC

 
std::vector< Double_t > m_input_LB_CLAWS_rate [12]
 list of CLAWS_rate LB

 
std::vector< Double_t > m_input_HB_CLAWS_rate [12]
 list of CLAWS_rate HB

 
std::vector< Double_t > m_input_LC_CLAWS_rate_av
 list of CLAWS_rate LC

 
std::vector< Double_t > m_input_HC_CLAWS_rate_av
 list of CLAWS_rate HC

 
std::vector< Double_t > m_input_LB_CLAWS_rate_av
 list of CLAWS_rate LB

 
std::vector< Double_t > m_input_HB_CLAWS_rate_av
 list of CLAWS_rate HB

 
std::vector< Double_t > m_input_LT_QCSS_rate
 list of QCSS_rate LT

 
std::vector< Double_t > m_input_HT_QCSS_rate
 list of QCSS_rate HT

 
std::vector< Double_t > m_input_LC_QCSS_rate [12]
 list of QCSS_rate LC

 
std::vector< Double_t > m_input_HC_QCSS_rate [12]
 list of QCSS_rate HC

 
std::vector< Double_t > m_input_LB_QCSS_rate [12]
 list of QCSS_rate LB

 
std::vector< Double_t > m_input_HB_QCSS_rate [12]
 list of QCSS_rate HB

 
std::vector< Double_t > m_input_LC_QCSS_rate_av
 list of QCSS_rate LC

 
std::vector< Double_t > m_input_HC_QCSS_rate_av
 list of QCSS_rate HC

 
std::vector< Double_t > m_input_LB_QCSS_rate_av
 list of QCSS_rate LB

 
std::vector< Double_t > m_input_HB_QCSS_rate_av
 list of QCSS_rate HB

 
std::vector< Double_t > m_input_I_HER
 HER current and error.
 
std::vector< Double_t > m_input_I_LER
 LER current and error.
 
std::vector< Double_t > m_input_P_LER
 LER pressure and error.
 
std::vector< Double_t > m_input_P_HER
 HER pressure and error.
 
std::vector< Double_t > m_input_bunchNb_LER
 LER bunch number and error.
 
std::vector< Double_t > m_input_bunchNb_HER
 HER bunch number and error.
 
Double_t m_input_data_bunchNb_LER
 LER bunch number and error.
 
Double_t m_input_data_bunchNb_HER
 HER bunch number and error.
 
std::string m_input_data_SingleBeam
 LER or HER or Both.
 
std::vector< Double_t > m_input_sigma_x_LER
 LER beam size and errors.
 
std::vector< Double_t > m_input_sigma_x_HER
 HER beam size and errors.
 
std::vector< Double_t > m_input_sigma_y_LER
 LER beam size and errors.
 
std::vector< Double_t > m_input_sigma_y_HER
 HER beam size and errors.
 
std::vector< Double_t > m_input_LB_SAD_RLR
 list of SAD_RLR LB dose
 
std::vector< Double_t > m_input_HB_SAD_RLR
 list of SAD_RLR HB dose
 
std::vector< Double_t > m_input_LC_SAD_RLR
 list of SAD_RLR LC dose
 
std::vector< Double_t > m_input_HC_SAD_RLR
 list of SAD_RLR HC dose
 
std::vector< Double_t > m_input_LB_SAD_RLR_av
 list of SAD_RLR LB dose
 
std::vector< Double_t > m_input_HB_SAD_RLR_av
 list of SAD_RLR HB dose
 
std::vector< Double_t > m_input_LC_SAD_RLR_av
 list of SAD_RLR LC dose
 
std::vector< Double_t > m_input_HC_SAD_RLR_av
 list of SAD_RLR HC dose
 
std::vector< Double_t > m_input_LT_SAD_RLR
 list of SAD_RLR LT dose
 
std::vector< Double_t > m_input_HT_SAD_RLR
 list of SAD_RLR HT dose
 
std::vector< Double_t > m_input_LT_DOSI
 list of PIN LT dose
 
std::vector< Double_t > m_input_HT_DOSI
 list of PIN HT dose
 
std::vector< Double_t > m_input_LC_DOSI [12]
 list of PIN LC dose
 
std::vector< Double_t > m_input_HC_DOSI [12]
 list of PIN HC dose
 
std::vector< Double_t > m_input_LB_DOSI [12]
 list of PIN LB dose
 
std::vector< Double_t > m_input_HB_DOSI [12]
 list of PIN HB dose
 
std::vector< Double_t > m_input_LC_DOSI_av
 list of PIN LC dose
 
std::vector< Double_t > m_input_HC_DOSI_av
 list of PIN HC dose
 
std::vector< Double_t > m_input_LB_DOSI_av
 list of PIN LB dose
 
std::vector< Double_t > m_input_HB_DOSI_av
 list of PIN HB dose
 
Double_t m_input_PIN_width
 PIN width.
 
std::vector< Double_t > m_input_HE3_EfCor
 HE3 inefficiency correction.
 
TF1 * fctRate_HB = nullptr
 fct HB
 
TF1 * fctRate_HC = nullptr
 fct HC
 
TF1 * fctRate_LB = nullptr
 fct LB
 
TF1 * fctRate_LC = nullptr
 fct LC
 
TTree * m_treeBEAST = 0
 BEAST tree pointer.
 
TTree * m_treeTruth = 0
 Truth tree pointer.
 
TChain * m_tree = 0
 tree pointer
 
std::string m_inputFileName
 input file name
 
std::vector< std::string > m_inputHistoFileNames
 list of histo.
 
std::string m_outputFileName
 output file name
 
TFile * m_file
 TFile.
 
BEAST_v5::BEASTTree_v5 m_beast
 BEAST structure.
 
int m_numEntries
 number of ntuple entries
 
int m_entryCounter
 entry counter
 
unsigned m_numEvents = 0
 number of events (tree entries) in the sample
 
unsigned m_eventCount = 0
 current event (tree entry)
 
unsigned m_exp = 0
 Date of the day.
 
Int_t m_DayBin
 day bin
 
std::string m_name
 The name of the module, saved as a string (user-modifiable)
 
std::string m_type
 The type of the module, saved as a string.
 
std::string m_package
 Package this module is found in (may be empty).
 
std::string m_description
 The description of the module.
 
unsigned int m_propertyFlags
 The properties of the module as bitwise or (with |) of EModulePropFlags.
 
LogConfig m_logConfig
 The log system configuration of the module.
 
ModuleParamList m_moduleParamList
 List storing and managing all parameter of the module.
 
bool m_hasReturnValue
 True, if the return value is set.
 
int m_returnValue
 The return value.
 
std::vector< ModuleConditionm_conditions
 Module condition, only non-null if set.
 

Detailed Description

Read SKB PVs, simulated measurements of BEAST sensors, and write scaled simulated Ntuple in BEAST phase 1 data format.

Definition at line 28 of file NtuplePhase1_v6Module.h.

Member Typedef Documentation

◆ EAfterConditionPath

Forward the EAfterConditionPath definition from the ModuleCondition.

Definition at line 88 of file Module.h.

Member Enumeration Documentation

◆ EModulePropFlags

enum EModulePropFlags
inherited

Each module can be tagged with property flags, which indicate certain features of the module.

Enumerator
c_Input 

This module is an input module (reads data).

c_Output 

This module is an output module (writes data).

c_ParallelProcessingCertified 

This module can be run in parallel processing mode safely (All I/O must be done through the data store, in particular, the module must not write any files.)

c_HistogramManager 

This module is used to manage histograms accumulated by other modules.

c_InternalSerializer 

This module is an internal serializer/deserializer for parallel processing.

c_TerminateInAllProcesses 

When using parallel processing, call this module's terminate() function in all processes().

This will also ensure that there is exactly one process (single-core if no parallel modules found) or at least one input, one main and one output process.

c_DontCollectStatistics 

No statistics is collected for this module.

Definition at line 77 of file Module.h.

77 {
78 c_Input = 1,
79 c_Output = 2,
85 };
@ c_HistogramManager
This module is used to manage histograms accumulated by other modules.
Definition: Module.h:81
@ c_Input
This module is an input module (reads data).
Definition: Module.h:78
@ c_DontCollectStatistics
No statistics is collected for this module.
Definition: Module.h:84
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
Definition: Module.h:80
@ c_InternalSerializer
This module is an internal serializer/deserializer for parallel processing.
Definition: Module.h:82
@ c_Output
This module is an output module (writes data).
Definition: Module.h:79
@ c_TerminateInAllProcesses
When using parallel processing, call this module's terminate() function in all processes().
Definition: Module.h:83

Constructor & Destructor Documentation

◆ NtuplePhase1_v6Module()

Constructor.

Definition at line 44 of file NtuplePhase1_v6Module.cc.

44 : Module()
45{
46 // set module description (e.g. insert text)
47 setDescription("Read SKB PVs, simulated measurements of BEAST sensors, and write scaled simulated Ntuple in BEAST phase 1 data format");
48
49
50 // Add parameters
51 addParam("inputFileNames", m_inputFileNames,
52 "List of files with SKB PVs ");
53
54 addParam("outputFileName", m_outputFileName, "Output file name");
55
56 //addParam("input_ts", m_input_ts, "Input time stamp start and stop");
57
58 addParam("input_Time_eqv", m_input_Time_eqv, "time-eqv");
59
60 addParam("input_I_HER", m_input_I_HER, "HER current");
61 addParam("input_I_LER", m_input_I_LER, "LER current");
62
63 addParam("input_P_HER", m_input_P_HER, "HER pressure");
64 addParam("input_P_LER", m_input_P_LER, "LER pressure");
65
66 addParam("input_sigma_x_HER", m_input_sigma_x_HER, "HER beam size");
67 addParam("input_sigma_x_LER", m_input_sigma_x_LER, "LER beam size");
68 addParam("input_sigma_y_HER", m_input_sigma_y_HER, "HER beam size");
69 addParam("input_sigma_y_LER", m_input_sigma_y_LER, "LER beam size");
70
71 addParam("input_bunchNb_HER", m_input_bunchNb_HER, "HER bunch number");
72 addParam("input_bunchNb_LER", m_input_bunchNb_LER, "LER bunch number");
73
74 addParam("input_data_bunchNb_HER", m_input_data_bunchNb_HER, "HER bunch number");
75 addParam("input_data_bunchNb_LER", m_input_data_bunchNb_LER, "LER bunch number");
76 addParam("input_data_SingleBeam", m_input_data_SingleBeam, "LER/HER/Both");
77
78 addParam("input_LT_SAD_RLR", m_input_LT_SAD_RLR, "SAD Low Ring Loss Rate");
79 addParam("input_HT_SAD_RLR", m_input_HT_SAD_RLR, "SAD High Ring Loss Rate");
80 addParam("input_LC_SAD_RLR", m_input_LC_SAD_RLR, "SAD Low Ring Loss Rate");
81 addParam("input_HC_SAD_RLR", m_input_HC_SAD_RLR, "SAD High Ring Loss Rate");
82 addParam("input_LB_SAD_RLR", m_input_LB_SAD_RLR, "SAD Low Ring Loss Rate");
83 addParam("input_HB_SAD_RLR", m_input_HB_SAD_RLR, "SAD High Ring Loss Rate");
84 addParam("input_LC_SAD_RLR_av", m_input_LC_SAD_RLR_av, "SAD Low Ring Loss Rate");
85 addParam("input_HC_SAD_RLR_av", m_input_HC_SAD_RLR_av, "SAD High Ring Loss Rate");
86 addParam("input_LB_SAD_RLR_av", m_input_LB_SAD_RLR_av, "SAD Low Ring Loss Rate");
87 addParam("input_HB_SAD_RLR_av", m_input_HB_SAD_RLR_av, "SAD High Ring Loss Rate");
88
89 addParam("input_BGSol", m_input_BGSol, "BG solution 0 or 1");
90 addParam("input_ToSol", m_input_ToSol, "To solution 0 or 1");
91
92 addParam("input_Z", m_input_Z, "Z number");
93
94 addParam("input_GasCorrection", m_input_GasCorrection, "GasCorrection");
95
96 addParam("input_part", m_input_part, "Part");
97
98 addParam("inputHistoFileNames", m_inputHistoFileNames,
99 "List of root files with histograms");
100
101 addParam("inputRateHistoNames", m_inputRateHistoNames,
102 "List of rate histograms");
103 addParam("inputDoseHistoNames", m_inputDoseHistoNames,
104 "List of dose histograms");
105 addParam("inputRateHistoNamesVrs", m_inputRateHistoNamesVrs,
106 "List of rate histograms");
107 addParam("inputDoseHistoNamesVrs", m_inputDoseHistoNamesVrs,
108 "List of dose histograms");
109
110
111 addParam("input_PIN_width", m_input_PIN_width, "PIN width");
112 addParam("input_HE3_EfCor", m_input_HE3_EfCor, "HE3 inefficiency correction");
113
114 // initialize other private data members
115 m_file = NULL;
116 m_tree = NULL;
117 m_treeBEAST = NULL;
118 m_beast.clear();
119
120 m_numEntries = 0;
121 m_entryCounter = 0;
122
123 m_DayBin = 0;
124}
void setDescription(const std::string &description)
Sets the description of the module.
Definition: Module.cc:214
Module()
Constructor.
Definition: Module.cc:30
Int_t m_input_BGSol
time stamp start and stop
std::vector< Double_t > m_input_I_HER
HER current and error.
std::vector< Double_t > m_input_sigma_y_HER
HER beam size and errors.
std::vector< Double_t > m_input_HB_SAD_RLR_av
list of SAD_RLR HB dose
std::vector< Double_t > m_input_bunchNb_HER
HER bunch number and error.
std::vector< Double_t > m_input_sigma_x_LER
LER beam size and errors.
std::vector< Double_t > m_input_P_HER
HER pressure and error.
std::vector< Double_t > m_input_sigma_x_HER
HER beam size and errors.
std::vector< Double_t > m_input_HT_SAD_RLR
list of SAD_RLR HT dose
std::vector< std::string > m_inputRateHistoNamesVrs
list of file names
Double_t m_input_data_bunchNb_LER
LER bunch number and error.
std::vector< Double_t > m_input_LB_SAD_RLR_av
list of SAD_RLR LB dose
std::vector< Double_t > m_input_LC_SAD_RLR_av
list of SAD_RLR LC dose
int m_numEntries
number of ntuple entries
Double_t m_input_data_bunchNb_HER
HER bunch number and error.
std::vector< Double_t > m_input_HC_SAD_RLR
list of SAD_RLR HC dose
std::vector< Double_t > m_input_LB_SAD_RLR
list of SAD_RLR LB dose
Int_t m_input_part
which components to take into account
std::vector< std::string > m_inputFileNames
list of file names
std::string m_input_data_SingleBeam
LER or HER or Both.
std::vector< Double_t > m_input_HE3_EfCor
HE3 inefficiency correction.
std::vector< Double_t > m_input_GasCorrection
time stamp start and stop
std::vector< Double_t > m_input_HC_SAD_RLR_av
list of SAD_RLR HC dose
std::vector< std::string > m_inputDoseHistoNamesVrs
list of file names
std::vector< Double_t > m_input_HB_SAD_RLR
list of SAD_RLR HB dose
BEAST_v5::BEASTTree_v5 m_beast
BEAST structure.
std::vector< std::string > m_inputDoseHistoNames
list of file names
double m_input_Time_eqv
time stamp eqv
Int_t m_input_ToSol
time stamp start and stop
std::vector< Double_t > m_input_LT_SAD_RLR
list of SAD_RLR LT dose
std::vector< std::string > m_inputRateHistoNames
list of file names
std::vector< Double_t > m_input_P_LER
LER pressure and error.
std::vector< Double_t > m_input_I_LER
LER current and error.
std::vector< Double_t > m_input_sigma_y_LER
LER beam size and errors.
TTree * m_treeBEAST
BEAST tree pointer.
std::vector< Double_t > m_input_Z
input Z
std::vector< Double_t > m_input_LC_SAD_RLR
list of SAD_RLR LC dose
std::vector< std::string > m_inputHistoFileNames
list of histo.
std::vector< Double_t > m_input_bunchNb_LER
LER bunch number and error.
std::string m_outputFileName
output file name
void addParam(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
Definition: Module.h:560
void clear()
TPC angular dose.
Definition: BEASTTree_v5.h:227

◆ ~NtuplePhase1_v6Module()

~NtuplePhase1_v6Module ( )
virtual

Destructor.

Definition at line 126 of file NtuplePhase1_v6Module.cc.

127{
128}

Member Function Documentation

◆ beginRun()

void beginRun ( void  )
overridevirtual

Called when entering a new run.

Set run dependent things like run header parameters, alignment, etc.

Reimplemented from Module.

Definition at line 1034 of file NtuplePhase1_v6Module.cc.

1035{
1036}

◆ clone()

std::shared_ptr< PathElement > clone ( ) const
overridevirtualinherited

Create an independent copy of this module.

Note that parameters are shared, so changing them on a cloned module will also affect the original module.

Implements PathElement.

Definition at line 179 of file Module.cc.

180{
182 newModule->m_moduleParamList.setParameters(getParamList());
183 newModule->setName(getName());
184 newModule->m_package = m_package;
185 newModule->m_propertyFlags = m_propertyFlags;
186 newModule->m_logConfig = m_logConfig;
187 newModule->m_conditions = m_conditions;
188
189 return newModule;
190}
std::shared_ptr< Module > registerModule(const std::string &moduleName, std::string sharedLibPath="") noexcept(false)
Creates an instance of a module and registers it to the ModuleManager.
static ModuleManager & Instance()
Exception is thrown if the requested module could not be created by the ModuleManager.
const ModuleParamList & getParamList() const
Return module param list.
Definition: Module.h:363
const std::string & getName() const
Returns the name of the module.
Definition: Module.h:187
const std::string & getType() const
Returns the type of the module (i.e.
Definition: Module.cc:41
unsigned int m_propertyFlags
The properties of the module as bitwise or (with |) of EModulePropFlags.
Definition: Module.h:512
LogConfig m_logConfig
The log system configuration of the module.
Definition: Module.h:514
std::vector< ModuleCondition > m_conditions
Module condition, only non-null if set.
Definition: Module.h:521
std::string m_package
Package this module is found in (may be empty).
Definition: Module.h:510
std::shared_ptr< Module > ModulePtr
Defines a pointer to a module object as a boost shared pointer.
Definition: Module.h:43

◆ def_beginRun()

virtual void def_beginRun ( )
inlineprotectedvirtualinherited

Wrapper method for the virtual function beginRun() that has the implementation to be used in a call from Python.

Reimplemented in PyModule.

Definition at line 426 of file Module.h.

426{ beginRun(); }
virtual void beginRun()
Called when entering a new run.
Definition: Module.h:147

◆ def_endRun()

virtual void def_endRun ( )
inlineprotectedvirtualinherited

This method can receive that the current run ends as a call from the Python side.

For regular C++-Modules that forwards the call to the regular endRun() method.

Reimplemented in PyModule.

Definition at line 439 of file Module.h.

439{ endRun(); }
virtual void endRun()
This method is called if the current run ends.
Definition: Module.h:166

◆ def_event()

virtual void def_event ( )
inlineprotectedvirtualinherited

Wrapper method for the virtual function event() that has the implementation to be used in a call from Python.

Reimplemented in PyModule.

Definition at line 432 of file Module.h.

432{ event(); }
virtual void event()
This method is the core of the module.
Definition: Module.h:157

◆ def_initialize()

virtual void def_initialize ( )
inlineprotectedvirtualinherited

Wrappers to make the methods without "def_" prefix callable from Python.

Overridden in PyModule. Wrapper method for the virtual function initialize() that has the implementation to be used in a call from Python.

Reimplemented in PyModule.

Definition at line 420 of file Module.h.

420{ initialize(); }
virtual void initialize()
Initialize the Module.
Definition: Module.h:109

◆ def_terminate()

virtual void def_terminate ( )
inlineprotectedvirtualinherited

Wrapper method for the virtual function terminate() that has the implementation to be used in a call from Python.

Reimplemented in PyModule.

Definition at line 445 of file Module.h.

445{ terminate(); }
virtual void terminate()
This method is called at the end of the event processing.
Definition: Module.h:176

◆ endRun()

void endRun ( void  )
overridevirtual

End-of-run action.

Save run-related stuff, such as statistics.

Reimplemented from Module.

Definition at line 1773 of file NtuplePhase1_v6Module.cc.

1774{
1775}

◆ evalCondition()

bool evalCondition ( ) const
inherited

If at least one condition was set, it is evaluated and true returned if at least one condition returns true.

If no condition or result value was defined, the method returns false. Otherwise, the condition is evaluated and true returned, if at least one condition returns true. To speed up the evaluation, the condition strings were already parsed in the method if_value().

Returns
True if at least one condition and return value exists and at least one condition expression was evaluated to true.

Definition at line 96 of file Module.cc.

97{
98 if (m_conditions.empty()) return false;
99
100 //okay, a condition was set for this Module...
101 if (!m_hasReturnValue) {
102 B2FATAL("A condition was set for '" << getName() << "', but the module did not set a return value!");
103 }
104
105 for (const auto& condition : m_conditions) {
106 if (condition.evaluate(m_returnValue)) {
107 return true;
108 }
109 }
110 return false;
111}
int m_returnValue
The return value.
Definition: Module.h:519
bool m_hasReturnValue
True, if the return value is set.
Definition: Module.h:518

◆ event()

void event ( void  )
overridevirtual

Event processor.

Reimplemented from Module.

Definition at line 1039 of file NtuplePhase1_v6Module.cc.

1040{
1041 m_beast.clear();
1042 // create data store objects
1043
1044 StoreObjPtr<EventMetaData> evtMetaData;
1045 evtMetaData.create();
1046
1047 if (m_eventCount == m_numEvents) {
1048 evtMetaData->setEndOfData(); // event processing
1049 return;
1050 }
1051
1052 m_tree->GetEntry(m_eventCount);
1053
1054 double Zeff_LER = 2.7;
1055 if (m_beast.SKB_LER_Zeff_D02 != 0 && m_beast.SKB_LER_Zeff_D02->size() > 0) Zeff_LER = m_beast.SKB_LER_Zeff_D02->at(0);
1056 //cout << "Zeff_DO2 " << Zeff_LER << endl;
1057 double Zeff_LC = 1;
1058 double Zeff_LB = 1;
1059 //if (Zeff_LER == 0) {
1060 //Zeff_LER = 2.7;
1061 //Zeff_LC = 1.0;
1062 //Zeff_LB = 1.0;
1063 //} else
1064 if (Zeff_LER > 0 && Zeff_LER < 40) {
1065 Zeff_LC = fctRate_LC->Eval(Zeff_LER) / fctRate_LC->Eval(7) / m_input_Z_scaling[1];
1066 Zeff_LB = fctRate_LB->Eval(Zeff_LER) / fctRate_LB->Eval(7) / m_input_Z_scaling[3];
1067 }
1068 //cout << "Zeff_LC " << Zeff_LC << " Zeff_LB " << Zeff_LB << " Zeff_LER " << Zeff_LER << endl;
1069 if (m_input_Z[1] == 2.7 && m_input_Z[3] == 2.7) {
1070 Zeff_LC = 1;
1071 Zeff_LB = 1;
1072 }
1073 double Zeff_HC = m_input_Z_scaling[0];
1074 double Zeff_HB = m_input_Z_scaling[2];
1075
1076 double I_HER = 0;
1077 if (m_beast.SKB_HER_current != 0 && m_beast.SKB_HER_current->size() > 0) I_HER = m_beast.SKB_HER_current->at(0);
1078 if (m_input_I_HER[1] > 0) I_HER += gRandom->Gaus(0, m_input_I_HER[1]);
1079 double I_LER = 0;
1080 if (m_beast.SKB_LER_current != 0 && m_beast.SKB_LER_current->size() > 0) I_LER = m_beast.SKB_LER_current->at(0);
1081 if (m_input_I_LER[1] > 0) I_LER += gRandom->Gaus(0, m_input_I_LER[1]);
1082 /*double P_HER = 0;
1083 if (m_beast.SKB_HER_pressure_average != 0
1084 && m_beast.SKB_HER_pressure_average->size() > 0) P_HER = m_beast.SKB_HER_pressure_average->at(
1085 0) * 0.00750062 * 1e9 * m_input_GasCorrection[0];*/
1086 //if (m_input_P_HER[1] > 0) P_HER += gRandom->Gaus(0, m_input_P_HER[1]);
1087 //double P_LER = 0;
1088 /*if (m_beast.SKB_LER_pressure_average != 0
1089 && m_beast.SKB_LER_pressure_average->size() > 0) P_LER = m_beast.SKB_LER_pressure_average->at(
1090 0) * 0.00750062 * 1e9 * m_input_GasCorrection[1];*/
1091 //if (m_input_P_LER[1] > 0) P_LER += gRandom->Gaus(0, m_input_P_LER[1]);
1092 double P_corrected_HER = 0;
1095 0) * 0.00750062 * 1e9;
1096 if (m_input_P_HER[1] > 0) P_corrected_HER += gRandom->Gaus(0, m_input_P_HER[1]);
1097 double P_corrected_LER = 0;
1100 0) * 0.00750062 * 1e9;
1101 if (m_input_P_LER[1] > 0) P_corrected_LER += gRandom->Gaus(0, m_input_P_LER[1]);
1102
1103 double sigma_y_HER = 0;
1104 double sigma_x_HER = 0;
1108 sigma_y_HER = m_beast.SKB_HER_correctedBeamSize_xray_Y->at(0);
1109
1111 && m_beast.SKB_HER_beamSize_SR_X->size() > 0
1112 && m_beast.SKB_HER_beamSize_SR_Y->size() > 0)
1114 0) / m_beast.SKB_HER_beamSize_SR_Y->at(0);
1115 }
1116 /*
1117 if (m_beast.SKB_HER_beamSize_xray_Y != 0
1118 && m_beast.SKB_HER_beamSize_xray_Y != 0
1119 && m_beast.SKB_HER_beamSize_xray_Y->size() > 0) sigma_y_HER = m_beast.SKB_HER_beamSize_xray_Y->at(0);
1120 */
1121 if (m_input_sigma_x_HER[1] > 0) sigma_x_HER += gRandom->Gaus(0, m_input_sigma_x_HER[1]);
1122 if (m_input_sigma_y_HER[1] > 0) sigma_y_HER += gRandom->Gaus(0, m_input_sigma_y_HER[1]);
1123 double sigma_y_LER = 0;
1124 double sigma_x_LER = 0;
1128 sigma_y_LER = m_beast.SKB_LER_correctedBeamSize_xray_Y->at(0);
1129
1131 && m_beast.SKB_LER_beamSize_SR_X->size() > 0
1132 && m_beast.SKB_LER_beamSize_SR_Y->size() > 0)
1134 0) / m_beast.SKB_LER_beamSize_SR_Y->at(0);
1135 }
1136 /*
1137 if (m_beast.SKB_LER_beamSize_xray_Y != 0
1138 && m_beast.SKB_LER_beamSize_xray_Y != 0
1139 && m_beast.SKB_LER_beamSize_xray_Y->size() > 0) sigma_y_LER = m_beast.SKB_LER_beamSize_xray_Y->at(0);
1140 */
1141 if (m_input_sigma_x_LER[1] > 0) sigma_x_LER += gRandom->Gaus(0, m_input_sigma_x_LER[1]);
1142 if (m_input_sigma_y_LER[1] > 0) sigma_y_LER += gRandom->Gaus(0, m_input_sigma_y_LER[1]);
1143 double bunch_nb_HER = 0;
1146 if (bunch_nb_HER == 0) bunch_nb_HER = m_input_data_bunchNb_HER;
1147 if (m_input_bunchNb_HER[1] > 0) bunch_nb_HER += gRandom->Gaus(0, m_input_bunchNb_HER[1]);
1148 double bunch_nb_LER = 0;
1151 if (bunch_nb_LER == 0) bunch_nb_LER = m_input_data_bunchNb_LER;
1152 if (m_input_bunchNb_LER[1] > 0) bunch_nb_LER += gRandom->Gaus(0, m_input_bunchNb_LER[1]);
1153
1154 /*
1155 if (I_HER < 0 || I_HER > 2100.) I_HER = 0;
1156 if (I_LER < 0 || I_LER > 2100.) I_LER = 0;
1157 if (P_HER < 0 || P_HER > 760.) P_HER = 0;
1158 if (P_LER < 0 || P_LER > 760.) P_LER = 0;
1159 */
1160 if (I_HER < 0) I_HER = 0;
1161 if (I_LER < 0) I_LER = 0;
1162 //if (P_HER < 0) P_HER = 0;
1163 //if (P_LER < 0) P_LER = 0;
1164 if (P_corrected_HER < 0) P_corrected_HER = 0;
1165 if (P_corrected_LER < 0) P_corrected_LER = 0;
1166
1167 if (m_input_data_SingleBeam == "LER") {
1168 I_HER = 0;
1169 //P_HER = 0;
1170 P_corrected_HER = 0;
1171 } else if (m_input_data_SingleBeam == "HER") {
1172 I_LER = 0;
1173 //P_LER = 0;
1174 P_corrected_LER = 0;
1175 }
1176
1177 double Ib_HER = 0;
1178 if (bunch_nb_HER > 0) Ib_HER = I_HER / bunch_nb_HER * 1e-3; // mA -> A
1179 double Ib_LER = 0;
1180 if (bunch_nb_LER > 0) Ib_LER = I_LER / bunch_nb_LER * 1e-3; // mA -> A
1181
1182 double Nb_HER = 0;
1183 if (Ib_HER > 0) Nb_HER = Ib_HER * 3000. / TMath::C() / (1.6e-19);
1184 double Nb_LER = 0;
1185 if (Ib_LER > 0) Nb_LER = Ib_LER * 3000. / TMath::C() / (1.6e-19);
1186
1187 //double RLR_HER = 0;
1188 if (m_beast.SKB_HER_lifetime != 0 && m_beast.SKB_HER_lifetime->size() > 0 && Nb_HER > 0) {
1189 double RLR_HER = Nb_HER / (m_beast.SKB_HER_lifetime->at(0) * 60.) * 1e-9 * bunch_nb_HER;
1190 m_beast.SKB_HER_RLR.push_back(RLR_HER);
1191 }
1192 //double RLR_LER = 0;
1193 if (m_beast.SKB_LER_lifetime != 0 && m_beast.SKB_LER_lifetime->size() > 0 && Nb_LER > 0) {
1194 double RLR_LER = Nb_LER / (m_beast.SKB_LER_lifetime->at(0) * 60.) * 1e-9 * bunch_nb_LER;
1195 m_beast.SKB_LER_RLR.push_back(RLR_LER);
1196 }
1197
1198 //Calculate Beam Gas scaling factor:
1199 // solution 0: Beam Gas \propo I x P => (IP)^data / (IP)^simu
1200 // solution 1: Beam Gas \propo I x P => (I_bP)^data / (I_bP)^simu where I_b = current / #bunch
1201 double ScaleFacBGav_HER = 0;
1202 double ScaleFacBGav_LER = 0;
1203 /*
1204 if (I_LER > 0 && P_LER > 0) {
1205 if (m_input_BGSol == 0
1206 && bunch_nb_LER > 0) ScaleFacBGav_LER = I_LER * P_LER / (m_input_I_LER[0] * m_input_P_LER[0]) / bunch_nb_LER *
1207 m_input_bunchNb_LER[0];
1208 if (m_input_BGSol == 1 && bunch_nb_LER > 0) ScaleFacBGav_LER = I_LER * P_LER / (m_input_I_LER[0] * m_input_P_LER[0]);
1209 }
1210 if (I_HER > 0 && P_HER > 0) {
1211 if (m_input_BGSol == 0
1212 && bunch_nb_HER > 0) ScaleFacBGav_HER = I_HER * P_HER / (m_input_I_HER[0] * m_input_P_HER[0]) / bunch_nb_HER *
1213 m_input_bunchNb_HER[0];
1214 if (m_input_BGSol == 1 && bunch_nb_HER > 0) ScaleFacBGav_HER = I_HER * P_HER / (m_input_I_HER[0] * m_input_P_HER[0]);
1215 }
1216 */
1217 if (I_LER > 0 && P_corrected_LER > 0) {
1218 if (m_input_BGSol == 0
1219 && bunch_nb_LER > 0) ScaleFacBGav_LER = I_LER * P_corrected_LER / (m_input_I_LER[0] * m_input_P_LER[0]) / bunch_nb_LER *
1221 if (m_input_BGSol == 1 && bunch_nb_LER > 0) ScaleFacBGav_LER = I_LER * P_corrected_LER / (m_input_I_LER[0] * m_input_P_LER[0]);
1222 }
1223 if (I_HER > 0 && P_corrected_HER > 0) {
1224 if (m_input_BGSol == 0
1225 && bunch_nb_HER > 0) ScaleFacBGav_HER = I_HER * P_corrected_HER / (m_input_I_HER[0] * m_input_P_HER[0]) / bunch_nb_HER *
1227 if (m_input_BGSol == 1 && bunch_nb_HER > 0) ScaleFacBGav_HER = I_HER * P_corrected_HER / (m_input_I_HER[0] * m_input_P_HER[0]);
1228 }
1229
1230 //Calculate Beam Gas scaling factor: Beam Gas \propo I x P => (IP)^data / (IP)^simu
1231 double ScaleFacBG_HER[12];
1232 double ScaleFacBG_LER[12];
1233
1234 if (m_beast.SKB_HER_pressures != 0 && m_input_GasCorrection[0] != 1) {
1235 for (int i = 0; i < (int)m_beast.SKB_HER_pressures->size(); i++) {
1236 ScaleFacBG_HER[i] = 0;
1237 double iP_HER = 0;
1238 iP_HER = m_beast.SKB_HER_pressures->at(i) * 0.00750062 * 1e9 * m_input_GasCorrection[0];
1239 if (m_input_P_HER[1] > 0) iP_HER += gRandom->Gaus(0, m_input_P_HER[1]);
1240 if (iP_HER < 0 || iP_HER > 260.) iP_HER = 0;
1241 if (I_HER > 0 && iP_HER > 0) {
1242 if (m_input_BGSol == 0
1243 && bunch_nb_HER > 0) ScaleFacBG_HER[i] = I_HER * iP_HER / (m_input_I_HER[0] * m_input_P_HER[0]) / bunch_nb_HER *
1245 if (m_input_BGSol == 1 && bunch_nb_HER > 0) ScaleFacBG_HER[i] = I_HER * iP_HER / (m_input_I_HER[0] * m_input_P_HER[0]);
1246 }
1247 }
1248 }
1249 if (m_beast.SKB_LER_pressures != 0 && m_input_GasCorrection[1] != 1) {
1250 for (int i = 0; i < (int)m_beast.SKB_LER_pressures->size(); i++) {
1251 ScaleFacBG_LER[i] = 0;
1252 double iP_LER = 0;
1253 iP_LER = m_beast.SKB_LER_pressures->at(i) * 0.00750062 * 1e9 * m_input_GasCorrection[1];
1254 if (m_input_P_LER[1] > 0) iP_LER += gRandom->Gaus(0, m_input_P_LER[1]);
1255 if (iP_LER < 0 || iP_LER > 260.) iP_LER = 0;
1256 if (I_LER > 0 && iP_LER > 0) {
1257 if (m_input_BGSol == 0
1258 && bunch_nb_LER > 0) ScaleFacBG_LER[i] = I_LER * iP_LER / (m_input_I_LER[0] * m_input_P_LER[0]) / bunch_nb_LER *
1260 if (m_input_BGSol == 1 && bunch_nb_LER > 0) ScaleFacBG_LER[i] = I_LER * iP_LER / (m_input_I_LER[0] * m_input_P_LER[0]);
1261 }
1262 }
1263 }
1264
1266 for (int i = 0; i < (int)m_beast.SKB_HER_pressures_corrected->size(); i++) {
1267 ScaleFacBG_HER[i] = 0;
1268 double iP_HER = 0;
1269 iP_HER = m_beast.SKB_HER_pressures_corrected->at(i) * 0.00750062 * 1e9 * m_input_GasCorrection[0];
1270 if (m_input_P_HER[1] > 0) iP_HER += gRandom->Gaus(0, m_input_P_HER[1]);
1271 if (iP_HER < 0 || iP_HER > 260.) iP_HER = 0;
1272 if (I_HER > 0 && iP_HER > 0) {
1273 if (m_input_BGSol == 0
1274 && bunch_nb_HER > 0) ScaleFacBG_HER[i] = I_HER * iP_HER / (m_input_I_HER[0] * m_input_P_HER[0]) / bunch_nb_HER *
1276 if (m_input_BGSol == 1 && bunch_nb_HER > 0) ScaleFacBG_HER[i] = I_HER * iP_HER / (m_input_I_HER[0] * m_input_P_HER[0]);
1277 }
1278 }
1279 }
1281 for (int i = 0; i < (int)m_beast.SKB_LER_pressures_corrected->size(); i++) {
1282 ScaleFacBG_LER[i] = 0;
1283 double iP_LER = 0;
1284 iP_LER = m_beast.SKB_LER_pressures_corrected->at(i) * 0.00750062 * 1e9 * m_input_GasCorrection[1];
1285 if (m_input_P_LER[1] > 0) iP_LER += gRandom->Gaus(0, m_input_P_LER[1]);
1286 if (iP_LER < 0 || iP_LER > 260.) iP_LER = 0;
1287 if (I_LER > 0 && iP_LER > 0) {
1288 if (m_input_BGSol == 0
1289 && bunch_nb_LER > 0) ScaleFacBG_LER[i] = I_LER * iP_LER / (m_input_I_LER[0] * m_input_P_LER[0]) / bunch_nb_LER *
1291 if (m_input_BGSol == 1 && bunch_nb_LER > 0) ScaleFacBG_LER[i] = I_LER * iP_LER / (m_input_I_LER[0] * m_input_P_LER[0]);
1292 }
1293 }
1294 }
1295 //Calculate Touschek scaling factor: Touschek \propo I^2 / (bunch_nb x sigma_y) => (I^2/(bunch_nb x sigma_y))^data / (I^2/(bunch_nb x sigma_y))^simu
1296 double ScaleFacTo_HER = 0;
1297 double ScaleFacTo_LER = 0;
1298 if (bunch_nb_LER > 0 && sigma_y_LER > 0 && I_LER > 0) {
1299 if (m_input_ToSol == 0) ScaleFacTo_LER = TMath::Power(I_LER / m_input_I_LER[0],
1300 2) / (bunch_nb_LER / m_input_bunchNb_LER[0]) / (sigma_y_LER / m_input_sigma_y_LER[0]);
1301 else if (m_input_ToSol == 1) ScaleFacTo_LER = TMath::Power(I_LER / m_input_I_LER[0],
1302 2) / (bunch_nb_LER / m_input_bunchNb_LER[0]) /
1303 (sqrt(sigma_y_LER * sigma_x_LER / m_input_sigma_y_LER[0] / m_input_sigma_x_LER[0]));
1304 }
1305 if (bunch_nb_HER > 0 && sigma_y_HER > 0 && I_HER > 0) {
1306 if (m_input_ToSol == 0) ScaleFacTo_HER = TMath::Power(I_HER / m_input_I_HER[0],
1307 2) / (bunch_nb_HER / m_input_bunchNb_HER[0]) / (sigma_y_HER / m_input_sigma_y_HER[0]);
1308 else if (m_input_ToSol == 1) ScaleFacTo_HER = TMath::Power(I_HER / m_input_I_HER[0],
1309 2) / (bunch_nb_HER / m_input_bunchNb_HER[0]) /
1310 (sqrt(sigma_y_HER * sigma_x_HER / m_input_sigma_y_HER[0] / m_input_sigma_x_HER[0]));
1311 }
1312
1313 //Save reweight information for Touschek and BeamGas-Coulomb & -Brems
1314 m_beast.mc_reweight_LERT.push_back(ScaleFacTo_LER);
1315 m_beast.mc_reweight_HERT.push_back(ScaleFacTo_HER);
1316 for (int i = 0; i < 12; i ++) {
1317 m_beast.mc_reweight_HERC.push_back(Zeff_HC * ScaleFacBG_HER[i]);
1318 m_beast.mc_reweight_HERB.push_back(Zeff_HB * ScaleFacBG_HER[i]);
1319 if (Zeff_LC != 1)
1320 m_beast.mc_reweight_LERC.push_back(Zeff_LC * ScaleFacBG_LER[i]);
1321 else
1322 m_beast.mc_reweight_LERC.push_back(m_input_Z_scaling[1] * ScaleFacBG_LER[i]);
1323 if (Zeff_LB != 1)
1324 m_beast.mc_reweight_LERB.push_back(Zeff_LB * ScaleFacBG_LER[i]);
1325 else
1326 m_beast.mc_reweight_LERB.push_back(m_input_Z_scaling[3] * ScaleFacBG_LER[i]);
1327 }
1328 //Only Touschek LER + HER
1329 if (m_input_part == 0) {
1330 ScaleFacBGav_HER = 0;
1331 ScaleFacBGav_LER = 0;
1332 for (int i = 0; i < 12; i ++) {
1333 ScaleFacBG_HER[i] = 0;
1334 ScaleFacBG_LER[i] = 0;
1335 }
1336 }
1337 //Only Beam Gas
1338 if (m_input_part == 1) {
1339 ScaleFacTo_HER = 0;
1340 ScaleFacTo_LER = 0;
1341 }
1342 /*
1343 //Only Beam Gas - LER Brems
1344 if (m_input_part == 2) {
1345 ScaleFacTo_HER = 0;
1346 ScaleFacTo_LER = 0;
1347 Zeff_LC = 0;
1348 Zeff_HB = 0;
1349 Zeff_HC = 0;
1350 }
1351 //Only Beam Gas - LER Coulomb
1352 if (m_input_part == 3) {
1353 ScaleFacTo_HER = 0;
1354 ScaleFacTo_LER = 0;
1355 Zeff_LB = 0;
1356 Zeff_HB = 0;
1357 Zeff_HC = 0;
1358 }
1359 //Only Beam Gas - HER Brems
1360 if (m_input_part == 4) {
1361 ScaleFacTo_HER = 0;
1362 ScaleFacTo_LER = 0;
1363 Zeff_HC = 0;
1364 Zeff_LB = 0;
1365 Zeff_LC = 0;
1366 }
1367 //Only Beam Gas - HER Coulomb
1368 if (m_input_part == 5) {
1369 ScaleFacTo_HER = 0;
1370 ScaleFacTo_LER = 0;
1371 Zeff_HB = 0;
1372 Zeff_LB = 0;
1373 Zeff_LC = 0;
1374 }
1375 */
1376 //Scale LER SAD RLR
1377 for (int i = 0; i < (int)m_input_LT_SAD_RLR.size(); i++) {
1378 float LBG = m_input_LB_SAD_RLR_av[i] * Zeff_LB + m_input_LC_SAD_RLR_av[i] * Zeff_LC;
1379 float BG = LBG * ScaleFacBGav_LER;
1380 float To = ScaleFacTo_LER * m_input_LT_SAD_RLR[i];
1381 //if (TMath::IsNaN(To)) To = 0;
1382 //if (TMath::IsNaN(BG)) BG = 0;
1383 m_beast.SAD_LER_RLR_av.push_back(BG + To);
1384 m_beast.SAD_LER_lifetime_av.push_back(Nb_LER / (BG + To) * 1e-9 / 60. * bunch_nb_LER);
1385 BG = 0;
1386 for (int j = 0; j < 12; j++) {
1387 if (m_input_LB_SAD_RLR.size() > 0) {
1388 LBG = m_input_LB_SAD_RLR[j] * Zeff_LB + m_input_LC_SAD_RLR[j] * Zeff_LC;
1389 BG += LBG * ScaleFacBG_LER[j];
1390 }
1391 }
1392 //if (TMath::IsNaN(To)) To = 0;
1393 //if (TMath::IsNaN(BG)) BG = 0;
1394 m_beast.SAD_LER_RLR.push_back(BG + To);
1395 m_beast.SAD_LER_lifetime.push_back(Nb_LER / (BG + To) * 1e-9 / 60. * bunch_nb_LER);
1396 }
1397
1398 //Scale HER SAD RLR
1399 for (int i = 0; i < (int)m_input_HT_SAD_RLR.size(); i++) {
1400 float HBG = m_input_HB_SAD_RLR_av[i] + m_input_HC_SAD_RLR_av[i];
1401 float BG = HBG * ScaleFacBGav_HER;
1402 float To = ScaleFacTo_HER * m_input_HT_SAD_RLR[i];
1403 //if (TMath::IsNaN(To)) To = 0;
1404 //if (TMath::IsNaN(BG)) BG = 0;
1405 m_beast.SAD_HER_RLR_av.push_back(BG + To);
1406 m_beast.SAD_HER_lifetime_av.push_back(Nb_HER / (BG + To) * 1e-9 / 60. * bunch_nb_HER);
1407 BG = 0;
1408 HBG = 0;
1409 for (int j = 0; j < 12; j++) {
1410 HBG = 0;
1411 if (m_input_HB_SAD_RLR.size() > 0) {
1413 BG += HBG * ScaleFacBG_HER[j];
1414 }
1415 }
1416 //if (TMath::IsNaN(To)) To = 0;
1417 //if (TMath::IsNaN(BG)) BG = 0;
1418 m_beast.SAD_HER_RLR.push_back(BG + To);
1419 m_beast.SAD_HER_lifetime.push_back(Nb_HER / (BG + To) * 1e-9 / 60. * bunch_nb_HER);
1420 }
1421
1422 //Scale DIA
1423 for (int i = 0; i < (int)m_input_LT_DIA_dose.size(); i++) {
1426 double BG = LBG * ScaleFacBGav_LER + HBG * ScaleFacBGav_HER;
1427 double To = ScaleFacTo_LER * m_input_LT_DIA_dose[i] + ScaleFacTo_HER * m_input_HT_DIA_dose[i];
1428 /*cout << "ch # " << i
1429 << " av LB " << m_input_LB_DIA_dose_av[i] << " LC " << m_input_LC_DIA_dose_av[i]
1430 << " HB " << m_input_HB_DIA_dose_av[i] << " HC " << m_input_HC_DIA_dose_av[i]
1431 << " LT " << m_input_LT_DIA_dose[i] << " HT " << m_input_HT_DIA_dose[i]
1432 << endl;*/
1433 //if (TMath::IsNaN(To)) To = 0;
1434 //if (TMath::IsNaN(BG)) BG = 0;
1435 m_beast.DIA_dose_av.push_back(BG + To);
1436 BG = 0;
1437 for (int j = 0; j < 12; j++) {
1438 if (m_input_LB_DIA_dose[j].size() > 0) {
1439 //LBG = m_input_LB_DIA_dose[j][i] + m_input_LC_DIA_dose[j][i];
1440 HBG = m_input_HB_DIA_dose[j][i] + m_input_HC_DIA_dose[j][i];
1441 LBG = m_input_LB_DIA_dose[j][i] * Zeff_LB + m_input_LC_DIA_dose[j][i] * Zeff_LC;
1442 /*cout << "section " << j
1443 << " LB " << m_input_LB_DIA_dose[j][i] << " LC " << m_input_LC_DIA_dose[j][i] << " HB " << m_input_HB_DIA_dose[j][i] << " HC " <<
1444 m_input_HC_DIA_dose[j][i] << endl;*/
1445 BG += LBG * ScaleFacBG_LER[j] + HBG * ScaleFacBG_HER[j];
1446 }
1447 }
1448 //if (TMath::IsNaN(To)) To = 0;
1449 //if (TMath::IsNaN(BG)) BG = 0;
1450 m_beast.DIA_dose.push_back(BG + To);
1451 }
1452
1453 //Scale PIN
1454 for (int i = 0; i < (int)m_input_LT_PIN_dose.size(); i++) {
1457 double BG = LBG * ScaleFacBGav_LER + HBG * ScaleFacBGav_HER;
1458 double To = ScaleFacTo_LER * m_input_LT_PIN_dose[i] + ScaleFacTo_HER * m_input_HT_PIN_dose[i];
1459 //if (TMath::IsNaN(To)) To = 0;
1460 //if (TMath::IsNaN(BG)) BG = 0;
1461 m_beast.PIN_dose_av.push_back(BG + To);
1462 BG = 0;
1463 for (int j = 0; j < 12; j++) {
1464 if (m_input_LB_PIN_dose[j].size() > 0) {
1465 //LBG = m_input_LB_PIN_dose[j][i] + m_input_LC_PIN_dose[j][i];
1466 HBG = m_input_HB_PIN_dose[j][i] + m_input_HC_PIN_dose[j][i];
1467 LBG = m_input_LB_PIN_dose[j][i] * Zeff_LB + m_input_LC_PIN_dose[j][i] * Zeff_LC;
1468 BG += LBG * ScaleFacBG_LER[j] + HBG * ScaleFacBG_HER[j];
1469 }
1470 }
1471 //if (TMath::IsNaN(To)) To = 0;
1472 //if (TMath::IsNaN(BG)) BG = 0;
1473 m_beast.PIN_dose.push_back(BG + To);
1474 }
1475
1476 //Scale DOSI
1477 for (int i = 0; i < (int)m_input_LT_DOSI.size(); i++) {
1478 //cout << "LB : " << m_input_LB_DOSI_av[i] << " LC " << m_input_LC_DOSI_av[i] << endl;
1479 //cout << "HB : " << m_input_HB_DOSI_av[i] << " HC " << m_input_HC_DOSI_av[i] << endl;
1480 //cout << "HT : " << m_input_HT_DOSI[i] << " LT " << m_input_LT_DOSI[i] << endl;
1481 double LBG = m_input_LB_DOSI_av[i] + m_input_LC_DOSI_av[i];
1482 double HBG = m_input_HB_DOSI_av[i] + m_input_HC_DOSI_av[i];
1483 double BG = LBG * ScaleFacBGav_LER + HBG * ScaleFacBGav_HER;
1484 double To = ScaleFacTo_LER * m_input_LT_DOSI[i] + ScaleFacTo_HER * m_input_HT_DOSI[i];
1485 //if (TMath::IsNaN(To)) To = 0;
1486 //if (TMath::IsNaN(BG)) BG = 0;
1487 m_beast.DOSI_av.push_back(BG + To);
1488 BG = 0;
1489 for (int j = 0; j < 12; j++) {
1490 if (m_input_LB_DOSI[j].size() > 0) {
1491 //LBG = m_input_LB_DOSI[j][i] + m_input_LC_DOSI[j][i];
1492 HBG = m_input_HB_DOSI[j][i] + m_input_HC_DOSI[j][i];
1493 LBG = m_input_LB_DOSI[j][i] * Zeff_LB + m_input_LC_DOSI[j][i] * Zeff_LC;
1494 BG += LBG * ScaleFacBG_LER[j] + HBG * ScaleFacBG_HER[j];
1495 }
1496 }
1497 //if (TMath::IsNaN(To)) To = 0;
1498 //if (TMath::IsNaN(BG)) BG = 0;
1499 m_beast.DOSI.push_back(BG + To);
1500 }
1501
1502 //Scale BGO
1503 for (int i = 0; i < (int)m_input_LT_BGO_dose.size(); i++) {
1506 double BG = LBG * ScaleFacBGav_LER + HBG * ScaleFacBGav_HER;
1507 double To = ScaleFacTo_LER * m_input_LT_BGO_dose[i] + ScaleFacTo_HER * m_input_HT_BGO_dose[i];
1508 //if (TMath::IsNaN(To)) To = 0;
1509 //if (TMath::IsNaN(BG)) BG = 0;
1510 m_beast.BGO_energy_av.push_back(BG + To);
1511 BG = 0;
1512 for (int j = 0; j < 12; j++) {
1513 if (m_input_LB_BGO_dose[j].size() > 0) {
1514 //LBG = m_input_LB_BGO_dose[j][i] + m_input_LC_BGO_dose[j][i];
1515 HBG = m_input_HB_BGO_dose[j][i] + m_input_HC_BGO_dose[j][i];
1516 LBG = m_input_LB_BGO_dose[j][i] * Zeff_LB + m_input_LC_BGO_dose[j][i] * Zeff_LC;
1517 BG += LBG * ScaleFacBG_LER[j] + HBG * ScaleFacBG_HER[j];
1518 }
1519 }
1520 //if (TMath::IsNaN(To)) To = 0;
1521 //if (TMath::IsNaN(BG)) BG = 0;
1522 m_beast.BGO_energy.push_back(BG + To);
1523 }
1524 int he3order[4];
1525 if (m_beast.ts > 1464868800) {
1526 he3order[0] = 0;
1527 he3order[1] = 3;
1528 he3order[2] = 2;
1529 he3order[3] = 1;
1530 } else {
1531 he3order[0] = 0;
1532 he3order[1] = 1;
1533 he3order[2] = 2;
1534 he3order[3] = 3;
1535 }
1536 //Scale HE3
1537 for (int i = 0; i < (int)m_input_LT_HE3_rate.size(); i++) {
1538 double LBG = m_input_LB_HE3_rate_av[he3order[i]] + m_input_LC_HE3_rate_av[he3order[i]];
1539 double HBG = m_input_HB_HE3_rate_av[he3order[i]] + m_input_HC_HE3_rate_av[he3order[i]];
1540 double BG = LBG * ScaleFacBGav_LER + HBG * ScaleFacBGav_HER;
1541 double To = ScaleFacTo_LER * m_input_LT_HE3_rate[he3order[i]] + ScaleFacTo_HER * m_input_HT_HE3_rate[he3order[i]];
1542 //if (TMath::IsNaN(To)) To = 0;
1543 //if (TMath::IsNaN(BG)) BG = 0;
1544 m_beast.HE3_rate_av.push_back(BG + To);
1545 BG = 0;
1546 for (int j = 0; j < 12; j++) {
1547 if (m_input_LB_HE3_rate[j].size() > 0) {
1548 //LBG = m_input_LB_HE3_rate[j][he3order[i]] + m_input_LC_HE3_rate[j][he3order[i]];
1549 HBG = m_input_HB_HE3_rate[j][he3order[i]] + m_input_HC_HE3_rate[j][he3order[i]];
1550 LBG = m_input_LB_HE3_rate[j][he3order[i]] * Zeff_LB + m_input_LC_HE3_rate[j][he3order[i]] * Zeff_LC;
1551 BG += LBG * ScaleFacBG_LER[j] + HBG * ScaleFacBG_HER[j];
1552 }
1553 }
1554 //if (TMath::IsNaN(To)) To = 0;
1555 //if (TMath::IsNaN(BG)) BG = 0;
1556 m_beast.HE3_rate.push_back(BG + To);
1557 }
1558
1559 //Scale TPC
1560 for (int i = 0; i < (int)m_input_LT_TPC_rate.size(); i++) {
1563 double BG = LBG * ScaleFacBGav_LER + HBG * ScaleFacBGav_HER;
1564 double To = ScaleFacTo_LER * m_input_LT_TPC_rate[i] + ScaleFacTo_HER * m_input_HT_TPC_rate[i];
1565 int tpc_ch = (int)(i / 5);
1566 int n_type = i - 5 * tpc_ch;
1567 m_beast.TPC_rate_av[tpc_ch][n_type] = (BG + To);
1568 BG = 0;
1569 for (int j = 0; j < 12; j++) {
1570 if (m_input_LB_TPC_rate[j].size() > 0) {
1571 //LBG = m_input_LB_TPC_rate[j][i] + m_input_LC_TPC_rate[j][i];
1572 HBG = m_input_HB_TPC_rate[j][i] + m_input_HC_TPC_rate[j][i];
1573 LBG = m_input_LB_TPC_rate[j][i] * Zeff_LB + m_input_LC_TPC_rate[j][i] * Zeff_LC;
1574 BG += LBG * ScaleFacBG_LER[j] + HBG * ScaleFacBG_HER[j];
1575 }
1576 }
1577 //m_beast.TPC_rate[tpc_ch][n_type] = (BG + To);
1578 }
1579
1580
1581 //Scale TPC_dose
1582 for (int i = 0; i < (int)m_input_LT_TPC_dose.size(); i++) {
1585 double BG = LBG * ScaleFacBGav_LER + HBG * ScaleFacBGav_HER;
1586 double To = ScaleFacTo_LER * m_input_LT_TPC_dose[i] + ScaleFacTo_HER * m_input_HT_TPC_dose[i];
1587 //int tpc_ch = (int)(i / 5);
1588 //int n_type = i - 5 * tpc_ch;
1589 //m_beast.TPC_dose_av[tpc_ch][n_type] = (BG + To);
1590 m_beast.TPC_dose_av.push_back(BG + To);
1591 BG = 0;
1592 for (int j = 0; j < 12; j++) {
1593 if (m_input_LB_TPC_dose[j].size() > 0) {
1594 //LBG = m_input_LB_TPC_dose[j][i] + m_input_LC_TPC_dose[j][i];
1595 HBG = m_input_HB_TPC_dose[j][i] + m_input_HC_TPC_dose[j][i];
1596 LBG = m_input_LB_TPC_dose[j][i] * Zeff_LB + m_input_LC_TPC_dose[j][i] * Zeff_LC;
1597 BG += LBG * ScaleFacBG_LER[j] + HBG * ScaleFacBG_HER[j];
1598 }
1599 }
1600 //m_beast.TPC_dose[tpc_ch][n_type] = (BG + To);
1601 }
1602
1603 //Scale TPC_angular
1604 for (int i = 0; i < (int)m_input_LT_TPC_angular_rate.size(); i++) {
1607 double BG = LBG * ScaleFacBGav_LER + HBG * ScaleFacBGav_HER;
1608 double To = ScaleFacTo_LER * m_input_LT_TPC_angular_rate[i] + ScaleFacTo_HER * m_input_HT_TPC_angular_rate[i];
1609 int tpc_ch = (int)(i / (9 * 18));
1610 int angle = i - (9 * 18) * tpc_ch;
1611 int i_theta = (int)(angle / 18);
1612 int i_phi = angle - 9 * i_theta;
1613 m_beast.TPC_angular_rate_av[tpc_ch][i_theta][i_phi] = (BG + To);
1614 BG = 0;
1615 for (int j = 0; j < 12; j++) {
1616 if (m_input_LB_TPC_angular_rate[j].size() > 0) {
1617 //LBG = m_input_LB_TPC_angular_rate[j][i] + m_input_LC_TPC_angular_rate[j][i];
1619 LBG = m_input_LB_TPC_angular_rate[j][i] * Zeff_LB + m_input_LC_TPC_angular_rate[j][i] * Zeff_LC;
1620 BG += LBG * ScaleFacBG_LER[j] + HBG * ScaleFacBG_HER[j];
1621 }
1622 }
1623 //m_beast.TPC_angular_rate[tpc_ch][n_type] = (BG + To);
1624 }
1625
1626 //Scale TPC_angular_dose
1627 for (int i = 0; i < (int)m_input_LT_TPC_angular_dose.size(); i++) {
1630 double BG = LBG * ScaleFacBGav_LER + HBG * ScaleFacBGav_HER;
1631 double To = ScaleFacTo_LER * m_input_LT_TPC_angular_dose[i] + ScaleFacTo_HER * m_input_HT_TPC_angular_dose[i];
1632 int tpc_ch = (int)(i / (9 * 18));
1633 int angle = i - (9 * 18) * tpc_ch;
1634 int i_theta = (int)(angle / 18);
1635 int i_phi = angle - 9 * i_theta;
1636 m_beast.TPC_angular_dose_av[tpc_ch][i_theta][i_phi] = (BG + To);
1637 BG = 0;
1638 for (int j = 0; j < 12; j++) {
1639 if (m_input_LB_TPC_angular_dose[j].size() > 0) {
1640 //LBG = m_input_LB_TPC_angular_dose[j][i] + m_input_LC_TPC_angular_dose[j][i];
1642 LBG = m_input_LB_TPC_angular_dose[j][i] * Zeff_LB + m_input_LC_TPC_angular_dose[j][i] * Zeff_LC;
1643 BG += LBG * ScaleFacBG_LER[j] + HBG * ScaleFacBG_HER[j];
1644 }
1645 }
1646 //m_beast.TPC_angular_dose[tpc_ch][n_type] = (BG + To);
1647 }
1648
1649
1650 //Scale CLAWS
1651 for (int i = 0; i < (int)m_input_LT_CLAWS_rate.size(); i++) {
1654 double BG = LBG * ScaleFacBGav_LER + HBG * ScaleFacBGav_HER;
1655 double To = ScaleFacTo_LER * m_input_LT_CLAWS_rate[i] + ScaleFacTo_HER * m_input_HT_CLAWS_rate[i];
1656 //if (TMath::IsNaN(To)) To = 0;
1657 //if (TMath::IsNaN(BG)) BG = 0;
1658 m_beast.CLAWS_rate_av.push_back(BG + To);
1659 BG = 0;
1660 for (int j = 0; j < 12; j++) {
1661 if (m_input_LB_CLAWS_rate[j].size() > 0) {
1662 //LBG = m_input_LB_CLAWS_rate[j][i] + m_input_LC_CLAWS_rate[j][i];
1663 HBG = m_input_HB_CLAWS_rate[j][i] + m_input_HC_CLAWS_rate[j][i];
1664 LBG = m_input_LB_CLAWS_rate[j][i] * Zeff_LB + m_input_LC_CLAWS_rate[j][i] * Zeff_LC;
1665 BG += LBG * ScaleFacBG_LER[j] + HBG * ScaleFacBG_HER[j];
1666 }
1667 }
1668 //if (TMath::IsNaN(To)) To = 0;
1669 //if (TMath::IsNaN(BG)) BG = 0;
1670 m_beast.CLAWS_rate.push_back(BG + To);
1671 }
1672
1673 //Scale QCSS
1674 for (int i = 0; i < (int)m_input_LT_QCSS_rate.size(); i++) {
1677 double BG = LBG * ScaleFacBGav_LER + HBG * ScaleFacBGav_HER;
1678 double To = ScaleFacTo_LER * m_input_LT_QCSS_rate[i] + ScaleFacTo_HER * m_input_HT_QCSS_rate[i];
1679 //if (TMath::IsNaN(To)) To = 0;
1680 //if (TMath::IsNaN(BG)) BG = 0;
1681 m_beast.QCSS_rate_av.push_back(BG + To);
1682 BG = 0;
1683 for (int j = 0; j < 12; j++) {
1684 if (m_input_LB_QCSS_rate[j].size() > 0) {
1685 //LBG = m_input_LB_QCSS_rate[j][i] + m_input_LC_QCSS_rate[j][i];
1686 HBG = m_input_HB_QCSS_rate[j][i] + m_input_HC_QCSS_rate[j][i];
1687 LBG = m_input_LB_QCSS_rate[j][i] * Zeff_LB + m_input_LC_QCSS_rate[j][i] * Zeff_LC;
1688 BG += LBG * ScaleFacBG_LER[j] + HBG * ScaleFacBG_HER[j];
1689 }
1690 }
1691 //if (TMath::IsNaN(To)) To = 0;
1692 //if (TMath::IsNaN(BG)) BG = 0;
1693 m_beast.QCSS_rate.push_back(BG + To);
1694 }
1695
1696 //Scale CSI
1697 for (int i = 0; i < (int)m_input_LT_CSI_dose.size(); i++) {
1700 double BG = LBG * ScaleFacBGav_LER + HBG * ScaleFacBGav_HER;
1701 double To = ScaleFacTo_LER * m_input_LT_CSI_dose[i] + ScaleFacTo_HER * m_input_HT_CSI_dose[i];
1702 //if (TMath::IsNaN(To)) To = 0;
1703 //if (TMath::IsNaN(BG)) BG = 0;
1704 m_beast.CSI_sumE_av.push_back(BG + To);
1705 BG = 0;
1706 for (int j = 0; j < 12; j++) {
1707 if (m_input_LB_CSI_dose[j].size() > 0) {
1708 //LBG = m_input_LB_CSI_dose[j][i] + m_input_LC_CSI_dose[j][i];
1709 HBG = m_input_HB_CSI_dose[j][i] + m_input_HC_CSI_dose[j][i];
1710 LBG = m_input_LB_CSI_dose[j][i] * Zeff_LB + m_input_LC_CSI_dose[j][i] * Zeff_LC;
1711 BG += LBG * ScaleFacBG_LER[j] + HBG * ScaleFacBG_HER[j];
1712 }
1713 }
1714 //if (TMath::IsNaN(To)) To = 0;
1715 //if (TMath::IsNaN(BG)) BG = 0;
1716 m_beast.CSI_sumE.push_back(BG + To);
1717 }
1718 for (int i = 0; i < (int)m_input_LT_CSI_dose_binE.size(); i++) {
1721 double BG = LBG * ScaleFacBGav_LER + HBG * ScaleFacBGav_HER;
1722 double To = ScaleFacTo_LER * m_input_LT_CSI_dose_binE[i] + ScaleFacTo_HER * m_input_HT_CSI_dose_binE[i];
1723 //if (TMath::IsNaN(To)) To = 0;
1724 //if (TMath::IsNaN(BG)) BG = 0;
1725 m_beast.CSI_Ebin_av.push_back(BG + To);
1726 BG = 0;
1727 for (int j = 0; j < 12; j++) {
1728 if (m_input_LB_CSI_dose_binE[j].size() > 0) {
1729 //LBG = m_input_LB_CSI_dose_binE[j][i] + m_input_LC_CSI_dose_binE[j][i];
1731 LBG = m_input_LB_CSI_dose_binE[j][i] * Zeff_LB + m_input_LC_CSI_dose_binE[j][i] * Zeff_LC;
1732 BG += LBG * ScaleFacBG_LER[j] + HBG * ScaleFacBG_HER[j];
1733 }
1734 }
1735 //if (TMath::IsNaN(To)) To = 0;
1736 //if (TMath::IsNaN(BG)) BG = 0;
1737 m_beast.CSI_Ebin.push_back(BG + To);
1738 }
1739 for (int i = 0; i < (int)m_input_LT_CSI_rate.size(); i++) {
1742 double BG = LBG * ScaleFacBGav_LER + HBG * ScaleFacBGav_HER;
1743 double To = ScaleFacTo_LER * m_input_LT_CSI_rate[i] + ScaleFacTo_HER * m_input_HT_CSI_rate[i];
1744 //if (TMath::IsNaN(To)) To = 0;
1745 //if (TMath::IsNaN(BG)) BG = 0;
1746 m_beast.CSI_hitRate_av.push_back(BG + To);
1747 BG = 0;
1748 for (int j = 0; j < 12; j++) {
1749 if (m_input_LB_CSI_rate[j].size() > 0) {
1750 //LBG = m_input_LB_CSI_rate[j][i] + m_input_LC_CSI_rate[j][i];
1751 HBG = m_input_HB_CSI_rate[j][i] + m_input_HC_CSI_rate[j][i];
1752 LBG = m_input_LB_CSI_rate[j][i] * Zeff_LB + m_input_LC_CSI_rate[j][i] * Zeff_LC;
1753 BG += LBG * ScaleFacBG_LER[j] + HBG * ScaleFacBG_HER[j];
1754 }
1755 }
1756 //if (TMath::IsNaN(To)) To = 0;
1757 //if (TMath::IsNaN(BG)) BG = 0;
1758 m_beast.CSI_hitRate.push_back(BG + To);
1759 }
1760
1761 m_treeBEAST->Fill();
1762
1763 // set event metadata
1764 //evtMetaData->setEvent(m_eventCount);
1765 //evtMetaData->setRun(m_run);
1766 //evtMetaData->setExperiment(m_exp);
1767
1768 m_eventCount++;
1769
1770}
std::vector< Double_t > m_input_LB_HE3_rate_av
list of HE3 LB rate
std::vector< Double_t > m_input_HB_HE3_rate_av
list of HE3 HB rate
std::vector< Double_t > m_input_HB_PIN_dose_av
list of PIN HB dose
std::vector< Double_t > m_input_LT_DOSI
list of PIN LT dose
std::vector< Double_t > m_input_LT_DIA_dose
list of DIA LT dose
std::vector< Double_t > m_input_HT_TPC_rate
list of TPC HT rate
std::vector< Double_t > m_input_HC_HE3_rate_av
list of HE3 HC rate
std::vector< Double_t > m_input_LC_TPC_angular_dose[12]
list of TPC_angular LC dose
std::vector< Double_t > m_input_HC_DIA_dose_av
list of DIA HC dose
std::vector< Double_t > m_input_LB_TPC_angular_dose[12]
list of TPC_angular LB dose
std::vector< Double_t > m_input_HB_TPC_angular_dose[12]
list of TPC_angular HB dose
std::vector< Double_t > m_input_LC_PIN_dose[12]
list of PIN LC dose
std::vector< Double_t > m_input_LC_CLAWS_rate_av
list of CLAWS_rate LC
std::vector< Double_t > m_input_LC_CSI_rate_av
list of CSI LC rate
std::vector< Double_t > m_input_HC_TPC_angular_rate[12]
list of TPC_angular HC rate
std::vector< Double_t > m_input_LB_PIN_dose_av
list of PIN LB dose
std::vector< Double_t > m_input_HC_CSI_rate[12]
list of CSI HC rate
std::vector< Double_t > m_input_LB_BGO_dose_av
list of BGO LB dose
std::vector< Double_t > m_input_LC_QCSS_rate[12]
list of QCSS_rate LC
std::vector< Double_t > m_input_HB_PIN_dose[12]
list of PIN HB dose
std::vector< Double_t > m_input_HC_HE3_rate[12]
list of HE3 HC rate
std::vector< Double_t > m_input_LC_TPC_rate[12]
list of TPC LC rate
std::vector< Double_t > m_input_HB_DOSI_av
list of PIN HB dose
std::vector< Double_t > m_input_HB_CLAWS_rate_av
list of CLAWS_rate HB
std::vector< Double_t > m_input_LT_TPC_angular_rate
list of TPC_angular LT rate
std::vector< Double_t > m_input_LB_CSI_dose_binE[12]
list of CSI LB dose_binE
std::vector< Double_t > m_input_LC_DOSI_av
list of PIN LC dose
std::vector< Double_t > m_input_HC_CSI_dose_binE_av
list of CSI HC dose_binE
std::vector< Double_t > m_input_LC_DIA_dose_av
list of DIA LC dose
std::vector< Double_t > m_input_LC_TPC_dose[12]
list of TPC LC dose
std::vector< Double_t > m_input_HT_QCSS_rate
list of QCSS_rate HT
std::vector< Double_t > m_input_HB_TPC_dose_av
list of TPC HB dose
std::vector< Double_t > m_input_HT_HE3_rate
list of HE3 HT rate
std::vector< Double_t > m_input_HC_TPC_angular_dose[12]
list of TPC_angular HC dose
std::vector< Double_t > m_input_HB_TPC_rate_av
list of TPC HB rate
std::vector< Double_t > m_input_HB_CSI_dose_binE[12]
list of CSI HB dose_binE
std::vector< Double_t > m_input_HT_CLAWS_rate
list of CLAWS_rate HT
std::vector< Double_t > m_input_LC_CLAWS_rate[12]
list of CLAWS_rate LC
std::vector< Double_t > m_input_HB_CSI_rate[12]
list of CSI HB rate
std::vector< Double_t > m_input_LB_TPC_angular_rate_av
list of TPC_angular LB rate
std::vector< Double_t > m_input_HT_DOSI
list of PIN HT dose
std::vector< Double_t > m_input_LB_CSI_dose_binE_av
list of CSI LB dose_binE
std::vector< Double_t > m_input_LB_TPC_dose_av
list of TPC LB dose
std::vector< Double_t > m_input_HC_CSI_dose_av
list of CSI HC dose
std::vector< Double_t > m_input_LT_CSI_dose
list of CSI LT dose
std::vector< Double_t > m_input_LB_CLAWS_rate_av
list of CLAWS_rate LB
std::vector< Double_t > m_input_LT_HE3_rate
list of HE3 LT rate
std::vector< Double_t > m_input_LC_CSI_dose_av
list of CSI LC dose
std::vector< Double_t > m_input_HC_BGO_dose[12]
list of BGO HC dose
std::vector< Double_t > m_input_HB_TPC_dose[12]
list of TPC HB dose
std::vector< Double_t > m_input_HC_TPC_angular_rate_av
list of TPC_angular HC rate
std::vector< Double_t > m_input_HB_QCSS_rate[12]
list of QCSS_rate HB
std::vector< Double_t > m_input_HT_CSI_dose
list of CSI HT dose
std::vector< Double_t > m_input_LC_BGO_dose_av
list of BGO LC dose
std::vector< Double_t > m_input_LC_HE3_rate_av
list of HE3 LC rate
std::vector< Double_t > m_input_HB_CSI_rate_av
list of CSI HB rate
std::vector< Double_t > m_input_LT_TPC_dose
list of TPC LT dose
std::vector< Double_t > m_input_HC_QCSS_rate[12]
list of QCSS_rate HC
std::vector< Double_t > m_input_LT_CSI_rate
list of CSI LT rate
std::vector< Double_t > m_input_LB_TPC_rate_av
list of TPC LB rate
std::vector< Double_t > m_input_LB_HE3_rate[12]
list of HE3 LB rate
std::vector< Double_t > m_input_LC_TPC_angular_rate[12]
list of TPC_angular LC rate
std::vector< Double_t > m_input_HC_CLAWS_rate_av
list of CLAWS_rate HC
std::vector< Double_t > m_input_LC_QCSS_rate_av
list of QCSS_rate LC
std::vector< Double_t > m_input_HC_CSI_dose_binE[12]
list of CSI HC dose_binE
std::vector< Double_t > m_input_LB_TPC_rate[12]
list of TPC LB rate
std::vector< Double_t > m_input_LB_DIA_dose[12]
list of DIA LB dose
std::vector< Double_t > m_input_HB_DIA_dose[12]
list of DIA HB dose
std::vector< Double_t > m_input_HC_PIN_dose_av
list of PIN HC dose
std::vector< Double_t > m_input_HC_CLAWS_rate[12]
list of CLAWS_rate HC
std::vector< Double_t > m_input_HC_TPC_rate_av
list of TPC HC rate
std::vector< Double_t > m_input_LB_DIA_dose_av
list of DIA LB dose
std::vector< Double_t > m_input_HB_TPC_angular_rate_av
list of TPC_angular HB rate
std::vector< Double_t > m_input_LC_HE3_rate[12]
list of HE3 LC rate
Double_t m_input_Z_scaling[4]
time stamp start and stop
std::vector< Double_t > m_input_LB_CSI_dose_av
list of CSI LB dose
std::vector< Double_t > m_input_LT_QCSS_rate
list of QCSS_rate LT
std::vector< Double_t > m_input_HC_TPC_dose_av
list of TPC HC dose
std::vector< Double_t > m_input_HT_TPC_angular_rate
list of TPC_angular HT rate
std::vector< Double_t > m_input_HB_DIA_dose_av
list of DIA HB dose
std::vector< Double_t > m_input_HB_QCSS_rate_av
list of QCSS_rate HB
std::vector< Double_t > m_input_LB_CLAWS_rate[12]
list of CLAWS_rate LB
std::vector< Double_t > m_input_HT_CSI_dose_binE
list of CSI HT dose_binE
std::vector< Double_t > m_input_LC_CSI_dose_binE_av
list of CSI LC dose_binE
std::vector< Double_t > m_input_LC_DOSI[12]
list of PIN LC dose
std::vector< Double_t > m_input_LB_DOSI[12]
list of PIN LB dose
std::vector< Double_t > m_input_HC_BGO_dose_av
list of BGO HC dose
std::vector< Double_t > m_input_LB_CSI_dose[12]
list of CSI LB dose
std::vector< Double_t > m_input_HB_HE3_rate[12]
list of HE3 HB rate
std::vector< Double_t > m_input_LC_TPC_dose_av
list of TPC LC dose
std::vector< Double_t > m_input_HC_TPC_rate[12]
list of TPC HC rate
std::vector< Double_t > m_input_HC_TPC_dose[12]
list of TPC HC dose
std::vector< Double_t > m_input_HT_TPC_angular_dose
list of TPC_angular HT dose
std::vector< Double_t > m_input_LB_TPC_angular_dose_av
list of TPC_angular LB dose
std::vector< Double_t > m_input_HT_BGO_dose
list of BGO HT dose
std::vector< Double_t > m_input_LB_PIN_dose[12]
list of PIN LB dose
std::vector< Double_t > m_input_LC_TPC_angular_dose_av
list of TPC_angular LC dose
std::vector< Double_t > m_input_LB_BGO_dose[12]
list of BGO LB dose
std::vector< Double_t > m_input_HT_TPC_dose
list of TPC HT dose
std::vector< Double_t > m_input_LC_CSI_rate[12]
list of CSI LC rate
std::vector< Double_t > m_input_LC_CSI_dose[12]
list of CSI LC dose
std::vector< Double_t > m_input_HC_QCSS_rate_av
list of QCSS_rate HC
std::vector< Double_t > m_input_LC_CSI_dose_binE[12]
list of CSI LC dose_binE
std::vector< Double_t > m_input_HB_TPC_rate[12]
list of TPC HB rate
std::vector< Double_t > m_input_LC_TPC_rate_av
list of TPC LC rate
std::vector< Double_t > m_input_HC_DIA_dose[12]
list of DIA HC dose
std::vector< Double_t > m_input_HB_CSI_dose_av
list of CSI HB dose
std::vector< Double_t > m_input_LT_TPC_angular_dose
list of TPC_angular LT dose
std::vector< Double_t > m_input_HC_DOSI_av
list of PIN HC dose
std::vector< Double_t > m_input_HB_TPC_angular_rate[12]
list of TPC_angular HB rate
std::vector< Double_t > m_input_LB_QCSS_rate_av
list of QCSS_rate LB
std::vector< Double_t > m_input_HT_CSI_rate
list of CSI HT rate
std::vector< Double_t > m_input_HB_TPC_angular_dose_av
list of TPC_angular HB dose
std::vector< Double_t > m_input_LB_CSI_rate_av
list of CSI LB rate
std::vector< Double_t > m_input_LB_TPC_dose[12]
list of TPC LB dose
std::vector< Double_t > m_input_HB_DOSI[12]
list of PIN HB dose
std::vector< Double_t > m_input_HC_CSI_dose[12]
list of CSI HC dose
std::vector< Double_t > m_input_HB_CSI_dose_binE_av
list of CSI HB dose_binE
std::vector< Double_t > m_input_LB_DOSI_av
list of PIN LB dose
unsigned m_eventCount
current event (tree entry)
std::vector< Double_t > m_input_LB_QCSS_rate[12]
list of QCSS_rate LB
std::vector< Double_t > m_input_HB_CLAWS_rate[12]
list of CLAWS_rate HB
std::vector< Double_t > m_input_LT_CSI_dose_binE
list of CSI LT dose_binE
std::vector< Double_t > m_input_LT_CLAWS_rate
list of CLAWS_rate LT
std::vector< Double_t > m_input_LC_TPC_angular_rate_av
list of TPC_angular LC rate
std::vector< Double_t > m_input_HC_CSI_rate_av
list of CSI HC rate
std::vector< Double_t > m_input_HC_DOSI[12]
list of PIN HC dose
std::vector< Double_t > m_input_LT_PIN_dose
list of PIN LT dose
std::vector< Double_t > m_input_LT_TPC_rate
list of TPC LT rate
unsigned m_numEvents
number of events (tree entries) in the sample
std::vector< Double_t > m_input_LC_DIA_dose[12]
list of DIA LC dose
std::vector< Double_t > m_input_HB_BGO_dose[12]
list of BGO HB dose
std::vector< Double_t > m_input_LC_PIN_dose_av
list of PIN LC dose
std::vector< Double_t > m_input_HB_CSI_dose[12]
list of CSI HB dose
std::vector< Double_t > m_input_LB_TPC_angular_rate[12]
list of TPC_angular LB rate
std::vector< Double_t > m_input_HC_PIN_dose[12]
list of PIN HC dose
std::vector< Double_t > m_input_HC_TPC_angular_dose_av
list of TPC_angular HC dose
std::vector< Double_t > m_input_LB_CSI_rate[12]
list of CSI LB rate
std::vector< Double_t > m_input_LT_BGO_dose
list of BGO LT dose
std::vector< Double_t > m_input_HB_BGO_dose_av
list of BGO HB dose
std::vector< Double_t > m_input_LC_BGO_dose[12]
list of BGO LC dose
std::vector< Double_t > m_input_HT_PIN_dose
list of PIN HT dose
std::vector< Double_t > m_input_HT_DIA_dose
list of DIA HT dose
bool create(bool replace=false)
Create a default object in the data store.
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
double sqrt(double a)
sqrt for double
Definition: beamHelpers.h:28
std::vector< float > CSI_Ebin
Beast PV.
Definition: BEASTTree_v5.h:168
std::vector< double > * SKB_HER_lifetime
LER current [mA].
Definition: BEASTTree_v5.h:36
std::vector< double > * SKB_LER_injectionNumberOfBunches
HER injection number of bunches.
Definition: BEASTTree_v5.h:61
std::vector< double > SKB_HER_RLR
LER Zeff at D06 section.
Definition: BEASTTree_v5.h:40
std::vector< double > * SKB_HER_beamSize_xray_Y
HER horizontal beam size by X-ray monitor [um].
Definition: BEASTTree_v5.h:63
std::vector< double > * SKB_LER_beamSize_SR_Y
HER vertical beam size by SR monitor [um].
Definition: BEASTTree_v5.h:69
std::vector< double > * SKB_HER_beamSize_SR_Y
LER corrected vertical beam size by X-ray monitor [um].
Definition: BEASTTree_v5.h:68
std::vector< double > * SKB_HER_current
subrunID
Definition: BEASTTree_v5.h:34
std::vector< float > * SKB_HER_pressures_corrected
LER corrected ring average pressure [Pa].
Definition: BEASTTree_v5.h:82
std::vector< float > HE3_rate
Beast PV.
Definition: BEASTTree_v5.h:169
std::vector< double > * SKB_HER_pressure_average_corrected
Beast PV.
Definition: BEASTTree_v5.h:80
std::vector< float > CSI_sumE
Beast PV.
Definition: BEASTTree_v5.h:166
std::vector< float > CSI_hitRate_av
Beast PV.
Definition: BEASTTree_v5.h:177
std::vector< float > QCSS_rate
Beast PV.
Definition: BEASTTree_v5.h:171
std::vector< double > SKB_LER_RLR
HER Ring Loss Rate.
Definition: BEASTTree_v5.h:41
std::vector< double > SAD_HER_lifetime_av
Beast PV.
Definition: BEASTTree_v5.h:193
std::vector< float > TPC_dose_av
TPC dose.
Definition: BEASTTree_v5.h:217
std::vector< float > CLAWS_rate_av
Beast PV.
Definition: BEASTTree_v5.h:181
std::vector< double > mc_reweight_LERB
Beast PV.
Definition: BEASTTree_v5.h:203
std::vector< float > PIN_dose_av
Pin-diod dose.
Definition: BEASTTree_v5.h:109
std::vector< double > SAD_LER_lifetime_av
Beast PV.
Definition: BEASTTree_v5.h:194
std::vector< float > CSI_hitRate
Beast PV.
Definition: BEASTTree_v5.h:165
std::vector< double > SAD_HER_RLR_av
SAD LER Ring Loss Rate.
Definition: BEASTTree_v5.h:197
std::vector< float > DIA_dose
Beast PV.
Definition: BEASTTree_v5.h:172
std::vector< float > BGO_energy_av
Beast PV.
Definition: BEASTTree_v5.h:176
std::vector< float > QCSS_rate_av
Beast PV.
Definition: BEASTTree_v5.h:182
float TPC_rate_av[2][5]
HER Touschek scale coef.
Definition: BEASTTree_v5.h:212
std::vector< float > CSI_sumE_av
Beast PV.
Definition: BEASTTree_v5.h:178
std::vector< float > DIA_dose_av
Beast PV.
Definition: BEASTTree_v5.h:183
std::vector< float > CLAWS_rate
Beast PV.
Definition: BEASTTree_v5.h:170
std::vector< double > mc_reweight_HERC
HER Bremsstrahlung scale coef.
Definition: BEASTTree_v5.h:207
std::vector< double > SAD_LER_RLR_av
SAD HER average Ring Loss Rate.
Definition: BEASTTree_v5.h:198
std::vector< double > SAD_HER_RLR
Beast PV.
Definition: BEASTTree_v5.h:195
std::vector< float > BGO_energy
Beast PV.
Definition: BEASTTree_v5.h:164
std::vector< float > * SKB_LER_pressures_corrected
Beast PV.
Definition: BEASTTree_v5.h:83
std::vector< double > SAD_LER_RLR
SAD HER Ring Loss Rate.
Definition: BEASTTree_v5.h:196
std::vector< float > HE3_rate_av
Beast PV.
Definition: BEASTTree_v5.h:180
std::vector< double > * SKB_LER_correctedBeamSize_xray_Y
LER vertical beam size by X-ray monitor [um].
Definition: BEASTTree_v5.h:67
std::vector< float > * SKB_LER_pressures
Beast PV.
Definition: BEASTTree_v5.h:77
std::vector< double > * SKB_LER_beamSize_SR_X
HER horizontal beam size by SR monitor [um].
Definition: BEASTTree_v5.h:71
std::vector< double > mc_reweight_LERT
LER Coulomb scale coef.
Definition: BEASTTree_v5.h:205
std::vector< float > PIN_dose
Pin-diod temperature.
Definition: BEASTTree_v5.h:108
std::vector< double > * SKB_HER_beamSize_SR_X
LER vertical beam size by SR monitor [um].
Definition: BEASTTree_v5.h:70
std::vector< float > * SKB_HER_pressures
LER ring average pressure [Pa].
Definition: BEASTTree_v5.h:76
std::vector< float > * SKB_LER_Zeff_D02
HER beam lifetime [min].
Definition: BEASTTree_v5.h:38
float TPC_angular_rate_av[2][9][18]
TPC average dose.
Definition: BEASTTree_v5.h:219
std::vector< double > mc_reweight_LERC
LER Bremsstrahlung scale coef.
Definition: BEASTTree_v5.h:204
std::vector< float > DOSI_av
Beast PV.
Definition: BEASTTree_v5.h:201
std::vector< double > * SKB_HER_correctedBeamSize_xray_Y
HER vertical beam size by X-ray monitor [um].
Definition: BEASTTree_v5.h:64
std::vector< float > CSI_Ebin_av
Beast PV.
Definition: BEASTTree_v5.h:179
std::vector< double > * SKB_LER_beamSize_xray_Y
LER horizontal beam size by X-ray monitor [um].
Definition: BEASTTree_v5.h:66
std::vector< double > * SKB_HER_injectionNumberOfBunches
LER injection repetition rate [Hz].
Definition: BEASTTree_v5.h:60
float TPC_angular_dose_av[2][9][18]
TPC angular rate.
Definition: BEASTTree_v5.h:221
std::vector< double > * SKB_LER_current
HER current [mA].
Definition: BEASTTree_v5.h:35
std::vector< double > * SKB_LER_lifetime
HER beam lifetime [min].
Definition: BEASTTree_v5.h:37
std::vector< double > mc_reweight_HERB
LER Touschek scale coef.
Definition: BEASTTree_v5.h:206
std::vector< double > SAD_HER_lifetime
Beast PV.
Definition: BEASTTree_v5.h:191
std::vector< double > * SKB_LER_pressure_average_corrected
HER corrected ring average pressure [Pa].
Definition: BEASTTree_v5.h:81
std::vector< double > mc_reweight_HERT
HER Coulomb scale coef.
Definition: BEASTTree_v5.h:208
std::vector< float > DOSI
SAD LER average Ring Loss Rate.
Definition: BEASTTree_v5.h:200
std::vector< double > SAD_LER_lifetime
Beast PV.
Definition: BEASTTree_v5.h:192

◆ exposePythonAPI()

void exposePythonAPI ( )
staticinherited

Exposes methods of the Module class to Python.

Definition at line 325 of file Module.cc.

326{
327 // to avoid confusion between std::arg and boost::python::arg we want a shorthand namespace as well
328 namespace bp = boost::python;
329
330 docstring_options options(true, true, false); //userdef, py sigs, c++ sigs
331
332 void (Module::*setReturnValueInt)(int) = &Module::setReturnValue;
333
334 enum_<Module::EAfterConditionPath>("AfterConditionPath",
335 R"(Determines execution behaviour after a conditional path has been executed:
336
337.. attribute:: END
338
339 End processing of this path after the conditional path. (this is the default for if_value() etc.)
340
341.. attribute:: CONTINUE
342
343 After the conditional path, resume execution after this module.)")
344 .value("END", Module::EAfterConditionPath::c_End)
345 .value("CONTINUE", Module::EAfterConditionPath::c_Continue)
346 ;
347
348 /* Do not change the names of >, <, ... we use them to serialize conditional pathes */
349 enum_<Belle2::ModuleCondition::EConditionOperators>("ConditionOperator")
356 ;
357
358 enum_<Module::EModulePropFlags>("ModulePropFlags",
359 R"(Flags to indicate certain low-level features of modules, see :func:`Module.set_property_flags()`, :func:`Module.has_properties()`. Most useful flags are:
360
361.. attribute:: PARALLELPROCESSINGCERTIFIED
362
363 This module can be run in parallel processing mode safely (All I/O must be done through the data store, in particular, the module must not write any files.)
364
365.. attribute:: HISTOGRAMMANAGER
366
367 This module is used to manage histograms accumulated by other modules
368
369.. attribute:: TERMINATEINALLPROCESSES
370
371 When using parallel processing, call this module's terminate() function in all processes. This will also ensure that there is exactly one process (single-core if no parallel modules found) or at least one input, one main and one output process.
372)")
373 .value("INPUT", Module::EModulePropFlags::c_Input)
374 .value("OUTPUT", Module::EModulePropFlags::c_Output)
375 .value("PARALLELPROCESSINGCERTIFIED", Module::EModulePropFlags::c_ParallelProcessingCertified)
376 .value("HISTOGRAMMANAGER", Module::EModulePropFlags::c_HistogramManager)
377 .value("INTERNALSERIALIZER", Module::EModulePropFlags::c_InternalSerializer)
378 .value("TERMINATEINALLPROCESSES", Module::EModulePropFlags::c_TerminateInAllProcesses)
379 ;
380
381 //Python class definition
382 class_<Module, PyModule> module("Module", R"(
383Base class for Modules.
384
385A module is the smallest building block of the framework.
386A typical event processing chain consists of a Path containing
387modules. By inheriting from this base class, various types of
388modules can be created. To use a module, please refer to
389:func:`Path.add_module()`. A list of modules is available by running
390``basf2 -m`` or ``basf2 -m package``, detailed information on parameters is
391given by e.g. ``basf2 -m RootInput``.
392
393The 'Module Development' section in the manual provides detailed information
394on how to create modules, setting parameters, or using return values/conditions:
395https://confluence.desy.de/display/BI/Software+Basf2manual#Module_Development
396
397)");
398 module
399 .def("__str__", &Module::getPathString)
400 .def("name", &Module::getName, return_value_policy<copy_const_reference>(),
401 "Returns the name of the module. Can be changed via :func:`set_name() <Module.set_name()>`, use :func:`type() <Module.type()>` for identifying a particular module class.")
402 .def("type", &Module::getType, return_value_policy<copy_const_reference>(),
403 "Returns the type of the module (i.e. class name minus 'Module')")
404 .def("set_name", &Module::setName, args("name"), R"(
405Set custom name, e.g. to distinguish multiple modules of the same type.
406
407>>> path.add_module('EventInfoSetter')
408>>> ro = path.add_module('RootOutput', branchNames=['EventMetaData'])
409>>> ro.set_name('RootOutput_metadata_only')
410>>> print(path)
411[EventInfoSetter -> RootOutput_metadata_only]
412
413)")
414 .def("description", &Module::getDescription, return_value_policy<copy_const_reference>(),
415 "Returns the description of this module.")
416 .def("package", &Module::getPackage, return_value_policy<copy_const_reference>(),
417 "Returns the package this module belongs to.")
418 .def("available_params", &_getParamInfoListPython,
419 "Return list of all module parameters as `ModuleParamInfo` instances")
420 .def("has_properties", &Module::hasProperties, (bp::arg("properties")),
421 R"DOCSTRING(Allows to check if the module has the given properties out of `ModulePropFlags` set.
422
423>>> if module.has_properties(ModulePropFlags.PARALLELPROCESSINGCERTIFIED):
424>>> ...
425
426Parameters:
427 properties (int): bitmask of `ModulePropFlags` to check for.
428)DOCSTRING")
429 .def("set_property_flags", &Module::setPropertyFlags, args("property_mask"),
430 "Set module properties in the form of an OR combination of `ModulePropFlags`.");
431 {
432 // python signature is too crowded, make ourselves
433 docstring_options subOptions(true, false, false); //userdef, py sigs, c++ sigs
434 module
435 .def("if_value", &Module::if_value,
436 (bp::arg("expression"), bp::arg("condition_path"), bp::arg("after_condition_path")= Module::EAfterConditionPath::c_End),
437 R"DOCSTRING(if_value(expression, condition_path, after_condition_path=AfterConditionPath.END)
438
439Sets a conditional sub path which will be executed after this
440module if the return value set in the module passes the given ``expression``.
441
442Modules can define a return value (int or bool) using ``setReturnValue()``,
443which can be used in the steering file to split the Path based on this value, for example
444
445>>> module_with_condition.if_value("<1", another_path)
446
447In case the return value of the ``module_with_condition`` for a given event is
448less than 1, the execution will be diverted into ``another_path`` for this event.
449
450You could for example set a special return value if an error occurs, and divert
451the execution into a path containing :b2:mod:`RootOutput` if it is found;
452saving only the data producing/produced by the error.
453
454After a conditional path has executed, basf2 will by default stop processing
455the path for this event. This behaviour can be changed by setting the
456``after_condition_path`` argument.
457
458Parameters:
459 expression (str): Expression to determine if the conditional path should be executed.
460 This should be one of the comparison operators ``<``, ``>``, ``<=``,
461 ``>=``, ``==``, or ``!=`` followed by a numerical value for the return value
462 condition_path (Path): path to execute in case the expression is fulfilled
463 after_condition_path (AfterConditionPath): What to do once the ``condition_path`` has been executed.
464)DOCSTRING")
465 .def("if_false", &Module::if_false,
466 (bp::arg("condition_path"), bp::arg("after_condition_path")= Module::EAfterConditionPath::c_End),
467 R"DOC(if_false(condition_path, after_condition_path=AfterConditionPath.END)
468
469Sets a conditional sub path which will be executed after this module if
470the return value of the module evaluates to False. This is equivalent to
471calling `if_value` with ``expression=\"<1\"``)DOC")
472 .def("if_true", &Module::if_true,
473 (bp::arg("condition_path"), bp::arg("after_condition_path")= Module::EAfterConditionPath::c_End),
474 R"DOC(if_true(condition_path, after_condition_path=AfterConditionPath.END)
475
476Sets a conditional sub path which will be executed after this module if
477the return value of the module evaluates to True. It is equivalent to
478calling `if_value` with ``expression=\">=1\"``)DOC");
479 }
480 module
481 .def("has_condition", &Module::hasCondition,
482 "Return true if a conditional path has been set for this module "
483 "using `if_value`, `if_true` or `if_false`")
484 .def("get_all_condition_paths", &_getAllConditionPathsPython,
485 "Return a list of all conditional paths set for this module using "
486 "`if_value`, `if_true` or `if_false`")
487 .def("get_all_conditions", &_getAllConditionsPython,
488 "Return a list of all conditional path expressions set for this module using "
489 "`if_value`, `if_true` or `if_false`")
490 .add_property("logging", make_function(&Module::getLogConfig, return_value_policy<reference_existing_object>()),
@ c_GE
Greater or equal than: ">=".
@ c_SE
Smaller or equal than: "<=".
@ c_GT
Greater than: ">"
@ c_NE
Not equal: "!=".
@ c_EQ
Equal: "=" or "=="
@ c_ST
Smaller than: "<"
Base class for Modules.
Definition: Module.h:72
LogConfig & getLogConfig()
Returns the log system configuration.
Definition: Module.h:225
void if_value(const std::string &expression, const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
Add a condition to the module.
Definition: Module.cc:79
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
Definition: Module.cc:208
void if_true(const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
A simplified version to set the condition of the module.
Definition: Module.cc:90
void setReturnValue(int value)
Sets the return value for this module as integer.
Definition: Module.cc:220
void setLogConfig(const LogConfig &logConfig)
Set the log system configuration.
Definition: Module.h:230
const std::string & getDescription() const
Returns the description of the module.
Definition: Module.h:202
void if_false(const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
A simplified version to add a condition to the module.
Definition: Module.cc:85
bool hasCondition() const
Returns true if at least one condition was set for the module.
Definition: Module.h:311
const std::string & getPackage() const
Returns the package this module is in.
Definition: Module.h:197
void setName(const std::string &name)
Set the name of the module.
Definition: Module.h:214
bool hasProperties(unsigned int propertyFlags) const
Returns true if all specified property flags are available in this module.
Definition: Module.cc:160
std::string getPathString() const override
return the module name.
Definition: Module.cc:192

◆ getAfterConditionPath()

Module::EAfterConditionPath getAfterConditionPath ( ) const
inherited

What to do after the conditional path is finished.

(defaults to c_End if no condition is set)

Definition at line 133 of file Module.cc.

134{
135 if (m_conditions.empty()) return EAfterConditionPath::c_End;
136
137 //okay, a condition was set for this Module...
138 if (!m_hasReturnValue) {
139 B2FATAL("A condition was set for '" << getName() << "', but the module did not set a return value!");
140 }
141
142 for (const auto& condition : m_conditions) {
143 if (condition.evaluate(m_returnValue)) {
144 return condition.getAfterConditionPath();
145 }
146 }
147
148 return EAfterConditionPath::c_End;
149}

◆ getAllConditionPaths()

std::vector< std::shared_ptr< Path > > getAllConditionPaths ( ) const
inherited

Return all condition paths currently set (no matter if the condition is true or not).

Definition at line 150 of file Module.cc.

151{
152 std::vector<std::shared_ptr<Path>> allConditionPaths;
153 for (const auto& condition : m_conditions) {
154 allConditionPaths.push_back(condition.getPath());
155 }
156
157 return allConditionPaths;
158}

◆ getAllConditions()

const std::vector< ModuleCondition > & getAllConditions ( ) const
inlineinherited

Return all set conditions for this module.

Definition at line 324 of file Module.h.

325 {
326 return m_conditions;
327 }

◆ getCondition()

const ModuleCondition * getCondition ( ) const
inlineinherited

Return a pointer to the first condition (or nullptr, if none was set)

Definition at line 314 of file Module.h.

315 {
316 if (m_conditions.empty()) {
317 return nullptr;
318 } else {
319 return &m_conditions.front();
320 }
321 }

◆ getConditionPath()

std::shared_ptr< Path > getConditionPath ( ) const
inherited

Returns the path of the last true condition (if there is at least one, else reaturn a null pointer).


Definition at line 113 of file Module.cc.

114{
115 PathPtr p;
116 if (m_conditions.empty()) return p;
117
118 //okay, a condition was set for this Module...
119 if (!m_hasReturnValue) {
120 B2FATAL("A condition was set for '" << getName() << "', but the module did not set a return value!");
121 }
122
123 for (const auto& condition : m_conditions) {
124 if (condition.evaluate(m_returnValue)) {
125 return condition.getPath();
126 }
127 }
128
129 // if none of the conditions were true, return a null pointer.
130 return p;
131}
std::shared_ptr< Path > PathPtr
Defines a pointer to a path object as a boost shared pointer.
Definition: Path.h:35

◆ getDescription()

const std::string & getDescription ( ) const
inlineinherited

Returns the description of the module.

Definition at line 202 of file Module.h.

202{return m_description;}
std::string m_description
The description of the module.
Definition: Module.h:511

◆ getFileNames()

virtual std::vector< std::string > getFileNames ( bool  outputFiles)
inlinevirtualinherited

Return a list of output filenames for this modules.

This will be called when basf2 is run with "--dry-run" if the module has set either the c_Input or c_Output properties.

If the parameter outputFiles is false (for modules with c_Input) the list of input filenames should be returned (if any). If outputFiles is true (for modules with c_Output) the list of output files should be returned (if any).

If a module has sat both properties this member is called twice, once for each property.

The module should return the actual list of requested input or produced output filenames (including handling of input/output overrides) so that the grid system can handle input/output files correctly.

This function should return the same value when called multiple times. This is especially important when taking the input/output overrides from Environment as they get consumed when obtained so the finalized list of output files should be stored for subsequent calls.

Reimplemented in RootInputModule, StorageRootOutputModule, and RootOutputModule.

Definition at line 134 of file Module.h.

135 {
136 return std::vector<std::string>();
137 }

◆ getLogConfig()

LogConfig & getLogConfig ( )
inlineinherited

Returns the log system configuration.

Definition at line 225 of file Module.h.

225{return m_logConfig;}

◆ getModules()

std::list< ModulePtr > getModules ( ) const
inlineoverrideprivatevirtualinherited

no submodules, return empty list

Implements PathElement.

Definition at line 506 of file Module.h.

506{ return std::list<ModulePtr>(); }

◆ getName()

const std::string & getName ( ) const
inlineinherited

Returns the name of the module.

This can be changed via e.g. set_name() in the steering file to give more useful names if there is more than one module of the same type.

For identifying the type of a module, using getType() (or type() in Python) is recommended.

Definition at line 187 of file Module.h.

187{return m_name;}
std::string m_name
The name of the module, saved as a string (user-modifiable)
Definition: Module.h:508

◆ getPackage()

const std::string & getPackage ( ) const
inlineinherited

Returns the package this module is in.

Definition at line 197 of file Module.h.

197{return m_package;}

◆ getParamInfoListPython()

std::shared_ptr< boost::python::list > getParamInfoListPython ( ) const
inherited

Returns a python list of all parameters.

Each item in the list consists of the name of the parameter, a string describing its type, a python list of all default values and the description of the parameter.

Returns
A python list containing the parameters of this parameter list.

Definition at line 279 of file Module.cc.

280{
282}
std::shared_ptr< boost::python::list > getParamInfoListPython() const
Returns a python list of all parameters.
ModuleParamList m_moduleParamList
List storing and managing all parameter of the module.
Definition: Module.h:516

◆ getParamList()

const ModuleParamList & getParamList ( ) const
inlineinherited

Return module param list.

Definition at line 363 of file Module.h.

363{ return m_moduleParamList; }

◆ getPathString()

std::string getPathString ( ) const
overrideprivatevirtualinherited

return the module name.

Implements PathElement.

Definition at line 192 of file Module.cc.

193{
194
195 std::string output = getName();
196
197 for (const auto& condition : m_conditions) {
198 output += condition.getString();
199 }
200
201 return output;
202}

◆ getReturnValue()

int getReturnValue ( ) const
inlineinherited

Return the return value set by this module.

This value is only meaningful if hasReturnValue() is true

Definition at line 381 of file Module.h.

381{ return m_returnValue; }

◆ getType()

const std::string & getType ( ) const
inherited

Returns the type of the module (i.e.

class name minus 'Module')

Definition at line 41 of file Module.cc.

42{
43 if (m_type.empty())
44 B2FATAL("Module type not set for " << getName());
45 return m_type;
46}
std::string m_type
The type of the module, saved as a string.
Definition: Module.h:509

◆ hasCondition()

bool hasCondition ( ) const
inlineinherited

Returns true if at least one condition was set for the module.

Definition at line 311 of file Module.h.

311{ return not m_conditions.empty(); };

◆ hasProperties()

bool hasProperties ( unsigned int  propertyFlags) const
inherited

Returns true if all specified property flags are available in this module.

Parameters
propertyFlagsOred EModulePropFlags which should be compared with the module flags.

Definition at line 160 of file Module.cc.

161{
162 return (propertyFlags & m_propertyFlags) == propertyFlags;
163}

◆ hasReturnValue()

bool hasReturnValue ( ) const
inlineinherited

Return true if this module has a valid return value set.

Definition at line 378 of file Module.h.

378{ return m_hasReturnValue; }

◆ hasUnsetForcedParams()

bool hasUnsetForcedParams ( ) const
inherited

Returns true and prints error message if the module has unset parameters which the user has to set in the steering file.

Definition at line 166 of file Module.cc.

167{
169 std::string allMissing = "";
170 for (const auto& s : missing)
171 allMissing += s + " ";
172 if (!missing.empty())
173 B2ERROR("The following required parameters of Module '" << getName() << "' were not specified: " << allMissing <<
174 "\nPlease add them to your steering file.");
175 return !missing.empty();
176}
std::vector< std::string > getUnsetForcedParams() const
Returns list of unset parameters (if they are required to have a value.

◆ if_false()

void if_false ( const std::shared_ptr< Path > &  path,
EAfterConditionPath  afterConditionPath = EAfterConditionPath::c_End 
)
inherited

A simplified version to add a condition to the module.

Please note that successive calls of this function will add more than one condition to the module. If more than one condition results in true, only the last of them will be used.

Please be careful: Avoid creating cyclic paths, e.g. by linking a condition to a path which is processed before the path where this module is located in.

It is equivalent to the if_value() method, using the expression "<1". This method is meant to be used together with the setReturnValue(bool value) method.

Parameters
pathShared pointer to the Path which will be executed if the return value is false.
afterConditionPathWhat to do after executing 'path'.

Definition at line 85 of file Module.cc.

86{
87 if_value("<1", path, afterConditionPath);
88}

◆ if_true()

void if_true ( const std::shared_ptr< Path > &  path,
EAfterConditionPath  afterConditionPath = EAfterConditionPath::c_End 
)
inherited

A simplified version to set the condition of the module.

Please note that successive calls of this function will add more than one condition to the module. If more than one condition results in true, only the last of them will be used.

Please be careful: Avoid creating cyclic paths, e.g. by linking a condition to a path which is processed before the path where this module is located in.

It is equivalent to the if_value() method, using the expression ">=1". This method is meant to be used together with the setReturnValue(bool value) method.

Parameters
pathShared pointer to the Path which will be executed if the return value is true.
afterConditionPathWhat to do after executing 'path'.

Definition at line 90 of file Module.cc.

91{
92 if_value(">=1", path, afterConditionPath);
93}

◆ if_value()

void if_value ( const std::string &  expression,
const std::shared_ptr< Path > &  path,
EAfterConditionPath  afterConditionPath = EAfterConditionPath::c_End 
)
inherited

Add a condition to the module.

Please note that successive calls of this function will add more than one condition to the module. If more than one condition results in true, only the last of them will be used.

See https://confluence.desy.de/display/BI/Software+ModCondTut or ModuleCondition for a description of the syntax.

Please be careful: Avoid creating cyclic paths, e.g. by linking a condition to a path which is processed before the path where this module is located in.

Parameters
expressionThe expression of the condition.
pathShared pointer to the Path which will be executed if the condition is evaluated to true.
afterConditionPathWhat to do after executing 'path'.

Definition at line 79 of file Module.cc.

80{
81 m_conditions.emplace_back(expression, path, afterConditionPath);
82}

◆ initialize()

void initialize ( void  )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from Module.

Definition at line 130 of file NtuplePhase1_v6Module.cc.

131{
132 // read TFile with histograms
133
134 // expand possible wildcards
136 if (m_inputFileNames.empty()) {
137 B2FATAL("No valid files specified!");
138 }
139
140 // check files
141 TDirectory* dir = gDirectory;
142 for (const string& fileName : m_inputFileNames) {
143 TFile* f = TFile::Open(fileName.c_str(), "READ");
144 if (!f or !f->IsOpen()) {
145 B2FATAL("Couldn't open input file " + fileName);
146 }
147 delete f;
148 }
149 dir->cd();
150
151 // get event TTree
152 //m_tree = new TChain(c_treeNames[DataStore::c_Event].c_str());
153 m_tree = new TChain("tout");
154 for (const string& fileName : m_inputFileNames) {
155 m_tree->AddFile(fileName.c_str());
156 }
157 m_numEvents = m_tree->GetEntries();
158 if (m_numEvents == 0) B2ERROR(c_treeNames[DataStore::c_Event] << " has no entires");
159 m_eventCount = 0;
160
161 m_tree->SetBranchAddress("ts", &(m_beast.ts));
162 m_tree->SetBranchAddress("event", &(m_beast.event));
163 m_tree->SetBranchAddress("run", &(m_beast.run));
164 m_tree->SetBranchAddress("subrun", &(m_beast.subrun));
165 m_tree->SetBranchAddress("SKB_HER_injectionFlag", &(m_beast.SKB_HER_injectionFlag));
166 m_tree->SetBranchAddress("SKB_LER_injectionFlag", &(m_beast.SKB_LER_injectionFlag));
167 m_tree->SetBranchAddress("SKB_HER_injectionFlag_safe", &(m_beast.SKB_HER_injectionFlag_safe));
168 m_tree->SetBranchAddress("SKB_LER_injectionFlag_safe", &(m_beast.SKB_LER_injectionFlag_safe));
169 m_tree->SetBranchAddress("SKB_HER_abortFlag", &(m_beast.SKB_HER_abortFlag));
170 m_tree->SetBranchAddress("SKB_LER_abortFlag", &(m_beast.SKB_LER_abortFlag));
171 m_tree->SetBranchAddress("SKB_HER_abortFlag_safe", &(m_beast.SKB_HER_abortFlag_safe));
172 m_tree->SetBranchAddress("SKB_LER_abortFlag_safe", &(m_beast.SKB_LER_abortFlag_safe));
173 m_tree->SetBranchAddress("SKB_Status", &(m_beast.SKB_Status));
174 m_tree->SetBranchAddress("SKB_HER_injectionRate", &(m_beast.SKB_HER_injectionRate));
175 m_tree->SetBranchAddress("SKB_LER_injectionRate", &(m_beast.SKB_LER_injectionRate));
176 m_tree->SetBranchAddress("SKB_HER_lifetime", &(m_beast.SKB_HER_lifetime));
177 m_tree->SetBranchAddress("SKB_LER_lifetime", &(m_beast.SKB_LER_lifetime));
178 m_tree->SetBranchAddress("SKB_LER_current", &(m_beast.SKB_LER_current));
179 m_tree->SetBranchAddress("SKB_HER_current", &(m_beast.SKB_HER_current));
180 m_tree->SetBranchAddress("SKB_LER_injectionEfficiency", &(m_beast.SKB_LER_injectionEfficiency));
181 m_tree->SetBranchAddress("SKB_HER_injectionEfficiency", &(m_beast.SKB_HER_injectionEfficiency));
182 m_tree->SetBranchAddress("SKB_beamLoss_ionChambers_mean", &(m_beast.SKB_beamLoss_ionChambers_mean));
183 m_tree->SetBranchAddress("SKB_beamLoss_PINdiodes_mean", &(m_beast.SKB_beamLoss_PINdiodes_mean));
184 m_tree->SetBranchAddress("SKB_beamLoss_nearCollimators", &(m_beast.SKB_beamLoss_nearCollimators));
185 m_tree->SetBranchAddress("SKB_beamLoss_aroundMasks", &(m_beast.SKB_beamLoss_aroundMasks));
186 m_tree->SetBranchAddress("SKB_LER_injectionCharge", &(m_beast.SKB_LER_injectionCharge));
187 m_tree->SetBranchAddress("SKB_HER_injectionCharge", &(m_beast.SKB_HER_injectionCharge));
188 m_tree->SetBranchAddress("SKB_LER_injectionRepetitionRate", &(m_beast.SKB_LER_injectionRepetitionRate));
189 m_tree->SetBranchAddress("SKB_HER_injectionRepetitionRate", &(m_beast.SKB_HER_injectionRepetitionRate));
190 m_tree->SetBranchAddress("SKB_LER_injectionNumberOfBunches", &(m_beast.SKB_LER_injectionNumberOfBunches));
191 m_tree->SetBranchAddress("SKB_HER_injectionNumberOfBunches", &(m_beast.SKB_HER_injectionNumberOfBunches));
192 m_tree->SetBranchAddress("SKB_LER_pressures", &(m_beast.SKB_LER_pressures));
193 m_tree->SetBranchAddress("SKB_HER_pressures", &(m_beast.SKB_HER_pressures));
194 m_tree->SetBranchAddress("SKB_LER_pressure_average", &(m_beast.SKB_LER_pressure_average));
195 m_tree->SetBranchAddress("SKB_HER_pressure_average", &(m_beast.SKB_HER_pressure_average));
196 m_tree->SetBranchAddress("SKB_LER_pressures_corrected", &(m_beast.SKB_LER_pressures_corrected));
197 m_tree->SetBranchAddress("SKB_HER_pressures_corrected", &(m_beast.SKB_HER_pressures_corrected));
198 m_tree->SetBranchAddress("SKB_LER_pressure_average_corrected", &(m_beast.SKB_LER_pressure_average_corrected));
199 m_tree->SetBranchAddress("SKB_HER_pressure_average_corrected", &(m_beast.SKB_HER_pressure_average_corrected));
200 m_tree->SetBranchAddress("SKB_HER_collimatorPositions_mm", &(m_beast.SKB_HER_collimatorPositions_mm));
201 m_tree->SetBranchAddress("SKB_HER_collimatorPositions_DMM", &(m_beast.SKB_HER_collimatorPositions_DMM));
202 m_tree->SetBranchAddress("SKB_HER_collimatorPositions_inX", &(m_beast.SKB_HER_collimatorPositions_inX));
203 m_tree->SetBranchAddress("SKB_HER_collimatorPositions_inY", &(m_beast.SKB_HER_collimatorPositions_inY));
204 m_tree->SetBranchAddress("SKB_HER_collimatorPositions_fromBeam", &(m_beast.SKB_HER_collimatorPositions_fromBeam));
205 m_tree->SetBranchAddress("SKB_LER_collimatorPositions_mm", &(m_beast.SKB_LER_collimatorPositions_mm));
206 m_tree->SetBranchAddress("SKB_LER_collimatorPositions_X", &(m_beast.SKB_LER_collimatorPositions_X));
207 m_tree->SetBranchAddress("SKB_LER_collimatorPositions_Y", &(m_beast.SKB_LER_collimatorPositions_Y));
208 m_tree->SetBranchAddress("SKB_LER_collimatorPositions_fromBeam", &(m_beast.SKB_LER_collimatorPositions_fromBeam));
209 m_tree->SetBranchAddress("SKB_HER_beamSize_xray_X", &(m_beast.SKB_HER_beamSize_xray_X));
210 m_tree->SetBranchAddress("SKB_HER_beamSize_xray_Y", &(m_beast.SKB_HER_beamSize_xray_Y));
211 m_tree->SetBranchAddress("SKB_HER_correctedBeamSize_xray_Y", &(m_beast.SKB_HER_correctedBeamSize_xray_Y));
212 m_tree->SetBranchAddress("SKB_LER_beamSize_xray_X", &(m_beast.SKB_LER_beamSize_xray_X));
213 m_tree->SetBranchAddress("SKB_LER_beamSize_xray_Y", &(m_beast.SKB_LER_beamSize_xray_Y));
214 m_tree->SetBranchAddress("SKB_LER_correctedBeamSize_xray_Y", &(m_beast.SKB_LER_correctedBeamSize_xray_Y));
215 m_tree->SetBranchAddress("SKB_LER_beamSize_SR_X", &(m_beast.SKB_LER_beamSize_SR_X));
216 m_tree->SetBranchAddress("SKB_LER_beamSize_SR_Y", &(m_beast.SKB_LER_beamSize_SR_Y));
217 m_tree->SetBranchAddress("SKB_HER_beamSize_SR_X", &(m_beast.SKB_HER_beamSize_SR_X));
218 m_tree->SetBranchAddress("SKB_HER_beamSize_SR_Y", &(m_beast.SKB_HER_beamSize_SR_Y));
219 m_tree->SetBranchAddress("SKB_HER_integratedCurrent", &(m_beast.SKB_HER_integratedCurrent));
220 m_tree->SetBranchAddress("SKB_LER_integratedCurrent", &(m_beast.SKB_LER_integratedCurrent));
221 m_tree->SetBranchAddress("SKB_LER_partialPressures_D06", &(m_beast.SKB_LER_partialPressures_D06));
222 m_tree->SetBranchAddress("SKB_LER_partialPressures_D02", &(m_beast.SKB_LER_partialPressures_D02));
223 m_tree->SetBranchAddress("SKB_LER_pressures_local", &(m_beast.SKB_LER_pressures_local));
224 m_tree->SetBranchAddress("SKB_HER_pressures_local", &(m_beast.SKB_HER_pressures_local));
225 m_tree->SetBranchAddress("SKB_LER_pressures_local_corrected", &(m_beast.SKB_LER_pressures_local_corrected));
226 m_tree->SetBranchAddress("SKB_HER_pressures_local_corrected", &(m_beast.SKB_HER_pressures_local_corrected));
227 m_tree->SetBranchAddress("SKB_LER_Zeff_D02", &(m_beast.SKB_LER_Zeff_D02));
228 m_tree->SetBranchAddress("SKB_LER_Zeff_D06", &(m_beast.SKB_LER_Zeff_D06));
229 m_tree->SetBranchAddress("CSI_sumE", &(m_beast.CSI_data_sumE));
230 m_tree->SetBranchAddress("BGO_dose", &(m_beast.BGO_data_dose));
231 m_tree->SetBranchAddress("PIN_dose", &(m_beast.PIN_data_dose));
232 m_tree->SetBranchAddress("DIA_dose", &(m_beast.DIA_data_dose));
233
234 m_tree->SetBranchAddress("HE3_rate", &(m_beast.HE3_data_rate));
235 m_tree->SetBranchAddress("CSI_hitRate", &(m_beast.CSI_data_rate));
236 m_tree->SetBranchAddress("CSI_binnedE", &(m_beast.CSI_data_Ebin));
237 m_tree->SetBranchAddress("SCI_rate", &(m_beast.QCSS_data_rate));
238 m_tree->SetBranchAddress("CLW_N_MIPs_online", &(m_beast.CLAWS_data_rate));
239
240 if (m_numEvents > 0) {
241 m_tree->GetEntry(0);
242 m_DayBin = (int)((m_beast.ts - 1454943600) / 60. / 60. / 24.);
243 }
244
245 // expand possible wildcards
247 if (m_inputFileNames.empty()) {
248 B2FATAL("No valid files specified!");
249 }
250
251 fctRate_HB = new TF1("fctRate_HB", "[0] * x*x * log([1] / TMath::Power(x,1./3.) + [2])", 1.0, 19.0);
252 fctRate_LB = new TF1("fctRate_LB", "[0] * x*x * log([1] / TMath::Power(x,1./3.) + [2])", 1.0, 19.0);
253 fctRate_HC = new TF1("fctRate_HC", "[0] * x*x / TMath::Power( ([1] / TMath::Power(x,1./3.) + [2]), 2.)", 1.0, 19.0);
254 fctRate_LC = new TF1("fctRate_LC", "[0] * x*x / TMath::Power( ([1] / TMath::Power(x,1./3.) + [2]), 2.)", 1.0, 19.0);
255 fctRate_HB->SetParameters(0.183373, 0.117173, 1.23431);
256 fctRate_LB->SetParameters(0.900838, 0.0455552, 1.10098);
257 fctRate_HC->SetParameters(1.80992, -0.000115401, 8.4047);
258 fctRate_LC->SetParameters(0.210872, -4.50637e-06, 1.64209);
259 m_input_Z_scaling[0] = fctRate_HC->Eval(m_input_Z[0]) / fctRate_HC->Eval(7);
260 m_input_Z_scaling[1] = fctRate_LC->Eval(m_input_Z[1]) / fctRate_LC->Eval(7);
261 m_input_Z_scaling[2] = fctRate_HB->Eval(m_input_Z[2]) / fctRate_HB->Eval(7);
262 m_input_Z_scaling[3] = fctRate_LB->Eval(m_input_Z[3]) / fctRate_LB->Eval(7);
263
264 if (m_input_Z[0] == 0) m_input_Z_scaling[0] = 0;
265 if (m_input_Z[1] == 0) m_input_Z_scaling[1] = 0;
266 if (m_input_Z[2] == 0) m_input_Z_scaling[2] = 0;
267 if (m_input_Z[3] == 0) m_input_Z_scaling[3] = 0;
268
269 double volume;
270 double rho;
271 double mass = 0.;
272 const double RadConv = 6.24e7; // 1 mrad = 6.24e7 MeV/kg
273
274 // check files
275 TDirectory* dirh = gDirectory;
276 TFile* fh[6];
277 int iter = 0;
278 for (const string& fileNameTmp : m_inputHistoFileNames) {
279 const TString& fileName = (TString)fileNameTmp;
280 fh[iter] = TFile::Open(fileName, "READ");
281 if (!fh[iter] or !fh[iter]->IsOpen()) {
282 B2FATAL("Couldn't open input file " + fileName);
283 }
284 if (fileName.Contains("Touschek") || fileName.Contains("Coulomb") || fileName.Contains("Brems")) {
285 for (const string& HistoRateNameTmp : m_inputRateHistoNames) {
286 const TString& HistoRateName = (TString)HistoRateNameTmp;
287
288 TH1F* h1D;
289 if (HistoRateName.Contains("csi")) h1D = (TH1F*)fh[iter]->Get(TString::Format("csi_rate_%d", m_DayBin));
290 else h1D = (TH1F*)fh[iter]->Get(HistoRateName);
291
292 for (int i = 0; i < h1D->GetNbinsX(); i++) {
293 double counts = h1D->GetBinContent(i + 1);
294 double rate = counts / m_input_Time_eqv;
295
296 if (fileName.Contains("Coulomb")) {
297 if (fileName.Contains("HER")) rate *= m_input_Z_scaling[0];
298 if (fileName.Contains("LER")) rate *= m_input_Z_scaling[1];
299 }
300 if (fileName.Contains("Brems")) {
301 if (fileName.Contains("HER")) rate *= m_input_Z_scaling[2];
302 if (fileName.Contains("LER")) rate *= m_input_Z_scaling[3];
303 }
304
305 if (HistoRateName.Contains("Def")) rate *= m_input_HE3_EfCor[i];
306
307 if (fileName.Contains("HER")) {
308 if (HistoRateName.Contains("qcss") && fileName.Contains("Touschek")) m_input_HT_QCSS_rate.push_back(rate); //Hz
309 if (HistoRateName.Contains("claws") && fileName.Contains("Touschek")) m_input_HT_CLAWS_rate.push_back(rate); //Hz
310 if (HistoRateName.Contains("csi") && fileName.Contains("Touschek")) m_input_HT_CSI_rate.push_back(rate); //Hz
311 if (HistoRateName.Contains("Def") && fileName.Contains("Touschek")) m_input_HT_HE3_rate.push_back(rate); //Hz
312 if (HistoRateName.Contains("tpc_rate") && fileName.Contains("Touschek")) m_input_HT_TPC_rate.push_back(rate); //Hz
313 if (HistoRateName.Contains("tpc_angular_rate") && fileName.Contains("Touschek")) m_input_HT_TPC_angular_rate.push_back(rate); //Hz
314 if (HistoRateName.Contains("tpc_angular_dose") && fileName.Contains("Touschek")) m_input_HT_TPC_angular_dose.push_back(rate); //Hz
315 if (HistoRateName.Contains("qcss") && fileName.Contains("Brems")) m_input_HB_QCSS_rate_av.push_back(rate); //Hz
316 if (HistoRateName.Contains("claws") && fileName.Contains("Brems")) m_input_HB_CLAWS_rate_av.push_back(rate); //Hz
317 if (HistoRateName.Contains("csi") && fileName.Contains("Brems")) m_input_HB_CSI_rate_av.push_back(rate); //Hz
318 if (HistoRateName.Contains("Def") && fileName.Contains("Brems")) m_input_HB_HE3_rate_av.push_back(rate); //Hz
319 if (HistoRateName.Contains("tpc_rate") && fileName.Contains("Brems")) m_input_HB_TPC_rate_av.push_back(rate); //Hz
320 if (HistoRateName.Contains("tpc_angular_rate") && fileName.Contains("Brems")) m_input_HB_TPC_angular_rate_av.push_back(rate); //Hz
321 if (HistoRateName.Contains("tpc_angular_dose") && fileName.Contains("Brems")) m_input_HB_TPC_angular_dose_av.push_back(rate); //Hz
322 if (HistoRateName.Contains("qcss") && fileName.Contains("Coulomb")) m_input_HC_QCSS_rate_av.push_back(rate); //Hz
323 if (HistoRateName.Contains("claws") && fileName.Contains("Coulomb")) m_input_HC_CLAWS_rate_av.push_back(rate); //Hz
324 if (HistoRateName.Contains("csi") && fileName.Contains("Coulomb")) m_input_HC_CSI_rate_av.push_back(rate); //Hz
325 if (HistoRateName.Contains("Def") && fileName.Contains("Coulomb")) m_input_HC_HE3_rate_av.push_back(rate); //Hz
326 if (HistoRateName.Contains("tpc_rate") && fileName.Contains("Coulomb")) m_input_HC_TPC_rate_av.push_back(rate); //Hz
327 if (HistoRateName.Contains("tpc_angular_rate") && fileName.Contains("Coulomb")) m_input_HC_TPC_angular_rate_av.push_back(rate); //Hz
328 if (HistoRateName.Contains("tpc_angular_dose") && fileName.Contains("Coulomb")) m_input_HC_TPC_angular_dose_av.push_back(rate); //Hz
329 }
330 if (fileName.Contains("LER")) {
331 if (HistoRateName.Contains("qcss") && fileName.Contains("Touschek")) m_input_LT_QCSS_rate.push_back(rate); //Hz
332 if (HistoRateName.Contains("claws") && fileName.Contains("Touschek")) m_input_LT_CLAWS_rate.push_back(rate); //Hz
333 if (HistoRateName.Contains("csi") && fileName.Contains("Touschek")) m_input_LT_CSI_rate.push_back(rate); //Hz
334 if (HistoRateName.Contains("Def") && fileName.Contains("Touschek")) m_input_LT_HE3_rate.push_back(rate); //Hz
335 if (HistoRateName.Contains("tpc_rate") && fileName.Contains("Touschek")) m_input_LT_TPC_rate.push_back(rate); //Hz
336 if (HistoRateName.Contains("tpc_angular_rate") && fileName.Contains("Touschek")) m_input_LT_TPC_angular_rate.push_back(rate); //Hz
337 if (HistoRateName.Contains("tpc_angular_dose") && fileName.Contains("Touschek")) m_input_LT_TPC_angular_dose.push_back(rate); //Hz
338 if (HistoRateName.Contains("qcss") && fileName.Contains("Brems")) m_input_LB_QCSS_rate_av.push_back(rate); //Hz
339 if (HistoRateName.Contains("claws") && fileName.Contains("Brems")) m_input_LB_CLAWS_rate_av.push_back(rate); //Hz
340 if (HistoRateName.Contains("csi") && fileName.Contains("Brems")) m_input_LB_CSI_rate_av.push_back(rate); //Hz
341 if (HistoRateName.Contains("Def") && fileName.Contains("Brems")) m_input_LB_HE3_rate_av.push_back(rate); //Hz
342 if (HistoRateName.Contains("tpc_rate") && fileName.Contains("Brems")) m_input_LB_TPC_rate_av.push_back(rate); //Hz
343 if (HistoRateName.Contains("tpc_angular_rate") && fileName.Contains("Brems")) m_input_LB_TPC_angular_rate_av.push_back(rate); //Hz
344 if (HistoRateName.Contains("tpc_angular_dose") && fileName.Contains("Brems")) m_input_LB_TPC_angular_dose_av.push_back(rate); //Hz
345 if (HistoRateName.Contains("qcss") && fileName.Contains("Coulomb")) m_input_LC_QCSS_rate_av.push_back(rate); //Hz
346 if (HistoRateName.Contains("claws") && fileName.Contains("Coulomb")) m_input_LC_CLAWS_rate_av.push_back(rate); //Hz
347 if (HistoRateName.Contains("csi") && fileName.Contains("Coulomb")) m_input_LC_CSI_rate_av.push_back(rate); //Hz
348 if (HistoRateName.Contains("Def") && fileName.Contains("Coulomb")) m_input_LC_HE3_rate_av.push_back(rate); //Hz
349 if (HistoRateName.Contains("tpc_rate") && fileName.Contains("Coulomb")) m_input_LC_TPC_rate_av.push_back(rate); //Hz
350 if (HistoRateName.Contains("tpc_angular_rate") && fileName.Contains("Coulomb")) m_input_LC_TPC_angular_rate_av.push_back(rate); //Hz
351 if (HistoRateName.Contains("tpc_angular_dose") && fileName.Contains("Coulomb")) m_input_LC_TPC_angular_dose_av.push_back(rate); //Hz
352 }
353 }
354 delete h1D;
355 }
356 for (const string& HistoDoseNameTmp : m_inputDoseHistoNames) {
357 const TString& HistoDoseName = (TString)HistoDoseNameTmp;
358
359 int imax = 0;
360 if (HistoDoseName.Contains("csi")) imax = 18;
361 if (HistoDoseName.Contains("bgo")) imax = 8;
362 if (HistoDoseName.Contains("pin")) {
363 imax = 64;
364 volume = 0.265 * 0.265 * m_input_PIN_width; //cm^3
365 rho = 2.32; //g/cm^3
366 mass = rho * volume * 1e-3; //g to kg
367 }
368 if (HistoDoseName.Contains("dia")) {
369 imax = 4;
370 volume = 0.4 * 0.4 * 0.05; //cm^3
371 rho = 3.53; //g/cm^3
372 mass = rho * volume * 1e-3; //g to kg
373 }
374 if (HistoDoseName.Contains("dosi")) {
375 imax = 4;
376 volume = 0.265 * 0.265 * 0.01; //cm^3
377 rho = 2.32; //g/cm^3
378 mass = rho * volume * 1e-3; //g to kg
379 }
380 if (HistoDoseName.Contains("tpc")) {
381 imax = 2;
382 volume = 10.8537 * 2.0 * 1.68; //cm^3
383 rho = 0.00066908; //g/cm^3
384 mass = rho * volume * 1e-3; //g to kg
385 }
386 for (int i = 0; i < imax; i++) {
387
388 TH1F* he;
389 if (HistoDoseName.Contains("csi")) {
390 he = (TH1F*)fh[iter]->Get(TString::Format("csi_dedep_%d_%d", i, m_DayBin));
391 } else {
392 he = (TH1F*)fh[iter]->Get(TString::Format("%s_%d", HistoDoseName.Data(), i));
393 }
394
395 //double step = ((double)he->GetXaxis()->GetXmax() - (double)he->GetXaxis()->GetXmin()) / ((double)he->GetNbinsX());
396 double esum = 0;
397 for (int j = 0; j < he->GetNbinsX(); j++) {
398 double co = he->GetBinContent(j + 1);
399 double va = he->GetXaxis()->GetBinCenter(j + 1);
400 double esumbin = va * co;
401
402 if (fileName.Contains("Coulomb")) {
403 if (fileName.Contains("HER")) esumbin *= m_input_Z_scaling[0];
404 if (fileName.Contains("LER")) esumbin *= m_input_Z_scaling[1];
405 }
406 if (fileName.Contains("Brems")) {
407 if (fileName.Contains("HER")) esumbin *= m_input_Z_scaling[2];
408 if (fileName.Contains("LER")) esumbin *= m_input_Z_scaling[3];
409 }
410
411 esum += esumbin;// / step;
412 if (HistoDoseName.Contains("csi_energy")) {
413 if (fileName.Contains("HER")) {
414 if (fileName.Contains("Touschek")) m_input_HT_CSI_dose_binE.push_back(esumbin / m_input_Time_eqv * 1e-3); //MeV to GeV
415 if (fileName.Contains("Coulomb")) m_input_HC_CSI_dose_binE_av.push_back(esumbin / m_input_Time_eqv * 1e-3); //MeV to GeV
416 if (fileName.Contains("Brems")) m_input_HB_CSI_dose_binE_av.push_back(esumbin / m_input_Time_eqv * 1e-3); //MeV to GeV
417 }
418 if (fileName.Contains("LER")) {
419 if (fileName.Contains("Touschek")) m_input_LT_CSI_dose_binE.push_back(esumbin / m_input_Time_eqv * 1e-3); //MeV to GeV
420 if (fileName.Contains("Coulomb")) m_input_LC_CSI_dose_binE_av.push_back(esumbin / m_input_Time_eqv * 1e-3); //MeV to GeV
421 if (fileName.Contains("Brems")) m_input_LB_CSI_dose_binE_av.push_back(esumbin / m_input_Time_eqv * 1e-3); //MeV to GeV
422 }
423 }
424 }
425 if (fileName.Contains("HER")) {
426 if (HistoDoseName.Contains("csi") && HistoDoseName.Contains("edep")
427 && fileName.Contains("Touschek")) m_input_HT_CSI_dose.push_back(esum / m_input_Time_eqv * 1e-3); //MeV to GeV
428 if (HistoDoseName.Contains("bgo")
429 && fileName.Contains("Touschek")) m_input_HT_BGO_dose.push_back(esum / m_input_Time_eqv * 1e-3); //MeV to GeV
430 if (HistoDoseName.Contains("pin")
431 && fileName.Contains("Touschek")) m_input_HT_PIN_dose.push_back(esum / m_input_Time_eqv / mass / RadConv * 1e-3); //keV to MeV
432 if (HistoDoseName.Contains("dosi")
433 && fileName.Contains("Touschek")) m_input_HT_DOSI.push_back(esum / m_input_Time_eqv / mass / RadConv);
434 if (HistoDoseName.Contains("tpc_dose")
435 && fileName.Contains("Touschek")) m_input_HT_TPC_dose.push_back(esum / m_input_Time_eqv / mass / RadConv * 1e-3); //keV to MeV
436 /*if (HistoDoseName.Contains("tpc_angular_dose")
437 && fileName.Contains("Touschek")) m_input_HT_TPC_angular_dose.push_back(esum / m_input_Time_eqv / mass / RadConv *
438 1e-3); //keV to MeV*/
439 if (HistoDoseName.Contains("dia")
440 && fileName.Contains("Touschek")) m_input_HT_DIA_dose.push_back(esum / m_input_Time_eqv / mass / RadConv * 1e-3); //keV to MeV
441 if (HistoDoseName.Contains("csi") && HistoDoseName.Contains("edep")
442 && fileName.Contains("Brems")) m_input_HB_CSI_dose_av.push_back(esum / m_input_Time_eqv * 1e-3); //MeV to GeV
443 if (HistoDoseName.Contains("bgo")
444 && fileName.Contains("Brems")) m_input_HB_BGO_dose_av.push_back(esum / m_input_Time_eqv * 1e-3); //MeV to GeV
445 if (HistoDoseName.Contains("pin")
446 && fileName.Contains("Brems")) m_input_HB_PIN_dose_av.push_back(esum / m_input_Time_eqv / mass / RadConv * 1e-3); //keV to MeV
447 if (HistoDoseName.Contains("dosi")
448 && fileName.Contains("Brems")) m_input_HB_DOSI_av.push_back(esum / m_input_Time_eqv / mass / RadConv);
449 if (HistoDoseName.Contains("tpc_dose")
450 && fileName.Contains("Brems")) m_input_HB_TPC_dose_av.push_back(esum / m_input_Time_eqv / mass / RadConv * 1e-3); //keV to MeV
451 /*if (HistoDoseName.Contains("tpc_angular_dose")
452 && fileName.Contains("Brems")) m_input_HB_TPC_angular_dose_av.push_back(esum / m_input_Time_eqv / mass / RadConv *
453 1e-3); //keV to MeV*/
454 if (HistoDoseName.Contains("dia")
455 && fileName.Contains("Brems")) m_input_HB_DIA_dose_av.push_back(esum / m_input_Time_eqv / mass / RadConv * 1e-3); //keV to MeV
456 if (HistoDoseName.Contains("csi") && HistoDoseName.Contains("edep")
457 && fileName.Contains("Coulomb")) m_input_HC_CSI_dose_av.push_back(esum / m_input_Time_eqv * 1e-3); //MeV to GeV
458 if (HistoDoseName.Contains("bgo")
459 && fileName.Contains("Coulomb")) m_input_HC_BGO_dose_av.push_back(esum / m_input_Time_eqv * 1e-3); //MeV to GeV
460 if (HistoDoseName.Contains("pin")
461 && fileName.Contains("Coulomb")) m_input_HC_PIN_dose_av.push_back(esum / m_input_Time_eqv / mass / RadConv * 1e-3); //keV to MeV
462 if (HistoDoseName.Contains("dosi")
463 && fileName.Contains("Coulomb")) m_input_HC_DOSI_av.push_back(esum / m_input_Time_eqv / mass / RadConv);
464 if (HistoDoseName.Contains("tpc_dose")
465 && fileName.Contains("Coulomb")) m_input_HC_TPC_dose_av.push_back(esum / m_input_Time_eqv / mass / RadConv * 1e-3); //keV to MeV
466 /*if (HistoDoseName.Contains("tpc_angular_dose")
467 && fileName.Contains("Coulomb")) m_input_HC_TPC_angular_dose_av.push_back(esum / m_input_Time_eqv / mass / RadConv *
468 1e-3); //keV to MeV*/
469 if (HistoDoseName.Contains("dia")
470 && fileName.Contains("Coulomb")) m_input_HC_DIA_dose_av.push_back(esum / m_input_Time_eqv / mass / RadConv * 1e-3); //keV to MeV
471 }
472 if (fileName.Contains("LER")) {
473 if (HistoDoseName.Contains("csi") && HistoDoseName.Contains("edep")
474 && fileName.Contains("Touschek")) m_input_LT_CSI_dose.push_back(esum / m_input_Time_eqv * 1e-3); //MeV to GeV
475 if (HistoDoseName.Contains("bgo")
476 && fileName.Contains("Touschek")) m_input_LT_BGO_dose.push_back(esum / m_input_Time_eqv * 1e-3); //MeV to GeV
477 if (HistoDoseName.Contains("pin")
478 && fileName.Contains("Touschek")) m_input_LT_PIN_dose.push_back(esum / m_input_Time_eqv / mass / RadConv * 1e-3); //keV to MeV
479 if (HistoDoseName.Contains("dosi")
480 && fileName.Contains("Touschek")) m_input_LT_DOSI.push_back(esum / m_input_Time_eqv / mass / RadConv);
481 if (HistoDoseName.Contains("tpc_dose")
482 && fileName.Contains("Touschek")) m_input_LT_TPC_dose.push_back(esum / m_input_Time_eqv / mass / RadConv * 1e-3); //keV to MeV
483 /*if (HistoDoseName.Contains("tpc_angular_dose")
484 && fileName.Contains("Touschek")) m_input_LT_TPC_angular_dose.push_back(esum / m_input_Time_eqv / mass / RadConv *
485 1e-3); //keV to MeV*/
486 if (HistoDoseName.Contains("dia")
487 && fileName.Contains("Touschek")) m_input_LT_DIA_dose.push_back(esum / m_input_Time_eqv / mass / RadConv * 1e-3); //keV to MeV
488 if (HistoDoseName.Contains("csi") && HistoDoseName.Contains("edep")
489 && fileName.Contains("Brems")) m_input_LB_CSI_dose_av.push_back(esum / m_input_Time_eqv * 1e-3); //MeV to GeV
490 if (HistoDoseName.Contains("bgo")
491 && fileName.Contains("Brems")) m_input_LB_BGO_dose_av.push_back(esum / m_input_Time_eqv * 1e-3); //MeV to GeV
492 if (HistoDoseName.Contains("pin")
493 && fileName.Contains("Brems")) m_input_LB_PIN_dose_av.push_back(esum / m_input_Time_eqv / mass / RadConv * 1e-3); //keV to MeV
494 if (HistoDoseName.Contains("dosi")
495 && fileName.Contains("Brems")) m_input_LB_DOSI_av.push_back(esum / m_input_Time_eqv / mass / RadConv);
496 if (HistoDoseName.Contains("tpc_dose")
497 && fileName.Contains("Brems")) m_input_LB_TPC_dose_av.push_back(esum / m_input_Time_eqv / mass / RadConv * 1e-3); //keV to MeV
498 /*if (HistoDoseName.Contains("tpc_angular_dose")
499 && fileName.Contains("Brems")) m_input_LB_TPC_angular_dose_av.push_back(esum / m_input_Time_eqv / mass / RadConv *
500 1e-3); //keV to MeV*/
501 if (HistoDoseName.Contains("dia")
502 && fileName.Contains("Brems")) m_input_LB_DIA_dose_av.push_back(esum / m_input_Time_eqv / mass / RadConv * 1e-3); //keV to MeV
503 if (HistoDoseName.Contains("csi") && HistoDoseName.Contains("edep")
504 && fileName.Contains("Coulomb")) m_input_LC_CSI_dose_av.push_back(esum / m_input_Time_eqv * 1e-3); //MeV to GeV
505 if (HistoDoseName.Contains("bgo")
506 && fileName.Contains("Coulomb")) m_input_LC_BGO_dose_av.push_back(esum / m_input_Time_eqv * 1e-3); //MeV to GeV
507 if (HistoDoseName.Contains("pin")
508 && fileName.Contains("Coulomb")) m_input_LC_PIN_dose_av.push_back(esum / m_input_Time_eqv / mass / RadConv * 1e-3); //keV to MeV
509 if (HistoDoseName.Contains("dosi")
510 && fileName.Contains("Coulomb")) m_input_LC_DOSI_av.push_back(esum / m_input_Time_eqv / mass / RadConv);
511 if (HistoDoseName.Contains("tpc_dose")
512 && fileName.Contains("Coulomb")) m_input_LC_TPC_dose_av.push_back(esum / m_input_Time_eqv / mass / RadConv * 1e-3); //keV to MeV
513 /*if (HistoDoseName.Contains("tpc_angular_dose")
514 && fileName.Contains("Coulomb")) m_input_LC_TPC_angular_dose_av.push_back(esum / m_input_Time_eqv / mass / RadConv *
515 1e-3); //keV to MeV*/
516 if (HistoDoseName.Contains("dia")
517 && fileName.Contains("Coulomb")) m_input_LC_DIA_dose_av.push_back(esum / m_input_Time_eqv / mass / RadConv * 1e-3); //keV to MeV
518 }
519 delete he;
520 }
521 }
522 }
523 if (fileName.Contains("Coulomb") || fileName.Contains("Brems")) {
524 for (const string& HistoRateNameTmp : m_inputRateHistoNamesVrs) {
525 const TString& HistoRateName = (TString)HistoRateNameTmp;
526
527 TH2F* h2D;
528 if (HistoRateName.Contains("csi")) h2D = (TH2F*)fh[iter]->Get(TString::Format("csi_rs_drate_%d", m_DayBin));
529 else h2D = (TH2F*)fh[iter]->Get(HistoRateName);
530
531 for (int k = 0; k < h2D->GetNbinsY(); k++) {
532 for (int i = 0; i < h2D->GetNbinsX(); i++) {
533 double counts = h2D->GetBinContent(i + 1, k + 1);
534 double rate = counts / m_input_Time_eqv;
535
536 if (fileName.Contains("Coulomb")) {
537 if (fileName.Contains("HER")) rate *= m_input_Z_scaling[0];
538 if (fileName.Contains("LER")) rate *= m_input_Z_scaling[1];
539 }
540 if (fileName.Contains("Brems")) {
541 if (fileName.Contains("HER")) rate *= m_input_Z_scaling[2];
542 if (fileName.Contains("LER")) rate *= m_input_Z_scaling[3];
543 }
544
545 if (HistoRateName.Contains("Def")) rate *= m_input_HE3_EfCor[i];
546
547 if (fileName.Contains("Coulomb_HER")) {
548 if (HistoRateName.Contains("qcss")) m_input_HC_QCSS_rate[k].push_back(rate); //Hz
549 if (HistoRateName.Contains("claws")) m_input_HC_CLAWS_rate[k].push_back(rate); //Hz
550 if (HistoRateName.Contains("csi")) m_input_HC_CSI_rate[k].push_back(rate); //Hz
551 if (HistoRateName.Contains("Def")) m_input_HC_HE3_rate[k].push_back(rate); //Hz
552 if (HistoRateName.Contains("tpc_rate")) m_input_HC_TPC_rate[k].push_back(rate); //Hz
553 if (HistoRateName.Contains("tpc_angular_rate")) m_input_HC_TPC_angular_rate[k].push_back(rate); //Hz
554 if (HistoRateName.Contains("tpc_angular_dose")) m_input_HC_TPC_angular_dose[k].push_back(rate); //Hz
555 }
556 if (fileName.Contains("Coulomb_LER")) {
557 if (HistoRateName.Contains("qcss")) m_input_LC_QCSS_rate[k].push_back(rate); //Hz
558 if (HistoRateName.Contains("claws")) m_input_LC_CLAWS_rate[k].push_back(rate); //Hz
559 if (HistoRateName.Contains("csi")) m_input_LC_CSI_rate[k].push_back(rate); //Hz
560 if (HistoRateName.Contains("Def")) m_input_LC_HE3_rate[k].push_back(rate); //Hz
561 if (HistoRateName.Contains("tpc_rate")) m_input_LC_TPC_rate[k].push_back(rate); //Hz
562 if (HistoRateName.Contains("tpc_angular_rate")) m_input_LC_TPC_angular_rate[k].push_back(rate); //Hz
563 if (HistoRateName.Contains("tpc_angular_dose")) m_input_LC_TPC_angular_dose[k].push_back(rate); //Hz
564 }
565 if (fileName.Contains("Brems_HER")) {
566 if (HistoRateName.Contains("qcss")) m_input_HB_QCSS_rate[k].push_back(rate); //Hz
567 if (HistoRateName.Contains("claws")) m_input_HB_CLAWS_rate[k].push_back(rate); //Hz
568 if (HistoRateName.Contains("csi")) m_input_HB_CSI_rate[k].push_back(rate); //Hz
569 if (HistoRateName.Contains("Def")) m_input_HB_HE3_rate[k].push_back(rate); //Hz
570 if (HistoRateName.Contains("tpc_rate")) m_input_HB_TPC_rate[k].push_back(rate); //Hz
571 if (HistoRateName.Contains("tpc_angular_rate")) m_input_HB_TPC_angular_rate[k].push_back(rate); //Hz
572 if (HistoRateName.Contains("tpc_angular_dose")) m_input_HB_TPC_angular_dose[k].push_back(rate); //Hz
573 }
574 if (fileName.Contains("Brems_LER")) {
575 if (HistoRateName.Contains("qcss")) m_input_LB_QCSS_rate[k].push_back(rate); //Hz
576 if (HistoRateName.Contains("claws")) m_input_LB_CLAWS_rate[k].push_back(rate); //Hz
577 if (HistoRateName.Contains("csi")) m_input_LB_CSI_rate[k].push_back(rate); //Hz
578 if (HistoRateName.Contains("Def")) m_input_LB_HE3_rate[k].push_back(rate); //Hz
579 if (HistoRateName.Contains("tpc_rate")) m_input_LB_TPC_rate[k].push_back(rate); //Hz
580 if (HistoRateName.Contains("tpc_angular_rate")) m_input_LB_TPC_angular_rate[k].push_back(rate); //Hz
581 if (HistoRateName.Contains("tpc_angular_dose")) m_input_LB_TPC_angular_dose[k].push_back(rate); //Hz
582 }
583 }
584 }
585 delete h2D;
586 }
587
588 for (const string& HistoDoseNameTmp : m_inputDoseHistoNamesVrs) {
589 const TString& HistoDoseName = (TString)HistoDoseNameTmp;
590 int imax = 0;
591 if (HistoDoseName.Contains("csi")) imax = 18;
592 if (HistoDoseName.Contains("bgo")) imax = 8;
593 if (HistoDoseName.Contains("pin")) {
594 imax = 64;
595 volume = 0.265 * 0.265 * m_input_PIN_width; //cm^3
596 rho = 2.32; //g/cm^3
597 mass = rho * volume * 1e-3; //g to kg
598 }
599 if (HistoDoseName.Contains("dia")) {
600 imax = 4;
601 volume = 0.4 * 0.4 * 0.05; //cm^3
602 rho = 3.53; //g/cm^3
603 mass = rho * volume * 1e-3; //g to kg
604 }
605 if (HistoDoseName.Contains("dosi")) {
606 imax = 4;
607 volume = 0.265 * 0.265 * 0.01; //cm^3
608 rho = 2.32; //g/cm^3
609 mass = rho * volume * 1e-3; //g to kg
610 }
611 if (HistoDoseName.Contains("tpc")) {
612 imax = 2;
613 volume = 10.8537 * 2.0 * 1.68; //cm^3
614 rho = 0.00066908; //g/cm^3
615 mass = rho * volume * 1e-3; //g to kg
616 }
617 for (int i = 0; i < imax; i++) {
618
619 TH2F* he;
620 if (HistoDoseName.Contains("csi")) {
621 he = (TH2F*)fh[iter]->Get(TString::Format("csi_rs_dedep_%d_%d", i, m_DayBin));
622 } else {
623 he = (TH2F*)fh[iter]->Get(TString::Format("%s_%d", HistoDoseName.Data(), i));
624 }
625
626 //double step = ((double)he->GetXaxis()->GetXmax() - (double)he->GetXaxis()->GetXmin()) / ((double)he->GetNbinsX());
627 for (int k = 0; k < he->GetNbinsY(); k++) {
628 double esum = 0;
629 for (int j = 0; j < he->GetNbinsX(); j++) {
630 double co = he->GetBinContent(j + 1, k + 1);
631 double va = he->GetXaxis()->GetBinCenter(j + 1);
632 double esumbin = va * co;
633
634 if (fileName.Contains("Coulomb")) {
635 if (fileName.Contains("HER")) esumbin *= m_input_Z_scaling[0];
636 if (fileName.Contains("LER")) esumbin *= m_input_Z_scaling[1];
637 }
638 if (fileName.Contains("Brems")) {
639 if (fileName.Contains("HER")) esumbin *= m_input_Z_scaling[2];
640 if (fileName.Contains("LER")) esumbin *= m_input_Z_scaling[3];
641 }
642
643 esum += esumbin;// / step;
644 if (HistoDoseName.Contains("csi_energy")) {
645 if (fileName.Contains("HER")) {
646 if (fileName.Contains("Coulomb")) m_input_HC_CSI_dose_binE[k].push_back(esumbin / m_input_Time_eqv * 1e-3); //MeV to GeV
647 if (fileName.Contains("Brems")) m_input_HB_CSI_dose_binE[k].push_back(esumbin / m_input_Time_eqv * 1e-3); //MeV to GeV
648 }
649 if (fileName.Contains("LER")) {
650 if (fileName.Contains("Coulomb")) m_input_LC_CSI_dose_binE[k].push_back(esumbin / m_input_Time_eqv * 1e-3); //MeV to GeV
651 if (fileName.Contains("Brems")) m_input_LB_CSI_dose_binE[k].push_back(esumbin / m_input_Time_eqv * 1e-3); //MeV to GeV
652 }
653 }
654 }
655
656 if (fileName.Contains("Coulomb_HER")) {
657 if (HistoDoseName.Contains("csi")
658 && HistoDoseName.Contains("edep")) m_input_HC_CSI_dose[k].push_back(esum / m_input_Time_eqv * 1e-3); //MeV to GeV
659 if (HistoDoseName.Contains("bgo")) m_input_HC_BGO_dose[k].push_back(esum / m_input_Time_eqv * 1e-3); //MeV to GeV
660 if (HistoDoseName.Contains("pin")) m_input_HC_PIN_dose[k].push_back(esum / m_input_Time_eqv / mass / RadConv * 1e-3); //keV to MeV
661 if (HistoDoseName.Contains("dosi")) m_input_HC_DOSI[k].push_back(esum / m_input_Time_eqv / mass / RadConv);
662 if (HistoDoseName.Contains("tpc_dose")) m_input_HC_TPC_dose[k].push_back(esum / m_input_Time_eqv / mass / RadConv *
663 1e-3); //keV to MeV
664 /*if (HistoDoseName.Contains("tpc_angular_dose")) m_input_HC_TPC_angular_dose[k].push_back(esum / m_input_Time_eqv / mass / RadConv *
665 1e-3); //keV to MeV*/
666 if (HistoDoseName.Contains("dia")) m_input_HC_DIA_dose[k].push_back(esum / m_input_Time_eqv / mass / RadConv * 1e-3); //keV to MeV
667 }
668 if (fileName.Contains("Coulomb_LER")) {
669 if (HistoDoseName.Contains("csi")
670 && HistoDoseName.Contains("edep")) m_input_LC_CSI_dose[k].push_back(esum / m_input_Time_eqv * 1e-3); //MeV to GeV
671 if (HistoDoseName.Contains("bgo")) m_input_LC_BGO_dose[k].push_back(esum / m_input_Time_eqv * 1e-3); //MeV to GeV
672 if (HistoDoseName.Contains("pin")) m_input_LC_PIN_dose[k].push_back(esum / m_input_Time_eqv / mass / RadConv * 1e-3); //keV to MeV
673 if (HistoDoseName.Contains("dosi")) m_input_LC_DOSI[k].push_back(esum / m_input_Time_eqv / mass / RadConv);
674 if (HistoDoseName.Contains("tpc_dose")) m_input_LC_TPC_dose[k].push_back(esum / m_input_Time_eqv / mass / RadConv *
675 1e-3); //keV to MeV
676 /*if (HistoDoseName.Contains("tpc_angular_dose")) m_input_LC_TPC_angular_dose[k].push_back(esum / m_input_Time_eqv / mass / RadConv *
677 1e-3); //keV to MeV*/
678 if (HistoDoseName.Contains("dia")) m_input_LC_DIA_dose[k].push_back(esum / m_input_Time_eqv / mass / RadConv * 1e-3); //keV to MeV
679 }
680 if (fileName.Contains("Brems_HER")) {
681 if (HistoDoseName.Contains("csi")
682 && HistoDoseName.Contains("edep")) m_input_HB_CSI_dose[k].push_back(esum / m_input_Time_eqv * 1e-3); //MeV to GeV
683 if (HistoDoseName.Contains("bgo")) m_input_HB_BGO_dose[k].push_back(esum / m_input_Time_eqv * 1e-3); //MeV to GeV
684 if (HistoDoseName.Contains("pin")) m_input_HB_PIN_dose[k].push_back(esum / m_input_Time_eqv / mass / RadConv * 1e-3); //keV to MeV
685 if (HistoDoseName.Contains("dosi")) m_input_HB_DOSI[k].push_back(esum / m_input_Time_eqv / mass / RadConv);
686 if (HistoDoseName.Contains("tpc_dose")) m_input_HB_TPC_dose[k].push_back(esum / m_input_Time_eqv / mass / RadConv *
687 1e-3); //keV to MeV
688 /*if (HistoDoseName.Contains("tpc_angular_dose")) m_input_HB_TPC_angular_dose[k].push_back(esum / m_input_Time_eqv / mass / RadConv *
689 1e-3); //keV to MeV*/
690 if (HistoDoseName.Contains("dia")) m_input_HB_DIA_dose[k].push_back(esum / m_input_Time_eqv / mass / RadConv * 1e-3); //keV to MeV
691 }
692 if (fileName.Contains("Brems_LER")) {
693 if (HistoDoseName.Contains("csi")
694 && HistoDoseName.Contains("edep")) m_input_LB_CSI_dose[k].push_back(esum / m_input_Time_eqv * 1e-3); //MeV to GeV
695 if (HistoDoseName.Contains("bgo")) m_input_LB_BGO_dose[k].push_back(esum / m_input_Time_eqv * 1e-3); //MeV to GeV
696 if (HistoDoseName.Contains("pin")) m_input_LB_PIN_dose[k].push_back(esum / m_input_Time_eqv / mass / RadConv * 1e-3); //keV to MeV
697 if (HistoDoseName.Contains("dosi")) m_input_LB_DOSI[k].push_back(esum / m_input_Time_eqv / mass / RadConv);
698 if (HistoDoseName.Contains("tpc_dose")) m_input_LB_TPC_dose[k].push_back(esum / m_input_Time_eqv / mass / RadConv *
699 1e-3); //keV to MeV
700 /*if (HistoDoseName.Contains("tpc_angular_dose")) m_input_LB_TPC_angular_dose[k].push_back(esum / m_input_Time_eqv / mass / RadConv *
701 1e-3); //keV to MeV*/
702 if (HistoDoseName.Contains("dia")) m_input_LB_DIA_dose[k].push_back(esum / m_input_Time_eqv / mass / RadConv * 1e-3); //keV to MeV
703 }
704 }
705 delete he;
706 }
707 }
708
709 }
710 iter++;
711 }
712 dirh->cd();
713 dir->cd();
714 m_numEntries = m_tree->GetEntries();
715 cout << "m_numEntries " << m_numEntries << endl;
716 m_entryCounter = 0;
717 m_exp = 0;
718 // data store objects registration
719
720 StoreObjPtr<EventMetaData> evtMetaData;
721 evtMetaData.registerInDataStore();
722
723 m_file = new TFile(m_outputFileName.c_str(), "RECREATE");
724 m_treeTruth = new TTree("truth", "Truth table (simulation)");
725
726 m_treeBEAST = new TTree("tout", "BEAST data tree (simulation)");
727
728 m_treeBEAST->Branch("ts", &(m_beast.ts));
729 m_treeBEAST->Branch("event", &(m_beast.event));
730 m_treeBEAST->Branch("run", &(m_beast.run));
731 m_treeBEAST->Branch("subrun", &(m_beast.subrun));
732
733 m_treeBEAST->Branch("SKB_HER_injectionFlag", &(m_beast.SKB_HER_injectionFlag));
734 m_treeBEAST->Branch("SKB_LER_injectionFlag", &(m_beast.SKB_LER_injectionFlag));
735 m_treeBEAST->Branch("SKB_HER_injectionFlag_safe", &(m_beast.SKB_HER_injectionFlag_safe));
736 m_treeBEAST->Branch("SKB_LER_injectionFlag_safe", &(m_beast.SKB_LER_injectionFlag_safe));
737 m_treeBEAST->Branch("SKB_HER_abortFlag", &(m_beast.SKB_HER_abortFlag));
738 m_treeBEAST->Branch("SKB_LER_abortFlag", &(m_beast.SKB_LER_abortFlag));
739 m_treeBEAST->Branch("SKB_HER_abortFlag_safe", &(m_beast.SKB_HER_abortFlag_safe));
740 m_treeBEAST->Branch("SKB_LER_abortFlag_safe", &(m_beast.SKB_LER_abortFlag_safe));
741 m_treeBEAST->Branch("SKB_Status", &(m_beast.SKB_Status));
742 m_treeBEAST->Branch("SKB_HER_injectionRate", &(m_beast.SKB_HER_injectionRate));
743 m_treeBEAST->Branch("SKB_LER_injectionRate", &(m_beast.SKB_LER_injectionRate));
744 m_treeBEAST->Branch("SKB_HER_lifetime", &(m_beast.SKB_HER_lifetime));
745 m_treeBEAST->Branch("SKB_LER_lifetime", &(m_beast.SKB_LER_lifetime));
746 m_treeBEAST->Branch("SKB_LER_current", &(m_beast.SKB_LER_current));
747 m_treeBEAST->Branch("SKB_HER_current", &(m_beast.SKB_HER_current));
748 m_treeBEAST->Branch("SKB_LER_injectionEfficiency", &(m_beast.SKB_LER_injectionEfficiency));
749 m_treeBEAST->Branch("SKB_HER_injectionEfficiency", &(m_beast.SKB_HER_injectionEfficiency));
750 m_treeBEAST->Branch("SKB_beamLoss_ionChambers_mean", &(m_beast.SKB_beamLoss_ionChambers_mean));
751 m_treeBEAST->Branch("SKB_beamLoss_PINdiodes_mean", &(m_beast.SKB_beamLoss_PINdiodes_mean));
752 m_treeBEAST->Branch("SKB_beamLoss_nearCollimators", &(m_beast.SKB_beamLoss_nearCollimators));
753 m_treeBEAST->Branch("SKB_beamLoss_aroundMasks", &(m_beast.SKB_beamLoss_aroundMasks));
754 m_treeBEAST->Branch("SKB_LER_injectionCharge", &(m_beast.SKB_LER_injectionCharge));
755 m_treeBEAST->Branch("SKB_HER_injectionCharge", &(m_beast.SKB_HER_injectionCharge));
756 m_treeBEAST->Branch("SKB_LER_injectionRepetitionRate", &(m_beast.SKB_LER_injectionRepetitionRate));
757 m_treeBEAST->Branch("SKB_HER_injectionRepetitionRate", &(m_beast.SKB_HER_injectionRepetitionRate));
758 m_treeBEAST->Branch("SKB_LER_injectionNumberOfBunches", &(m_beast.SKB_LER_injectionNumberOfBunches));
759 m_treeBEAST->Branch("SKB_HER_injectionNumberOfBunches", &(m_beast.SKB_HER_injectionNumberOfBunches));
760 m_treeBEAST->Branch("SKB_LER_pressures", &(m_beast.SKB_LER_pressures));
761 m_treeBEAST->Branch("SKB_HER_pressures", &(m_beast.SKB_HER_pressures));
762 m_treeBEAST->Branch("SKB_LER_pressure_average", &(m_beast.SKB_LER_pressure_average));
763 m_treeBEAST->Branch("SKB_HER_pressure_average", &(m_beast.SKB_HER_pressure_average));
764 m_treeBEAST->Branch("SKB_LER_pressures_corrected", &(m_beast.SKB_LER_pressures_corrected));
765 m_treeBEAST->Branch("SKB_HER_pressures_corrected", &(m_beast.SKB_HER_pressures_corrected));
766 m_treeBEAST->Branch("SKB_LER_pressure_average_corrected", &(m_beast.SKB_LER_pressure_average_corrected));
767 m_treeBEAST->Branch("SKB_HER_pressure_average_corrected", &(m_beast.SKB_HER_pressure_average_corrected));
768 m_treeBEAST->Branch("SKB_HER_collimatorPositions_mm", &(m_beast.SKB_HER_collimatorPositions_mm));
769 m_treeBEAST->Branch("SKB_HER_collimatorPositions_DMM", &(m_beast.SKB_HER_collimatorPositions_DMM));
770 m_treeBEAST->Branch("SKB_HER_collimatorPositions_inX", &(m_beast.SKB_HER_collimatorPositions_inX));
771 m_treeBEAST->Branch("SKB_HER_collimatorPositions_inY", &(m_beast.SKB_HER_collimatorPositions_inY));
772 m_treeBEAST->Branch("SKB_HER_collimatorPositions_fromBeam", &(m_beast.SKB_HER_collimatorPositions_fromBeam));
773 m_treeBEAST->Branch("SKB_LER_collimatorPositions_mm", &(m_beast.SKB_LER_collimatorPositions_mm));
774 m_treeBEAST->Branch("SKB_LER_collimatorPositions_X", &(m_beast.SKB_LER_collimatorPositions_X));
775 m_treeBEAST->Branch("SKB_LER_collimatorPositions_Y", &(m_beast.SKB_LER_collimatorPositions_Y));
776 m_treeBEAST->Branch("SKB_LER_collimatorPositions_fromBeam", &(m_beast.SKB_LER_collimatorPositions_fromBeam));
777 m_treeBEAST->Branch("SKB_HER_beamSize_xray_X", &(m_beast.SKB_HER_beamSize_xray_X));
778 m_treeBEAST->Branch("SKB_HER_beamSize_xray_Y", &(m_beast.SKB_HER_beamSize_xray_Y));
779 m_treeBEAST->Branch("SKB_HER_correctedBeamSize_xray_Y", &(m_beast.SKB_HER_correctedBeamSize_xray_Y));
780 m_treeBEAST->Branch("SKB_LER_beamSize_xray_X", &(m_beast.SKB_LER_beamSize_xray_X));
781 m_treeBEAST->Branch("SKB_LER_beamSize_xray_Y", &(m_beast.SKB_LER_beamSize_xray_Y));
782 m_treeBEAST->Branch("SKB_LER_correctedBeamSize_xray_Y", &(m_beast.SKB_LER_correctedBeamSize_xray_Y));
783 m_treeBEAST->Branch("SKB_LER_beamSize_SR_X", &(m_beast.SKB_LER_beamSize_SR_X));
784 m_treeBEAST->Branch("SKB_LER_beamSize_SR_Y", &(m_beast.SKB_LER_beamSize_SR_Y));
785 m_treeBEAST->Branch("SKB_HER_beamSize_SR_X", &(m_beast.SKB_HER_beamSize_SR_X));
786 m_treeBEAST->Branch("SKB_HER_beamSize_SR_Y", &(m_beast.SKB_HER_beamSize_SR_Y));
787 m_treeBEAST->Branch("SKB_HER_integratedCurrent", &(m_beast.SKB_HER_integratedCurrent));
788 m_treeBEAST->Branch("SKB_LER_integratedCurrent", &(m_beast.SKB_LER_integratedCurrent));
789 m_treeBEAST->Branch("SKB_LER_partialPressures_D06", &(m_beast.SKB_LER_partialPressures_D06));
790 m_treeBEAST->Branch("SKB_LER_partialPressures_D02", &(m_beast.SKB_LER_partialPressures_D02));
791 m_treeBEAST->Branch("SKB_LER_pressures_local", &(m_beast.SKB_LER_pressures_local));
792 m_treeBEAST->Branch("SKB_HER_pressures_local", &(m_beast.SKB_HER_pressures_local));
793 m_treeBEAST->Branch("SKB_LER_pressures_local_corrected", &(m_beast.SKB_LER_pressures_local_corrected));
794 m_treeBEAST->Branch("SKB_HER_pressures_local_corrected", &(m_beast.SKB_HER_pressures_local_corrected));
795 m_treeBEAST->Branch("SKB_LER_Zeff_D02", &(m_beast.SKB_LER_Zeff_D02));
796 m_treeBEAST->Branch("SKB_LER_Zeff_D06", &(m_beast.SKB_LER_Zeff_D06));
797
798 m_treeBEAST->Branch("CSI_data_sumE", &(m_beast.CSI_data_sumE));
799 m_treeBEAST->Branch("BGO_data_dose", &(m_beast.BGO_data_dose));
800 m_treeBEAST->Branch("PIN_data_dose", &(m_beast.PIN_data_dose));
801 m_treeBEAST->Branch("DIA_data_dose", &(m_beast.DIA_data_dose));
802
803 m_treeBEAST->Branch("HE3_data_rate", &(m_beast.HE3_data_rate));
804 m_treeBEAST->Branch("CSI_data_rate", &(m_beast.CSI_data_rate));
805 m_treeBEAST->Branch("QCSS_data_rate", &(m_beast.QCSS_data_rate));
806 m_treeBEAST->Branch("CLAWS_data_rate", &(m_beast.CLAWS_data_rate));
807
808 m_treeBEAST->Branch("CSI_data_Ebin", &(m_beast.CSI_data_Ebin));
809
810 m_treeBEAST->Branch("PIN_dose", &(m_beast.PIN_dose));
811 m_treeBEAST->Branch("BGO_energy", &(m_beast.BGO_energy));
812 m_treeBEAST->Branch("HE3_rate", &(m_beast.HE3_rate));
813 //m_treeBEAST->Branch("TPC_rate", &(m_beast.TPC_rate), "TPC_rate[2][5]/F");
814 //m_treeBEAST->Branch("TPC_dose", &(m_beast.TPC_dose), "TPC_dose[2][5]/F");
815 //m_treeBEAST->Branch("TPC_angular_rate", &(m_beast.TPC_angular_rate), "TPC_angular_rate[2][9][18]/F");
816 //m_treeBEAST->Branch("TPC_angular_dose", &(m_beast.TPC_angular_dose), "TPC_angular_dose[2][9][18]/F");
817 m_treeBEAST->Branch("CSI_sumE", &(m_beast.CSI_sumE));
818 m_treeBEAST->Branch("CSI_Ebin", &(m_beast.CSI_Ebin));
819 m_treeBEAST->Branch("CSI_hitRate", &(m_beast.CSI_hitRate));
820 m_treeBEAST->Branch("DIA_dose", &(m_beast.DIA_dose));
821 m_treeBEAST->Branch("CLAWS_rate", &(m_beast.CLAWS_rate));
822 m_treeBEAST->Branch("QCSS_rate", &(m_beast.QCSS_rate));
823
824 m_treeBEAST->Branch("DOSI_av", &(m_beast.DOSI_av));
825 m_treeBEAST->Branch("DOSI", &(m_beast.DOSI));
826 m_treeBEAST->Branch("PIN_dose_av", &(m_beast.PIN_dose_av));
827 m_treeBEAST->Branch("BGO_energy_av", &(m_beast.BGO_energy_av));
828 m_treeBEAST->Branch("HE3_rate_av", &(m_beast.HE3_rate_av));
829 m_treeBEAST->Branch("TPC_rate_av", &(m_beast.TPC_rate_av), "TPC_rate_av[2][5]/F");
830 //m_treeBEAST->Branch("TPC_dose_av", &(m_beast.TPC_dose_av), "TPC_dose_av[2][5]/F");
831 m_treeBEAST->Branch("TPC_dose_av", &(m_beast.TPC_dose_av));
832 m_treeBEAST->Branch("TPC_angular_rate_av", &(m_beast.TPC_angular_rate_av), "TPC_angular_rate_av[2][9][18]/F");
833 m_treeBEAST->Branch("TPC_angular_dose_av", &(m_beast.TPC_angular_dose_av), "TPC_angular_dose_av[2][9][18]/F");
834 m_treeBEAST->Branch("CSI_sumE_av", &(m_beast.CSI_sumE_av));
835 m_treeBEAST->Branch("CSI_Ebin_av", &(m_beast.CSI_Ebin_av));
836 m_treeBEAST->Branch("CSI_hitRate_av", &(m_beast.CSI_hitRate_av));
837 m_treeBEAST->Branch("DIA_dose_av", &(m_beast.DIA_dose_av));
838 m_treeBEAST->Branch("CLAWS_rate_av", &(m_beast.CLAWS_rate_av));
839 m_treeBEAST->Branch("QCSS_rate_av", &(m_beast.QCSS_rate_av));
840
841 m_treeBEAST->Branch("SAD_HER_lifetime", &(m_beast.SAD_HER_lifetime));
842 m_treeBEAST->Branch("SAD_LER_lifetime", &(m_beast.SAD_LER_lifetime));
843 m_treeBEAST->Branch("SAD_HER_lifetime_av", &(m_beast.SAD_HER_lifetime_av));
844 m_treeBEAST->Branch("SAD_LER_lifetime_av", &(m_beast.SAD_LER_lifetime_av));
845 m_treeBEAST->Branch("SAD_HER_RLR", &(m_beast.SAD_HER_RLR));
846 m_treeBEAST->Branch("SAD_LER_RLR", &(m_beast.SAD_LER_RLR));
847 m_treeBEAST->Branch("SKB_HER_RLR", &(m_beast.SKB_HER_RLR));
848 m_treeBEAST->Branch("SKB_LER_RLR", &(m_beast.SKB_LER_RLR));
849 m_treeBEAST->Branch("SAD_HER_RLR_av", &(m_beast.SAD_HER_RLR_av));
850 m_treeBEAST->Branch("SAD_LER_RLR_av", &(m_beast.SAD_LER_RLR_av));
851
852 m_treeBEAST->Branch("mc_reweight_LERT", &(m_beast.mc_reweight_LERT));
853 m_treeBEAST->Branch("mc_reweight_LERC", &(m_beast.mc_reweight_LERC));
854 m_treeBEAST->Branch("mc_reweight_LERB", &(m_beast.mc_reweight_LERB));
855 m_treeBEAST->Branch("mc_reweight_HERT", &(m_beast.mc_reweight_HERT));
856 m_treeBEAST->Branch("mc_reweight_HERC", &(m_beast.mc_reweight_HERC));
857 m_treeBEAST->Branch("mc_reweight_HERB", &(m_beast.mc_reweight_HERB));
858
859
860 /*
861 m_treeBEAST->Branch("TPC_neutrons_N", &(m_beast.TPC_neutrons_N));
862 m_treeBEAST->Branch("TPC_neutrons_tracks_E", &(m_beast.TPC_neutrons_tracks_E));
863 m_treeBEAST->Branch("TPC_neutrons_phi", &(m_beast.TPC_neutrons_phi));
864 m_treeBEAST->Branch("TPC_neutrons_theta", &(m_beast.TPC_neutrons_theta));
865 m_treeBEAST->Branch("TPC_neutrons_length", &(m_beast.TPC_neutrons_length));
866 m_treeBEAST->Branch("TPC_alphas_top_N", &(m_beast.TPC_alphas_top_N));
867 m_treeBEAST->Branch("TPC_alphas_bot_N", &(m_beast.TPC_alphas_bot_N));
868 m_treeBEAST->Branch("TPC_alphas_top_tracks_dEdx", &(m_beast.TPC_alphas_top_tracks_dEdx));
869 m_treeBEAST->Branch("TPC_alphas_bot_tracks_dEdx", &(m_beast.TPC_alphas_bot_tracks_dEdx));
870 m_treeBEAST->Branch("TPC_xrays_N", &(m_beast.TPC_xrays_N));
871 m_treeBEAST->Branch("TPC_xrays_sumE", &(m_beast.TPC_xrays_sumE));
872 */
873 m_treeTruth->Branch("SAD_I_HER", &(m_input_I_HER));
874 m_treeTruth->Branch("SAD_I_LER", &(m_input_I_LER));
875 m_treeTruth->Branch("SAD_P_HER", &(m_input_P_HER));
876 m_treeTruth->Branch("SAD_P_LER", &(m_input_P_LER));
877 m_treeTruth->Branch("SAD_sigma_x_HER", &(m_input_sigma_x_HER));
878 m_treeTruth->Branch("SAD_sigma_x_LER", &(m_input_sigma_x_LER));
879 m_treeTruth->Branch("SAD_sigma_y_HER", &(m_input_sigma_y_HER));
880 m_treeTruth->Branch("SAD_sigma_y_LER", &(m_input_sigma_y_LER));
881 m_treeTruth->Branch("SAD_bunchNb_HER", &(m_input_bunchNb_HER));
882 m_treeTruth->Branch("SAD_bunchNb_LER", &(m_input_bunchNb_LER));
883
884 for (int i = 0; i < 12; i ++) {
885 m_treeTruth->Branch(TString::Format("MC_LC_DIA_dose_%d", i), &(m_input_LC_DIA_dose[i]));
886 m_treeTruth->Branch(TString::Format("MC_HC_DIA_dose_%d", i), &(m_input_HC_DIA_dose[i]));
887 m_treeTruth->Branch(TString::Format("MC_LB_DIA_dose_%d", i), &(m_input_LB_DIA_dose[i]));
888 m_treeTruth->Branch(TString::Format("MC_HB_DIA_dose_%d", i), &(m_input_HB_DIA_dose[i]));
889
890 m_treeTruth->Branch(TString::Format("MC_LC_PIN_dose_%d", i), &(m_input_LC_PIN_dose[i]));
891 m_treeTruth->Branch(TString::Format("MC_HC_PIN_dose_%d", i), &(m_input_HC_PIN_dose[i]));
892 m_treeTruth->Branch(TString::Format("MC_LB_PIN_dose_%d", i), &(m_input_LB_PIN_dose[i]));
893 m_treeTruth->Branch(TString::Format("MC_HB_PIN_dose_%d", i), &(m_input_HB_PIN_dose[i]));
894
895 m_treeTruth->Branch(TString::Format("MC_LC_BGO_dose_%d", i), &(m_input_LC_BGO_dose[i]));
896 m_treeTruth->Branch(TString::Format("MC_HC_BGO_dose_%d", i), &(m_input_HC_BGO_dose[i]));
897 m_treeTruth->Branch(TString::Format("MC_LB_BGO_dose_%d", i), &(m_input_LB_BGO_dose[i]));
898 m_treeTruth->Branch(TString::Format("MC_HB_BGO_dose_%d", i), &(m_input_HB_BGO_dose[i]));
899
900 m_treeTruth->Branch(TString::Format("MC_LC_HE3_rate_%d", i), &(m_input_LC_HE3_rate[i]));
901 m_treeTruth->Branch(TString::Format("MC_HC_HE3_rate_%d", i), &(m_input_HC_HE3_rate[i]));
902 m_treeTruth->Branch(TString::Format("MC_LB_HE3_rate_%d", i), &(m_input_LB_HE3_rate[i]));
903 m_treeTruth->Branch(TString::Format("MC_HB_HE3_rate_%d", i), &(m_input_HB_HE3_rate[i]));
904
905 //m_treeTruth->Branch(TString::Format("MC_LC_TPC_rate_%d", i), &(m_input_LC_TPC_rate[i]));
906 //m_treeTruth->Branch(TString::Format("MC_HC_TPC_rate_%d", i), &(m_input_HC_TPC_rate[i]));
907 //m_treeTruth->Branch(TString::Format("MC_LB_TPC_rate_%d", i), &(m_input_LB_TPC_rate[i]));
908 //m_treeTruth->Branch(TString::Format("MC_HB_TPC_rate_%d", i), &(m_input_HB_TPC_rate[i]));
909
910 //m_treeTruth->Branch(TString::Format("MC_LC_TPC_dose_%d", i), &(m_input_LC_TPC_dose[i]));
911 //m_treeTruth->Branch(TString::Format("MC_HC_TPC_dose_%d", i), &(m_input_HC_TPC_dose[i]));
912 //m_treeTruth->Branch(TString::Format("MC_LB_TPC_dose_%d", i), &(m_input_LB_TPC_dose[i]));
913 //m_treeTruth->Branch(TString::Format("MC_HB_TPC_dose_%d", i), &(m_input_HB_TPC_dose[i]));
914
915 //m_treeTruth->Branch(TString::Format("MC_LC_TPC_angular_rate_%d", i), &(m_input_LC_TPC_angular_rate[i]));
916 //m_treeTruth->Branch(TString::Format("MC_HC_TPC_angular_rate_%d", i), &(m_input_HC_TPC_angular_rate[i]));
917 //m_treeTruth->Branch(TString::Format("MC_LB_TPC_angular_rate_%d", i), &(m_input_LB_TPC_angular_rate[i]));
918 //m_treeTruth->Branch(TString::Format("MC_HB_TPC_angular_rate_%d", i), &(m_input_HB_TPC_angular_rate[i]));
919
920 //m_treeTruth->Branch(TString::Format("MC_LC_TPC_angular_dose_%d", i), &(m_input_LC_TPC_angular_dose[i]));
921 //m_treeTruth->Branch(TString::Format("MC_HC_TPC_angular_dose_%d", i), &(m_input_HC_TPC_angular_dose[i]));
922 //m_treeTruth->Branch(TString::Format("MC_LB_TPC_angular_dose_%d", i), &(m_input_LB_TPC_angular_dose[i]));
923 //m_treeTruth->Branch(TString::Format("MC_HB_TPC_angular_dose_%d", i), &(m_input_HB_TPC_angular_dose[i]));
924
925 m_treeTruth->Branch(TString::Format("MC_LC_CSI_rate_%d", i), &(m_input_LC_CSI_rate[i]));
926 m_treeTruth->Branch(TString::Format("MC_HC_CSI_rate_%d", i), &(m_input_HC_CSI_rate[i]));
927 m_treeTruth->Branch(TString::Format("MC_LB_CSI_rate_%d", i), &(m_input_LB_CSI_rate[i]));
928 m_treeTruth->Branch(TString::Format("MC_HB_CSI_rate_%d", i), &(m_input_HB_CSI_rate[i]));
929
930 m_treeTruth->Branch(TString::Format("MC_LC_CSI_dose_%d", i), &(m_input_LC_CSI_dose[i]));
931 m_treeTruth->Branch(TString::Format("MC_HC_CSI_dose_%d", i), &(m_input_HC_CSI_dose[i]));
932 m_treeTruth->Branch(TString::Format("MC_LB_CSI_dose_%d", i), &(m_input_LB_CSI_dose[i]));
933 m_treeTruth->Branch(TString::Format("MC_HB_CSI_dose_%d", i), &(m_input_HB_CSI_dose[i]));
934
935 m_treeTruth->Branch(TString::Format("MC_LC_CLAWS_rate_%d", i), &(m_input_LC_CLAWS_rate[i]));
936 m_treeTruth->Branch(TString::Format("MC_HC_CLAWS_rate_%d", i), &(m_input_HC_CLAWS_rate[i]));
937 m_treeTruth->Branch(TString::Format("MC_LB_CLAWS_rate_%d", i), &(m_input_LB_CLAWS_rate[i]));
938 m_treeTruth->Branch(TString::Format("MC_HB_CLAWS_rate_%d", i), &(m_input_HB_CLAWS_rate[i]));
939
940 m_treeTruth->Branch(TString::Format("MC_LC_QCSS_rate_%d", i), &(m_input_LC_QCSS_rate[i]));
941 m_treeTruth->Branch(TString::Format("MC_HC_QCSS_rate_%d", i), &(m_input_HC_QCSS_rate[i]));
942 m_treeTruth->Branch(TString::Format("MC_LB_QCSS_rate_%d", i), &(m_input_LB_QCSS_rate[i]));
943 m_treeTruth->Branch(TString::Format("MC_HB_QCSS_rate_%d", i), &(m_input_HB_QCSS_rate[i]));
944 }
945
946 m_treeTruth->Branch("MC_LT_DIA_dose", &(m_input_LT_DIA_dose));
947 m_treeTruth->Branch("MC_HT_DIA_dose", &(m_input_HT_DIA_dose));
948 m_treeTruth->Branch("MC_LC_DIA_dose_av", &(m_input_LC_DIA_dose_av));
949 m_treeTruth->Branch("MC_HC_DIA_dose_av", &(m_input_HC_DIA_dose_av));
950 m_treeTruth->Branch("MC_LB_DIA_dose_av", &(m_input_LB_DIA_dose_av));
951 m_treeTruth->Branch("MC_HB_DIA_dose_av", &(m_input_HB_DIA_dose_av));
952
953 m_treeTruth->Branch("MC_LT_PIN_dose", &(m_input_LT_PIN_dose));
954 m_treeTruth->Branch("MC_HT_PIN_dose", &(m_input_HT_PIN_dose));
955 m_treeTruth->Branch("MC_LC_PIN_dose_av", &(m_input_LC_PIN_dose_av));
956 m_treeTruth->Branch("MC_HC_PIN_dose_av", &(m_input_HC_PIN_dose_av));
957 m_treeTruth->Branch("MC_LB_PIN_dose_av", &(m_input_LB_PIN_dose_av));
958 m_treeTruth->Branch("MC_HB_PIN_dose_av", &(m_input_HB_PIN_dose_av));
959
960 m_treeTruth->Branch("MC_LT_BGO_dose", &(m_input_LT_BGO_dose));
961 m_treeTruth->Branch("MC_HT_BGO_dose", &(m_input_HT_BGO_dose));
962 m_treeTruth->Branch("MC_LC_BGO_dose_av", &(m_input_LC_BGO_dose_av));
963 m_treeTruth->Branch("MC_HC_BGO_dose_av", &(m_input_HC_BGO_dose_av));
964 m_treeTruth->Branch("MC_LB_BGO_dose_av", &(m_input_LB_BGO_dose_av));
965 m_treeTruth->Branch("MC_HB_BGO_dose_av", &(m_input_HB_BGO_dose_av));
966
967 m_treeTruth->Branch("MC_LT_HE3_rate", &(m_input_LT_HE3_rate));
968 m_treeTruth->Branch("MC_HT_HE3_rate", &(m_input_HT_HE3_rate));
969 m_treeTruth->Branch("MC_LC_HE3_rate_av", &(m_input_LC_HE3_rate_av));
970 m_treeTruth->Branch("MC_HC_HE3_rate_av", &(m_input_HC_HE3_rate_av));
971 m_treeTruth->Branch("MC_LB_HE3_rate_av", &(m_input_LB_HE3_rate_av));
972 m_treeTruth->Branch("MC_HB_HE3_rate_av", &(m_input_HB_HE3_rate_av));
973
974 //m_treeTruth->Branch("MC_LT_TPC_rate", &(m_input_LT_TPC_rate));
975 //m_treeTruth->Branch("MC_HT_TPC_rate", &(m_input_HT_TPC_rate));
976 m_treeTruth->Branch("MC_LC_TPC_rate_av", &(m_input_LC_TPC_rate_av));
977 m_treeTruth->Branch("MC_HC_TPC_rate_av", &(m_input_HC_TPC_rate_av));
978 m_treeTruth->Branch("MC_LB_TPC_rate_av", &(m_input_LB_TPC_rate_av));
979 m_treeTruth->Branch("MC_HB_TPC_rate_av", &(m_input_HB_TPC_rate_av));
980
981 //m_treeTruth->Branch("MC_LT_TPC_dose", &(m_input_LT_TPC_dose));
982 //m_treeTruth->Branch("MC_HT_TPC_dose", &(m_input_HT_TPC_dose));
983 m_treeTruth->Branch("MC_LC_TPC_dose_av", &(m_input_LC_TPC_dose_av));
984 m_treeTruth->Branch("MC_HC_TPC_dose_av", &(m_input_HC_TPC_dose_av));
985 m_treeTruth->Branch("MC_LB_TPC_dose_av", &(m_input_LB_TPC_dose_av));
986 m_treeTruth->Branch("MC_HB_TPC_dose_av", &(m_input_HB_TPC_dose_av));
987
988 //m_treeTruth->Branch("MC_LT_TPC_angular_rate", &(m_input_LT_TPC_angular_rate));
989 //m_treeTruth->Branch("MC_HT_TPC_angular_rate", &(m_input_HT_TPC_angular_rate));
990 m_treeTruth->Branch("MC_LC_TPC_angular_rate_av", &(m_input_LC_TPC_angular_rate_av));
991 m_treeTruth->Branch("MC_HC_TPC_angular_rate_av", &(m_input_HC_TPC_angular_rate_av));
992 m_treeTruth->Branch("MC_LB_TPC_angular_rate_av", &(m_input_LB_TPC_angular_rate_av));
993 m_treeTruth->Branch("MC_HB_TPC_angular_rate_av", &(m_input_HB_TPC_angular_rate_av));
994
995 //m_treeTruth->Branch("MC_LT_TPC_angular_dose", &(m_input_LT_TPC_angular_dose));
996 //m_treeTruth->Branch("MC_HT_TPC_angular_dose", &(m_input_HT_TPC_angular_dose));
997 m_treeTruth->Branch("MC_LC_TPC_angular_dose_av", &(m_input_LC_TPC_angular_dose_av));
998 m_treeTruth->Branch("MC_HC_TPC_angular_dose_av", &(m_input_HC_TPC_angular_dose_av));
999 m_treeTruth->Branch("MC_LB_TPC_angular_dose_av", &(m_input_LB_TPC_angular_dose_av));
1000 m_treeTruth->Branch("MC_HB_TPC_angular_dose_av", &(m_input_HB_TPC_angular_dose_av));
1001
1002 m_treeTruth->Branch("MC_LT_CSI_rate", &(m_input_LT_CSI_rate));
1003 m_treeTruth->Branch("MC_HT_CSI_rate", &(m_input_HT_CSI_rate));
1004 m_treeTruth->Branch("MC_LC_CSI_rate_av", &(m_input_LC_CSI_rate_av));
1005 m_treeTruth->Branch("MC_HC_CSI_rate_av", &(m_input_HC_CSI_rate_av));
1006 m_treeTruth->Branch("MC_LB_CSI_rate_av", &(m_input_LB_CSI_rate_av));
1007 m_treeTruth->Branch("MC_HB_CSI_rate_av", &(m_input_HB_CSI_rate_av));
1008
1009 m_treeTruth->Branch("MC_LT_CSI_dose", &(m_input_LT_CSI_dose));
1010 m_treeTruth->Branch("MC_HT_CSI_dose", &(m_input_HT_CSI_dose));
1011 m_treeTruth->Branch("MC_LC_CSI_dose_av", &(m_input_LC_CSI_dose_av));
1012 m_treeTruth->Branch("MC_HC_CSI_dose_av", &(m_input_HC_CSI_dose_av));
1013 m_treeTruth->Branch("MC_LB_CSI_dose_av", &(m_input_LB_CSI_dose_av));
1014 m_treeTruth->Branch("MC_HB_CSI_dose_av", &(m_input_HB_CSI_dose_av));
1015
1016 m_treeTruth->Branch("MC_LT_CLAWS_rate", &(m_input_LT_CLAWS_rate));
1017 m_treeTruth->Branch("MC_HT_CLAWS_rate", &(m_input_HT_CLAWS_rate));
1018 m_treeTruth->Branch("MC_LC_CLAWS_rate_av", &(m_input_LC_CLAWS_rate_av));
1019 m_treeTruth->Branch("MC_HC_CLAWS_rate_av", &(m_input_HC_CLAWS_rate_av));
1020 m_treeTruth->Branch("MC_LB_CLAWS_rate_av", &(m_input_LB_CLAWS_rate_av));
1021 m_treeTruth->Branch("MC_HB_CLAWS_rate_av", &(m_input_HB_CLAWS_rate_av));
1022
1023 m_treeTruth->Branch("MC_LT_QCSS_rate", &(m_input_LT_QCSS_rate));
1024 m_treeTruth->Branch("MC_HT_QCSS_rate", &(m_input_HT_QCSS_rate));
1025 m_treeTruth->Branch("MC_LC_QCSS_rate_av", &(m_input_LC_QCSS_rate_av));
1026 m_treeTruth->Branch("MC_HC_QCSS_rate_av", &(m_input_HC_QCSS_rate_av));
1027 m_treeTruth->Branch("MC_LB_QCSS_rate_av", &(m_input_LB_QCSS_rate_av));
1028 m_treeTruth->Branch("MC_HB_QCSS_rate_av", &(m_input_HB_QCSS_rate_av));
1029
1030 m_treeTruth->Fill();
1031}
@ c_Event
Different object in each event, all objects/arrays are invalidated after event() function has been ca...
Definition: DataStore.h:59
unsigned m_exp
Date of the day.
TTree * m_treeTruth
Truth tree pointer.
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.
const std::string c_treeNames[]
Names of trees.
std::vector< std::string > expandWordExpansions(const std::vector< std::string > &filenames)
Performs wildcard expansion using wordexp(), returns matches.
std::vector< short > * SKB_beamLoss_PINdiodes_mean
BLM mean ion chamber.
Definition: BEASTTree_v5.h:99
std::vector< double > * SKB_HER_abortFlag_safe
Beast PV.
Definition: BEASTTree_v5.h:50
std::vector< double > * SKB_LER_abortFlag
Beast PV.
Definition: BEASTTree_v5.h:49
std::vector< float > * SKB_HER_collimatorPositions_fromBeam
Beast PV.
Definition: BEASTTree_v5.h:101
std::vector< float > * HE3_data_rate
Beast PV.
Definition: BEASTTree_v5.h:186
std::vector< double > * SKB_HER_injectionFlag_safe
Beast PV.
Definition: BEASTTree_v5.h:46
std::vector< float > * SKB_LER_Zeff_D06
LER Zeff at D02 section.
Definition: BEASTTree_v5.h:39
std::vector< float > * SKB_LER_collimatorPositions_Y
Beast PV.
Definition: BEASTTree_v5.h:104
std::vector< float > * SKB_LER_pressures_local
Beast PV.
Definition: BEASTTree_v5.h:78
std::vector< float > * SKB_LER_pressures_local_corrected
Beast PV.
Definition: BEASTTree_v5.h:84
std::vector< float > * CSI_data_rate
Beast PV.
Definition: BEASTTree_v5.h:185
std::vector< double > * SKB_LER_injectionEfficiency
HER injection efficiency [%].
Definition: BEASTTree_v5.h:55
std::vector< float > * PIN_data_dose
Beast PV.
Definition: BEASTTree_v5.h:174
std::vector< float > * SKB_HER_collimatorPositions_mm
HER collimator head vertical position [mm].
Definition: BEASTTree_v5.h:88
std::vector< double > * SKB_Status
TPC gas pressure.
Definition: BEASTTree_v5.h:97
std::vector< float > * SKB_HER_collimatorPositions_inX
Beast PV.
Definition: BEASTTree_v5.h:86
std::vector< double > * SKB_LER_beamSize_xray_X
HER corrected vertical beam size by X-ray monitor [um].
Definition: BEASTTree_v5.h:65
std::vector< float > * SKB_HER_collimatorPositions_inY
HER collimator head horizontal position [mm].
Definition: BEASTTree_v5.h:87
std::vector< double > * SKB_HER_injectionFlag
Beast PV.
Definition: BEASTTree_v5.h:44
std::vector< double > * SKB_LER_injectionCharge
HER injection charge.
Definition: BEASTTree_v5.h:57
std::vector< float > * SKB_HER_pressures_local_corrected
Beast PV.
Definition: BEASTTree_v5.h:85
std::vector< double > * SKB_HER_integratedCurrent
LER Ring Loss Rate.
Definition: BEASTTree_v5.h:42
std::vector< double > * SKB_HER_injectionRate
Beast PV.
Definition: BEASTTree_v5.h:52
std::vector< double > * SKB_LER_pressure_average
HER ring average pressure [Pa].
Definition: BEASTTree_v5.h:75
std::vector< float > * BGO_data_dose
Beast PV.
Definition: BEASTTree_v5.h:175
std::vector< double > * SKB_LER_injectionRepetitionRate
HER injection repetition rate [Hz].
Definition: BEASTTree_v5.h:59
std::vector< double > * SKB_LER_integratedCurrent
Beast PV.
Definition: BEASTTree_v5.h:43
std::vector< double > * SKB_beamLoss_aroundMasks
Collimator BLM.
Definition: BEASTTree_v5.h:73
std::vector< float > * SKB_LER_collimatorPositions_X
Beast PV.
Definition: BEASTTree_v5.h:103
std::vector< float > * CSI_data_sumE
Beast PV.
Definition: BEASTTree_v5.h:167
std::vector< double > * SKB_LER_abortFlag_safe
Beast PV.
Definition: BEASTTree_v5.h:51
std::vector< short > * SKB_beamLoss_ionChambers_mean
Beast PV.
Definition: BEASTTree_v5.h:98
std::vector< float > * CSI_data_Ebin
Beast PV.
Definition: BEASTTree_v5.h:189
std::vector< float > * SKB_LER_collimatorPositions_mm
HER collimator position [mm].
Definition: BEASTTree_v5.h:89
UInt_t event
unix time [s]
Definition: BEASTTree_v5.h:31
std::vector< float > * SKB_LER_partialPressures_D02
LER partial RGA pressure at D06 section [Pa].
Definition: BEASTTree_v5.h:91
std::vector< double > * SKB_LER_injectionFlag_safe
Beast PV.
Definition: BEASTTree_v5.h:47
std::vector< float > * SKB_LER_collimatorPositions_fromBeam
Beast PV.
Definition: BEASTTree_v5.h:105
std::vector< double > * SKB_HER_injectionRepetitionRate
LER injection charge.
Definition: BEASTTree_v5.h:58
std::vector< double > * SKB_LER_injectionRate
HER injection rate [mA/s].
Definition: BEASTTree_v5.h:53
std::vector< float > * SKB_LER_partialPressures_D06
LER collimator position [mm].
Definition: BEASTTree_v5.h:90
std::vector< float > * DIA_data_dose
Beast PV.
Definition: BEASTTree_v5.h:173
std::vector< double > * SKB_beamLoss_nearCollimators
LER horizontal beam size by SR monitor [um].
Definition: BEASTTree_v5.h:72
std::vector< double > * SKB_HER_injectionCharge
LER injection efficiency [%].
Definition: BEASTTree_v5.h:56
std::vector< double > * SKB_HER_beamSize_xray_X
LER injection number of bunches.
Definition: BEASTTree_v5.h:62
std::vector< float > * CLAWS_data_rate
Beast PV.
Definition: BEASTTree_v5.h:188
std::vector< float > * SKB_HER_pressures_local
Beast PV.
Definition: BEASTTree_v5.h:79
std::vector< double > * SKB_HER_abortFlag
Beast PV.
Definition: BEASTTree_v5.h:48
std::vector< float > * SKB_HER_collimatorPositions_DMM
BLM mean pin-diod.
Definition: BEASTTree_v5.h:100
std::vector< double > * SKB_HER_pressure_average
Mask BLM.
Definition: BEASTTree_v5.h:74
std::vector< double > * SKB_LER_injectionFlag
Beast PV.
Definition: BEASTTree_v5.h:45
std::vector< double > * SKB_HER_injectionEfficiency
LER injection rate [mA/s].
Definition: BEASTTree_v5.h:54
std::vector< float > * QCSS_data_rate
Beast PV.
Definition: BEASTTree_v5.h:187

◆ printModuleParams()

void printModuleParams ( ) const

Prints module parameters.

Definition at line 1786 of file NtuplePhase1_v6Module.cc.

1787{
1788}

◆ setAbortLevel()

void setAbortLevel ( int  abortLevel)
inherited

Configure the abort log level.

Definition at line 67 of file Module.cc.

68{
69 m_logConfig.setAbortLevel(static_cast<LogConfig::ELogLevel>(abortLevel));
70}
ELogLevel
Definition of the supported log levels.
Definition: LogConfig.h:26
void setAbortLevel(ELogLevel abortLevel)
Configure the abort level.
Definition: LogConfig.h:112

◆ setDebugLevel()

void setDebugLevel ( int  debugLevel)
inherited

Configure the debug messaging level.

Definition at line 61 of file Module.cc.

62{
63 m_logConfig.setDebugLevel(debugLevel);
64}
void setDebugLevel(int debugLevel)
Configure the debug messaging level.
Definition: LogConfig.h:98

◆ setDescription()

void setDescription ( const std::string &  description)
protectedinherited

Sets the description of the module.

Parameters
descriptionA description of the module.

Definition at line 214 of file Module.cc.

215{
216 m_description = description;
217}

◆ setLogConfig()

void setLogConfig ( const LogConfig logConfig)
inlineinherited

Set the log system configuration.

Definition at line 230 of file Module.h.

230{m_logConfig = logConfig;}

◆ setLogInfo()

void setLogInfo ( int  logLevel,
unsigned int  logInfo 
)
inherited

Configure the printed log information for the given level.

Parameters
logLevelThe log level (one of LogConfig::ELogLevel)
logInfoWhat kind of info should be printed? ORed combination of LogConfig::ELogInfo flags.

Definition at line 73 of file Module.cc.

74{
75 m_logConfig.setLogInfo(static_cast<LogConfig::ELogLevel>(logLevel), logInfo);
76}
void setLogInfo(ELogLevel logLevel, unsigned int logInfo)
Configure the printed log information for the given level.
Definition: LogConfig.h:127

◆ setLogLevel()

void setLogLevel ( int  logLevel)
inherited

Configure the log level.

Definition at line 55 of file Module.cc.

56{
57 m_logConfig.setLogLevel(static_cast<LogConfig::ELogLevel>(logLevel));
58}
void setLogLevel(ELogLevel logLevel)
Configure the log level.
Definition: LogConfig.cc:25

◆ setName()

void setName ( const std::string &  name)
inlineinherited

Set the name of the module.

Note
The module name is set when using the REG_MODULE macro, but the module can be renamed before calling process() using the set_name() function in your steering file.
Parameters
nameThe name of the module

Definition at line 214 of file Module.h.

214{ m_name = name; };

◆ setParamList()

void setParamList ( const ModuleParamList params)
inlineprotectedinherited

Replace existing parameter list.

Definition at line 501 of file Module.h.

501{ m_moduleParamList = params; }

◆ setParamPython()

void setParamPython ( const std::string &  name,
const boost::python::object &  pyObj 
)
privateinherited

Implements a method for setting boost::python objects.

The method supports the following types: list, dict, int, double, string, bool The conversion of the python object to the C++ type and the final storage of the parameter value is done in the ModuleParam class.

Parameters
nameThe unique name of the parameter.
pyObjThe object which should be converted and stored as the parameter value.

Definition at line 234 of file Module.cc.

235{
236 LogSystem& logSystem = LogSystem::Instance();
237 logSystem.updateModule(&(getLogConfig()), getName());
238 try {
240 } catch (std::runtime_error& e) {
241 throw std::runtime_error("Cannot set parameter '" + name + "' for module '"
242 + m_name + "': " + e.what());
243 }
244
245 logSystem.updateModule(nullptr);
246}
Class for logging debug, info and error messages.
Definition: LogSystem.h:46
void updateModule(const LogConfig *moduleLogConfig=nullptr, const std::string &moduleName="")
Sets the log configuration to the given module log configuration and sets the module name This method...
Definition: LogSystem.h:191
static LogSystem & Instance()
Static method to get a reference to the LogSystem instance.
Definition: LogSystem.cc:31
void setParamPython(const std::string &name, const PythonObject &pyObj)
Implements a method for setting boost::python objects.

◆ setParamPythonDict()

void setParamPythonDict ( const boost::python::dict &  dictionary)
privateinherited

Implements a method for reading the parameter values from a boost::python dictionary.

The key of the dictionary has to be the name of the parameter and the value has to be of one of the supported parameter types.

Parameters
dictionaryThe python dictionary from which the parameter values are read.

Definition at line 249 of file Module.cc.

250{
251
252 LogSystem& logSystem = LogSystem::Instance();
253 logSystem.updateModule(&(getLogConfig()), getName());
254
255 boost::python::list dictKeys = dictionary.keys();
256 int nKey = boost::python::len(dictKeys);
257
258 //Loop over all keys in the dictionary
259 for (int iKey = 0; iKey < nKey; ++iKey) {
260 boost::python::object currKey = dictKeys[iKey];
261 boost::python::extract<std::string> keyProxy(currKey);
262
263 if (keyProxy.check()) {
264 const boost::python::object& currValue = dictionary[currKey];
265 setParamPython(keyProxy, currValue);
266 } else {
267 B2ERROR("Setting the module parameters from a python dictionary: invalid key in dictionary!");
268 }
269 }
270
271 logSystem.updateModule(nullptr);
272}
void setParamPython(const std::string &name, const boost::python::object &pyObj)
Implements a method for setting boost::python objects.
Definition: Module.cc:234

◆ setPropertyFlags()

void setPropertyFlags ( unsigned int  propertyFlags)
inherited

Sets the flags for the module properties.

Parameters
propertyFlagsbitwise OR of EModulePropFlags

Definition at line 208 of file Module.cc.

209{
210 m_propertyFlags = propertyFlags;
211}

◆ setReturnValue() [1/2]

void setReturnValue ( bool  value)
protectedinherited

Sets the return value for this module as bool.

The bool value is saved as an integer with the convention 1 meaning true and 0 meaning false. The value can be used in the steering file to divide the analysis chain into several paths.

Parameters
valueThe value of the return value.

Definition at line 227 of file Module.cc.

228{
229 m_hasReturnValue = true;
230 m_returnValue = value;
231}

◆ setReturnValue() [2/2]

void setReturnValue ( int  value)
protectedinherited

Sets the return value for this module as integer.

The value can be used in the steering file to divide the analysis chain into several paths.

Parameters
valueThe value of the return value.

Definition at line 220 of file Module.cc.

221{
222 m_hasReturnValue = true;
223 m_returnValue = value;
224}

◆ setType()

void setType ( const std::string &  type)
protectedinherited

Set the module type.

Only for use by internal modules (which don't use the normal REG_MODULE mechanism).

Definition at line 48 of file Module.cc.

49{
50 if (!m_type.empty())
51 B2FATAL("Trying to change module type from " << m_type << " is not allowed, the value is assumed to be fixed.");
52 m_type = type;
53}

◆ terminate()

void terminate ( void  )
overridevirtual

Termination action.

Clean-up, close files, summarize statistics, etc.

Reimplemented from Module.

Definition at line 1777 of file NtuplePhase1_v6Module.cc.

1778{
1779 delete m_tree;
1780 m_file->cd();
1781 m_treeBEAST->Write();
1782 m_treeTruth->Write();
1783 m_file->Close();
1784}

Member Data Documentation

◆ fctRate_HB

TF1* fctRate_HB = nullptr
private

fct HB

Definition at line 283 of file NtuplePhase1_v6Module.h.

◆ fctRate_HC

TF1* fctRate_HC = nullptr
private

fct HC

Definition at line 284 of file NtuplePhase1_v6Module.h.

◆ fctRate_LB

TF1* fctRate_LB = nullptr
private

fct LB

Definition at line 285 of file NtuplePhase1_v6Module.h.

◆ fctRate_LC

TF1* fctRate_LC = nullptr
private

fct LC

Definition at line 286 of file NtuplePhase1_v6Module.h.

◆ m_beast

BEAST_v5::BEASTTree_v5 m_beast
private

BEAST structure.

Definition at line 295 of file NtuplePhase1_v6Module.h.

◆ m_conditions

std::vector<ModuleCondition> m_conditions
privateinherited

Module condition, only non-null if set.

Definition at line 521 of file Module.h.

◆ m_DayBin

Int_t m_DayBin
private

day bin

Definition at line 302 of file NtuplePhase1_v6Module.h.

◆ m_description

std::string m_description
privateinherited

The description of the module.

Definition at line 511 of file Module.h.

◆ m_entryCounter

int m_entryCounter
private

entry counter

Definition at line 298 of file NtuplePhase1_v6Module.h.

◆ m_eventCount

unsigned m_eventCount = 0
private

current event (tree entry)

Definition at line 300 of file NtuplePhase1_v6Module.h.

◆ m_exp

unsigned m_exp = 0
private

Date of the day.

Definition at line 301 of file NtuplePhase1_v6Module.h.

◆ m_file

TFile* m_file
private

TFile.

Definition at line 294 of file NtuplePhase1_v6Module.h.

◆ m_hasReturnValue

bool m_hasReturnValue
privateinherited

True, if the return value is set.

Definition at line 518 of file Module.h.

◆ m_input_BGSol

Int_t m_input_BGSol
private

time stamp start and stop

Definition at line 86 of file NtuplePhase1_v6Module.h.

◆ m_input_bunchNb_HER

std::vector<Double_t> m_input_bunchNb_HER
private

HER bunch number and error.

Definition at line 247 of file NtuplePhase1_v6Module.h.

◆ m_input_bunchNb_LER

std::vector<Double_t> m_input_bunchNb_LER
private

LER bunch number and error.

Definition at line 246 of file NtuplePhase1_v6Module.h.

◆ m_input_data_bunchNb_HER

Double_t m_input_data_bunchNb_HER
private

HER bunch number and error.

Definition at line 250 of file NtuplePhase1_v6Module.h.

◆ m_input_data_bunchNb_LER

Double_t m_input_data_bunchNb_LER
private

LER bunch number and error.

Definition at line 249 of file NtuplePhase1_v6Module.h.

◆ m_input_data_SingleBeam

std::string m_input_data_SingleBeam
private

LER or HER or Both.

Definition at line 251 of file NtuplePhase1_v6Module.h.

◆ m_input_GasCorrection

std::vector<Double_t> m_input_GasCorrection
private

time stamp start and stop

Definition at line 89 of file NtuplePhase1_v6Module.h.

◆ m_input_HB_BGO_dose

std::vector<Double_t> m_input_HB_BGO_dose[12]
private

list of BGO HB dose

Definition at line 124 of file NtuplePhase1_v6Module.h.

◆ m_input_HB_BGO_dose_av

std::vector<Double_t> m_input_HB_BGO_dose_av
private

list of BGO HB dose

Definition at line 128 of file NtuplePhase1_v6Module.h.

◆ m_input_HB_CLAWS_rate

std::vector<Double_t> m_input_HB_CLAWS_rate[12]
private

list of CLAWS_rate HB

Definition at line 223 of file NtuplePhase1_v6Module.h.

◆ m_input_HB_CLAWS_rate_av

std::vector<Double_t> m_input_HB_CLAWS_rate_av
private

list of CLAWS_rate HB

Definition at line 227 of file NtuplePhase1_v6Module.h.

◆ m_input_HB_CSI_dose

std::vector<Double_t> m_input_HB_CSI_dose[12]
private

list of CSI HB dose

Definition at line 190 of file NtuplePhase1_v6Module.h.

◆ m_input_HB_CSI_dose_av

std::vector<Double_t> m_input_HB_CSI_dose_av
private

list of CSI HB dose

Definition at line 194 of file NtuplePhase1_v6Module.h.

◆ m_input_HB_CSI_dose_binE

std::vector<Double_t> m_input_HB_CSI_dose_binE[12]
private

list of CSI HB dose_binE

Definition at line 201 of file NtuplePhase1_v6Module.h.

◆ m_input_HB_CSI_dose_binE_av

std::vector<Double_t> m_input_HB_CSI_dose_binE_av
private

list of CSI HB dose_binE

Definition at line 205 of file NtuplePhase1_v6Module.h.

◆ m_input_HB_CSI_rate

std::vector<Double_t> m_input_HB_CSI_rate[12]
private

list of CSI HB rate

Definition at line 212 of file NtuplePhase1_v6Module.h.

◆ m_input_HB_CSI_rate_av

std::vector<Double_t> m_input_HB_CSI_rate_av
private

list of CSI HB rate

Definition at line 216 of file NtuplePhase1_v6Module.h.

◆ m_input_HB_DIA_dose

std::vector<Double_t> m_input_HB_DIA_dose[12]
private

list of DIA HB dose

Definition at line 102 of file NtuplePhase1_v6Module.h.

◆ m_input_HB_DIA_dose_av

std::vector<Double_t> m_input_HB_DIA_dose_av
private

list of DIA HB dose

Definition at line 106 of file NtuplePhase1_v6Module.h.

◆ m_input_HB_DOSI

std::vector<Double_t> m_input_HB_DOSI[12]
private

list of PIN HB dose

Definition at line 274 of file NtuplePhase1_v6Module.h.

◆ m_input_HB_DOSI_av

std::vector<Double_t> m_input_HB_DOSI_av
private

list of PIN HB dose

Definition at line 278 of file NtuplePhase1_v6Module.h.

◆ m_input_HB_HE3_rate

std::vector<Double_t> m_input_HB_HE3_rate[12]
private

list of HE3 HB rate

Definition at line 135 of file NtuplePhase1_v6Module.h.

◆ m_input_HB_HE3_rate_av

std::vector<Double_t> m_input_HB_HE3_rate_av
private

list of HE3 HB rate

Definition at line 139 of file NtuplePhase1_v6Module.h.

◆ m_input_HB_PIN_dose

std::vector<Double_t> m_input_HB_PIN_dose[12]
private

list of PIN HB dose

Definition at line 113 of file NtuplePhase1_v6Module.h.

◆ m_input_HB_PIN_dose_av

std::vector<Double_t> m_input_HB_PIN_dose_av
private

list of PIN HB dose

Definition at line 117 of file NtuplePhase1_v6Module.h.

◆ m_input_HB_QCSS_rate

std::vector<Double_t> m_input_HB_QCSS_rate[12]
private

list of QCSS_rate HB

Definition at line 234 of file NtuplePhase1_v6Module.h.

◆ m_input_HB_QCSS_rate_av

std::vector<Double_t> m_input_HB_QCSS_rate_av
private

list of QCSS_rate HB

Definition at line 238 of file NtuplePhase1_v6Module.h.

◆ m_input_HB_SAD_RLR

std::vector<Double_t> m_input_HB_SAD_RLR
private

list of SAD_RLR HB dose

Definition at line 259 of file NtuplePhase1_v6Module.h.

◆ m_input_HB_SAD_RLR_av

std::vector<Double_t> m_input_HB_SAD_RLR_av
private

list of SAD_RLR HB dose

Definition at line 263 of file NtuplePhase1_v6Module.h.

◆ m_input_HB_TPC_angular_dose

std::vector<Double_t> m_input_HB_TPC_angular_dose[12]
private

list of TPC_angular HB dose

Definition at line 179 of file NtuplePhase1_v6Module.h.

◆ m_input_HB_TPC_angular_dose_av

std::vector<Double_t> m_input_HB_TPC_angular_dose_av
private

list of TPC_angular HB dose

Definition at line 183 of file NtuplePhase1_v6Module.h.

◆ m_input_HB_TPC_angular_rate

std::vector<Double_t> m_input_HB_TPC_angular_rate[12]
private

list of TPC_angular HB rate

Definition at line 168 of file NtuplePhase1_v6Module.h.

◆ m_input_HB_TPC_angular_rate_av

std::vector<Double_t> m_input_HB_TPC_angular_rate_av
private

list of TPC_angular HB rate

Definition at line 172 of file NtuplePhase1_v6Module.h.

◆ m_input_HB_TPC_dose

std::vector<Double_t> m_input_HB_TPC_dose[12]
private

list of TPC HB dose

Definition at line 157 of file NtuplePhase1_v6Module.h.

◆ m_input_HB_TPC_dose_av

std::vector<Double_t> m_input_HB_TPC_dose_av
private

list of TPC HB dose

Definition at line 161 of file NtuplePhase1_v6Module.h.

◆ m_input_HB_TPC_rate

std::vector<Double_t> m_input_HB_TPC_rate[12]
private

list of TPC HB rate

Definition at line 146 of file NtuplePhase1_v6Module.h.

◆ m_input_HB_TPC_rate_av

std::vector<Double_t> m_input_HB_TPC_rate_av
private

list of TPC HB rate

Definition at line 150 of file NtuplePhase1_v6Module.h.

◆ m_input_HC_BGO_dose

std::vector<Double_t> m_input_HC_BGO_dose[12]
private

list of BGO HC dose

Definition at line 122 of file NtuplePhase1_v6Module.h.

◆ m_input_HC_BGO_dose_av

std::vector<Double_t> m_input_HC_BGO_dose_av
private

list of BGO HC dose

Definition at line 126 of file NtuplePhase1_v6Module.h.

◆ m_input_HC_CLAWS_rate

std::vector<Double_t> m_input_HC_CLAWS_rate[12]
private

list of CLAWS_rate HC

Definition at line 221 of file NtuplePhase1_v6Module.h.

◆ m_input_HC_CLAWS_rate_av

std::vector<Double_t> m_input_HC_CLAWS_rate_av
private

list of CLAWS_rate HC

Definition at line 225 of file NtuplePhase1_v6Module.h.

◆ m_input_HC_CSI_dose

std::vector<Double_t> m_input_HC_CSI_dose[12]
private

list of CSI HC dose

Definition at line 188 of file NtuplePhase1_v6Module.h.

◆ m_input_HC_CSI_dose_av

std::vector<Double_t> m_input_HC_CSI_dose_av
private

list of CSI HC dose

Definition at line 192 of file NtuplePhase1_v6Module.h.

◆ m_input_HC_CSI_dose_binE

std::vector<Double_t> m_input_HC_CSI_dose_binE[12]
private

list of CSI HC dose_binE

Definition at line 199 of file NtuplePhase1_v6Module.h.

◆ m_input_HC_CSI_dose_binE_av

std::vector<Double_t> m_input_HC_CSI_dose_binE_av
private

list of CSI HC dose_binE

Definition at line 203 of file NtuplePhase1_v6Module.h.

◆ m_input_HC_CSI_rate

std::vector<Double_t> m_input_HC_CSI_rate[12]
private

list of CSI HC rate

Definition at line 210 of file NtuplePhase1_v6Module.h.

◆ m_input_HC_CSI_rate_av

std::vector<Double_t> m_input_HC_CSI_rate_av
private

list of CSI HC rate

Definition at line 214 of file NtuplePhase1_v6Module.h.

◆ m_input_HC_DIA_dose

std::vector<Double_t> m_input_HC_DIA_dose[12]
private

list of DIA HC dose

Definition at line 100 of file NtuplePhase1_v6Module.h.

◆ m_input_HC_DIA_dose_av

std::vector<Double_t> m_input_HC_DIA_dose_av
private

list of DIA HC dose

Definition at line 104 of file NtuplePhase1_v6Module.h.

◆ m_input_HC_DOSI

std::vector<Double_t> m_input_HC_DOSI[12]
private

list of PIN HC dose

Definition at line 272 of file NtuplePhase1_v6Module.h.

◆ m_input_HC_DOSI_av

std::vector<Double_t> m_input_HC_DOSI_av
private

list of PIN HC dose

Definition at line 276 of file NtuplePhase1_v6Module.h.

◆ m_input_HC_HE3_rate

std::vector<Double_t> m_input_HC_HE3_rate[12]
private

list of HE3 HC rate

Definition at line 133 of file NtuplePhase1_v6Module.h.

◆ m_input_HC_HE3_rate_av

std::vector<Double_t> m_input_HC_HE3_rate_av
private

list of HE3 HC rate

Definition at line 137 of file NtuplePhase1_v6Module.h.

◆ m_input_HC_PIN_dose

std::vector<Double_t> m_input_HC_PIN_dose[12]
private

list of PIN HC dose

Definition at line 111 of file NtuplePhase1_v6Module.h.

◆ m_input_HC_PIN_dose_av

std::vector<Double_t> m_input_HC_PIN_dose_av
private

list of PIN HC dose

Definition at line 115 of file NtuplePhase1_v6Module.h.

◆ m_input_HC_QCSS_rate

std::vector<Double_t> m_input_HC_QCSS_rate[12]
private

list of QCSS_rate HC

Definition at line 232 of file NtuplePhase1_v6Module.h.

◆ m_input_HC_QCSS_rate_av

std::vector<Double_t> m_input_HC_QCSS_rate_av
private

list of QCSS_rate HC

Definition at line 236 of file NtuplePhase1_v6Module.h.

◆ m_input_HC_SAD_RLR

std::vector<Double_t> m_input_HC_SAD_RLR
private

list of SAD_RLR HC dose

Definition at line 261 of file NtuplePhase1_v6Module.h.

◆ m_input_HC_SAD_RLR_av

std::vector<Double_t> m_input_HC_SAD_RLR_av
private

list of SAD_RLR HC dose

Definition at line 265 of file NtuplePhase1_v6Module.h.

◆ m_input_HC_TPC_angular_dose

std::vector<Double_t> m_input_HC_TPC_angular_dose[12]
private

list of TPC_angular HC dose

Definition at line 177 of file NtuplePhase1_v6Module.h.

◆ m_input_HC_TPC_angular_dose_av

std::vector<Double_t> m_input_HC_TPC_angular_dose_av
private

list of TPC_angular HC dose

Definition at line 181 of file NtuplePhase1_v6Module.h.

◆ m_input_HC_TPC_angular_rate

std::vector<Double_t> m_input_HC_TPC_angular_rate[12]
private

list of TPC_angular HC rate

Definition at line 166 of file NtuplePhase1_v6Module.h.

◆ m_input_HC_TPC_angular_rate_av

std::vector<Double_t> m_input_HC_TPC_angular_rate_av
private

list of TPC_angular HC rate

Definition at line 170 of file NtuplePhase1_v6Module.h.

◆ m_input_HC_TPC_dose

std::vector<Double_t> m_input_HC_TPC_dose[12]
private

list of TPC HC dose

Definition at line 155 of file NtuplePhase1_v6Module.h.

◆ m_input_HC_TPC_dose_av

std::vector<Double_t> m_input_HC_TPC_dose_av
private

list of TPC HC dose

Definition at line 159 of file NtuplePhase1_v6Module.h.

◆ m_input_HC_TPC_rate

std::vector<Double_t> m_input_HC_TPC_rate[12]
private

list of TPC HC rate

Definition at line 144 of file NtuplePhase1_v6Module.h.

◆ m_input_HC_TPC_rate_av

std::vector<Double_t> m_input_HC_TPC_rate_av
private

list of TPC HC rate

Definition at line 148 of file NtuplePhase1_v6Module.h.

◆ m_input_HE3_EfCor

std::vector<Double_t> m_input_HE3_EfCor
private

HE3 inefficiency correction.

Definition at line 281 of file NtuplePhase1_v6Module.h.

◆ m_input_HT_BGO_dose

std::vector<Double_t> m_input_HT_BGO_dose
private

list of BGO HT dose

Definition at line 120 of file NtuplePhase1_v6Module.h.

◆ m_input_HT_CLAWS_rate

std::vector<Double_t> m_input_HT_CLAWS_rate
private

list of CLAWS_rate HT

Definition at line 219 of file NtuplePhase1_v6Module.h.

◆ m_input_HT_CSI_dose

std::vector<Double_t> m_input_HT_CSI_dose
private

list of CSI HT dose

Definition at line 186 of file NtuplePhase1_v6Module.h.

◆ m_input_HT_CSI_dose_binE

std::vector<Double_t> m_input_HT_CSI_dose_binE
private

list of CSI HT dose_binE

Definition at line 197 of file NtuplePhase1_v6Module.h.

◆ m_input_HT_CSI_rate

std::vector<Double_t> m_input_HT_CSI_rate
private

list of CSI HT rate

Definition at line 208 of file NtuplePhase1_v6Module.h.

◆ m_input_HT_DIA_dose

std::vector<Double_t> m_input_HT_DIA_dose
private

list of DIA HT dose

Definition at line 98 of file NtuplePhase1_v6Module.h.

◆ m_input_HT_DOSI

std::vector<Double_t> m_input_HT_DOSI
private

list of PIN HT dose

Definition at line 270 of file NtuplePhase1_v6Module.h.

◆ m_input_HT_HE3_rate

std::vector<Double_t> m_input_HT_HE3_rate
private

list of HE3 HT rate

Definition at line 131 of file NtuplePhase1_v6Module.h.

◆ m_input_HT_PIN_dose

std::vector<Double_t> m_input_HT_PIN_dose
private

list of PIN HT dose

Definition at line 109 of file NtuplePhase1_v6Module.h.

◆ m_input_HT_QCSS_rate

std::vector<Double_t> m_input_HT_QCSS_rate
private

list of QCSS_rate HT

Definition at line 230 of file NtuplePhase1_v6Module.h.

◆ m_input_HT_SAD_RLR

std::vector<Double_t> m_input_HT_SAD_RLR
private

list of SAD_RLR HT dose

Definition at line 267 of file NtuplePhase1_v6Module.h.

◆ m_input_HT_TPC_angular_dose

std::vector<Double_t> m_input_HT_TPC_angular_dose
private

list of TPC_angular HT dose

Definition at line 175 of file NtuplePhase1_v6Module.h.

◆ m_input_HT_TPC_angular_rate

std::vector<Double_t> m_input_HT_TPC_angular_rate
private

list of TPC_angular HT rate

Definition at line 164 of file NtuplePhase1_v6Module.h.

◆ m_input_HT_TPC_dose

std::vector<Double_t> m_input_HT_TPC_dose
private

list of TPC HT dose

Definition at line 153 of file NtuplePhase1_v6Module.h.

◆ m_input_HT_TPC_rate

std::vector<Double_t> m_input_HT_TPC_rate
private

list of TPC HT rate

Definition at line 142 of file NtuplePhase1_v6Module.h.

◆ m_input_I_HER

std::vector<Double_t> m_input_I_HER
private

HER current and error.

Definition at line 240 of file NtuplePhase1_v6Module.h.

◆ m_input_I_LER

std::vector<Double_t> m_input_I_LER
private

LER current and error.

Definition at line 241 of file NtuplePhase1_v6Module.h.

◆ m_input_LB_BGO_dose

std::vector<Double_t> m_input_LB_BGO_dose[12]
private

list of BGO LB dose

Definition at line 123 of file NtuplePhase1_v6Module.h.

◆ m_input_LB_BGO_dose_av

std::vector<Double_t> m_input_LB_BGO_dose_av
private

list of BGO LB dose

Definition at line 127 of file NtuplePhase1_v6Module.h.

◆ m_input_LB_CLAWS_rate

std::vector<Double_t> m_input_LB_CLAWS_rate[12]
private

list of CLAWS_rate LB

Definition at line 222 of file NtuplePhase1_v6Module.h.

◆ m_input_LB_CLAWS_rate_av

std::vector<Double_t> m_input_LB_CLAWS_rate_av
private

list of CLAWS_rate LB

Definition at line 226 of file NtuplePhase1_v6Module.h.

◆ m_input_LB_CSI_dose

std::vector<Double_t> m_input_LB_CSI_dose[12]
private

list of CSI LB dose

Definition at line 189 of file NtuplePhase1_v6Module.h.

◆ m_input_LB_CSI_dose_av

std::vector<Double_t> m_input_LB_CSI_dose_av
private

list of CSI LB dose

Definition at line 193 of file NtuplePhase1_v6Module.h.

◆ m_input_LB_CSI_dose_binE

std::vector<Double_t> m_input_LB_CSI_dose_binE[12]
private

list of CSI LB dose_binE

Definition at line 200 of file NtuplePhase1_v6Module.h.

◆ m_input_LB_CSI_dose_binE_av

std::vector<Double_t> m_input_LB_CSI_dose_binE_av
private

list of CSI LB dose_binE

Definition at line 204 of file NtuplePhase1_v6Module.h.

◆ m_input_LB_CSI_rate

std::vector<Double_t> m_input_LB_CSI_rate[12]
private

list of CSI LB rate

Definition at line 211 of file NtuplePhase1_v6Module.h.

◆ m_input_LB_CSI_rate_av

std::vector<Double_t> m_input_LB_CSI_rate_av
private

list of CSI LB rate

Definition at line 215 of file NtuplePhase1_v6Module.h.

◆ m_input_LB_DIA_dose

std::vector<Double_t> m_input_LB_DIA_dose[12]
private

list of DIA LB dose

Definition at line 101 of file NtuplePhase1_v6Module.h.

◆ m_input_LB_DIA_dose_av

std::vector<Double_t> m_input_LB_DIA_dose_av
private

list of DIA LB dose

Definition at line 105 of file NtuplePhase1_v6Module.h.

◆ m_input_LB_DOSI

std::vector<Double_t> m_input_LB_DOSI[12]
private

list of PIN LB dose

Definition at line 273 of file NtuplePhase1_v6Module.h.

◆ m_input_LB_DOSI_av

std::vector<Double_t> m_input_LB_DOSI_av
private

list of PIN LB dose

Definition at line 277 of file NtuplePhase1_v6Module.h.

◆ m_input_LB_HE3_rate

std::vector<Double_t> m_input_LB_HE3_rate[12]
private

list of HE3 LB rate

Definition at line 134 of file NtuplePhase1_v6Module.h.

◆ m_input_LB_HE3_rate_av

std::vector<Double_t> m_input_LB_HE3_rate_av
private

list of HE3 LB rate

Definition at line 138 of file NtuplePhase1_v6Module.h.

◆ m_input_LB_PIN_dose

std::vector<Double_t> m_input_LB_PIN_dose[12]
private

list of PIN LB dose

Definition at line 112 of file NtuplePhase1_v6Module.h.

◆ m_input_LB_PIN_dose_av

std::vector<Double_t> m_input_LB_PIN_dose_av
private

list of PIN LB dose

Definition at line 116 of file NtuplePhase1_v6Module.h.

◆ m_input_LB_QCSS_rate

std::vector<Double_t> m_input_LB_QCSS_rate[12]
private

list of QCSS_rate LB

Definition at line 233 of file NtuplePhase1_v6Module.h.

◆ m_input_LB_QCSS_rate_av

std::vector<Double_t> m_input_LB_QCSS_rate_av
private

list of QCSS_rate LB

Definition at line 237 of file NtuplePhase1_v6Module.h.

◆ m_input_LB_SAD_RLR

std::vector<Double_t> m_input_LB_SAD_RLR
private

list of SAD_RLR LB dose

Definition at line 258 of file NtuplePhase1_v6Module.h.

◆ m_input_LB_SAD_RLR_av

std::vector<Double_t> m_input_LB_SAD_RLR_av
private

list of SAD_RLR LB dose

Definition at line 262 of file NtuplePhase1_v6Module.h.

◆ m_input_LB_TPC_angular_dose

std::vector<Double_t> m_input_LB_TPC_angular_dose[12]
private

list of TPC_angular LB dose

Definition at line 178 of file NtuplePhase1_v6Module.h.

◆ m_input_LB_TPC_angular_dose_av

std::vector<Double_t> m_input_LB_TPC_angular_dose_av
private

list of TPC_angular LB dose

Definition at line 182 of file NtuplePhase1_v6Module.h.

◆ m_input_LB_TPC_angular_rate

std::vector<Double_t> m_input_LB_TPC_angular_rate[12]
private

list of TPC_angular LB rate

Definition at line 167 of file NtuplePhase1_v6Module.h.

◆ m_input_LB_TPC_angular_rate_av

std::vector<Double_t> m_input_LB_TPC_angular_rate_av
private

list of TPC_angular LB rate

Definition at line 171 of file NtuplePhase1_v6Module.h.

◆ m_input_LB_TPC_dose

std::vector<Double_t> m_input_LB_TPC_dose[12]
private

list of TPC LB dose

Definition at line 156 of file NtuplePhase1_v6Module.h.

◆ m_input_LB_TPC_dose_av

std::vector<Double_t> m_input_LB_TPC_dose_av
private

list of TPC LB dose

Definition at line 160 of file NtuplePhase1_v6Module.h.

◆ m_input_LB_TPC_rate

std::vector<Double_t> m_input_LB_TPC_rate[12]
private

list of TPC LB rate

Definition at line 145 of file NtuplePhase1_v6Module.h.

◆ m_input_LB_TPC_rate_av

std::vector<Double_t> m_input_LB_TPC_rate_av
private

list of TPC LB rate

Definition at line 149 of file NtuplePhase1_v6Module.h.

◆ m_input_LC_BGO_dose

std::vector<Double_t> m_input_LC_BGO_dose[12]
private

list of BGO LC dose

Definition at line 121 of file NtuplePhase1_v6Module.h.

◆ m_input_LC_BGO_dose_av

std::vector<Double_t> m_input_LC_BGO_dose_av
private

list of BGO LC dose

Definition at line 125 of file NtuplePhase1_v6Module.h.

◆ m_input_LC_CLAWS_rate

std::vector<Double_t> m_input_LC_CLAWS_rate[12]
private

list of CLAWS_rate LC

Definition at line 220 of file NtuplePhase1_v6Module.h.

◆ m_input_LC_CLAWS_rate_av

std::vector<Double_t> m_input_LC_CLAWS_rate_av
private

list of CLAWS_rate LC

Definition at line 224 of file NtuplePhase1_v6Module.h.

◆ m_input_LC_CSI_dose

std::vector<Double_t> m_input_LC_CSI_dose[12]
private

list of CSI LC dose

Definition at line 187 of file NtuplePhase1_v6Module.h.

◆ m_input_LC_CSI_dose_av

std::vector<Double_t> m_input_LC_CSI_dose_av
private

list of CSI LC dose

Definition at line 191 of file NtuplePhase1_v6Module.h.

◆ m_input_LC_CSI_dose_binE

std::vector<Double_t> m_input_LC_CSI_dose_binE[12]
private

list of CSI LC dose_binE

Definition at line 198 of file NtuplePhase1_v6Module.h.

◆ m_input_LC_CSI_dose_binE_av

std::vector<Double_t> m_input_LC_CSI_dose_binE_av
private

list of CSI LC dose_binE

Definition at line 202 of file NtuplePhase1_v6Module.h.

◆ m_input_LC_CSI_rate

std::vector<Double_t> m_input_LC_CSI_rate[12]
private

list of CSI LC rate

Definition at line 209 of file NtuplePhase1_v6Module.h.

◆ m_input_LC_CSI_rate_av

std::vector<Double_t> m_input_LC_CSI_rate_av
private

list of CSI LC rate

Definition at line 213 of file NtuplePhase1_v6Module.h.

◆ m_input_LC_DIA_dose

std::vector<Double_t> m_input_LC_DIA_dose[12]
private

list of DIA LC dose

Definition at line 99 of file NtuplePhase1_v6Module.h.

◆ m_input_LC_DIA_dose_av

std::vector<Double_t> m_input_LC_DIA_dose_av
private

list of DIA LC dose

Definition at line 103 of file NtuplePhase1_v6Module.h.

◆ m_input_LC_DOSI

std::vector<Double_t> m_input_LC_DOSI[12]
private

list of PIN LC dose

Definition at line 271 of file NtuplePhase1_v6Module.h.

◆ m_input_LC_DOSI_av

std::vector<Double_t> m_input_LC_DOSI_av
private

list of PIN LC dose

Definition at line 275 of file NtuplePhase1_v6Module.h.

◆ m_input_LC_HE3_rate

std::vector<Double_t> m_input_LC_HE3_rate[12]
private

list of HE3 LC rate

Definition at line 132 of file NtuplePhase1_v6Module.h.

◆ m_input_LC_HE3_rate_av

std::vector<Double_t> m_input_LC_HE3_rate_av
private

list of HE3 LC rate

Definition at line 136 of file NtuplePhase1_v6Module.h.

◆ m_input_LC_PIN_dose

std::vector<Double_t> m_input_LC_PIN_dose[12]
private

list of PIN LC dose

Definition at line 110 of file NtuplePhase1_v6Module.h.

◆ m_input_LC_PIN_dose_av

std::vector<Double_t> m_input_LC_PIN_dose_av
private

list of PIN LC dose

Definition at line 114 of file NtuplePhase1_v6Module.h.

◆ m_input_LC_QCSS_rate

std::vector<Double_t> m_input_LC_QCSS_rate[12]
private

list of QCSS_rate LC

Definition at line 231 of file NtuplePhase1_v6Module.h.

◆ m_input_LC_QCSS_rate_av

std::vector<Double_t> m_input_LC_QCSS_rate_av
private

list of QCSS_rate LC

Definition at line 235 of file NtuplePhase1_v6Module.h.

◆ m_input_LC_SAD_RLR

std::vector<Double_t> m_input_LC_SAD_RLR
private

list of SAD_RLR LC dose

Definition at line 260 of file NtuplePhase1_v6Module.h.

◆ m_input_LC_SAD_RLR_av

std::vector<Double_t> m_input_LC_SAD_RLR_av
private

list of SAD_RLR LC dose

Definition at line 264 of file NtuplePhase1_v6Module.h.

◆ m_input_LC_TPC_angular_dose

std::vector<Double_t> m_input_LC_TPC_angular_dose[12]
private

list of TPC_angular LC dose

Definition at line 176 of file NtuplePhase1_v6Module.h.

◆ m_input_LC_TPC_angular_dose_av

std::vector<Double_t> m_input_LC_TPC_angular_dose_av
private

list of TPC_angular LC dose

Definition at line 180 of file NtuplePhase1_v6Module.h.

◆ m_input_LC_TPC_angular_rate

std::vector<Double_t> m_input_LC_TPC_angular_rate[12]
private

list of TPC_angular LC rate

Definition at line 165 of file NtuplePhase1_v6Module.h.

◆ m_input_LC_TPC_angular_rate_av

std::vector<Double_t> m_input_LC_TPC_angular_rate_av
private

list of TPC_angular LC rate

Definition at line 169 of file NtuplePhase1_v6Module.h.

◆ m_input_LC_TPC_dose

std::vector<Double_t> m_input_LC_TPC_dose[12]
private

list of TPC LC dose

Definition at line 154 of file NtuplePhase1_v6Module.h.

◆ m_input_LC_TPC_dose_av

std::vector<Double_t> m_input_LC_TPC_dose_av
private

list of TPC LC dose

Definition at line 158 of file NtuplePhase1_v6Module.h.

◆ m_input_LC_TPC_rate

std::vector<Double_t> m_input_LC_TPC_rate[12]
private

list of TPC LC rate

Definition at line 143 of file NtuplePhase1_v6Module.h.

◆ m_input_LC_TPC_rate_av

std::vector<Double_t> m_input_LC_TPC_rate_av
private

list of TPC LC rate

Definition at line 147 of file NtuplePhase1_v6Module.h.

◆ m_input_LT_BGO_dose

std::vector<Double_t> m_input_LT_BGO_dose
private

list of BGO LT dose

Definition at line 119 of file NtuplePhase1_v6Module.h.

◆ m_input_LT_CLAWS_rate

std::vector<Double_t> m_input_LT_CLAWS_rate
private

list of CLAWS_rate LT

Definition at line 218 of file NtuplePhase1_v6Module.h.

◆ m_input_LT_CSI_dose

std::vector<Double_t> m_input_LT_CSI_dose
private

list of CSI LT dose

Definition at line 185 of file NtuplePhase1_v6Module.h.

◆ m_input_LT_CSI_dose_binE

std::vector<Double_t> m_input_LT_CSI_dose_binE
private

list of CSI LT dose_binE

Definition at line 196 of file NtuplePhase1_v6Module.h.

◆ m_input_LT_CSI_rate

std::vector<Double_t> m_input_LT_CSI_rate
private

list of CSI LT rate

Definition at line 207 of file NtuplePhase1_v6Module.h.

◆ m_input_LT_DIA_dose

std::vector<Double_t> m_input_LT_DIA_dose
private

list of DIA LT dose

Definition at line 97 of file NtuplePhase1_v6Module.h.

◆ m_input_LT_DOSI

std::vector<Double_t> m_input_LT_DOSI
private

list of PIN LT dose

Definition at line 269 of file NtuplePhase1_v6Module.h.

◆ m_input_LT_HE3_rate

std::vector<Double_t> m_input_LT_HE3_rate
private

list of HE3 LT rate

Definition at line 130 of file NtuplePhase1_v6Module.h.

◆ m_input_LT_PIN_dose

std::vector<Double_t> m_input_LT_PIN_dose
private

list of PIN LT dose

Definition at line 108 of file NtuplePhase1_v6Module.h.

◆ m_input_LT_QCSS_rate

std::vector<Double_t> m_input_LT_QCSS_rate
private

list of QCSS_rate LT

Definition at line 229 of file NtuplePhase1_v6Module.h.

◆ m_input_LT_SAD_RLR

std::vector<Double_t> m_input_LT_SAD_RLR
private

list of SAD_RLR LT dose

Definition at line 266 of file NtuplePhase1_v6Module.h.

◆ m_input_LT_TPC_angular_dose

std::vector<Double_t> m_input_LT_TPC_angular_dose
private

list of TPC_angular LT dose

Definition at line 174 of file NtuplePhase1_v6Module.h.

◆ m_input_LT_TPC_angular_rate

std::vector<Double_t> m_input_LT_TPC_angular_rate
private

list of TPC_angular LT rate

Definition at line 163 of file NtuplePhase1_v6Module.h.

◆ m_input_LT_TPC_dose

std::vector<Double_t> m_input_LT_TPC_dose
private

list of TPC LT dose

Definition at line 152 of file NtuplePhase1_v6Module.h.

◆ m_input_LT_TPC_rate

std::vector<Double_t> m_input_LT_TPC_rate
private

list of TPC LT rate

Definition at line 141 of file NtuplePhase1_v6Module.h.

◆ m_input_P_HER

std::vector<Double_t> m_input_P_HER
private

HER pressure and error.

Definition at line 244 of file NtuplePhase1_v6Module.h.

◆ m_input_P_LER

std::vector<Double_t> m_input_P_LER
private

LER pressure and error.

Definition at line 243 of file NtuplePhase1_v6Module.h.

◆ m_input_part

Int_t m_input_part
private

which components to take into account

Definition at line 88 of file NtuplePhase1_v6Module.h.

◆ m_input_PIN_width

Double_t m_input_PIN_width
private

PIN width.

Definition at line 280 of file NtuplePhase1_v6Module.h.

◆ m_input_sigma_x_HER

std::vector<Double_t> m_input_sigma_x_HER
private

HER beam size and errors.

Definition at line 254 of file NtuplePhase1_v6Module.h.

◆ m_input_sigma_x_LER

std::vector<Double_t> m_input_sigma_x_LER
private

LER beam size and errors.

Definition at line 253 of file NtuplePhase1_v6Module.h.

◆ m_input_sigma_y_HER

std::vector<Double_t> m_input_sigma_y_HER
private

HER beam size and errors.

Definition at line 256 of file NtuplePhase1_v6Module.h.

◆ m_input_sigma_y_LER

std::vector<Double_t> m_input_sigma_y_LER
private

LER beam size and errors.

Definition at line 255 of file NtuplePhase1_v6Module.h.

◆ m_input_Time_eqv

double m_input_Time_eqv
private

time stamp eqv

Definition at line 78 of file NtuplePhase1_v6Module.h.

◆ m_input_ToSol

Int_t m_input_ToSol
private

time stamp start and stop

Definition at line 87 of file NtuplePhase1_v6Module.h.

◆ m_input_ts

std::vector<Int_t> m_input_ts
private

time stamp start and stop

Definition at line 80 of file NtuplePhase1_v6Module.h.

◆ m_input_Z

std::vector<Double_t> m_input_Z
private

input Z

Definition at line 85 of file NtuplePhase1_v6Module.h.

◆ m_input_Z_scaling

Double_t m_input_Z_scaling[4]
private

time stamp start and stop

Definition at line 84 of file NtuplePhase1_v6Module.h.

◆ m_inputDoseHistoNames

std::vector<std::string> m_inputDoseHistoNames
private

list of file names

Definition at line 92 of file NtuplePhase1_v6Module.h.

◆ m_inputDoseHistoNamesVrs

std::vector<std::string> m_inputDoseHistoNamesVrs
private

list of file names

Definition at line 95 of file NtuplePhase1_v6Module.h.

◆ m_inputFileName

std::string m_inputFileName
private

input file name

Definition at line 291 of file NtuplePhase1_v6Module.h.

◆ m_inputFileNames

std::vector<std::string> m_inputFileNames
private

list of file names

Definition at line 82 of file NtuplePhase1_v6Module.h.

◆ m_inputHistoFileNames

std::vector<std::string> m_inputHistoFileNames
private

list of histo.

file names

Definition at line 292 of file NtuplePhase1_v6Module.h.

◆ m_inputRateHistoNames

std::vector<std::string> m_inputRateHistoNames
private

list of file names

Definition at line 91 of file NtuplePhase1_v6Module.h.

◆ m_inputRateHistoNamesVrs

std::vector<std::string> m_inputRateHistoNamesVrs
private

list of file names

Definition at line 94 of file NtuplePhase1_v6Module.h.

◆ m_logConfig

LogConfig m_logConfig
privateinherited

The log system configuration of the module.

Definition at line 514 of file Module.h.

◆ m_moduleParamList

ModuleParamList m_moduleParamList
privateinherited

List storing and managing all parameter of the module.

Definition at line 516 of file Module.h.

◆ m_name

std::string m_name
privateinherited

The name of the module, saved as a string (user-modifiable)

Definition at line 508 of file Module.h.

◆ m_numEntries

int m_numEntries
private

number of ntuple entries

Definition at line 297 of file NtuplePhase1_v6Module.h.

◆ m_numEvents

unsigned m_numEvents = 0
private

number of events (tree entries) in the sample

Definition at line 299 of file NtuplePhase1_v6Module.h.

◆ m_outputFileName

std::string m_outputFileName
private

output file name

Definition at line 293 of file NtuplePhase1_v6Module.h.

◆ m_package

std::string m_package
privateinherited

Package this module is found in (may be empty).

Definition at line 510 of file Module.h.

◆ m_propertyFlags

unsigned int m_propertyFlags
privateinherited

The properties of the module as bitwise or (with |) of EModulePropFlags.

Definition at line 512 of file Module.h.

◆ m_returnValue

int m_returnValue
privateinherited

The return value.

Definition at line 519 of file Module.h.

◆ m_tree

TChain* m_tree = 0
private

tree pointer

Definition at line 290 of file NtuplePhase1_v6Module.h.

◆ m_treeBEAST

TTree* m_treeBEAST = 0
private

BEAST tree pointer.

Definition at line 288 of file NtuplePhase1_v6Module.h.

◆ m_treeTruth

TTree* m_treeTruth = 0
private

Truth tree pointer.

Definition at line 289 of file NtuplePhase1_v6Module.h.

◆ m_type

std::string m_type
privateinherited

The type of the module, saved as a string.

Definition at line 509 of file Module.h.


The documentation for this class was generated from the following files: