Hall-D Software
alpha
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
DCustomAction_CutPhotonKin.cc
Go to the documentation of this file.
1
// $Id$
2
//
3
// File: DCustomAction_CutPhotonKin.cc
4
// Created: Fri Jul 18 12:51:03 EDT 2014
5
// Creator: jrsteven (on Linux ifarm1102 2.6.32-220.7.1.el6.x86_64 x86_64)
6
//
7
8
#include "
DCustomAction_CutPhotonKin.h
"
9
10
void
DCustomAction_CutPhotonKin::Initialize
(JEventLoop* locEventLoop)
11
{
12
13
}
14
15
bool
DCustomAction_CutPhotonKin::Perform_Action
(JEventLoop* locEventLoop,
const
DParticleCombo
* locParticleCombo)
16
{
17
auto
locParticles = locParticleCombo->
Get_FinalParticles_Measured
(
Get_Reaction
());
18
19
for
(
size_t
loc_i = 0; loc_i < locParticles.size(); ++loc_i)
20
{
21
if
(
ParticleCharge
(locParticles[loc_i]->PID()) == 0)
22
{
23
const
DNeutralParticleHypothesis
* locNeutralParticleHypothesis =
static_cast<
const
DNeutralParticleHypothesis
*
>
(locParticles[loc_i]);
24
const
DNeutralShower
* locNeutralShower = locNeutralParticleHypothesis->
Get_NeutralShower
();
25
26
// make BCAL cut on photon here
27
if
(locNeutralShower->
dDetectorSystem
!=
SYS_BCAL
)
return
false
;
28
// Require each photon to have at least 500 MeV of energy
29
if
(locNeutralShower->
dEnergy
< 0.5)
return
false
;
30
}
31
}
32
33
return
true
;
//return false if you want to use this action to apply a cut (and it fails the cut!)
34
}
DAnalysis::DAnalysisAction::Get_Reaction
const DReaction * Get_Reaction(void) const
Definition:
DAnalysisAction.h:33
DCustomAction_CutPhotonKin::Initialize
void Initialize(JEventLoop *locEventLoop)
Definition:
DCustomAction_CutPhotonKin.cc:10
DCustomAction_CutPhotonKin.h
ParticleCharge
static int ParticleCharge(Particle_t p)
Definition:
particleType.h:1084
DNeutralParticleHypothesis::Get_NeutralShower
const DNeutralShower * Get_NeutralShower(void) const
Definition:
DNeutralParticleHypothesis.h:39
DNeutralShower::dEnergy
double dEnergy
Definition:
DNeutralShower.h:33
SYS_BCAL
Definition:
GlueX.h:19
DNeutralShower::dDetectorSystem
DetectorSystem_t dDetectorSystem
Definition:
DNeutralShower.h:30
DAnalysis::DParticleCombo
Definition:
DParticleCombo.h:21
DAnalysis::DParticleCombo::Get_FinalParticles_Measured
vector< const DKinematicData * > Get_FinalParticles_Measured(const DReaction *locReaction, Charge_t locCharge=d_AllCharges) const
Definition:
DParticleCombo.h:103
DNeutralShower
Definition:
DNeutralShower.h:24
DCustomAction_CutPhotonKin::Perform_Action
bool Perform_Action(JEventLoop *locEventLoop, const DParticleCombo *locParticleCombo)
Definition:
DCustomAction_CutPhotonKin.cc:15
DNeutralParticleHypothesis
Definition:
DNeutralParticleHypothesis.h:22
plugins
Utilities
exclusivepi0skim
DCustomAction_CutPhotonKin.cc
Generated on Fri Jul 26 2019 14:00:27 for Hall-D Software by
1.8.5