|
ATLAS Offline Software
|
Go to the documentation of this file.
89 return genvecP4().E();
185 std::string calibString =
"";
192 accTauPtCalib( *
this )=
pt;
193 accTauEtaCalib( *
this )=
eta;
194 accTauPhiCalib( *
this )=
phi;
195 accTauMCalib( *
this )=
m;
246 return acc !=
nullptr;
256 if( ! acc )
return -1111.0;
259 return ( *acc )( *this );
276 std::bitset<32> isTauFlags( acc( *
this ) );
277 return isTauFlags[
flag];
283 std::bitset<32> isTauFlags( acc( *
this ) );
285 acc( *
this ) = isTauFlags.to_ulong();
295 if( ! acc )
return false;
296 if( ! acc->isAvailable( *
this ) )
return false;
299 value = ( *acc )( *this );
309 if( ! acc )
return false;
310 if( ! acc->isAvailable( *
this ) )
return false;
313 value = ( *acc )( *this );
324 if( ! acc )
return false;
325 if( ! acc->isAvailable( *
this ) )
return false;
329 if( ! link.
isValid() )
return false;
338 ( *( xAODTau::detailsAccessorV3<int>(
detail ) ) )( *this ) =
value;
345 ( *( xAODTau::detailsAccessorV3<float>(
detail ) ) )( *this ) =
value;
354 ( *( xAODTau::detailsAccessorV3<ElementLink < IParticleContainer > >(
detail ) ) )( *
this ) = lParticleLink;
359 ( *( xAODTau::detailsAccessorV3<ElementLink < IParticleContainer > >(
detail ) ) )( *
this ) = lParticleLink;
370 if( ! acc )
return false;
371 if( ! acc->isAvailable( *
this ) )
return false;
374 value = ( *acc )( *this );
384 if( ! acc )
return false;
385 if( ! acc->isAvailable( *
this ) )
return false;
388 value = ( *acc )( *this );
403 ( *( xAODTau::panTauDetailsAccessorV3<float>(
panTauDetail ) ) )( *this ) =
value;
421 return tauTrackAcc(*
this);
425 tauTrackAcc(*
this) =
links;
438 if(!link.isValid())
continue;
439 if( (*link)->flagWithMask(
mask))
440 links.push_back(link);
447 return tauTrackAcc(*
this);
456 uint tracks_pass_mask=0;
460 if(!link.isValid())
continue;
463 if(tracks_pass_mask==
i) {
464 if(container_index) *container_index=link.
index();
467 else tracks_pass_mask++;
475 #ifndef XAOD_STANDALONE
477 int container_index=-1;
479 if(c_trk==
nullptr || container_index<0)
return nullptr;
482 TauTrack* trk=tauTrackContainer->
at(container_index);
483 if(trk!=c_trk) std::cout <<
"Did not properly retrieve non-const tauTrack" << std::endl;
500 std::vector<const TauTrack*> trks;
503 if(!link.isValid())
continue;
546 if(!link.isValid())
continue;
564 tauTrackAcc( *this ).push_back(tr);
568 tauTrackAcc( *this ).clear();
581 return *(clusterAcc(*this).at(
i));
586 std::vector<const IParticle*> particleList;
588 for (
const auto& link : clusterAcc(*
this)) {
606 return clus->
p4(state);
611 return clusterAcc( *this ).size();
616 clusterAcc( *this ).push_back(tr);
621 clusterAcc( *this ).clear();
627 return vertexedClustersAcc(*
this);
640 return *(pi0Acc(*this).at(
i));
645 return pi0Acc( *this ).size();
650 pi0Acc( *this ).push_back(tr);
655 pi0Acc( *this ).clear();
676 if (!jetAcc( *this ).isValid()) {
679 return ( *jetAcc( *
this ) );
684 if( jetAcc( *this ).isValid() )
685 jetAcc( *this ).reset();
686 jetAcc( *this ).toContainedElement( *cont,
jet );
700 if ( !vertexAcc(*this).isValid() ) {
703 return ( *vertexAcc( *
this ) );
708 if( vertexAcc( *this ).isValid() )
709 vertexAcc( *this ).reset();
710 vertexAcc( *this ).toContainedElement( *cont,
vertex );
719 setSecondaryVertexLink )
724 if (secondaryVertexAcc.isAvailable(*
this) ==
false) {
728 if (link.isValid() ==
false) {
736 if( secondaryVertexAcc( *this ).isValid() )
737 secondaryVertexAcc( *this ).reset();
738 secondaryVertexAcc( *this ).toContainedElement( *cont,
vertex );
749 setHadronicPFOLinks )
756 return ( *hadronicPFOAcc( *
this )[
i ] );
760 return hadronicPFOAcc( *this ).size();
765 hadronicPFOAcc( *this ).push_back( pfo );
770 hadronicPFOAcc( *this ).clear();
785 return ( *shotPFOAcc( *
this )[
i ] );
789 return shotPFOAcc( *this ).size();
794 shotPFOAcc( *this ).push_back( pfo );
799 shotPFOAcc( *this ).clear();
815 return ( *chargedPFOAcc( *
this )[
i ] );
819 return chargedPFOAcc( *this ).size();
824 chargedPFOAcc( *this ).push_back( pfo );
829 chargedPFOAcc( *this ).clear();
846 return ( *neutralPFOAcc( *
this )[
i ] );
850 return neutralPFOAcc( *this ).size();
855 neutralPFOAcc( *this ).push_back( pfo );
860 neutralPFOAcc( *this ).clear();
877 return ( *pi0PFOAcc( *
this )[
i ] );
881 return pi0PFOAcc( *this ).size();
886 pi0PFOAcc( *this ).push_back( pfo );
891 pi0PFOAcc( *this ).clear();
903 protoChargedPFOLinks,
904 setProtoChargedPFOLinks )
911 return ( *protoChargedPFOAcc( *
this )[
i ] );
915 return protoChargedPFOAcc( *this ).size();
920 protoChargedPFOAcc( *this ).push_back( pfo );
925 protoChargedPFOAcc( *this ).clear();
933 protoNeutralPFOLinks,
934 setProtoNeutralPFOLinks )
941 return ( *protoNeutralPFOAcc( *
this )[
i ] );
945 return protoNeutralPFOAcc( *this ).size();
950 protoNeutralPFOAcc( *this ).push_back( pfo );
955 protoNeutralPFOAcc( *this ).clear();
965 setProtoPi0PFOLinks )
972 return ( *protoPi0PFOAcc( *
this )[
i ] );
976 return protoPi0PFOAcc( *this ).size();
981 protoPi0PFOAcc( *this ).push_back( pfo );
986 protoPi0PFOAcc( *this ).clear();
TauTrackFlag
Enum for tau track flags.
double phiDetectorAxis() const
double etaTrigCaloOnly() const
double etaTauEtaCalib() const
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1, float, IP2D_pb, setIP2D_pb) AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1
void addShotPFOLink(const ElementLink< PFOContainer > &pfo)
add a shot PFO to the tau
double mTauEnergyScale() const
double mDetectorAxis() const
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
double etaTauEnergyScale() const
void setAllTauTrackLinks(const TauTrackLinks_t &tauTracks)
const PFO * hadronicPFO(size_t i) const
Get the pointer to a given hadronic PFO associated with this tau.
double mPanTauCellBased() const
size_t nNeutralPFOs() const
Get the number of neutral PFO particles associated with this tau.
size_t nTracksWithMask(unsigned int classification) const
const TauTrack * trackWithMask(size_t i, unsigned int mask, int *container_index=0) const
double discriminant(TauJetParameters::TauID discID) const
Get value of discriminant.
size_t nAllTracks() const
double phiIntermediateAxis() const
virtual double eta() const
The pseudorapidity ( ) of the particle.
size_t nProtoNeutralPFOs() const
Get the number of cellbased_neutral PFO particles associated with this tau.
double etaDetectorAxis() const
double etaIntermediateAxis() const
void clearProtoChargedPFOLinks()
Remove all cellbased_charged PFOs from the tau.
double phiFinalCalib() const
void setPanTauDetail(TauJetParameters::PanTauDetails panTauDetail, int value)
double mPanTauCellBasedProto() const
void clearTauTrackLinks()
Remove all tracks from the tau.
std::vector< const TauTrack * > tracksWithMask(unsigned int mask) const
Get the v<const pointer> to a given tauTrack collection associated with this tau.
virtual double m() const
The invariant mass of the particle.
void addChargedPFOLink(const ElementLink< PFOContainer > &pfo)
add a charged PFO to the tau
double etaFinalCalib() const
State
enum of possible signal states.
size_t nTracks(TauJetParameters::TauTrackFlag flag=TauJetParameters::TauTrackFlag::classifiedCharged) const
void clearNeutralPFOLinks()
Remove all neutral PFOs from the tau.
void clearClusterLinks()
Remove all clusters from the tau.
void clearPi0PFOLinks()
Remove all pi0 PFOs from the tau.
void clearPi0Links()
Remove all pi0s from the tau.
const IParticle * cluster(size_t i) const
Get the pointer to a given cluster associated with this tau.
virtual Type::ObjectType type() const
The type of the object as a simple enumeration.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
bool panTauDetail(TauJetParameters::PanTauDetails panTauDetail, int &value) const
Get and set values of pantau details variables via enum.
bool ptIntermediateAxis(const xAOD::TauJet &tau, double &out)
TauTrack * trackNonConst(size_t i, TauJetParameters::TauTrackFlag flag=TauJetParameters::TauTrackFlag::classifiedCharged)
const PFO * protoChargedPFO(size_t i) const
Get the pointer to a given cellbased_charged PFO associated with this tau.
setRcore setEtHad setFside pt
const SG::AuxElement::Accessor< float > * discriminantAccessorV3(xAOD::TauJetParameters::TauID discriminant)
Helper function for managing accessors to id input and output variables defined as enums in TauDefs....
size_t nHadronicPFOs() const
Get the number of hadronic PFO particles associated with this tau.
void setVertex(const xAOD::VertexContainer *cont, const xAOD::Vertex *vertex)
TauID
Enum for discriminants.
void addProtoNeutralPFOLink(const ElementLink< PFOContainer > &pfo)
add a cellbased_neutral PFO to the tau
Class providing the definition of the 4-vector interface.
double ptDetectorAxis() const
size_t nProtoPi0PFOs() const
Get the number of cellbased_pi0 PFO particles associated with this tau.
double phiTrigCaloOnly() const
size_t nPi0PFOs() const
Get the number of pi0 PFO particles associated with this tau.
void setIsTau(TauJetParameters::IsTauFlag flag, bool value)
Set Flag for tau acceptance based on predefined arbitrary criteria.
GenVecFourMom_t genvecP4() const
The full 4-momentum of the particle : internal taus type.
bool isValid() const
Test to see if the link can be dereferenced.
void setP4(double pt, double eta, double phi, double m)
Set methods for IParticle values.
virtual double rapidity() const
The true rapidity (y) of the particle.
double mTauEtaCalib() const
std::vector< const IParticle * > clusters() const
const PFO * pi0PFO(size_t i) const
Get the pointer to a given pi0 PFO associated with this tau.
TLorentzVector FourMom_t
Definition of the 4-momentum type.
double phiJetSeed() const
virtual double pt() const
The transverse momentum ( ) of the particle.
Detail
Enum for tau parameters - used mainly for backward compatibility with the analysis code.
ElementLink< xAOD::VertexContainer > VertexLink_t
virtual double phi() const
The azimuthal angle ( ) of the particle.
const TauTrackLinks_t tauTrackLinksWithMask(unsigned int) const
Description of a calorimeter cluster.
double etaPanTauCellBased() const
void addPi0PFOLink(const ElementLink< PFOContainer > &pfo)
add a pi0 PFO to the tau
bool getValue(TauJetParameters::TauCalibType type, std::string &stringName)
double ptTauEnergyScale() const
void clearProtoPi0PFOLinks()
Remove all cellbased_pi0 PFOs from the tau.
size_t nTracksCharged() const
TauCalibType
Enum for tau calib type.
const TauTrackLinks_t & allTauTrackLinks() const
void setSecondaryVertex(const xAOD::VertexContainer *cont, const xAOD::Vertex *vertex)
void clearHadronicPFOLinks()
Remove all hadronic PFOs from the tau.
AUXSTORE_PRIMITIVE_GETTER_WITH_CAST(Muon_v1, uint8_t, Muon_v1::EnergyLossType, energyLossType) AUXSTORE_PRIMITIVE_SETTER_WITH_CAST(Muon_v1
Class describing a tau jet.
double etaJetSeed() const
void addHadronicPFOLink(const ElementLink< PFOContainer > &pfo)
add a hadronic PFO to 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...
void addTauTrackLink(const ElementLink< TauTrackContainer > &tr)
add a TauTrack to the tau
void addNeutralPFOLink(const ElementLink< PFOContainer > &pfo)
add a neutral PFO to the tau
double ptTauEtaCalib() const
double etaPanTauCellBasedProto() const
const IParticle * pi0(size_t i) const
Get the pointer to a given pi0 associated with this tau.
double ptTrigCaloOnly() const
std::vector< ElementLink< xAOD::IParticleContainer > > IParticleLinks_t
void addPi0Link(const ElementLink< IParticleContainer > &tr)
add a pi0 link to the tau
size_t index() const
Return the index of this element within its container.
@ numTopoClusters
get number of topocluster constituents of jet associated to tau candidate
double phiTauEnergyScale() const
TauTrackLinks_t & allTauTrackLinksNonConst()
In order to sort track links.
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > GenVecFourMom_t
Base 4 Momentum type for taus.
double mTrigCaloOnly() const
void setJet(const xAOD::JetContainer *cont, const xAOD::Jet *jet)
virtual FourMom_t p4() const
The full 4-momentum of the particle.
bool flagWithMask(unsigned int) const
pointer getDataNonConstPtr()
Return a pointer to the currently-referenced container object.
void addClusterLink(const ElementLink< IParticleContainer > &tr)
add a cluster link to the tau
bool detail(TauJetParameters::Detail detail, int &value) const
Set veto flag.
double phiPanTauCellBased() const
void clearProtoNeutralPFOLinks()
Remove all cellbased_neutral PFOs from the tau.
void addProtoPi0PFOLink(const ElementLink< PFOContainer > &pfo)
add a cellbased_pi0 PFO to 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.
Evaluate cluster kinematics with a different vertex / signal state.
std::vector< xAOD::CaloVertexedTopoCluster > vertexedClusters() const
const PFO * protoPi0PFO(size_t i) const
Get the pointer to a given cellbased_pi0 PFO associated with this tau.
std::vector< ElementLink< xAOD::PFOContainer > > PFOLinks_t
void clearChargedPFOLinks()
Remove all charged PFOs from the tau.
const TauTrackLinks_t tauTrackLinks(TauJetParameters::TauTrackFlag=TauJetParameters::TauTrackFlag::classifiedCharged) const
double phiTauEtaCalib() const
bool isTau(TauJetParameters::IsTauFlag flag) const
Get Flag for tau acceptance based on predefined arbitrary criteria.
double mIntermediateAxis() const
PanTauDetails
Enum for tau details (scalar) calculated by pantau.
Class describing a Vertex.
std::vector< ElementLink< xAOD::TauTrackContainer > > TauTrackLinks_t
TauJet_v3()
Default constructor.
const Vertex * vertex() const
virtual FourMom_t p4() const
The full 4-momentum of the particle.
void clearShotPFOLinks()
Remove all shot PFOs from the tau.
void setDetail(TauJetParameters::Detail detail, int value)
IsTauFlag
Enum for IsTau flags.
@ Tau
The object is a tau (jet)
const PFO * protoNeutralPFO(size_t i) const
Get the pointer to a given cellbased_neutral PFO associated with this tau.
size_t nProtoChargedPFOs() const
Get the number of cellbased_charged PFO particles associated with this tau.
const T * at(size_type n) const
Access an element, as an rvalue.
void addProtoChargedPFOLink(const ElementLink< PFOContainer > &pfo)
add a cellbased_charged PFO to the tau
double ptIntermediateAxis() const
bool ptDetectorAxis(const xAOD::TauJet &tau, double &out)
const PFO * shotPFO(size_t i) const
Get the pointer to a given shot PFO associated with this tau.
size_t nTracksIsolation() const
ObjectType
Type of objects that have a representation in the xAOD EDM.
const Vertex * secondaryVertex() const
setBGCode setTAP setLVL2ErrorBits bool
double ptPanTauCellBased() const
double mFinalCalib() const
double ptFinalCalib() const
const PFO * neutralPFO(size_t i) const
Get the pointer to a given neutral PFO associated with this tau.
void setDiscriminant(TauJetParameters::TauID discID, double disc)
Set value of discriminant.
size_t nChargedPFOs() const
Get the number of charged PFO particles associated with this tau.
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.
std::vector< const TauTrack * > allTracks() const
Get the v<const pointer> to all tracks associated with this tau, regardless of classification.
const PFO * chargedPFO(size_t i) const
Get the pointer to a given charged PFO associated with this tau.
AUXSTORE_OBJECT_SETTER_AND_GETTER(CaloRings_v1, RingSetLinks, ringSetLinks, setRingSetLinks) unsigned CaloRings_v1
size_t nShotPFOs() const
Get the number of shot PFO particles associated with this tau.
double phiPanTauCellBasedProto() const
double ptPanTauCellBasedProto() const