ATLAS Offline Software
Loading...
Searching...
No Matches
TauPi0Details.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// implementation of TauPi0Details
6
11
12using namespace CLHEP;
13
14namespace Analysis {
15
16 // default constructor
18 TauDetails(),
20 m_visTau_hlv(HepLorentzVector(0.,0.,0.,0.))
21 {
22 }
23
24 // copy constructor
26 TauDetails(),
28 {
29 std::vector<Analysis::TauPi0Candidate*>::const_iterator candIt = rhs.m_pi0CandContainer.begin();
30 std::vector<Analysis::TauPi0Candidate*>::const_iterator candItEnd = rhs.m_pi0CandContainer.end();
31 // create new copies and take ownership
32 for (; candIt!=candItEnd; ++candIt) m_pi0CandContainer.push_back( new TauPi0Candidate( *(*candIt) ) );
33
34 // Same for TauPi0Clusters
35 std::vector<Analysis::TauPi0Cluster*>::const_iterator clusIt = rhs.m_pi0ClusContainer.begin();
36 std::vector<Analysis::TauPi0Cluster*>::const_iterator clusItEnd = rhs.m_pi0ClusContainer.end();
37 // create new copies and take ownership
38 for (; clusIt!=clusItEnd; ++clusIt) m_pi0ClusContainer.push_back( new TauPi0Cluster( *(*clusIt) ) );
39
40 // Same for TauShots
41 std::vector<Analysis::TauShot*>::const_iterator shotIt = rhs.m_shotContainer.begin();
42 std::vector<Analysis::TauShot*>::const_iterator shotItEnd = rhs.m_shotContainer.end();
43 // create new copies and take ownership
44 for (; shotIt!=shotItEnd; ++shotIt) m_shotContainer.push_back( new TauShot( *(*shotIt) ) );
45
47 }
48
49 // Assignment operator
51 {
52 if (this!=&rhs) {
53 std::vector<Analysis::TauPi0Candidate*>::const_iterator candIt = m_pi0CandContainer.begin();
54 std::vector<Analysis::TauPi0Candidate*>::const_iterator candItEnd = m_pi0CandContainer.end();
55 // delete existing objects
56 for (; candIt!=candItEnd; ++candIt) delete (*candIt);
57 candIt = rhs.m_pi0CandContainer.begin();
58 candItEnd = rhs.m_pi0CandContainer.end();
59 // create new copies and take ownership
60 for (; candIt!=candItEnd; ++candIt) m_pi0CandContainer.push_back( new TauPi0Candidate( *(*candIt) ) );
61
62 // Same for TauPi0Clusters
63 std::vector<Analysis::TauPi0Cluster*>::const_iterator clusIt = m_pi0ClusContainer.begin();
64 std::vector<Analysis::TauPi0Cluster*>::const_iterator clusItEnd = m_pi0ClusContainer.end();
65 // delete existing objects
66 for (; clusIt!=clusItEnd; ++clusIt) delete (*clusIt);
67 clusIt = rhs.m_pi0ClusContainer.begin();
68 clusItEnd = rhs.m_pi0ClusContainer.end();
69 // create new copies and take ownership
70 for (; clusIt!=clusItEnd; ++clusIt) m_pi0ClusContainer.push_back( new TauPi0Cluster( *(*clusIt) ) );
71
72 // Same for TauShots
73 std::vector<Analysis::TauShot*>::const_iterator shotIt = m_shotContainer.begin();
74 std::vector<Analysis::TauShot*>::const_iterator shotItEnd = m_shotContainer.end();
75 // delete existing objects
76 for (; shotIt!=shotItEnd; ++shotIt) delete (*shotIt);
77 shotIt = rhs.m_shotContainer.begin();
78 shotItEnd = rhs.m_shotContainer.end();
79 // create new copies and take ownership
80 for (; shotIt!=shotItEnd; ++shotIt) m_shotContainer.push_back( new TauShot( *(*shotIt) ) );
81
83 }
84 return *this;
85 }
86
87 // destructor
89 {
90 std::vector<Analysis::TauPi0Candidate*>::const_iterator candIt = m_pi0CandContainer.begin();
91 std::vector<Analysis::TauPi0Candidate*>::const_iterator candItEnd = m_pi0CandContainer.end();
92 // delete existing objects
93 for (; candIt!=candItEnd; ++candIt) delete (*candIt);
94
95 // Same for TauPi0Clusters
96 std::vector<Analysis::TauPi0Cluster*>::const_iterator clusIt = m_pi0ClusContainer.begin();
97 std::vector<Analysis::TauPi0Cluster*>::const_iterator clusItEnd = m_pi0ClusContainer.end();
98 // delete existing objects
99 for (; clusIt!=clusItEnd; ++clusIt) delete (*clusIt);
100
101 // Same for TauShots
102 std::vector<Analysis::TauShot*>::const_iterator shotIt = m_shotContainer.begin();
103 std::vector<Analysis::TauShot*>::const_iterator shotItEnd = m_shotContainer.end();
104 // delete existing objects
105 for (; shotIt!=shotItEnd; ++shotIt) delete (*shotIt);
106
107 }
108
109 //Class name
111
112 const std::string& TauPi0Details::className() const
113 {
114 return s_className;
115 }
116
117} //end of namespace Analysis
An interface for getting the name of a class as a string.
TauDetails()
Default constructor.
virtual ~TauPi0Details()
destructor (virtual)
std::vector< TauPi0Cluster * > m_pi0ClusContainer
std::vector< TauPi0Candidate * > m_pi0CandContainer
TauPi0Details & operator=(const TauPi0Details &rhs)
Assignment operator.
TauPi0Details()
default constructor
CLHEP::HepLorentzVector m_visTau_hlv
static const std::string s_className
std::vector< TauShot * > m_shotContainer
virtual const std::string & className() const
Get name of class.
static std::string name()
Return the name of class T as a string.
The namespace of all packages in PhysicsAnalysis/JetTagging.