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")) ),
42 if (!barrelLowInput.
isValid())
return;
46 if (!barrelHighInput.
isValid())
return;
50 if (!forwardLowInput.
isValid())
return;
54 if (!forwardHighInput.
isValid())
return;
56 edm::PSimHitContainer::const_iterator it;
64 for (it = barrelLowInput->begin(); it != barrelLowInput->end(); ++it) {
65 auto id =
DetId(it->detUnitId());
67 GlobalPoint gpos=det->toGlobal(it->localPosition());
69 float tof = it->timeOfFlight();
70 float globalR = gpos.
mag();
72 float energyLoss = it->energyLoss();
74 float entryExitX = ( it->entryPoint().x() - it->exitPoint().x() );
75 float entryExitY = ( it->entryPoint().y() - it->exitPoint().y() );
76 float entryExitZ =
std::abs( it->entryPoint().z() - it->exitPoint().z() );
78 float localX = it->localPosition().x();
79 float localY = it->localPosition().y();
80 float localZ = it->localPosition().z();
81 float localPhi = it->localPosition().phi();
82 float localEta = it->localPosition().eta();
96 for (it = barrelHighInput->begin(); it != barrelHighInput->end(); ++it) {
97 auto id =
DetId(it->detUnitId());
99 GlobalPoint gpos=det->toGlobal(it->localPosition());
101 float tof = it->timeOfFlight();
102 float globalR = gpos.
mag();
104 float energyLoss = it->energyLoss();
106 float entryExitX = ( it->entryPoint().x() - it->exitPoint().x() );
107 float entryExitY = ( it->entryPoint().y() - it->exitPoint().y() );
108 float entryExitZ =
std::abs( it->entryPoint().z() - it->exitPoint().z() );
110 float localX = it->localPosition().x();
111 float localY = it->localPosition().y();
112 float localZ = it->localPosition().z();
113 float localPhi = it->localPosition().phi();
114 float localEta = it->localPosition().eta();
129 for (it = forwardLowInput->begin(); it != forwardLowInput->end(); ++it) {
130 auto id =
DetId(it->detUnitId());
132 GlobalPoint gpos=det->toGlobal(it->localPosition());
134 float tof = it->timeOfFlight();
135 float globalR = gpos.
mag();
137 float energyLoss = it->energyLoss();
139 float entryExitX = ( it->entryPoint().x() - it->exitPoint().x() );
140 float entryExitY = ( it->entryPoint().y() - it->exitPoint().y() );
141 float entryExitZ =
std::abs( it->entryPoint().z() - it->exitPoint().z() );
143 float localX = it->localPosition().x();
144 float localY = it->localPosition().y();
145 float localZ = it->localPosition().z();
146 float localPhi = it->localPosition().phi();
147 float localEta = it->localPosition().eta();
162 for (it = forwardHighInput->begin(); it != forwardHighInput->end(); ++it) {
163 auto id =
DetId(it->detUnitId());
165 GlobalPoint gpos=det->toGlobal(it->localPosition());
167 float tof = it->timeOfFlight();
168 float globalR = gpos.
mag();
170 float energyLoss = it->energyLoss();
172 float entryExitX = ( it->entryPoint().x() - it->exitPoint().x() );
173 float entryExitY = ( it->entryPoint().y() - it->exitPoint().y() );
174 float entryExitZ =
std::abs( it->entryPoint().z() - it->exitPoint().z() );
176 float localX = it->localPosition().x();
177 float localY = it->localPosition().y();
178 float localZ = it->localPosition().z();
179 float localPhi = it->localPosition().phi();
180 float localEta = it->localPosition().eta();
205 if ( ! theHitsAssociator.
isValid() ) {
218 auto iter = p.
find(track);
std::vector< TrackingParticle > TrackingParticleCollection
edm::EDGetTokenT< TrackingParticleCollection > tpToken_
const_iterator end() const
last iterator over the map (read only)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
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)
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Abs< T >::type abs(const T &t)
edm::EDGetTokenT< reco::TrackToTrackingParticleAssociator > trackAssociatorByHitsToken_
edm::EDGetTokenT< edm::PSimHitContainer > pixelBarrelLowToken_
T const * product() const
reco::RecoToSimCollection associateRecoToSim(const edm::Handle< edm::View< reco::Track > > &tCH, const edm::Handle< TrackingParticleCollection > &tPCH) const
compare reco to sim the handle of reco::Track and TrackingParticle collections
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< edm::View< reco::Track > > tracksToken_
edm::EDGetTokenT< edm::PSimHitContainer > pixelForwardLowToken_