#ifndef _TauVariables_HH_ #define _TauVariables_HH_ //////////////////////////////////////////////////////////////////// // File: TauVariables.hh // Authors: Matt Reece // Purpose: High level analysis tau variables defined as functions // Created: 04/01/2002 // // Revision: 0.1 // //////////////////////////////////////////////////////////////////// class CdfTau; class HepLorentzVector; class Pi0Candidate; class Pi0CandidateView; #include #include "TrackingObjects/Storable/CdfTrackView.hh" namespace TauVariables { // Basic stuff int tauNumTowers(const CdfTau& tau); int tauNumClumpTowers(const CdfTau& tau); int tauNumChargedTracks(const CdfTau& tau); int tauNumChargedTracks10deg(const CdfTau& tau); int tauNumChargedTracks30deg(const CdfTau& tau); int tauNumChargedTracks10to30deg(const CdfTau& tau); int tauChargeIn10deg(const CdfTau& tau); int tauNumWrongVtxTrk10deg(const CdfTau& tau); double tauEmFraction(const CdfTau& tau); double tauClusterDetectorEta(const CdfTau& tau); double tauSeedTrkDetectorEta(const CdfTau& tau); double tauEtaEta(const CdfTau& tau); double tauPhiPhi(const CdfTau& tau); double tauDelr(const CdfTau& tau); double tauEmEnergy(const CdfTau& tau); double tauHadEnergy(const CdfTau& tau); double tauEmEt(const CdfTau& tau); double tauHadEt(const CdfTau& tau); double tauEt(const CdfTau& tau); double tauCaloEtIso(const CdfTau& tau); double tauCaloHadEtIso(const CdfTau& tau); double tauCaloEmEtIso(const CdfTau& tau); double tauReferenceVtxZ(const CdfTau& tau); double tauClusterEta(const CdfTau& tau); double tauClusterPhi(const CdfTau& tau); // Various momenta HepLorentzVector tauClusterMomentum(const CdfTau& tau); HepLorentzVector tauTrackMomentum(const CdfTau& tau); HepLorentzVector tauVisMomentum(const CdfTau& tau); // (tracks+pi0s) // Track stuff double tauTracksPt(const CdfTau& tau); double tauTracksScalarPtSum(const CdfTau& tau); double tauTracksMass(const CdfTau& tau); double tauTracksEta(const CdfTau& tau); double tauTracksPhi(const CdfTau& tau); double tauTrackIso(const CdfTau& tau); double tauEp(const CdfTau& tau); // E / p_trk double tauEpvis(const CdfTau& tau); // E / p_(pi0+trk) // Seed track information double tauSeedTrackVtxZ(const CdfTau& tau); double tauSeedTrackPt(const CdfTau& tau); double tauSeedTrackPhi(const CdfTau& tau); double tauAngleSeedToCluster(const CdfTau& tau); double tauPhiSeedToCluster(const CdfTau& tau); double tauEtaSeedToCluster(const CdfTau& tau); // Things related to pi0's int tauNumPi0s(const CdfTau& tau); double tauPi0AndTrackMass(const CdfTau& tau); double tauPi0AndTrackPt(const CdfTau& tau); // Muon information: 15 degree cone int tauNumMuonStubs(const CdfTau& tau); int tauNumMuonHits(const CdfTau& tau); // pi0 information double pi0Eta(const Pi0Candidate& pi0); double pi0Phi(const Pi0Candidate& pi0); double pi0Energy(const Pi0Candidate& pi0); double pi0DetectorZ(const Pi0Candidate& pi0); HepLorentzVector pi0FourMomentum(const Pi0Candidate& pi0, double vtxz); // Access cluster information. Anton will store up to two strip // and two wire clusters per pi0. For each of these, we can get energy, // fitted position, width, and chi^2. -999 will be returned if the cluster // in question does not exist for this pi0. struct CesInfo { double rawEnergy; double fittedPosition; double width; double chi2; double rawPosition; double globalPosition; double fittedEnergy; double widthError; double distTrackCluster; int halfWedge; int firstElement; int numElements; }; void FillCesInfo(const Pi0Candidate& pi0, CesInfo& strip1, CesInfo& strip2, CesInfo& wire1, CesInfo& wire2); // Variables added March 18, 2003 // Based on tau group's Tau ID cuts double tauCone(const CdfTau& tau); bool tauIsTrackInCone(const CdfTau& tau, const CdfTrack& track); bool tauGetTracks(const CdfTau& tau, CdfTrackView_h& hTrkView, string process="PROD"); int tauTracksInCone(const CdfTau& tau, const CdfTrackView_h thetracks); int tauTracksChargeInCone(const CdfTau& tau, const CdfTrackView_h thetracks); int tauIsolationTracks(const CdfTau& tau, const CdfTrackView_h thetracks); int tauIsolationPi0s(const CdfTau& tau); double tauEHadOverP(const CdfTau& tau); double tauCaloMass(const CdfTau& tau); bool tauTrackVertexIn5Cm(const CdfTau& tau, const CdfTrack& track); bool tauIsTrackInConeUnextrapolated(const CdfTau& tau, const CdfTrack& track); bool tauGetTracksUnextrapolated(const CdfTau& tau, CdfTrackView_h& hTrkView, string process="PROD"); // Variables added January 2004. // Part of an effort to do things more sanely and have one set of // consistent definitions. // This stores in tracks a set of tracks lying between angles // "inner" and "outer" from the seed track of the given tau, // with Pt above threshold. // The "bool nearsort" and "double& nearangle" variables are // specifically for getting tracks sorted by proximity to the // seed track. bool tauTrackGetter(const CdfTau& tau, CdfTrackView_h& tracks, double inner, double outer, double threshold, bool nearsort, double& nearangle); // Returns tracks in the cone angle < conesize using above fn. bool tauGetConeTracks(const CdfTau& tau, CdfTrackView_h& theconetracks, double conesize, double trkconethreshold); // Returns tracks in the annulus conesize <= angle < annulus bool tauGetIsoTracks(const CdfTau& tau, CdfTrackView_h& theisotracks, double conesize, double annulus, double trkisothreshold); // Returns tracks outside the cone, ordered by their proximity to the // seed track of the given tau. Also returns the angle to the nearest // in "nearangle". bool tauGetNearTracks(const CdfTau& tau, CdfTrackView_h& theneartracks, double conesize, double trkisothreshold, double& nearangle); // Returns pi0s in the annulus inner <= angle < outer of the seed // track of the given tau, with Pt above the treshold // The "bool nearsort" and "double& nearangle" variables are // specifically for getting pi0s sorted by proximity to the // seed track. bool tauPi0Getter(const CdfTau& tau, Pi0CandidateView& thepi0s, double inner, double outer, double threshold, bool nearsort, double& nearangle); // Returns pi0s in the cone angle < conesize using the above fn. bool tauGetConePi0s(const CdfTau& tau, Pi0CandidateView& theconepi0s, double conesize, double pi0conethreshold); // Returns pi0s in the annulus conesize <= angle < annulus bool tauGetIsoPi0s(const CdfTau& tau, Pi0CandidateView& theisopi0s, double conesize, double annulus, double pi0isothreshold); // Returns pi0s outside the cone, ordered by their proximity to the // seed track of the given tau. Also returns the angle to the nearest // in "nearangle". bool tauGetNearPi0s(const CdfTau& tau, Pi0CandidateView& thenearpi0s, double conesize, double pi0isothreshold, double& nearangle); // Get the largest impact parameter among the tracks double tauMaxD0(const CdfTau& tau, CdfTrackView_h theconetracks); // Return the sum of the P's or Pt's of the tracks or tracks and pi0s double tauScalarPtSum(const CdfTau& tau, CdfTrackView_h theconetracks); double tauScalarPSum(const CdfTau& tau, CdfTrackView_h theconetracks); double tauScalarVisPtSum(const CdfTau& tau, CdfTrackView_h theconetracks, Pi0CandidateView& conepi0s); // note the "vis p" sum is Sum of |p| for tracks and e for pi0s. double tauScalarVisPSum(const CdfTau& tau, CdfTrackView_h theconetracks, Pi0CandidateView& conepi0s); // sum of 4-momenta from tracks HepLorentzVector tauTracksMomentum(const CdfTau& tau, CdfTrackView_h conetracks); // sum of 4-momenta from tracks and from pi0s HepLorentzVector tauVisibleMomentum(const CdfTau& tau, CdfTrackView_h conetracks, Pi0CandidateView& conepi0s); // Get the energies in the tower with the n^th highest total energy double tauTowerEt(const CdfTau& tau, int tower); double tauTowerEmEt(const CdfTau& tau, int tower); double tauTowerHadEt(const CdfTau& tau, int tower); int tauTowerIEta(const CdfTau& tau, int tower); int tauTowerIPhi(const CdfTau& tau, int tower); } #endif