 |
ATLAS Offline Software
|
Go to the documentation of this file.
88 return genvecP4().E();
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 ) );
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;
310 ( *( xAODTau::detailsAccessorV3<int>(
detail ) ) )( *this ) =
value;
317 ( *( xAODTau::detailsAccessorV3<float>(
detail ) ) )( *this ) =
value;
326 ( *( xAODTau::detailsAccessorV3<ElementLink < IParticleContainer > >(
detail ) ) )( *
this ) = lParticleLink;
331 ( *( xAODTau::detailsAccessorV3<ElementLink < IParticleContainer > >(
detail ) ) )( *
this ) = lParticleLink;
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 );
375 ( *( xAODTau::panTauDetailsAccessorV3<float>(
panTauDetail ) ) )( *this ) =
value;
393 return tauTrackAcc(*
this);
397 tauTrackAcc(*
this) =
links;
410 if(!link.isValid())
continue;
411 if( (*link)->flagWithMask(
mask))
412 links.push_back(link);
419 return tauTrackAcc(*
this);
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;
524 tauTrackAcc( *this ).push_back(tr);
528 tauTrackAcc( *this ).clear();
541 return *(clusterAcc(*this).at(
i));
546 std::vector<const IParticle*> particleList;
548 for (
const auto& link : clusterAcc(*
this)) {
566 return clus->
p4(state);
571 return clusterAcc( *this ).size();
576 clusterAcc( *this ).push_back(tr);
581 clusterAcc( *this ).clear();
587 return vertexedClustersAcc(*
this);
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();
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
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
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....
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
Get and set values of common details variables via enum.
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