CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes | Static Private Attributes
PositionAtECalEntranceComputer Class Reference

#include <PositionAtECalEntranceComputer.h>

Public Member Functions

void beginEvent (const edm::EventSetup &)
 
reco::Candidate::Point operator() (const reco::Candidate *particle, bool &success) const
 
 PositionAtECalEntranceComputer (edm::ConsumesCollector &&, bool isPhase2=false)
 
 PositionAtECalEntranceComputer (edm::ConsumesCollector &, bool isPhase2=false)
 
 ~PositionAtECalEntranceComputer ()
 

Private Attributes

edm::ESGetToken< MagneticField, IdealMagneticFieldRecordbField_esToken_
 
double bField_z_
 
edm::ESGetToken< CaloGeometry, CaloGeometryRecordcaloGeo_esToken_
 
float hgcalFace_z_
 
bool isPhase2_
 
hgcal::RecHitTools recHitTools_
 

Static Private Attributes

static constexpr float ecalBarrelEndcapEtaBorder_ = 1.479
 
static constexpr float hgcalHfEtaBorder_ = 3.0
 

Detailed Description

Extrapolate particle (charged or neutral) to ECAL entrance, in order to compute the distance of the tau to ECAL cracks and/or dead ECAL channels

Authors
Fabio Colombo, Christian Veelken

Definition at line 25 of file PositionAtECalEntranceComputer.h.

Constructor & Destructor Documentation

◆ PositionAtECalEntranceComputer() [1/2]

PositionAtECalEntranceComputer::PositionAtECalEntranceComputer ( edm::ConsumesCollector &&  cc,
bool  isPhase2 = false 
)

◆ PositionAtECalEntranceComputer() [2/2]

PositionAtECalEntranceComputer::PositionAtECalEntranceComputer ( edm::ConsumesCollector cc,
bool  isPhase2 = false 
)

◆ ~PositionAtECalEntranceComputer()

PositionAtECalEntranceComputer::~PositionAtECalEntranceComputer ( )

Definition at line 23 of file PositionAtECalEntranceComputer.cc.

23 {}

Member Function Documentation

◆ beginEvent()

void PositionAtECalEntranceComputer::beginEvent ( const edm::EventSetup es)

◆ operator()()

reco::Candidate::Point PositionAtECalEntranceComputer::operator() ( const reco::Candidate particle,
bool &  success 
) const

Definition at line 33 of file PositionAtECalEntranceComputer.cc.

34  {
35  assert(bField_z_ != -1.);
38  RawParticle(particle->p4(),
39  math::XYZTLorentzVector(particle->vertex().x(), particle->vertex().y(), particle->vertex().z(), 0.),
40  particle->charge()),
41  0.,
42  0.,
43  bField_z_);
44  if (!isPhase2_ || std::abs(particle->eta()) < ecalBarrelEndcapEtaBorder_) { // ECal
45  propagator.propagateToEcalEntrance(false);
46  } else { // HGCal
47  if (std::abs(particle->vertex().z()) >= hgcalFace_z_) {
48  success = false;
49  return position;
50  }
51  propagator.setPropagationConditions(152.6, hgcalFace_z_, false);
52  propagator.propagate();
53  }
54  if (propagator.getSuccess() != 0) {
55  position = propagator.particle().vertex().Vect();
57  } else {
58  success = false;
59  }
60  return position;
61 }

References funct::abs(), cms::cuda::assert(), bField_z_, reco::Candidate::charge(), ecalBarrelEndcapEtaBorder_, reco::Candidate::eta(), hgcalFace_z_, hgcalHfEtaBorder_, isPhase2_, reco::Candidate::p4(), position, TrackCandidateProducer_cfi::propagator, summarizeEdmComparisonLogfiles::success, and reco::Candidate::vertex().

Member Data Documentation

◆ bField_esToken_

edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> PositionAtECalEntranceComputer::bField_esToken_
private

Definition at line 37 of file PositionAtECalEntranceComputer.h.

Referenced by beginEvent().

◆ bField_z_

double PositionAtECalEntranceComputer::bField_z_
private

Definition at line 39 of file PositionAtECalEntranceComputer.h.

Referenced by beginEvent(), and operator()().

◆ caloGeo_esToken_

edm::ESGetToken<CaloGeometry, CaloGeometryRecord> PositionAtECalEntranceComputer::caloGeo_esToken_
private

Definition at line 38 of file PositionAtECalEntranceComputer.h.

Referenced by beginEvent().

◆ ecalBarrelEndcapEtaBorder_

constexpr float PositionAtECalEntranceComputer::ecalBarrelEndcapEtaBorder_ = 1.479
staticconstexprprivate

Definition at line 43 of file PositionAtECalEntranceComputer.h.

Referenced by operator()().

◆ hgcalFace_z_

float PositionAtECalEntranceComputer::hgcalFace_z_
private

Definition at line 42 of file PositionAtECalEntranceComputer.h.

Referenced by beginEvent(), and operator()().

◆ hgcalHfEtaBorder_

constexpr float PositionAtECalEntranceComputer::hgcalHfEtaBorder_ = 3.0
staticconstexprprivate

Definition at line 44 of file PositionAtECalEntranceComputer.h.

Referenced by operator()().

◆ isPhase2_

bool PositionAtECalEntranceComputer::isPhase2_
private

Definition at line 40 of file PositionAtECalEntranceComputer.h.

Referenced by beginEvent(), and operator()().

◆ recHitTools_

hgcal::RecHitTools PositionAtECalEntranceComputer::recHitTools_
private

Definition at line 41 of file PositionAtECalEntranceComputer.h.

Referenced by beginEvent().

RawParticle
Definition: RawParticle.h:37
PositionAtECalEntranceComputer::ecalBarrelEndcapEtaBorder_
static constexpr float ecalBarrelEndcapEtaBorder_
Definition: PositionAtECalEntranceComputer.h:43
reco::Candidate::eta
virtual double eta() const =0
momentum pseudorapidity
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
PositionAtECalEntranceComputer::hgcalFace_z_
float hgcalFace_z_
Definition: PositionAtECalEntranceComputer.h:42
cms::cuda::assert
assert(be >=bs)
BaseParticlePropagator
Definition: BaseParticlePropagator.h:82
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
CaloGeometry
Definition: CaloGeometry.h:21
PositionAtECalEntranceComputer::bField_esToken_
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > bField_esToken_
Definition: PositionAtECalEntranceComputer.h:37
TrackCandidateProducer_cfi.propagator
propagator
Definition: TrackCandidateProducer_cfi.py:17
reco::Candidate::charge
virtual int charge() const =0
electric charge
summarizeEdmComparisonLogfiles.success
success
Definition: summarizeEdmComparisonLogfiles.py:115
PositionAtECalEntranceComputer::caloGeo_esToken_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeo_esToken_
Definition: PositionAtECalEntranceComputer.h:38
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
PATTauDiscriminationAgainstElectronMVA6Phase2_cff.isPhase2
isPhase2
Definition: PATTauDiscriminationAgainstElectronMVA6Phase2_cff.py:15
reco::Candidate::vertex
virtual const Point & vertex() const =0
vertex position
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
hgcal::RecHitTools::getPositionLayer
GlobalPoint getPositionLayer(int layer, bool nose=false) const
Definition: RecHitTools.cc:138
PositionAtECalEntranceComputer::recHitTools_
hgcal::RecHitTools recHitTools_
Definition: PositionAtECalEntranceComputer.h:41
cc
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:120
hgcal::RecHitTools::setGeometry
void setGeometry(CaloGeometry const &)
Definition: RecHitTools.cc:68
math::XYZTLorentzVector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
PositionAtECalEntranceComputer::bField_z_
double bField_z_
Definition: PositionAtECalEntranceComputer.h:39
reco::Candidate::p4
virtual const LorentzVector & p4() const =0
four-momentum Lorentz vector
PositionAtECalEntranceComputer::isPhase2_
bool isPhase2_
Definition: PositionAtECalEntranceComputer.h:40
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
reco::Candidate::Point
math::XYZPoint Point
point in the space
Definition: Candidate.h:40
PositionAtECalEntranceComputer::hgcalHfEtaBorder_
static constexpr float hgcalHfEtaBorder_
Definition: PositionAtECalEntranceComputer.h:44
MagneticField
Definition: MagneticField.h:19