70#include "TObjString.h"
74#include "CLHEP/Geometry/Point3D.h"
89 LogStream << MSG::DEBUG <<
"begin ALFA_GloRec::ALFA_GloRec" <<
endmsg;
111 LogStream << MSG::DEBUG <<
"begin ALFA_GloRec::~ALFA_GloRec" <<
endmsg;
112 LogStream << MSG::DEBUG <<
"end ALFA_GloRec::~ALFA_GloRec" <<
endmsg;
122 LogStream << MSG::DEBUG <<
"begin ALFA_GloRec::initialize()" <<
endmsg;
124 msg(MSG::DEBUG) <<
"======================================" <<
endmsg;
125 msg(MSG::DEBUG) <<
"ALFA_GloRec::initialize - data type " <<
endmsg;
126 msg(MSG::DEBUG) <<
"======================================" <<
endmsg;
131 msg(MSG::DEBUG) <<
"==========================================================" <<
endmsg;
132 msg(MSG::DEBUG) <<
"ALFA_GloRec::initialize - Path patterns from job options " <<
endmsg;
133 msg(MSG::DEBUG) <<
"==========================================================" <<
endmsg;
146 return StatusCode::SUCCESS;
157 LogStream << MSG::DEBUG <<
"begin ALFA_GloRec::execute()" <<
endmsg;
158 StatusCode
sc = StatusCode::SUCCESS;
168 LogStream << MSG::DEBUG <<
"truth info()" <<
endmsg;
170 if (
sc.isFailure()) {
171 LogStream << MSG::WARNING <<
"ALFA digi, Truth_info failed" <<
endmsg;
172 return StatusCode::SUCCESS;
181 if (
sc.isFailure()) {
182 msg(MSG::ERROR) <<
"Could not create the empty LocRecEv collection in StoreGate" <<
endmsg;
191 if(
sc.isFailure() || !pLocRecCorrCol)
204 for(; mcColBeg!=mcColEnd; ++mcColBeg) {
205 HepGeom::Point3D<double> PointInAtlasCS;
220 hits.ApplyPathPattern(l_pathpattern.Data());
222 for(
int i = 0 ; i < hits.GetNpaths() ; i++){
249 LogStream << MSG::DEBUG <<
"begin ALFA_GloRec::finalize()" <<
endmsg;
253 return StatusCode::SUCCESS;
273 if(
sc.isFailure() || !mcTru){
275 return StatusCode::FAILURE;
286 for(;mcTruBeg!=mcTruEnd;++mcTruBeg){
292 if(((std::abs(begGen->pdg_id())==2212)||(std::abs(begGen->pdg_id())==211))){
295 px = begGen->momentum().px();
296 py = begGen->momentum().py();
297 pz = begGen->momentum().pz();
299 x = l_prodvert->position().x();
300 y = l_prodvert->position().y();
301 z = l_prodvert->position().z();
310 }
else if(
z < -236000.){
331 return StatusCode::SUCCESS;
341 m_th1_x_g =
new TH1F(
"x_g",
"x^{vertex}_{gen}", 100, -5,5);
342 m_th1_y_g =
new TH1F(
"y_g",
"y^{vertex}_{gen}", 100, -5,5);
343 m_th1_xslope_g =
new TH1F(
"xslope_g",
"x'^{vertex}_{gen}", 100, -1.e-3,1.e3);
344 m_th1_yslope_g =
new TH1F(
"yslope_g",
"y'^{vertex}_{gen}", 100, -1.e-3,1.e3);
355 m_th2_truexvsrecx =
new TH2F(
"truexvsrecx",
"gen x vs rec x", 100, -50, 50, 100, -50, 50);
356 m_th2_trueyvsrecy =
new TH2F(
"trueyvsrecy",
"gen y vs rec y", 100, -50, 50, 100, -50, 50);
368 m_th2_extrapxvsrecxnearpot =
new TH2F(
"extrapxvsrecxnearpot",
"extrapolated gen x vs rec x nearpot", 100, -50, 50, 100, -50, 50);
369 m_th2_extrapyvsrecynearpot =
new TH2F(
"extrapyvsrecynearpot",
"extrapolated gen y vs rec y nearpot", 100, -50, 50, 100, -50, 50);
375 m_th2_extrapxvsrecxfarpot =
new TH2F(
"extrapxvsrecxfarpot",
"extrapolated gen x vs rec x farpot", 100, -50, 50, 100, -50, 50);
376 m_th2_extrapyvsrecyfarpot =
new TH2F(
"extrapyvsrecyfarpot",
"extrapolated gen y vs rec y farpot", 100, -50, 50, 100, -50, 50);
392 double x_g, y_g, z_g, px_g, py_g, pz_g;
408 ATH_MSG_ERROR(
"ALFA_GloRec::FillTrackCandHistos : Track candidate neither left nor right !!!");
420 double px_norm = px_g / pz_g;
421 double py_norm = py_g / pz_g;
436 double genxextrtonearpot = x_g + px_norm * (nearhitz - z_g);
437 double genyextrtonearpot = y_g + py_norm * (nearhitz - z_g);
449 double genxextrtofarpot = x_g + px_norm * (farhitz - z_g);
450 double genyextrtofarpot = y_g + py_norm * (farhitz - z_g);
507 fw_glorecanalysis.Write();
508 fw_glorecanalysis.Close();
TH1F * m_th1_recxminusextrapxfarpot
TH1F * m_th1_recxslopeminustruexslope
TH1F * m_th1_xfarlwpotresiduals
TH2F * m_th2_extrapyvsrecyfarpot
TH1F * m_th1_recxminustruex
TH1F * m_th1_recyminustruey
std::string m_strLocRecCorrCollectionName
TH1F * m_th1_recxovertruex
std::string m_TruthCollectionName
TH1F * m_th1_recyslopeovertrueyslope
TH1F * m_th1_ynearlwpotresiduals
TH2F * m_th2_extrapxvsrecxfarpot
TH1F * m_th1_yfarlwpotresiduals
TH1F * m_th1_recyovertruey
TH2F * m_th2_truexslopevsrecxslope
TH1F * m_th1_recxoverextrapxnearpot
TH1F * m_th1_recyoverextrapynearpot
std::string m_strGloRecAnalysisFile
ALFA_GloRecEvCollection * m_pGloRecEvCollection
TH1F * m_th1_xfaruppotresiduals
ALFA_GloRec(const std::string &name, ISvcLocator *pSvcLocator)
TH1F * m_th1_recxslopeovertruexslope
TH1F * m_th1_recxminusextrapxnearpot
std::string m_strGloRecCollectionName
TH1F * m_th1_recyminusextrapynearpot
TH1F * m_th1_recyoverextrapyfarpot
TObjArray m_TObjArrTrackPathPatterns
TH1F * m_th1_ynearuppotresiduals
TH1F * m_th1_xnearuppotresiduals
TH2F * m_th2_trueyslopevsrecyslope
TH1F * m_th1_recyminusextrapyfarpot
std::string m_strTrackPathPatterns
TH1F * m_th1_yfaruppotresiduals
TH1F * m_th1_recyslopeminustrueyslope
TH1F * m_th1_xnearlwpotresiduals
TH2F * m_th2_extrapxvsrecxnearpot
TH1F * m_th1_recxoverextrapxfarpot
TH2F * m_th2_extrapyvsrecynearpot
void FillTrackCandHistos(AlfaTrackCand *trkcand)
const ALFA_LocRecCorrEvent * GetNearLocRecCorr() const
HepGeom::Point3D< double > * GetNearImpactPoint()
AlfaLocalHit * GetNearLocalHit()
AlfaLocalHit * GetFarLocalHit()
HepGeom::Point3D< double > * GetFarImpactPoint()
const ALFA_LocRecCorrEvent * GetFarLocRecCorr() const
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
ServiceHandle< StoreGateSvc > & evtStore()
DataModel_detail::const_iterator< DataVector > const_iterator
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
This defines the McEventCollection, which is really just an ObjectVector of McEvent objectsFile: Gene...
IMessageSvc * getMessageSvc(bool quiet=false)
const GenParticle * ConstGenParticlePtr
const HepMC::GenVertex * ConstGenVertexPtr