174 std::string calibString =
"";
181 accTauPtCalib( *
this )=
pt;
182 accTauEtaCalib( *
this )=
eta;
183 accTauPhiCalib( *
this )=
phi;
184 accTauMCalib( *
this )=
m;
207 return acc !=
nullptr;
217 if( !
acc )
return -1111.0;
220 return ( *
acc )( *this );
238 std::bitset<32> isTauFlags(
acc( *
this ) );
239 return isTauFlags[
flag];
246 std::bitset<32> isTauFlags(
acc( *
this ) );
247 isTauFlags[
flag] = value;
248 acc( *
this ) = isTauFlags.to_ulong();
258 std::bitset<32> vetoFlags(
acc( *
this ) );
259 vetoFlags[
flag] = value;
260 acc( *
this ) = vetoFlags.to_ulong();
267 std::bitset<32> vetoFlags(
acc( *
this ) );
268 return vetoFlags[
flag];
279 if( !
acc )
return false;
280 if( !
acc->isAvailable( *
this ) )
return false;
283 value = ( *acc )( *this );
293 if( !
acc )
return false;
294 if( !
acc->isAvailable( *
this ) )
return false;
297 value = ( *acc )( *this );
322 if( !
acc )
return false;
323 if( !
acc->isAvailable( *
this ) )
return false;
326 value = ( *acc )( *this );
336 if( !
acc )
return false;
337 if( !
acc->isAvailable( *
this ) )
return false;
340 value = ( *acc )( *this );
390 std::vector<uint8_t>
vec = trackFlags(*
this);
392 while (vec.size() < totalTracks) {
395 for (
unsigned int i = 0 ; i < totalTracks ; i++) {
398 iterTrack = this->
track(i);
406 if (track == iterTrack) {
407 std::bitset<8> thisTracksFlags(
vec[i]);
408 return thisTracksFlags[
flag];
417 std::vector<uint8_t>
vec = trackFlags(*
this);
419 while (vec.size() < totalTracks) {
422 for (
unsigned int i = 0 ; i < totalTracks ; i++) {
425 iterTrack = this->
track(i);
433 if (track == iterTrack) {
434 std::bitset<8> thisTracksFlags(
vec[i]);
435 thisTracksFlags[
flag] = value;
436 vec[i] = thisTracksFlags.to_ulong();
439 trackFlags(*
this) =
vec;
455 const std::vector<float>&
vec=trackEtaStripAcc(*
this);
456 if (
vec.size()<numTrack+1)
459 return vec[numTrack];
465 std::vector<float>&
vec=trackEtaStripAcc(*
this);
466 if (
vec.size()<numTrack+1)
467 vec.resize(numTrack+1);
475 const std::vector<float>&
vec=trackPhiStripAcc(*
this);
476 if (
vec.size()<numTrack+1)
479 return vec[numTrack];
485 std::vector<float>&
vec=trackPhiStripAcc(*
this);
486 if (
vec.size()<numTrack+1)
487 vec.resize(numTrack+1);
502 return ( *wideTrackAcc( *
this )[ i ] );
506 return wideTrackAcc( *this ).size();
511 wideTrackAcc( *this ).push_back( tr );
516 wideTrackAcc( *this ).clear();
529 return ( *otherTrackAcc( *
this )[ i ] );
533 return otherTrackAcc( *this ).size();
538 otherTrackAcc( *this ).push_back( tr );
543 otherTrackAcc( *this ).clear();
556 return ( *jetAcc( *
this ) );
561 if( jetAcc( *this ).isValid() )
562 jetAcc( *this ).
reset();
563 jetAcc( *this ).toContainedElement( *cont,
jet );
577 return ( *vertexAcc( *
this ) );
582 if( vertexAcc( *this ).isValid() )
583 vertexAcc( *this ).reset();
584 vertexAcc( *this ).toContainedElement( *cont,
vertex );
593 setSecondaryVertexLink )
598 return ( *secondaryVertexAcc( *
this ) );
603 if( secondaryVertexAcc( *this ).isValid() )
604 secondaryVertexAcc( *this ).reset();
605 secondaryVertexAcc( *this ).toContainedElement( *cont,
vertex );
616 setHadronicPFOLinks )
623 return ( *hadronicPFOAcc( *
this )[ i ] );
627 return hadronicPFOAcc( *this ).size();
632 hadronicPFOAcc( *this ).push_back( pfo );
637 hadronicPFOAcc( *this ).clear();
652 return ( *shotPFOAcc( *
this )[ i ] );
656 return shotPFOAcc( *this ).size();
661 shotPFOAcc( *this ).push_back( pfo );
666 shotPFOAcc( *this ).clear();
682 return ( *chargedPFOAcc( *
this )[ i ] );
686 return chargedPFOAcc( *this ).size();
691 chargedPFOAcc( *this ).push_back( pfo );
696 chargedPFOAcc( *this ).clear();
713 return ( *neutralPFOAcc( *
this )[ i ] );
717 return neutralPFOAcc( *this ).size();
722 neutralPFOAcc( *this ).push_back( pfo );
727 neutralPFOAcc( *this ).clear();
744 return ( *pi0PFOAcc( *
this )[ i ] );
748 return pi0PFOAcc( *this ).size();
753 pi0PFOAcc( *this ).push_back( pfo );
758 pi0PFOAcc( *this ).clear();
770 protoChargedPFOLinks,
771 setProtoChargedPFOLinks )
778 return ( *protoChargedPFOAcc( *
this )[ i ] );
782 return protoChargedPFOAcc( *this ).size();
787 protoChargedPFOAcc( *this ).push_back( pfo );
792 protoChargedPFOAcc( *this ).clear();
800 protoNeutralPFOLinks,
801 setProtoNeutralPFOLinks )
808 return ( *protoNeutralPFOAcc( *
this )[ i ] );
812 return protoNeutralPFOAcc( *this ).size();
817 protoNeutralPFOAcc( *this ).push_back( pfo );
822 protoNeutralPFOAcc( *this ).clear();
832 setProtoPi0PFOLinks )
839 return ( *protoPi0PFOAcc( *
this )[ i ] );
843 return protoPi0PFOAcc( *this ).size();
848 protoPi0PFOAcc( *this ).push_back( pfo );
853 protoPi0PFOAcc( *this ).clear();
Scalar eta() const
pseudorapidity method
#define AUXSTORE_PRIMITIVE_GETTER_WITH_CAST(CL, PERSTYPE, TRANSTYPE, NAME)
Macro creating a getter function with a type conversion.
#define AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of primitive auxiliary properties.
#define AUXSTORE_OBJECT_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of complex auxiliary properties.
std::vector< size_t > vec
ElementLink implementation for ROOT usage.
Helper class to provide type-safe access to aux data.
TLorentzVector FourMom_t
Definition of the 4-momentum type.
SG::Accessor< T, ALLOC > Accessor
void reset()
Function making sure that the object is ready for persistification.
Class describing a tau jet.
void addOtherTrackLink(const ElementLink< TrackParticleContainer > &tr)
add a track to the tau
void clearHadronicPFOLinks()
Remove all hadronic PFOs from the tau.
double ptDetectorAxis() const
std::vector< ElementLink< xAOD::PFOContainer > > PFOLinks_t
const Vertex * secondaryVertex() const
bool panTauDetail(TauJetParameters::PanTauDetails panTauDetail, int &value) const
Get and set values of pantau details variables via enum.
void addProtoPi0PFOLink(const ElementLink< PFOContainer > &pfo)
add a cellbased_pi0 PFO to the tau
void addHadronicPFOLink(const ElementLink< PFOContainer > &pfo)
add a hadronic PFO to the tau
void setFlag(TauJetParameters::VetoFlags flag, bool value)
Set veto flag.
void addProtoNeutralPFOLink(const ElementLink< PFOContainer > &pfo)
add a cellbased_neutral PFO to the tau
void addShotPFOLink(const ElementLink< PFOContainer > &pfo)
add a shot PFO to the tau
void clearProtoNeutralPFOLinks()
Remove all cellbased_neutral PFOs from the tau.
const PFO * neutralPFO(size_t i) const
Get the pointer to a given neutral PFO associated with this tau.
TauJet_v2()
Default constructor.
const PFO * hadronicPFO(size_t i) const
Get the pointer to a given hadronic PFO associated with this tau.
size_t nProtoPi0PFOs() const
Get the number of cellbased_pi0 PFO particles associated with this tau.
double ptPanTauCellBasedProto() const
void setSecondaryVertex(const xAOD::VertexContainer *cont, const xAOD::Vertex *vertex)
const PFO * protoPi0PFO(size_t i) const
Get the pointer to a given cellbased_pi0 PFO associated with this tau.
double etaTrigCaloOnly() const
const TrackParticle * wideTrack(size_t i) const
Get the pointer to a given track associated with this tau.
void setPanTauDetail(TauJetParameters::PanTauDetails panTauDetail, int value)
double ptTauEtaCalib() const
void addChargedPFOLink(const ElementLink< PFOContainer > &pfo)
add a charged PFO to the tau
virtual double e() const
The total energy of the particle.
double etaPanTauCellBasedProto() const
ElementLink< xAOD::JetContainer > JetLink_t
void clearPi0PFOLinks()
Remove all pi0 PFOs from the tau.
double etaJetSeed() const
void clearProtoChargedPFOLinks()
Remove all cellbased_charged PFOs from the tau.
virtual double eta() const
The pseudorapidity ( ) of the particle.
double etaTauEtaCalib() const
double phiPanTauCellBasedProto() const
const PFO * pi0PFO(size_t i) const
Get the pointer to a given pi0 PFO associated with this tau.
virtual double m() const
The invariant mass of the particle.
const PFO * protoChargedPFO(size_t i) const
Get the pointer to a given cellbased_charged PFO associated with this tau.
const TrackParticle * otherTrack(size_t i) const
Get the pointer to a given track associated with this tau.
double etaDetectorAxis() const
void clearChargedPFOLinks()
Remove all charged PFOs from the tau.
void setDetail(TauJetParameters::Detail detail, int value)
double phiTauEtaCalib() const
virtual FourMom_t p4() const
The full 4-momentum of the particle.
bool flag(TauJetParameters::VetoFlags flag) const
Get veto flag.
double phiTrigCaloOnly() const
size_t nOtherTracks() const
Get the number of track particles associated with this tau.
const TrackParticle * track(size_t i) const
Get the pointer to a given track associated with this tau.
void setDiscriminant(TauJetParameters::TauID discID, double disc)
Set value of discriminant.
double ptTrigCaloOnly() const
double ptIntermediateAxis() const
size_t nPi0PFOs() const
Get the number of pi0 PFO particles associated with this tau.
double etaIntermediateAxis() const
double phiTauEnergyScale() const
double phiPanTauCellBased() const
const PFO * chargedPFO(size_t i) const
Get the pointer to a given charged PFO associated with this tau.
double etaPanTauCellBased() const
float trackEtaStrip(unsigned int numTrack) const
const PFO * protoNeutralPFO(size_t i) const
Get the pointer to a given cellbased_neutral PFO associated with this tau.
void clearTrackLinks()
Remove all tracks from the tau.
bool trackFlag(const TrackParticle *track, TauJetParameters::TauTrackFlag flag) const
double mTrigCaloOnly() const
void clearNeutralPFOLinks()
Remove all neutral PFOs from the tau.
void setJet(const xAOD::JetContainer *cont, const xAOD::Jet *jet)
bool isTau(TauJetParameters::IsTauFlag flag) const
Get Flag for tau acceptance based on predefined arbitrary criteria.
double mPanTauCellBased() const
size_t nProtoNeutralPFOs() const
Get the number of cellbased_neutral PFO particles associated with this tau.
void addProtoChargedPFOLink(const ElementLink< PFOContainer > &pfo)
add a cellbased_charged PFO to the tau
void setTrackEtaStrip(unsigned int numTrack, float eta)
virtual double pt() const
The transverse momentum ( ) of the particle.
double phiJetSeed() const
double discriminant(TauJetParameters::TauID discID) const
Get value of discriminant.
double ptPanTauCellBased() const
virtual double phi() const
The azimuthal angle ( ) of the particle.
size_t nHadronicPFOs() const
Get the number of hadronic PFO particles associated with this tau.
double etaTauEnergyScale() const
bool detail(TauJetParameters::Detail detail, int &value) const
Get and set values of common details variables via enum.
double ptTauEnergyScale() const
double mTauEtaCalib() const
size_t nNeutralPFOs() const
Get the number of neutral PFO particles associated with this tau.
void setVertex(const xAOD::VertexContainer *cont, const xAOD::Vertex *vertex)
void setP4(double pt, double eta, double phi, double m)
Set methods for IParticle values.
bool hasDiscriminant(TauJetParameters::TauID discID) const
Check if class contains requested discriminant.
GenVecFourMom_t genvecP4() const
The full 4-momentum of the particle : internal taus type.
double mIntermediateAxis() const
virtual Type::ObjectType type() const
The type of the object as a simple enumeration.
const Vertex * vertex() const
void setIsTau(TauJetParameters::IsTauFlag flag, bool value)
Set Flag for tau acceptance based on predefined arbitrary criteria.
double phiDetectorAxis() const
void addWideTrackLink(const ElementLink< TrackParticleContainer > &tr)
add a track to the tau
size_t nWideTracks() const
Get the number of track particles associated with this tau.
size_t nShotPFOs() const
Get the number of shot PFO particles associated with this tau.
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > GenVecFourMom_t
Base 4 Momentum type for taus.
double mTauEnergyScale() const
size_t nProtoChargedPFOs() const
Get the number of cellbased_charged PFO particles associated with this tau.
void addTrackLink(const ElementLink< TrackParticleContainer > &tr)
add a track to the tau
double mDetectorAxis() const
double mPanTauCellBasedProto() const
double phiIntermediateAxis() const
float trackPhiStrip(unsigned int numTrack) const
void setTrackFlag(const TrackParticle *track, TauJetParameters::TauTrackFlag flag, bool value)
void clearWideTrackLinks()
Remove all tracks from the tau.
ElementLink< xAOD::VertexContainer > VertexLink_t
void addNeutralPFOLink(const ElementLink< PFOContainer > &pfo)
add a neutral PFO to the tau
void addPi0PFOLink(const ElementLink< PFOContainer > &pfo)
add a pi0 PFO to the tau
size_t nChargedPFOs() const
Get the number of charged PFO particles associated with this tau.
void clearShotPFOLinks()
Remove all shot PFOs from the tau.
void setTrackPhiStrip(unsigned int numTrack, float phi)
const PFO * shotPFO(size_t i) const
Get the pointer to a given shot PFO associated with this tau.
void clearOtherTrackLinks()
Remove all tracks from the tau.
void clearProtoPi0PFOLinks()
Remove all cellbased_pi0 PFOs from the tau.
virtual double rapidity() const
The true rapidity (y) of the particle.
std::vector< ElementLink< xAOD::TrackParticleContainer > > TrackParticleLinks_t
TauTrackFlag
Enum for tau track flags.
TauCalibType
Enum for tau calib type.
Detail
Enum for tau parameters - used mainly for backward compatibility with the analysis code.
@ numTopoClusters
get number of topocluster constituents of jet associated to tau candidate
PanTauDetails
Enum for tau details (scalar) calculated by pantau.
VetoFlags
Enum for Veto flags.
TauID
Enum for discriminants.
IsTauFlag
Enum for IsTau flags.
const SG::Accessor< int > * detailsAccessorV2< int >(xAOD::TauJetParameters::Detail detail)
const SG::Accessor< int > * panTauDetailsAccessorV2< int >(xAOD::TauJetParameters::PanTauDetails detail)
const SG::Accessor< float > * discriminantAccessorV2(xAOD::TauJetParameters::TauID discriminant)
Helper function for managing accessors to id input and output variables defined as enums in TauDefs....
const SG::Accessor< float > * panTauDetailsAccessorV2< float >(xAOD::TauJetParameters::PanTauDetails detail)
const SG::Accessor< float > * detailsAccessorV2< float >(xAOD::TauJetParameters::Detail detail)
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Jet_v1 Jet
Definition of the current "jet version".
setStrategy setMatchFlag ElementLink< TrackParticleContainer >
static const SG::AuxElement::Accessor< Vertex_v1::TrackParticleLinks_t > trackAcc("trackParticleLinks")
Accessor for the track links.
setRcore setEtHad setFside pt
TrackParticle_v1 TrackParticle
Reference the current persistent version:
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Vertex_v1 Vertex
Define the latest version of the vertex class.
setBGCode setTAP setLVL2ErrorBits bool
static const SG::AuxElement::Accessor< ElementLink< IParticleContainer > > acc("originalObjectLink")
Object used for setting/getting the dynamic decoration in question.
JetContainer_v1 JetContainer
Definition of the current "jet container version".
bool getValue(TauJetParameters::TauCalibType type, std::string &stringName)