|
ATLAS Offline Software
|
Go to the documentation of this file.
18 #include "CLHEP/Units/SystemOfUnits.h"
19 #include "CLHEP/Units/PhysicalConstants.h"
36 m_thistSvc(
"THistSvc",
n),
37 m_validationStream(
"ISFFatras"),
51 m_interactions(nullptr),
66 declareProperty(
"ValidationStreamName",
68 "Name of the output stream" );
69 declareProperty(
"THistService",
80 m_interactions =
nullptr;
81 delete(m_interactions);
95 if ( m_thistSvc.retrieve().isSuccess() ) {
98 const std::string
prefix =
"/" + m_validationStream +
"/"+
treeName;
100 m_particles->Branch(
"pdg" , &m_pdg ,
"pdg/I" );
101 m_particles->Branch(
"scIn" , &m_scIn ,
"scIn/I" );
102 m_particles->Branch(
"scOut" , &m_scEnd ,
"scOut/I" );
103 m_particles->Branch(
"gen" , &m_gen ,
"gen/I" );
104 m_particles->Branch(
"geoID" , &m_geoID ,
"geoID/I" );
105 m_particles->Branch(
"pth" , &m_pth ,
"pth/F" );
106 m_particles->Branch(
"pph" , &m_pph ,
"pph/F" );
107 m_particles->Branch(
"p" , &m_p ,
"p/F" );
108 m_particles->Branch(
"eloss" , &m_eloss ,
"eloss/F" );
109 m_particles->Branch(
"ionloss" , &m_ionloss ,
"ionloss/F" );
110 m_particles->Branch(
"radloss" , &m_radloss ,
"radloss/F" );
111 m_particles->Branch(
"zOaTr" , &m_zOaTr ,
"zOaTr/F" );
112 m_particles->Branch(
"wZ" , &m_wZ ,
"wZ/F" );
113 m_particles->Branch(
"X0" , &m_X0 ,
"X0/F" );
114 m_particles->Branch(
"dt" , &m_dt ,
"dt/F" );
115 m_particles->Branch(
"thIn" , &m_thIn ,
"thIn/F" );
116 m_particles->Branch(
"phIn" , &m_phIn ,
"phIn/F" );
117 m_particles->Branch(
"dIn" , &m_dIn ,
"dIn/F" );
118 m_particles->Branch(
"thEnd" , &m_thEnd ,
"thEnd/F" );
119 m_particles->Branch(
"phEnd" , &m_phEnd ,
"phEnd/F" );
120 m_particles->Branch(
"dEnd" , &m_dEnd ,
"dEnd/F" );
126 const char *treeNameInt=
"interactions";
127 const std::string prefixInt =
"/" + m_validationStream +
"/"+ treeNameInt;
128 m_interactions =
new TTree( treeNameInt, treeNameInt );
129 m_interactions->Branch(
"process" , &m_process ,
"process/I" );
130 m_interactions->Branch(
"pdg_mother" , &m_pdg_mother ,
"pdg_mother/I" );
131 m_interactions->Branch(
"gen_mother" , &m_gen_mother ,
"gen_mother/I" );
132 m_interactions->Branch(
"nChild" , &m_nChild ,
"nch/I" );
133 m_interactions->Branch(
"vtx_dist" , &m_vtx_dist ,
"vtx_dist/F" );
134 m_interactions->Branch(
"vtx_theta" , &m_vtx_theta ,
"vtx_theta/F" );
135 m_interactions->Branch(
"vtx_phi" , &m_vtx_phi ,
"vtx_phi/F" );
136 m_interactions->Branch(
"vtx_e_diff" , &m_vtx_e_diff ,
"vtx_e_diff/F" );
137 m_interactions->Branch(
"vtx_p_diff" , &m_vtx_p_diff ,
"vtx_p_diff/F" );
138 m_interactions->Branch(
"vtx_plong_diff" , &m_vtx_plong_diff ,
"vtx_plong_diff/F" );
139 m_interactions->Branch(
"vtx_pperp_diff" , &m_vtx_pperp_diff ,
"vtx_pperp_diff/F" );
140 m_interactions->Branch(
"p_mother" , &m_p_mother ,
"p_mother/F" );
141 m_interactions->Branch(
"pdg_child" , m_pdg_child ,
"pdg_child[nch]/I" );
142 m_interactions->Branch(
"fp_child" , m_fp_child ,
"fp_child[nch]/F" );
143 m_interactions->Branch(
"oa_child" , m_oa_child ,
"oa_child[nch]/F" );
145 ATH_CHECK(m_thistSvc->regTree( prefixInt, m_interactions) );
149 return StatusCode::SUCCESS;
163 m_ionloss = ec.
eLoss ? ec.
eLoss->meanIoni() : 0.;
164 m_radloss = ec.
eLoss ? ec.
eLoss->meanRad() : 0.;
237 double time,
double dX0 )
const {
249 m_scEnd = endProcess;
250 m_eloss = ePar? ePar->
momentum().mag()-m_p : -m_p;
299 unsigned int nSec =
children.size();
301 int iPrimSurv = primOut ? 1 : 0;
303 m_pdg_mother =
parent.pdgCode();
304 m_gen_mother =
parent.getUserInformation()?
parent.getUserInformation()->generation() : 0;
306 m_p_mother = primIn.mag();
308 m_vtx_dist =
vertex.mag();
309 m_vtx_theta =
vertex.theta();
312 m_nChild = nSec+iPrimSurv;
317 m_pdg_child[0] = m_pdg_mother;
318 m_fp_child[0] = primOut->mag()/m_p_mother;
319 m_oa_child[0] = primOut->unit().dot( primIn.unit() );
324 for (
unsigned int isec=0; isec< nSec; isec++) {
326 m_pdg_child[isec+iPrimSurv] =
children[isec]->pdgCode();
327 m_fp_child[isec+iPrimSurv] =
children[isec]->momentum().mag()/m_p_mother;
328 m_oa_child[isec+iPrimSurv] =
children[isec]->momentum().unit().dot( primIn.unit() );
333 m_vtx_p_diff = pbal.mag();
334 m_vtx_plong_diff = pbal.dot(primIn)/m_p_mother;
335 m_vtx_pperp_diff = std::sqrt(m_vtx_p_diff*m_vtx_p_diff-m_vtx_plong_diff*m_vtx_plong_diff);
337 m_interactions->Fill();
const Amg::Vector3D & position() const
Access method for the position.
int pdgCode() const
PDG value.
#define ATH_MSG_VERBOSE(x)
const Amg::Vector3D & position() const
The current position of the ISFParticle.
AtlasDetDescr::AtlasRegion nextGeoID() const
next geoID the particle will be simulated in
::StatusCode StatusCode
StatusCode definition for legacy code.
std::vector< ISF::ISFParticle * > ISFParticleVector
ISFParticle vector.
double timeStamp() const
Timestamp of the ISFParticle.
const Amg::Vector3D & momentum() const
The current momentum vector of the ISFParticle.
Eigen::Matrix< double, 3, 1 > Vector3D
const Amg::Vector3D & momentum() const
Access method for the momentum.
const ParticleUserInformation * getUserInformation() const
get/set ParticleUserInformation