368 int numrechitrphi =0;
370 int numrechitmatched=0;
372 int totTibnumrechitrphi=0;
373 int totTibnumrechitsas=0;
374 int totTibnumrechitmatched=0;
375 int totTobnumrechitrphi=0;
376 int totTobnumrechitsas=0;
377 int totTobnumrechitmatched=0;
378 int totTidnumrechitrphi=0;
379 int totTidnumrechitsas=0;
380 int totTidnumrechitmatched=0;
381 int totTecnumrechitrphi=0;
382 int totTecnumrechitsas=0;
383 int totTecnumrechitmatched=0;
384 int totrechitrphi =0;
386 int totrechitmatched =0;
394 std::vector<DetId> IDs;
395 IDs.reserve(rechitsrphi->size() + rechitsmatched->size() + rechitsstereo->size());
401 for(std::vector<DetId>::const_iterator it = IDs.begin(); it != IDs.end(); ++it ){
402 uint32_t myid=((*it).rawId());
438 std::pair<SiStripRecHit2DCollection::DetSet::const_iterator,SiStripRecHit2DCollection::DetSet::const_iterator> rechitrphiRange =
helper::getRange(*rechitsrphi, detid);
443 numrechitrphi = rechitrphiRangeIteratorEnd - rechitrphiRangeIteratorBegin;
449 if(numrechitrphi > 0 ){
450 totrechitrphi+=numrechitrphi;
451 for(iterrphi=rechitrphiRangeIteratorBegin; iterrphi!=rechitrphiRangeIteratorEnd;++iterrphi){
455 SiStripRecHit2D
const rechit=*iterrphi;
462 SiStripRecHit2D::ClusterRef clust=rechit.cluster();
465 clusiz = clust->amplitudes().size();
466 const std::vector<uint8_t> amplitudes=clust->amplitudes();
467 for(
size_t ia=0; ia<amplitudes.size();ia++){
468 totcharge+=amplitudes[ia];
478 matched = associate.associateHit(rechit);
479 float mindist = 999999;
483 for(std::vector<PSimHit>::const_iterator
m=
matched.begin();
m<
matched.end();
m++){
484 dist = fabs(
rechitrphix[i] - (*m).localPosition().x());
496 rhparameters[0] = position.
x();
497 rhparameters[1] = position.
y();
503 R[0][0] = error.
xx();
504 R[0][1] = error.
xy();
505 R[1][1] = error.
yy();
508 double est =
R.similarity(
r);
526 std::pair<SiStripRecHit2DCollection::DetSet::const_iterator,SiStripRecHit2DCollection::DetSet::const_iterator> rechitsasRange =
helper::getRange(*rechitsstereo, detid);
530 numrechitsas = rechitsasRangeIteratorEnd - rechitsasRangeIteratorBegin;
531 if(numrechitsas > 0){
532 totrechitsas+=numrechitsas;
533 for(itersas=rechitsasRangeIteratorBegin; itersas!=rechitsasRangeIteratorEnd;++itersas){
537 SiStripRecHit2D
const rechit=*itersas;
544 SiStripRecHit2D::ClusterRef clust=rechit.cluster();
int clusiz=0;
546 clusiz = clust->amplitudes().size();
547 const std::vector<uint8_t> amplitudes=clust->amplitudes();
548 for(
size_t ia=0; ia<amplitudes.size();ia++){
549 totcharge+=amplitudes[ia];
559 float mindist = 999999;
563 matched = associate.associateHit(rechit);
565 for(std::vector<PSimHit>::const_iterator
m=
matched.begin();
m<
matched.end();
m++){
566 dist = fabs(
rechitsasx[j] - (*m).localPosition().x());
578 rhparameters[0] = position.
x();
579 rhparameters[1] = position.
y();
586 R[0][0] = error.
xx();
587 R[0][1] = error.
xy();
588 R[1][1] = error.
yy();
591 double est =
R.similarity(
r);
612 std::pair<SiStripMatchedRecHit2DCollection::DetSet::const_iterator,SiStripMatchedRecHit2DCollection::DetSet::const_iterator> rechitmatchedRange =
helper::getRange(*rechitsmatched, detid);
616 numrechitmatched = rechitmatchedRangeIteratorEnd - rechitmatchedRangeIteratorBegin;
617 if(numrechitmatched > 0){
618 totrechitmatched +=numrechitmatched;
620 for(itermatched=rechitmatchedRangeIteratorBegin; itermatched!=rechitmatchedRangeIteratorEnd;++itermatched){
621 SiStripMatchedRecHit2D
const rechit=*itermatched;
625 float mindist = 999999;
626 float distx = 999999;
627 float disty = 999999;
629 std::pair<LocalPoint,LocalVector> closestPair;
644 matched = associate.associateHit(rechit);
651 std::pair<LocalPoint,LocalVector> hitPair;
655 for(std::vector<PSimHit>::const_iterator
m=
matched.begin();
m<
matched.end();
m++){
660 dist =
sqrt(distx*distx+disty*disty);
665 closestPair = hitPair;
677 rhparameters[0] = position.
x();
678 rhparameters[1] = position.
y();
681 shparameters[0] = sh.
x();
682 shparameters[1] = sh.
y();
685 R[0][0] = error.
xx();
686 R[0][1] = error.
xy();
687 R[1][1] = error.
yy();
690 double est =
R.similarity(
r);
705 if(numrechitrphi>0 || numrechitsas>0 || numrechitmatched){
708 int Tibnumrechitrphi = numrechitrphi;
709 int Tibnumrechitsas = numrechitsas;
710 int Tibnumrechitmatched = numrechitmatched;
712 int Tibnumrechitrphi2 = i2;
713 int Tibnumrechitsas2 = j2;
714 int Tibnumrechitmatched2 = k2;
716 totTibnumrechitrphi +=numrechitrphi;
717 totTibnumrechitsas +=numrechitsas;
718 totTibnumrechitmatched +=numrechitmatched;
720 int ilay = tTopo->tibLayer(myid) - 1;
722 if(tTopo->tibStereo(myid)==0){
723 for(
int k = 0; k<Tibnumrechitrphi; k++){
734 for(
int k = 0; k<Tibnumrechitrphi2; k++){
738 }
else if(tTopo->tibStereo(myid)==1){
739 for(
int kk = 0;
kk < Tibnumrechitsas;
kk++)
749 for(
int l = 0;
l<Tibnumrechitsas2;
l++){
754 if(Tibnumrechitmatched>0){
755 for(
int kkk = 0; kkk<Tibnumrechitmatched; kkk++)
764 for(
int l = 0;
l<Tibnumrechitmatched2;
l++){
774 int Tobnumrechitrphi = numrechitrphi;
775 int Tobnumrechitsas = numrechitsas;
776 int Tobnumrechitmatched = numrechitmatched;
777 totTobnumrechitrphi +=numrechitrphi;
778 totTobnumrechitsas +=numrechitsas;
779 totTobnumrechitmatched +=numrechitmatched;
781 int Tobnumrechitrphi2 = i2;
782 int Tobnumrechitsas2 = j2;
783 int Tobnumrechitmatched2 = k2;
785 int ilay = tTopo->tobLayer(myid) - 1;
787 if(tTopo->tobStereo(myid)==0){
788 for(
int k = 0; k<Tobnumrechitrphi; k++){
797 for(
int l = 0;
l<Tobnumrechitrphi2;
l++){
800 }
else if(tTopo->tobStereo(myid)==1){
801 for(
int kk = 0; kk < Tobnumrechitsas; kk++)
811 for(
int l = 0;
l<Tobnumrechitsas2;
l++){
816 if(Tobnumrechitmatched>0){
817 for(
int kkk = 0; kkk<Tobnumrechitmatched; kkk++)
826 for(
int l = 0;
l<Tobnumrechitmatched2;
l++){
834 int Tidnumrechitrphi = numrechitrphi;
835 int Tidnumrechitsas = numrechitsas;
836 int Tidnumrechitmatched = numrechitmatched;
837 totTidnumrechitrphi +=numrechitrphi;
838 totTidnumrechitsas +=numrechitsas;
839 totTidnumrechitmatched +=numrechitmatched;
841 int Tidnumrechitrphi2 = i2;
842 int Tidnumrechitsas2 = j2;
843 int Tidnumrechitmatched2 = k2;
845 int ilay = tTopo->tidRing(myid) - 1;
847 if(tTopo->tidStereo(myid)==0){
848 for(
int k = 0; k<Tidnumrechitrphi; k++){
857 for(
int l = 0;
l<Tidnumrechitrphi2;
l++){
861 }
else if(tTopo->tidStereo(myid)==1){
862 for(
int kk = 0; kk < Tidnumrechitsas; kk++)
872 for(
int l = 0;
l<Tidnumrechitsas2;
l++){
877 if(Tidnumrechitmatched>0){
878 for(
int kkk = 0; kkk<Tidnumrechitmatched; kkk++)
887 for(
int l = 0;
l<Tidnumrechitmatched2;
l++){
895 int Tecnumrechitrphi = numrechitrphi;
896 int Tecnumrechitsas = numrechitsas;
897 int Tecnumrechitmatched = numrechitmatched;
898 totTecnumrechitrphi +=numrechitrphi;
899 totTecnumrechitsas +=numrechitsas;
900 totTecnumrechitmatched +=numrechitmatched;
902 int Tecnumrechitrphi2 = i2;
903 int Tecnumrechitsas2 = j2;
904 int Tecnumrechitmatched2 = k2;
906 int ilay = tTopo->tecRing(myid) - 1;
908 if(tTopo->tecStereo(myid)==0){
909 for(
int k = 0; k<Tecnumrechitrphi; k++){
918 for(
int l = 0;
l<Tecnumrechitrphi2;
l++){
922 }
else if(tTopo->tecStereo(myid)==1){
923 for(
int kk = 0; kk < Tecnumrechitsas; kk++)
933 for(
int l = 0;
l<Tecnumrechitsas2;
l++){
938 if(Tecnumrechitmatched>0){
939 for(
int kkk = 0; kkk<Tecnumrechitmatched; kkk++)
948 for(
int l = 0;
l<Tecnumrechitmatched2;
l++){
MonitorElement * meNstpRphiTEC[7]
MonitorElement * meNumTotRphi
float rechitrphiy[MAXHIT]
float rechitrphix[MAXHIT]
MonitorElement * meNstpSasTEC[5]
MonitorElement * meResRphiTEC[7]
EventNumber_t event() const
MonitorElement * meChi2RphiTID[3]
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
MonitorElement * mePullLFSasTIB[4]
MonitorElement * meErrxSasTEC[5]
MonitorElement * meAdcRphiTIB[4]
MonitorElement * meErrxMatchedTIB[2]
MonitorElement * mePullLFRphiTID[3]
MonitorElement * meChi2RphiTEC[7]
float rechitmatchedresy[MAXHIT]
MonitorElement * mePosyMatchedTEC[5]
MonitorElement * meNumRphiTIB
MonitorElement * meErrxMatchedTOB[2]
MonitorElement * mePosxRphiTID[3]
MonitorElement * meChi2MatchedTID[2]
bool getByToken(EDGetToken token, Handle< PROD > &result) const
float rechitsasres[MAXHIT]
MonitorElement * meErryMatchedTID[2]
std::vector< PSimHit > matched
MonitorElement * meNstpRphiTIB[4]
MonitorElement * meResyMatchedTID[2]
MonitorElement * meNumMatchedTOB
float rechitmatchedresx[MAXHIT]
MonitorElement * meNumSasTOB
MonitorElement * meErrxRphiTIB[4]
float rechitmatchederrxx[MAXHIT]
float rechitsaserrx[MAXHIT]
MonitorElement * meResxMatchedTEC[5]
MonitorElement * meNstpSasTOB[2]
MonitorElement * mePullLFSasTEC[5]
MonitorElement * meResSasTID[2]
MonitorElement * meNumMatchedTID
MonitorElement * mePullMFRphiTOB[6]
MonitorElement * meAdcRphiTEC[7]
MonitorElement * meChi2MatchedTIB[2]
MonitorElement * meNumSasTIB
MonitorElement * meResxMatchedTID[2]
MonitorElement * meNstpRphiTID[3]
const Plane & surface() const
The nominal surface of the GeomDet.
MonitorElement * mePosxRphiTOB[6]
static int position[TOTALCHAMBERS][3]
MonitorElement * mePullLFRphiTIB[4]
MonitorElement * meNumRphiTID
float rechitmatchederryy[MAXHIT]
MonitorElement * meErrxRphiTEC[7]
float rechitmatchederrxy[MAXHIT]
MonitorElement * meChi2RphiTOB[6]
MonitorElement * meResSasTOB[2]
MonitorElement * mePullMFRphiTID[3]
MonitorElement * mePosxRphiTEC[7]
MonitorElement * meResRphiTOB[6]
MonitorElement * mePosxSasTID[2]
MonitorElement * meNumMatchedTIB
float rechitsaspullMF[MAXHIT]
virtual MeasurementError measurementError(const LocalPoint &, const LocalError &) const =0
Local3DPoint localPosition() const
MonitorElement * meNumTotMatched
MonitorElement * meErryMatchedTEC[5]
MonitorElement * mePullMFSasTID[2]
MonitorElement * meResyMatchedTOB[2]
MonitorElement * mePullMFRphiTEC[7]
MonitorElement * meErrxSasTIB[4]
virtual const Topology & topology() const
Returns a reference to the strip proxy topology.
MonitorElement * meChi2SasTOB[2]
MonitorElement * meAdcRphiTOB[6]
MonitorElement * meChi2SasTEC[5]
edm::EDGetTokenT< SiStripMatchedRecHit2DCollection > siStripMatchedRecHit2DCollectionToken_
MonitorElement * meErrxSasTOB[2]
MonitorElement * mePosxMatchedTOB[2]
MonitorElement * mePosyMatchedTIB[2]
float rechitmatchedz[MAXHIT]
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
MonitorElement * meResRphiTIB[4]
float rechitmatchedx[MAXHIT]
float rechitrphiz[MAXHIT]
MonitorElement * meChi2RphiTIB[4]
MonitorElement * meErrxMatchedTEC[5]
MonitorElement * meChi2SasTIB[4]
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
MonitorElement * mePosyMatchedTID[2]
MonitorElement * mePullLFRphiTEC[7]
std::pair< typename T::DetSet::const_iterator, typename T::DetSet::const_iterator > getRange(const T &detset, const DetId &id)
MonitorElement * meAdcSasTIB[4]
MonitorElement * mePosxSasTIB[4]
MonitorElement * meChi2MatchedTOB[2]
MonitorElement * meResSasTEC[5]
MonitorElement * mePosxRphiTIB[4]
MonitorElement * meNstpSasTIB[4]
MonitorElement * mePullLFSasTOB[2]
CLHEP::HepVector AlgebraicVector
MonitorElement * meErrxRphiTOB[6]
MonitorElement * meResyMatchedTEC[5]
MonitorElement * meErrxRphiTID[3]
MonitorElement * meAdcSasTID[2]
MonitorElement * meResxMatchedTIB[2]
MonitorElement * meErryMatchedTIB[2]
MonitorElement * meNumRphiTEC
MonitorElement * mePosxSasTOB[2]
MonitorElement * meNstpSasTID[2]
edm::EDGetTokenT< SiStripRecHit2DCollection > siStripRecHit2DCollection_stereo_Token_
MonitorElement * mePullLFSasTID[2]
MonitorElement * meAdcSasTEC[5]
MonitorElement * mePullLFRphiTOB[6]
MonitorElement * mePullMFSasTEC[5]
MonitorElement * meNumTotSas
MonitorElement * meNumSasTEC
float rechitrphipullMF[MAXHIT]
std::pair< LocalPoint, LocalVector > projectHit(const PSimHit &hit, const StripGeomDetUnit *stripDet, const BoundPlane &plane)
float rechitrphierrx[MAXHIT]
MonitorElement * meErryMatchedTOB[2]
MonitorElement * meChi2MatchedTEC[5]
MonitorElement * mePosxMatchedTEC[5]
MonitorElement * mePosxSasTEC[5]
float rechitmatchedy[MAXHIT]
MonitorElement * mePullMFSasTOB[2]
MonitorElement * mePullMFRphiTIB[4]
MonitorElement * mePosxMatchedTID[2]
edm::EDGetTokenT< SiStripRecHit2DCollection > siStripRecHit2DCollection_rphi_Token_
CLHEP::HepSymMatrix AlgebraicSymMatrix
MonitorElement * meResxMatchedTOB[2]
MonitorElement * meResSasTIB[4]
MonitorElement * mePullMFSasTIB[4]
float chi2matched[MAXHIT]
MonitorElement * meErrxMatchedTID[2]
float rechitrphires[MAXHIT]
MonitorElement * meNumSasTID
MonitorElement * meResyMatchedTIB[2]
MonitorElement * meAdcRphiTID[3]
MonitorElement * meNumRphiTOB
static constexpr int MAXHIT
MonitorElement * meChi2SasTID[2]
MonitorElement * meNumMatchedTEC
MonitorElement * meErrxSasTID[2]
MonitorElement * mePosxMatchedTIB[2]
const GeomDetUnit * stereoDet() const
MonitorElement * meResRphiTID[3]
MonitorElement * meNstpRphiTOB[6]
MonitorElement * mePosyMatchedTOB[2]
MonitorElement * meAdcSasTOB[2]