Main Page
Namespaces
Classes
Package Documentation
RecoTauTag
RecoTau
src
PositionAtECalEntranceComputer.cc
Go to the documentation of this file.
1
#include "
RecoTauTag/RecoTau/interface/PositionAtECalEntranceComputer.h
"
2
3
#include "
MagneticField/Engine/interface/MagneticField.h
"
4
#include "
MagneticField/Records/interface/IdealMagneticFieldRecord.h
"
5
#include "
FastSimulation/BaseParticlePropagator/interface/BaseParticlePropagator.h
"
6
#include "
FastSimulation/Particle/interface/RawParticle.h
"
7
8
#include <cassert>
9
10
PositionAtECalEntranceComputer::PositionAtECalEntranceComputer
() : bField_z_(-1.) {}
11
12
PositionAtECalEntranceComputer::~PositionAtECalEntranceComputer
() {}
13
14
void
PositionAtECalEntranceComputer::beginEvent
(
const
edm::EventSetup
& es) {
15
edm::ESHandle<MagneticField>
bField
;
16
es.
get
<
IdealMagneticFieldRecord
>().
get
(bField);
17
bField_z_
= bField->
inTesla
(
GlobalPoint
(0., 0., 0.)).
z
();
18
}
19
20
reco::Candidate::Point
PositionAtECalEntranceComputer::operator()
(
const
reco::Candidate
* particle,
bool
&
success
)
const
{
21
assert(
bField_z_
!= -1.);
22
BaseParticlePropagator
propagator
=
BaseParticlePropagator
(
23
RawParticle
(particle->
p4
(),
24
math::XYZTLorentzVector
(particle->
vertex
().x(), particle->
vertex
().y(), particle->
vertex
().z(), 0.)),
25
0.,
26
0.,
27
bField_z_
);
28
propagator.
setCharge
(particle->
charge
());
29
propagator.
propagateToEcalEntrance
(
false
);
30
reco::Candidate::Point
position
;
31
if
(propagator.
getSuccess
() != 0) {
32
position = propagator.
vertex
().Vect();
33
success =
true
;
34
}
else
{
35
success =
false
;
36
}
37
return
position
;
38
}
RawParticle::setCharge
void setCharge(float q)
set the MEASURED charge
Definition:
RawParticle.cc:139
PositionAtECalEntranceComputer::beginEvent
void beginEvent(const edm::EventSetup &)
Definition:
PositionAtECalEntranceComputer.cc:14
ecalTB2006H4_GenSimDigiReco_cfg.bField
bField
Definition:
ecalTB2006H4_GenSimDigiReco_cfg.py:235
reco::Candidate
Definition:
Candidate.h:28
GlobalPoint
Global3DPoint GlobalPoint
Definition:
GlobalPoint.h:10
IdealMagneticFieldRecord
Definition:
IdealMagneticFieldRecord.h:11
BaseParticlePropagator::getSuccess
int getSuccess() const
Has propagation been performed and was barrel or endcap reached ?
Definition:
BaseParticlePropagator.h:297
PositionAtECalEntranceComputer::~PositionAtECalEntranceComputer
~PositionAtECalEntranceComputer()
Definition:
PositionAtECalEntranceComputer.cc:12
summarizeEdmComparisonLogfiles.success
success
Definition:
summarizeEdmComparisonLogfiles.py:114
MagneticField.h
math::XYZTLorentzVector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition:
LorentzVector.h:29
PositionAtECalEntranceComputer::PositionAtECalEntranceComputer
PositionAtECalEntranceComputer()
Definition:
PositionAtECalEntranceComputer.cc:10
PositionAtECalEntranceComputer.h
reco::Candidate::p4
virtual const LorentzVector & p4() const =0
four-momentum Lorentz vector
edm::ESHandle< MagneticField >
PV3DBase::z
T z() const
Definition:
PV3DBase.h:64
edm::EventSetup
Definition:
EventSetup.h:52
RawParticle
Definition:
RawParticle.h:32
MagneticField::inTesla
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
BaseParticlePropagator::propagateToEcalEntrance
bool propagateToEcalEntrance(bool first=true)
Definition:
BaseParticlePropagator.cc:487
PositionAtECalEntranceComputer::bField_z_
double bField_z_
Definition:
PositionAtECalEntranceComputer.h:30
RawParticle.h
RawParticle::vertex
const XYZTLorentzVector & vertex() const
the vertex fourvector
Definition:
RawParticle.h:285
BaseParticlePropagator
Definition:
BaseParticlePropagator.h:82
BaseParticlePropagator.h
reco::Candidate::charge
virtual int charge() const =0
electric charge
position
static int position[264][3]
Definition:
ReadPGInfo.cc:509
edm::EventSetup::get
T get() const
Definition:
EventSetup.h:63
reco::Candidate::Point
math::XYZPoint Point
point in the space
Definition:
Candidate.h:41
reco::Candidate::vertex
virtual const Point & vertex() const =0
vertex position
PhotonConversionTrajectorySeedProducerFromQuadruplets_cfi.propagator
propagator
Definition:
PhotonConversionTrajectorySeedProducerFromQuadruplets_cfi.py:41
PositionAtECalEntranceComputer::operator()
reco::Candidate::Point operator()(const reco::Candidate *particle, bool &success) const
Definition:
PositionAtECalEntranceComputer.cc:20
IdealMagneticFieldRecord.h
Generated for CMSSW Reference Manual by
1.8.11