ATLAS Offline Software
Loading...
Searching...
No Matches
TileCosmicMuonFillerTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5/*
6 * File: TileCosmicMuonFillerTool.cxx
7 * Author: Stephen Cole <stephen.cole@cern.ch>
8 *
9 * Created on November 2, 2011, 1:26 PM
10 */
11
13#include "GaudiKernel/MsgStream.h"
14#include "GaudiKernel/ISvcLocator.h"
15#include "GaudiKernel/StatusCode.h"
17
18using namespace std;
19
20namespace D3PD{
21
23 const string& name, const IInterface* parent):
25{
26 TileCosmicMuonFillerTool::book().ignore(); // Avoid coverity warnings
27}
28
31
33// CHECK(addVariable("nTracks", m_nTracks));
34// CHECK(addVariable("trackOfMaxE", m_trackOfMaxE));
35// CHECK(addVariable("nSegments", m_nSegments));
36
42 CHECK(addVariable("time", m_time));
43 CHECK(addVariable("fitQuality", m_fitQuality));
44 CHECK(addVariable("fitNcells", m_fitNCells));
45 CHECK(addVariable("trackNcells", m_trackNCells));
47 CHECK(addVariable("energy", m_fullEnergy));
48
49 CHECK(addVariable("pathTopA", m_pathTopA));
50 CHECK(addVariable("pathTopBC", m_pathTopBC));
51 CHECK(addVariable("pathTopD", m_pathTopD));
52 CHECK(addVariable("pathBottomA", m_pathBottomA));
53 CHECK(addVariable("pathBottomBC", m_pathBottomBC));
54 CHECK(addVariable("pathBottomD", m_pathBottomD));
55 CHECK(addVariable("energyTopA", m_energyTopA));
56 CHECK(addVariable("energyTopBC", m_energyTopBC));
57 CHECK(addVariable("energyTopD", m_energyTopD));
58 CHECK(addVariable("energyBottomA", m_energyBottomA));
59 CHECK(addVariable("energyBottomBC", m_energyBottomBC));
60 CHECK(addVariable("energyBottomD", m_energyBottomD));
61
62 CHECK(addVariable("segmentPath", m_segmentPath));
63 CHECK(addVariable("segmentPartition", m_segmentPartition));
64 CHECK(addVariable("segmentModule", m_segmentModule));
65 CHECK(addVariable("segmentSampling", m_segmentSampling));
66// CHECK(addVariable("segmentTrack", m_segmentTrack));
67
68 return StatusCode::SUCCESS;
69}
70
72 MsgStream log(msgSvc(), name());
73 log << MSG::INFO << " in TileCosmicMuonFillerTool::book()" <<
74 endmsg;
75
76 *m_positionX=p.GetPositionX();
77 *m_positionY=p.GetPositionY();
78 *m_positionZ=p.GetPositionZ();
79 *m_directionPhi=p.GetDirectionPhi();
80 *m_directionTheta=p.GetDirectionTheta();
81 *m_time=p.GetTime();
82 *m_fitQuality=p.GetFitQuality();
83 *m_fitNCells=p.GetFitNCells();
84
85 if(p.GetNSamples()!=3){
86 log << MSG::DEBUG << "Warning!: TileCosmicMuon with "<<
87 p.GetNSamples()<<" samples."<<endmsg;
88 *m_fullPath=0;
89 *m_fullEnergy=0;
90 *m_pathTopA=0;
91 *m_pathTopBC=0;
92 *m_pathTopD=0;
96 *m_energyTopA=0;
98 *m_energyTopD=0;
102 }
103 else{
104 *m_fullPath=const_cast<TileCosmicMuon*>(&p)->GetFullPath();
105 *m_fullEnergy=const_cast<TileCosmicMuon*>(&p)->GetFullEnergy();
106 *m_pathTopA=p.GetPathTop(0);
107 *m_pathTopBC=p.GetPathTop(1);
108 *m_pathTopD=p.GetPathTop(2);
109 *m_pathBottomA=p.GetPathBottom(0);
110 *m_pathBottomBC=p.GetPathBottom(1);
111 *m_pathBottomD=p.GetPathBottom(2);
112 *m_energyTopA=p.GetEnergyTop(0);
113 *m_energyTopBC=p.GetEnergyTop(1);
114 *m_energyTopD=p.GetEnergyTop(2);
115 *m_energyBottomA=p.GetEnergyBottom(0);
116 *m_energyBottomBC=p.GetEnergyBottom(1);
117 *m_energyBottomD=p.GetEnergyBottom(2);
118 }
119
120 for(int i=0;i<p.GetNSegments();++i){
121 m_segmentPath->push_back(p.GetSegmentPath(i));
122 m_segmentPartition->push_back(p.GetSegmentPartition(i));
123 m_segmentModule->push_back(p.GetSegmentModule(i));
124 m_segmentSampling->push_back(p.GetSegmentSampling(i));
125 }
126
127 return StatusCode::SUCCESS;
128}
129
130}
#define endmsg
Helpers for checking error return status codes and reporting errors.
#define CHECK(...)
Evaluate an expression and check for errors.
virtual StatusCode addVariable(const std::string &name, const std::type_info &ti, void *&ptr, const std::string &docstring="", const void *defval=0)
Type-safe wrapper for block filler tools.
virtual StatusCode book()
Declare tuple variables.
virtual StatusCode fill(const TileCosmicMuon &p)
Fill one block — type-safe version.
TileCosmicMuonFillerTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
Class containing detailed results from TileMuonFitter.
Block filler tool for noisy FEB information.
STL namespace.