RpcClusterOnTrack.cxx 3.1 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/

///////////////////////////////////////////////////////////////////
// RpcClusterOnTrack.cxx
//   Implementation file for class RpcClusterOnTrack
///////////////////////////////////////////////////////////////////
// (c) ATLAS Detector software
///////////////////////////////////////////////////////////////////
// Version 1.0 06/07/2004  Ketevi A. Assamagan
// adapted from  Veronique Boisvert
///////////////////////////////////////////////////////////////////

#include "MuonRIO_OnTrack/RpcClusterOnTrack.h"
#include "TrkEventPrimitives/LocalParameters.h"

namespace Muon
{

// Default constructor:
RpcClusterOnTrack::RpcClusterOnTrack()
    :
    MuonClusterOnTrack(), // call base class ctor
   m_rio(),
    m_detEl(0),
    m_time(0.0)
{}

// copy constructor:
RpcClusterOnTrack::RpcClusterOnTrack( const RpcClusterOnTrack& rot)
    :
    MuonClusterOnTrack(rot), // base clas ctor
    m_rio(rot.m_rio),
    m_detEl(rot.m_detEl),
    m_time(rot.m_time)
{}


// Constructor with parameters
RpcClusterOnTrack::RpcClusterOnTrack(
                     const RpcPrepData* RIO,
                     const Trk::LocalParameters& locpos,
                     const Amg::MatrixX& locerr,
                     double positionAlongStrip,
                     float time) 
    :
    MuonClusterOnTrack(locpos, locerr, RIO->identify(), positionAlongStrip ), //call base class constructor
    m_detEl( RIO->detectorElement() ),
    m_time(time)
{
    //Set EL
    // m_rio = ElementLinkToIDC_RPC_Container("RPC_Measurements", RIO->getHashAndIndex().hashAndIndex(), RIO);
    m_rio.setElement(RIO);
 }

57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73

RpcClusterOnTrack::RpcClusterOnTrack(
                     const ElementLinkToIDC_RPC_Container& RIO,
                     const Trk::LocalParameters& locpos,
                     const Amg::MatrixX& locerr,
                     const Identifier& id,
                     const MuonGM::RpcReadoutElement* detEl,
                     double positionAlongStrip,
                     float time) 
    :
    MuonClusterOnTrack(locpos, locerr, id, positionAlongStrip ), //call base class constructor
    m_rio (RIO),
    m_detEl( detEl ),
    m_time(time)
{
}

74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
// Destructor:
RpcClusterOnTrack::~RpcClusterOnTrack()
{
    // we don't own the m_rio object (it belongs to SG), so don't delete it.
}

// assignment operator:
RpcClusterOnTrack& RpcClusterOnTrack::operator=( const RpcClusterOnTrack& rot)
{
    if ( &rot != this)
    {
        MuonClusterOnTrack::operator=(rot);//base class ass. op.
        m_rio = rot.m_rio;
        m_detEl = rot.m_detEl;
        m_time = rot.m_time;
    }
    return *this;
}

MsgStream& RpcClusterOnTrack::dump( MsgStream&    stream) const
{
  stream << MSG::INFO<<"RpcClusterOnTrack {"<<std::endl;
  stream <<"Time: "<<m_time<<std::endl;
  MuonClusterOnTrack::dump(stream); 

99
  stream<<"}"<<endmsg;
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
  return stream;
}

std::ostream& RpcClusterOnTrack::dump( std::ostream&    stream) const
{
  stream << "RpcClusterOnTrack {"<<std::endl;
  stream <<"Time: "<<m_time<<std::endl;

  MuonClusterOnTrack::dump(stream); 

  stream<<"}"<<std::endl;
  return stream;
}

}