86 #include <unordered_set> 87 #include <unordered_map> 106 default:
return "UNKNOWN TRACKER HIT TYPE";
110 struct ProductIDSetPrinter {
111 ProductIDSetPrinter(
const std::set<edm::ProductID>&
set): set_(set) {}
113 void print(std::ostream& os)
const {
114 for(
const auto& item: set_) {
119 const std::set<edm::ProductID>& set_;
121 std::ostream&
operator<<(std::ostream& os,
const ProductIDSetPrinter&
o) {
125 template <
typename T>
126 struct ProductIDMapPrinter {
127 ProductIDMapPrinter(
const std::map<edm::ProductID, T>&
map):
map_(map) {}
129 void print(std::ostream& os)
const {
130 for(
const auto& item:
map_) {
131 os << item.first <<
" ";
135 const std::map<edm::ProductID, T>&
map_;
137 template <
typename T>
138 auto make_ProductIDMapPrinter(
const std::map<edm::ProductID, T>&
map) {
139 return ProductIDMapPrinter<T>(
map);
141 template <
typename T>
142 std::ostream& operator<<(std::ostream& os, const ProductIDMapPrinter<T>&
o) {
147 template <
typename T>
148 struct VectorPrinter {
149 VectorPrinter(
const std::vector<T>& vec): vec_(vec) {}
151 void print(std::ostream& os)
const {
152 for(
const auto& item: vec_) {
157 const std::vector<T>& vec_;
159 template <
typename T>
160 auto make_VectorPrinter(
const std::vector<T>& vec) {
161 return VectorPrinter<T>(vec);
163 template <
typename T>
164 std::ostream& operator<<(std::ostream& os, const VectorPrinter<T>&
o) {
169 void checkProductID(
const std::set<edm::ProductID>&
set,
const edm::ProductID&
id,
const char *
name) {
171 throw cms::Exception(
"Configuration") <<
"Got " << name <<
" with a hit with ProductID " <<
id 172 <<
" which does not match to the set of ProductID's for the hits: " 173 << ProductIDSetPrinter(
set)
174 <<
". Usually this is caused by a wrong hit collection in the configuration.";
177 template <
typename SimLink,
typename Func>
179 for(
const auto& link: digiSimLinks) {
180 if(link.channel() == channel) {
186 std::map<unsigned int, double> chargeFraction(
const SiPixelCluster& cluster,
const DetId& detId,
188 std::map<unsigned int, double> simTrackIdToAdc;
190 auto idetset = digiSimLink.
find(detId);
191 if(idetset == digiSimLink.
end())
192 return simTrackIdToAdc;
196 for(
int iPix=0; iPix != cluster.
size(); ++iPix) {
200 forEachMatchedSimLink(*idetset, channel, [&](
const PixelDigiSimLink& simLink){
206 for(
auto& pair: simTrackIdToAdc) {
210 pair.second /= adcSum;
213 return simTrackIdToAdc;
216 std::map<unsigned int, double> chargeFraction(
const SiStripCluster& cluster,
const DetId& detId,
218 std::map<unsigned int, double> simTrackIdToAdc;
220 auto idetset = digiSimLink.
find(detId);
221 if(idetset == digiSimLink.
end())
222 return simTrackIdToAdc;
230 double& adc = simTrackIdToAdc[simLink.
SimTrackId()];
234 for(
const auto& pair: simTrackIdToAdc) {
235 simTrackIdToAdc[pair.first] = (adcSum != 0. ? pair.second/adcSum : 0.);
239 return simTrackIdToAdc;
245 std::map<unsigned int, double> simTrackIdToAdc;
246 throw cms::Exception(
"LogicError") <<
"Not possible to use StripDigiSimLink with Phase2TrackerCluster1D! ";
247 return simTrackIdToAdc;
254 std::map<unsigned int, double> simTrackIdToAdc;
255 return simTrackIdToAdc;
275 void clearVariables();
327 const TrackingParticleRefKeyToIndex& tpKeyToIndex,
332 const SimHitRefKeyToIndex& simHitRefKeyToIndex,
333 std::set<edm::ProductID>& hitProductIds
336 void fillStripRphiStereoHits(
const edm::Event& iEvent,
338 const TrackingParticleRefKeyToIndex& tpKeyToIndex,
343 const SimHitRefKeyToIndex& simHitRefKeyToIndex,
344 std::set<edm::ProductID>& hitProductIds
347 void fillStripMatchedHits(
const edm::Event& iEvent,
350 std::vector<std::pair<int, int> >& monoStereoClusterList
353 void fillPhase2OTHits(
const edm::Event& iEvent,
355 const TrackingParticleRefKeyToIndex& tpKeyToIndex,
360 const SimHitRefKeyToIndex& simHitRefKeyToIndex,
361 std::set<edm::ProductID>& hitProductIds
366 const TrackingParticleRefKeyToIndex& tpKeyToIndex,
371 const std::vector<std::pair<int, int> >& monoStereoClusterList,
372 const std::set<edm::ProductID>& hitProductIds,
373 std::map<edm::ProductID, size_t>& seedToCollIndex
378 const TrackingParticleRefKeyToIndex& tpKeyToIndex,
383 const std::set<edm::ProductID>& hitProductIds,
384 const std::map<edm::ProductID, size_t>& seedToCollIndex
388 const TrackingParticleRefKeyToIndex& tpKeyToIndex,
391 SimHitRefKeyToIndex& simHitRefKeyToIndex,
392 std::vector<TPHitIndex>& tpHitList);
397 const TrackingVertexRefKeyToIndex& tvKeyToIndex,
399 const std::vector<TPHitIndex>& tpHitList
406 const TrackingParticleRefKeyToIndex& tpKeyToIndex
419 template <
typename SimLink>
421 DetId hitId,
int clusterKey,
424 const TrackingParticleRefKeyToIndex& tpKeyToIndex,
427 const SimHitRefKeyToIndex& simHitRefKeyToIndex,
432 std::vector<edm::EDGetTokenT<edm::View<reco::Track> > >
seedTokens_;
741 return consumes<edm::View<reco::Track> >(
tag);
765 includeSeeds_(iConfig.getUntrackedParameter<
bool>(
"includeSeeds")),
768 const bool tpRef = iConfig.getUntrackedParameter<
bool>(
"trackingParticlesRef");
771 trackingParticleRefToken_ = consumes<TrackingParticleRefVector>(
tpTag);
774 trackingParticleToken_ = consumes<TrackingParticleCollection>(
tpTag);
779 t = fs->
make<TTree>(
"tree",
"tree");
781 t->Branch(
"event" , &ev_event);
782 t->Branch(
"lumi" , &ev_lumi);
783 t->Branch(
"run" , &ev_run);
786 t->Branch(
"trk_px" , &trk_px);
787 t->Branch(
"trk_py" , &trk_py);
788 t->Branch(
"trk_pz" , &trk_pz);
789 t->Branch(
"trk_pt" , &trk_pt);
790 t->Branch(
"trk_inner_px" , &trk_inner_px);
791 t->Branch(
"trk_inner_py" , &trk_inner_py);
792 t->Branch(
"trk_inner_pz" , &trk_inner_pz);
793 t->Branch(
"trk_inner_pt" , &trk_inner_pt);
794 t->Branch(
"trk_outer_px" , &trk_outer_px);
795 t->Branch(
"trk_outer_py" , &trk_outer_py);
796 t->Branch(
"trk_outer_pz" , &trk_outer_pz);
797 t->Branch(
"trk_outer_pt" , &trk_outer_pt);
798 t->Branch(
"trk_eta" , &trk_eta);
799 t->Branch(
"trk_lambda" , &trk_lambda);
800 t->Branch(
"trk_cotTheta" , &trk_cotTheta);
801 t->Branch(
"trk_phi" , &trk_phi);
802 t->Branch(
"trk_dxy" , &trk_dxy );
803 t->Branch(
"trk_dz" , &trk_dz );
804 t->Branch(
"trk_ptErr" , &trk_ptErr );
805 t->Branch(
"trk_etaErr" , &trk_etaErr );
806 t->Branch(
"trk_lambdaErr", &trk_lambdaErr);
807 t->Branch(
"trk_phiErr" , &trk_phiErr );
808 t->Branch(
"trk_dxyErr" , &trk_dxyErr );
809 t->Branch(
"trk_dzErr" , &trk_dzErr );
810 t->Branch(
"trk_refpoint_x", &trk_refpoint_x);
811 t->Branch(
"trk_refpoint_y", &trk_refpoint_y);
812 t->Branch(
"trk_refpoint_z", &trk_refpoint_z);
813 t->Branch(
"trk_nChi2" , &trk_nChi2);
814 t->Branch(
"trk_q" , &trk_q);
815 t->Branch(
"trk_nValid" , &trk_nValid );
816 t->Branch(
"trk_nInvalid" , &trk_nInvalid);
817 t->Branch(
"trk_nPixel" , &trk_nPixel );
818 t->Branch(
"trk_nStrip" , &trk_nStrip );
819 t->Branch(
"trk_nPixelLay", &trk_nPixelLay);
820 t->Branch(
"trk_nStripLay", &trk_nStripLay);
821 t->Branch(
"trk_n3DLay" , &trk_n3DLay );
822 t->Branch(
"trk_nOuterLost", &trk_nOuterLost );
823 t->Branch(
"trk_nInnerLost", &trk_nInnerLost );
824 t->Branch(
"trk_algo" , &trk_algo );
825 t->Branch(
"trk_originalAlgo", &trk_originalAlgo);
835 if(includeAllHits_) {
843 t->Branch(
"sim_px" , &
sim_px );
844 t->Branch(
"sim_py" , &
sim_py );
845 t->Branch(
"sim_pz" , &
sim_pz );
846 t->Branch(
"sim_pt" , &
sim_pt );
847 t->Branch(
"sim_eta" , &
sim_eta );
848 t->Branch(
"sim_phi" , &
sim_phi );
856 t->Branch(
"sim_q" , &
sim_q );
867 if(includeAllHits_) {
870 if(includeAllHits_) {
873 t->Branch(
"pix_det" , &
pix_det );
874 t->Branch(
"pix_lay" , &
pix_lay );
883 t->Branch(
"pix_x" , &
pix_x );
884 t->Branch(
"pix_y" , &
pix_y );
885 t->Branch(
"pix_z" , &
pix_z );
886 t->Branch(
"pix_xx" , &
pix_xx );
887 t->Branch(
"pix_xy" , &
pix_xy );
888 t->Branch(
"pix_yy" , &
pix_yy );
889 t->Branch(
"pix_yz" , &
pix_yz );
890 t->Branch(
"pix_zz" , &
pix_zz );
891 t->Branch(
"pix_zx" , &
pix_zx );
896 if(includeStripHits_){
899 t->Branch(
"str_det" , &
str_det );
900 t->Branch(
"str_lay" , &
str_lay );
909 t->Branch(
"str_x" , &
str_x );
910 t->Branch(
"str_y" , &
str_y );
911 t->Branch(
"str_z" , &
str_z );
912 t->Branch(
"str_xx" , &
str_xx );
913 t->Branch(
"str_xy" , &
str_xy );
914 t->Branch(
"str_yy" , &
str_yy );
915 t->Branch(
"str_yz" , &
str_yz );
916 t->Branch(
"str_zz" , &
str_zz );
917 t->Branch(
"str_zx" , &
str_zx );
922 t->Branch(
"glu_det" , &
glu_det );
923 t->Branch(
"glu_lay" , &
glu_lay );
930 t->Branch(
"glu_x" , &
glu_x );
931 t->Branch(
"glu_y" , &
glu_y );
932 t->Branch(
"glu_z" , &
glu_z );
933 t->Branch(
"glu_xx" , &
glu_xx );
934 t->Branch(
"glu_xy" , &
glu_xy );
935 t->Branch(
"glu_yy" , &
glu_yy );
936 t->Branch(
"glu_yz" , &
glu_yz );
937 t->Branch(
"glu_zz" , &
glu_zz );
938 t->Branch(
"glu_zx" , &
glu_zx );
943 if(includePhase2OTHits_){
945 t->Branch(
"ph2_det" , &
ph2_det );
946 t->Branch(
"ph2_lay" , &
ph2_lay );
954 t->Branch(
"ph2_x" , &
ph2_x );
955 t->Branch(
"ph2_y" , &
ph2_y );
956 t->Branch(
"ph2_z" , &
ph2_z );
957 t->Branch(
"ph2_xx" , &
ph2_xx );
958 t->Branch(
"ph2_xy" , &
ph2_xy );
959 t->Branch(
"ph2_yy" , &
ph2_yy );
960 t->Branch(
"ph2_yz" , &
ph2_yz );
961 t->Branch(
"ph2_zz" , &
ph2_zz );
962 t->Branch(
"ph2_zx" , &
ph2_zx );
969 t->Branch(
"inv_det" , &
inv_det );
970 t->Branch(
"inv_lay" , &
inv_lay );
990 t->Branch(
"bsp_x" , &
bsp_x ,
"bsp_x/F");
991 t->Branch(
"bsp_y" , &
bsp_y ,
"bsp_y/F");
992 t->Branch(
"bsp_z" , &
bsp_z ,
"bsp_z/F");
993 t->Branch(
"bsp_sigmax" , &
bsp_sigmax ,
"bsp_sigmax/F");
994 t->Branch(
"bsp_sigmay" , &
bsp_sigmay ,
"bsp_sigmay/F");
995 t->Branch(
"bsp_sigmaz" , &
bsp_sigmaz ,
"bsp_sigmaz/F");
999 t->Branch(
"see_px" , &
see_px );
1000 t->Branch(
"see_py" , &
see_py );
1001 t->Branch(
"see_pz" , &
see_pz );
1002 t->Branch(
"see_pt" , &
see_pt );
1003 t->Branch(
"see_eta" , &
see_eta );
1004 t->Branch(
"see_phi" , &
see_phi );
1005 t->Branch(
"see_dxy" , &
see_dxy );
1006 t->Branch(
"see_dz" , &
see_dz );
1012 t->Branch(
"see_chi2" , &
see_chi2 );
1013 t->Branch(
"see_q" , &
see_q );
1019 t->Branch(
"see_algo" , &
see_algo );
1023 if(includeAllHits_) {
1032 t->Branch(
"vtx_x" , &
vtx_x);
1033 t->Branch(
"vtx_y" , &
vtx_y);
1034 t->Branch(
"vtx_z" , &
vtx_z);
1080 trk_inner_px .clear();
1081 trk_inner_py .clear();
1082 trk_inner_pz .clear();
1083 trk_inner_pt .clear();
1084 trk_outer_px .clear();
1085 trk_outer_py .clear();
1086 trk_outer_pz .clear();
1087 trk_outer_pt .clear();
1089 trk_lambda .clear();
1090 trk_cotTheta .clear();
1095 trk_etaErr .clear();
1096 trk_lambdaErr.clear();
1097 trk_phiErr .clear();
1098 trk_dxyErr .clear();
1100 trk_refpoint_x.clear();
1101 trk_refpoint_y.clear();
1102 trk_refpoint_z.clear();
1105 trk_nValid .clear();
1106 trk_nInvalid .clear();
1107 trk_nPixel .clear();
1108 trk_nStrip .clear();
1109 trk_nPixelLay.clear();
1110 trk_nStripLay.clear();
1111 trk_n3DLay .clear();
1112 trk_nOuterLost.clear();
1113 trk_nInnerLost.clear();
1115 trk_originalAlgo.clear();
1323 using namespace edm;
1324 using namespace reco;
1325 using namespace std;
1342 iEvent.
getByToken(trackAssociatorToken_, theAssociator);
1345 LogDebug(
"TrackingNtuple") <<
"Analyzing new event";
1354 TrackingParticleRefKeySet tmpTPkeys;
1360 iEvent.
getByToken(trackingParticleToken_, TPCollectionH);
1361 for(
size_t i=0,
size=TPCollectionH->size();
i<
size; ++
i) {
1367 iEvent.
getByToken(trackingParticleRefToken_, TPCollectionHRefVector);
1368 tmpTPptr = TPCollectionHRefVector.
product();
1369 for(
const auto& ref: *tmpTPptr) {
1370 tmpTPkeys.insert(ref.key());
1376 TrackingParticleRefKeyToIndex tpKeyToIndex;
1377 for(
size_t i=0;
i<tpCollection.
size(); ++
i) {
1378 tpKeyToIndex[tpCollection[
i].key()] =
i;
1383 iEvent.
getByToken(trackingVertexToken_, htv);
1388 TrackingVertexRefKeyToIndex tvKeyToIndex;
1389 for(
size_t i=0;
i<tvs.size(); ++
i) {
1393 tvKeyToIndex[
i] = tvRefs.
size();
1399 iEvent.
getByToken(clusterTPMapToken_, pCluster2TPListH);
1402 iEvent.
getByToken(simHitTPMapToken_, simHitsTPAssoc);
1405 SimHitRefKeyToIndex simHitRefKeyToIndex;
1408 std::vector<TPHitIndex> tpHitList;
1410 std::set<edm::ProductID> hitProductIds;
1411 std::map<edm::ProductID, size_t> seedCollToOffset;
1413 ev_run = iEvent.
id().
run();
1415 ev_event = iEvent.
id().
event();
1419 iEvent.
getByToken(pixelSimLinkToken_, pixelDigiSimLinksHandle);
1420 const auto& pixelDigiSimLinks = *pixelDigiSimLinksHandle;
1423 iEvent.
getByToken(stripSimLinkToken_, stripDigiSimLinksHandle);
1427 iEvent.
getByToken(siphase2OTSimLinksToken_, siphase2OTSimLinksHandle);
1431 iEvent.
getByToken(beamSpotToken_, recoBeamSpotHandle);
1432 BeamSpot const & bs = *recoBeamSpotHandle;
1437 vector<pair<int,int> > monoStereoClusterList;
1438 if(includeAllHits_) {
1440 fillSimHits(tracker, tpKeyToIndex, *simHitsTPAssoc, tTopo, simHitRefKeyToIndex, tpHitList);
1443 fillPixelHits(iEvent, clusterToTPMap, tpKeyToIndex, *simHitsTPAssoc, pixelDigiSimLinks, *theTTRHBuilder, tTopo, simHitRefKeyToIndex, hitProductIds);
1446 if(includeStripHits_){
1447 LogDebug(
"TrackingNtuple") <<
"foundStripSimLink" ;
1448 const auto& stripDigiSimLinks = *stripDigiSimLinksHandle;
1449 fillStripRphiStereoHits(iEvent, clusterToTPMap, tpKeyToIndex, *simHitsTPAssoc, stripDigiSimLinks, *theTTRHBuilder, tTopo, simHitRefKeyToIndex, hitProductIds);
1455 if(includePhase2OTHits_){
1456 LogDebug(
"TrackingNtuple") <<
"foundPhase2OTSimLinks" ;
1457 const auto& phase2OTSimLinks = *siphase2OTSimLinksHandle;
1458 fillPhase2OTHits(iEvent, clusterToTPMap, tpKeyToIndex, *simHitsTPAssoc, phase2OTSimLinks, *theTTRHBuilder, tTopo, simHitRefKeyToIndex, hitProductIds);
1464 fillSeeds(iEvent, tpCollection, tpKeyToIndex, bs, associatorByHits, *theTTRHBuilder, theMF.
product(), monoStereoClusterList, hitProductIds, seedCollToOffset);
1469 iEvent.
getByToken(trackToken_, tracksHandle);
1476 fillTracks(trackRefs, tpCollection, tpKeyToIndex, bs, associatorByHits, *theTTRHBuilder, tTopo, hitProductIds, seedCollToOffset);
1481 fillTrackingParticles(iEvent, iSetup, trackRefs, tpCollection, tvKeyToIndex, associatorByHits, tpHitList);
1505 template <
typename SimLink>
struct GetCluster;
1507 struct GetCluster<PixelDigiSimLink> {
1511 struct GetCluster<StripDigiSimLink> {
1516 template <
typename SimLink>
1518 DetId hitId,
int clusterKey,
1521 const TrackingParticleRefKeyToIndex& tpKeyToIndex,
1524 const SimHitRefKeyToIndex& simHitRefKeyToIndex,
1529 std::map<unsigned int, double> simTrackIdToChargeFraction;
1531 else simTrackIdToChargeFraction = chargeFraction(GetCluster<SimLink>::call(cluster), hitId, digiSimLinks);
1534 auto range = clusterToTPMap.
equal_range( cluster );
1535 if( range.first != range.second ) {
1536 for(
auto ip=range.first; ip != range.second; ++ip ) {
1540 const auto event = trackingParticle->eventId().event();
1541 const auto bx = trackingParticle->eventId().bunchCrossing();
1549 auto tpIndex = tpKeyToIndex.find(trackingParticle.
key());
1550 if( tpIndex == tpKeyToIndex.end())
1554 std::pair<TrackingParticleRef, TrackPSimHitRef> simHitTPpairWithDummyTP(trackingParticle,
TrackPSimHitRef());
1556 auto range = std::equal_range(simHitsTPAssoc.begin(), simHitsTPAssoc.end(),
1559 bool foundElectron =
false;
1561 for(
auto ip = range.first; ip != range.second; ++ip) {
1566 if(
std::abs(TPhit->particleType()) == 11 &&
std::abs(trackingParticle->pdgId()) != 11) {
1567 foundElectron =
true;
1571 simHitKey = TPhit.
key();
1572 simHitID = TPhit.
id();
1582 auto ex =
cms::Exception(
"LogicError") <<
"Did not find SimHit for reco hit DetId " << hitId.
rawId()
1583 <<
" for TP " << trackingParticle.
key() <<
" bx:event " << bx <<
":" <<
event 1584 <<
".\nFound SimHits from detectors ";
1585 for(
auto ip = range.first; ip != range.second; ++ip) {
1588 ex << dId.
rawId() <<
" ";
1590 if(trackingParticle->eventId().event() != 0) {
1591 ex <<
"\nSince this is a TrackingParticle from pileup, check that you're running the pileup mixing in playback mode.";
1595 auto simHitIndex = simHitRefKeyToIndex.at(std::make_pair(simHitKey, simHitID));
1598 double chargeFraction = 0.;
1599 for(
const SimTrack& simtrk: trackingParticle->g4Tracks()) {
1600 auto found = simTrackIdToChargeFraction.find(simtrk.trackId());
1601 if(found != simTrackIdToChargeFraction.end()) {
1602 chargeFraction += found->second;
1612 simhit_hitType[simHitIndex].push_back(static_cast<int>(hitType));
1620 const TrackingParticleRefKeyToIndex& tpKeyToIndex,
1623 SimHitRefKeyToIndex& simHitRefKeyToIndex,
1624 std::vector<TPHitIndex>& tpHitList) {
1626 for(
const auto&
assoc: simHitsTPAssoc) {
1627 auto tpKey =
assoc.first.key();
1631 auto found = tpKeyToIndex.find(tpKey);
1632 if(found == tpKeyToIndex.end())
1634 const auto tpIndex = found->second;
1637 const auto& simhit = *(
assoc.second);
1638 auto detId =
DetId(simhit.detUnitId());
1648 auto simHitKey = std::make_pair(
assoc.second.key(),
assoc.second.id());
1650 if(simHitRefKeyToIndex.find(simHitKey) != simHitRefKeyToIndex.end()) {
1651 for(
const auto& assoc2: simHitsTPAssoc) {
1652 if(std::make_pair(assoc2.second.key(), assoc2.second.id()) == simHitKey) {
1655 auto range1 = std::equal_range(simHitsTPAssoc.begin(), simHitsTPAssoc.end(),
1658 auto range2 = std::equal_range(simHitsTPAssoc.begin(), simHitsTPAssoc.end(),
1662 LogTrace(
"TrackingNtuple") <<
"Earlier TP " << assoc2.first.key() <<
" SimTrack Ids";
1663 for(
const auto&
simTrack: assoc2.first->g4Tracks()) {
1666 for(
auto iHit = range2.first; iHit != range2.second; ++iHit) {
1667 LogTrace(
"TrackingNtuple") <<
" SimHit " << iHit->second.key() <<
" " << iHit->second.id() <<
" tof " << iHit->second->tof() <<
" trackId " << iHit->second->trackId() <<
" BX:event " << iHit->second->eventId().bunchCrossing() <<
":" << iHit->second->eventId().event();
1669 LogTrace(
"TrackingNtuple") <<
"Current TP " <<
assoc.first.key() <<
" SimTrack Ids";
1673 for(
auto iHit = range1.first; iHit != range1.second; ++iHit) {
1674 LogTrace(
"TrackingNtuple") <<
" SimHit " << iHit->second.key() <<
" " << iHit->second.id() <<
" tof " << iHit->second->tof() <<
" trackId " << iHit->second->trackId() <<
" BX:event " << iHit->second->eventId().bunchCrossing() <<
":" << iHit->second->eventId().event();
1678 throw cms::Exception(
"LogicError") <<
"Got second time the SimHit " << simHitKey.first <<
" of " << simHitKey.second <<
", first time with TrackingParticle " << assoc2.first.key() <<
", now with " << tpKey;
1681 throw cms::Exception(
"LogicError") <<
"Got second time the SimHit " << simHitKey.first <<
" of " << simHitKey.second <<
", now with TrackingParticle " << tpKey <<
", but I didn't find the first occurrance!";
1686 throw cms::Exception(
"LogicError") <<
"Did not find a det unit for DetId " << simhit.detUnitId() <<
" from tracker geometry";
1688 const auto pos = det->surface().toGlobal(simhit.localPosition());
1689 const float tof = simhit.timeOfFlight();
1692 simHitRefKeyToIndex[simHitKey] = simHitIndex;
1711 tpHitList.emplace_back(tpKey, simHitIndex, tof, simhit.detUnitId());
1717 const TrackingParticleRefKeyToIndex& tpKeyToIndex,
1722 const SimHitRefKeyToIndex& simHitRefKeyToIndex,
1723 std::set<edm::ProductID>& hitProductIds
1726 iEvent.
getByToken(pixelRecHitToken_, pixelHits);
1727 for (
auto it = pixelHits->
begin(); it!=pixelHits->
end(); it++ ) {
1728 const DetId hitId = it->detId();
1729 for (
auto hit = it->begin();
hit!=it->end();
hit++ ) {
1732 hitProductIds.insert(
hit->cluster().
id());
1734 const int key =
hit->cluster().key();
1735 const int lay = tTopo.
layer(hitId);
1737 clusterToTPMap, tpKeyToIndex, simHitsTPAssoc, digiSimLink, simHitRefKeyToIndex,
HitType::Pixel);
1747 pix_x .push_back( ttrh->globalPosition().x() );
1748 pix_y .push_back( ttrh->globalPosition().y() );
1749 pix_z .push_back( ttrh->globalPosition().z() );
1750 pix_xx .push_back( ttrh->globalPositionError().cxx() );
1751 pix_xy .push_back( ttrh->globalPositionError().cyx() );
1752 pix_yy .push_back( ttrh->globalPositionError().cyy() );
1753 pix_yz .push_back( ttrh->globalPositionError().czy() );
1754 pix_zz .push_back( ttrh->globalPositionError().czz() );
1755 pix_zx .push_back( ttrh->globalPositionError().czx() );
1757 pix_radL .push_back( ttrh->surface()->mediumProperties().radLen() );
1758 pix_bbxi .push_back( ttrh->surface()->mediumProperties().xi() );
1759 LogTrace(
"TrackingNtuple") <<
"pixHit cluster=" << key
1762 <<
" rawId=" << hitId.
rawId()
1763 <<
" pos =" << ttrh->globalPosition()
1767 LogTrace(
"TrackingNtuple") <<
" firstMatchingSimHit=" << simHitIdx
1773 <<
" event=" << simHitData.
event[0];
1782 const TrackingParticleRefKeyToIndex& tpKeyToIndex,
1787 const SimHitRefKeyToIndex& simHitRefKeyToIndex,
1788 std::set<edm::ProductID>& hitProductIds
1792 iEvent.
getByToken(stripRphiRecHitToken_, rphiHits);
1794 iEvent.
getByToken(stripStereoRecHitToken_, stereoHits);
1798 str_det .resize(totalStripHits);
1799 str_lay .resize(totalStripHits);
1805 str_x .resize(totalStripHits);
1806 str_y .resize(totalStripHits);
1807 str_z .resize(totalStripHits);
1808 str_xx .resize(totalStripHits);
1809 str_xy .resize(totalStripHits);
1810 str_yy .resize(totalStripHits);
1811 str_yz .resize(totalStripHits);
1812 str_zz .resize(totalStripHits);
1813 str_zx .resize(totalStripHits);
1819 for(
const auto& detset: hits) {
1820 const DetId hitId = detset.detId();
1821 for(
const auto&
hit: detset) {
1824 hitProductIds.insert(
hit.cluster().
id());
1826 const int key =
hit.cluster().key();
1827 const int lay = tTopo.
layer(hitId);
1829 clusterToTPMap, tpKeyToIndex, simHitsTPAssoc, digiSimLink, simHitRefKeyToIndex,
HitType::Strip);
1837 str_x [
key] = ttrh->globalPosition().x();
1838 str_y [
key] = ttrh->globalPosition().y();
1839 str_z [
key] = ttrh->globalPosition().z();
1840 str_xx [
key] = ttrh->globalPositionError().cxx();
1841 str_xy [
key] = ttrh->globalPositionError().cyx();
1842 str_yy [
key] = ttrh->globalPositionError().cyy();
1843 str_yz [
key] = ttrh->globalPositionError().czy();
1844 str_zz [
key] = ttrh->globalPositionError().czz();
1845 str_zx [
key] = ttrh->globalPositionError().czx();
1847 str_radL [
key] = ttrh->surface()->mediumProperties().radLen();
1848 str_bbxi [
key] = ttrh->surface()->mediumProperties().xi();
1849 LogTrace(
"TrackingNtuple") << name <<
" cluster=" << key
1852 <<
" rawId=" << hitId.
rawId()
1853 <<
" pos =" << ttrh->globalPosition()
1857 LogTrace(
"TrackingNtuple") <<
" firstMatchingSimHit=" << simHitIdx
1864 <<
" event=" << simHitData.
event[0];
1870 fill(*rphiHits,
"stripRPhiHit",
false);
1871 fill(*stereoHits,
"stripStereoHit",
true);
1877 std::vector<std::pair<int, int> >& monoStereoClusterList
1880 iEvent.
getByToken(stripMatchedRecHitToken_, matchedHits);
1881 for (
auto it = matchedHits->
begin(); it!=matchedHits->
end(); it++ ) {
1882 const DetId hitId = it->detId();
1883 for (
auto hit = it->begin();
hit!=it->end();
hit++ ) {
1885 const int lay = tTopo.
layer(hitId);
1886 monoStereoClusterList.emplace_back(
hit->monoHit().cluster().key(),
hit->stereoHit().cluster().key());
1894 glu_x .push_back( ttrh->globalPosition().x() );
1895 glu_y .push_back( ttrh->globalPosition().y() );
1896 glu_z .push_back( ttrh->globalPosition().z() );
1897 glu_xx .push_back( ttrh->globalPositionError().cxx() );
1898 glu_xy .push_back( ttrh->globalPositionError().cyx() );
1899 glu_yy .push_back( ttrh->globalPositionError().cyy() );
1900 glu_yz .push_back( ttrh->globalPositionError().czy() );
1901 glu_zz .push_back( ttrh->globalPositionError().czz() );
1902 glu_zx .push_back( ttrh->globalPositionError().czx() );
1903 glu_radL .push_back( ttrh->surface()->mediumProperties().radLen() );
1904 glu_bbxi .push_back( ttrh->surface()->mediumProperties().xi() );
1905 LogTrace(
"TrackingNtuple") <<
"stripMatchedHit" 1906 <<
" cluster0=" <<
hit->stereoHit().cluster().key()
1907 <<
" cluster1=" <<
hit->monoHit().cluster().key()
1910 <<
" rawId=" << hitId.
rawId()
1911 <<
" pos =" << ttrh->globalPosition();
1918 const TrackingParticleRefKeyToIndex& tpKeyToIndex,
1923 const SimHitRefKeyToIndex& simHitRefKeyToIndex,
1924 std::set<edm::ProductID>& hitProductIds
1927 iEvent.
getByToken(phase2OTRecHitToken_, phase2OTHits);
1928 for (
auto it = phase2OTHits->
begin(); it!=phase2OTHits->
end(); it++ ) {
1929 const DetId hitId = it->detId();
1930 for (
auto hit = it->begin();
hit!=it->end();
hit++ ) {
1933 hitProductIds.insert(
hit->cluster().
id());
1935 const int key =
hit->cluster().key();
1936 const int lay = tTopo.
layer(hitId);
1938 clusterToTPMap, tpKeyToIndex, simHitsTPAssoc, digiSimLink, simHitRefKeyToIndex,
HitType::Phase2OT);
1948 ph2_x .push_back( ttrh->globalPosition().x() );
1949 ph2_y .push_back( ttrh->globalPosition().y() );
1950 ph2_z .push_back( ttrh->globalPosition().z() );
1951 ph2_xx .push_back( ttrh->globalPositionError().cxx() );
1952 ph2_xy .push_back( ttrh->globalPositionError().cyx() );
1953 ph2_yy .push_back( ttrh->globalPositionError().cyy() );
1954 ph2_yz .push_back( ttrh->globalPositionError().czy() );
1955 ph2_zz .push_back( ttrh->globalPositionError().czz() );
1956 ph2_zx .push_back( ttrh->globalPositionError().czx() );
1957 ph2_radL .push_back( ttrh->surface()->mediumProperties().radLen() );
1958 ph2_bbxi .push_back( ttrh->surface()->mediumProperties().xi() );
1960 LogTrace(
"TrackingNtuple") <<
"phase2 OT cluster=" << key
1963 <<
" rawId=" << hitId.
rawId()
1964 <<
" pos =" << ttrh->globalPosition()
1969 LogTrace(
"TrackingNtuple") <<
" firstMatchingSimHit=" << simHitIdx
1975 <<
" event=" << simHitData.
event[0];
1984 const TrackingParticleRefKeyToIndex& tpKeyToIndex,
1989 const std::vector<std::pair<int, int> >& monoStereoClusterList,
1990 const std::set<edm::ProductID>& hitProductIds,
1991 std::map<edm::ProductID, size_t>& seedCollToOffset
1994 for(
const auto& seedToken: seedTokens_) {
1996 iEvent.
getByToken(seedToken, seedTracksHandle);
2013 label.ReplaceAll(
"seedTracks",
"");
2014 label.ReplaceAll(
"Seeds",
"");
2015 label.ReplaceAll(
"muonSeeded",
"muonSeededStep");
2019 auto inserted = seedCollToOffset.emplace(
id,
see_fitok.size());
2020 if(!inserted.second)
2021 throw cms::Exception(
"Configuration") <<
"Trying to add seeds with ProductID " <<
id <<
" for a second time from collection " << labels.
module <<
", seed algo " << label <<
". Typically this is caused by a configuration problem.";
2024 LogTrace(
"TrackingNtuple") <<
"NEW SEED LABEL: " << label <<
" size: " <<
seedTracks.size() <<
" algo=" << algo
2025 <<
" ProductID " <<
id;
2027 for(
const auto& seedTrackRef: seedTrackRefs) {
2029 const auto& seedTrack = *seedTrackRef;
2030 const auto& seedRef = seedTrack.seedRef();
2031 const auto&
seed = *seedRef;
2033 if(seedRef.id() !=
id)
2034 throw cms::Exception(
"LogicError") <<
"All tracks in 'TracksFromSeeds' collection should point to seeds in the same collection. Now the element 0 had ProductID " <<
id <<
" while the element " << seedTrackRef.key() <<
" had " << seedTrackRef.id() <<
". The source collection is " << labels.
module <<
".";
2036 std::vector<float> sharedFraction;
2037 std::vector<int> tpIdx;
2038 auto foundTPs = recSimColl.
find(seedTrackRef);
2039 if (foundTPs != recSimColl.
end()) {
2040 for(
const auto tpQuality: foundTPs->val) {
2041 sharedFraction.push_back(tpQuality.second);
2042 tpIdx.push_back( tpKeyToIndex.at( tpQuality.first.key() ) );
2048 const int charge = seedTrack.charge();
2049 const float pt = seedFitOk ? seedTrack.pt() : 0;
2050 const float eta = seedFitOk ? seedTrack.eta() : 0;
2051 const float phi = seedFitOk ? seedTrack.phi() : 0;
2052 const int nHits = seedTrack.numberOfValidHits();
2054 const auto seedIndex =
see_fitok.size();
2058 see_px .push_back( seedFitOk ? seedTrack.px() : 0 );
2059 see_py .push_back( seedFitOk ? seedTrack.py() : 0 );
2060 see_pz .push_back( seedFitOk ? seedTrack.pz() : 0 );
2064 see_q .push_back( charge );
2069 see_ptErr .push_back( seedFitOk ? seedTrack.ptError() : 0);
2070 see_etaErr .push_back( seedFitOk ? seedTrack.etaError() : 0);
2071 see_phiErr .push_back( seedFitOk ? seedTrack.phiError() : 0);
2072 see_dxyErr .push_back( seedFitOk ? seedTrack.dxyError() : 0);
2073 see_dzErr .push_back( seedFitOk ? seedTrack.dzError() : 0);
2092 std::vector<int> hitIdx;
2093 std::vector<int> hitType;
2097 int subid = recHit->geographicalId().subdetId();
2102 if(includeAllHits_) {
2103 checkProductID(hitProductIds, clusterRef.id(),
"seed");
2106 hitIdx.push_back( clusterKey );
2112 if(includeAllHits_) {
2119 std::vector<std::pair<int,int> >::const_iterator
pos =
find( monoStereoClusterList.begin(), monoStereoClusterList.end(), std::make_pair(monoIdx,stereoIdx) );
2120 const auto gluedIndex =
std::distance(monoStereoClusterList.begin(), pos);
2121 if(includeAllHits_)
glu_seeIdx[gluedIndex].push_back(seedIndex);
2122 hitIdx.push_back( gluedIndex );
2127 unsigned int clusterKey;
2128 if(clusterRef.isPhase2()){
2131 clusterKey = clusterRef.cluster_strip().key();
2134 if(includeAllHits_) {
2135 checkProductID(hitProductIds, clusterRef.id(),
"seed");
2136 if(clusterRef.isPhase2()){
2143 hitIdx.push_back( clusterKey );
2144 if(clusterRef.isPhase2()){
2151 LogTrace(
"TrackingNtuple") <<
" not pixel and not Strip detector";
2165 std::vector<GlobalPoint>
gp(2);
2166 std::vector<GlobalError> ge(2);
2167 gp[0] = recHit0->globalPosition();
2168 ge[0] = recHit0->globalPositionError();
2169 gp[1] = recHit1->globalPosition();
2170 ge[1] = recHit1->globalPositionError();
2171 LogTrace(
"TrackingNtuple") <<
"seed " << seedTrackRef.key()
2172 <<
" pt=" << pt <<
" eta=" << eta <<
" phi=" << phi <<
" q=" << charge
2173 <<
" - PAIR - ids: " << recHit0->geographicalId().rawId() <<
" " << recHit1->geographicalId().rawId()
2174 <<
" hitpos: " << gp[0] <<
" " << gp[1]
2175 <<
" trans0: " << (recHit0->transientHits().size()>1 ? recHit0->transientHits()[0]->globalPosition() :
GlobalPoint(0,0,0))
2176 <<
" " << (recHit0->transientHits().size()>1 ? recHit0->transientHits()[1]->globalPosition() :
GlobalPoint(0,0,0))
2177 <<
" trans1: " << (recHit1->transientHits().size()>1 ? recHit1->transientHits()[0]->globalPosition() :
GlobalPoint(0,0,0))
2178 <<
" " << (recHit1->transientHits().size()>1 ? recHit1->transientHits()[1]->globalPosition() :
GlobalPoint(0,0,0))
2179 <<
" eta,phi: " << gp[0].
eta() <<
"," << gp[0].phi();
2180 }
else if (nHits==3) {
2187 gp[0] = recHit0->globalPosition();
2188 ge[0] = recHit0->globalPositionError();
2189 int subid0 = recHit0->geographicalId().subdetId();
2191 gp[1] = recHit1->globalPosition();
2192 ge[1] = recHit1->globalPositionError();
2193 int subid1 = recHit1->geographicalId().subdetId();
2195 gp[2] = recHit2->globalPosition();
2196 ge[2] = recHit2->globalPositionError();
2197 int subid2 = recHit2->geographicalId().subdetId();
2200 float seed_chi2 = rzLine.
chi2();
2203 LogTrace(
"TrackingNtuple") <<
"seed " << seedTrackRef.key()
2204 <<
" pt=" << pt <<
" eta=" << eta <<
" phi=" << phi <<
" q=" << charge
2205 <<
" - TRIPLET - ids: " << recHit0->geographicalId().rawId() <<
" " << recHit1->geographicalId().rawId() <<
" " << recHit2->geographicalId().rawId()
2206 <<
" hitpos: " <<
gp[0] <<
" " <<
gp[1] <<
" " <<
gp[2]
2207 <<
" trans0: " << (recHit0->transientHits().size()>1 ? recHit0->transientHits()[0]->globalPosition() :
GlobalPoint(0,0,0))
2208 <<
" " << (recHit0->transientHits().size()>1 ? recHit0->transientHits()[1]->globalPosition() :
GlobalPoint(0,0,0))
2209 <<
" trans1: " << (recHit1->transientHits().size()>1 ? recHit1->transientHits()[0]->globalPosition() :
GlobalPoint(0,0,0))
2210 <<
" " << (recHit1->transientHits().size()>1 ? recHit1->transientHits()[1]->globalPosition() :
GlobalPoint(0,0,0))
2211 <<
" trans2: " << (recHit2->transientHits().size()>1 ? recHit2->transientHits()[0]->globalPosition() :
GlobalPoint(0,0,0))
2212 <<
" " << (recHit2->transientHits().size()>1 ? recHit2->transientHits()[1]->globalPosition() :
GlobalPoint(0,0,0))
2213 <<
" local: " << recHit2->localPosition()
2215 <<
" eta,phi: " <<
gp[0].eta() <<
"," <<
gp[0].phi()
2216 <<
" pt,chi2: " << seed_pt <<
"," << seed_chi2;
2226 const TrackingParticleRefKeyToIndex& tpKeyToIndex,
2231 const std::set<edm::ProductID>& hitProductIds,
2232 const std::map<edm::ProductID, size_t>& seedCollToOffset
2237 LogTrace(
"TrackingNtuple") <<
"NEW TRACK LABEL: " << labels.
module;
2238 for(
size_t iTrack = 0; iTrack<tracks.
size(); ++iTrack) {
2239 const auto& itTrack = tracks[iTrack];
2241 bool isSimMatched =
false;
2242 std::vector<float> sharedFraction;
2243 std::vector<int> tpIdx;
2244 auto foundTPs = recSimColl.
find(itTrack);
2245 if (foundTPs != recSimColl.
end()) {
2246 if (!foundTPs->val.empty()) {
2247 nSimHits = foundTPs->val[0].first->numberOfTrackerHits();
2248 isSimMatched =
true;
2250 for(
const auto tpQuality: foundTPs->val) {
2251 sharedFraction.push_back(tpQuality.second);
2252 tpIdx.push_back( tpKeyToIndex.at( tpQuality.first.key() ) );
2255 int charge = itTrack->charge();
2256 float pt = itTrack->pt();
2257 float eta = itTrack->eta();
2258 const double lambda = itTrack->lambda();
2259 float chi2 = itTrack->normalizedChi2();
2260 float phi = itTrack->phi();
2261 int nHits = itTrack->numberOfValidHits();
2263 trk_px .push_back(itTrack->px());
2264 trk_py .push_back(itTrack->py());
2265 trk_pz .push_back(itTrack->pz());
2266 trk_pt .push_back(pt);
2267 trk_inner_px.push_back(itTrack->innerMomentum().x());
2268 trk_inner_py.push_back(itTrack->innerMomentum().y());
2269 trk_inner_pz.push_back(itTrack->innerMomentum().z());
2270 trk_inner_pt.push_back(itTrack->innerMomentum().rho());
2271 trk_outer_px.push_back(itTrack->outerMomentum().x());
2272 trk_outer_py.push_back(itTrack->outerMomentum().y());
2273 trk_outer_pz.push_back(itTrack->outerMomentum().z());
2274 trk_outer_pt.push_back(itTrack->outerMomentum().rho());
2275 trk_eta .push_back(eta);
2276 trk_lambda .push_back(lambda);
2277 trk_cotTheta .push_back(1/
tan(
M_PI*0.5-lambda));
2278 trk_phi .push_back(phi);
2279 trk_dxy .push_back(itTrack->dxy(bs.
position()));
2280 trk_dz .push_back(itTrack->dz(bs.
position()));
2281 trk_ptErr .push_back(itTrack->ptError());
2282 trk_etaErr .push_back(itTrack->etaError());
2283 trk_lambdaErr.push_back(itTrack->lambdaError());
2284 trk_phiErr .push_back(itTrack->phiError());
2285 trk_dxyErr .push_back(itTrack->dxyError());
2286 trk_dzErr .push_back(itTrack->dzError());
2287 trk_refpoint_x.push_back(itTrack->vx());
2288 trk_refpoint_y.push_back(itTrack->vy());
2289 trk_refpoint_z.push_back(itTrack->vz());
2290 trk_nChi2 .push_back( itTrack->normalizedChi2());
2292 trk_q .push_back(charge);
2302 trk_algo .push_back(itTrack->algo());
2303 trk_originalAlgo.push_back(itTrack->originalAlgo());
2308 auto offset = seedCollToOffset.find(itTrack->seedRef().id());
2309 if(
offset == seedCollToOffset.end()) {
2312 <<
"' refers to seed collection " << itTrack->seedRef().id()
2313 <<
", but that seed collection is not given as an input. The following collections were given as an input " << make_ProductIDMapPrinter(seedCollToOffset);
2316 const auto seedIndex =
offset->second + itTrack->seedRef().key();
2319 throw cms::Exception(
"LogicError") <<
"Track index has already been set for seed " << seedIndex <<
" to " <<
see_trkIdx[seedIndex] <<
"; was trying to set it to " << iTrack;
2325 LogTrace(
"TrackingNtuple") <<
"Track #" << itTrack.key() <<
" with q=" << charge
2326 <<
", pT=" << pt <<
" GeV, eta: " << eta <<
", phi: " << phi
2327 <<
", chi2=" << chi2
2328 <<
", Nhits=" << nHits
2329 <<
", algo=" << itTrack->algoName(itTrack->algo()).c_str()
2331 <<
" seed#=" << itTrack->seedRef().key()
2332 <<
" simMatch=" << isSimMatched
2333 <<
" nSimHits=" << nSimHits
2334 <<
" sharedFraction=" << (sharedFraction.empty()?-1:sharedFraction[0])
2335 <<
" tpIdx=" << (tpIdx.empty()?-1:tpIdx[0]);
2336 std::vector<int> hitIdx;
2337 std::vector<int> hitType;
2339 for(
auto i=itTrack->recHitsBegin();
i!=itTrack->recHitsEnd();
i++) {
2341 DetId hitId = hit->geographicalId();
2348 if (hit->isValid()) {
2352 unsigned int clusterKey;
2353 if(clusterRef.isPixel()){
2355 }
else if(clusterRef.isPhase2()){
2356 clusterKey = clusterRef.cluster_phase2OT().key();
2358 clusterKey = clusterRef.cluster_strip().key();
2361 LogTrace(
"TrackingNtuple") <<
" id: " << hitId.
rawId() <<
" - globalPos =" << hit->globalPosition()
2362 <<
" cluster=" << clusterKey
2363 <<
" clusterRef ID=" << clusterRef.id()
2364 <<
" eta,phi: " << hit->globalPosition().eta() <<
"," << hit->globalPosition().phi();
2365 if(includeAllHits_) {
2366 checkProductID(hitProductIds, clusterRef.id(),
"track");
2367 if(clusterRef.isPixel()){
2369 }
else if(clusterRef.isPhase2()){
2377 hitIdx.push_back(clusterKey);
2378 if(clusterRef.isPixel()){
2380 }
else if(clusterRef.isPhase2()){
2386 LogTrace(
"TrackingNtuple") <<
" - invalid hit";
2395 inv_type .push_back( hit->getType() );
2409 const TrackingVertexRefKeyToIndex& tvKeyToIndex,
2411 const std::vector<TPHitIndex>& tpHitList
2419 iEvent.
getByToken(tpNLayersToken_, tpNLayersH);
2420 const auto& nLayers_tPCeff = *tpNLayersH;
2422 iEvent.
getByToken(tpNPixelLayersToken_, tpNLayersH);
2423 const auto& nPixelLayers_tPCeff = *tpNLayersH;
2425 iEvent.
getByToken(tpNStripStereoLayersToken_, tpNLayersH);
2426 const auto& nStripMonoAndStereoLayers_tPCeff = *tpNLayersH;
2431 LogTrace(
"TrackingNtuple") <<
"tracking particle pt=" << tp->pt() <<
" eta=" << tp->eta() <<
" phi=" << tp->phi();
2432 bool isRecoMatched =
false;
2433 std::vector<int> tkIdx;
2434 std::vector<float> sharedFraction;
2435 auto foundTracks = simRecColl.
find(tp);
2436 if(foundTracks != simRecColl.
end()) {
2437 isRecoMatched =
true;
2443 LogTrace(
"TrackingNtuple") <<
"matched to tracks = " << make_VectorPrinter(tkIdx) <<
" isRecoMatched=" << isRecoMatched;
2444 sim_event .push_back(tp->eventId().event());
2447 sim_px .push_back(tp->px());
2448 sim_py .push_back(tp->py());
2449 sim_pz .push_back(tp->pz());
2450 sim_pt .push_back(tp->pt());
2451 sim_eta .push_back(tp->eta());
2452 sim_phi .push_back(tp->phi());
2453 sim_q .push_back(tp->charge());
2457 std::vector<int> decayIdx;
2458 for(
const auto&
v: tp->decayVertices())
2459 decayIdx.push_back( tvKeyToIndex.at(
v.key()) );
2465 float dxySim = (-vertex.x()*
sin(momentum.phi())+vertex.y()*
cos(momentum.phi()));
2466 float dzSim = vertex.z() - (vertex.x()*momentum.x()+vertex.y()*momentum.y())/
sqrt(momentum.perp2())
2467 * momentum.z()/
sqrt(momentum.perp2());
2468 const double lambdaSim =
M_PI/2 - momentum.theta();
2477 std::vector<int> hitIdx;
2478 int nPixel=0, nStrip=0;
2480 for(
auto ip = rangeHit.first; ip != rangeHit.second; ++ip) {
2484 LogTrace(
"TrackingNtuple") <<
"simhit=" << ip->simHitIdx <<
" type=" <<
static_cast<int>(
type);
2485 hitIdx.push_back(ip->simHitIdx);
2488 throw cms::Exception(
"LogicError") <<
"Encountered SimHit for TP " << tp.key() <<
" with DetId " << detid.rawId() <<
" whose det() is not Tracker but " << detid.det();
2490 const auto subdet = detid.subdetId();
2503 throw cms::Exception(
"LogicError") <<
"Encountered SimHit for TP " << tp.key() <<
" with DetId " << detid.rawId() <<
" whose subdet is not recognized, is " << subdet;
2510 const auto nSimLayers = nLayers_tPCeff[tp];
2511 const auto nSimPixelLayers = nPixelLayers_tPCeff[tp];
2512 const auto nSimStripMonoAndStereoLayers = nStripMonoAndStereoLayers_tPCeff[tp];
2515 sim_n3DLay .push_back( nSimPixelLayers+nSimStripMonoAndStereoLayers );
2523 for(
size_t iVertex=0,
size=vertices.size(); iVertex<
size; ++iVertex) {
2525 vtx_x.push_back(vertex.
x());
2526 vtx_y.push_back(vertex.
y());
2527 vtx_z.push_back(vertex.
z());
2536 std::vector<int> trkIdx;
2539 if(iTrack->id() != tracks.
id())
2542 trkIdx.push_back(iTrack->key());
2545 throw cms::Exception(
"LogicError") <<
"Vertex index has already been set for track " << iTrack->key() <<
" to " <<
trk_vtxIdx[iTrack->key()] <<
"; was trying to set it to " << iVertex;
2554 const TrackingParticleRefKeyToIndex& tpKeyToIndex
2556 int current_event = -1;
2557 for(
const auto& ref: trackingVertices) {
2567 processType = v.
g4Vertices()[0].processType();
2579 for(
const auto& tpRef: tps) {
2580 auto found = tpKeyToIndex.find(tpRef.key());
2581 if(found != tpKeyToIndex.end()) {
2582 idx.push_back(tpRef.key());
2587 std::vector<int> sourceIdx;
2588 std::vector<int> daughterIdx;
2602 desc.
addUntracked<std::vector<edm::InputTag> >(
"seedTracks", std::vector<edm::InputTag>{
2616 desc.
addUntracked<
bool>(
"trackingParticlesRef",
false);
2638 descriptions.
add(
"trackingNtuple",desc);
int adc(sample_type sample)
get the ADC sample (12 bits)
std::vector< unsigned short > str_lay
std::vector< float > sim_pca_dz
edm::LuminosityBlockNumber_t ev_lumi
static const std::string kSharedResource
std::vector< unsigned int > simvtx_processType
edm::EDGetTokenT< TrackingParticleRefVector > trackingParticleRefToken_
std::vector< unsigned int > sim_nLay
std::vector< float > ph2_radL
EventNumber_t event() const
void fillTrackingVertices(const TrackingVertexRefVector &trackingVertices, const TrackingParticleRefKeyToIndex &tpKeyToIndex)
const TrackerGeomDet * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
edm::EDGetTokenT< SiStripMatchedRecHit2DCollection > stripMatchedRecHitToken_
std::vector< short > see_fitok
Phase2Cluster1DRef cluster_phase2OT() const
std::vector< short > vtx_fake
std::vector< float > simvtx_z
std::vector< std::vector< int > > see_hitType
edm::EDGetTokenT< SiStripRecHit2DCollection > stripRphiRecHitToken_
Phase2TrackerCluster1D const & phase2OTCluster() const
const TrackingParticleRefVector & sourceTracks() const
std::vector< short > ph2_isBarrel
std::vector< float > trk_phi
SiPixelCluster const & pixelCluster() const
std::vector< float > sim_pca_cotTheta
const_iterator end(bool update=false) const
std::vector< float > sim_pca_dxy
std::vector< unsigned int > trk_nOuterLost
size_type dataSize() const
std::vector< float > glu_xy
std::vector< std::vector< int > > ph2_seeIdx
std::vector< float > glu_radL
std::vector< float > trk_inner_pz
int event() const
get the contents of the subdetector field (should be protected?)
std::vector< float > pix_y
std::vector< int > trk_vtxIdx
std::vector< std::vector< int > > str_trkIdx
std::vector< unsigned int > see_nValid
std::vector< float > str_yy
iterator find(det_id_type id)
bool trackFromSeedFitFailed(const reco::Track &track)
std::vector< float > trk_outer_py
std::unordered_map< reco::RecoToSimCollection::index_type, size_t > TrackingParticleRefKeyToIndex
std::vector< float > pix_zz
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
std::vector< float > ph2_bbxi
std::vector< int > glu_monoIdx
std::vector< float > trk_eta
std::vector< short > glu_isBarrel
std::vector< int > sim_bunchCrossing
std::vector< unsigned int > glu_lay
SimHitData matchCluster(const OmniClusterRef &cluster, DetId hitId, int clusterKey, const TransientTrackingRecHit::RecHitPointer &ttrh, const ClusterTPAssociation &clusterToTPMap, const TrackingParticleRefKeyToIndex &tpKeyToIndex, const SimHitTPAssociationProducer::SimHitTPAssociationList &simHitsTPAssoc, const edm::DetSetVector< SimLink > &digiSimLinks, const SimHitRefKeyToIndex &simHitRefKeyToIndex, HitType hitType)
std::vector< float > see_phiErr
void fillStripMatchedHits(const edm::Event &iEvent, const TransientTrackingRecHitBuilder &theTTRHBuilder, const TrackerTopology &tTopo, std::vector< std::pair< int, int > > &monoStereoClusterList)
trackRef_iterator tracks_end() const
last iterator over tracks
std::vector< std::vector< int > > simhit_hitIdx
static bool simHitTPAssociationListGreater(SimHitTPPair i, SimHitTPPair j)
const_iterator end() const
last iterator over the map (read only)
std::vector< unsigned short > inv_lay
std::vector< float > str_x
std::vector< float > see_dzErr
std::vector< unsigned int > sim_n3DLay
std::vector< float > trk_cotTheta
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< unsigned int > see_nStrip
def analyze(function, filename, filter=None)
std::vector< float > trk_px
double zError() const
error on z
void fillPixelHits(const edm::Event &iEvent, const ClusterTPAssociation &clusterToTPMap, const TrackingParticleRefKeyToIndex &tpKeyToIndex, const SimHitTPAssociationProducer::SimHitTPAssociationList &simHitsTPAssoc, const edm::DetSetVector< PixelDigiSimLink > &digiSimLink, const TransientTrackingRecHitBuilder &theTTRHBuilder, const TrackerTopology &tTopo, const SimHitRefKeyToIndex &simHitRefKeyToIndex, std::set< edm::ProductID > &hitProductIds)
std::vector< unsigned short > pix_simType
std::vector< unsigned short > inv_type
std::vector< float > pix_zx
TPHitIndex(unsigned int tp=0, unsigned int simHit=0, float to=0, unsigned int id=0)
const std::vector< SimVertex > & g4Vertices() const
#define DEFINE_FWK_MODULE(type)
std::vector< float > sim_phi
std::vector< std::vector< int > > trk_simTrkIdx
void fillStripRphiStereoHits(const edm::Event &iEvent, const ClusterTPAssociation &clusterToTPMap, const TrackingParticleRefKeyToIndex &tpKeyToIndex, const SimHitTPAssociationProducer::SimHitTPAssociationList &simHitsTPAssoc, const edm::DetSetVector< StripDigiSimLink > &digiSimLink, const TransientTrackingRecHitBuilder &theTTRHBuilder, const TrackerTopology &tTopo, const SimHitRefKeyToIndex &simHitRefKeyToIndex, std::set< edm::ProductID > &hitProductIds)
int numberOfValidHits() const
double y() const
y coordinate
edm::EDGetTokenT< reco::TrackToTrackingParticleAssociator > trackAssociatorToken_
OmniClusterRef const & stereoClusterRef() const
int pdgId() const
PDG ID.
std::string print(const Track &, edm::Verbosity=edm::Concise)
Track print utility.
bool isValid() const
Tells whether the vertex is valid.
edm::EDGetTokenT< SiStripRecHit2DCollection > stripStereoRecHitToken_
std::vector< float > trk_dxyErr
unsigned int SimTrackId() const
std::vector< float > str_yz
std::vector< float > trk_pt
std::vector< float > glu_x
std::vector< unsigned int > glu_det
std::vector< float > trk_inner_py
Sin< T >::type sin(const T &t)
std::vector< float > see_px
std::vector< float > see_chi2
const_iterator find(const key_type &k) const
find element with specified reference key
std::vector< float > glu_z
edm::EDGetTokenT< edm::View< reco::Track > > trackToken_
Global3DPoint GlobalPoint
void fillBeamSpot(const reco::BeamSpot &bs)
std::vector< float > trk_outer_px
void fillTracks(const edm::RefToBaseVector< reco::Track > &tracks, const TrackingParticleRefVector &tpCollection, const TrackingParticleRefKeyToIndex &tpKeyToIndex, const reco::BeamSpot &bs, const reco::TrackToTrackingParticleAssociator &associatorByHits, const TransientTrackingRecHitBuilder &theTTRHBuilder, const TrackerTopology &tTopo, const std::set< edm::ProductID > &hitProductIds, const std::map< edm::ProductID, size_t > &seedToCollIndex)
std::vector< std::vector< int > > trk_hitType
std::vector< float > ph2_xx
TrackingParticleRefKeyToIndex TrackingVertexRefKeyToIndex
unsigned long long EventNumber_t
std::vector< std::vector< int > > ph2_trkIdx
int numberOfValidStripHits() const
edm::EDGetTokenT< Phase2TrackerRecHit1DCollectionNew > phase2OTRecHitToken_
std::vector< unsigned int > see_algo
std::vector< Vertex > VertexCollection
collection of Vertex objects
T * make(const Args &...args) const
make new ROOT object
std::vector< float > trk_inner_pt
uint16_t firstStrip() const
std::vector< short > simhit_process
std::pair< TrackPSimHitRef::key_type, edm::ProductID > SimHitFullKey
std::vector< std::vector< int > > str_seeIdx
std::vector< std::vector< int > > see_simTrkIdx
std::vector< int > simvtx_event
std::vector< float > str_radL
std::vector< unsigned short > simhit_det
std::vector< unsigned int > inv_detId
std::vector< int > simhit_simTrkIdx
key_type key() const
Accessor for product key.
std::vector< std::vector< float > > sim_shareFrac
std::vector< short > str_isStereo
int pixelLayersWithMeasurement() const
static bool tpHitIndexListLess(const TPHitIndex &i, const TPHitIndex &j)
TrackingNtuple(const edm::ParameterSet &)
void fillTrackingParticles(const edm::Event &iEvent, const edm::EventSetup &iSetup, const edm::RefToBaseVector< reco::Track > &tracks, const TrackingParticleRefVector &tpCollection, const TrackingVertexRefKeyToIndex &tvKeyToIndex, const reco::TrackToTrackingParticleAssociator &associatorByHits, const std::vector< TPHitIndex > &tpHitList)
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
std::ostream & operator<<(std::ostream &out, const ALILine &li)
std::vector< float > sim_py
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
LuminosityBlockNumber_t luminosityBlock() const
std::vector< float > sim_px
unsigned int SimTrackId() const
unsigned int LuminosityBlockNumber_t
std::vector< float > pix_xx
std::vector< std::vector< int > > sim_decayVtxIdx
std::vector< float > trk_refpoint_x
std::vector< float > pix_radL
std::vector< float > pix_bbxi
void fillPhase2OTHits(const edm::Event &iEvent, const ClusterTPAssociation &clusterToTPMap, const TrackingParticleRefKeyToIndex &tpKeyToIndex, const SimHitTPAssociationProducer::SimHitTPAssociationList &simHitsTPAssoc, const edm::DetSetVector< PixelDigiSimLink > &digiSimLink, const TransientTrackingRecHitBuilder &theTTRHBuilder, const TrackerTopology &tTopo, const SimHitRefKeyToIndex &simHitRefKeyToIndex, std::set< edm::ProductID > &hitProductIds)
std::vector< float > ph2_zx
ProductID id() const
Accessor for product ID.
std::vector< int > simpv_idx
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > pixelSimLinkToken_
std::vector< unsigned int > trk_stopReason
std::vector< std::vector< int > > pix_seeIdx
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
int numberOfLostTrackerHits(HitCategory category) const
std::vector< unsigned short > str_simType
ClusterPixelRef cluster_pixel() const
std::vector< short > inv_isBarrel
uint32_t rawId() const
get the raw id
RefToBase< value_type > refAt(size_type i) const
math::XYZPointD Point
point in the space
std::vector< float > see_etaErr
std::vector< float > simhit_z
std::vector< float > ph2_z
std::vector< float > ph2_yy
std::vector< float > trk_refpoint_y
std::vector< int > sim_event
std::vector< unsigned int > trk_nStrip
SiStripCluster const & stripCluster() const
std::vector< float > chargeFraction
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNStripStereoLayersToken_
std::string parametersDefinerName_
std::vector< unsigned int > trk_nPixel
std::vector< float > glu_y
std::vector< float > trk_pz
std::vector< float > trk_dzErr
std::vector< unsigned short > ph2_lay
std::vector< float > trk_lambdaErr
int numberOfValidStripLayersWithMonoAndStereo(uint16_t stripdet, uint16_t layer) const
edm::EDGetTokenT< SiPixelRecHitCollection > pixelRecHitToken_
std::vector< float > ph2_y
std::vector< unsigned short > pix_lay
std::vector< std::vector< int > > simvtx_sourceSimIdx
std::vector< float > trk_etaErr
std::vector< short > pix_isBarrel
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > siphase2OTSimLinksToken_
std::vector< float > glu_yz
std::vector< float > sim_pca_phi
std::vector< unsigned int > trk_algo
simTrack
per collection params
std::vector< float > ph2_xy
std::vector< float > vtx_y
std::vector< float > pix_z
int bunchCrossing() const
get the detector field from this detid
std::vector< int > bunchCrossing
std::vector< float > sim_eta
std::vector< unsigned int > trk_originalAlgo
std::vector< unsigned int > trk_nInnerLost
std::vector< float > str_y
std::vector< unsigned short > pix_det
std::vector< int > sim_pdgId
Cos< T >::type cos(const T &t)
std::vector< std::vector< int > > simhit_hitType
std::vector< float > trk_refpoint_z
std::vector< edm::EDGetTokenT< edm::View< reco::Track > > > seedTokens_
edm::EDGetTokenT< SimHitTPAssociationProducer::SimHitTPAssociationList > simHitTPMapToken_
std::vector< float > pix_yz
std::vector< int > trk_seedIdx
std::vector< std::vector< float > > pix_chargeFraction
std::vector< float > vtx_yErr
std::vector< std::vector< int > > pix_trkIdx
Tan< T >::type tan(const T &t)
Abs< T >::type abs(const T &t)
std::vector< unsigned int > sim_nValid
std::vector< float > glu_yy
std::vector< float > vtx_ndof
double chi2() const
chi-squares
std::vector< std::vector< int > > ph2_simHitIdx
std::vector< float > simvtx_x
double z() const
z coordinate
virtual TrackingParticle::Vector momentum(const edm::Event &iEvent, const edm::EventSetup &iSetup, const Charge ch, const Point &vtx, const LorentzVector &lv) const
std::vector< float > str_zz
std::vector< float > sim_pca_pt
std::vector< float > see_dxyErr
bool isMatched(TrackingRecHit const &hit)
double BeamWidthX() const
beam width X
range equal_range(const OmniClusterRef &key) const
std::vector< float > see_pt
std::vector< unsigned int > see_nPhase2OT
edm::EDGetTokenT< TrackingVertexCollection > trackingVertexToken_
std::vector< float > see_dxy
std::vector< std::vector< int > > glu_seeIdx
std::vector< unsigned int > trk_n3DLay
std::vector< std::vector< int > > sim_trkIdx
std::vector< float > trk_outer_pt
static bool tpHitIndexListLessSort(const TPHitIndex &i, const TPHitIndex &j)
std::vector< int > matchingSimHit
std::vector< float > trk_dz
std::vector< float > trk_ptErr
std::vector< unsigned int > simhit_detId
std::vector< unsigned int > trk_nStripLay
void fillSimHits(const TrackerGeometry &tracker, const TrackingParticleRefKeyToIndex &tpKeyToIndex, const SimHitTPAssociationProducer::SimHitTPAssociationList &simHitsTPAssoc, const TrackerTopology &tTopo, SimHitRefKeyToIndex &simHitRefKeyToIndex, std::vector< TPHitIndex > &tpHitList)
std::vector< float > see_phi
OmniClusterRef const & monoClusterRef() const
std::vector< float > vtx_z
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
std::vector< float > see_pz
std::vector< float > trk_phiErr
std::vector< unsigned int > sim_nPixelLay
std::vector< float > trk_lambda
iterator end()
Return the off-the-end iterator.
std::vector< float > glu_zz
std::vector< float > sim_pca_lambda
std::vector< float > glu_zx
std::shared_ptr< TrackingRecHit const > RecHitPointer
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
std::vector< float > vtx_xErr
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::vector< std::vector< float > > trk_shareFrac
std::vector< float > sim_pz
std::vector< std::vector< int > > sim_simHitIdx
edm::Ref< TrackingVertexCollection > TrackingVertexRef
std::vector< unsigned short > inv_det
std::vector< unsigned short > ph2_det
edm::EventNumber_t ev_event
std::vector< float > ph2_x
edm::EDGetTokenT< reco::VertexCollection > vertexToken_
edm::EDGetTokenT< TrackingParticleCollection > trackingParticleToken_
double x() const
x coordinate
std::vector< int > glu_stereoIdx
std::vector< unsigned short > simhit_lay
std::vector< float > trk_py
double xError() const
error on x
std::vector< std::vector< int > > pix_simHitIdx
std::vector< float > trk_nChi2
T const * product() const
std::vector< unsigned short > str_det
std::vector< unsigned int > see_nGlued
std::vector< float > see_py
std::vector< float > pix_x
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
std::vector< int > sim_parentVtxIdx
std::vector< float > see_ptErr
std::vector< float > str_z
std::vector< float > str_zx
std::vector< TrackingVertex > TrackingVertexCollection
double sigmaZ() const
sigma z
std::string algoName() const
int stripLayersWithMeasurement() const
std::vector< short > trk_isHP
std::vector< float > str_xy
double BeamWidthY() const
beam width Y
std::vector< std::vector< float > > str_chargeFraction
void add(std::string const &label, ParameterSetDescription const &psetDescription)
int numberOfLostHits(HitCategory category) const
std::vector< std::vector< int > > trk_hitIdx
std::vector< unsigned int > ph2_detId
unsigned int layer(const DetId &id) const
bool includePhase2OTHits_
void labelsForToken(EDGetToken iToken, Labels &oLabels) const
std::vector< std::vector< float > > see_shareFrac
std::vector< unsigned int > sim_nPixel
std::vector< SimHitTPPair > SimHitTPAssociationList
const bool includeAllHits_
std::vector< short > vtx_valid
const EncodedEventId & eventId() const
edm::EDGetTokenT< ClusterTPAssociation > clusterTPMapToken_
Pixel cluster – collection of neighboring pixels above threshold.
std::vector< std::vector< int > > vtx_trkIdx
edm::ProductID id() const
std::vector< short > str_isBarrel
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
const TrackingParticleRefVector & daughterTracks() const
std::vector< float > glu_bbxi
std::vector< int > simhit_particle
std::vector< float > trk_outer_pz
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNLayersToken_
std::vector< unsigned short > ph2_simType
std::vector< float > sim_pca_eta
void push_back(const RefToBase< T > &)
virtual OmniClusterRef const & firstClusterRef() const =0
std::vector< float > ph2_yz
std::map< SimHitFullKey, size_t > SimHitRefKeyToIndex
static int pixelToChannel(int row, int col)
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
static TrackAlgorithm algoByName(const std::string &name)
double y0() const
y coordinate
std::vector< float > simhit_y
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
int numberOfValidPixelHits() const
edm::Ref< edm::PSimHitContainer > TrackPSimHitRef
std::vector< std::vector< int > > str_simHitIdx
size_type size() const
Size of the RefVector.
std::vector< float > glu_xx
Monte Carlo truth information used for tracking validation.
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNPixelLayersToken_
bool isUninitialized() const
std::vector< unsigned int > trk_nPixelLay
std::vector< float > simhit_x
const Point & position() const
position
std::vector< float > simvtx_y
std::vector< std::vector< int > > simvtx_daughterSimIdx
std::vector< float > str_xx
#define declareDynArray(T, n, x)
std::vector< unsigned int > see_offset
std::vector< float > ph2_zz
reco::SimToRecoCollection associateSimToReco(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
trackRef_iterator tracks_begin() const
first iterator over tracks
std::vector< int > see_trkIdx
math::XYZVectorD Vector
point in the space
std::vector< float > simhit_tof
Detector det() const
get the detector field from this detid
void fillVertices(const reco::VertexCollection &vertices, const edm::RefToBaseVector< reco::Track > &tracks)
std::vector< float > pix_xy
std::vector< float > trk_dxy
std::vector< float > sim_pt
std::vector< float > pix_yy
std::unordered_set< reco::RecoToSimCollection::index_type > TrackingParticleRefKeySet
std::vector< unsigned int > trk_nInvalid
std::vector< decltype(reco::TrackBase().algoMaskUL())> trk_algoMask
std::vector< std::vector< int > > see_hitIdx
T const * product() const
std::vector< float > vtx_x
std::vector< unsigned int > see_nPixel
edm::Ref< TrackingParticleCollection > TrackingParticleRef
std::vector< float > see_eta
const std::vector< uint8_t > & amplitudes() const
std::vector< unsigned int > trk_nValid
std::vector< float > trk_inner_px
double yError() const
error on y
const_iterator begin(bool update=false) const
void fillSeeds(const edm::Event &iEvent, const TrackingParticleRefVector &tpCollection, const TrackingParticleRefKeyToIndex &tpKeyToIndex, const reco::BeamSpot &bs, const reco::TrackToTrackingParticleAssociator &associatorByHits, const TransientTrackingRecHitBuilder &theTTRHBuilder, const MagneticField *theMF, const std::vector< std::pair< int, int > > &monoStereoClusterList, const std::set< edm::ProductID > &hitProductIds, std::map< edm::ProductID, size_t > &seedToCollIndex)
std::vector< float > vtx_zErr
std::vector< unsigned int > pix_detId
std::vector< float > simhit_eloss
edm::EDGetTokenT< edm::DetSetVector< StripDigiSimLink > > stripSimLinkToken_
std::vector< float > vtx_chi2
std::vector< int > simvtx_bunchCrossing
std::vector< float > str_bbxi
virtual TrackingParticle::Point vertex(const edm::Event &iEvent, const edm::EventSetup &iSetup, const Charge ch, const Point &vtx, const LorentzVector &lv) const
std::vector< float > see_dz
std::vector< unsigned int > glu_detId
const LorentzVector & position() const
double x0() const
x coordinate
std::vector< unsigned int > sim_nStrip
std::vector< unsigned int > str_detId