94 int selWheel, selStation, selSector;
96 linestr >> selWheel >> selStation >> selSector;
97 chosenChamberId =
DTChamberId(selWheel, selStation, selSector);
98 LogVerbatim(
"Calibration") <<
" chosen chamber " << chosenChamberId << endl;
115 for (chamberIdIt = all4DSegments->id_begin();
116 chamberIdIt != all4DSegments->id_end();
120 const DTChamber* chamber = dtGeom->chamber(*chamberIdIt);
121 LogTrace(
"Calibration") <<
"Chamber Id: " << *chamberIdIt;
129 if((
theCalibChamber_ !=
"All") && ((*chamberIdIt) != chosenChamberId))
continue;
136 segment!=range.second; ++segment){
138 LogTrace(
"Calibration") <<
"Segment local pos (in chamber RF): " << (*segment).localPosition()
139 <<
"\nSegment global pos: " << chamber->
toGlobal((*segment).localPosition());
142 double chiSquare = ((*segment).chi2()/(*segment).degreesOfFreedom());
147 if(!((*segment).phiSegment())){
148 LogTrace(
"Calibration") <<
"No phi segment";
153 bool segmNoisy =
false;
154 map<DTSuperLayerId,vector<DTRecHit1D> > hitsBySLMap;
156 if((*segment).hasPhi()){
162 for(vector<DTRecHit1D>::const_iterator
hit = phiHits.begin();
163 hit != phiHits.end(); ++
hit) {
166 hitsBySLMap[slId].push_back(*
hit);
170 bool isNoisy =
false;
171 bool isFEMasked =
false;
172 bool isTDCMasked =
false;
173 bool isTrigMask =
false;
176 statusMap->cellStatus(wireId, isNoisy, isFEMasked, isTDCMasked, isTrigMask, isDead, isNohv);
178 LogTrace(
"Calibration") <<
"Wire: " << wireId <<
" is noisy, skipping!";
188 if((*segment).hasZed()) {
191 zSeg2DPosInCham = chamber->
toLocal(sl->
toGlobal((*zSeg).localPosition()));
192 zSeg2DDirInCham = chamber->
toLocal(sl->
toGlobal((*zSeg).localDirection()));
197 for(vector<DTRecHit1D>::const_iterator
hit = zHits.begin();
198 hit != zHits.end(); ++
hit) {
201 bool isNoisy =
false;
202 bool isFEMasked =
false;
203 bool isTDCMasked =
false;
204 bool isTrigMask =
false;
207 statusMap->cellStatus(wireId, isNoisy, isFEMasked, isTDCMasked, isTrigMask, isDead, isNohv);
209 LogTrace(
"Calibration") <<
"Wire: " << wireId <<
" is noisy, skipping!";
216 if (segmNoisy)
continue;
218 LocalPoint segment4DLocalPos = (*segment).localPosition();
219 LocalVector segment4DLocalDir = (*segment).localDirection();
223 if((*segment).hasPhi()) {
225 if(segment->phiSegment()->ist0Valid()){
229 if((*segment).hasZed()){
231 if(segment->zSegment()->ist0Valid()){
edm::InputTag theRecHits4DLabel_
std::pair< const_iterator, const_iterator > range
iterator range
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
DTSuperLayerId superlayerId() const
Return the corresponding SuperLayerId.
ChamberHistosMap theT0SegHistoMap_
C::const_iterator const_iterator
constant access iterator type
void bookHistos(DTChamberId)
std::vector< DTRecHit1D > specificRecHits() const
Access to specific components.
DTSuperLayerId superLayerId() const
The id of the superlayer on which reside the segment.
virtual LocalPoint localPosition() const
local position in SL frame
std::string theCalibChamber_
virtual LocalVector localDirection() const
the local direction in SL frame
const DTSuperLayer * superLayer(DTSuperLayerId id) const
Return the superlayer corresponding to the given id.