22 class TrackAssociatorByHits;
25 bool trackIdHitPairLess(
const std::pair<unsigned int, const PSimHit*>&
a,
const std::pair<unsigned int, const PSimHit*>&
b) {
26 return a.first < b.first;
29 bool trackIdHitPairLessSort(
const std::pair<unsigned int, const PSimHit*>&
a,
const std::pair<unsigned int, const PSimHit*>&
b) {
30 if(a.first == b.first) {
31 const auto atof =
edm::isFinite(a.second->timeOfFlight()) ? a.second->timeOfFlight() : std::numeric_limits<decltype(a.second->timeOfFlight())>::
max();
32 const auto btof =
edm::isFinite(b.second->timeOfFlight()) ? b.second->timeOfFlight() : std::numeric_limits<decltype(b.second->timeOfFlight())>::
max();
35 return a.first < b.first;
44 for(
const auto&
tag: iConfig.
getParameter<std::vector<edm::InputTag>>(
"simHitToken")) {
61 for(
const auto&
simHit: *hsimhits) {
69 for (TrackingParticleCollection::const_iterator
t = tPC ->
begin();
t != tPC ->
end(); ++
t) {
73 bool isBpixtrack =
false, isFpixtrack =
false;
79 if(range.first == range.second)
continue;
81 auto iHitPtr = range.first;
82 for(; iHitPtr != range.second; ++iHitPtr) {
89 uint32_t subdetid = (
id.subdetId());
96 if ( isBpixtrack || isFpixtrack ) {
102 histo[
PT].fill(
sqrt(
t->momentum().perp2()),
id, &iEvent);
T getParameter(std::string const &) const
std::vector< TrackingParticle > TrackingParticleCollection
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
simTrack
per collection params
EncodedEventId eventId() const
std::vector< std::pair< unsigned int, const PSimHit * > > trackIdToHitPtr_
edm::EDGetTokenT< TrackingParticleCollection > vec_TrackingParticle_Token_
T const * product() const
void analyze(const edm::Event &, const edm::EventSetup &)
std::vector< HistogramManager > histo
SiPixelPhase1TrackingParticleV(const edm::ParameterSet &conf)
std::vector< edm::EDGetTokenT< std::vector< PSimHit > > > simHitTokens_
unsigned int detUnitId() const