28 pixelBarrelLowToken_(consumes<
edm::
PSimHitContainer>(iConfig.getParameter<
edm::InputTag>(
"pixBarrelLowSrc"))),
29 pixelBarrelHighToken_(consumes<
edm::
PSimHitContainer>(iConfig.getParameter<
edm::InputTag>(
"pixBarrelHighSrc"))),
30 pixelForwardLowToken_(consumes<
edm::
PSimHitContainer>(iConfig.getParameter<
edm::InputTag>(
"pixForwardLowSrc"))),
31 pixelForwardHighToken_(consumes<
edm::
PSimHitContainer>(iConfig.getParameter<
edm::InputTag>(
"pixForwardHighSrc"))),
33 tracksToken_(consumes<
edm::
View<
reco::Track>>(iConfig.getParameter<
edm::InputTag>(
"tracksTag"))),
36 iConfig.getParameter<
edm::InputTag>(
"trackAssociatorByHitsTag"))) {}
56 if (!forwardHighInput.
isValid())
59 edm::PSimHitContainer::const_iterator it;
67 for (it = barrelLowInput->begin(); it != barrelLowInput->end(); ++it) {
68 auto id =
DetId(it->detUnitId());
70 GlobalPoint gpos = det->toGlobal(it->localPosition());
72 float tof = it->timeOfFlight();
73 float globalR = gpos.
mag();
75 float energyLoss = it->energyLoss();
77 float entryExitX = (it->entryPoint().x() - it->exitPoint().x());
78 float entryExitY = (it->entryPoint().y() - it->exitPoint().y());
79 float entryExitZ =
std::abs(it->entryPoint().z() - it->exitPoint().z());
81 float localX = it->localPosition().x();
82 float localY = it->localPosition().y();
83 float localZ = it->localPosition().z();
84 float localPhi = it->localPosition().phi();
85 float localEta = it->localPosition().eta();
99 for (it = barrelHighInput->begin(); it != barrelHighInput->end(); ++it) {
100 auto id =
DetId(it->detUnitId());
102 GlobalPoint gpos = det->toGlobal(it->localPosition());
104 float tof = it->timeOfFlight();
105 float globalR = gpos.
mag();
107 float energyLoss = it->energyLoss();
109 float entryExitX = (it->entryPoint().x() - it->exitPoint().x());
110 float entryExitY = (it->entryPoint().y() - it->exitPoint().y());
111 float entryExitZ =
std::abs(it->entryPoint().z() - it->exitPoint().z());
113 float localX = it->localPosition().x();
114 float localY = it->localPosition().y();
115 float localZ = it->localPosition().z();
116 float localPhi = it->localPosition().phi();
117 float localEta = it->localPosition().eta();
132 for (it = forwardLowInput->begin(); it != forwardLowInput->end(); ++it) {
133 auto id =
DetId(it->detUnitId());
135 GlobalPoint gpos = det->toGlobal(it->localPosition());
137 float tof = it->timeOfFlight();
138 float globalR = gpos.
mag();
140 float energyLoss = it->energyLoss();
142 float entryExitX = (it->entryPoint().x() - it->exitPoint().x());
143 float entryExitY = (it->entryPoint().y() - it->exitPoint().y());
144 float entryExitZ =
std::abs(it->entryPoint().z() - it->exitPoint().z());
146 float localX = it->localPosition().x();
147 float localY = it->localPosition().y();
148 float localZ = it->localPosition().z();
149 float localPhi = it->localPosition().phi();
150 float localEta = it->localPosition().eta();
165 for (it = forwardHighInput->begin(); it != forwardHighInput->end(); ++it) {
166 auto id =
DetId(it->detUnitId());
168 GlobalPoint gpos = det->toGlobal(it->localPosition());
170 float tof = it->timeOfFlight();
171 float globalR = gpos.
mag();
173 float energyLoss = it->energyLoss();
175 float entryExitX = (it->entryPoint().x() - it->exitPoint().x());
176 float entryExitY = (it->entryPoint().y() - it->exitPoint().y());
177 float entryExitZ =
std::abs(it->entryPoint().z() - it->exitPoint().z());
179 float localX = it->localPosition().x();
180 float localY = it->localPosition().y();
181 float localZ = it->localPosition().z();
182 float localPhi = it->localPosition().phi();
183 float localEta = it->localPosition().eta();
207 if (!theHitsAssociator.
isValid()) {
221 auto iter = p.
find(track);
std::vector< TrackingParticle > TrackingParticleCollection
const_iterator end() const
last iterator over the map (read only)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const_iterator find(const key_type &k) const
find element with specified reference key
edm::EDGetTokenT< edm::PSimHitContainer > pixelBarrelHighToken_
constexpr uint16_t localY(uint16_t py)
edm::EDGetTokenT< edm::PSimHitContainer > pixelForwardHighToken_
SiPixelPhase1HitsV(const edm::ParameterSet &conf)
edm::EDGetTokenT< reco::TrackToTrackingParticleAssociator > trackAssociatorByHitsToken_
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< edm::View< reco::Track > > tracksToken_
Abs< T >::type abs(const T &t)
edm::EDGetTokenT< edm::PSimHitContainer > pixelBarrelLowToken_
reco::RecoToSimCollection associateRecoToSim(const edm::Handle< edm::View< reco::Track >> &tCH, const edm::Handle< TrackingParticleCollection > &tPCH) const
T const * product() const
constexpr uint16_t localX(uint16_t px)
void analyze(const edm::Event &, const edm::EventSetup &) override
std::vector< HistogramManager > histo
std::vector< PSimHit > PSimHitContainer
unsigned int innerDetId() const
DetId of the detector on which surface the innermost state is located.
edm::EDGetTokenT< TrackingParticleCollection > tpToken_
edm::EDGetTokenT< edm::PSimHitContainer > pixelForwardLowToken_