ATLAS Offline Software
Loading...
Searching...
No Matches
tauAnalysisHelperObject.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
17
18
19#ifndef TAUREC_TAUANALYSISHELPEROBJECT_H
20#define TAUREC_TAUANALYSISHELPEROBJECT_H
21
24
25#include "AthLinks/ElementLink.h"
26#include "AthLinks/ElementLinkVector.h"
27
28#include "CaloEvent/CaloCell.h"
30
32
33#include "FourMom/P4EEtaPhiM.h"
34
35#include <vector>
36#include <sys/types.h>
37
46{
47 public:
48 // element links
52
56
59
64
65 int jettype() const { return m_jettype; }
66
68 double decmode() const { return m_decmode; };
69
70
71 // -- set Analysis Helper --
72 void setJettype( const int jettype ) { m_jettype = jettype; }
73 void setDecmode( const int decmode ) { m_decmode = decmode; };
75
76
81
82 double TowEMRadius() const { return m_TowEMRadius; }
83
85 double TowIsoFrac() const { return m_TowET12Frac; }
86
88 double EMRadii( const int idx ) const { return m_emradii[idx]; };
89
91 double HADRadii( const int idx ) const { return m_hadradii[idx]; };
92
93
94 // -- set FastShower Analysis Helper --
95 void setTowEMRadius(const double rad) { m_TowEMRadius = rad; }
96 void setTowIsoFrac(const double frac) { m_TowET12Frac = frac; }
97 void setEMRadii( const int idx, const double rad ) { m_emradii[idx] = rad; };
98 void setHADRadii( const int idx, const double rad ) { m_hadradii[idx] = rad; };
100
101
106
107 double RawImpactParameter( const int track ) const { return m_RawImpactParameter[track]; }
108 double ImpactParameter( const int track ) const { return m_ImpactParameter[track]; }
109 double SignedImpactParameter( const int track ) const { return m_SignedImpactParameter[track]; }
110 double ImpactParameterSignificance( const int track ) const { return m_ImpactParameterSignificance[track]; }
111 double SignedImpactParameterSignificance( const int track ) const { return m_SignedImpactParameterSignificance[track]; }
112
113
114 // -- set Impact Parameter Analysis Helper --
115 void setImpactParameter( const int track, const double ip ) { if ( track < 10 ) m_ImpactParameter[track] = ip; }
116 void setRawImpactParameter( const int track, const double ip ) { if ( track < 10 ) m_RawImpactParameter[track] = ip; }
117 void setSignedImpactParameter( const int track, const double ip ) { if ( track < 10 ) m_SignedImpactParameter[track] = ip; }
118 void setImpactParameterSignificance( const int track, const double ip ) { if ( track < 10 ) m_ImpactParameterSignificance[track] = ip; }
119 void setSignedImpactParameterSignificance( const int track, const double ip ) { if ( track < 10 ) m_SignedImpactParameterSignificance[track] = ip; }
121
122
127
128 double d0prf() { return m_d0prf; };
129
131 double d0iso() { return m_d0iso; };
132
134 double d0isoet() { return m_d0isoet; };
135
137 double d0ettr() { return m_d0ettr; };
138
140 double d0etem() { return m_d0etem; };
141
143 double d0etem2() { return m_d0etem2; };
144
145
147 double d0emclet() { return m_d0emclet; };
148
150 double d0emcleta() { return m_d0emcleta; };
151
153 double d0emclphi() { return m_d0emclphi; };
154
155
157 double d0hadet() { return m_d0hadet; };
158
160 double d0hadeta() { return m_d0hadeta; };
161
163 double d0hadphi() { return m_d0hadphi; };
164
165
167 double d0et05() { return m_d0et05; };
168
170 double d0eta05() { return m_d0eta05; };
171
173 double d0phi05() { return m_d0phi05; };
174
175
177 double d0type() { return m_d0type; };
178
180 double d0deltaR1() { return m_d0deltaR1; };
181
183 double d0eTosumpT() { return m_d0eTosumpT; };
184
185
187 double d0deltaR1had() { return m_d0deltaR1had; };
188
190 double d0em3iso() { return m_d0em3iso; };
191
193 double d0mtrem3() { return m_d0mtrem3; };
194
195
197 double d0deltaR2() { return m_d0deltaR2; };
198
200 double d0ntr1030() { return m_d0ntr1030; };
201
202
204 double d0EM12isof() { return m_d0EM12isof; };
205
207 double d0e1e2otaupT() { return m_d0e1e2otaupT; };
208
210 double d0ettro123() { return m_d0ettro123; };
211
213 double d0ett1oEtiso() { return m_d0ett1oEtiso; };
214
216 double d0ett1oEtisoet() { return m_d0ett1oEtisoet; };
217
219 double d0dalpha() { return m_d0dalpha; }
220
222 double d0e1e2() { return m_d0e1e2; };
223
225 double d0mtau() { return m_d0dalpha*m_d0e1e2; };
226
228 double d0mtr1tr2() { return m_d0mtr1tr2; };
229
231 double d0mtr1tr2tr3() { return m_d0mtr1tr2tr3; };
232
233
235 double d0sumtaupt() { return m_d0sumtaupt; };
236
238 double d0sumnontaupt() { return m_d0sumnontaupt; };
239
241 double d0sumpt() { return m_d0sumpt; };
242
244 I4Momentum* d0tower( int i ) { return new P4EEtaPhiM( m_towere[i], m_towereta[i], m_towerphi[i], 0.0 ); };
245
247 double d0toweret( int i ) { return m_towere[i]/cosh( m_towereta[i] ); };
248
250 int d0nTowers() { return m_towere.size(); };
251 // -- set D0 variables --
252
254 double d0sumtoweret() { double sumet = 0; for ( int i = 0; i < d0nTowers(); i++ ) sumet += d0toweret(i); return sumet; };
255
257 double d0uncaletlayers( int l ) { return m_d0uncaletlayers[l]; };
258
259 void setD0prf( double val ) { m_d0prf = val; };
260 void setD0iso( double val ) { m_d0iso = val; };
261 void setD0isoet( double val ) { m_d0isoet = val; };
262 void setD0ettr( double val ) { m_d0ettr = val; };
263 void setD0etem( double val ) { m_d0etem = val; };
264 void setD0etem2( double val ) { m_d0etem2 = val; };
265
266 void setD0emclet( double val ) { m_d0emclet = val; };
267 void setD0emcleta( double val ) { m_d0emcleta = val; };
268 void setD0emclphi( double val ) { m_d0emclphi = val; };
269
270 void setD0hadet( double val ) { m_d0hadet = val; };
271 void setD0hadeta( double val ) { m_d0hadeta = val; };
272 void setD0hadphi( double val ) { m_d0hadphi = val; };
273
274 void setD0et05( double val ) { m_d0et05 = val; };
275 void setD0eta05( double val ) { m_d0eta05 = val; };
276 void setD0phi05( double val ) { m_d0phi05 = val; };
277
278 void setD0type( double val ) { m_d0type = val; };
279 void setD0deltaR1( double val ) { m_d0deltaR1 = val; };
280 void setD0eTosumpT( double val ) { m_d0eTosumpT = val; };
281
282 void setD0deltaRhad( double val ) { m_d0deltaR1had = val; };
283 void setD0em3iso( double val ) { m_d0em3iso = val; };
284 void setD0mtrem3( double val ) { m_d0mtrem3 = val; };
285
286 void setD0deltaR2( double val ) { m_d0deltaR2 = val; };
287 void setD0ntr1030( double val ) { m_d0ntr1030 = val; };
288
289 void setD0EM12isof( double val ) { m_d0EM12isof = val; };
290 void setD0e1e2otaupT( double val ) { m_d0e1e2otaupT = val; };
291 void setD0ettro123( double val ) { m_d0ettro123 = val; };
292 void setD0ett1oEtiso( double val ) { m_d0ett1oEtiso = val; };
293 void setD0ett1oEtisoet( double val ) { m_d0ett1oEtisoet = val; };
294 void setD0dalpha( double val ) { m_d0dalpha = val; }
295 void setD0e1e2( double val ) { m_d0e1e2 = val; };
296
297 void setD0mtr1tr2( double val ) { m_d0mtr1tr2 = val; };
298 void setD0mtr1tr2tr3( double val ) { m_d0mtr1tr2tr3 = val; };
299
300 void setD0sumtaupt( double val ) { m_d0sumtaupt = val; };
301 void setD0sumnontaupt( double val ) { m_d0sumnontaupt = val; };
302 void setD0sumpt( double val ) { m_d0sumpt = val; };
303
305 m_towere.clear();
306 m_towereta.clear();
307 m_towerphi.clear();
308 }
309 void addD0tower( const double e, const double eta, const double phi ) { m_towere.push_back( e ); m_towereta.push_back( eta ); m_towerphi.push_back( phi ); };
310 void addD0tower( const I4Momentum *mom ) { m_towere.push_back( mom->e() ); m_towereta.push_back( mom->eta() ); m_towerphi.push_back( mom->phi() ); };
311
312 void setD0uncaletlayers( int l, double val ) { m_d0uncaletlayers[l] = val; };
314
315
322 int d0_emcluster_nCells() const { return m_d0_emcluster.size(); }
325
326 const CaloCell* d0_emcluster_cell( uint i) const { return *m_d0_emcluster[i]; }
327
328 // -- add cells to emcluster --
329 void d0_emcluster_addCell(const CaloCellContainer* cellContainer, const CaloCell* theCell) {
330 tauCell_type theLink;
331 theLink.toContainedElement( *cellContainer, static_cast<const CaloCell*> (theCell) );
332 m_d0_emcluster.push_back(theLink);
333 }
334
336
340 int d0_05_nTracks() const { return m_d0_05_Tracks.size(); }
345
346 const Rec::TrackParticle* d0_05_track( uint i) const { return *m_d0_05_Tracks[i]; }
347
348 // -- add Tracks --
349 void d0_05_addTrack(const Rec::TrackParticleContainer* trackContainer, const Rec::TrackParticle* theTrack) {
350 tauTrack_type theLink;
351 theLink.toContainedElement( *trackContainer, static_cast<const Rec::TrackParticle*> (theTrack) );
352 m_d0_05_Tracks.push_back(theLink);
353 }
354
355
360 int d0_tau_nTracks() const { return m_d0_tau_Tracks.size(); }
365
366 const Rec::TrackParticle* d0_tau_track( uint i) const { return *m_d0_tau_Tracks[i]; }
367
368 // -- add Tracks --
369 void d0_tau_addTrack(const Rec::TrackParticleContainer* trackContainer, const Rec::TrackParticle* theTrack) {
370 tauTrack_type theLink;
371 theLink.toContainedElement( *trackContainer, static_cast<const Rec::TrackParticle*>( theTrack) );
372 m_d0_tau_Tracks.push_back(theLink);
373 }
374
375
380 int d0_nontau_nTracks() const { return m_d0_nontau_Tracks.size(); }
385
387
388 // -- add Tracks --
389 void d0_nontau_addTrack(const Rec::TrackParticleContainer* trackContainer, const Rec::TrackParticle* theTrack) {
390 tauTrack_type theLink;
391 theLink.toContainedElement( *trackContainer, static_cast<const Rec::TrackParticle*> (theTrack) );
392 m_d0_nontau_Tracks.push_back(theLink);
393 }
394
395
396 protected:
397 int m_decmode=-1;
398 int m_jettype=-1;
399
400 double m_emradii[6]={0};
401 double m_hadradii[6]={0};
402 double m_TowEMRadius=-1111;
403 double m_TowET12Frac=-1111;
404
405 double m_ImpactParameter[10]={0};
406 double m_RawImpactParameter[10]={0};
410
411 // d0 variables
412 double m_d0prf=-1111;
413 double m_d0iso=-1111;
414 double m_d0isoet=-1111;
415 double m_d0ettr=-1111;
416 double m_d0etem=-1111;
417 double m_d0etem2=-1111;
418 double m_d0emclet=-1111;
419 double m_d0emcleta=-1111;
420 double m_d0emclphi=-1111;
421 double m_d0et05=-1111;
422 double m_d0eta05=-1111;
423 double m_d0phi05=-1111;
424
425 double m_d0hadet=-1111;
426 double m_d0hadeta=-1111;
427 double m_d0hadphi=-1111;
428
429 double m_d0type=-1111;
430 double m_d0deltaR1=-1111;
431 double m_d0eTosumpT=-1111;
432
433 double m_d0deltaR1had=-1111;
434 double m_d0em3iso=-1111;
435 double m_d0mtrem3=-1111;
436
437 double m_d0deltaR2=-1111;
438 double m_d0ntr1030=-1111;
439
440 double m_d0EM12isof=-1111;
441 double m_d0e1e2otaupT=-1111;
442 double m_d0ettro123=-1111;
443 double m_d0ett1oEtiso=-1111;
444 double m_d0ett1oEtisoet=-1111;
445 double m_d0dalpha=-1111;
446 double m_d0e1e2=-1111;
447
448 double m_d0mtr1tr2=-1111;
449 double m_d0mtr1tr2tr3=-1111;
450
451 double m_d0sumtaupt=-1111;
452 double m_d0sumnontaupt=-1111;
453 double m_d0sumpt=-1111;
454
455 std::vector<double> m_towere;
456 std::vector<double> m_towereta;
457 std::vector<double> m_towerphi;
458
459 double m_d0uncaletlayers[25]={0};
460
462
466};
467
468
469#endif
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
unsigned int uint
Container class for CaloCell.
Data object for each calorimeter readout cell.
Definition CaloCell.h:57
ElementLinkVector implementation for standalone ROOT.
ELVIterator< typename RefVector::iterator > iterator
I4Momentum is an abstract base class providing 4-momentum behavior.
Definition I4Momentum.h:31
double d0mtau()
gives the tau mass
double d0prf()
gives the profile prf=(E_T^1+E_T^1)/E_T
double d0deltaR1()
gives Delta R between the 1 track and the calo cluster
double d0toweret(int i)
gives the et of tower i
double d0dalpha()
gives the opening angle between the highest pT track and the corresponding em cluster / sin (theta_cl...
double d0etem2()
gives the calo energy in em2
void setSignedImpactParameterSignificance(const int track, const double ip)
double SignedImpactParameter(const int track) const
double d0ettr()
gives the track isolation ettr=sum(pT of non tau tracks in 0.5)
ElementLinkVector< CaloCellContainer > tauCellColl_type
double d0iso()
gives the isolation iso= (E(0.5)-E(0.3))/E(0.3)
tauAnalysisHelperObject()=default
tauCellColl_iterator d0_emcluste_end()
double d0sumpt()
gives the sum of pt of all tracks
double d0em3iso()
gives fraction in the third layer em3iso=E_T(EM3)^cluster / E_T(EM3)^tot
I4Momentum * d0tower(int i)
gives tower i
void setDecmode(const int decmode)
double d0ettro123()
gives fraction of pT of the not tau tracks (dR<0.5)
double d0ntr1030()
gives number of tracks between 10deg and 30deg of the calo cluster
double d0sumtaupt()
gives the sum of pt of tau tracks
double d0mtr1tr2tr3()
gives the invariant mass of track 1 and track 2 and track 3
double d0sumnontaupt()
gives the sum of pt of non-tau tracks
double d0eta05()
gives the calo eta in dR < 0.5
const Rec::TrackParticle * d0_05_track(uint i) const
void setTowIsoFrac(const double frac)
double d0uncaletlayers(int l)
gives the uncal energy in layers up to 24.
tauTrackColl_type & d0_05_tracks()
void setJettype(const int jettype)
const tauTrackColl_type & d0_tau_tracks() const
double TowEMRadius() const
gives the EMRadius calculated on (pseudo-) triggertower granularity (for comparison with FASTSHOWER)
void setHADRadii(const int idx, const double rad)
double HADRadii(const int idx) const
gives the HADRadius for radius i ( i = 0.1, 0.2, 0.3, 0.4, 0.5, 0.7, 1.0 )
double RawImpactParameter(const int track) const
gives the impact parameter of track track
double d0hadeta()
gives the eta in the had calo only
tauTrackColl_iterator d0_tau_track_end()
double d0emcleta()
gives the eta in the em subcluster only
void setRawImpactParameter(const int track, const double ip)
void setImpactParameter(const int track, const double ip)
tauCellColl_iterator d0_emcluster_begin()
double decmode() const
gives the decaymode of the associated true tau, 1-10 (for numbering convention see ?...
double ImpactParameterSignificance(const int track) const
void d0_emcluster_addCell(const CaloCellContainer *cellContainer, const CaloCell *theCell)
void setEMRadii(const int idx, const double rad)
double d0EM12isof()
gives the ratio of the transverse energy in the first two layers of the calo to the total transv....
double d0hadet()
gives the calo energy in the had calo only
tauCellColl_type & d0_emcluster()
tauTrackColl_iterator d0_tau_track_begin()
const tauTrackColl_type & d0_05_tracks() const
const Rec::TrackParticle * d0_nontau_track(uint i) const
ElementLink< Rec::TrackParticleContainer > tauTrack_type
void d0_nontau_addTrack(const Rec::TrackParticleContainer *trackContainer, const Rec::TrackParticle *theTrack)
void setImpactParameterSignificance(const int track, const double ip)
double EMRadii(const int idx) const
gives the EMRadius for radius i ( i = 0.1, 0.2, 0.3, 0.4, 0.5, 0.7, 1.0 )
int d0nTowers()
gives the number of towers
tauTrackColl_iterator d0_05_track_end()
tauTrackColl_type & d0_nontau_tracks()
double d0mtrem3()
gives mass of the tau tracks and the EM3 subcluster
void addD0tower(const I4Momentum *mom)
void setTowEMRadius(const double rad)
int jettype() const
gives the type of jet, which is the pdgid of the highest pT parton (1-6, 15, 22) from history within ...
double d0hadphi()
gives the phi in the had calo only
double d0e1e2otaupT()
gives root square of em fraction of pT
double d0emclet()
gives the calo energy in the em subcluster only
void setSignedImpactParameter(const int track, const double ip)
const tauTrackColl_type & d0_nontau_tracks() const
tauTrackColl_type & d0_tau_tracks()
double d0sumtoweret()
gives the sum of et of all towers
double d0ett1oEtisoet()
gives pT of track 1 / calo eT (dR < 0.5) = p_T^tautrk/(p_T^tau * iso )
double d0ett1oEtiso()
gives pT of track 1 / calo et (dR < 0.5) = p_T^tautrk/(p_T^tau * isoet )
double d0et05()
gives the calo energy in dR < 0.5
double d0type()
gives the tau type : 1=tau->pi- nu, 2=tau->pi- xpi0 nu, 3=tau->pi- pi+ pi- xpi0 nu
double d0e1e2()
gives sqrt( E_T^tautrk * E_T^em )
double ImpactParameter(const int track) const
void addD0tower(const double e, const double eta, const double phi)
double d0deltaR2()
gives Delta R between the 2 track and the calo cluster
~tauAnalysisHelperObject()=default
void d0_05_addTrack(const Rec::TrackParticleContainer *trackContainer, const Rec::TrackParticle *theTrack)
void setD0uncaletlayers(int l, double val)
double d0etem()
gives the calo energy in em (em0 em1 em2 em3) only
double SignedImpactParameterSignificance(const int track) const
double d0eTosumpT()
gives E_T/sum(p_T)
std::vector< double > m_towereta
const tauCellColl_type & d0_emcluster() const
double d0emclphi()
gives the phi in the em subcluster only
const CaloCell * d0_emcluster_cell(uint i) const
tauTrackColl_iterator d0_nontau_track_end()
double d0mtr1tr2()
gives the invariant mass of track 1 and track 2
std::vector< double > m_towerphi
tauCellColl_type::iterator tauCellColl_iterator
double TowIsoFrac() const
gives the Isolation calculated on (pseudo-) triggertower granularity (for comparison with FASTSHOWER)
double d0deltaR1had()
gives Delta R between the 1 track and the hadronic part of the calo cluster
double d0phi05()
gives the calo phi in dR < 0.5
double d0isoet()
gives the isolation iso= (ET(0.5)-ET(0.3))/ET(0.3)
tauTrackColl_type::iterator tauTrackColl_iterator
tauTrackColl_iterator d0_05_track_begin()
void d0_tau_addTrack(const Rec::TrackParticleContainer *trackContainer, const Rec::TrackParticle *theTrack)
tauTrackColl_iterator d0_nontau_track_begin()
ElementLinkVector< Rec::TrackParticleContainer > tauTrackColl_type
ElementLink< CaloCellContainer > tauCell_type
const Rec::TrackParticle * d0_tau_track(uint i) const