Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hcana
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Whitney Armstrong
hcana
Commits
4f43edec
Commit
4f43edec
authored
7 years ago
by
Stephen A. Wood
Committed by
Mark K Jones
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Simplify THcExtTarCor by inheriting from THaExtTarCor
parent
ce0f884f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/THcExtTarCor.cxx
+1
-44
1 addition, 44 deletions
src/THcExtTarCor.cxx
src/THcExtTarCor.h
+2
-32
2 additions, 32 deletions
src/THcExtTarCor.h
with
3 additions
and
76 deletions
src/THcExtTarCor.cxx
+
1
−
44
View file @
4f43edec
...
...
@@ -17,9 +17,7 @@ using namespace std;
//_____________________________________________________________________________
THcExtTarCor
::
THcExtTarCor
(
const
char
*
name
,
const
char
*
description
,
const
char
*
spectro
,
const
char
*
vertex
)
:
THaPhysicsModule
(
name
,
description
),
fThetaCorr
(
0.0
),
fDeltaCorr
(
0.0
),
fSpectroName
(
spectro
),
fVertexName
(
vertex
),
fTrackModule
(
NULL
),
fVertexModule
(
NULL
)
THaExtTarCor
(
name
,
description
,
spectro
,
vertex
)
{
// Normal constructor.
...
...
@@ -34,47 +32,6 @@ THcExtTarCor::~THcExtTarCor()
DefineVariables
(
kDelete
);
}
//_____________________________________________________________________________
void
THcExtTarCor
::
Clear
(
Option_t
*
opt
)
{
// Clear all event-by-event variables.
THaPhysicsModule
::
Clear
(
opt
);
TrkIfoClear
();
fDeltaTh
=
fDeltaDp
=
fDeltaP
=
0.0
;
}
//_____________________________________________________________________________
THaAnalysisObject
::
EStatus
THcExtTarCor
::
Init
(
const
TDatime
&
run_time
)
{
// Initialize the module.
// Locate the spectrometer apparatus named in fSpectroName and save
// pointer to it.
// Also, if given, locate the vertex module given in fVertexName
// and save pointer to it.
fTrackModule
=
dynamic_cast
<
THaTrackingModule
*>
(
FindModule
(
fSpectroName
.
Data
(),
"THaTrackingModule"
));
if
(
!
fTrackModule
)
return
fStatus
;
fTrkIfo
.
SetSpectrometer
(
fTrackModule
->
GetTrackInfo
()
->
GetSpectrometer
()
);
// If no vertex module given, try to get the vertex info from the
// same module as the tracks, e.g. from a spectrometer
if
(
fVertexName
.
IsNull
())
fVertexName
=
fSpectroName
;
fVertexModule
=
dynamic_cast
<
THaVertexModule
*>
(
FindModule
(
fVertexName
.
Data
(),
"THaVertexModule"
));
if
(
!
fVertexModule
)
return
fStatus
;
// Standard initialization. Calls this object's DefineVariables().
THaPhysicsModule
::
Init
(
run_time
);
return
fStatus
;
}
//_____________________________________________________________________________
Int_t
THcExtTarCor
::
DefineVariables
(
EMode
mode
)
{
...
...
This diff is collapsed.
Click to expand it.
src/THcExtTarCor.h
+
2
−
32
View file @
4f43edec
...
...
@@ -7,55 +7,25 @@
//
//////////////////////////////////////////////////////////////////////////
#include
"THaPhysicsModule.h"
#include
"THaTrackingModule.h"
#include
"TString.h"
#include
"THaExtTarCor.h"
class
THaVertexModule
;
class
THcExtTarCor
:
public
THa
PhysicsModule
,
public
THaTrackingModule
{
class
THcExtTarCor
:
public
THa
ExtTarCor
{
public:
THcExtTarCor
(
const
char
*
name
,
const
char
*
description
,
const
char
*
spectro
=
""
,
const
char
*
vertex
=
""
);
virtual
~
THcExtTarCor
();
virtual
void
Clear
(
Option_t
*
opt
=
""
);
Double_t
GetDeltaP
()
const
{
return
fDeltaP
;
}
Double_t
GetDeltaDp
()
const
{
return
fDeltaDp
;
}
Double_t
GetDeltaTh
()
const
{
return
fDeltaTh
;
}
virtual
EStatus
Init
(
const
TDatime
&
run_time
);
virtual
Int_t
Process
(
const
THaEvData
&
);
void
SetModuleNames
(
const
char
*
spectro
,
const
char
*
vertex
=
""
);
protected:
Double_t
fThetaCorr
;
// Theta correction coefficient
Double_t
fDeltaCorr
;
// Delta correction coefficient
Double_t
fDeltaP
;
// Size of momentum correction (GeV)
Double_t
fDeltaDp
;
// Size of delta correction
Double_t
fDeltaTh
;
// Size of angle corection (rad)
TString
fSpectroName
;
// Name of spectrometer/tracking module
TString
fVertexName
;
// Name of vertex module
THaTrackingModule
*
fTrackModule
;
// Pointer to tracking module
THaVertexModule
*
fVertexModule
;
// Pointer to vertex module
virtual
Int_t
DefineVariables
(
EMode
mode
=
kDefine
);
virtual
Int_t
ReadDatabase
(
const
TDatime
&
date
);
ClassDef
(
THcExtTarCor
,
0
)
//Extended target corrections module
};
//_________ inlines __________________________________________________________
inline
void
THcExtTarCor
::
SetModuleNames
(
const
char
*
spectro
,
const
char
*
vertex
)
{
fSpectroName
=
spectro
;
fVertexName
=
vertex
;
}
#endif
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment