2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 ///@file TauCommonExtraDetails.icc
7 /// Inline function implementations for tau event extra details class
9 ///Package: Reconstruction/TauEvent
11 ///@author Thomas Burgess
13 /// Created by Thomas Burgess on 2008-10-28.
15 /// $Id: TauCommonExtraDetails.icc,v 1.1 2008-11-28 13:31:17 tburgess Exp $
19 template <class stream>
20 void TauCommonExtraDetails::printOn(stream& o) const
22 o << "TauCommonExtraDetails: {"
23 << "sumPtLooseTrk: " << m_sumPtLooseTrk << ";\n"
24 << "sumPtTrk: " << m_sumPtTrk << ";\n"
25 // m_closestEtaTrkVertCell not printed
26 // m_closestPhiTrkVertCell not printed
27 // m_closestEtaTrkCell not printed
28 // m_closestPhiTrkCell not printed
29 << "etaTrkCaloSamp: ";
30 for(std::vector<std::vector<double> >::const_iterator iter
31 = m_etaTrkCaloSamp.begin();
32 iter!=m_etaTrkCaloSamp.end(); ++iter) {
34 std::copy((*iter).begin(),
36 std::ostream_iterator<double>(o," "));
40 << "phiTrkCaloSamp: {";
41 for(std::vector<std::vector<double> >::const_iterator iter
42 = m_phiTrkCaloSamp.begin();
43 iter!=m_phiTrkCaloSamp.end(); ++iter) {
45 std::copy((*iter).begin(),
47 std::ostream_iterator<double>(o," "));
51 for(std::vector<std::vector<double> >::const_iterator iter
52 = m_etaLooseTrkCaloSamp.begin();
53 iter!=m_etaLooseTrkCaloSamp.end(); ++iter) {
55 std::copy((*iter).begin(),
57 std::ostream_iterator<double>(o," "));
61 << "phiLooseTrkCaloSamp: {";
62 for(std::vector<std::vector<double> >::const_iterator iter
63 = m_phiLooseTrkCaloSamp.begin();
64 iter!=m_phiLooseTrkCaloSamp.end(); ++iter) {
66 std::copy((*iter).begin(),
68 std::ostream_iterator<double>(o," "));
72 << "seedCalo_nEMCell: " << m_seedCalo_nEMCell << ";\n"
73 << "seedCalo_stripEt: " << m_seedCalo_stripEt << ";\n"
74 << "seedCalo_EMCentFrac: " << m_seedCalo_EMCentFrac << ";\n"
75 << "seedCalo_sumCellEnergy: " << m_seedCalo_sumCellEnergy << ";\n"
76 << "seedCalo_sumEMCellEnergy: " << m_seedCalo_sumEMCellEnergy << ";"
80 inline bool TauCommonExtraDetails::operator!=(
81 const TauCommonExtraDetails& rhs ) const
83 return !((*this)==rhs);
87 // Common for track and calo seeded tau reconstruction
90 //-------------------------------------------------------------------------
91 // sumPtLooseTrk - sum of p_T for loose tracks
92 //-------------------------------------------------------------------------
95 inline double TauCommonExtraDetails::sumPtLooseTrk() const
97 return m_sumPtLooseTrk;
100 inline void TauCommonExtraDetails::setSumPtLooseTrk(
106 //-------------------------------------------------------------------------
107 // sumPtTrk - sum of p_T for tracks
108 //-------------------------------------------------------------------------
110 inline double TauCommonExtraDetails::sumPtTrk() const
115 inline void TauCommonExtraDetails::setSumPtTrk(
121 //-------------------------------------------------------------------------
122 // closestEtaTrkVertCell
123 //-------------------------------------------------------------------------
125 inline const std::vector<std::vector<ElementLink<CaloCellContainer> > >&
126 TauCommonExtraDetails::closestEtaTrkVertCell() const
128 return m_closestEtaTrkVertCell;
131 inline std::vector<std::vector<ElementLink<CaloCellContainer> > >&
132 TauCommonExtraDetails::closestEtaTrkVertCell()
134 return m_closestEtaTrkVertCell;
137 inline const CaloCell *TauCommonExtraDetails::closestEtaTrkVertCell( int itrk, int num ) const
139 if( m_closestEtaTrkVertCell[itrk][num].isValid() )
140 return *m_closestEtaTrkVertCell[itrk][num];
146 inline void TauCommonExtraDetails::setClosestEtaTrkVertCell(
147 const std::vector<std::vector<ElementLink<CaloCellContainer> > >&
148 closestEtaTrkVertCell)
150 m_closestEtaTrkVertCell = closestEtaTrkVertCell;
153 inline void TauCommonExtraDetails :: setClosestEtaTrkVertCell(
155 const CaloCellContainer *cont, int itrk, int num )
157 m_closestEtaTrkVertCell[itrk][num].toContainedElement( *cont,val );
161 //-------------------------------------------------------------------------
162 // closestPhiTrkVertCell
163 //-------------------------------------------------------------------------
165 inline const std::vector<std::vector<ElementLink<CaloCellContainer> > >&
166 TauCommonExtraDetails::closestPhiTrkVertCell() const
168 return m_closestPhiTrkVertCell;
171 inline std::vector<std::vector<ElementLink<CaloCellContainer> > >&
172 TauCommonExtraDetails::closestPhiTrkVertCell()
174 return m_closestPhiTrkVertCell;
178 inline const CaloCell *TauCommonExtraDetails::closestPhiTrkVertCell( int itrk, int num ) const
180 if( m_closestPhiTrkVertCell[itrk][num].isValid() )
181 return *m_closestPhiTrkVertCell[itrk][num];
186 inline void TauCommonExtraDetails::setClosestPhiTrkVertCell(
187 const std::vector<std::vector<ElementLink<CaloCellContainer> > >& closestPhiTrkVertCell)
189 m_closestPhiTrkVertCell = closestPhiTrkVertCell;
192 inline void TauCommonExtraDetails :: setClosestPhiTrkVertCell( const CaloCell *val,
193 const CaloCellContainer *cont, int itrk, int num )
195 m_closestPhiTrkVertCell[itrk][num].toContainedElement( *cont,val );
201 //-------------------------------------------------------------------------
203 //-------------------------------------------------------------------------
205 inline const std::vector<std::vector<ElementLink<CaloCellContainer> > >&
206 TauCommonExtraDetails::closestEtaTrkCell() const
208 return m_closestEtaTrkCell;
211 inline std::vector<std::vector<ElementLink<CaloCellContainer> > >&
212 TauCommonExtraDetails::closestEtaTrkCell()
214 return m_closestEtaTrkCell;
217 inline const CaloCell *TauCommonExtraDetails::closestEtaTrkCell( int itrk, int num ) const
219 if( m_closestEtaTrkCell[itrk][num].isValid() )
220 return *m_closestEtaTrkCell[itrk][num];
226 inline void TauCommonExtraDetails::setClosestEtaTrkCell(
227 const std::vector<std::vector<ElementLink<CaloCellContainer> > >& closestEtaTrkCell)
229 m_closestEtaTrkCell = closestEtaTrkCell;
232 inline void TauCommonExtraDetails :: setClosestEtaTrkCell( const CaloCell *val,
233 const CaloCellContainer *cont, int itrk, int num )
235 m_closestEtaTrkCell[itrk][num].toContainedElement( *cont,val );
240 //-------------------------------------------------------------------------
242 //-------------------------------------------------------------------------
244 inline const std::vector<std::vector<ElementLink<CaloCellContainer> > >&
245 TauCommonExtraDetails::closestPhiTrkCell() const
247 return m_closestPhiTrkCell;
250 inline std::vector<std::vector<ElementLink<CaloCellContainer> > >&
251 TauCommonExtraDetails::closestPhiTrkCell()
253 return m_closestPhiTrkCell;
256 inline const CaloCell *TauCommonExtraDetails::closestPhiTrkCell( int itrk, int num ) const
258 if( m_closestPhiTrkCell[itrk][num].isValid() )
259 return *m_closestPhiTrkCell[itrk][num];
265 inline void TauCommonExtraDetails::setClosestPhiTrkCell(
266 const std::vector<std::vector<ElementLink<CaloCellContainer> > >& closestPhiTrkCell)
268 m_closestPhiTrkCell = closestPhiTrkCell;
271 inline void TauCommonExtraDetails :: setClosestPhiTrkCell( const CaloCell *val,
272 const CaloCellContainer *cont, int itrk, int num )
274 m_closestPhiTrkCell[itrk][num].toContainedElement( *cont,val );
279 //-------------------------------------------------------------------------
281 //-------------------------------------------------------------------------
283 inline const std::vector<std::vector<double> > &
284 TauCommonExtraDetails::etaTrkCaloSamp() const
286 return m_etaTrkCaloSamp;
289 inline std::vector<std::vector<double> > &
290 TauCommonExtraDetails::etaTrkCaloSamp()
292 return m_etaTrkCaloSamp;
295 inline void TauCommonExtraDetails::setEtaTrkCaloSamp(
296 const std::vector<std::vector<double> > &etaTrkCaloSamp)
298 m_etaTrkCaloSamp = etaTrkCaloSamp;
301 //-------------------------------------------------------------------------
303 //-------------------------------------------------------------------------
305 inline const std::vector<std::vector<double> > &
306 TauCommonExtraDetails::phiTrkCaloSamp() const
308 return m_phiTrkCaloSamp;
311 inline std::vector<std::vector<double> > &
312 TauCommonExtraDetails::phiTrkCaloSamp()
314 return m_phiTrkCaloSamp;
317 inline void TauCommonExtraDetails::setPhiTrkCaloSamp(
318 const std::vector<std::vector<double> > &phiTrkCaloSamp)
320 m_phiTrkCaloSamp = phiTrkCaloSamp;
324 //-------------------------------------------------------------------------
325 // etaLooseTrkCaloSamp
326 //-------------------------------------------------------------------------
328 inline const std::vector<std::vector<double> > &
329 TauCommonExtraDetails::etaLooseTrkCaloSamp() const
331 return m_etaLooseTrkCaloSamp;
334 inline std::vector<std::vector<double> > &
335 TauCommonExtraDetails::etaLooseTrkCaloSamp()
337 return m_etaLooseTrkCaloSamp;
340 inline void TauCommonExtraDetails::setEtaLooseTrkCaloSamp(
341 const std::vector<std::vector<double> > &etaLooseTrkCaloSamp)
343 m_etaLooseTrkCaloSamp = etaLooseTrkCaloSamp;
346 //-------------------------------------------------------------------------
348 //-------------------------------------------------------------------------
350 inline const std::vector<std::vector<double> > &
351 TauCommonExtraDetails::phiLooseTrkCaloSamp() const
353 return m_phiLooseTrkCaloSamp;
356 inline std::vector<std::vector<double> > &
357 TauCommonExtraDetails::phiLooseTrkCaloSamp()
359 return m_phiLooseTrkCaloSamp;
362 inline void TauCommonExtraDetails::setPhiLooseTrkCaloSamp(
363 const std::vector<std::vector<double> > &phiLooseTrkCaloSamp)
365 m_phiLooseTrkCaloSamp = phiLooseTrkCaloSamp;
372 // Applicable for calo seeded tau reconstruction
375 //-------------------------------------------------------------------------
376 // seedCalo_nEMCell - number of EM cells
377 //-------------------------------------------------------------------------
379 inline int TauCommonExtraDetails::seedCalo_nEMCell() const
381 return m_seedCalo_nEMCell;
384 inline void TauCommonExtraDetails::setSeedCalo_nEMCell(
387 m_seedCalo_nEMCell = n;
390 //-------------------------------------------------------------------------
391 // seedCalo_stripEt - sum of ET in strip layer
392 //-------------------------------------------------------------------------
394 inline double TauCommonExtraDetails::seedCalo_stripEt() const
396 return m_seedCalo_stripEt;
399 inline void TauCommonExtraDetails::setSeedCalo_stripEt(
402 m_seedCalo_stripEt = et;
405 //-------------------------------------------------------------------------
406 // seedCalo_EMCentFrac - EM Centrality Fraction
407 //-------------------------------------------------------------------------
409 inline double TauCommonExtraDetails::seedCalo_EMCentFrac() const
411 return m_seedCalo_EMCentFrac;
414 inline void TauCommonExtraDetails::setSeedCalo_EMCentFrac(
417 m_seedCalo_EMCentFrac=fraction;
420 //-------------------------------------------------------------------------
421 // seedCalo_sumCellEnergy - Energy sum
422 //-------------------------------------------------------------------------
424 inline double TauCommonExtraDetails::seedCalo_sumCellEnergy() const
426 return m_seedCalo_sumCellEnergy;
429 inline void TauCommonExtraDetails::setSeedCalo_sumCellEnergy(
432 m_seedCalo_sumCellEnergy = energy;
435 //-------------------------------------------------------------------------
436 // seedCalo_sumEMCellEnergy - EM energy sum
437 //-------------------------------------------------------------------------
439 inline double TauCommonExtraDetails::seedCalo_sumEMCellEnergy() const
441 return m_seedCalo_sumEMCellEnergy;
444 inline void TauCommonExtraDetails::setSeedCalo_sumEMCellEnergy(
447 m_seedCalo_sumEMCellEnergy = energy;