Belle II Software development
HitLevelInfoWriterModule Class Reference

Extracts dE/dx information for calibration testing. More...

#include <HitLevelInfoWriter.h>

Inheritance diagram for HitLevelInfoWriterModule:
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

 HitLevelInfoWriterModule ()
 Default constructor.
 
virtual ~HitLevelInfoWriterModule ()
 Destructor.
 
virtual void initialize () override
 Initialize the module.
 
virtual void event () override
 This method is called for each event.
 
virtual void terminate () override
 End of the event processing.
 
void bookOutput (std::string filename)
 Create the output TFiles and TTrees.
 
void recalculateDedx (CDCDedxTrack *dedxTrack, std::map< int, std::vector< double > > &l_var, double(&cdcChi)[Const::ChargedStable::c_SetSize])
 Function to recalculate the dedx with latest constants.
 
double GetCorrection (int &adc, int layer, int wireID, double doca, double enta, double costheta, double ring, double time) const
 Function to get the correction factor.
 
void HadronCorrection (double costheta, double &dedx) const
 Function to apply the hadron correction.
 
double D2I (const double cosTheta, const double D) const
 hadron saturation parameterization part 2
 
double I2D (const double cosTheta, const double I) const
 hadron saturation parameterization part 1
 
void calculateMeans (double *mean, double *truncatedMean, double *truncatedMeanErr, const std::vector< double > &dedx) const
 Save arithmetic and truncated mean for the 'dedx' values.
 
void saveChiValue (double(&chi)[Const::ChargedStable::c_SetSize], CDCDedxTrack *dedxTrack, double dedx) const
 for all particles, save chi values into 'chi' chi array of chi values to be modified
 
virtual std::vector< std::string > getFileNames (bool outputFiles)
 Return a list of output filenames for this modules.
 
virtual void beginRun ()
 Called when entering a new run.
 
virtual void endRun ()
 This method is called if the current run ends.
 
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

void fillTrack (const TrackFitResult *fitResult)
 Fill the TTree with the information from the track fit.
 
void fillDedx (CDCDedxTrack *dedxTrack)
 Fill the TTree with the information from a CDCDedxTrack object.
 
void clearEntries ()
 Clear the arrays before filling an event.
 
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

std::string m_strOutputBaseName
 Base name for the output ROOT files.
 
std::vector< std::string > m_strParticleList
 Vector of ParticleLists to write out.
 
std::vector< std::string > m_filename
 full names of the output ROOT files
 
std::vector< TFile * > m_file
 output ROOT files
 
std::vector< TTree * > m_tree
 output ROOT trees
 
StoreArray< CDCDedxTrackm_dedxTracks
 Required array of CDCDedxTracks.
 
StoreArray< Trackm_tracks
 Required array of input Tracks.
 
StoreArray< TrackFitResultm_trackFitResults
 Required array of input TrackFitResults.
 
StoreArray< ECLClusterm_eclClusters
 Required array of input ECLClusters.
 
StoreArray< KLMClusterm_klmClusters
 Required array of input KLMClusters.
 
StoreObjPtr< EventLevelTriggerTimeInfom_TTDInfo
 Store Object Ptr: EventLevelTriggerTimeInfo.
 
int m_expID { -1}
 experiment in which this Track was found
 
int m_runID { -1}
 run in which this Track was found
 
int m_eventID { -1}
 event in which this Track was found
 
double m_injring { -1.0}
 HER injection status.
 
double m_injtime { -1.0}
 time since last injection in micro seconds
 
double m_d0 {0.}
 Signed distance to the POCA in the r-phi plane.
 
double m_z0 {0.}
 z coordinate of the POCA
 
double m_dz { -1.}
 vertex or POCA in case of tracks z in respect to IPs
 
double m_dr { -1.}
 track d0 relative to IP
 
double m_dphi { -1.}
 POCA in degrees in respect to IP.
 
double m_vx0 {0.}
 X coordinate of track POCA to origin.
 
double m_vy0 {0.}
 Y coordinate of track POCA to origin.
 
double m_vz0 {0.}
 Z coordinate of track POCA to origin.
 
double m_tanlambda { -1.}
 Slope of the track in the r-z plane.
 
double m_phi0 { -1.}
 Angle of the transverse momentum in the r-phi plane.
 
double m_chi2 { -1.}
 chi^2 from track fit
 
double m_nCDChits { -1.}
 Number of CDC hits associated to the track.
 
int m_inCDC { -1}
 frack is CDC acceptance or not
 
int m_trackID { -1}
 ID number of the Track.
 
double m_length { -1.}
 total path length of the Track
 
int m_charge {0}
 the charge for this Track
 
double m_cosTheta { -2.}
 cos(theta) for the track
 
double m_pCDC { -1.}
 momentum valid in CDC
 
double m_p { -1.}
 momentum from tracking
 
double m_pt { -1.}
 transverse momentum from tracking
 
double m_phi { -1.}
 phi for the track
 
double m_ioasym { -1.}
 asymmetry in increasing vs decreasing layer numbers per track
 
double m_theta { -2.}
 cos(theta) for the track
 
double m_PDG { -1.}
 MC PID.
 
double m_mean { -1.}
 dE/dx averaged
 
double m_trunc { -1.}
 dE/dx averaged, truncated mean, with corrections
 
double m_truncNoSat { -1.}
 dE/dx averaged, truncated mean, with corrections (not hadron)
 
double m_error { -1.}
 standard deviation of the truncated mean
 
double m_eop { -1.}
 energy over momentum in the calorimeter
 
double m_e { -1.}
 energy in the calorimeter
 
double m_e1_9 { -1.}
 ratio of energies of the central 1 crystal vs 3x3 crystals
 
double m_e9_21 { -1.}
 ratio of energies of the central 3x3 crystal vs 5x5 crystals
 
double m_klmLayers { -1.}
 number of klm layers with hits
 
double m_eclsnHits { -1.}
 
double m_scale { -1.}
 calibration scale factor
 
double m_cosCor { -1.}
 calibration cosine correction
 
double m_cosEdgeCor { -1.}
 calibration cosine edge correction
 
double m_runGain { -1.}
 calibration run gain
 
double m_timeGain { -1.}
 calibration injection time gain
 
double m_timeReso { -1.}
 calibration injection time reso
 
double m_chieOld { -1.}
 chi value for electron hypothesis
 
double m_chimuOld { -1.}
 chi value for muon hypothesis
 
double m_chipiOld { -1.}
 chi value for pion hypothesis
 
double m_chikOld { -1.}
 chi value for kaon hypothesis
 
double m_chipOld { -1.}
 chi value for proton hypothesis
 
double m_chidOld { -1.}
 chi value for deuteron hypothesis
 
double m_chie { -1.}
 modified chi value for electron hypothesis
 
double m_chimu { -1.}
 modified chi value for muon hypothesis
 
double m_chipi { -1.}
 modified chi value for pion hypothesis
 
double m_chik { -1.}
 modified chi value for kaon hypothesis
 
double m_chip { -1.}
 modified chi value for proton hypothesis
 
double m_chid { -1.}
 modified chi value for deuteron hypothesis
 
double m_prese { -1.}
 pred reso for electron hypothesis
 
double m_presmu { -1.}
 pred reso for muon hypothesis
 
double m_prespi { -1.}
 pred reso for pion hypothesis
 
double m_presk { -1.}
 pred reso for kaon hypothesis
 
double m_presp { -1.}
 pred reso for proton hypothesis
 
double m_presd { -1.}
 pred reso for deuteron hypothesis
 
double m_pmeane { -1.}
 pred mean for electron hypothesis
 
double m_pmeanmu { -1.}
 pred mean for muon hypothesis
 
double m_pmeanpi { -1.}
 pred mean for pion hypothesis
 
double m_pmeank { -1.}
 pred mean for kaon hypothesis
 
double m_pmeanp { -1.}
 pred mean for proton hypothesis
 
double m_pmeand { -1.}
 pred mean for deuteron hypothesis
 
int l_nhits { -1}
 the total number of layer hits for this Track
 
int l_nhitsused { -1}
 the total number of layer hits used for this Track
 
int l_nhitscombined [kMaxHits] = {}
 the number of hits combined this layer
 
int l_wirelongesthit [kMaxHits] = {}
 the wire number of longest hit in this layer
 
int l_layer [kMaxHits] = {}
 layer number
 
double l_path [kMaxHits] = {}
 distance travelled in this layer
 
double l_dedx [kMaxHits] = {}
 dE/dx for this layer
 
int h_nhits { -1}
 the number of good hits for this Track
 
int h_lwire [kMaxHits] = {}
 sense wire within layer
 
int h_wire [kMaxHits] = {}
 sense wire ID
 
int h_layer [kMaxHits] = {}
 layer number
 
double h_path [kMaxHits] = {}
 path length in cell
 
double h_dedx [kMaxHits] = {}
 charge per path length
 
double h_adcraw [kMaxHits] = {}
 charge per hit
 
double h_adccorr [kMaxHits] = {}
 charge per hit corr by nonlinear ADC
 
double h_doca [kMaxHits] = {}
 distance of closest approach
 
double h_ndoca [kMaxHits] = {}
 normalized distance of closest approach
 
double h_ndocaRS [kMaxHits] = {}
 normalized +RS distance of closest approach
 
double h_enta [kMaxHits] = {}
 entrance angle
 
double h_entaRS [kMaxHits] = {}
 normalized + RS distance of entrance angle
 
double h_driftT [kMaxHits] = {}
 drift time
 
double h_driftD [kMaxHits] = {}
 drift distance
 
double h_facnladc [kMaxHits] = {}
 calibration hit gain
 
double h_wireGain [kMaxHits] = {}
 calibration hit gain
 
double h_twodCor [kMaxHits] = {}
 calibration 2D correction
 
double h_onedCor [kMaxHits] = {}
 calibration 1D cleanup correction
 
double h_WeightPionHypo [kMaxHits] = {}
 weight for pion hypothesis from KalmanFitterInfo
 
double h_WeightKaonHypo [kMaxHits] = {}
 weight for kaon hypothesis from KalmanFitterInfo
 
double h_WeightProtonHypo [kMaxHits] = {}
 weight for proton hypothesis from KalmanFitterInfo
 
int h_foundByTrackFinder [kMaxHits] = {}
 the 'found by track finder' flag for the given hit
 
DBObjPtr< CDCDedxScaleFactorm_DBScaleFactor
 Scale factor to make electrons ~1.
 
DBObjPtr< CDCDedxWireGainm_DBWireGains
 Wire gain DB object.
 
DBObjPtr< CDCDedxRunGainm_DBRunGain
 Run gain DB object.
 
DBObjPtr< CDCDedxInjectionTimem_DBInjectTime
 time gain/reso DB object
 
DBObjPtr< CDCDedxCosineCorm_DBCosineCor
 Electron saturation correction DB object.
 
DBObjPtr< CDCDedx2DCellm_DB2DCell
 2D correction DB object
 
DBObjPtr< CDCDedx1DCellm_DB1DCell
 1D correction DB object
 
DBObjPtr< CDCDedxADCNonLinearitym_DBNonlADC
 hadron saturation non linearity
 
DBObjPtr< CDCDedxCosineEdgem_DBCosEdgeCor
 cosine edge calibration
 
DBObjPtr< CDCDedxHadronCorm_DBHadronCor
 hadron saturation parameters
 
std::vector< double > m_hadronpars
 hadron saturation parameters
 
bool m_isDeadwire
 write only active wires
 
bool m_isHitLevel
 Flag to switch on/off hit level info.
 
bool m_isExtraVar
 Flag to switch on/off extra level info and some available w/ release/5 only.
 
bool m_isRelative
 Flag to switch on/off relative constants.
 
bool m_isCorrection
 Flag to switch on/off corrections.
 
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.
 

Static Private Attributes

static const int kMaxHits = 200
 default hit level index
 

Detailed Description

Extracts dE/dx information for calibration testing.

Writes a ROOT file.

Definition at line 52 of file HitLevelInfoWriter.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,
80 c_ParallelProcessingCertified = 4,
81 c_HistogramManager = 8,
82 c_InternalSerializer = 16,
83 c_TerminateInAllProcesses = 32,
84 c_DontCollectStatistics = 64,
85 };
@ c_Output
Output Process.
Definition ProcHelper.h:19
@ c_Input
Input Process.
Definition ProcHelper.h:17

Constructor & Destructor Documentation

◆ HitLevelInfoWriterModule()

Default constructor.

Definition at line 25 of file HitLevelInfoWriter.cc.

25 : Module()
26{
27
28 setDescription("Extract dE/dx information for calibration development.");
29
30 addParam("outputBaseName", m_strOutputBaseName, "Suffix for output file name", string("HLInfo.root"));
31 addParam("particleLists", m_strParticleList, "Vector of ParticleLists to save", vector<string>());
32 addParam("enableHitLevel", m_isHitLevel, "True or False for Hit level variables", false);
33 addParam("m_isExtraVar", m_isExtraVar, "True or False for extra track/hit level variables", false);
34 addParam("nodeadwire", m_isDeadwire, "True or False for deadwire hit variables", false);
35 addParam("relativeCorrections", m_isRelative, "If true, apply corrections relative to those used in production", false);
36 addParam("corrections", m_isCorrection, "If true, apply corrections", true);
37
38}
std::string m_strOutputBaseName
Base name for the output ROOT files.
bool m_isHitLevel
Flag to switch on/off hit level info.
bool m_isExtraVar
Flag to switch on/off extra level info and some available w/ release/5 only.
bool m_isCorrection
Flag to switch on/off corrections.
bool m_isDeadwire
write only active wires
bool m_isRelative
Flag to switch on/off relative constants.
std::vector< std::string > m_strParticleList
Vector of ParticleLists to write out.
void setDescription(const std::string &description)
Sets the description of the module.
Definition Module.cc:214
Module()
Constructor.
Definition Module.cc:30
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:559

◆ ~HitLevelInfoWriterModule()

Destructor.

Definition at line 40 of file HitLevelInfoWriter.cc.

40{ }

Member Function Documentation

◆ beginRun()

virtual void beginRun ( void )
inlinevirtualinherited

Called when entering a new run.

Called at the beginning of each run, the method gives you the chance to change run dependent constants like alignment parameters, etc.

This method can be implemented by subclasses.

Reimplemented in AnalysisPhase1StudyModule, ARICHBackgroundModule, arichBtestModule, ARICHDigitizerModule, ARICHDQMModule, ARICHRateCalModule, ARICHReconstructorModule, AWESOMEBasicModule, B2BIIConvertBeamParamsModule, B2BIIConvertMdstModule, B2BIIFixMdstModule, B2BIIMCParticlesMonitorModule, B2BIIMdstInputModule, BeamabortModule, BeamabortStudyModule, BeamDigitizerModule, BeamBkgGeneratorModule, BeamBkgHitRateMonitorModule, BeamBkgMixerModule, BeamBkgTagSetterModule, BeamSpotMonitorModule, BelleMCOutputModule, BgoDigitizerModule, BgoModule, BgoStudyModule, BGOverlayInputModule, BKLMAnaModule, BKLMDigitAnalyzerModule, BKLMSimHistogrammerModule, BKLMTrackingModule, CalibrationCollectorModule, CaveModule, CDCCosmicAnalysisModule, CDCCRTestModule, CDCPackerModule, CDCRecoTrackFilterModule, CDCUnpackerModule, CDCDedxDQMModule, CDCDedxValidationModule, cdcDQM7Module, CDCDQMModule, CDCTrigger2DFinderModule, CDCTriggerNDFinderModule, CDCTriggerNeuroDQMModule, CDCTriggerNeuroDQMOnlineModule, CDCTriggerTSFModule, CDCTriggerUnpackerModule, CertifyParallelModule, ChargedPidMVAModule, ChargedPidMVAMulticlassModule, ClawDigitizerModule, ClawModule, ClawStudyModule, ClawsDigitizerModule, CLAWSModule, ClawsStudyModule, Convert2RawDetModule, CosmicsAlignmentValidationModule, CreateFieldMapModule, CsiDigitizer_v2Module, CsIDigitizerModule, CsiModule, CsiStudy_v2Module, CsIStudyModule, CurlTaggerModule, DAQMonitorModule, DAQPerfModule, DataWriterModule, DelayDQMModule, DeSerializerPXDModule, DetectorOccupanciesDQMModule, DosiDigitizerModule, DosiModule, DosiStudyModule, DQMHistAnalysisARICHModule, DQMHistAnalysisCDCDedxModule, DQMHistAnalysisCDCEpicsModule, DQMHistAnalysisCDCMonObjModule, DQMHistAnalysisDAQMonObjModule, DQMHistAnalysisDeltaEpicsMonObjExampleModule, DQMHistAnalysisDeltaTestModule, DQMHistAnalysisECLConnectedRegionsModule, DQMHistAnalysisECLModule, DQMHistAnalysisECLShapersModule, DQMHistAnalysisECLSummaryModule, DQMHistAnalysisEpicsExampleModule, DQMHistAnalysisEpicsOutputModule, DQMHistAnalysisEventT0EfficiencyModule, DQMHistAnalysisEventT0TriggerJitterModule, DQMHistAnalysisExampleFlagsModule, DQMHistAnalysisExampleModule, DQMHistAnalysisHLTModule, DQMHistAnalysisInput2Module, DQMHistAnalysisInputPVSrvModule, DQMHistAnalysisInputRootFileModule, DQMHistAnalysisInputTestModule, DQMHistAnalysisKLM2Module, DQMHistAnalysisKLMModule, DQMHistAnalysisMiraBelleModule, DQMHistAnalysisOutputMonObjModule, DQMHistAnalysisOutputRelayMsgModule, DQMHistAnalysisPeakModule, DQMHistAnalysisPhysicsModule, DQMHistAnalysisPXDChargeModule, DQMHistAnalysisPXDCMModule, DQMHistAnalysisPXDDAQModule, DQMHistAnalysisPXDEffModule, DQMHistAnalysisPXDERModule, DQMHistAnalysisPXDFitsModule, DQMHistAnalysisPXDInjectionModule, DQMHistAnalysisPXDReductionModule, DQMHistAnalysisPXDTrackChargeModule, DQMHistAnalysisRooFitExampleModule, DQMHistAnalysisRunNrModule, DQMHistAnalysisSVDClustersOnTrackModule, DQMHistAnalysisSVDDoseModule, DQMHistAnalysisSVDEfficiencyModule, DQMHistAnalysisSVDGeneralModule, DQMHistAnalysisSVDOccupancyModule, DQMHistAnalysisSVDOnMiraBelleModule, DQMHistAnalysisSVDUnpackerModule, DQMHistAnalysisTOPModule, DQMHistAnalysisTrackingAbortModule, DQMHistAnalysisTrackingHLTModule, DQMHistAnalysisTRGECLModule, DQMHistAnalysisTRGModule, DQMHistAutoCanvasModule, DQMHistComparitorModule, DQMHistDeltaHistoModule, DQMHistInjectionModule, DqmHistoManagerModule, DQMHistoModuleBase, DQMHistOutputToEPICSModule, DQMHistReferenceModule, DQMHistSnapshotsModule, Ds2RawFileModule, Ds2RawModule, Ds2RbufModule, Ds2SampleModule, ECLDQMInjectionModule, ECLLOMModule, ECLBackgroundModule, ECLChargedPIDDataAnalysisModule, ECLChargedPIDDataAnalysisValidationModule, ECLChargedPIDModule, ECLChargedPIDMVAModule, ECLClusterPSDModule, ECLCovarianceMatrixModule, ECLCRFinderModule, ECLDataAnalysisModule, ECLDigitCalibratorModule, ECLDigitizerModule, ECLDigitizerPureCsIModule, EclDisplayModule, ECLDQMConnectedRegionsModule, ECLDQMEXTENDEDModule, ECLDQMModule, ECLDQMOutOfTimeDigitsModule, ECLExpertModule, ECLFinalizerModule, ECLHitDebugModule, ECLLocalMaximumFinderModule, ECLLocalRunCalibratorModule, ECLPackerModule, ECLShowerCorrectorModule, ECLShowerShapeModule, ECLSplitterN1Module, ECLSplitterN2Module, ECLUnpackerModule, ECLWaveformFitModule, EffPlotsModule, EKLMDataCheckerModule, ElapsedTimeModule, EnergyBiasCorrectionModule, EventInfoPrinterModule, EventLimiterModule, EventsOfDoomBusterModule, EventT0DQMModule, EventT0ValidationModule, EvReductionModule, EvtGenDecayModule, EvtGenInputModule, ExportGeometryModule, ExtModule, FANGSDigitizerModule, FANGSModule, FANGSStudyModule, FastRbuf2DsModule, FlipQualityModule, FullSimModule, TRGGDLUnpackerModule, GearboxModule, GenRawSendModule, GetEventFromSocketModule, GRLNeuroModule, He3DigitizerModule, He3tubeModule, He3tubeStudyModule, HistoManagerModule, HistoModule, HitXPModule, HLTDQM2ZMQModule, IoVDependentConditionModule, IPDQMModule, KinkFinderModule, KKGenInputModule, KLMClusterAnaModule, KLMClusterEfficiencyModule, KLMClustersReconstructorModule, KLMDigitizerModule, KLMDigitTimeShifterModule, KLMDQM2Module, KLMDQMModule, KLMExpertModule, KLMMuonIDDNNExpertModule, KLMPackerModule, KLMReconstructorModule, KLMScintillatorSimulatorModule, KLMTrackingModule, KLMTriggerModule, KLMUnpackerModule, KlongValidationModule, LowEnergyPi0IdentificationExpertModule, LowEnergyPi0VetoExpertModule, MaterialScanModule, MCMatcherTRGECLModule, MCTrackCandClassifierModule, MCV0MatcherModule, MicrotpcModule, MicrotpcStudyModule, TpcDigitizerModule, MonitorDataModule, MuidModule, MVAExpertModule, MVAMultipleExpertsModule, MVAPrototypeModule, NtuplePhase1_v6Module, OverrideGenerationFlagsModule, PartialSeqRootReaderModule, ParticleVertexFitterModule, Ph1bpipeModule, Ph1sustrModule, PhotonEfficiencySystematicsModule, PhysicsObjectsDQMModule, PhysicsObjectsMiraBelleBhabhaModule, PhysicsObjectsMiraBelleDst2Module, PhysicsObjectsMiraBelleDstModule, PhysicsObjectsMiraBelleEcmsBBModule, PhysicsObjectsMiraBelleHadronModule, PhysicsObjectsMiraBelleModule, PinDigitizerModule, PindiodeModule, PindiodeStudyModule, PlumeDigitizerModule, PlumeModule, ProgressModule, PXDBackgroundModule, PXDBgTupleProducerModule, PXDClusterizerModule, PXDDAQDQMModule, PXDDigitizerModule, PXDGatedDHCDQMModule, PXDGatedModeDQMModule, PXDInjectionDQMModule, PXDMCBgTupleProducerModule, PXDPackerModule, PXDRawDQMChipsModule, PXDRawDQMModule, PXDROIDQMModule, PXDUnpackerModule, PXDclusterFilterModule, PXDClustersFromTracksModule, PXDdigiFilterModule, PXDDQMClustersModule, PXDDQMCorrModule, PXDDQMEfficiencyModule, PXDDQMEfficiencySelftrackModule, PXDDQMExpressRecoModule, PXDPerformanceModule, PXDRawDQMCorrModule, PXDROIFinderAnalysisModule, PXDROIFinderModule, PXDTrackClusterDQMModule, PyModule, QcsmonitorDigitizerModule, QcsmonitorModule, QcsmonitorStudyModule, QualityEstimatorVXDModule, RandomBarrierModule, Raw2DsModule, RawInputModule, Rbuf2DsModule, Rbuf2RbufModule, ReceiveEventModule, ReprocessorModule, RxModule, RxSocketModule, SecMapTrainerBaseModule, SecMapTrainerVXDTFModule, SectorMapBootstrapModule, SegmentNetworkProducerModule, SeqRootInputModule, SeqRootMergerModule, SeqRootOutputModule, SerializerModule, SoftwareTriggerHLTDQMModule, SoftwareTriggerModule, StatisticsTimingHLTDQMModule, SPTCmomentumSeedRetrieverModule, SPTCvirtualIPRemoverModule, SrsensorModule, StatisticsSummaryModule, StorageDeserializerModule, StorageSerializerModule, SubEventModule, SVD3SamplesEmulatorModule, SVDBackgroundModule, SVDClusterizerModule, SVDDigitizerModule, SVDDQMDoseModule, SVDDQMInjectionModule, SVDMissingAPVsClusterCreatorModule, SVDPackerModule, SVDRecoDigitCreatorModule, SVDUnpackerModule, SVDB4CommissioningPlotsModule, SVDClusterCalibrationsMonitorModule, SVDClusterEvaluationModule, SVDClusterEvaluationTrueInfoModule, SVDClusterFilterModule, SVDCoGTimeEstimatorModule, SVDDataFormatCheckModule, SVDDQMClustersOnTrackModule, SVDDQMExpressRecoModule, SVDDQMHitTimeModule, svdDumpModule, SVDEventInfoSetterModule, SVDEventT0EstimatorModule, SVDHotStripFinderModule, SVDLatencyCalibrationModule, SVDLocalCalibrationsCheckModule, SVDLocalCalibrationsMonitorModule, SVDMaxStripTTreeModule, SVDOccupancyAnalysisModule, SVDPerformanceModule, SVDPerformanceTTreeModule, SVDPositionErrorScaleFactorImporterModule, SVDROIFinderAnalysisModule, SVDROIFinderModule, SVDShaperDigitsFromTracksModule, SVDSpacePointCreatorModule, SVDTimeCalibrationsMonitorModule, SVDTimeGroupingModule, SVDTriggerQualityGeneratorModule, SVDUnpackerDQMModule, SwitchDataStoreModule, TagVertexModule, TOPBackgroundModule, TOPBunchFinderModule, TOPChannelMaskerModule, TOPChannelT0MCModule, TOPDigitizerModule, TOPDoublePulseGeneratorModule, TOPDQMModule, TOPGainEfficiencyCalculatorModule, TOPInterimFENtupleModule, TOPLaserCalibratorModule, TOPLaserHitSelectorModule, TOPMCTrackMakerModule, TOPModuleT0CalibratorModule, TOPNtupleModule, TOPPackerModule, TOPRawDigitConverterModule, TOPTBCComparatorModule, TOPTimeBaseCalibratorModule, TOPTimeRecalibratorModule, TOPTriggerDigitizerModule, TOPUnpackerModule, TOPWaveformFeatureExtractorModule, TOPXTalkChargeShareSetterModule, TrackAnaModule, TrackCreatorModule, TrackFinderMCTruthRecoTracksModule, TrackFinderVXDBasicPathFinderModule, TrackFinderVXDCellOMatModule, FindletModule< AFindlet >, FindletModule< AsicBackgroundLibraryCreator >, FindletModule< AxialSegmentPairCreator >, FindletModule< AxialSegmentPairCreator >, FindletModule< AxialStraightTrackFinder >, FindletModule< AxialStraightTrackFinder >, FindletModule< AxialTrackCreatorMCTruth >, FindletModule< AxialTrackCreatorMCTruth >, FindletModule< AxialTrackCreatorSegmentHough >, FindletModule< AxialTrackCreatorSegmentHough >, FindletModule< AxialTrackFinderHough >, FindletModule< AxialTrackFinderHough >, FindletModule< AxialTrackFinderLegendre >, FindletModule< AxialTrackFinderLegendre >, FindletModule< CDCTrackingEventLevelMdstInfoFillerFromHitsFindlet >, FindletModule< CDCTrackingEventLevelMdstInfoFillerFromSegmentsFindlet >, FindletModule< CKFToCDCFindlet >, FindletModule< CKFToCDCFromEclFindlet >, FindletModule< CKFToPXDFindlet >, FindletModule< CKFToSVDFindlet >, FindletModule< CKFToSVDSeedFindlet >, FindletModule< ClusterBackgroundDetector >, FindletModule< ClusterBackgroundDetector >, FindletModule< ClusterPreparer >, FindletModule< ClusterPreparer >, FindletModule< ClusterRefiner< BridgingWireHitRelationFilter > >, FindletModule< ClusterRefiner< BridgingWireHitRelationFilter > >, FindletModule< CosmicsTrackMergerFindlet >, FindletModule< DATCONFPGAFindlet >, FindletModule< FacetCreator >, FindletModule< FacetCreator >, FindletModule< HitBasedT0Extractor >, FindletModule< HitBasedT0Extractor >, FindletModule< HitReclaimer >, FindletModule< HitReclaimer >, FindletModule< MCVXDCDCTrackMergerFindlet >, FindletModule< MonopoleAxialTrackFinderLegendre >, FindletModule< MonopoleAxialTrackFinderLegendre >, FindletModule< MonopoleStereoHitFinder >, FindletModule< MonopoleStereoHitFinder >, FindletModule< MonopoleStereoHitFinderQuadratic >, FindletModule< MonopoleStereoHitFinderQuadratic >, FindletModule< SegmentCreatorFacetAutomaton >, FindletModule< SegmentCreatorFacetAutomaton >, FindletModule< SegmentCreatorMCTruth >, FindletModule< SegmentCreatorMCTruth >, FindletModule< SegmentFinderFacetAutomaton >, FindletModule< SegmentFinderFacetAutomaton >, FindletModule< SegmentFitter >, FindletModule< SegmentFitter >, FindletModule< SegmentLinker >, FindletModule< SegmentLinker >, FindletModule< SegmentOrienter >, FindletModule< SegmentOrienter >, FindletModule< SegmentPairCreator >, FindletModule< SegmentPairCreator >, FindletModule< SegmentRejecter >, FindletModule< SegmentRejecter >, FindletModule< SegmentTrackCombiner >, FindletModule< SegmentTrackCombiner >, FindletModule< SegmentTripleCreator >, FindletModule< SegmentTripleCreator >, FindletModule< StereoHitFinder >, FindletModule< StereoHitFinder >, FindletModule< SuperClusterCreator >, FindletModule< SuperClusterCreator >, FindletModule< TrackCombiner >, FindletModule< TrackCombiner >, FindletModule< TrackCreatorSegmentPairAutomaton >, FindletModule< TrackCreatorSegmentPairAutomaton >, FindletModule< TrackCreatorSegmentTripleAutomaton >, FindletModule< TrackCreatorSegmentTripleAutomaton >, FindletModule< TrackCreatorSingleSegments >, FindletModule< TrackCreatorSingleSegments >, FindletModule< TrackExporter >, FindletModule< TrackExporter >, FindletModule< TrackFinder >, FindletModule< TrackFinderAutomaton >, FindletModule< TrackFinderCosmics >, FindletModule< TrackFinderSegmentPairAutomaton >, FindletModule< TrackFinderSegmentPairAutomaton >, FindletModule< TrackFinderSegmentTripleAutomaton >, FindletModule< TrackFinderSegmentTripleAutomaton >, FindletModule< TrackFindingCDC::FindletStoreArrayInput< BaseEventTimeExtractorModuleFindlet< AFindlet > > >, FindletModule< TrackFindingCDC::FindletStoreArrayInput< BaseEventTimeExtractorModuleFindlet< AFindlet > > >, FindletModule< TrackFlightTimeAdjuster >, FindletModule< TrackFlightTimeAdjuster >, FindletModule< TrackLinker >, FindletModule< TrackLinker >, FindletModule< TrackOrienter >, FindletModule< TrackOrienter >, FindletModule< TrackQualityAsserter >, FindletModule< TrackQualityAsserter >, FindletModule< TrackQualityEstimator >, FindletModule< TrackQualityEstimator >, FindletModule< TrackRejecter >, FindletModule< TrackRejecter >, FindletModule< vxdHoughTracking::SVDHoughTracking >, FindletModule< WireHitBackgroundDetector >, FindletModule< WireHitBackgroundDetector >, FindletModule< WireHitCreator >, FindletModule< WireHitCreator >, FindletModule< WireHitPreparer >, FindletModule< WireHitPreparer >, TrackFinderVXDAnalizerModule, TrackingAbortDQMModule, TrackingPerformanceEvaluationModule, TrackQETrainingDataCollectorModule, TrackQualityEstimatorMVAModule, TreeFitterModule, TRGCDCETFUnpackerModule, TRGCDCModule, TRGCDCT2DDQMModule, TRGCDCT3DConverterModule, TRGCDCT3DDQMModule, TRGCDCT3DUnpackerModule, TRGCDCTSFUnpackerModule, TRGCDCTSFDQMModule, TRGCDCTSStreamModule, TRGECLBGTCHitModule, TRGECLDQMModule, TRGECLEventTimingDQMModule, TRGECLFAMModule, TRGECLModule, TRGECLQAMModule, TRGECLRawdataAnalysisModule, TRGECLTimingCalModule, TRGECLUnpackerModule, TRGEFFDQMModule, TRGGDLDQMModule, TRGGDLDSTModule, TRGGDLModule, TRGGDLSummaryModule, TRGGRLDQMModule, TRGGRLInjectionVetoFromOverlayModule, TRGGRLMatchModule, TRGGRLModule, TRGGRLProjectsModule, TRGGRLUnpackerModule, TRGRAWDATAModule, TRGTOPDQMModule, TRGTOPTRD2TTSConverterModule, TRGTOPUnpackerModule, TRGTOPUnpackerWaveformModule, TRGTOPWaveformPlotterModule, TTDDQMModule, TxModule, TxSocketModule, V0findingPerformanceEvaluationModule, V0ObjectsDQMModule, VXDMisalignmentModule, vxdDigitMaskingModule, VXDDQMExpressRecoModule, VXDQETrainingDataCollectorModule, VXDQualityEstimatorMVAModule, VXDSimpleClusterizerModule, and VXDTFTrainingDataCollectorModule.

Definition at line 146 of file Module.h.

146{};

◆ bookOutput()

void bookOutput ( std::string filename)

Create the output TFiles and TTrees.

Definition at line 727 of file HitLevelInfoWriter.cc.

728{
729 // register output root file
730 m_file.push_back(new TFile(filename.c_str(), "RECREATE"));
731 m_tree.push_back(new TTree("track", "dE/dx information"));
732
733 int i = m_tree.size() - 1;
734 m_tree[i]->SetDirectory(0);
735
736 // event level information (from emd)
737 m_tree[i]->Branch("exp", &m_expID, "exp/I");
738 m_tree[i]->Branch("run", &m_runID, "run/I");
739 m_tree[i]->Branch("event", &m_eventID, "event/I");
740
741 // track level information (from tfr)
742 m_tree[i]->Branch("dz", &m_dz, "dz/D");
743 m_tree[i]->Branch("dr", &m_dr, "dr/D");
744 m_tree[i]->Branch("chi2", &m_chi2, "chi2/D");
745 m_tree[i]->Branch("injtime", &m_injtime, "injtime/D");
746 m_tree[i]->Branch("isher", &m_injring, "isher/D");
747
748 if (m_isExtraVar) {
749 m_tree[i]->Branch("d0", &m_d0, "d0/D");
750 m_tree[i]->Branch("z0", &m_z0, "z0/D");
751 m_tree[i]->Branch("dphi", &m_dphi, "dphi/D");
752 m_tree[i]->Branch("vx0", &m_vx0, "vx0/D");
753 m_tree[i]->Branch("vy0", &m_vy0, "vy0/D");
754 m_tree[i]->Branch("vz0", &m_vz0, "vz0/D");
755 m_tree[i]->Branch("tanlambda", &m_tanlambda, "tanlambda/D");
756 m_tree[i]->Branch("phi0", &m_phi0, "phi0/D");
757 m_tree[i]->Branch("e1_9", &m_e1_9, "e1_9/D");
758 m_tree[i]->Branch("e9_21", &m_e9_21, "e9_21/D");
759 m_tree[i]->Branch("eclsnhits", &m_eclsnHits, "eclsnhits/D");
760 m_tree[i]->Branch("klmLayers", &m_klmLayers, "klmLayers/I");
761 }
762
763 // track level information (from cdt)
764 m_tree[i]->Branch("nCDChits", &m_nCDChits, "nCDChits/D");
765 m_tree[i]->Branch("inCDC", &m_inCDC, "inCDC/I");
766 m_tree[i]->Branch("track", &m_trackID, "track/I");
767 m_tree[i]->Branch("length", &m_length, "length/D");
768 m_tree[i]->Branch("charge", &m_charge, "charge/I");
769 m_tree[i]->Branch("costh", &m_cosTheta, "costh/D");
770 m_tree[i]->Branch("pF", &m_pCDC, "pF/D");
771 m_tree[i]->Branch("p", &m_p, "p/D");
772 m_tree[i]->Branch("pt", &m_pt, "pt/D");
773 m_tree[i]->Branch("ioasym", &m_ioasym, "ioasym/D");
774 m_tree[i]->Branch("phi", &m_phi, "phi/D");
775 m_tree[i]->Branch("pdg", &m_PDG, "pdg/D");
776 // track level dE/dx measurements
777 m_tree[i]->Branch("mean", &m_mean, "mean/D");
778 m_tree[i]->Branch("dedx", &m_trunc, "dedx/D");
779 m_tree[i]->Branch("dedxnosat", &m_truncNoSat, "dedxnosat/D");
780 m_tree[i]->Branch("dedxerr", &m_error, "dedxerr/D");
781
782 // other track level information
783 m_tree[i]->Branch("eop", &m_eop, "eop/D");
784 m_tree[i]->Branch("e", &m_e, "e/D");
785
786 // calibration constants
787 m_tree[i]->Branch("scale", &m_scale, "scale/D");
788 m_tree[i]->Branch("coscor", &m_cosCor, "coscor/D");
789 m_tree[i]->Branch("cosedgecor", &m_cosEdgeCor, "cosedgecor/D");
790 m_tree[i]->Branch("rungain", &m_runGain, "rungain/D");
791 m_tree[i]->Branch("timegain", &m_timeGain, "timegain/D");
792 m_tree[i]->Branch("timereso", &m_timeReso, "timereso/D");
793
794 // PID values
795 m_tree[i]->Branch("chiE", &m_chie, "chiE/D");
796 m_tree[i]->Branch("chiMu", &m_chimu, "chiMu/D");
797 m_tree[i]->Branch("chiPi", &m_chipi, "chiPi/D");
798 m_tree[i]->Branch("chiK", &m_chik, "chiK/D");
799 m_tree[i]->Branch("chiP", &m_chip, "chiP/D");
800 m_tree[i]->Branch("chiD", &m_chid, "chiD/D");
801
802 m_tree[i]->Branch("chiEOld", &m_chieOld, "chiEOld/D");
803 m_tree[i]->Branch("chiMuOld", &m_chimuOld, "chiMuOld/D");
804 m_tree[i]->Branch("chiPiOld", &m_chipiOld, "chiPiOld/D");
805 m_tree[i]->Branch("chiKOld", &m_chikOld, "chiKOld/D");
806 m_tree[i]->Branch("chiPOld", &m_chipOld, "chiPOld/D");
807 m_tree[i]->Branch("chiDOld", &m_chidOld, "chiDOld/D");
808
809 m_tree[i]->Branch("pmeanE", &m_pmeane, "pmeanE/D");
810 m_tree[i]->Branch("pmeanMu", &m_pmeanmu, "pmeanMu/D");
811 m_tree[i]->Branch("pmeanPi", &m_pmeanpi, "pmeanPi/D");
812 m_tree[i]->Branch("pmeanK", &m_pmeank, "pmeanK/D");
813 m_tree[i]->Branch("pmeanP", &m_pmeanp, "pmeanP/D");
814 m_tree[i]->Branch("pmeanD", &m_pmeand, "pmeanD/D");
815
816 m_tree[i]->Branch("presE", &m_prese, "presE/D");
817 m_tree[i]->Branch("presMu", &m_presmu, "presMu/D");
818 m_tree[i]->Branch("presPi", &m_prespi, "presPi/D");
819 m_tree[i]->Branch("presK", &m_presk, "presK/D");
820 m_tree[i]->Branch("presP", &m_presp, "presP/D");
821 m_tree[i]->Branch("presD", &m_presd, "presD/D");
822
823 // layer level information
824 m_tree[i]->Branch("lNHits", &l_nhits, "lNHits/I");
825 m_tree[i]->Branch("lNHitsUsed", &l_nhitsused, "lNHitsUsed/I");
826 m_tree[i]->Branch("lNHitsCombined", l_nhitscombined, "lNHitsCombined[lNHits]/I");
827 m_tree[i]->Branch("lWireLongestHit", l_wirelongesthit, "lWireLongestHit[lNHits]/I");
828 m_tree[i]->Branch("lLayer", l_layer, "lLayer[lNHits]/I");
829 m_tree[i]->Branch("lPath", l_path, "lPath[lNHits]/D");
830 m_tree[i]->Branch("lDedx", l_dedx, "lDedx[lNHits]/D");
831
832 // hit level information
833 if (m_isHitLevel) {
834 m_tree[i]->Branch("hNHits", &h_nhits, "hNHits/I");
835 m_tree[i]->Branch("hLWire", h_lwire, "hLWire[hNHits]/I");
836 m_tree[i]->Branch("hWire", h_wire, "hWire[hNHits]/I");
837 m_tree[i]->Branch("hLayer", h_layer, "hLayer[hNHits]/I");
838 m_tree[i]->Branch("hPath", h_path, "hPath[hNHits]/D");
839 m_tree[i]->Branch("hDedx", h_dedx, "hDedx[hNHits]/D");
840 m_tree[i]->Branch("hADCRaw", h_adcraw, "hADCRaw[hNHits]/D");
841 m_tree[i]->Branch("hADCCorr", h_adccorr, "hADCCorr[hNHits]/D");
842 m_tree[i]->Branch("hDoca", h_doca, "hDoca[hNHits]/D");
843 m_tree[i]->Branch("hNDoca", h_ndoca, "hNDoca[hNHits]/D");
844 m_tree[i]->Branch("hNDocaRS", h_ndocaRS, "hNDocaRS[hNHits]/D");
845 m_tree[i]->Branch("hEnta", h_enta, "hEnta[hNHits]/D");
846 m_tree[i]->Branch("hEntaRS", h_entaRS, "hEntaRS[hNHits]/D");
847 m_tree[i]->Branch("hDriftT", h_driftT, "hDriftT[hNHits]/D");
848 m_tree[i]->Branch("hDriftD", h_driftD, "hDriftD[hNHits]/D");
849 m_tree[i]->Branch("hFacnlADC", h_facnladc, "hFacnlADC[hNHits]/D");
850 m_tree[i]->Branch("hWireGain", h_wireGain, "hWireGain[hNHits]/D");
851 m_tree[i]->Branch("hTwodcor", h_twodCor, "hTwodcor[hNHits]/D");
852 m_tree[i]->Branch("hOnedcor", h_onedCor, "hOnedcor[hNHits]/D");
853
854 if (m_isExtraVar) {
855 m_tree[i]->Branch("hWeightPionHypo", h_WeightPionHypo, "hWeightPionHypo[hNHits]/D");
856 m_tree[i]->Branch("hWeightKaonHypo", h_WeightKaonHypo, "hWeightKaonHypo[hNHits]/D");
857 m_tree[i]->Branch("hWeightProtonHypo", h_WeightProtonHypo, "hWeightProtonHypo[hNHits]/D");
858 m_tree[i]->Branch("hFoundByTrackFinder", h_foundByTrackFinder, "hFoundByTrackFinder[hNHits]/I");
859 }
860 }
861}
double h_ndoca[kMaxHits]
normalized distance of closest approach
double h_driftD[kMaxHits]
drift distance
double h_onedCor[kMaxHits]
calibration 1D cleanup correction
int l_nhits
the total number of layer hits for this Track
double m_cosEdgeCor
calibration cosine edge correction
double m_presk
pred reso for kaon hypothesis
double m_phi0
Angle of the transverse momentum in the r-phi plane.
double m_d0
Signed distance to the POCA in the r-phi plane.
double m_presp
pred reso for proton hypothesis
int l_wirelongesthit[kMaxHits]
the wire number of longest hit in this layer
double m_ioasym
asymmetry in increasing vs decreasing layer numbers per track
double m_p
momentum from tracking
double m_e9_21
ratio of energies of the central 3x3 crystal vs 5x5 crystals
int m_trackID
ID number of the Track.
double m_vx0
X coordinate of track POCA to origin.
double m_pmeand
pred mean for deuteron hypothesis
double h_enta[kMaxHits]
entrance angle
double m_chipOld
chi value for proton hypothesis
double h_WeightKaonHypo[kMaxHits]
weight for kaon hypothesis from KalmanFitterInfo
double m_pmeanp
pred mean for proton hypothesis
double h_WeightProtonHypo[kMaxHits]
weight for proton hypothesis from KalmanFitterInfo
double m_chid
modified chi value for deuteron hypothesis
double m_chikOld
chi value for kaon hypothesis
double m_dz
vertex or POCA in case of tracks z in respect to IPs
double m_pmeank
pred mean for kaon hypothesis
double h_facnladc[kMaxHits]
calibration hit gain
int h_nhits
the number of good hits for this Track
double h_adccorr[kMaxHits]
charge per hit corr by nonlinear ADC
std::vector< TTree * > m_tree
output ROOT trees
double m_presmu
pred reso for muon hypothesis
double m_cosCor
calibration cosine correction
double m_tanlambda
Slope of the track in the r-z plane.
int h_layer[kMaxHits]
layer number
double h_adcraw[kMaxHits]
charge per hit
int m_expID
experiment in which this Track was found
double h_path[kMaxHits]
path length in cell
double m_chimu
modified chi value for muon hypothesis
double m_vy0
Y coordinate of track POCA to origin.
double m_chik
modified chi value for kaon hypothesis
double m_chi2
chi^2 from track fit
double h_wireGain[kMaxHits]
calibration hit gain
double h_twodCor[kMaxHits]
calibration 2D correction
double m_chie
modified chi value for electron hypothesis
double m_runGain
calibration run gain
int m_eventID
event in which this Track was found
double m_timeGain
calibration injection time gain
double m_chidOld
chi value for deuteron hypothesis
std::vector< TFile * > m_file
output ROOT files
double m_dr
track d0 relative to IP
double m_prese
pred reso for electron hypothesis
int h_foundByTrackFinder[kMaxHits]
the 'found by track finder' flag for the given hit
double m_timeReso
calibration injection time reso
double l_dedx[kMaxHits]
dE/dx for this layer
double l_path[kMaxHits]
distance travelled in this layer
int l_layer[kMaxHits]
layer number
double m_chipiOld
chi value for pion hypothesis
double m_chip
modified chi value for proton hypothesis
double m_pmeane
pred mean for electron hypothesis
double m_cosTheta
cos(theta) for the track
int l_nhitsused
the total number of layer hits used for this Track
double h_dedx[kMaxHits]
charge per path length
double m_chieOld
chi value for electron hypothesis
double h_driftT[kMaxHits]
drift time
double m_dphi
POCA in degrees in respect to IP.
double m_eop
energy over momentum in the calorimeter
double m_presd
pred reso for deuteron hypothesis
double m_scale
calibration scale factor
double m_klmLayers
number of klm layers with hits
int l_nhitscombined[kMaxHits]
the number of hits combined this layer
double m_error
standard deviation of the truncated mean
double m_pCDC
momentum valid in CDC
double m_truncNoSat
dE/dx averaged, truncated mean, with corrections (not hadron)
double m_length
total path length of the Track
double m_injring
HER injection status.
double m_nCDChits
Number of CDC hits associated to the track.
double h_ndocaRS[kMaxHits]
normalized +RS distance of closest approach
double m_vz0
Z coordinate of track POCA to origin.
double m_trunc
dE/dx averaged, truncated mean, with corrections
int m_inCDC
frack is CDC acceptance or not
double h_doca[kMaxHits]
distance of closest approach
double m_chimuOld
chi value for muon hypothesis
double m_z0
z coordinate of the POCA
int m_charge
the charge for this Track
double h_WeightPionHypo[kMaxHits]
weight for pion hypothesis from KalmanFitterInfo
int m_runID
run in which this Track was found
double m_e
energy in the calorimeter
double m_injtime
time since last injection in micro seconds
double m_pmeanmu
pred mean for muon hypothesis
double h_entaRS[kMaxHits]
normalized + RS distance of entrance angle
double m_prespi
pred reso for pion hypothesis
int h_wire[kMaxHits]
sense wire ID
int h_lwire[kMaxHits]
sense wire within layer
double m_chipi
modified chi value for pion hypothesis
double m_pt
transverse momentum from tracking
double m_pmeanpi
pred mean for pion hypothesis
double m_e1_9
ratio of energies of the central 1 crystal vs 3x3 crystals

◆ calculateMeans()

void calculateMeans ( double * mean,
double * truncatedMean,
double * truncatedMeanErr,
const std::vector< double > & dedx ) const

Save arithmetic and truncated mean for the 'dedx' values.

Parameters
meancalculated arithmetic mean
truncatedMeancalculated truncated mean
truncatedMeanErrerror for truncatedMean
dedxinput values

Definition at line 630 of file HitLevelInfoWriter.cc.

632{
633 // Calculate the truncated average by skipping the lowest & highest
634 // events in the array of dE/dx values
635 vector<double> sortedDedx = dedx;
636 sort(sortedDedx.begin(), sortedDedx.end());
637 sortedDedx.erase(remove(sortedDedx.begin(), sortedDedx.end(), 0), sortedDedx.end());
638 sortedDedx.shrink_to_fit();
639
640 double truncMeanTmp = 0.0, meanTmp = 0.0, sumOfSqs = 0.0;
641 int nValTrunc = 0;
642 const int numDedx = sortedDedx.size();
643
644 // add a factor of 0.51 here to make sure we are rounding appropriately...
645 const int lEdgeTrunc = int(numDedx * 0.05 + 0.51);
646 const int hEdgeTrunc = int(numDedx * (1 - 0.25) + 0.51);
647 for (int i = 0; i < numDedx; i++) {
648 meanTmp += sortedDedx[i];
649 if (i >= lEdgeTrunc and i < hEdgeTrunc) {
650 truncMeanTmp += sortedDedx[i];
651 sumOfSqs += sortedDedx[i] * sortedDedx[i];
652 nValTrunc++;
653 }
654 }
655
656 if (numDedx != 0) meanTmp /= numDedx;
657
658 if (nValTrunc != 0) truncMeanTmp /= nValTrunc;
659 else truncMeanTmp = meanTmp;
660
661 *mean = meanTmp;
662 *truncMean = truncMeanTmp;
663
664 if (nValTrunc > 1)
665 *truncMeanErr = sqrt(sumOfSqs / double(nValTrunc) - truncMeanTmp * truncMeanTmp) / double(nValTrunc - 1);
666 else *truncMeanErr = 0;
667
668}
double sqrt(double a)
sqrt for double
Definition beamHelpers.h:28

◆ clearEntries()

void clearEntries ( )
private

Clear the arrays before filling an event.

Definition at line 688 of file HitLevelInfoWriter.cc.

689{
690 for (int il = 0; il < 200; ++il) {
691 l_nhitscombined[il] = 0;
692 l_wirelongesthit[il] = 0;
693 l_layer[il] = 0;
694 l_path[il] = 0;
695 l_dedx[il] = 0;
696 }
697
698 if (m_isHitLevel) {
699 for (int ihit = 0; ihit < 200; ++ihit) {
700 h_lwire[ihit] = 0;
701 h_wire[ihit] = 0;
702 h_layer[ihit] = 0;
703 h_path[ihit] = 0;
704 h_dedx[ihit] = 0;
705 h_adcraw[ihit] = 0;
706 h_adccorr[ihit] = 0;
707 h_doca[ihit] = 0;
708 h_ndoca[ihit] = 0;
709 h_ndocaRS[ihit] = 0;
710 h_enta[ihit] = 0;
711 h_entaRS[ihit] = 0;
712 h_driftT[ihit] = 0;
713 // h_driftD[ihit] = 0;
714 h_facnladc[ihit] = 0;
715 h_wireGain[ihit] = 0;
716 h_twodCor[ihit] = 0;
717 h_onedCor[ihit] = 0;
718 h_WeightPionHypo[ihit] = 0;
719 h_WeightKaonHypo[ihit] = 0;
720 h_WeightProtonHypo[ihit] = 0;
721 h_foundByTrackFinder[ihit] = 0;
722 }
723 }
724}

◆ 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{
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.
void setParameters(const ModuleParamList &params)
Set values for parameters from other parameter list.
const ModuleParamList & getParamList() const
Return module param list.
Definition Module.h:362
const std::string & getName() const
Returns the name of the module.
Definition Module.h:186
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:511
ModuleParamList m_moduleParamList
List storing and managing all parameter of the module.
Definition Module.h:515
void setName(const std::string &name)
Set the name of the module.
Definition Module.h:213
LogConfig m_logConfig
The log system configuration of the module.
Definition Module.h:513
std::vector< ModuleCondition > m_conditions
Module condition, only non-null if set.
Definition Module.h:520
std::string m_package
Package this module is found in (may be empty).
Definition Module.h:509
std::shared_ptr< Module > ModulePtr
Defines a pointer to a module object as a boost shared pointer.
Definition Module.h:43

◆ D2I()

double D2I ( const double cosTheta,
const double D ) const

hadron saturation parameterization part 2

Definition at line 568 of file HitLevelInfoWriter.cc.

569{
570 double absCosTheta = fabs(cosTheta);
571 double projection = pow(absCosTheta, m_hadronpars[3]) + m_hadronpars[2];
572 if (projection == 0) {
573 B2WARNING("Something wrong with dE/dx hadron constants!");
574 return D;
575 }
576
577 double chargeDensity = D / projection;
578 double numerator = 1 + m_hadronpars[0] * chargeDensity;
579 double denominator = 1 + m_hadronpars[1] * chargeDensity;
580
581 if (denominator == 0) {
582 B2WARNING("Something wrong with dE/dx hadron constants!");
583 return D;
584 }
585
586 double I = D * m_hadronpars[4] * numerator / denominator;
587 return I;
588}
std::vector< double > m_hadronpars
hadron saturation parameters

◆ 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 425 of file Module.h.

425{ beginRun(); }

◆ 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 438 of file Module.h.

438{ endRun(); }

◆ 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 431 of file Module.h.

431{ event(); }

◆ 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 419 of file Module.h.

419{ initialize(); }

◆ 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 444 of file Module.h.

444{ terminate(); }

◆ endRun()

virtual void endRun ( void )
inlinevirtualinherited

This method is called if the current run ends.

Use this method to store information, which should be aggregated over one run.

This method can be implemented by subclasses.

Reimplemented in AlignDQMModule, AnalysisPhase1StudyModule, arichBtestModule, ARICHDQMModule, AWESOMEBasicModule, B2BIIConvertMdstModule, B2BIIMCParticlesMonitorModule, B2BIIMdstInputModule, BeamabortModule, BeamabortStudyModule, BeamDigitizerModule, BeamBkgGeneratorModule, BeamBkgHitRateMonitorModule, BeamBkgMixerModule, BeamBkgTagSetterModule, BelleMCOutputModule, BgoDigitizerModule, BgoModule, BgoStudyModule, BGOverlayInputModule, BKLMAnaModule, BKLMDigitAnalyzerModule, BKLMSimHistogrammerModule, BKLMTrackingModule, CalibrationCollectorModule, CaveModule, CDCCosmicAnalysisModule, CDCCRTestModule, CDCPackerModule, CDCRecoTrackFilterModule, CDCUnpackerModule, CDCDedxDQMModule, CDCDedxValidationModule, cdcDQM7Module, CDCDQMModule, CDCTriggerNDFinderModule, CDCTriggerNeuroDQMModule, CDCTriggerNeuroDQMOnlineModule, CertifyParallelModule, ClawDigitizerModule, ClawModule, ClawStudyModule, ClawsDigitizerModule, CLAWSModule, ClawsStudyModule, Convert2RawDetModule, CosmicsAlignmentValidationModule, CsiDigitizer_v2Module, CsIDigitizerModule, CsiModule, CsiStudy_v2Module, CsIStudyModule, CurlTaggerModule, DAQPerfModule, DataWriterModule, DeSerializerPXDModule, DosiDigitizerModule, DosiModule, DosiStudyModule, DQMHistAnalysisARICHModule, DQMHistAnalysisARICHMonObjModule, DQMHistAnalysisCDCDedxModule, DQMHistAnalysisCDCEpicsModule, DQMHistAnalysisCDCMonObjModule, DQMHistAnalysisDAQMonObjModule, DQMHistAnalysisDeltaEpicsMonObjExampleModule, DQMHistAnalysisDeltaTestModule, DQMHistAnalysisECLConnectedRegionsModule, DQMHistAnalysisECLModule, DQMHistAnalysisECLOutOfTimeDigitsModule, DQMHistAnalysisECLShapersModule, DQMHistAnalysisECLSummaryModule, DQMHistAnalysisEpicsExampleModule, DQMHistAnalysisEpicsOutputModule, DQMHistAnalysisEventT0TriggerJitterModule, DQMHistAnalysisExampleFlagsModule, DQMHistAnalysisExampleModule, DQMHistAnalysisHLTMonObjModule, DQMHistAnalysisInput2Module, DQMHistAnalysisInputPVSrvModule, DQMHistAnalysisInputTestModule, DQMHistAnalysisKLM2Module, DQMHistAnalysisKLMModule, DQMHistAnalysisMiraBelleModule, DQMHistAnalysisMonObjModule, DQMHistAnalysisOutputFileModule, DQMHistAnalysisOutputMonObjModule, DQMHistAnalysisOutputRelayMsgModule, DQMHistAnalysisPhysicsModule, DQMHistAnalysisPXDChargeModule, DQMHistAnalysisPXDFitsModule, DQMHistAnalysisPXDTrackChargeModule, DQMHistAnalysisRooFitExampleModule, DQMHistAnalysisSVDClustersOnTrackModule, DQMHistAnalysisSVDDoseModule, DQMHistAnalysisSVDEfficiencyModule, DQMHistAnalysisSVDGeneralModule, DQMHistAnalysisSVDOccupancyModule, DQMHistAnalysisSVDOnMiraBelleModule, DQMHistAnalysisSVDUnpackerModule, DQMHistAnalysisTOPModule, DQMHistAnalysisTRGECLModule, DQMHistAnalysisTRGEFFModule, DQMHistAnalysisTRGGDLModule, DQMHistAnalysisTRGModule, DQMHistComparitorModule, DQMHistDeltaHistoModule, DqmHistoManagerModule, DQMHistOutputToEPICSModule, DQMHistReferenceModule, DQMHistSnapshotsModule, Ds2RawFileModule, Ds2RawModule, Ds2RbufModule, Ds2SampleModule, ECLLOMModule, ECLBackgroundModule, ECLChargedPIDDataAnalysisModule, ECLChargedPIDDataAnalysisValidationModule, ECLChargedPIDModule, ECLClusterPSDModule, ECLCovarianceMatrixModule, ECLCRFinderModule, ECLDataAnalysisModule, ECLDigitCalibratorModule, ECLDigitizerModule, ECLDigitizerPureCsIModule, EclDisplayModule, ECLDQMEXTENDEDModule, ECLDQMModule, ECLFinalizerModule, ECLHitDebugModule, ECLLocalMaximumFinderModule, ECLLocalRunCalibratorModule, ECLPackerModule, ECLShowerCorrectorModule, ECLShowerShapeModule, ECLSplitterN1Module, ECLSplitterN2Module, ECLUnpackerModule, ECLWaveformFitModule, EffPlotsModule, EKLMDataCheckerModule, ElapsedTimeModule, EventInfoPrinterModule, EventT0ValidationModule, EvReductionModule, EvtGenDecayModule, ExtModule, FANGSDigitizerModule, FANGSModule, FANGSStudyModule, FastRbuf2DsModule, FullSimModule, TRGGDLUnpackerModule, GenfitVisModule, GenRawSendModule, GetEventFromSocketModule, He3DigitizerModule, He3tubeModule, He3tubeStudyModule, HistoManagerModule, HistoModule, HitXPModule, HLTDQM2ZMQModule, HLTDs2ZMQModule, KLMClusterEfficiencyModule, KLMClustersReconstructorModule, KLMDigitizerModule, KLMDQM2Module, KLMDQMModule, KLMMuonIDDNNExpertModule, KLMPackerModule, KLMReconstructorModule, KLMScintillatorSimulatorModule, KLMTrackingModule, KLMTriggerModule, KLMUnpackerModule, KlongValidationModule, LowEnergyPi0IdentificationExpertModule, LowEnergyPi0VetoExpertModule, MCMatcherTRGECLModule, MCTrackCandClassifierModule, MCV0MatcherModule, MicrotpcModule, MicrotpcStudyModule, TpcDigitizerModule, TPCStudyModule, MonitorDataModule, MuidModule, NoKickCutsEvalModule, NtuplePhase1_v6Module, OverrideGenerationFlagsModule, PartialSeqRootReaderModule, Ph1bpipeModule, Ph1sustrModule, PhysicsObjectsDQMModule, PhysicsObjectsMiraBelleBhabhaModule, PhysicsObjectsMiraBelleDst2Module, PhysicsObjectsMiraBelleDstModule, PhysicsObjectsMiraBelleHadronModule, PhysicsObjectsMiraBelleModule, PinDigitizerModule, PindiodeModule, PindiodeStudyModule, PlumeDigitizerModule, PlumeModule, PrintDataModule, PrintEventRateModule, PXDBackgroundModule, PXDClustersFromTracksModule, PXDPerformanceModule, PXDROIFinderModule, PyModule, QcsmonitorDigitizerModule, QcsmonitorModule, QcsmonitorStudyModule, RandomBarrierModule, Raw2DsModule, RawInputModule, Rbuf2DsModule, Rbuf2RbufModule, ReceiveEventModule, ReprocessorModule, Root2BinaryModule, Root2RawModule, RT2SPTCConverterModule, RxModule, RxSocketModule, SecMapTrainerBaseModule, SecMapTrainerVXDTFModule, SectorMapBootstrapModule, SeqRootInputModule, SeqRootMergerModule, SeqRootOutputModule, SerializerModule, SPTCmomentumSeedRetrieverModule, SPTCvirtualIPRemoverModule, SrsensorModule, StatisticsSummaryModule, StorageDeserializerModule, StorageRootOutputModule, StorageSerializerModule, SubEventModule, SVD3SamplesEmulatorModule, SVDBackgroundModule, SVDClusterizerModule, SVDPackerModule, SVDRecoDigitCreatorModule, SVDUnpackerModule, SVDB4CommissioningPlotsModule, SVDClusterCalibrationsMonitorModule, SVDClusterEvaluationModule, SVDClusterEvaluationTrueInfoModule, SVDClusterFilterModule, SVDCoGTimeEstimatorModule, SVDDataFormatCheckModule, svdDumpModule, SVDHotStripFinderModule, SVDLatencyCalibrationModule, SVDLocalCalibrationsMonitorModule, SVDOccupancyAnalysisModule, SVDPerformanceModule, SVDPositionErrorScaleFactorImporterModule, SVDROIDQMModule, SVDROIFinderAnalysisModule, SVDROIFinderModule, SVDShaperDigitsFromTracksModule, SVDTimeCalibrationsMonitorModule, SVDTriggerQualityGeneratorModule, SVDUnpackerDQMModule, SwitchDataStoreModule, TOPBackgroundModule, TOPChannelT0MCModule, TOPDoublePulseGeneratorModule, TOPGainEfficiencyCalculatorModule, TOPInterimFENtupleModule, TOPLaserCalibratorModule, TOPLaserHitSelectorModule, TOPMCTrackMakerModule, TOPNtupleModule, TOPPackerModule, TOPRawDigitConverterModule, TOPTBCComparatorModule, TOPTimeBaseCalibratorModule, TOPTriggerDigitizerModule, TOPUnpackerModule, TOPWaveformFeatureExtractorModule, TOPWaveformQualityPlotterModule, TOPXTalkChargeShareSetterModule, TrackAnaModule, TrackFinderMCTruthRecoTracksModule, FindletModule< AFindlet >, FindletModule< AsicBackgroundLibraryCreator >, FindletModule< AxialSegmentPairCreator >, FindletModule< AxialSegmentPairCreator >, FindletModule< AxialStraightTrackFinder >, FindletModule< AxialStraightTrackFinder >, FindletModule< AxialTrackCreatorMCTruth >, FindletModule< AxialTrackCreatorMCTruth >, FindletModule< AxialTrackCreatorSegmentHough >, FindletModule< AxialTrackCreatorSegmentHough >, FindletModule< AxialTrackFinderHough >, FindletModule< AxialTrackFinderHough >, FindletModule< AxialTrackFinderLegendre >, FindletModule< AxialTrackFinderLegendre >, FindletModule< CDCTrackingEventLevelMdstInfoFillerFromHitsFindlet >, FindletModule< CDCTrackingEventLevelMdstInfoFillerFromSegmentsFindlet >, FindletModule< CKFToCDCFindlet >, FindletModule< CKFToCDCFromEclFindlet >, FindletModule< CKFToPXDFindlet >, FindletModule< CKFToSVDFindlet >, FindletModule< CKFToSVDSeedFindlet >, FindletModule< ClusterBackgroundDetector >, FindletModule< ClusterBackgroundDetector >, FindletModule< ClusterPreparer >, FindletModule< ClusterPreparer >, FindletModule< ClusterRefiner< BridgingWireHitRelationFilter > >, FindletModule< ClusterRefiner< BridgingWireHitRelationFilter > >, FindletModule< CosmicsTrackMergerFindlet >, FindletModule< DATCONFPGAFindlet >, FindletModule< FacetCreator >, FindletModule< FacetCreator >, FindletModule< HitBasedT0Extractor >, FindletModule< HitBasedT0Extractor >, FindletModule< HitReclaimer >, FindletModule< HitReclaimer >, FindletModule< MCVXDCDCTrackMergerFindlet >, FindletModule< MonopoleAxialTrackFinderLegendre >, FindletModule< MonopoleAxialTrackFinderLegendre >, FindletModule< MonopoleStereoHitFinder >, FindletModule< MonopoleStereoHitFinder >, FindletModule< MonopoleStereoHitFinderQuadratic >, FindletModule< MonopoleStereoHitFinderQuadratic >, FindletModule< SegmentCreatorFacetAutomaton >, FindletModule< SegmentCreatorFacetAutomaton >, FindletModule< SegmentCreatorMCTruth >, FindletModule< SegmentCreatorMCTruth >, FindletModule< SegmentFinderFacetAutomaton >, FindletModule< SegmentFinderFacetAutomaton >, FindletModule< SegmentFitter >, FindletModule< SegmentFitter >, FindletModule< SegmentLinker >, FindletModule< SegmentLinker >, FindletModule< SegmentOrienter >, FindletModule< SegmentOrienter >, FindletModule< SegmentPairCreator >, FindletModule< SegmentPairCreator >, FindletModule< SegmentRejecter >, FindletModule< SegmentRejecter >, FindletModule< SegmentTrackCombiner >, FindletModule< SegmentTrackCombiner >, FindletModule< SegmentTripleCreator >, FindletModule< SegmentTripleCreator >, FindletModule< StereoHitFinder >, FindletModule< StereoHitFinder >, FindletModule< SuperClusterCreator >, FindletModule< SuperClusterCreator >, FindletModule< TrackCombiner >, FindletModule< TrackCombiner >, FindletModule< TrackCreatorSegmentPairAutomaton >, FindletModule< TrackCreatorSegmentPairAutomaton >, FindletModule< TrackCreatorSegmentTripleAutomaton >, FindletModule< TrackCreatorSegmentTripleAutomaton >, FindletModule< TrackCreatorSingleSegments >, FindletModule< TrackCreatorSingleSegments >, FindletModule< TrackExporter >, FindletModule< TrackExporter >, FindletModule< TrackFinder >, FindletModule< TrackFinderAutomaton >, FindletModule< TrackFinderCosmics >, FindletModule< TrackFinderSegmentPairAutomaton >, FindletModule< TrackFinderSegmentPairAutomaton >, FindletModule< TrackFinderSegmentTripleAutomaton >, FindletModule< TrackFinderSegmentTripleAutomaton >, FindletModule< TrackFindingCDC::FindletStoreArrayInput< BaseEventTimeExtractorModuleFindlet< AFindlet > > >, FindletModule< TrackFindingCDC::FindletStoreArrayInput< BaseEventTimeExtractorModuleFindlet< AFindlet > > >, FindletModule< TrackFlightTimeAdjuster >, FindletModule< TrackFlightTimeAdjuster >, FindletModule< TrackLinker >, FindletModule< TrackLinker >, FindletModule< TrackOrienter >, FindletModule< TrackOrienter >, FindletModule< TrackQualityAsserter >, FindletModule< TrackQualityAsserter >, FindletModule< TrackQualityEstimator >, FindletModule< TrackQualityEstimator >, FindletModule< TrackRejecter >, FindletModule< TrackRejecter >, FindletModule< vxdHoughTracking::SVDHoughTracking >, FindletModule< WireHitBackgroundDetector >, FindletModule< WireHitBackgroundDetector >, FindletModule< WireHitCreator >, FindletModule< WireHitCreator >, FindletModule< WireHitPreparer >, FindletModule< WireHitPreparer >, TrackFinderVXDAnalizerModule, TrackingPerformanceEvaluationModule, TrackSetEvaluatorHopfieldNNDEVModule, TRGCDCETFUnpackerModule, TRGCDCModule, TRGCDCT2DDQMModule, TRGCDCT3DConverterModule, TRGCDCT3DDQMModule, TRGCDCT3DUnpackerModule, TRGCDCTSFUnpackerModule, TRGCDCTSFDQMModule, TRGCDCTSStreamModule, TRGECLBGTCHitModule, TRGECLDQMModule, TRGECLFAMModule, TRGECLModule, TRGECLQAMModule, TRGECLRawdataAnalysisModule, TRGECLTimingCalModule, TRGECLUnpackerModule, TRGEFFDQMModule, TRGGDLDQMModule, TRGGDLDSTModule, TRGGDLModule, TRGGDLSummaryModule, TRGGRLDQMModule, TRGGRLMatchModule, TRGGRLModule, TRGGRLProjectsModule, TRGGRLUnpackerModule, TRGRAWDATAModule, TRGTOPDQMModule, TRGTOPTRD2TTSConverterModule, TRGTOPUnpackerModule, TRGTOPUnpackerWaveformModule, TRGTOPWaveformPlotterModule, TxModule, TxSocketModule, V0findingPerformanceEvaluationModule, vxdDigitMaskingModule, VXDSimpleClusterizerModule, VXDTFTrainingDataCollectorModule, ZMQTxInputModule, and ZMQTxWorkerModule.

Definition at line 165 of file Module.h.

165{};

◆ 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:518
bool m_hasReturnValue
True, if the return value is set.
Definition Module.h:517

◆ event()

void event ( void )
overridevirtual

This method is called for each event.

All processing of the event takes place in this method.

Reimplemented from Module.

Definition at line 69 of file HitLevelInfoWriter.cc.

70{
71
72 int nParticleList = m_strParticleList.size();
73
74 // **************************************************
75 // LOOP OVER dE/dx measurements for all tracks if
76 // no particle list is specified.
77 // **************************************************
78 if (nParticleList == 0) {
79 for (int idedx = 0; idedx < m_dedxTracks.getEntries(); idedx++) {
80
81 CDCDedxTrack* dedxTrack = m_dedxTracks[idedx];
82 if (!dedxTrack) {
83 B2WARNING("No dedx related track...");
84 continue;
85 }
86
87 const Track* track = dedxTrack->getRelatedFrom<Track>();
88 if (!track) {
89 B2WARNING("No related track...");
90 continue;
91 }
92
93 const TrackFitResult* fitResult = track->getTrackFitResultWithClosestMass(Const::pion);
94 if (!fitResult) {
95 B2WARNING("No related fit for this track...");
96 continue;
97 }
98
99 if (dedxTrack->size() == 0 || dedxTrack->size() > 200) continue;
100 if (dedxTrack->getCosTheta() < TMath::Cos(150.0 * TMath::DegToRad()))continue; //-0.866
101 if (dedxTrack->getCosTheta() > TMath::Cos(17.0 * TMath::DegToRad())) continue; //0.95
102
103 // fill the event meta data
104 StoreObjPtr<EventMetaData> evtMetaData;
105 m_expID = evtMetaData->getExperiment();
106 m_runID = evtMetaData->getRun();
107 m_eventID = evtMetaData->getEvent();
108
109 m_injring = dedxTrack->getInjectionRing();
110 m_injtime = dedxTrack->getInjectionTime();
111
112 //--------REMOVEBAL--------
113 //when CDST are reproduced with injection time
114 if (m_injtime == -1 || m_injring == -1) {
115 if (m_TTDInfo.isValid() && m_TTDInfo->hasInjection()) {
116 m_injring = m_TTDInfo->isHER();
117 m_injtime = m_TTDInfo->getTimeSinceLastInjectionInMicroSeconds();
118 }
119 }
120 //--------REMOVEBAL--------
121
122 // fill the E/P
123 const ECLCluster* eclCluster = track->getRelated<ECLCluster>();
124 if (eclCluster and eclCluster->hasHypothesis(ECLCluster::EHypothesisBit::c_nPhotons)) {
125 m_eop = (eclCluster->getEnergy(ECLCluster::EHypothesisBit::c_nPhotons)) / (fitResult->getMomentum().R());
127 if (m_isExtraVar) {
128 m_e1_9 = eclCluster->getE1oE9();
129 m_e9_21 = eclCluster->getE9oE21();
130 m_eclsnHits = eclCluster->getNumberOfCrystals();
131 }
132 // fill the muon depth
133 const KLMCluster* klmCluster = eclCluster->getRelated<KLMCluster>();
134 if (klmCluster) m_klmLayers = klmCluster->getLayers();
135 }
136
137 // fill the TTree with the Track information
138 fillTrack(fitResult);
139
140 // fill the TTree with the CDCDedxTrack information
141 fillDedx(dedxTrack);
142
143 // fill the TTree
144 m_tree[0]->Fill();
145 }
146 }
147
148 // **************************************************
149 //
150 // LOOP OVER particles in the given particle lists
151 //
152 // **************************************************
153 for (int iList = 0; iList < nParticleList; iList++) {
154 // make sure the list exists and is not empty
155 StoreObjPtr<ParticleList> particlelist(m_strParticleList[iList]);
156 if (!particlelist or particlelist->getListSize(true) == 0) {
157 //B2WARNING("ParticleList " << m_strParticleList[iList] << " not found or empty, skipping");
158 continue;
159 }
160
161 // loop over the particles in the list and follow the links to the
162 // dE/dx information (Particle -> PIDLikelihood -> Track -> CDCDedxTrack)
163 for (unsigned int iPart = 0; iPart < particlelist->getListSize(true); iPart++) {
164 Particle* part = particlelist->getParticle(iPart, true);
165 if (!part) {
166 B2WARNING("No particles...");
167 continue;
168 }
169 PIDLikelihood* pid = part->getRelatedTo<PIDLikelihood>();
170 if (!pid) {
171 B2WARNING("No related PID likelihood...");
172 continue;
173 }
174 Track* track = pid->getRelatedFrom<Track>();
175 if (!track) {
176 B2WARNING("No related track...");
177 continue;
178 }
179 CDCDedxTrack* dedxTrack = track->getRelatedTo<CDCDedxTrack>();
180 if (!dedxTrack) {
181 B2WARNING("No related CDCDedxTrack...");
182 continue;
183 }
184 string ptype = m_strParticleList[iList].substr(0, m_strParticleList[iList].find(":"));
185 const TrackFitResult* fitResult = track->getTrackFitResult(Const::pion);
186 if (ptype != "pi+") {
187 if (ptype == "K+") fitResult = track->getTrackFitResultWithClosestMass(Const::kaon);
188 else if (ptype == "p+") fitResult = track->getTrackFitResultWithClosestMass(Const::proton);
189 else if (ptype == "deuteron") fitResult = track->getTrackFitResultWithClosestMass(Const::deuteron);
190 else if (ptype == "mu+") fitResult = track->getTrackFitResultWithClosestMass(Const::muon);
191 else if (ptype == "e+") fitResult = track->getTrackFitResultWithClosestMass(Const::electron);
192 }
193 if (!fitResult) {
194 B2WARNING("No related fit for this track...");
195 continue;
196 }
197
198 if (dedxTrack->size() == 0 || dedxTrack->size() > 200) continue;
199 //if out CDC (dont add as we dont correct via correctionmodules)
200 if (dedxTrack->getCosTheta() < TMath::Cos(150.0 * TMath::DegToRad()))continue; //-0.866
201 if (dedxTrack->getCosTheta() > TMath::Cos(17.0 * TMath::DegToRad())) continue; //0.95
202
203 // fill the event meta data
204 StoreObjPtr<EventMetaData> evtMetaData;
205 m_expID = evtMetaData->getExperiment();
206 m_runID = evtMetaData->getRun();
207 m_eventID = evtMetaData->getEvent();
208
209 m_injring = dedxTrack->getInjectionRing();
210 m_injtime = dedxTrack->getInjectionTime();
211
212 //--------REMOVEBAL--------
213 //when CDST are reproduced with injection time
214 if (m_injtime == -1 || m_injring == -1) {
215 if (m_TTDInfo.isValid() && m_TTDInfo->hasInjection()) {
216 m_injring = m_TTDInfo->isHER();
217 m_injtime = m_TTDInfo->getTimeSinceLastInjectionInMicroSeconds();
218 }
219 }
220 //--------REMOVEBAL--------
221
222 // fill the E/P
223 const ECLCluster* eclCluster = track->getRelated<ECLCluster>();
224 if (eclCluster and eclCluster->hasHypothesis(ECLCluster::EHypothesisBit::c_nPhotons)) {
225 m_eop = (eclCluster->getEnergy(ECLCluster::EHypothesisBit::c_nPhotons)) / (fitResult->getMomentum().R());
227 if (m_isExtraVar) {
228 m_e1_9 = eclCluster->getE1oE9();
229 m_e9_21 = eclCluster->getE9oE21();
230 m_eclsnHits = eclCluster->getNumberOfCrystals();
231 }
232 // fill the muon depth
233 const KLMCluster* klmCluster = eclCluster->getRelated<KLMCluster>();
234 if (klmCluster) m_klmLayers = klmCluster->getLayers();
235 }
236
237 // fill the TTree with the Track information
238 fillTrack(fitResult);
239
240 // fill the TTree with the CDCDedxTrack information
241 fillDedx(dedxTrack);
242
243 // fill the TTree
244 m_tree[iList]->Fill();
245 }
246 }
247}
double R
typedef autogenerated by FFTW
double getCosTheta() const
Return cos(theta) for this track.
double getInjectionRing() const
Return cos(theta) for this track.
double getInjectionTime() const
Return cos(theta) for this track.
int size() const
Return the number of hits for this track.
static const ChargedStable muon
muon particle
Definition Const.h:660
static const ChargedStable pion
charged pion particle
Definition Const.h:661
static const ChargedStable proton
proton particle
Definition Const.h:663
static const ChargedStable kaon
charged kaon particle
Definition Const.h:662
static const ChargedStable electron
electron particle
Definition Const.h:659
static const ChargedStable deuteron
deuteron particle
Definition Const.h:664
bool hasHypothesis(EHypothesisBit bitmask) const
Return if specific hypothesis bit is set.
Definition ECLCluster.h:351
double getE1oE9() const
Return E1/E9 (shower shape variable).
Definition ECLCluster.h:277
double getE9oE21() const
Return E9/E21 (shower shape variable).
Definition ECLCluster.h:280
double getEnergy(EHypothesisBit hypothesis) const
Return Energy (GeV).
Definition ECLCluster.cc:23
double getNumberOfCrystals() const
Return number of a crystals in a shower (sum of weights).
Definition ECLCluster.h:295
@ c_nPhotons
CR is split into n photons (N1)
Definition ECLCluster.h:41
StoreObjPtr< EventLevelTriggerTimeInfo > m_TTDInfo
Store Object Ptr: EventLevelTriggerTimeInfo.
void fillTrack(const TrackFitResult *fitResult)
Fill the TTree with the information from the track fit.
StoreArray< CDCDedxTrack > m_dedxTracks
Required array of CDCDedxTracks.
void fillDedx(CDCDedxTrack *dedxTrack)
Fill the TTree with the information from a CDCDedxTrack object.
int getLayers() const
Get number of layers with hits.
Definition KLMCluster.h:67
TO * getRelatedTo(const std::string &name="", const std::string &namedRelation="") const
Get the object to which this object has a relation.
T * getRelated(const std::string &name="", const std::string &namedRelation="") const
Get the object to or from which this object has a relation.
FROM * getRelatedFrom(const std::string &name="", const std::string &namedRelation="") const
Get the object from which this object has a relation.
ROOT::Math::XYZVector getMomentum() const
Getter for vector of momentum at closest approach of track in r/phi projection.

◆ 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 paths */
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://xwiki.desy.de/xwiki/rest/p/f4fa4/#HModuleDevelopment
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>()),
491 &Module::setLogConfig)
@ 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: "<".
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 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
@ 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_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
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
ModuleCondition::EAfterConditionPath EAfterConditionPath
Forward the EAfterConditionPath definition from the ModuleCondition.
Definition Module.h:88

◆ fillDedx()

void fillDedx ( CDCDedxTrack * dedxTrack)
private

Fill the TTree with the information from a CDCDedxTrack object.

Definition at line 303 of file HitLevelInfoWriter.cc.

304{
305 // clear the containers first
306 clearEntries();
307
308 m_trackID = dedxTrack->trackID();
309 m_length = dedxTrack->getLength();
310 m_charge = dedxTrack->getCharge();
311 m_cosTheta = dedxTrack->getCosTheta();
312 m_PDG = dedxTrack->getPDG();
313
314 m_pCDC = dedxTrack->getMomentum();
315 if (m_charge < 0) {
316 m_pCDC *= -1;
317 }
318
319 h_nhits = dedxTrack->size();
320
321 // Get the calibration constants
322 m_scale = m_DBScaleFactor->getScaleFactor();
323 m_runGain = m_DBRunGain->getRunGain();
325 m_timeGain = m_DBInjectTime->getCorrection("mean", m_injring, m_injtime);
326 m_timeReso = m_DBInjectTime->getCorrection("reso", m_injring, m_injtime);
327
330 } else {
331 m_cosEdgeCor = 1.0;
332 }
333 m_hadronpars = m_DBHadronCor->getHadronPars();
334
335 //variable to save layer variables
336 map<int, vector<double>>l_var;
337 double cdcChi[Const::ChargedStable::c_SetSize];
338
339 //Modify the hit level dedx
340 if (m_isCorrection) {
341 recalculateDedx(dedxTrack, l_var, cdcChi);
342 m_chie = cdcChi[0];
343 m_chimu = cdcChi[1];
344 m_chipi = cdcChi[2];
345 m_chik = cdcChi[3];
346 m_chip = cdcChi[4];
347 m_chid = cdcChi[5];
348 } else {
349 m_mean = dedxTrack->getDedxMean();
350 m_trunc = dedxTrack->getDedx();
351 m_truncNoSat = dedxTrack->getDedxNoSat();
352 m_error = dedxTrack->getDedxError();
353 m_chie = dedxTrack->getChi(0);
354 m_chimu = dedxTrack->getChi(1);
355 m_chipi = dedxTrack->getChi(2);
356 m_chik = dedxTrack->getChi(3);
357 m_chip = dedxTrack->getChi(4);
358 m_chid = dedxTrack->getChi(5);
359 }
360
361 m_pmeane = dedxTrack->getPmean(0);
362 m_pmeanmu = dedxTrack->getPmean(1);
363 m_pmeanpi = dedxTrack->getPmean(2);
364 m_pmeank = dedxTrack->getPmean(3);
365 m_pmeanp = dedxTrack->getPmean(4);
366 m_pmeand = dedxTrack->getPmean(5);
367
368 m_prese = dedxTrack->getPreso(0);
369 m_presmu = dedxTrack->getPreso(1);
370 m_prespi = dedxTrack->getPreso(2);
371 m_presk = dedxTrack->getPreso(3);
372 m_presp = dedxTrack->getPreso(4);
373 m_presd = dedxTrack->getPreso(5);
374
375 // Get the vector of dE/dx values for all layers
376 double lout = 0, lin = 0, increment = 0;
377 int lastlayer = 0;
378
379 if (m_isCorrection) {
380 l_nhits = l_var[0].size();
381 const int lEdgeTrunc = int(l_nhits * 0.05 + 0.51);
382 const int hEdgeTrunc = int(l_nhits * (1 - 0.25) + 0.51);
383 l_nhitsused = hEdgeTrunc - lEdgeTrunc;
384 } else {
385 l_nhits = dedxTrack->getNLayerHits();
386 l_nhitsused = dedxTrack->getNLayerHitsUsed();
387 }
388
389 for (int il = 0; il < l_nhits; ++il) {
390 if (m_isCorrection) {
391 l_nhitscombined[il] = l_var[0][il];
392 l_wirelongesthit[il] = l_var[1][il];
393 l_layer[il] = l_var[2][il];
394 l_path[il] = l_var[3][il];
395 l_dedx[il] = l_var[4][il];
396 } else {
397 l_nhitscombined[il] = dedxTrack->getNHitsCombined(il);
398 l_wirelongesthit[il] = dedxTrack->getWireLongestHit(il);
399 l_layer[il] = dedxTrack->getLayer(il);
400 l_path[il] = dedxTrack->getLayerPath(il);
401 l_dedx[il] = dedxTrack->getLayerDedx(il);
402 }
403 if (l_layer[il] > lastlayer) lout++;
404 else if (l_layer[il] < lastlayer) lin++;
405 else continue;
406
407 lastlayer = l_layer[il];
408 increment++;
409 }
410 m_ioasym = (lout - lin) / increment;
411
412 // Get the vector of dE/dx values for all hits
413 if (m_isHitLevel) {
414 for (int ihit = 0; ihit < h_nhits; ++ihit) {
415
416 if (m_isDeadwire) continue;
417
418 h_lwire[ihit] = dedxTrack->getWireInLayer(ihit);
419 h_wire[ihit] = dedxTrack->getWire(ihit);
420 h_layer[ihit] = dedxTrack->getHitLayer(ihit);
421 h_path[ihit] = dedxTrack->getPath(ihit);
422 h_dedx[ihit] = dedxTrack->getDedx(ihit);
423 h_adcraw[ihit] = dedxTrack->getADCBaseCount(ihit);
424 h_adccorr[ihit] = dedxTrack->getADCCount(ihit);
425 h_doca[ihit] = dedxTrack->getDoca(ihit);
426 h_ndoca[ihit] = h_doca[ihit] / dedxTrack->getCellHalfWidth(ihit);
427 h_ndocaRS[ihit] = dedxTrack->getDocaRS(ihit) / dedxTrack->getCellHalfWidth(ihit);
428 h_enta[ihit] = dedxTrack->getEnta(ihit);
429 h_entaRS[ihit] = dedxTrack->getEntaRS(ihit);
430 h_driftT[ihit] = dedxTrack->getDriftT(ihit);
431 h_driftD[ihit] = dedxTrack->getDriftD(ihit);
432
433 // Get extra variable from tracking
434 if (m_isExtraVar) {
435 h_WeightPionHypo[ihit] = dedxTrack->getWeightPionHypo(ihit);
436 h_WeightKaonHypo[ihit] = dedxTrack->getWeightKaonHypo(ihit);
437 h_WeightProtonHypo[ihit] = dedxTrack->getWeightProtonHypo(ihit);
438 h_foundByTrackFinder[ihit] = dedxTrack->getFoundByTrackFinder(ihit);
439 }
440 // Get the calibration constants
441 h_facnladc[ihit] = dedxTrack->getNonLADCCorrection(ihit);
442 h_wireGain[ihit] = m_DBWireGains->getWireGain(h_wire[ihit]);
443 h_twodCor[ihit] = m_DB2DCell->getMean(h_layer[ihit], h_ndocaRS[ihit], h_entaRS[ihit]);
444 h_onedCor[ihit] = m_DB1DCell->getMean(h_layer[ihit], h_entaRS[ihit]);
445 }
446 }
447
448}
int getHitLayer(int i) const
Return the (global) layer number for a hit.
int getADCBaseCount(int i) const
Return the base adcCount (no non-linearity) for this hit.
int getADCCount(int i) const
Return the adcCount for this hit.
double getDedxMean() const
Get the dE/dx mean for this track.
double getDriftD(int i) const
Return the drift distance for this hit.
int getLayer(int i) const
Return the (global) layer number for a layer hit.
double getDoca(int i) const
Return the distance of closest approach to the sense wire for this hit.
double getDedx() const
Get dE/dx truncated mean for this track.
double getPath(int i) const
Return the path length through the cell for this hit.
int getWireInLayer(int i) const
Return the sensor ID for this hit: wire number in the layer.
double getPmean(int i) const
Return the PID (predicted mean) value.
int getWireLongestHit(int i) const
Return the wire number of the longest hit per layer.
double getWeightKaonHypo(int i) const
Return the max weights from KalmanFitterInfo using kaon hypothesis.
double getEntaRS(int i) const
Return rescaled enta value for cell height=width assumption.
double getLayerDedx(int i) const
Return the total dE/dx for this layer.
double getCellHalfWidth(int i) const
Return the half-width of the CDC cell.
double getPDG() const
Get the identity of the particle.
double getPreso(int i) const
Return the PID (predicted reso) value.
int getNLayerHits() const
Return the number of layer hits for this track.
int getFoundByTrackFinder(int i) const
Return the TrackFinder which added the given hit to track.
int getDriftT(int i) const
Return the drift time for this hit.
int getCharge() const
Return the charge for this track.
double getWeightPionHypo(int i) const
Return the max weights from KalmanFitterInfo using pion hypothesis.
int getWire(int i) const
Return the sensor ID for this hit: wire number for CDC (0-14336)
double getDocaRS(int i) const
Return rescaled doca value for cell height=width assumption.
double getNonLADCCorrection(int i) const
Return the factor introduce for adcCount (non-linearity) correction.
double getDedxError() const
Get the error on the dE/dx truncated mean for this track.
double getWeightProtonHypo(int i) const
Return the max weights from KalmanFitterInfo using proton hypothesis.
double getEnta(int i) const
Return the entrance angle in the CDC cell for this hit.
double trackID() const
Return the track ID.
double getLayerPath(int i) const
Return the distance travelled in this layer.
double getChi(int i) const
Return the PID (chi) value.
double getLength() const
Return the total path length for this track.
int getNHitsCombined(int i) const
Return the number of hits combined per layer.
double getDedxNoSat() const
Get dE/dx truncated mean without the saturation correction for this track.
double getNLayerHitsUsed() const
Return the number of hits used to determine the truncated mean.
double getMomentum() const
Return the track momentum valid in the CDC.
static const unsigned int c_SetSize
Number of elements (for use in array bounds etc.)
Definition Const.h:615
DBObjPtr< CDCDedxRunGain > m_DBRunGain
Run gain DB object.
DBObjPtr< CDCDedxHadronCor > m_DBHadronCor
hadron saturation parameters
DBObjPtr< CDCDedxCosineEdge > m_DBCosEdgeCor
cosine edge calibration
DBObjPtr< CDCDedx1DCell > m_DB1DCell
1D correction DB object
void recalculateDedx(CDCDedxTrack *dedxTrack, std::map< int, std::vector< double > > &l_var, double(&cdcChi)[Const::ChargedStable::c_SetSize])
Function to recalculate the dedx with latest constants.
DBObjPtr< CDCDedx2DCell > m_DB2DCell
2D correction DB object
void clearEntries()
Clear the arrays before filling an event.
DBObjPtr< CDCDedxCosineCor > m_DBCosineCor
Electron saturation correction DB object.
DBObjPtr< CDCDedxWireGain > m_DBWireGains
Wire gain DB object.
DBObjPtr< CDCDedxInjectionTime > m_DBInjectTime
time gain/reso DB object
DBObjPtr< CDCDedxScaleFactor > m_DBScaleFactor
Scale factor to make electrons ~1.

◆ fillTrack()

void fillTrack ( const TrackFitResult * fitResult)
private

Fill the TTree with the information from the track fit.

Definition at line 264 of file HitLevelInfoWriter.cc.

265{
266 ROOT::Math::XYZVector trackMom = fitResult->getMomentum();
267 m_p = trackMom.R();
268 m_pt = trackMom.Rho();
269 m_phi = trackMom.Phi();
270
271 m_theta = trackMom.Theta() * 180. / TMath::Pi(); //in degree
272 if (m_theta > 17. && m_theta < 150.)m_inCDC = 1;
273 else m_inCDC = 0;
274
275 if (fitResult->getChargeSign() < 0) {
276 m_p *= -1;
277 m_pt *= -1;
278 }
279
280 ROOT::Math::XYZVector trackPos = fitResult->getPosition();
281 m_vx0 = trackPos.X();
282 m_vy0 = trackPos.Y();
283 m_vz0 = trackPos.Z();
284
285 m_d0 = fitResult->getD0();
286 m_z0 = fitResult->getZ0();
287 m_chi2 = fitResult->getPValue();
288 m_tanlambda = fitResult->getTanLambda();
289 m_phi0 = fitResult->getPhi0();
290 m_nCDChits = fitResult->getHitPatternCDC().getNHits();
291
292 static DBObjPtr<BeamSpot> beamSpotDB;
293 const auto& frame = ReferenceFrame::GetCurrent();
294 UncertainHelix helix = fitResult->getUncertainHelix();
295 helix.passiveMoveBy(ROOT::Math::XYZVector(beamSpotDB->getIPPosition()));
296 m_dr = frame.getVertex(ROOT::Math::XYZVector(helix.getPerigee())).Rho();
297 m_dphi = frame.getVertex(ROOT::Math::XYZVector(helix.getPerigee())).Phi();
298 m_dz = frame.getVertex(ROOT::Math::XYZVector(helix.getPerigee())).Z();
299
300}
double m_theta
cos(theta) for the track
unsigned short getNHits() const
Get the total Number of CDC hits in the fit.
static const ReferenceFrame & GetCurrent()
Get current rest frame.
short getChargeSign() const
Return track charge (1 or -1).
double getPValue() const
Getter for Chi2 Probability of the track fit.
double getD0() const
Getter for d0.
double getTanLambda() const
Getter for tanLambda.
double getZ0() const
Getter for z0.
ROOT::Math::XYZVector getPosition() const
Getter for vector of position at closest approach of track in r/phi projection.
HitPatternCDC getHitPatternCDC() const
Getter for the hit pattern in the CDC;.
UncertainHelix getUncertainHelix() const
Conversion to framework Uncertain Helix (i.e., with covariance).
double getPhi0() const
Getter for phi0.
double passiveMoveBy(const ROOT::Math::XYZVector &by)
Moves origin of the coordinate system (passive transformation) by the given vector.

◆ 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 323 of file Module.h.

324 {
325 return m_conditions;
326 }

◆ getCondition()

const ModuleCondition * getCondition ( ) const
inlineinherited

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

Definition at line 313 of file Module.h.

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

◆ 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

◆ GetCorrection()

double GetCorrection ( int & adc,
int layer,
int wireID,
double doca,
double enta,
double costheta,
double ring,
double time ) const

Function to get the correction factor.

Definition at line 542 of file HitLevelInfoWriter.cc.

544{
545 double correction = 1.0;
546 correction *= m_DBScaleFactor->getScaleFactor();
547 correction *= m_DBRunGain->getRunGain();
548 correction *= m_DB2DCell->getMean(layer, doca, enta);
549 correction *= m_DB1DCell->getMean(layer, enta);
550 correction *= m_DBCosineCor->getMean(costheta);
551 correction *= m_DBInjectTime->getCorrection("mean", ring, time);
552 if (costheta <= -0.850 || costheta >= 0.950) correction *= m_DBCosEdgeCor->getMean(costheta);
553 if (m_DBWireGains->getWireGain(wireID) > 0) correction *= m_DBWireGains->getWireGain(wireID);
554
555 //last is only for abs constant
556 if (!m_isRelative) adc = m_DBNonlADC->getCorrectedADC(adc, layer);
557
558 return correction;
559}
DBObjPtr< CDCDedxADCNonLinearity > m_DBNonlADC
hadron saturation non linearity

◆ getDescription()

const std::string & getDescription ( ) const
inlineinherited

Returns the description of the module.

Definition at line 201 of file Module.h.

201{return m_description;}

◆ 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, RootOutputModule, and StorageRootOutputModule.

Definition at line 133 of file Module.h.

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

◆ getLogConfig()

LogConfig & getLogConfig ( )
inlineinherited

Returns the log system configuration.

Definition at line 224 of file Module.h.

224{return m_logConfig;}

◆ getModules()

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

no submodules, return empty list

Implements PathElement.

Definition at line 505 of file Module.h.

505{ 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 186 of file Module.h.

186{return m_name;}

◆ getPackage()

const std::string & getPackage ( ) const
inlineinherited

Returns the package this module is in.

Definition at line 196 of file Module.h.

196{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.

◆ getParamList()

const ModuleParamList & getParamList ( ) const
inlineinherited

Return module param list.

Definition at line 362 of file Module.h.

362{ 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 380 of file Module.h.

380{ 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:508

◆ HadronCorrection()

void HadronCorrection ( double costheta,
double & dedx ) const

Function to apply the hadron correction.

Definition at line 562 of file HitLevelInfoWriter.cc.

563{
564 dedx = D2I(costheta, I2D(costheta, 1.00) / 1.00 * dedx);
565}
double D2I(const double cosTheta, const double D) const
hadron saturation parameterization part 2
double I2D(const double cosTheta, const double I) const
hadron saturation parameterization part 1

◆ hasCondition()

bool hasCondition ( ) const
inlineinherited

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

Definition at line 310 of file Module.h.

310{ 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 377 of file Module.h.

377{ 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.

◆ I2D()

double I2D ( const double cosTheta,
const double I ) const

hadron saturation parameterization part 1

Definition at line 591 of file HitLevelInfoWriter.cc.

592{
593 double absCosTheta = fabs(cosTheta);
594 double projection = pow(absCosTheta, m_hadronpars[3]) + m_hadronpars[2];
595
596 if (projection == 0 || m_hadronpars[4] == 0) {
597 B2WARNING("Something wrong with dE/dx hadron constants!");
598 return I;
599 }
600
601 double a = m_hadronpars[0] / projection;
602 double b = 1 - m_hadronpars[1] / projection * (I / m_hadronpars[4]);
603 double c = -1.0 * I / m_hadronpars[4];
604
605 if (b == 0 && a == 0) {
606 B2WARNING("both a and b coefficiants for hadron correction are 0");
607 return I;
608 }
609
610 double discr = b * b - 4.0 * a * c;
611 if (discr < 0) {
612 B2WARNING("negative discriminant; return uncorrectecd value");
613 return I;
614 }
615
616 double D = (a != 0) ? (-b + sqrt(discr)) / (2.0 * a) : -c / b;
617 if (D < 0) {
618 B2WARNING("D is less 0! will try another solution");
619 D = (a != 0) ? (-b - sqrt(discr)) / (2.0 * a) : -c / b;
620 if (D < 0) {
621 B2WARNING("D is still less 0! just return uncorrectecd value");
622 return I;
623 }
624 }
625
626 return D;
627}

◆ 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://xwiki.desy.de/xwiki/rest/p/a94f2 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.

Reimplemented from Module.

Definition at line 42 of file HitLevelInfoWriter.cc.

43{
44
45 B2INFO("Creating a ROOT file for the hit level information...");
46
47 // required inputs
48 m_dedxTracks.isRequired();
49 m_tracks.isRequired();
50 m_trackFitResults.isRequired();
51 m_eclClusters.isOptional();
52 m_klmClusters.isOptional();
53
54 // build a map to relate input strings to the right particle type
55 map<string, string> pdgMap = {{"pi+", "Const::pion.getPDGCode()"}, {"K+", "Const::kaon.getPDGCode()"}, {"mu+", "Const::muon.getPDGCode()"}, {"e+", "Const::electron.getPDGCode()"}, {"p+", "Const::proton.getPDGCode()"}, {"deuteron", "Const::deuteron.getPDGCode()"}};
56
57 // if no particle lists are given, write out all tracks
59
60 // create a new output file for each particle list specified
61 for (unsigned int i = 0; i < m_strParticleList.size(); i++) {
62 // strip the name of the particle lists to make this work
63 string pdg = pdgMap[m_strParticleList[i].substr(0, m_strParticleList[i].find(":"))];
64 string filename = string(m_strOutputBaseName + "_PID" + pdg + ".root");
65 bookOutput(filename);
66 }
67}
StoreArray< KLMCluster > m_klmClusters
Required array of input KLMClusters.
StoreArray< TrackFitResult > m_trackFitResults
Required array of input TrackFitResults.
void bookOutput(std::string filename)
Create the output TFiles and TTrees.
StoreArray< Track > m_tracks
Required array of input Tracks.
StoreArray< ECLCluster > m_eclClusters
Required array of input ECLClusters.

◆ recalculateDedx()

void recalculateDedx ( CDCDedxTrack * dedxTrack,
std::map< int, std::vector< double > > & l_var,
double(&) cdcChi[Const::ChargedStable::c_SetSize] )

Function to recalculate the dedx with latest constants.

Definition at line 451 of file HitLevelInfoWriter.cc.

453{
454 vector<double> newLayerHits;
455 double newLayerDe = 0, newLayerDx = 0;
456 int nhitscombined = 0; // number of hits combined per layer
457 int wirelongesthit = 0; // wire number of longest hit
458 double longesthit = 0; // path length of longest hit
459
460 for (int ihit = 0; ihit < h_nhits; ++ihit) {
461 int jadcbase = dedxTrack->getADCBaseCount(ihit);
462 int jLayer = dedxTrack->getHitLayer(ihit);
463 double jWire = dedxTrack->getWire(ihit);
464 double jNDocaRS = dedxTrack->getDocaRS(ihit) / dedxTrack->getCellHalfWidth(ihit);
465 double jEntaRS = dedxTrack->getEntaRS(ihit);
466 double jPath = dedxTrack->getPath(ihit);
467
468 double correction = dedxTrack->getScaleFactor() * dedxTrack->getRunGain() * dedxTrack->getTimeMean() *
469 dedxTrack->getCosineCorrection() * dedxTrack->getCosEdgeCorrection() *
470 dedxTrack->getTwoDCorrection(ihit) * dedxTrack->getOneDCorrection(ihit) *
471 dedxTrack->getNonLADCCorrection(ihit);
472 if (dedxTrack->getWireGain(ihit) > 0) correction *= dedxTrack->getWireGain(ihit); //also keep dead wire
473
474 if (m_isRelative) {
475 //get same base adc + rel correction factor
476 correction *= GetCorrection(jadcbase, jLayer, jWire, jNDocaRS, jEntaRS, m_cosTheta, m_injring, m_injtime);
477 if (!m_DBWireGains && dedxTrack->getWireGain(ihit) == 0) correction = 0;
478 } else {
479 //get modified adc + abs correction factor
480 correction = GetCorrection(jadcbase, jLayer, jWire, jNDocaRS, jEntaRS, m_cosTheta, m_injring, m_injtime);
481 }
482
483 double newhitdedx = 1.0;
484
485 newhitdedx *= jadcbase * sqrt(1 - m_cosTheta * m_cosTheta) / jPath;
486
487 if (correction != 0) {
488 newhitdedx /= correction;
489 if (m_DBWireGains->getWireGain(jWire) != 0) {
490 newLayerDe += jadcbase / correction;
491 newLayerDx += jPath;
492 if (jPath > longesthit) {
493 longesthit = jPath;
494 wirelongesthit = jWire;
495 }
496 nhitscombined++;
497 }
498 } else newhitdedx = 0;
499
500 dedxTrack->setDedx(ihit, newhitdedx);
501
502 if (ihit + 1 < h_nhits && dedxTrack->getHitLayer(ihit + 1) == jLayer) {
503 continue;
504 } else {
505 if (newLayerDx != 0) {
506 double totalDistance = newLayerDx / sqrt(1 - m_cosTheta * m_cosTheta);
507 double newLayerDedx = newLayerDe / totalDistance ;
508 newLayerHits.push_back(newLayerDedx);
509 l_var[0].push_back(nhitscombined);
510 l_var[1].push_back(wirelongesthit);
511 l_var[2].push_back(jLayer);
512 l_var[3].push_back(totalDistance);
513 l_var[4].push_back(newLayerDedx);
514 }
515
516 newLayerDe = 0;
517 newLayerDx = 0;
518 nhitscombined = 0;
519 wirelongesthit = 0;
520 longesthit = 0;
521 }
522 }
523
524 // recalculate the truncated means
525 double dedxmean, dedxtrunc, dedxtruncNoSat, dedxerror;
526
527 calculateMeans(&dedxmean, &dedxtruncNoSat, &dedxerror, newLayerHits);
528
529 dedxtrunc = dedxtruncNoSat;
530
531 HadronCorrection(m_cosTheta, dedxtrunc);
532 m_mean = dedxmean;
533 m_trunc = dedxtrunc;
534 m_truncNoSat = dedxtruncNoSat;
535 m_error = dedxerror;
536
537 // save the PID information
538 saveChiValue(cdcChi, dedxTrack, m_trunc);
539}
double getTimeMean() const
Return the injection gain for this track.
double getOneDCorrection(int i) const
Return the 1D correction for this hit.
void setDedx(double mean)
Set the dE/dx truncated average for this track.
double getCosineCorrection() const
Return the cosine correction for this track.
double getTwoDCorrection(int i) const
Return the 2D correction for this hit.
double getWireGain(int i) const
Return the wire gain for this hit.
double getCosEdgeCorrection() const
Return the cosine correction for this track.
double getRunGain() const
Return the run gain for this track.
double getScaleFactor() const
Return the scale factor for this track.
void saveChiValue(double(&chi)[Const::ChargedStable::c_SetSize], CDCDedxTrack *dedxTrack, double dedx) const
for all particles, save chi values into 'chi' chi array of chi values to be modified
void HadronCorrection(double costheta, double &dedx) const
Function to apply the hadron correction.
void calculateMeans(double *mean, double *truncatedMean, double *truncatedMeanErr, const std::vector< double > &dedx) const
Save arithmetic and truncated mean for the 'dedx' values.
double GetCorrection(int &adc, int layer, int wireID, double doca, double enta, double costheta, double ring, double time) const
Function to get the correction factor.

◆ saveChiValue()

void saveChiValue ( double(&) chi[Const::ChargedStable::c_SetSize],
CDCDedxTrack * dedxTrack,
double dedx ) const

for all particles, save chi values into 'chi' chi array of chi values to be modified

Definition at line 671 of file HitLevelInfoWriter.cc.

673{
674 // determine a chi value for each particle type
675 Const::ParticleSet set = Const::chargedStableSet;
676 for (const Const::ChargedStable pdgIter : set) {
677
678 // determine the predicted mean and resolution
679 double mean = dedxTrack->getPmean(pdgIter.getIndex());
680 double sigma = dedxTrack->getPreso(pdgIter.getIndex());
681
682 // fill the chi value for this particle type
683 if (sigma != 0) chi[pdgIter.getIndex()] = ((dedx - mean) / (sigma));
684 }
685}
static const ParticleSet chargedStableSet
set of charged stable particles
Definition Const.h:618

◆ 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}
std::string m_description
The description of the module.
Definition Module.h:510

◆ setLogConfig()

void setLogConfig ( const LogConfig & logConfig)
inlineinherited

Set the log system configuration.

Definition at line 229 of file Module.h.

229{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 213 of file Module.h.

213{ m_name = name; };

◆ setParamList()

void setParamList ( const ModuleParamList & params)
inlineprotectedinherited

Replace existing parameter list.

Definition at line 500 of file Module.h.

500{ 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}
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:200
static LogSystem & Instance()
Static method to get a reference to the LogSystem instance.
Definition LogSystem.cc:28
LogConfig & getLogConfig()
Returns the log system configuration.
Definition Module.h:224
std::string m_name
The name of the module, saved as a string (user-modifiable)
Definition Module.h:507
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

End of the event processing.

Reimplemented from Module.

Definition at line 250 of file HitLevelInfoWriter.cc.

251{
252
253 for (unsigned int i = 0; i < m_file.size(); i++) {
254 B2INFO("Done writing out the hit level information...\t" << m_tree[i]->GetEntries() << " tracks");
255
256 // write the ttree to a root file
257 m_file[i]->cd();
258 m_tree[i]->Write();
259 m_file[i]->Close();
260 }
261}

Member Data Documentation

◆ h_adccorr

double h_adccorr[kMaxHits] = {}
private

charge per hit corr by nonlinear ADC

Definition at line 249 of file HitLevelInfoWriter.h.

249{};

◆ h_adcraw

double h_adcraw[kMaxHits] = {}
private

charge per hit

Definition at line 248 of file HitLevelInfoWriter.h.

248{};

◆ h_dedx

double h_dedx[kMaxHits] = {}
private

charge per path length

Definition at line 247 of file HitLevelInfoWriter.h.

247{};

◆ h_doca

double h_doca[kMaxHits] = {}
private

distance of closest approach

Definition at line 250 of file HitLevelInfoWriter.h.

250{};

◆ h_driftD

double h_driftD[kMaxHits] = {}
private

drift distance

Definition at line 256 of file HitLevelInfoWriter.h.

256{};

◆ h_driftT

double h_driftT[kMaxHits] = {}
private

drift time

Definition at line 255 of file HitLevelInfoWriter.h.

255{};

◆ h_enta

double h_enta[kMaxHits] = {}
private

entrance angle

Definition at line 253 of file HitLevelInfoWriter.h.

253{};

◆ h_entaRS

double h_entaRS[kMaxHits] = {}
private

normalized + RS distance of entrance angle

Definition at line 254 of file HitLevelInfoWriter.h.

254{};

◆ h_facnladc

double h_facnladc[kMaxHits] = {}
private

calibration hit gain

Definition at line 257 of file HitLevelInfoWriter.h.

257{};

◆ h_foundByTrackFinder

int h_foundByTrackFinder[kMaxHits] = {}
private

the 'found by track finder' flag for the given hit

Definition at line 266 of file HitLevelInfoWriter.h.

266{};

◆ h_layer

int h_layer[kMaxHits] = {}
private

layer number

Definition at line 244 of file HitLevelInfoWriter.h.

244{};

◆ h_lwire

int h_lwire[kMaxHits] = {}
private

sense wire within layer

Definition at line 242 of file HitLevelInfoWriter.h.

242{};

◆ h_ndoca

double h_ndoca[kMaxHits] = {}
private

normalized distance of closest approach

Definition at line 251 of file HitLevelInfoWriter.h.

251{};

◆ h_ndocaRS

double h_ndocaRS[kMaxHits] = {}
private

normalized +RS distance of closest approach

Definition at line 252 of file HitLevelInfoWriter.h.

252{};

◆ h_nhits

int h_nhits { -1}
private

the number of good hits for this Track

Definition at line 241 of file HitLevelInfoWriter.h.

241{ -1};

◆ h_onedCor

double h_onedCor[kMaxHits] = {}
private

calibration 1D cleanup correction

Definition at line 260 of file HitLevelInfoWriter.h.

260{};

◆ h_path

double h_path[kMaxHits] = {}
private

path length in cell

Definition at line 246 of file HitLevelInfoWriter.h.

246{};

◆ h_twodCor

double h_twodCor[kMaxHits] = {}
private

calibration 2D correction

Definition at line 259 of file HitLevelInfoWriter.h.

259{};

◆ h_WeightKaonHypo

double h_WeightKaonHypo[kMaxHits] = {}
private

weight for kaon hypothesis from KalmanFitterInfo

Definition at line 264 of file HitLevelInfoWriter.h.

264{};

◆ h_WeightPionHypo

double h_WeightPionHypo[kMaxHits] = {}
private

weight for pion hypothesis from KalmanFitterInfo

Definition at line 263 of file HitLevelInfoWriter.h.

263{};

◆ h_WeightProtonHypo

double h_WeightProtonHypo[kMaxHits] = {}
private

weight for proton hypothesis from KalmanFitterInfo

Definition at line 265 of file HitLevelInfoWriter.h.

265{};

◆ h_wire

int h_wire[kMaxHits] = {}
private

sense wire ID

Definition at line 243 of file HitLevelInfoWriter.h.

243{};

◆ h_wireGain

double h_wireGain[kMaxHits] = {}
private

calibration hit gain

Definition at line 258 of file HitLevelInfoWriter.h.

258{};

◆ kMaxHits

const int kMaxHits = 200
staticprivate

default hit level index

Definition at line 230 of file HitLevelInfoWriter.h.

◆ l_dedx

double l_dedx[kMaxHits] = {}
private

dE/dx for this layer

Definition at line 238 of file HitLevelInfoWriter.h.

238{};

◆ l_layer

int l_layer[kMaxHits] = {}
private

layer number

Definition at line 236 of file HitLevelInfoWriter.h.

236{};

◆ l_nhits

int l_nhits { -1}
private

the total number of layer hits for this Track

Definition at line 232 of file HitLevelInfoWriter.h.

232{ -1};

◆ l_nhitscombined

int l_nhitscombined[kMaxHits] = {}
private

the number of hits combined this layer

Definition at line 234 of file HitLevelInfoWriter.h.

234{};

◆ l_nhitsused

int l_nhitsused { -1}
private

the total number of layer hits used for this Track

Definition at line 233 of file HitLevelInfoWriter.h.

233{ -1};

◆ l_path

double l_path[kMaxHits] = {}
private

distance travelled in this layer

Definition at line 237 of file HitLevelInfoWriter.h.

237{};

◆ l_wirelongesthit

int l_wirelongesthit[kMaxHits] = {}
private

the wire number of longest hit in this layer

Definition at line 235 of file HitLevelInfoWriter.h.

235{};

◆ m_charge

int m_charge {0}
private

the charge for this Track

Definition at line 164 of file HitLevelInfoWriter.h.

164{0};

◆ m_chi2

double m_chi2 { -1.}
private

chi^2 from track fit

Definition at line 158 of file HitLevelInfoWriter.h.

158{ -1.};

◆ m_chid

double m_chid { -1.}
private

modified chi value for deuteron hypothesis

Definition at line 214 of file HitLevelInfoWriter.h.

214{ -1.};

◆ m_chidOld

double m_chidOld { -1.}
private

chi value for deuteron hypothesis

Definition at line 207 of file HitLevelInfoWriter.h.

207{ -1.};

◆ m_chie

double m_chie { -1.}
private

modified chi value for electron hypothesis

Definition at line 209 of file HitLevelInfoWriter.h.

209{ -1.};

◆ m_chieOld

double m_chieOld { -1.}
private

chi value for electron hypothesis

Definition at line 202 of file HitLevelInfoWriter.h.

202{ -1.};

◆ m_chik

double m_chik { -1.}
private

modified chi value for kaon hypothesis

Definition at line 212 of file HitLevelInfoWriter.h.

212{ -1.};

◆ m_chikOld

double m_chikOld { -1.}
private

chi value for kaon hypothesis

Definition at line 205 of file HitLevelInfoWriter.h.

205{ -1.};

◆ m_chimu

double m_chimu { -1.}
private

modified chi value for muon hypothesis

Definition at line 210 of file HitLevelInfoWriter.h.

210{ -1.};

◆ m_chimuOld

double m_chimuOld { -1.}
private

chi value for muon hypothesis

Definition at line 203 of file HitLevelInfoWriter.h.

203{ -1.};

◆ m_chip

double m_chip { -1.}
private

modified chi value for proton hypothesis

Definition at line 213 of file HitLevelInfoWriter.h.

213{ -1.};

◆ m_chipi

double m_chipi { -1.}
private

modified chi value for pion hypothesis

Definition at line 211 of file HitLevelInfoWriter.h.

211{ -1.};

◆ m_chipiOld

double m_chipiOld { -1.}
private

chi value for pion hypothesis

Definition at line 204 of file HitLevelInfoWriter.h.

204{ -1.};

◆ m_chipOld

double m_chipOld { -1.}
private

chi value for proton hypothesis

Definition at line 206 of file HitLevelInfoWriter.h.

206{ -1.};

◆ m_conditions

std::vector<ModuleCondition> m_conditions
privateinherited

Module condition, only non-null if set.

Definition at line 520 of file Module.h.

◆ m_cosCor

double m_cosCor { -1.}
private

calibration cosine correction

Definition at line 195 of file HitLevelInfoWriter.h.

195{ -1.};

◆ m_cosEdgeCor

double m_cosEdgeCor { -1.}
private

calibration cosine edge correction

Definition at line 196 of file HitLevelInfoWriter.h.

196{ -1.};

◆ m_cosTheta

double m_cosTheta { -2.}
private

cos(theta) for the track

Definition at line 165 of file HitLevelInfoWriter.h.

165{ -2.};

◆ m_d0

double m_d0 {0.}
private

Signed distance to the POCA in the r-phi plane.

Definition at line 148 of file HitLevelInfoWriter.h.

148{0.};

◆ m_DB1DCell

DBObjPtr<CDCDedx1DCell> m_DB1DCell
private

1D correction DB object

Definition at line 275 of file HitLevelInfoWriter.h.

◆ m_DB2DCell

DBObjPtr<CDCDedx2DCell> m_DB2DCell
private

2D correction DB object

Definition at line 274 of file HitLevelInfoWriter.h.

◆ m_DBCosEdgeCor

DBObjPtr<CDCDedxCosineEdge> m_DBCosEdgeCor
private

cosine edge calibration

Definition at line 277 of file HitLevelInfoWriter.h.

◆ m_DBCosineCor

DBObjPtr<CDCDedxCosineCor> m_DBCosineCor
private

Electron saturation correction DB object.

Definition at line 273 of file HitLevelInfoWriter.h.

◆ m_DBHadronCor

DBObjPtr<CDCDedxHadronCor> m_DBHadronCor
private

hadron saturation parameters

Definition at line 278 of file HitLevelInfoWriter.h.

◆ m_DBInjectTime

DBObjPtr<CDCDedxInjectionTime> m_DBInjectTime
private

time gain/reso DB object

Definition at line 272 of file HitLevelInfoWriter.h.

◆ m_DBNonlADC

DBObjPtr<CDCDedxADCNonLinearity> m_DBNonlADC
private

hadron saturation non linearity

Definition at line 276 of file HitLevelInfoWriter.h.

◆ m_DBRunGain

DBObjPtr<CDCDedxRunGain> m_DBRunGain
private

Run gain DB object.

Definition at line 271 of file HitLevelInfoWriter.h.

◆ m_DBScaleFactor

DBObjPtr<CDCDedxScaleFactor> m_DBScaleFactor
private

Scale factor to make electrons ~1.

Definition at line 269 of file HitLevelInfoWriter.h.

◆ m_DBWireGains

DBObjPtr<CDCDedxWireGain> m_DBWireGains
private

Wire gain DB object.

Definition at line 270 of file HitLevelInfoWriter.h.

◆ m_dedxTracks

StoreArray<CDCDedxTrack> m_dedxTracks
private

Required array of CDCDedxTracks.

Definition at line 123 of file HitLevelInfoWriter.h.

◆ m_description

std::string m_description
privateinherited

The description of the module.

Definition at line 510 of file Module.h.

◆ m_dphi

double m_dphi { -1.}
private

POCA in degrees in respect to IP.

Definition at line 152 of file HitLevelInfoWriter.h.

152{ -1.};

◆ m_dr

double m_dr { -1.}
private

track d0 relative to IP

Definition at line 151 of file HitLevelInfoWriter.h.

151{ -1.};

◆ m_dz

double m_dz { -1.}
private

vertex or POCA in case of tracks z in respect to IPs

Definition at line 150 of file HitLevelInfoWriter.h.

150{ -1.};

◆ m_e

double m_e { -1.}
private

energy in the calorimeter

Definition at line 187 of file HitLevelInfoWriter.h.

187{ -1.};

◆ m_e1_9

double m_e1_9 { -1.}
private

ratio of energies of the central 1 crystal vs 3x3 crystals

Definition at line 188 of file HitLevelInfoWriter.h.

188{ -1.};

◆ m_e9_21

double m_e9_21 { -1.}
private

ratio of energies of the central 3x3 crystal vs 5x5 crystals

Definition at line 189 of file HitLevelInfoWriter.h.

189{ -1.};

◆ m_eclClusters

StoreArray<ECLCluster> m_eclClusters
private

Required array of input ECLClusters.

Definition at line 126 of file HitLevelInfoWriter.h.

◆ m_eclsnHits

double m_eclsnHits { -1.}
private

of clusters

Definition at line 191 of file HitLevelInfoWriter.h.

191{ -1.};

◆ m_eop

double m_eop { -1.}
private

energy over momentum in the calorimeter

Definition at line 186 of file HitLevelInfoWriter.h.

186{ -1.};

◆ m_error

double m_error { -1.}
private

standard deviation of the truncated mean

Definition at line 183 of file HitLevelInfoWriter.h.

183{ -1.};

◆ m_eventID

int m_eventID { -1}
private

event in which this Track was found

Definition at line 142 of file HitLevelInfoWriter.h.

142{ -1};

◆ m_expID

int m_expID { -1}
private

experiment in which this Track was found

Definition at line 140 of file HitLevelInfoWriter.h.

140{ -1};

◆ m_file

std::vector<TFile* > m_file
private

output ROOT files

Definition at line 120 of file HitLevelInfoWriter.h.

◆ m_filename

std::vector<std::string> m_filename
private

full names of the output ROOT files

Definition at line 119 of file HitLevelInfoWriter.h.

◆ m_hadronpars

std::vector<double> m_hadronpars
private

hadron saturation parameters

Definition at line 280 of file HitLevelInfoWriter.h.

◆ m_hasReturnValue

bool m_hasReturnValue
privateinherited

True, if the return value is set.

Definition at line 517 of file Module.h.

◆ m_inCDC

int m_inCDC { -1}
private

frack is CDC acceptance or not

Definition at line 161 of file HitLevelInfoWriter.h.

161{ -1};

◆ m_injring

double m_injring { -1.0}
private

HER injection status.

Definition at line 144 of file HitLevelInfoWriter.h.

144{ -1.0};

◆ m_injtime

double m_injtime { -1.0}
private

time since last injection in micro seconds

Definition at line 145 of file HitLevelInfoWriter.h.

145{ -1.0};

◆ m_ioasym

double m_ioasym { -1.}
private

asymmetry in increasing vs decreasing layer numbers per track

Definition at line 170 of file HitLevelInfoWriter.h.

170{ -1.};

◆ m_isCorrection

bool m_isCorrection
private

Flag to switch on/off corrections.

Definition at line 287 of file HitLevelInfoWriter.h.

◆ m_isDeadwire

bool m_isDeadwire
private

write only active wires

Definition at line 282 of file HitLevelInfoWriter.h.

◆ m_isExtraVar

bool m_isExtraVar
private

Flag to switch on/off extra level info and some available w/ release/5 only.

Definition at line 285 of file HitLevelInfoWriter.h.

◆ m_isHitLevel

bool m_isHitLevel
private

Flag to switch on/off hit level info.

Definition at line 284 of file HitLevelInfoWriter.h.

◆ m_isRelative

bool m_isRelative
private

Flag to switch on/off relative constants.

Definition at line 286 of file HitLevelInfoWriter.h.

◆ m_klmClusters

StoreArray<KLMCluster> m_klmClusters
private

Required array of input KLMClusters.

Definition at line 127 of file HitLevelInfoWriter.h.

◆ m_klmLayers

double m_klmLayers { -1.}
private

number of klm layers with hits

Definition at line 190 of file HitLevelInfoWriter.h.

190{ -1.};

◆ m_length

double m_length { -1.}
private

total path length of the Track

Definition at line 163 of file HitLevelInfoWriter.h.

163{ -1.};

◆ m_logConfig

LogConfig m_logConfig
privateinherited

The log system configuration of the module.

Definition at line 513 of file Module.h.

◆ m_mean

double m_mean { -1.}
private

dE/dx averaged

Definition at line 180 of file HitLevelInfoWriter.h.

180{ -1.};

◆ m_moduleParamList

ModuleParamList m_moduleParamList
privateinherited

List storing and managing all parameter of the module.

Definition at line 515 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 507 of file Module.h.

◆ m_nCDChits

double m_nCDChits { -1.}
private

Number of CDC hits associated to the track.

Definition at line 160 of file HitLevelInfoWriter.h.

160{ -1.};

◆ m_p

double m_p { -1.}
private

momentum from tracking

Definition at line 167 of file HitLevelInfoWriter.h.

167{ -1.};

◆ m_package

std::string m_package
privateinherited

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

Definition at line 509 of file Module.h.

◆ m_pCDC

double m_pCDC { -1.}
private

momentum valid in CDC

Definition at line 166 of file HitLevelInfoWriter.h.

166{ -1.};

◆ m_PDG

double m_PDG { -1.}
private

MC PID.

Definition at line 174 of file HitLevelInfoWriter.h.

174{ -1.};

◆ m_phi

double m_phi { -1.}
private

phi for the track

Definition at line 169 of file HitLevelInfoWriter.h.

169{ -1.};

◆ m_phi0

double m_phi0 { -1.}
private

Angle of the transverse momentum in the r-phi plane.

Definition at line 157 of file HitLevelInfoWriter.h.

157{ -1.};

◆ m_pmeand

double m_pmeand { -1.}
private

pred mean for deuteron hypothesis

Definition at line 228 of file HitLevelInfoWriter.h.

228{ -1.};

◆ m_pmeane

double m_pmeane { -1.}
private

pred mean for electron hypothesis

Definition at line 223 of file HitLevelInfoWriter.h.

223{ -1.};

◆ m_pmeank

double m_pmeank { -1.}
private

pred mean for kaon hypothesis

Definition at line 226 of file HitLevelInfoWriter.h.

226{ -1.};

◆ m_pmeanmu

double m_pmeanmu { -1.}
private

pred mean for muon hypothesis

Definition at line 224 of file HitLevelInfoWriter.h.

224{ -1.};

◆ m_pmeanp

double m_pmeanp { -1.}
private

pred mean for proton hypothesis

Definition at line 227 of file HitLevelInfoWriter.h.

227{ -1.};

◆ m_pmeanpi

double m_pmeanpi { -1.}
private

pred mean for pion hypothesis

Definition at line 225 of file HitLevelInfoWriter.h.

225{ -1.};

◆ m_presd

double m_presd { -1.}
private

pred reso for deuteron hypothesis

Definition at line 221 of file HitLevelInfoWriter.h.

221{ -1.};

◆ m_prese

double m_prese { -1.}
private

pred reso for electron hypothesis

Definition at line 216 of file HitLevelInfoWriter.h.

216{ -1.};

◆ m_presk

double m_presk { -1.}
private

pred reso for kaon hypothesis

Definition at line 219 of file HitLevelInfoWriter.h.

219{ -1.};

◆ m_presmu

double m_presmu { -1.}
private

pred reso for muon hypothesis

Definition at line 217 of file HitLevelInfoWriter.h.

217{ -1.};

◆ m_presp

double m_presp { -1.}
private

pred reso for proton hypothesis

Definition at line 220 of file HitLevelInfoWriter.h.

220{ -1.};

◆ m_prespi

double m_prespi { -1.}
private

pred reso for pion hypothesis

Definition at line 218 of file HitLevelInfoWriter.h.

218{ -1.};

◆ m_propertyFlags

unsigned int m_propertyFlags
privateinherited

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

Definition at line 511 of file Module.h.

◆ m_pt

double m_pt { -1.}
private

transverse momentum from tracking

Definition at line 168 of file HitLevelInfoWriter.h.

168{ -1.};

◆ m_returnValue

int m_returnValue
privateinherited

The return value.

Definition at line 518 of file Module.h.

◆ m_runGain

double m_runGain { -1.}
private

calibration run gain

Definition at line 197 of file HitLevelInfoWriter.h.

197{ -1.};

◆ m_runID

int m_runID { -1}
private

run in which this Track was found

Definition at line 141 of file HitLevelInfoWriter.h.

141{ -1};

◆ m_scale

double m_scale { -1.}
private

calibration scale factor

Definition at line 194 of file HitLevelInfoWriter.h.

194{ -1.};

◆ m_strOutputBaseName

std::string m_strOutputBaseName
private

Base name for the output ROOT files.

Definition at line 117 of file HitLevelInfoWriter.h.

◆ m_strParticleList

std::vector<std::string> m_strParticleList
private

Vector of ParticleLists to write out.

Definition at line 118 of file HitLevelInfoWriter.h.

◆ m_tanlambda

double m_tanlambda { -1.}
private

Slope of the track in the r-z plane.

Definition at line 156 of file HitLevelInfoWriter.h.

156{ -1.};

◆ m_theta

double m_theta { -2.}
private

cos(theta) for the track

Definition at line 171 of file HitLevelInfoWriter.h.

171{ -2.};

◆ m_timeGain

double m_timeGain { -1.}
private

calibration injection time gain

Definition at line 198 of file HitLevelInfoWriter.h.

198{ -1.};

◆ m_timeReso

double m_timeReso { -1.}
private

calibration injection time reso

Definition at line 199 of file HitLevelInfoWriter.h.

199{ -1.};

◆ m_trackFitResults

StoreArray<TrackFitResult> m_trackFitResults
private

Required array of input TrackFitResults.

Definition at line 125 of file HitLevelInfoWriter.h.

◆ m_trackID

int m_trackID { -1}
private

ID number of the Track.

Definition at line 162 of file HitLevelInfoWriter.h.

162{ -1};

◆ m_tracks

StoreArray<Track> m_tracks
private

Required array of input Tracks.

Definition at line 124 of file HitLevelInfoWriter.h.

◆ m_tree

std::vector<TTree* > m_tree
private

output ROOT trees

Definition at line 121 of file HitLevelInfoWriter.h.

◆ m_trunc

double m_trunc { -1.}
private

dE/dx averaged, truncated mean, with corrections

Definition at line 181 of file HitLevelInfoWriter.h.

181{ -1.};

◆ m_truncNoSat

double m_truncNoSat { -1.}
private

dE/dx averaged, truncated mean, with corrections (not hadron)

Definition at line 182 of file HitLevelInfoWriter.h.

182{ -1.};

◆ m_TTDInfo

Store Object Ptr: EventLevelTriggerTimeInfo.

Definition at line 128 of file HitLevelInfoWriter.h.

◆ m_type

std::string m_type
privateinherited

The type of the module, saved as a string.

Definition at line 508 of file Module.h.

◆ m_vx0

double m_vx0 {0.}
private

X coordinate of track POCA to origin.

Definition at line 153 of file HitLevelInfoWriter.h.

153{0.};

◆ m_vy0

double m_vy0 {0.}
private

Y coordinate of track POCA to origin.

Definition at line 154 of file HitLevelInfoWriter.h.

154{0.};

◆ m_vz0

double m_vz0 {0.}
private

Z coordinate of track POCA to origin.

Definition at line 155 of file HitLevelInfoWriter.h.

155{0.};

◆ m_z0

double m_z0 {0.}
private

z coordinate of the POCA

Definition at line 149 of file HitLevelInfoWriter.h.

149{0.};

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