src
FastSimulation
TrackingRecHitProducer
plugins
TrackingRecHitNoSmearingPlugin.cc
Go to the documentation of this file.
1
#include "
FastSimulation/TrackingRecHitProducer/interface/TrackingRecHitAlgorithm.h
"
2
#include "
FastSimulation/TrackingRecHitProducer/interface/TrackingRecHitAlgorithmFactory.h
"
3
#include "
FastSimulation/TrackingRecHitProducer/interface/TrackingRecHitProduct.h
"
4
5
#include "
DataFormats/DetId/interface/DetId.h
"
6
#include "
SimDataFormats/TrackingHit/interface/PSimHit.h
"
7
#include "
DataFormats/TrackerRecHit2D/interface/FastSingleTrackerRecHit.h
"
8
9
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
10
11
#include <string>
12
#include <iostream>
13
14
class
TrackingRecHitNoSmearingPlugin
:
public
TrackingRecHitAlgorithm
{
15
private
:
16
double
_errorXX
;
17
double
_errorXY
;
18
double
_errorYY
;
19
20
public
:
21
TrackingRecHitNoSmearingPlugin
(
const
std::string
&
name
,
22
const
edm::ParameterSet
&
config
,
23
edm::ConsumesCollector
& consumesCollector)
24
:
TrackingRecHitAlgorithm
(
name
,
config
, consumesCollector),
25
_errorXX
(0.001 * 0.001),
26
_errorXY
(0.0),
27
_errorYY
(0.001 * 0.001) {
28
if
(
config
.exists(
"errorXX"
)) {
29
_errorXX
=
config
.getParameter<
double
>(
"errorXX"
);
30
}
31
32
if
(
config
.exists(
"errorXY"
)) {
33
_errorXY
=
config
.getParameter<
double
>(
"errorXY"
);
34
}
35
36
if
(
config
.exists(
"errorYY"
)) {
37
_errorYY
=
config
.getParameter<
double
>(
"errorYY"
);
38
}
39
}
40
41
TrackingRecHitProductPtr
process
(
TrackingRecHitProductPtr
product)
const override
{
42
for
(
const
std::pair<unsigned int, const PSimHit*>& simHitIdPair : product->getSimHitIdPairs()) {
43
const
PSimHit
*
simHit
= simHitIdPair.second;
44
const
Local3DPoint
&
position
=
simHit
->localPosition();
45
LocalError
error
(
_errorXX
,
_errorXY
,
_errorYY
);
46
const
GeomDet
* geomDet =
getTrackerGeometry
().
idToDetUnit
(product->getDetId());
47
48
//TODO: this is only a minimal example
49
FastSingleTrackerRecHit
recHit
(
50
position
,
//const LocalPoint &
51
error
,
//const LocalError &
52
*geomDet,
//GeomDet const &idet
53
fastTrackerRecHitType
::
54
siPixel
// since this is a dummy class anyway: pretend all hits are pixel hits (only effect: hits are defined in 2D (?))
55
);
56
product->addRecHit(
recHit
, {simHitIdPair});
57
}
58
59
return
product;
60
}
61
};
62
63
DEFINE_EDM_PLUGIN
(
TrackingRecHitAlgorithmFactory
,
TrackingRecHitNoSmearingPlugin
,
"TrackingRecHitNoSmearingPlugin"
);
rpcPointValidation_cfi.recHit
recHit
Definition:
rpcPointValidation_cfi.py:7
FastSingleTrackerRecHit
Definition:
FastSingleTrackerRecHit.h:7
rpcPointValidation_cfi.simHit
simHit
Definition:
rpcPointValidation_cfi.py:24
TrackerGeometry::idToDetUnit
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition:
TrackerGeometry.cc:183
relativeConstraints.error
error
Definition:
relativeConstraints.py:53
TrackingRecHitNoSmearingPlugin::_errorXX
double _errorXX
Definition:
TrackingRecHitNoSmearingPlugin.cc:16
GeomDet
Definition:
GeomDet.h:27
fastTrackerRecHitType
Definition:
FastTrackerRecHit.h:15
config
Definition:
config.py:1
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
ParameterSet.h
TrackingRecHitNoSmearingPlugin
Definition:
TrackingRecHitNoSmearingPlugin.cc:14
edmplugin::PluginFactory
Definition:
PluginFactory.h:35
TrackingRecHitAlgorithmFactory.h
TrackingRecHitNoSmearingPlugin::_errorYY
double _errorYY
Definition:
TrackingRecHitNoSmearingPlugin.cc:18
TrackingRecHitNoSmearingPlugin::_errorXY
double _errorXY
Definition:
TrackingRecHitNoSmearingPlugin.cc:17
TrackingRecHitProductPtr
std::shared_ptr< TrackingRecHitProduct > TrackingRecHitProductPtr
Definition:
TrackingRecHitProduct.h:47
PSimHit.h
LocalError
Definition:
LocalError.h:12
TrackingRecHitAlgorithm.h
FastSingleTrackerRecHit.h
fastTrackerRecHitType::siPixel
Definition:
FastTrackerRecHit.h:17
TrackingRecHitAlgorithm::getTrackerGeometry
const TrackerGeometry & getTrackerGeometry() const
Definition:
TrackingRecHitAlgorithm.cc:41
Point3DBase< float, LocalTag >
position
static int position[264][3]
Definition:
ReadPGInfo.cc:289
PSimHit
Definition:
PSimHit.h:15
edm::ParameterSet
Definition:
ParameterSet.h:48
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:123
TrackingRecHitNoSmearingPlugin::process
TrackingRecHitProductPtr process(TrackingRecHitProductPtr product) const override
Definition:
TrackingRecHitNoSmearingPlugin.cc:41
TrackingRecHitAlgorithm
Definition:
TrackingRecHitAlgorithm.h:22
DetId.h
edm::ConsumesCollector
Definition:
ConsumesCollector.h:45
Skims_PA_cff.name
name
Definition:
Skims_PA_cff.py:17
TrackingRecHitProduct.h
TrackingRecHitNoSmearingPlugin::TrackingRecHitNoSmearingPlugin
TrackingRecHitNoSmearingPlugin(const std::string &name, const edm::ParameterSet &config, edm::ConsumesCollector &consumesCollector)
Definition:
TrackingRecHitNoSmearingPlugin.cc:21
Generated for CMSSW Reference Manual by
1.8.14