00001
00002
00003 #ifndef XAODMUON_VERSIONS_MUON_V1_H
00004 #define XAODMUON_VERSIONS_MUON_V1_H
00005
00006
00007 #include "AthContainers/AuxElement.h"
00008 #include "AthLinks/ElementLink.h"
00009
00010
00011 #include "xAODPrimitives/IsolationCorrection.h"
00012 #include "xAODPrimitives/IsolationType.h"
00013 #include "xAODPrimitives/IsolationFlavour.h"
00014
00015
00016 #include "xAODBase/IParticle.h"
00017 #include "xAODTracking/TrackingPrimitives.h"
00018 #include "xAODTracking/TrackParticleContainer.h"
00019 #include "xAODCaloEvent/CaloClusterContainer.h"
00020 #include "xAODMuon/MuonSegmentContainer.h"
00021
00022 #include <bitset>
00023 #include <stdint.h>
00024
00025
00026 namespace xAOD {
00031 class Muon_v1 : public IParticle {
00032
00033 public:
00035 Muon_v1();
00039 virtual double pt() const;
00041 virtual double eta() const;
00043 virtual double phi() const;
00045 virtual double m() const;
00047 virtual double e() const;
00049 virtual double rapidity() const;
00050
00052 void setP4(double pt, double eta, double phi);
00053
00055 typedef IParticle::FourMom_t FourMom_t;
00056
00058 virtual const FourMom_t& p4() const;
00059
00061 virtual Type::ObjectType type() const;
00063
00066 float charge() const;
00067
00069 void setCharge(float charge);
00070
00075 enum Author {
00076 unknown=0,
00077 MuidCo,
00078 STACO,
00079 MuTag,
00080 MuTagIMO,
00081 MuidSA,
00082 MuGirl,
00083 MuGirlLowBeta,
00084 CaloTag,
00085 CaloLikelihood,
00086 ExtrapolateMuonToIP,
00087 NumberOfMuonAuthors
00088 };
00090 Author author() const;
00092 bool isAuthor ( const Author author ) const;
00094 void setAuthor(Author auth);
00100 uint16_t allAuthors() const;
00101 void setAllAuthors(uint16_t authors);
00103 void addAllAuthor( const Author author );
00104
00106
00111 enum MuonType {
00112 Combined, MuonStandAlone, SegmentTagged, CaloTagged, SiliconAssociatedForwardMuon
00113 };
00115 MuonType muonType() const;
00117 void setMuonType(MuonType type);
00118
00137 bool summaryValue(uint8_t& value, const SummaryType information) const;
00139 void setSummaryValue(uint8_t value, const SummaryType information);
00141 bool summaryValue(float& value, const SummaryType information) const;
00143 bool summaryValue(uint8_t& value, const MuonSummaryType information) const;
00145 void setSummaryValue(uint8_t value, const MuonSummaryType information);
00146
00149 float floatSummaryValue(const SummaryType information) const;
00152 uint8_t uint8SummaryValue(const SummaryType information) const;
00155 float uint8MuonSummaryValue(const MuonSummaryType information) const;
00156
00158 enum ParamDef {
00160 spectrometerFieldIntegral=0 ,
00161 scatteringCurvatureSignificance=1 ,
00162 scatteringNeighbourSignificance=2 ,
00163 momentumBalanceSignificance=3,
00164
00166 segmentDeltaEta=4 ,
00167 segmentDeltaPhi=5 ,
00168 segmentChi2OverDoF=6 ,
00170 t0=7 ,
00171 beta=8 ,
00172 annBarrel=9 ,
00173 annEndCap=10,
00175 innAngle=11 ,
00176 midAngle=12 ,
00177 msInnerMatchChi2=13,
00178 msInnerMatchDOF=14,
00179 msOuterMatchChi2=15,
00180 msOuterMatchDOF=16,
00181 meanDeltaADCCountsMDT=17,
00182
00183 CaloLRLikelihood=18,
00184 CaloMuonIDTag=19,
00185 FSR_CandidateEnergy=20,
00186 EnergyLoss=21,
00187 ParamEnergyLoss=22,
00188 MeasEnergyLoss=23,
00189 EnergyLossSigma=24,
00190 ParamEnergyLossSigmaPlus=25,
00191 ParamEnergyLossSigmaMinus=26,
00192 MeasEnergyLossSigma=27,
00193
00194 d0_sa=28,
00195 z0_sa=29,
00196 phi0_sa=30,
00197 theta_sa=31,
00198 qOverP_sa=32,
00199 Eloss_sa=33
00200 };
00201
00206 bool parameter(float& value, const ParamDef parameter) const;
00207
00209 void setParameter(float value, const ParamDef parameter);
00210
00213 float floatParameter(const ParamDef parameter) const;
00214
00216 bool parameter(int& value, const ParamDef parameter) const;
00217
00219 void setParameter(int value, const ParamDef parameter);
00220
00223 int intParameter(const ParamDef parameter) const;
00224
00227 enum Quality {Tight,
00228 Medium,
00229 Loose,
00230 VeryLoose};
00231 Quality quality() const;
00232 void setQuality(Quality);
00233
00236 bool passesIDCuts() const;
00237
00239 void setPassesIDCuts(bool);
00240
00243 bool passesHighPtCuts() const;
00244
00246 void setPassesHighPtCuts(bool);
00247
00249
00253
00257 bool isolation(float& value, const Iso::IsolationType information) const;
00258
00261 float isolation(const Iso::IsolationType information) const;
00262
00264 void setIsolation(float value, const Iso::IsolationType information);
00266
00270 bool isolationCaloCorrection(float& value, const Iso::IsolationFlavour flavour, const Iso::IsolationCaloCorrection type,
00271 const Iso::IsolationCorrectionParameter param) const;
00272
00275 float isolationCaloCorrection(const Iso::IsolationFlavour flavour, const Iso::IsolationCaloCorrection type,
00276 const Iso::IsolationCorrectionParameter param) const;
00277
00279 bool setIsolationCaloCorrection(float value, const Iso::IsolationFlavour flavour, const Iso::IsolationCaloCorrection type,
00280 const Iso::IsolationCorrectionParameter param);
00281
00282
00284 bool isolationTrackCorrection(float& value, const Iso::IsolationFlavour flavour , const Iso::IsolationTrackCorrection type ) const;
00285
00288 float isolationTrackCorrection(const Iso::IsolationFlavour flavour , const Iso::IsolationTrackCorrection type) const;
00289
00291 bool setIsolationTrackCorrection(float value, const Iso::IsolationFlavour flavour , const Iso::IsolationTrackCorrection type);
00292
00293
00295 bool isolationCorrectionBitset(std::bitset<32>& value, const Iso::IsolationFlavour flavour ) const;
00296
00299 std::bitset<32> isolationCorrectionBitset(const Iso::IsolationFlavour flavour ) const;
00300
00302 bool setIsolationCorrectionBitset(uint32_t value, const Iso::IsolationFlavour flavour );
00303
00305
00321 const ElementLink< TrackParticleContainer >& primaryTrackParticleLink() const;
00322
00329 const TrackParticle* primaryTrackParticle() const;
00330
00332 const ElementLink< TrackParticleContainer >& inDetTrackParticleLink() const;
00334 const ElementLink< TrackParticleContainer >& muonSpectrometerTrackParticleLink() const;
00336 const ElementLink< TrackParticleContainer >& combinedTrackParticleLink() const;
00338 const ElementLink< TrackParticleContainer >& extrapolatedMuonSpectrometerTrackParticleLink() const;
00339
00340 enum TrackParticleType {
00341 Primary, InnerDetectorTrackParticle, MuonSpectrometerTrackParticle, CombinedTrackParticle, ExtrapolatedMuonSpectrometerTrackParticle
00342 };
00344 const ElementLink< TrackParticleContainer >& trackParticleLink( TrackParticleType type) const;
00346 void setTrackParticleLink(TrackParticleType type, const ElementLink< TrackParticleContainer >& link);
00348 const TrackParticle* trackParticle( TrackParticleType type) const;
00349
00352 const ElementLink<CaloClusterContainer>& clusterLink() const;
00354 void setClusterLink(const ElementLink<CaloClusterContainer>& link);
00356 const CaloCluster* cluster() const;
00357
00359 enum EnergyLossType { Parametrized=0,
00360 NotIsolated=1,
00361 MOP=2,
00362 Tail=3,
00363 FSRcandidate=4
00364 };
00371 EnergyLossType energyLossType (void) const;
00373 void setEnergyLossType (EnergyLossType type) ;
00374
00376
00378 const std::vector< ElementLink< MuonSegmentContainer > > & muonSegmentLinks() const;
00380 void setMuonSegmentLinks(const std::vector< ElementLink< MuonSegmentContainer > >& segments) ;
00382 size_t nMuonSegments() const;
00385 const MuonSegment* muonSegment( size_t i ) const;
00388 const ElementLink< MuonSegmentContainer >& muonSegmentLink( size_t i ) const;
00389
00391 private:
00393 mutable FourMom_t m_p4;
00403 mutable bool m_p4Cached1;
00404 };
00405
00406 }
00407
00408
00409 #include "xAODCore/CLASS_DEF.h"
00410 CLASS_DEF( xAOD::Muon_v1, 239636954, 1 )
00411
00412
00413 #include "AthContainers/DataVector.h"
00414 DATAVECTOR_BASE( xAOD::Muon_v1, xAOD::IParticle );
00415
00416 #endif // XAODMUON_VERSIONS_Muon_v1_H