ATLAS Offline Software
TauJetContainer_p1_old_cnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 
9  const TauJetContainer_p1_old* oldobj)
10 {
11  newobj->clear();
12  size_t n = oldobj->m_momenta.size();
13  newobj->resize (n);
14  for (size_t i = 0; i < n; i++)
15  {
16  TauJet_p1& tau = (*newobj)[i];
17  tau.m_momentum = oldobj->m_momenta[i];
18  tau.m_particleBase = oldobj->m_particles[i];
19  tau.m_cluster = oldobj->m_clusters[i];
20  tau.m_tracks = oldobj->m_tracks[i];
21  //tau.m_cellCluster = XXX;
22  //tau.m_tauDetails = xxx;
23 
24  tau.m_flags |= 1;
25  tau.m_vetoFlags = 0;
26 
27  typedef std::pair<int, double> ppair;
28  const std::vector<double>& pold = oldobj->m_parameters[i];
29  std::vector<ppair>& pnew = tau.m_params;
30  if (oldobj->m_authors[i] == TauJetParameters::tauRec) {
31  tau.m_flags |= 0x04;
32  pnew.push_back(ppair(TauJetParameters::etHadCalib, pold[ 0]));
33  pnew.push_back(ppair(TauJetParameters::etEMCalib, pold[ 1]));
34  pnew.push_back(ppair(TauJetParameters::emRadius, pold[ 2]));
35  pnew.push_back(ppair(TauJetParameters::isolationFraction, pold[ 3]));
36  pnew.push_back(ppair(TauJetParameters::centralityFraction, pold[ 4]));
37  pnew.push_back(ppair(TauJetParameters::stripWidth2, pold[ 5]));
38  pnew.push_back(ppair(TauJetParameters::nStripCells, pold[ 6]));
39  pnew.push_back(ppair(TauJetParameters::logLikelihoodRatio, pold[ 7]));
40  pnew.push_back(ppair(TauJetParameters::lowPtTauJetDiscriminant,pold[8]));
41  pnew.push_back(ppair(TauJetParameters::lowPtTauEleDiscriminant,pold[9]));
42  pnew.push_back(ppair(TauJetParameters::tauJetNeuralnetwork, pold[10]));
43  pnew.push_back(ppair(TauJetParameters::tauENeuralNetwork, pold[11]));
44 
45  }
46  else if (oldobj->m_authors[i] == TauJetParameters::tau1P3P) {
47  tau.m_flags |= 0x08;
48  const std::vector<double>& pold = oldobj->m_parameters[i];
49  pnew.push_back(ppair(TauJetParameters::etHadCalib, pold[ 0] ));
50  pnew.push_back(ppair(TauJetParameters::etEMCalib, pold[ 1] ));
51  pnew.push_back(ppair(TauJetParameters::emRadius, pold[ 2] ));
52  pnew.push_back(ppair(TauJetParameters::isolationFraction, pold[ 3] ));
53  pnew.push_back(ppair(TauJetParameters::centralityFraction, pold[ 4] ));
54  pnew.push_back(ppair(TauJetParameters::stripWidth2, pold[ 5] ));
55  pnew.push_back(ppair(TauJetParameters::nStripCells, pold[ 6] ));
56  pnew.push_back(ppair(TauJetParameters::logLikelihoodRatio, pold[ 7] ));
57  pnew.push_back(ppair(TauJetParameters::annularIsolationFraction,pold[8]));
58  pnew.push_back(ppair(TauJetParameters::etCaloAtEMScale, pold[ 9] ));
59  pnew.push_back(ppair(TauJetParameters::etChargedHadCells, pold[10] ));
60  pnew.push_back(ppair(TauJetParameters::etOtherEMCells, pold[11] ));
61  pnew.push_back(ppair(TauJetParameters::etOtherHadCells, pold[12] ));
62  pnew.push_back(ppair(TauJetParameters::discriminant, pold[13] ));
63  }
64  }
65 }
66 
TauJetParameters::lowPtTauEleDiscriminant
@ lowPtTauEleDiscriminant
Definition: TauJetParameters.h:157
TauJetParameters::tau1P3P
@ tau1P3P
Definition: TauJetParameters.h:36
TauJetContainer_p1
Definition: TauJetContainer_p1.h:19
TauJetParameters::etOtherEMCells
@ etOtherEMCells
Definition: TauJetParameters.h:164
TauJet_p1::m_particleBase
ParticleBase_p1 m_particleBase
Definition: TauJet_p1.h:38
TauJetParameters::etEMCalib
@ etEMCalib
Definition: TauJetParameters.h:148
TauJetParameters::annularIsolationFraction
@ annularIsolationFraction
Definition: TauJetParameters.h:161
TauJetParameters::lowPtTauJetDiscriminant
@ lowPtTauJetDiscriminant
Definition: TauJetParameters.h:156
TauJetParameters::etCaloAtEMScale
@ etCaloAtEMScale
Definition: TauJetParameters.h:162
TauJet_p1::m_cluster
ElementLinkInt_p1 m_cluster
Definition: TauJet_p1.h:39
TauJetParameters::centralityFraction
@ centralityFraction
Definition: TauJetParameters.h:151
TauJetParameters::isolationFraction
@ isolationFraction
Definition: TauJetParameters.h:150
TauJetContainer_p1_old::m_authors
std::vector< unsigned int > m_authors
authors
Definition: TauJetContainer_p1_old.h:80
TauJetParameters::tauRec
@ tauRec
Definition: TauJetParameters.h:35
TauJetParameters.h
TauJetContainer_p1_old
Definition: TauJetContainer_p1_old.h:32
lumiFormat.i
int i
Definition: lumiFormat.py:85
beamspotman.n
n
Definition: beamspotman.py:731
TauJet_p1::m_momentum
P4EEtaPhiM_p1 m_momentum
Definition: TauJet_p1.h:37
TauJet_p1::m_flags
unsigned char m_flags
Definition: TauJet_p1.h:44
TauJetContainer_p1_old::m_tracks
std::vector< ElementLinkIntVector_p1 > m_tracks
links to tracks
Definition: TauJetContainer_p1_old.h:68
TauJet_p1
Definition: TauJet_p1.h:24
TauJetParameters::etHadCalib
@ etHadCalib
Definition: TauJetParameters.h:147
TauJetContainer_p1_old::m_parameters
std::vector< std::vector< double > > m_parameters
TauJet parameters.
Definition: TauJetContainer_p1_old.h:77
TauJetContainer_p1_old::m_momenta
std::vector< P4EEtaPhiM_p1 > m_momenta
the 4-mom part
Definition: TauJetContainer_p1_old.h:57
TauJetParameters::emRadius
@ emRadius
Definition: TauJetParameters.h:149
TauJetContainer_p1_old::m_particles
std::vector< ParticleBase_p1 > m_particles
the ParticleBase part
Definition: TauJetContainer_p1_old.h:60
TauJetParameters::stripWidth2
@ stripWidth2
Definition: TauJetParameters.h:152
TauJetParameters::tauENeuralNetwork
@ tauENeuralNetwork
Definition: TauJetParameters.h:159
TauJetParameters::discriminant
@ discriminant
Definition: TauJetParameters.h:166
TauJetContainer_p1_old_cnv.h
TauJet_p1::m_vetoFlags
unsigned long m_vetoFlags
Definition: TauJet_p1.h:48
TauJetParameters::tauJetNeuralnetwork
@ tauJetNeuralnetwork
Definition: TauJetParameters.h:158
TauJetContainer_p1_old_cnv::Convert
virtual void Convert(TauJetContainer_p1 *newobj, const TauJetContainer_p1_old *oldobj)
Do the conversion.
Definition: TauJetContainer_p1_old_cnv.cxx:8
TauJetParameters::etChargedHadCells
@ etChargedHadCells
Definition: TauJetParameters.h:163
TauJetParameters::nStripCells
@ nStripCells
Definition: TauJetParameters.h:153
TauJetParameters::etOtherHadCells
@ etOtherHadCells
Definition: TauJetParameters.h:165
TauJetContainer_p1_old::m_clusters
std::vector< ElementLinkInt_p1 > m_clusters
links to clusters
Definition: TauJetContainer_p1_old.h:65
TauJet_p1::m_params
std ::vector< std ::pair< int, double > > m_params
Definition: TauJet_p1.h:51
TauJet_p1::m_tracks
ElementLinkIntVector_p1 m_tracks
Definition: TauJet_p1.h:42
TauJetParameters::logLikelihoodRatio
@ logLikelihoodRatio
Definition: TauJetParameters.h:155