CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
CaloRecoTauDiscriminationByFlightPathSignificance Class Reference
Inheritance diagram for CaloRecoTauDiscriminationByFlightPathSignificance:
TauDiscriminationProducerBase< TauType, TauDiscriminator > edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void beginEvent (const edm::Event &, const edm::EventSetup &) override
 
 CaloRecoTauDiscriminationByFlightPathSignificance (const edm::ParameterSet &iConfig)
 
double discriminate (const reco::CaloTauRef &) override
 
 ~CaloRecoTauDiscriminationByFlightPathSignificance ()
 
- Public Member Functions inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator >
virtual double discriminate (const TauRef &tau)=0
 
virtual void endEvent (edm::Event &evt)
 
void produce (edm::Event &, const edm::EventSetup &)
 
 TauDiscriminationProducerBase (const edm::ParameterSet &iConfig)
 
 TauDiscriminationProducerBase ()
 
virtual ~TauDiscriminationProducerBase ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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
 

Additional Inherited Members

- Public Types inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator >
typedef std::vector< TauType > TauCollection
 
typedef edm::Ref< TauCollectionTauRef
 
typedef edm::RefProd
< TauCollection
TauRefProd
 
- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
- Protected Attributes inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator >
std::string moduleLabel_
 
double prediscriminantFailValue_
 
edm::EDGetTokenT< TauCollectionTau_token
 
edm::InputTag TauProducer_
 

Detailed Description

Definition at line 22 of file CaloRecoTauDiscriminationByFlightPathSignificance.cc.

Constructor & Destructor Documentation

CaloRecoTauDiscriminationByFlightPathSignificance::CaloRecoTauDiscriminationByFlightPathSignificance ( const edm::ParameterSet iConfig)
inlineexplicit
CaloRecoTauDiscriminationByFlightPathSignificance::~CaloRecoTauDiscriminationByFlightPathSignificance ( )
inline

Definition at line 34 of file CaloRecoTauDiscriminationByFlightPathSignificance.cc.

34 {}

Member Function Documentation

void CaloRecoTauDiscriminationByFlightPathSignificance::beginEvent ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Reimplemented from TauDiscriminationProducerBase< TauType, TauDiscriminator >.

Definition at line 52 of file CaloRecoTauDiscriminationByFlightPathSignificance.cc.

References edm::View< T >::begin(), edm::EventSetup::get(), edm::Event::getByLabel(), HWWFunctions::primaryVertex(), edm::ESHandle< class >::product(), and GoodVertex_cfg::vertexCollection.

53  {
54  //Primary vertex
56  iEvent.getByLabel(PVProducer, vertexHandle);
57  const edm::View<reco::Vertex>& vertexCollection(*vertexHandle);
58  primaryVertex = *(vertexCollection.begin());
59  // Transient Tracks
61  iSetup.get<TransientTrackRecord>().get("TransientTrackBuilder",builder);
62  transientTrackBuilder = builder.product();
63 }
tuple vertexCollection
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:390
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
double CaloRecoTauDiscriminationByFlightPathSignificance::discriminate ( const reco::CaloTauRef tau)
override
double CaloRecoTauDiscriminationByFlightPathSignificance::threeProngFlightPathSig ( const CaloTauRef tau)
private

Definition at line 74 of file CaloRecoTauDiscriminationByFlightPathSignificance.cc.

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

75  {
76  double flightPathSignificance = 0;
77  //Secondary vertex
78  reco::TrackRefVector signalTracks = tau->signalTracks();
79  vector<TransientTrack> transientTracks;
80  for(size_t i = 0; i < signalTracks.size(); ++i){
81  const TransientTrack transientTrack =
82  transientTrackBuilder->build(signalTracks[i]);
83  transientTracks.push_back(transientTrack);
84  }
85  if(transientTracks.size() > 1) {
86  KalmanVertexFitter kvf(true);
87  TransientVertex tv = kvf.vertex(transientTracks);
88  if(tv.isValid()){
89  GlobalVector tauDir(tau->px(), tau->py(), tau->pz());
90  Vertex secVer = tv;
91  flightPathSignificance = vertexSignificance(primaryVertex,secVer,tauDir);
92  }
93  }
94  return flightPathSignificance;
95 }
int i
Definition: DBlmapReader.cc:9
reco::TransientTrack build(const reco::Track *p) const
double vertexSignificance(reco::Vertex &, reco::Vertex &, GlobalVector &)
size_type size() const
Size of the RefVector.
Definition: RefVector.h:89
bool isValid() const
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().

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

Member Data Documentation

bool CaloRecoTauDiscriminationByFlightPathSignificance::booleanOutput
private
double CaloRecoTauDiscriminationByFlightPathSignificance::flightPathSig
private
reco::Vertex CaloRecoTauDiscriminationByFlightPathSignificance::primaryVertex
private
edm::InputTag CaloRecoTauDiscriminationByFlightPathSignificance::PVProducer
private
const TransientTrackBuilder* CaloRecoTauDiscriminationByFlightPathSignificance::transientTrackBuilder
private
bool CaloRecoTauDiscriminationByFlightPathSignificance::withPVError
private