83 vector<DTRecHit1DPair> hitsFromPhi1(rangeHitsFromPhi1.first,rangeHitsFromPhi1.second);
84 vector<DTRecHit1DPair> hitsFromPhi2(rangeHitsFromPhi2.first,rangeHitsFromPhi2.second);
86 cout<<
"Number of DTRecHit1DPair in the SL 1 (Phi 1): " << hitsFromPhi1.size()<<endl
87 <<
"Number of DTRecHit1DPair in the SL 3 (Phi 2): " << hitsFromPhi2.size()<<endl;
96 vector<DTRecHit1DPair> hitsFromTheta(rangeHitsFromTheta.first,rangeHitsFromTheta.second);
98 cout<<
"Number of DTRecHit1DPair in the SL 2 (Theta): " << hitsFromTheta.size()<<endl;
114 vector<DTSLRecSegment2D> segments2DTheta(rangeTheta.first,rangeTheta.second);
117 cout <<
"Number of 2D-segments in the second SL (Theta): " << segments2DTheta.size() << endl;
131 cout <<
"Reconstructing of the Phi segments" << endl;
134 vector<DTHitPairForFit*> pairPhiOwned;
137 if (
debug)
cout <<
"There are " << resultPhi.size() <<
" Phi cand" << endl;
145 if(
debug)
cout<<
"Reconstructing of the Theta segments"<<endl;
147 vector<DTSLRecSegment2D> segments2DTheta(thetaSegs.
begin(),thetaSegs.
end());
159 if (
debug)
cout <<
"No Theta SL" << endl;
163 if(
debug)
cout<<
"Building of the concrete DTRecSegment4D"<<endl;
164 if (resultPhi.size()) {
165 for (vector<DTSegmentCand*>::const_iterator
phi=resultPhi.begin();
166 phi!=resultPhi.end(); ++
phi) {
168 std::auto_ptr<DTChamberRecSegment2D> superPhi(**
phi);
171 if(
debug)
cout <<
"superPhi: " << *superPhi << endl;
180 if(
debug)
cout <<
"Theta: " << *zed << endl;
199 if (
debug)
cout <<
"Created a 4D seg " << *newSeg << endl;
203 if (
debug)
cout <<
" seg updated " << *newSeg << endl;
216 if (
debug)
cout <<
"Created a 4D segment using only the 2D Phi segment " << *newSeg << endl;
230 if(
debug)
cout <<
"Theta: " << *zed << endl;
240 if (
debug)
cout <<
"Created a 4D segment using only the 2D Theta segment " <<
251 for (vector<DTSegmentCand*>::iterator
phi=resultPhi.begin();
252 phi!=resultPhi.end(); ++
phi)
delete *
phi;
253 for (vector<DTHitPairForFit*>::iterator phiPair = pairPhiOwned.begin();
254 phiPair!=pairPhiOwned.end(); ++phiPair)
delete *phiPair;
271 if(
debug)
cout<<
"DTCombinatorialPatternReco4D::buildPhiSuperSegmentsCandidates: "
272 <<
"No Hits in the two Phi SL"<<endl;
273 return vector<DTSegmentCand*>();
282 copy(pairPhi2.begin(),pairPhi2.end(),back_inserter(pairPhi1));
284 pairPhiOwned.swap(pairPhi1);
297 int nHits=hits.size();
298 DTRecHit1D middle=hits[
static_cast<int>(nHits/2.)];
312 std::vector<DTRecHit1D> newHits(1,*hit);
318 double chi2(zedSeg->
chi2());
DTCombinatorialPatternReco * the2DAlgo
T getParameter(std::string const &) const
virtual LocalError localPositionError() const
local position error in SL frame
T getUntrackedParameter(std::string const &, T const &) const
std::pair< const_iterator, const_iterator > range
iterator range
std::vector< DTHitPairForFit * > initHits(const DTSuperLayer *sl, const std::vector< DTRecHit1DPair > &hits)
virtual void setES(const edm::EventSetup &setup)
void update(DTRecSegment4D *seg, const bool calcT0=false) const
recompute hits position and refit the segment4D
void calculateT0corr(DTRecSegment2D *seg) const
const DTChamberRecSegment2D * phiSegment() const
The superPhi segment: 0 if no phi projection available.
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
virtual double chi2() const
the chi2 of the fit
static std::pair< DTLayerId, DTSuperLayerIdComparator > layersBySuperLayer(DTSuperLayerId slId)
Access by SL objects written into a RangeMap by layer.
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
std::vector< DTRecHit1DPair > theHitsFromPhi2
DTSegmentUpdator * theUpdator
DTRecSegment4D * segmentSpecialZed(const DTRecSegment4D *seg)
Build a 4d segment with a zed component made by just one hits.
Geom::Theta< T > theta() const
virtual LocalVector localDirection() const
Local direction in Chamber frame.
const DTChamber * theChamber
void setES(const edm::EventSetup &setup)
set the setup
DTChamberId id() const
Return the DTChamberId of this chamber.
Cos< T >::type cos(const T &t)
float digiTime() const
Return the time (ns) of the digi used to build the rechit.
DTCombinatorialPatternReco4D(const edm::ParameterSet &pset)
Constructor.
virtual LocalPoint localPosition() const
Local position in Chamber frame.
virtual void setES(const edm::EventSetup &setup)
std::vector< DTRecHit1D > specificRecHits() const
Access to specific components.
DTSuperLayerId superLayerId() const
The id of the superlayer on which reside the segment.
AlgebraicSymMatrix covMatrix() const
the Covariance Matrix
virtual LocalPoint localPosition() const
local position in SL frame
virtual edm::OwnVector< DTSLRecSegment2D > reconstruct(const DTSuperLayer *sl, const std::vector< DTRecHit1DPair > &hits)
this function is called in the producer
std::vector< DTSegmentCand * > buildPhiSuperSegmentsCandidates(std::vector< DTHitPairForFit * > &pairPhiOwned)
const DTSLRecSegment2D * zSegment() const
The Z segment: 0 if not zed projection available.
virtual ~DTCombinatorialPatternReco4D()
Destructor.
std::vector< DTRecHit1DPair > theHitsFromPhi1
std::vector< DTSLRecSegment2D > theSegments2DTheta
virtual void setChamber(const DTChamberId &chId)
virtual void setDTRecHit1DContainer(edm::Handle< DTRecHitCollection > all1DHits)
std::vector< DTRecHit1DPair > theHitsFromTheta
edm::ESHandle< DTGeometry > theDTGeometry
std::vector< DTSegmentCand * > buildSegments(const DTSuperLayer *sl, const std::vector< DTHitPairForFit * > &hits)
virtual edm::OwnVector< DTRecSegment4D > reconstruct()
Operations.
virtual LocalVector localDirection() const
the local direction in SL frame
CLHEP::HepSymMatrix AlgebraicSymMatrix
virtual void setDTRecSegment2DContainer(edm::Handle< DTRecSegment2DCollection > all2DSegments)
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
DTEnums::DTCellSide lrSide() const
The side of the cell.
const DTSuperLayer * superLayer(DTSuperLayerId id) const
Return the superlayer corresponding to the given id.
DTWireId wireId() const
Return the wireId.