85 vector<DTRecHit1DPair> hitsFromPhi1(rangeHitsFromPhi1.first,rangeHitsFromPhi1.second);
86 vector<DTRecHit1DPair> hitsFromPhi2(rangeHitsFromPhi2.first,rangeHitsFromPhi2.second);
88 cout<<
"Number of DTRecHit1DPair in the SL 1 (Phi 1): " << hitsFromPhi1.size()<<endl
89 <<
"Number of DTRecHit1DPair in the SL 3 (Phi 2): " << hitsFromPhi2.size()<<endl;
98 vector<DTRecHit1DPair> hitsFromTheta(rangeHitsFromTheta.first,rangeHitsFromTheta.second);
100 cout<<
"Number of DTRecHit1DPair in the SL 2 (Theta): " << hitsFromTheta.size()<<endl;
116 vector<DTSLRecSegment2D> segments2DTheta(rangeTheta.first,rangeTheta.second);
119 cout <<
"Number of 2D-segments in the second SL (Theta): " << segments2DTheta.size() << endl;
133 cout <<
"Reconstructing of the Phi segments" << endl;
136 vector<DTHitPairForFit*> pairPhiOwned;
139 if (
debug)
cout <<
"There are " << resultPhi.size() <<
" Phi cand" << endl;
147 if(
debug)
cout<<
"Reconstructing of the Theta segments"<<endl;
149 vector<DTSLRecSegment2D> segments2DTheta(thetaSegs.
begin(),thetaSegs.
end());
161 if (
debug)
cout <<
"No Theta SL" << endl;
165 if(
debug)
cout<<
"Building of the concrete DTRecSegment4D"<<endl;
166 if (resultPhi.size()) {
167 for (vector<DTSegmentCand*>::const_iterator
phi=resultPhi.begin();
168 phi!=resultPhi.end(); ++
phi) {
170 std::auto_ptr<DTChamberRecSegment2D> superPhi(**
phi);
173 if(
debug)
cout <<
"superPhi: " << *superPhi << endl;
182 if(
debug)
cout <<
"Theta: " << *zed << endl;
201 if (
debug)
cout <<
"Created a 4D seg " << *newSeg << endl;
205 if (
debug)
cout <<
" seg updated " << *newSeg << endl;
218 if (
debug)
cout <<
"Created a 4D segment using only the 2D Phi segment " << *newSeg << endl;
232 if(
debug)
cout <<
"Theta: " << *zed << endl;
242 if (
debug)
cout <<
"Created a 4D segment using only the 2D Theta segment " <<
253 for (vector<DTSegmentCand*>::iterator
phi=resultPhi.begin();
254 phi!=resultPhi.end(); ++
phi)
delete *
phi;
255 for (vector<DTHitPairForFit*>::iterator phiPair = pairPhiOwned.begin();
256 phiPair!=pairPhiOwned.end(); ++phiPair)
delete *phiPair;
273 if(
debug)
cout<<
"DTCombinatorialPatternReco4D::buildPhiSuperSegmentsCandidates: "
274 <<
"No Hits in the two Phi SL"<<endl;
275 return vector<DTSegmentCand*>();
284 copy(pairPhi2.begin(),pairPhi2.end(),back_inserter(pairPhi1));
286 pairPhiOwned.swap(pairPhi1);
299 int nHits=hits.size();
300 DTRecHit1D middle=hits[
static_cast<int>(nHits/2.)];
314 std::vector<DTRecHit1D> newHits(1,*hit);
320 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.