ATLAS Offline Software
Loading...
Searching...
No Matches
TileCosmicMuonTileCellAssociationTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5/*
6 * File: TileCosmicMuonTileCellAssociationTool.cxx
7 * Author: Stephen Cole <stephen.cole@cern.ch>
8 *
9 * Created on November 3, 2011, 3:48 PM
10 */
11
15#include "GaudiKernel/MsgStream.h"
16
17using namespace std;
18
19namespace D3PD{
20
22 const string& name, const IInterface* parent)
23 : Base(type,name,parent),
24 m_tileid(0)
25{
26}
27
30
32{
33 const CaloCellContainer* cellcoll = 0;
34
35 CHECK( evtStore()->retrieve(cellcoll,"AllCalo") );
36 CHECK( detStore()->retrieve(m_tileid) );
37
38 m_itr=cellcoll->begin();
39 m_cEnd=cellcoll->end();
40
41 m_tileHash.clear();
42
43 for(int i=0; i<p.GetTrackNCells();++i)
44 m_tileHash.push_back(p.GetTrackCellHash(i));
45
46 m_tileItr=m_tileHash.begin();
47
48 return StatusCode::SUCCESS;
49}
50
52 while(m_itr!=m_cEnd){
53 const CaloCell* cell=*m_itr;
54 if(cell->caloDDE()->getSubCalo()==CaloCell_ID::TILE){
55 while(m_tileItr!=m_tileHash.end()){
56 if(cell->ID()==m_tileid->cell_id(*m_tileItr)){
57 ++m_itr;
58 ++m_tileItr;
59 return cell;
60 }
61 ++m_tileItr;
62 }
63 }
64 m_tileItr=m_tileHash.begin();
65 ++m_itr;
66 }
67 return 0;
68}
69
70}
Helpers for checking error return status codes and reporting errors.
#define CHECK(...)
Evaluate an expression and check for errors.
Container class for CaloCell.
Data object for each calorimeter readout cell.
Definition CaloCell.h:57
MultiAssociationTool< TileCosmicMuon, CaloCell > Base
virtual const CaloCell * next()
Return a pointer to the next element in the association.
TileCosmicMuonTileCellAssociationTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
virtual StatusCode reset(const TileCosmicMuon &p)
Return the target object.
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.
Class containing detailed results from TileMuonFitter.
Block filler tool for noisy FEB information.
STL namespace.