17 : inputDTRecSegment4DToken_(
19 inputCSCSegmentToken_(
26 edm::LogVerbatim(
"TrackerMuonHitExtractor") <<
"\nThere are " << dtSegmentCollectionH->size() <<
" DT segments.";
27 unsigned int index_dt_segment = 0;
29 segment != dtSegmentCollectionH->end();
30 ++segment, index_dt_segment++) {
31 LocalPoint segmentLocalPosition = segment->localPosition();
32 LocalVector segmentLocalDirection = segment->localDirection();
33 LocalError segmentLocalPositionError = segment->localPositionError();
34 LocalError segmentLocalDirectionError = segment->localDirectionError();
35 DetId geoid = segment->geographicalId();
41 float segmentX = segmentLocalPosition.
x();
42 float segmentY = segmentLocalPosition.
y();
43 float segmentdXdZ = segmentLocalDirection.
x() / segmentLocalDirection.
z();
44 float segmentdYdZ = segmentLocalDirection.
y() / segmentLocalDirection.
z();
45 float segmentXerr =
sqrt(segmentLocalPositionError.
xx());
46 float segmentYerr =
sqrt(segmentLocalPositionError.
yy());
47 float segmentdXdZerr =
sqrt(segmentLocalDirectionError.
xx());
48 float segmentdYdZerr =
sqrt(segmentLocalDirectionError.
yy());
51 <<
"\nDT segment index :" << index_dt_segment <<
"\nchamber Wh:" <<
wheel <<
",St:" <<
station 52 <<
",Se:" <<
sector <<
"\nLocal Position (X,Y)=(" << segmentX <<
"," << segmentY <<
") +/- (" << segmentXerr
53 <<
"," << segmentYerr <<
"), " 54 <<
"Local Direction (dXdZ,dYdZ)=(" << segmentdXdZ <<
"," << segmentdYdZ <<
") +/- (" << segmentdXdZerr <<
"," 55 << segmentdYdZerr <<
")";
58 edm::LogVerbatim(
"TrackerMuonHitExtractor") <<
"\nThere are " << cscSegmentCollectionH->size() <<
" CSC segments.";
59 unsigned int index_csc_segment = 0;
61 segment != cscSegmentCollectionH->end();
62 ++segment, index_csc_segment++) {
63 LocalPoint segmentLocalPosition = segment->localPosition();
64 LocalVector segmentLocalDirection = segment->localDirection();
65 LocalError segmentLocalPositionError = segment->localPositionError();
66 LocalError segmentLocalDirectionError = segment->localDirectionError();
68 DetId geoid = segment->geographicalId();
75 float segmentX = segmentLocalPosition.
x();
76 float segmentY = segmentLocalPosition.
y();
77 float segmentdXdZ = segmentLocalDirection.
x() / segmentLocalDirection.
z();
78 float segmentdYdZ = segmentLocalDirection.
y() / segmentLocalDirection.
z();
79 float segmentXerr =
sqrt(segmentLocalPositionError.
xx());
80 float segmentYerr =
sqrt(segmentLocalPositionError.
yy());
81 float segmentdXdZerr =
sqrt(segmentLocalDirectionError.
xx());
82 float segmentdYdZerr =
sqrt(segmentLocalDirectionError.
yy());
85 <<
"\nCSC segment index :" << index_csc_segment <<
"\nchamber Endcap:" <<
endcap <<
",St:" <<
station 86 <<
",Ri:" <<
ring <<
",Ch:" <<
chamber <<
"\nLocal Position (X,Y)=(" << segmentX <<
"," << segmentY <<
") +/- (" 87 << segmentXerr <<
"," << segmentYerr <<
"), " 88 <<
"Local Direction (dXdZ,dYdZ)=(" << segmentdXdZ <<
"," << segmentdYdZ <<
") +/- (" << segmentdXdZerr <<
"," 89 << segmentdYdZerr <<
")";
93 std::vector<const TrackingRecHit *>
ret;
99 <<
"Number of chambers: " <<
mu.matches().size()
102 unsigned int index_chamber = 0;
103 int n_segments_noArb = 0;
105 for (std::vector<reco::MuonChamberMatch>::const_iterator chamberMatch =
mu.matches().begin();
106 chamberMatch !=
mu.matches().end();
107 ++chamberMatch, index_chamber++) {
108 std::stringstream chamberStr;
109 chamberStr <<
"\nchamber index: " << index_chamber;
111 int subdet = chamberMatch->detector();
112 DetId did = chamberMatch->id;
129 chamberStr <<
", Number of segments: " << chamberMatch->segmentMatches.size();
131 n_segments_noArb = n_segments_noArb + chamberMatch->segmentMatches.size();
133 unsigned int index_segment = 0;
135 for (std::vector<reco::MuonSegmentMatch>::const_iterator segmentMatch = chamberMatch->segmentMatches.begin();
136 segmentMatch != chamberMatch->segmentMatches.end();
137 ++segmentMatch, index_segment++) {
138 float segmentX = segmentMatch->x;
139 float segmentY = segmentMatch->y;
140 float segmentdXdZ = segmentMatch->dXdZ;
141 float segmentdYdZ = segmentMatch->dYdZ;
142 float segmentXerr = segmentMatch->xErr;
143 float segmentYerr = segmentMatch->yErr;
144 float segmentdXdZerr = segmentMatch->dXdZErr;
145 float segmentdYdZerr = segmentMatch->dYdZErr;
154 if (segment_arbitrated_Ok)
155 ARBITRATED =
" ***ARBITRATED OK*** ";
159 <<
"\n\t segment index: " << index_segment << ARBITRATED <<
"\n\t Local Position (X,Y)=(" << segmentX
160 <<
"," << segmentY <<
") +/- (" << segmentXerr <<
"," << segmentYerr <<
"), " 161 <<
"\n\t Local Direction (dXdZ,dYdZ)=(" << segmentdXdZ <<
"," << segmentdYdZ <<
") +/- (" << segmentdXdZerr
162 <<
"," << segmentdYdZerr <<
")";
166 if (!segment_arbitrated_Ok)
169 if (segmentDT.
get() !=
nullptr) {
173 <<
"\t ===> MATCHING with DT segment with index = " << segmentDT.
key();
177 std::vector<const TrackingRecHit *> phiHits = phiSeg->
recHits();
178 for (std::vector<const TrackingRecHit *>::const_iterator ihit = phiHits.begin(); ihit != phiHits.end();
180 ret.push_back(*ihit);
186 std::vector<const TrackingRecHit *> zedHits = zSeg->
recHits();
187 for (std::vector<const TrackingRecHit *>::const_iterator ihit = zedHits.begin(); ihit != zedHits.end();
189 ret.push_back(*ihit);
193 edm::LogWarning(
"TrackerMuonHitExtractor") <<
"\n***WARNING: UNMATCHED DT segment ! \n";
198 <<
"\n\t segment index: " << index_segment << ARBITRATED <<
"\n\t Local Position (X,Y)=(" << segmentX
199 <<
"," << segmentY <<
") +/- (" << segmentXerr <<
"," << segmentYerr <<
"), " 200 <<
"\n\t Local Direction (dXdZ,dYdZ)=(" << segmentdXdZ <<
"," << segmentdYdZ <<
") +/- (" << segmentdXdZerr
201 <<
"," << segmentdYdZerr <<
")";
205 if (!segment_arbitrated_Ok)
208 if (segmentCSC.
get() !=
nullptr) {
212 <<
"\t ===> MATCHING with CSC segment with index = " << segmentCSC.
key();
214 std::vector<const TrackingRecHit *>
hits = segment->
recHits();
215 for (std::vector<const TrackingRecHit *>::const_iterator ihit =
hits.begin(); ihit !=
hits.end(); ++ihit) {
216 ret.push_back(*ihit);
219 edm::LogWarning(
"TrackerMuonHitExtractor") <<
"\n***WARNING: UNMATCHED CSC segment ! \n";
225 edm::LogVerbatim(
"TrackerMuonHitExtractor") <<
"\n N. matched Segments before arbitration = " << n_segments_noArb;
Log< level::Info, true > LogVerbatim
int station() const
Return the station number.
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
bool hasPhi() const
Does it have the Phi projection?
ret
prodAgent to be discontinued
key_type key() const
Accessor for product key.
C::const_iterator const_iterator
constant access iterator type
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
static const unsigned int BestInChamberByDR
const DTChamberRecSegment2D * phiSegment() const
The superPhi segment: 0 if no phi projection available.
static const unsigned int BelongsToTrackByDR
int wheel() const
Return the wheel number.
T const * get() const
Returns C++ pointer to the item.
Log< level::Warning, false > LogWarning
bool hasZed() const
Does it have the Z projection?