CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

CaloRecoTauDiscriminationByFlightPathSignificance Class Reference

Inheritance diagram for CaloRecoTauDiscriminationByFlightPathSignificance:
TauDiscriminationProducerBase< TauType, TauDiscriminator > edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

void beginEvent (const edm::Event &, const edm::EventSetup &)
 CaloRecoTauDiscriminationByFlightPathSignificance (const edm::ParameterSet &iConfig)
double discriminate (const reco::CaloTauRef &)
 ~CaloRecoTauDiscriminationByFlightPathSignificance ()

Private Member Functions

double threeProngFlightPathSig (const CaloTauRef &)
double vertexSignificance (reco::Vertex &, reco::Vertex &, GlobalVector &)

Private Attributes

bool booleanOutput
double flightPathSig
reco::Vertex primaryVertex
edm::InputTag PVProducer
const TransientTrackBuildertransientTrackBuilder
bool withPVError

Detailed Description

Definition at line 22 of file CaloRecoTauDiscriminationByFlightPathSignificance.cc.


Constructor & Destructor Documentation

CaloRecoTauDiscriminationByFlightPathSignificance::CaloRecoTauDiscriminationByFlightPathSignificance ( const edm::ParameterSet iConfig) [inline, explicit]

Definition at line 24 of file CaloRecoTauDiscriminationByFlightPathSignificance.cc.

References edm::ParameterSet::getParameter().

        :CaloTauDiscriminationProducerBase(iConfig) {
      flightPathSig             = iConfig.getParameter<double>("flightPathSig");
      withPVError               = iConfig.getParameter<bool>("UsePVerror");

      PVProducer                = iConfig.getParameter<edm::InputTag>("PVProducer");

      booleanOutput             = iConfig.getParameter<bool>("BooleanOutput");
    }
CaloRecoTauDiscriminationByFlightPathSignificance::~CaloRecoTauDiscriminationByFlightPathSignificance ( ) [inline]

Member Function Documentation

void CaloRecoTauDiscriminationByFlightPathSignificance::beginEvent ( const edm::Event iEvent,
const edm::EventSetup iSetup 
) [virtual]
double CaloRecoTauDiscriminationByFlightPathSignificance::discriminate ( const reco::CaloTauRef tau) [virtual]
double CaloRecoTauDiscriminationByFlightPathSignificance::threeProngFlightPathSig ( const CaloTauRef tau) [private]

Definition at line 74 of file CaloRecoTauDiscriminationByFlightPathSignificance.cc.

References i, TransientVertex::isValid(), edm::RefVector< C, T, F >::size(), and KalmanVertexFitter::vertex().

                          {
  double flightPathSignificance = 0;
  //Secondary vertex
  reco::TrackRefVector signalTracks = tau->signalTracks();
  vector<TransientTrack> transientTracks;
  for(size_t i = 0; i < signalTracks.size(); ++i){
    const TransientTrack transientTrack =
        transientTrackBuilder->build(signalTracks[i]);
    transientTracks.push_back(transientTrack);
  }
  if(transientTracks.size() > 1) {
    KalmanVertexFitter kvf(true);
    TransientVertex tv = kvf.vertex(transientTracks);
    if(tv.isValid()){
      GlobalVector tauDir(tau->px(), tau->py(), tau->pz());
      Vertex secVer = tv;
      flightPathSignificance = vertexSignificance(primaryVertex,secVer,tauDir);
    }
  }
  return flightPathSignificance;
}
double CaloRecoTauDiscriminationByFlightPathSignificance::vertexSignificance ( reco::Vertex pv,
reco::Vertex sv,
GlobalVector direction 
) [private]

Definition at line 98 of file CaloRecoTauDiscriminationByFlightPathSignificance.cc.

References reco::SecondaryVertex::computeDist3d(), and Measurement1D::significance().

                                                       {
  return SecondaryVertex::computeDist3d(
      pv,sv,direction,withPVError).significance();
}

Member Data Documentation