184 std::string calibString =
"";
191 accTauPtCalib( *
this )=
pt;
192 accTauEtaCalib( *
this )=
eta;
193 accTauPhiCalib( *
this )=
phi;
194 accTauMCalib( *
this )=
m;
218 return acc !=
nullptr;
228 if( !
acc )
return -1111.0;
231 return ( *
acc )( *this );
248 std::bitset<32> isTauFlags(
acc( *
this ) );
249 return isTauFlags[flag];
255 std::bitset<32> isTauFlags(
acc( *
this ) );
256 isTauFlags[flag] = value;
257 acc( *
this ) = isTauFlags.to_ulong();
267 if( !
acc )
return false;
268 if( !
acc->isAvailable( *
this ) )
return false;
271 value = ( *acc )( *this );
281 if( !
acc )
return false;
282 if( !
acc->isAvailable( *
this ) )
return false;
285 value = ( *acc )( *this );
296 if( !
acc )
return false;
297 if( !
acc->isAvailable( *
this ) )
return false;
301 if( ! link.
isValid() )
return false;
325 ElementLink < IParticleContainer > lParticleLink;
330 ElementLink < IParticleContainer > lParticleLink(value, *cont);
342 if( !
acc )
return false;
343 if( !
acc->isAvailable( *
this ) )
return false;
346 value = ( *acc )( *this );
356 if( !
acc )
return false;
357 if( !
acc->isAvailable( *
this ) )
return false;
360 value = ( *acc )( *this );
410 if(!link.isValid())
continue;
411 if( (*link)->flagWithMask(mask))
412 links.push_back(link);
428 uint tracks_pass_mask=0;
432 if(!link.isValid())
continue;
435 if(tracks_pass_mask==i) {
436 if(container_index) *container_index=link.index();
439 else tracks_pass_mask++;
447#ifndef XAOD_STANDALONE
449 int container_index=-1;
451 if(c_trk==
nullptr || container_index<0)
return nullptr;
454 TauTrack* trk=tauTrackContainer->
at(container_index);
455 if(trk!=c_trk) std::cout <<
"Did not properly retrieve non-const tauTrack" << std::endl;
468 std::vector<const TauTrack*> trks;
471 if(!link.isValid())
continue;
508 if(!link.isValid())
continue;
541 return *(clusterAcc(*this).at(i));
546 std::vector<const IParticle*> particleList;
548 for (
const auto& link : clusterAcc(*
this)) {
553 particleList.push_back(particle);
566 return clus->
p4(state);
571 return clusterAcc( *this ).size();
576 clusterAcc( *this ).push_back(tr);
581 clusterAcc( *this ).clear();
600 return *(pi0Acc(*this).at(i));
605 return pi0Acc( *this ).size();
610 pi0Acc( *this ).push_back(tr);
615 pi0Acc( *this ).clear();
636 if (!jetAcc( *this ).isValid()) {
639 return ( *jetAcc( *
this ) );
644 if( jetAcc( *this ).isValid() )
645 jetAcc( *this ).
reset();
646 jetAcc( *this ).toContainedElement( *cont,
jet );
660 if ( !vertexAcc(*this).isValid() ) {
663 return ( *vertexAcc( *
this ) );
668 if( vertexAcc( *this ).isValid() )
669 vertexAcc( *this ).reset();
670 vertexAcc( *this ).toContainedElement( *cont,
vertex );
679 setSecondaryVertexLink )
684 if (secondaryVertexAcc.isAvailable(*
this) ==
false) {
688 if (link.isValid() ==
false) {
696 if( secondaryVertexAcc( *this ).isValid() )
697 secondaryVertexAcc( *this ).reset();
698 secondaryVertexAcc( *this ).toContainedElement( *cont,
vertex );
709 setHadronicPFOLinks )
716 return ( *hadronicPFOAcc( *
this )[ i ] );
720 return hadronicPFOAcc( *this ).size();
725 hadronicPFOAcc( *this ).push_back( pfo );
730 hadronicPFOAcc( *this ).clear();
745 return ( *shotPFOAcc( *
this )[ i ] );
749 return shotPFOAcc( *this ).size();
754 shotPFOAcc( *this ).push_back( pfo );
759 shotPFOAcc( *this ).clear();
775 return ( *chargedPFOAcc( *
this )[ i ] );
779 return chargedPFOAcc( *this ).size();
784 chargedPFOAcc( *this ).push_back( pfo );
789 chargedPFOAcc( *this ).clear();
806 return ( *neutralPFOAcc( *
this )[ i ] );
810 return neutralPFOAcc( *this ).size();
815 neutralPFOAcc( *this ).push_back( pfo );
820 neutralPFOAcc( *this ).clear();
837 return ( *pi0PFOAcc( *
this )[ i ] );
841 return pi0PFOAcc( *this ).size();
846 pi0PFOAcc( *this ).push_back( pfo );
851 pi0PFOAcc( *this ).clear();
863 protoChargedPFOLinks,
864 setProtoChargedPFOLinks )
871 return ( *protoChargedPFOAcc( *
this )[ i ] );
875 return protoChargedPFOAcc( *this ).size();
880 protoChargedPFOAcc( *this ).push_back( pfo );
885 protoChargedPFOAcc( *this ).clear();
893 protoNeutralPFOLinks,
894 setProtoNeutralPFOLinks )
901 return ( *protoNeutralPFOAcc( *
this )[ i ] );
905 return protoNeutralPFOAcc( *this ).size();
910 protoNeutralPFOAcc( *this ).push_back( pfo );
915 protoNeutralPFOAcc( *this ).clear();
925 setProtoPi0PFOLinks )
932 return ( *protoPi0PFOAcc( *
this )[ i ] );
936 return protoPi0PFOAcc( *this ).size();
941 protoPi0PFOAcc( *this ).push_back( pfo );
946 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.
Evaluate cluster kinematics with a different vertex / signal state.
const T * at(size_type n) const
Access an element, as an rvalue.
bool isValid() const
Test to see if the link can be dereferenced.
pointer getDataNonConstPtr()
Return a pointer to the currently-referenced container object.
Helper class to provide type-safe access to aux data.
State
enum of possible signal states.
virtual FourMom_t p4() const
The full 4-momentum of the particle.
Class providing the definition of the 4-vector interface.
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 clearHadronicPFOLinks()
Remove all hadronic PFOs from the tau.
virtual double phi() const
The azimuthal angle ( ) of the particle.
double etaTauEtaCalib() const
size_t nNeutralPFOs() const
Get the number of neutral PFO particles associated with this tau.
double phiPanTauCellBasedProto() const
double etaFinalCalib() const
double phiJetSeed() const
size_t nProtoPi0PFOs() const
Get the number of cellbased_pi0 PFO particles associated with this tau.
double ptTauEnergyScale() const
const PFO * hadronicPFO(size_t i) const
Get the pointer to a given hadronic PFO associated with this tau.
void setPanTauDetail(TauJetParameters::PanTauDetails panTauDetail, int value)
double ptPanTauCellBased() const
std::vector< xAOD::CaloVertexedTopoCluster > vertexedClusters() const
const PFO * pi0PFO(size_t i) const
Get the pointer to a given pi0 PFO associated with this tau.
double etaTauEnergyScale() const
double ptPanTauCellBasedProto() const
void clearPi0PFOLinks()
Remove all pi0 PFOs from the tau.
void clearTauTrackLinks()
Remove all tracks from the tau.
bool hasDiscriminant(TauJetParameters::TauID discID) const
Check if class contains requested discriminant.
const PFO * protoChargedPFO(size_t i) const
Get the pointer to a given cellbased_charged PFO associated with this tau.
const IParticle * pi0(size_t i) const
Get the pointer to a given pi0 associated with this tau.
double mTauEnergyScale() const
double ptDetectorAxis() const
TauTrackLinks_t & allTauTrackLinksNonConst()
In order to sort track links.
void addProtoPi0PFOLink(const ElementLink< PFOContainer > &pfo)
add a cellbased_pi0 PFO to the tau
size_t nShotPFOs() const
Get the number of shot PFO particles associated with this tau.
const PFO * protoPi0PFO(size_t i) const
Get the pointer to a given cellbased_pi0 PFO associated with this tau.
double mFinalCalib() const
virtual FourMom_t p4() const
The full 4-momentum of the particle.
virtual double pt() const
The transverse momentum ( ) of the particle.
double phiFinalCalib() const
void clearPi0Links()
Remove all pi0s from the tau.
virtual double e() const
The total energy of the particle.
double phiDetectorAxis() const
size_t nProtoChargedPFOs() const
Get the number of cellbased_charged PFO particles associated with this tau.
double etaDetectorAxis() const
std::vector< const TauTrack * > tracksWithMask(unsigned int mask) const
Get the v<const pointer> to a given tauTrack collection associated with this tau.
void addNeutralPFOLink(const ElementLink< PFOContainer > &pfo)
add a neutral PFO to the tau
const PFO * shotPFO(size_t i) const
Get the pointer to a given shot PFO associated with this tau.
double ptTauEtaCalib() const
void setAllTauTrackLinks(const TauTrackLinks_t &tauTracks)
double ptIntermediateAxis() const
virtual double rapidity() const
The true rapidity (y) of the particle.
ElementLink< xAOD::JetContainer > JetLink_t
std::vector< ElementLink< xAOD::PFOContainer > > PFOLinks_t
size_t nPi0PFOs() const
Get the number of pi0 PFO particles associated with this tau.
GenVecFourMom_t genvecP4() const
The full 4-momentum of the particle : internal taus type.
void addProtoChargedPFOLink(const ElementLink< PFOContainer > &pfo)
add a cellbased_charged PFO to the tau
void clearClusterLinks()
Remove all clusters from the tau.
void setJet(const xAOD::JetContainer *cont, const xAOD::Jet *jet)
const TauTrackLinks_t tauTrackLinksWithMask(unsigned int) const
void clearChargedPFOLinks()
Remove all charged PFOs from the tau.
const PFO * chargedPFO(size_t i) const
Get the pointer to a given charged PFO associated with this tau.
const TauTrack * trackWithMask(size_t i, unsigned int mask, int *container_index=0) const
bool detail(TauJetParameters::Detail detail, int &value) const
Get and set values of common details variables via enum.
ElementLink< xAOD::VertexContainer > VertexLink_t
std::vector< ElementLink< xAOD::IParticleContainer > > IParticleLinks_t
size_t nHadronicPFOs() const
Get the number of hadronic PFO particles associated with this tau.
double phiTrigCaloOnly() const
TauJet_v3()
Default constructor.
size_t nChargedPFOs() const
Get the number of charged PFO particles associated with this tau.
void clearShotPFOLinks()
Remove all shot PFOs from the tau.
const TauTrack * track(size_t i, TauJetParameters::TauTrackFlag flag=TauJetParameters::TauTrackFlag::classifiedCharged, int *container_index=0) const
Get the pointer to a given tauTrack associated with this tau /*container index needed by trackNonCons...
double etaTrigCaloOnly() const
double phiTauEtaCalib() const
std::vector< ElementLink< xAOD::TauTrackContainer > > TauTrackLinks_t
void addPi0Link(const ElementLink< IParticleContainer > &tr)
add a pi0 link to the tau
void setDiscriminant(TauJetParameters::TauID discID, double disc)
Set value of discriminant.
void addChargedPFOLink(const ElementLink< PFOContainer > &pfo)
add a charged PFO to the tau
void setDetail(TauJetParameters::Detail detail, int value)
void clearProtoChargedPFOLinks()
Remove all cellbased_charged PFOs from the tau.
FourMom_t calibratedCluster(size_t i, xAOD::CaloCluster::State state=xAOD::CaloCluster::State::CALIBRATED) const
Get TLV to a given cluster in calibrated state.
double etaPanTauCellBasedProto() const
void setVertex(const xAOD::VertexContainer *cont, const xAOD::Vertex *vertex)
const Vertex * vertex() const
TauTrack * trackNonConst(size_t i, TauJetParameters::TauTrackFlag flag=TauJetParameters::TauTrackFlag::classifiedCharged)
void setP4(double pt, double eta, double phi, double m)
Set methods for IParticle values.
const IParticle * cluster(size_t i) const
Get the pointer to a given cluster associated with this tau.
std::vector< const IParticle * > clusters() const
double mDetectorAxis() const
void addPi0PFOLink(const ElementLink< PFOContainer > &pfo)
add a pi0 PFO to the tau
void clearProtoPi0PFOLinks()
Remove all cellbased_pi0 PFOs from the tau.
double ptTrigCaloOnly() const
double ptFinalCalib() const
void clearNeutralPFOLinks()
Remove all neutral PFOs from the tau.
void setIsTau(TauJetParameters::IsTauFlag flag, bool value)
Set Flag for tau acceptance based on predefined arbitrary criteria.
size_t nTracksIsolation() const
double discriminant(TauJetParameters::TauID discID) const
Get value of discriminant.
virtual double m() const
The invariant mass of the particle.
size_t nTracksWithMask(unsigned int classification) const
void setSecondaryVertex(const xAOD::VertexContainer *cont, const xAOD::Vertex *vertex)
size_t nAllTracks() const
double mIntermediateAxis() const
double mPanTauCellBased() const
size_t nTracksCharged() const
bool panTauDetail(TauJetParameters::PanTauDetails panTauDetail, int &value) const
Get and set values of pantau details variables via enum.
virtual Type::ObjectType type() const
The type of the object as a simple enumeration.
double etaJetSeed() const
bool isTau(TauJetParameters::IsTauFlag flag) const
Get Flag for tau acceptance based on predefined arbitrary criteria.
void clearProtoNeutralPFOLinks()
Remove all cellbased_neutral PFOs from the tau.
double phiTauEnergyScale() const
void addShotPFOLink(const ElementLink< PFOContainer > &pfo)
add a shot PFO to the tau
double etaPanTauCellBased() const
const TauTrackLinks_t tauTrackLinks(TauJetParameters::TauTrackFlag=TauJetParameters::TauTrackFlag::classifiedCharged) const
const PFO * protoNeutralPFO(size_t i) const
Get the pointer to a given cellbased_neutral PFO associated with this tau.
void addHadronicPFOLink(const ElementLink< PFOContainer > &pfo)
add a hadronic PFO to the tau
size_t nProtoNeutralPFOs() const
Get the number of cellbased_neutral PFO particles associated with this tau.
std::vector< const TauTrack * > allTracks() const
Get the v<const pointer> to all tracks associated with this tau, regardless of classification.
const TauTrackLinks_t & allTauTrackLinks() const
double etaIntermediateAxis() const
void addClusterLink(const ElementLink< IParticleContainer > &tr)
add a cluster link to the tau
const Vertex * secondaryVertex() const
void addProtoNeutralPFOLink(const ElementLink< PFOContainer > &pfo)
add a cellbased_neutral PFO to the tau
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > GenVecFourMom_t
Base 4 Momentum type for taus.
double mTauEtaCalib() const
void addTauTrackLink(const ElementLink< TauTrackContainer > &tr)
add a TauTrack to the tau
const PFO * neutralPFO(size_t i) const
Get the pointer to a given neutral PFO associated with this tau.
virtual double eta() const
The pseudorapidity ( ) of the particle.
double phiIntermediateAxis() const
size_t nTracks(TauJetParameters::TauTrackFlag flag=TauJetParameters::TauTrackFlag::classifiedCharged) const
double phiPanTauCellBased() const
double mPanTauCellBasedProto() const
std::vector< const TauTrack * > tracks(TauJetParameters::TauTrackFlag flag=TauJetParameters::TauTrackFlag::classifiedCharged) const
Get the v<const pointer> to a given tauTrack collection associated with this tau.
double mTrigCaloOnly() const
bool flagWithMask(unsigned int) const
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.
TauID
Enum for discriminants.
IsTauFlag
Enum for IsTau flags.
const SG::Accessor< float > * discriminantAccessorV3(xAOD::TauJetParameters::TauID discriminant)
Helper function for managing accessors to id input and output variables defined as enums in TauDefs....
const SG::Accessor< float > * detailsAccessorV3< float >(xAOD::TauJetParameters::Detail detail)
const SG::Accessor< float > * panTauDetailsAccessorV3< float >(xAOD::TauJetParameters::PanTauDetails detail)
const SG::Accessor< T > * detailsAccessorV3(xAOD::TauJetParameters::Detail detail)
const SG::Accessor< int > * panTauDetailsAccessorV3< int >(xAOD::TauJetParameters::PanTauDetails detail)
const SG::Accessor< int > * detailsAccessorV3< int >(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".
setRcore setEtHad setFside pt
static const SG::Accessor< std::vector< xAOD::CaloVertexedTopoCluster > > vertexedClustersAcc("VertexedClusters")
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
static const SG::Accessor< TauJet_v3::TauTrackLinks_t > tauTrackAcc("tauTrackLinks")
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Vertex_v1 Vertex
Define the latest version of the vertex class.
TauTrack_v1 TauTrack
Definition of the current version.
TauTrackContainer_v1 TauTrackContainer
Definition of the current TauTrack container version.
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".
DataVector< IParticle > IParticleContainer
Simple convenience declaration of IParticleContainer.
bool getValue(TauJetParameters::TauCalibType type, std::string &stringName)