CMS 3D CMS Logo

TauVariables.h

Go to the documentation of this file.
00001 #ifndef RecoTauTag_Pi0Tau_TauVariables_h_
00002 #define RecoTauTag_Pi0Tau_TauVariables_h_
00003 
00004 // -*- C++ -*-
00005 //
00006 // Package:    TauVariables
00007 // Class:      TauVariables
00008 // 
00016 //
00017 // Original Author:  Dongwook Jang
00018 //         Created:  Tue Jan  9 16:40:36 CST 2007
00019 // $Id: TauVariables.h,v 1.5 2008/02/16 06:32:49 dwjang Exp $
00020 //
00021 //
00022 
00023 
00024 // system include files
00025 #include <memory>
00026 #include "DataFormats/Common/interface/Handle.h"
00027 #include "DataFormats/Math/interface/Point3D.h"
00028 #include "DataFormats/Math/interface/LorentzVector.h"
00029 #include "DataFormats/TrackReco/interface/Track.h"
00030 #include "DataFormats/TrackReco/interface/TrackFwd.h"
00031 #include "DataFormats/TauReco/interface/CaloTauTagInfo.h"
00032 #include "RecoTauTag/Pi0Tau/interface/Pi0.h"
00033 #include "RecoTauTag/Pi0Tau/interface/Pi0Fwd.h"
00034 #include "RecoTauTag/Pi0Tau/interface/Tau3D.h"
00035 #include "RecoTauTag/Pi0Tau/interface/Tau3DFwd.h"
00036 
00037 //
00038 // class decleration
00039 //
00040 
00041 class TauVariables {
00042 
00043  public:
00044 
00045   TauVariables() { this->init(); }
00046 
00047   TauVariables(const reco::Tau3D* tau, const edm::Handle<reco::CaloTauTagInfoCollection> *tauTagInfoHandle);
00048 
00049   ~TauVariables();
00050 
00051   // \return tracks + pi0s momentum in the signal cone
00052   math::XYZTLorentzVector momentum() { return (tracksMomentum_ + pi0sMomentum_); }
00053 
00054   // \return tracks momentum in the signal cone
00055   math::XYZTLorentzVector tracksMomentum() const { return tracksMomentum_; }
00056 
00057   // \return pi0s momentum in the signal cone
00058   math::XYZTLorentzVector pi0sMomentum() const { return pi0sMomentum_; }
00059 
00060   // \return seed track
00061   reco::TrackRef seedTrack() const { return seedTrack_; }
00062 
00063   // \return use3DAngle
00064   int use3DAngle() const { return use3DAngle_; }
00065 
00066   // \return signal cone size
00067   double signalConeSize() const { return signalConeSize_; }
00068 
00069   // \return isolation cone size
00070   double isolationConeSize() const { return isolationConeSize_; }
00071 
00072   // \return number of tracks in signal cone
00073   int nSignalTracks() const { return nSignalTracks_; }
00074 
00075   // \return number of pi0s in signal cone
00076   int nSignalPi0s() const { return nSignalPi0s_; }
00077 
00078   // \return number of tracks in isolation cone
00079   int nIsolationTracks() const { return nIsolationTracks_; }
00080 
00081   // \return number of pi0s in isolation cone
00082   int nIsolationPi0s() const { return nIsolationPi0s_; }
00083 
00084   // \return sum charge of tracks in signal cone
00085   int signalCharge() const { return signalCharge_; }
00086 
00087   // \return mass of tracks and pi0s in signal cone
00088   double signalMass() { return momentum().M(); }
00089 
00090   // \return mass of tracks in signal cone
00091   double signalTracksMass() { return tracksMomentum().M(); }
00092 
00093   // \return maximum pt track in isolation cone
00094   reco::TrackRef const &maxPtTrackInIsolation() const { return maxPtTrackInIsolation_; }
00095 
00096   // \return maximum pt pi0 in isolation cone
00097   reco::Pi0 const &maxPtPi0InIsolation() const { return maxPtPi0InIsolation_; }
00098 
00099   // \return collection of tracks in signal cone
00100   reco::TrackRefVector const &signalTracks() const { return signalTracks_; }
00101 
00102   // \return collection of pi0s in signal cone
00103   reco::Pi0Collection const &signalPi0s() const { return signalPi0s_; }
00104 
00105   // \return collection of tracks in isolation cone
00106   reco::TrackRefVector const &isolationTracks() const { return isolationTracks_; }
00107 
00108   // \return collection of pi0s in isolation cone
00109   reco::Pi0Collection const &isolationPi0s() const { return isolationPi0s_; }
00110 
00111   // \return a reference to CaloTauTagInfoRef
00112   reco::CaloTauTagInfoRef tauTagRef() const { return tauTagRef_; }
00113 
00114   // \return a reference of Tau3D
00115   reco::Tau3D const &tau3D() { return *tau3D_; }
00116 
00117   // initialize members
00118   void init();
00119 
00120   // make tau variables (main calculation)
00121   void makeVariables();
00122 
00123   // setters
00124 
00125   void setUse3DAngle(bool v) { use3DAngle_ = v; }
00126 
00127   void setSignalConeSize(double v) { signalConeSize_ = v; }
00128 
00129   void setIsolationConeSize(double v) { isolationConeSize_ = v; }
00130 
00131   void setUseVariableSignalCone(bool v) { useVariableSignalCone_ = v; }
00132 
00133   void setSignalConeFunction(double v) { signalConeFunction_ = v; }
00134 
00135   void setUseVariableIsolationCone(bool v) { useVariableIsolationCone_ = v; }
00136 
00137   void setIsolationConeFunction(double v) { isolationConeFunction_ = v; }
00138 
00139   void setSeedTrackThreshold(double v) { seedTrackThreshold_ = v; }
00140 
00141   void setShoulderTrackThreshold(double v) { shoulderTrackThreshold_ = v; }
00142 
00143   void setPi0Threshold(double v) { pi0Threshold_ = v; }
00144 
00145   void setDZTrackAssociation(double v) { dZTrackAssociation_ = v; }
00146 
00147  private:
00148 
00149   // tracks momentum in the signal cone
00150   math::XYZTLorentzVector tracksMomentum_;
00151 
00152   // pi0s momentum in the signal cone
00153   math::XYZTLorentzVector pi0sMomentum_;
00154 
00155   // seed track ie. highest pt track
00156   reco::TrackRef seedTrack_;
00157 
00158   // flag to use 3D angle (default is dR)
00159   bool use3DAngle_;
00160 
00161   // signal cone size
00162   double signalConeSize_;
00163 
00164   // isolation cone size
00165   double isolationConeSize_;
00166 
00167   // flag to use shrinking signal cone
00168   bool useVariableSignalCone_;
00169 
00170   // variable signal cone function (This is only valid when useVariableSignalCone_ is on)
00171   // This string will be used to define a function, "signalConeFunction_/x"
00172   double signalConeFunction_;
00173 
00174   // flag to use shrinking isolation cone
00175   bool useVariableIsolationCone_;
00176 
00177   // variable isolation cone function (This is only valid when useVariableIsolationCone_ is on)
00178   // This string will be used to define a function, "isolationConeFunction_/x"
00179   double isolationConeFunction_;
00180 
00181   // seed track pt threshold
00182   double seedTrackThreshold_;
00183 
00184   // shoulder track pt threshold
00185   double shoulderTrackThreshold_;
00186 
00187   // pi0 et threshold
00188   double pi0Threshold_;
00189 
00190   // max distance allowed for seed track and shoulder track association
00191   double dZTrackAssociation_;
00192 
00193   // number of tracks in signal cone
00194   int nSignalTracks_;
00195 
00196   // number of pi0s in signal cone
00197   int nSignalPi0s_;
00198 
00199   // number of tracks in isolation cone
00200   int nIsolationTracks_;
00201 
00202   // number of pi0s in isolation cone
00203   int nIsolationPi0s_;
00204 
00205   // sum charge of tracks in signal cone
00206   int signalCharge_;
00207 
00208   // maximum pt track in isolation cone
00209   reco::TrackRef maxPtTrackInIsolation_;
00210 
00211   // maximum pt pi0 in isolation cone
00212   reco::Pi0 maxPtPi0InIsolation_;
00213 
00214   // collection of tracks in signal cone
00215   reco::TrackRefVector signalTracks_;
00216 
00217   // collection of pi0s in signal cone
00218   reco::Pi0Collection signalPi0s_;
00219 
00220   // collection of tracks in isolation cone
00221   reco::TrackRefVector isolationTracks_;
00222 
00223   // collection of pi0s in isolation cone
00224   reco::Pi0Collection isolationPi0s_;
00225 
00226   // a reference to CaloTauTagInfoRef
00227   reco::CaloTauTagInfoRef tauTagRef_;
00228 
00229   // a reference to Tau3D
00230   const reco::Tau3D *tau3D_;
00231 
00232   // a reference to CaloTauTagInfoCollection
00233   const edm::Handle<reco::CaloTauTagInfoCollection> *tauTagInfoHandle_;
00234 
00235 };
00236 #endif
00237 

Generated on Tue Jun 9 17:45:00 2009 for CMSSW by  doxygen 1.5.4