Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
RecoTauTag
RecoTau
plugins
CaloRecoTauDiscriminationByLeadingTrackPtCut.cc
Go to the documentation of this file.
1
/*
2
* class CaloRecoTauDiscriminationByLeadingTrackPtCut
3
* created : October 08 2008,
4
* revised : ,
5
* Authors : Simone Gennai (SNS), Evan Friis (UC Davis)
6
*/
7
8
#include "
RecoTauTag/RecoTau/interface/TauDiscriminationProducerBase.h
"
9
10
#include "
DataFormats/TrackReco/interface/Track.h
"
11
12
using namespace
reco
;
13
14
class
CaloRecoTauDiscriminationByLeadingTrackPtCut
:
public
CaloTauDiscriminationProducerBase
{
15
public
:
16
explicit
CaloRecoTauDiscriminationByLeadingTrackPtCut
(
const
edm::ParameterSet
& iConfig):
CaloTauDiscriminationProducerBase
(iConfig){
17
minPtLeadTrack_ = iConfig.
getParameter
<
double
>(
"MinPtLeadingTrack"
);
18
}
19
~CaloRecoTauDiscriminationByLeadingTrackPtCut
(){}
20
double
discriminate(
const
CaloTauRef
& theCaloTauRef);
21
22
private
:
23
double
minPtLeadTrack_
;
24
};
25
26
double
CaloRecoTauDiscriminationByLeadingTrackPtCut::discriminate
(
const
CaloTauRef
& theCaloTauRef)
27
{
28
double
leadTrackPt_ = -1;
29
30
if
( theCaloTauRef->leadTrack().
isNonnull
() )
31
{
32
leadTrackPt_ = theCaloTauRef->leadTrack()->pt();
33
}
34
35
return
( (leadTrackPt_ > minPtLeadTrack_) ? 1. : 0. );
36
}
37
38
DEFINE_FWK_MODULE
(
CaloRecoTauDiscriminationByLeadingTrackPtCut
);
39
40
/*
41
edm::Handle<CaloTauCollection> theCaloTauCollection;
42
iEvent.getByLabel(CaloTauProducer_,theCaloTauCollection);
43
44
double theleadTrackPtCutDiscriminator = 0.;
45
auto_ptr<CaloTauDiscriminator> theCaloTauDiscriminatorByLeadingTrackPtCut(new CaloTauDiscriminator(CaloTauRefProd(theCaloTauCollection)));
46
47
//loop over the CaloTau candidates
48
for(size_t iCaloTau=0;iCaloTau<theCaloTauCollection->size();++iCaloTau) {
49
CaloTauRef theCaloTauRef(theCaloTauCollection,iCaloTau);
50
CaloTau theCaloTau=*theCaloTauRef;
51
52
// fill the AssociationVector object
53
if (!theCaloTau.leadTrack())
54
theleadTrackPtCutDiscriminator=0.;
55
else if(theCaloTau.leadTrack()->pt() > minPtLeadTrack_) theleadTrackPtCutDiscriminator=1.;
56
57
theCaloTauDiscriminatorByLeadingTrackPtCut->setValue(iCaloTau,theleadTrackPtCutDiscriminator);
58
}
59
60
iEvent.put(theCaloTauDiscriminatorByLeadingTrackPtCut);
61
62
}
63
64
*/
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
TauDiscriminationProducerBase.h
CaloRecoTauDiscriminationByLeadingTrackPtCut::minPtLeadTrack_
double minPtLeadTrack_
Definition:
CaloRecoTauDiscriminationByLeadingTrackPtCut.cc:23
dt_dqm_sourceclient_common_cff.reco
tuple reco
Definition:
dt_dqm_sourceclient_common_cff.py:105
CaloRecoTauDiscriminationByLeadingTrackPtCut::CaloRecoTauDiscriminationByLeadingTrackPtCut
CaloRecoTauDiscriminationByLeadingTrackPtCut(const edm::ParameterSet &iConfig)
Definition:
CaloRecoTauDiscriminationByLeadingTrackPtCut.cc:16
edm::Ref::isNonnull
bool isNonnull() const
Checks for non-null.
Definition:
Ref.h:250
CaloRecoTauDiscriminationByLeadingTrackPtCut::discriminate
double discriminate(const CaloTauRef &theCaloTauRef)
Definition:
CaloRecoTauDiscriminationByLeadingTrackPtCut.cc:26
CaloRecoTauDiscriminationByLeadingTrackPtCut
Definition:
CaloRecoTauDiscriminationByLeadingTrackPtCut.cc:14
reco::DEFINE_FWK_MODULE
DEFINE_FWK_MODULE(CosmicTrackingParticleSelector)
CaloRecoTauDiscriminationByLeadingTrackPtCut::~CaloRecoTauDiscriminationByLeadingTrackPtCut
~CaloRecoTauDiscriminationByLeadingTrackPtCut()
Definition:
CaloRecoTauDiscriminationByLeadingTrackPtCut.cc:19
TauDiscriminationProducerBase
Definition:
TauDiscriminationProducerBase.h:47
edm::ParameterSet
Definition:
ParameterSet.h:35
Track.h
edm::Ref
Definition:
AssociativeIterator.h:52
Generated for CMSSW Reference Manual by
1.8.5