ATLAS Offline Software
TauCommonExtraDetails.icc
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 ///@file TauCommonExtraDetails.icc
6 ///
7 /// Inline function implementations for tau event extra details class
8 ///
9 ///Package: Reconstruction/TauEvent
10 ///
11 ///@author Thomas Burgess
12 ///
13 /// Created by Thomas Burgess on 2008-10-28.
14 ///
15 /// $Id: TauCommonExtraDetails.icc,v 1.1 2008-11-28 13:31:17 tburgess Exp $
16 
17 namespace Analysis{
18 
19  template <class stream>
20  void TauCommonExtraDetails::printOn(stream& o) const
21  {
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) {
33  o << "{";
34  std::copy((*iter).begin(),
35  (*iter).end(),
36  std::ostream_iterator<double>(o," "));
37  o << "}";
38  }
39  o << "};\n"
40  << "phiTrkCaloSamp: {";
41  for(std::vector<std::vector<double> >::const_iterator iter
42  = m_phiTrkCaloSamp.begin();
43  iter!=m_phiTrkCaloSamp.end(); ++iter) {
44  o << "{";
45  std::copy((*iter).begin(),
46  (*iter).end(),
47  std::ostream_iterator<double>(o," "));
48  o << "}";
49  }
50  o << "};\n";
51  for(std::vector<std::vector<double> >::const_iterator iter
52  = m_etaLooseTrkCaloSamp.begin();
53  iter!=m_etaLooseTrkCaloSamp.end(); ++iter) {
54  o << "{";
55  std::copy((*iter).begin(),
56  (*iter).end(),
57  std::ostream_iterator<double>(o," "));
58  o << "}";
59  }
60  o << "};\n"
61  << "phiLooseTrkCaloSamp: {";
62  for(std::vector<std::vector<double> >::const_iterator iter
63  = m_phiLooseTrkCaloSamp.begin();
64  iter!=m_phiLooseTrkCaloSamp.end(); ++iter) {
65  o << "{";
66  std::copy((*iter).begin(),
67  (*iter).end(),
68  std::ostream_iterator<double>(o," "));
69  o << "}";
70  }
71  o << "};\n"
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 << ";"
77  << "};";
78  }
79 
80  inline bool TauCommonExtraDetails::operator!=(
81  const TauCommonExtraDetails& rhs ) const
82  {
83  return !((*this)==rhs);
84  }
85 
86  //
87  // Common for track and calo seeded tau reconstruction
88  //
89 
90  //-------------------------------------------------------------------------
91  // sumPtLooseTrk - sum of p_T for loose tracks
92  //-------------------------------------------------------------------------
93 
94 
95  inline double TauCommonExtraDetails::sumPtLooseTrk() const
96  {
97  return m_sumPtLooseTrk;
98  }
99 
100  inline void TauCommonExtraDetails::setSumPtLooseTrk(
101  double pt)
102  {
103  m_sumPtLooseTrk=pt;
104  }
105 
106  //-------------------------------------------------------------------------
107  // sumPtTrk - sum of p_T for tracks
108  //-------------------------------------------------------------------------
109 
110  inline double TauCommonExtraDetails::sumPtTrk() const
111  {
112  return m_sumPtTrk;
113  }
114 
115  inline void TauCommonExtraDetails::setSumPtTrk(
116  double pt)
117  {
118  m_sumPtTrk = pt;
119  }
120 
121  //-------------------------------------------------------------------------
122  // closestEtaTrkVertCell
123  //-------------------------------------------------------------------------
124 
125  inline const std::vector<std::vector<ElementLink<CaloCellContainer> > >&
126  TauCommonExtraDetails::closestEtaTrkVertCell() const
127  {
128  return m_closestEtaTrkVertCell;
129  }
130 
131  inline std::vector<std::vector<ElementLink<CaloCellContainer> > >&
132  TauCommonExtraDetails::closestEtaTrkVertCell()
133  {
134  return m_closestEtaTrkVertCell;
135  }
136 
137  inline const CaloCell *TauCommonExtraDetails::closestEtaTrkVertCell( int itrk, int num ) const
138  {
139  if( m_closestEtaTrkVertCell[itrk][num].isValid() )
140  return *m_closestEtaTrkVertCell[itrk][num];
141  else
142  return 0;
143  }
144 
145 
146  inline void TauCommonExtraDetails::setClosestEtaTrkVertCell(
147  const std::vector<std::vector<ElementLink<CaloCellContainer> > >&
148  closestEtaTrkVertCell)
149  {
150  m_closestEtaTrkVertCell = closestEtaTrkVertCell;
151  }
152 
153  inline void TauCommonExtraDetails :: setClosestEtaTrkVertCell(
154  const CaloCell *val,
155  const CaloCellContainer *cont, int itrk, int num )
156  {
157  m_closestEtaTrkVertCell[itrk][num].toContainedElement( *cont,val );
158  }
159 
160 
161  //-------------------------------------------------------------------------
162  // closestPhiTrkVertCell
163  //-------------------------------------------------------------------------
164 
165  inline const std::vector<std::vector<ElementLink<CaloCellContainer> > >&
166  TauCommonExtraDetails::closestPhiTrkVertCell() const
167  {
168  return m_closestPhiTrkVertCell;
169  }
170 
171  inline std::vector<std::vector<ElementLink<CaloCellContainer> > >&
172  TauCommonExtraDetails::closestPhiTrkVertCell()
173  {
174  return m_closestPhiTrkVertCell;
175  }
176 
177 
178  inline const CaloCell *TauCommonExtraDetails::closestPhiTrkVertCell( int itrk, int num ) const
179  {
180  if( m_closestPhiTrkVertCell[itrk][num].isValid() )
181  return *m_closestPhiTrkVertCell[itrk][num];
182  else
183  return 0;
184  }
185 
186  inline void TauCommonExtraDetails::setClosestPhiTrkVertCell(
187  const std::vector<std::vector<ElementLink<CaloCellContainer> > >& closestPhiTrkVertCell)
188  {
189  m_closestPhiTrkVertCell = closestPhiTrkVertCell;
190  }
191 
192  inline void TauCommonExtraDetails :: setClosestPhiTrkVertCell( const CaloCell *val,
193  const CaloCellContainer *cont, int itrk, int num )
194  {
195  m_closestPhiTrkVertCell[itrk][num].toContainedElement( *cont,val );
196  }
197 
198 
199 
200 
201  //-------------------------------------------------------------------------
202  // closestEtaTrkCell
203  //-------------------------------------------------------------------------
204 
205  inline const std::vector<std::vector<ElementLink<CaloCellContainer> > >&
206  TauCommonExtraDetails::closestEtaTrkCell() const
207  {
208  return m_closestEtaTrkCell;
209  }
210 
211  inline std::vector<std::vector<ElementLink<CaloCellContainer> > >&
212  TauCommonExtraDetails::closestEtaTrkCell()
213  {
214  return m_closestEtaTrkCell;
215  }
216 
217  inline const CaloCell *TauCommonExtraDetails::closestEtaTrkCell( int itrk, int num ) const
218  {
219  if( m_closestEtaTrkCell[itrk][num].isValid() )
220  return *m_closestEtaTrkCell[itrk][num];
221  else
222  return 0;
223  }
224 
225 
226  inline void TauCommonExtraDetails::setClosestEtaTrkCell(
227  const std::vector<std::vector<ElementLink<CaloCellContainer> > >& closestEtaTrkCell)
228  {
229  m_closestEtaTrkCell = closestEtaTrkCell;
230  }
231 
232  inline void TauCommonExtraDetails :: setClosestEtaTrkCell( const CaloCell *val,
233  const CaloCellContainer *cont, int itrk, int num )
234  {
235  m_closestEtaTrkCell[itrk][num].toContainedElement( *cont,val );
236  }
237 
238 
239 
240  //-------------------------------------------------------------------------
241  // closestPhiTrkCell
242  //-------------------------------------------------------------------------
243 
244  inline const std::vector<std::vector<ElementLink<CaloCellContainer> > >&
245  TauCommonExtraDetails::closestPhiTrkCell() const
246  {
247  return m_closestPhiTrkCell;
248  }
249 
250  inline std::vector<std::vector<ElementLink<CaloCellContainer> > >&
251  TauCommonExtraDetails::closestPhiTrkCell()
252  {
253  return m_closestPhiTrkCell;
254  }
255 
256  inline const CaloCell *TauCommonExtraDetails::closestPhiTrkCell( int itrk, int num ) const
257  {
258  if( m_closestPhiTrkCell[itrk][num].isValid() )
259  return *m_closestPhiTrkCell[itrk][num];
260  else
261  return 0;
262  }
263 
264 
265  inline void TauCommonExtraDetails::setClosestPhiTrkCell(
266  const std::vector<std::vector<ElementLink<CaloCellContainer> > >& closestPhiTrkCell)
267  {
268  m_closestPhiTrkCell = closestPhiTrkCell;
269  }
270 
271  inline void TauCommonExtraDetails :: setClosestPhiTrkCell( const CaloCell *val,
272  const CaloCellContainer *cont, int itrk, int num )
273  {
274  m_closestPhiTrkCell[itrk][num].toContainedElement( *cont,val );
275  }
276 
277 
278 
279  //-------------------------------------------------------------------------
280  // etaTrkCaloSamp
281  //-------------------------------------------------------------------------
282 
283  inline const std::vector<std::vector<double> > &
284  TauCommonExtraDetails::etaTrkCaloSamp() const
285  {
286  return m_etaTrkCaloSamp;
287  }
288 
289  inline std::vector<std::vector<double> > &
290  TauCommonExtraDetails::etaTrkCaloSamp()
291  {
292  return m_etaTrkCaloSamp;
293  }
294 
295  inline void TauCommonExtraDetails::setEtaTrkCaloSamp(
296  const std::vector<std::vector<double> > &etaTrkCaloSamp)
297  {
298  m_etaTrkCaloSamp = etaTrkCaloSamp;
299  }
300 
301  //-------------------------------------------------------------------------
302  // phiTrkCaloSamp
303  //-------------------------------------------------------------------------
304 
305  inline const std::vector<std::vector<double> > &
306  TauCommonExtraDetails::phiTrkCaloSamp() const
307  {
308  return m_phiTrkCaloSamp;
309  }
310 
311  inline std::vector<std::vector<double> > &
312  TauCommonExtraDetails::phiTrkCaloSamp()
313  {
314  return m_phiTrkCaloSamp;
315  }
316 
317  inline void TauCommonExtraDetails::setPhiTrkCaloSamp(
318  const std::vector<std::vector<double> > &phiTrkCaloSamp)
319  {
320  m_phiTrkCaloSamp = phiTrkCaloSamp;
321  }
322 
323 
324  //-------------------------------------------------------------------------
325  // etaLooseTrkCaloSamp
326  //-------------------------------------------------------------------------
327 
328  inline const std::vector<std::vector<double> > &
329  TauCommonExtraDetails::etaLooseTrkCaloSamp() const
330  {
331  return m_etaLooseTrkCaloSamp;
332  }
333 
334  inline std::vector<std::vector<double> > &
335  TauCommonExtraDetails::etaLooseTrkCaloSamp()
336  {
337  return m_etaLooseTrkCaloSamp;
338  }
339 
340  inline void TauCommonExtraDetails::setEtaLooseTrkCaloSamp(
341  const std::vector<std::vector<double> > &etaLooseTrkCaloSamp)
342  {
343  m_etaLooseTrkCaloSamp = etaLooseTrkCaloSamp;
344  }
345 
346  //-------------------------------------------------------------------------
347  // phiTrkCaloSamp
348  //-------------------------------------------------------------------------
349 
350  inline const std::vector<std::vector<double> > &
351  TauCommonExtraDetails::phiLooseTrkCaloSamp() const
352  {
353  return m_phiLooseTrkCaloSamp;
354  }
355 
356  inline std::vector<std::vector<double> > &
357  TauCommonExtraDetails::phiLooseTrkCaloSamp()
358  {
359  return m_phiLooseTrkCaloSamp;
360  }
361 
362  inline void TauCommonExtraDetails::setPhiLooseTrkCaloSamp(
363  const std::vector<std::vector<double> > &phiLooseTrkCaloSamp)
364  {
365  m_phiLooseTrkCaloSamp = phiLooseTrkCaloSamp;
366  }
367 
368 
369 
370 
371  //
372  // Applicable for calo seeded tau reconstruction
373  //
374 
375  //-------------------------------------------------------------------------
376  // seedCalo_nEMCell - number of EM cells
377  //-------------------------------------------------------------------------
378 
379  inline int TauCommonExtraDetails::seedCalo_nEMCell() const
380  {
381  return m_seedCalo_nEMCell;
382  }
383 
384  inline void TauCommonExtraDetails::setSeedCalo_nEMCell(
385  int n)
386  {
387  m_seedCalo_nEMCell = n;
388  }
389 
390  //-------------------------------------------------------------------------
391  // seedCalo_stripEt - sum of ET in strip layer
392  //-------------------------------------------------------------------------
393 
394  inline double TauCommonExtraDetails::seedCalo_stripEt() const
395  {
396  return m_seedCalo_stripEt;
397  }
398 
399  inline void TauCommonExtraDetails::setSeedCalo_stripEt(
400  double et)
401  {
402  m_seedCalo_stripEt = et;
403  }
404 
405  //-------------------------------------------------------------------------
406  // seedCalo_EMCentFrac - EM Centrality Fraction
407  //-------------------------------------------------------------------------
408 
409  inline double TauCommonExtraDetails::seedCalo_EMCentFrac() const
410  {
411  return m_seedCalo_EMCentFrac;
412  }
413 
414  inline void TauCommonExtraDetails::setSeedCalo_EMCentFrac(
415  double fraction)
416  {
417  m_seedCalo_EMCentFrac=fraction;
418  }
419 
420  //-------------------------------------------------------------------------
421  // seedCalo_sumCellEnergy - Energy sum
422  //-------------------------------------------------------------------------
423 
424  inline double TauCommonExtraDetails::seedCalo_sumCellEnergy() const
425  {
426  return m_seedCalo_sumCellEnergy;
427  }
428 
429  inline void TauCommonExtraDetails::setSeedCalo_sumCellEnergy(
430  double energy)
431  {
432  m_seedCalo_sumCellEnergy = energy;
433  }
434 
435  //-------------------------------------------------------------------------
436  // seedCalo_sumEMCellEnergy - EM energy sum
437  //-------------------------------------------------------------------------
438 
439  inline double TauCommonExtraDetails::seedCalo_sumEMCellEnergy() const
440  {
441  return m_seedCalo_sumEMCellEnergy;
442  }
443 
444  inline void TauCommonExtraDetails::setSeedCalo_sumEMCellEnergy(
445  double energy)
446  {
447  m_seedCalo_sumEMCellEnergy = energy;
448  }
449 
450 }