#include <RecoEgamma/EgammaElectronAlgos/interface/ElectronSiStripSeedGenerator.h>
Description: SiStrip-driven electron seed finding algorithm.
Definition at line 62 of file ElectronSiStripSeedGenerator.h.
typedef TransientTrackingRecHit::ConstRecHitPointer ElectronSiStripSeedGenerator::ConstRecHitPointer |
Definition at line 68 of file ElectronSiStripSeedGenerator.h.
Definition at line 67 of file ElectronSiStripSeedGenerator.h.
Definition at line 70 of file ElectronSiStripSeedGenerator.h.
Definition at line 69 of file ElectronSiStripSeedGenerator.h.
ElectronSiStripSeedGenerator::ElectronSiStripSeedGenerator | ( | ) |
Definition at line 59 of file ElectronSiStripSeedGenerator.cc.
00060 :theUpdator(0), 00061 thePropagator(0), 00062 theSetup(0), 00063 pts_(0), 00064 theMatcher_(0) 00065 { 00066 00067 }
ElectronSiStripSeedGenerator::~ElectronSiStripSeedGenerator | ( | ) |
Definition at line 70 of file ElectronSiStripSeedGenerator.cc.
References thePropagator, and theUpdator.
00070 { 00071 00072 delete thePropagator; 00073 delete theUpdator; 00074 00075 }
bool ElectronSiStripSeedGenerator::checkHitsAndTSOS | ( | std::vector< const SiStripMatchedRecHit2D * >::const_iterator | hit1, | |
std::vector< const SiStripMatchedRecHit2D * >::const_iterator | hit2, | |||
double | scr, | |||
double | scz, | |||
double | pT, | |||
double | scEta | |||
) | [private] |
Definition at line 403 of file ElectronSiStripSeedGenerator.cc.
References a, b, TSiStripMatchedRecHit::build(), TrajectoryStateOnSurface::isValid(), FastHelix::isValid(), TrajectoryStateTransform::persistentState(), PV3DBase< T, PVType, FrameType >::phi(), phiDiff(), PropagatorWithMaterial::propagate(), pts_, r1, r2, funct::sqrt(), FastHelix::stateAtVertex(), std, theMatcher_, thePropagator, theSetup, theUpdator, trackerHandle, transformer_, KFUpdator::update(), whichSubdetector(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by findSeedsFromCluster().
00405 { 00406 00407 bool seedCutsSatisfied = false; 00408 00409 using namespace std; 00410 00411 // define our hit cut parameters 00412 double zCut = .35; 00413 double rCut = .3; 00414 double phiCut = 0.; 00415 00416 GlobalPoint hit1Pos = trackerHandle->idToDet((*hit1)->geographicalId())->surface().toGlobal((*hit1)->localPosition()); 00417 double r1 = sqrt(hit1Pos.x()*hit1Pos.x() + hit1Pos.y()*hit1Pos.y()); 00418 double phi1 = hit1Pos.phi(); 00419 double z1=hit1Pos.z(); 00420 00421 GlobalPoint hit2Pos = trackerHandle->idToDet((*hit2)->geographicalId())->surface().toGlobal((*hit2)->localPosition()); 00422 double r2 = sqrt(hit2Pos.x()*hit2Pos.x() + hit2Pos.y()*hit2Pos.y()); 00423 double phi2 = hit2Pos.phi(); 00424 double z2 = hit2Pos.z(); 00425 00426 if(r2 > r1 && (fabs(z2) > fabs(z1) || fabs(scEta) < 0.25)) { 00427 00428 //Consider the circle made of IP and Hit 1; Calculate it's radius using pT 00429 00430 double curv = pT*100/1.2; 00431 00432 //Predict phi of hit 2 00433 double a = (r2-r1)/(2*curv); 00434 double b = phiDiff(phi2,phi1); 00435 //UB added '=0' to avoid compiler warning 00436 double phiMissHit2=0; 00437 if(fabs(b - a)<fabs(b + a)) phiMissHit2 = b - a; 00438 if(fabs(b - a)>fabs(b + a)) phiMissHit2 = b + a; 00439 00440 double zMissHit2 = z2 - (r2*(zc-z1)-r1*zc+rc*z1)/(rc-r1); 00441 00442 double rPredHit2 = r1 + (rc-r1)/(zc-z1)*(z2-z1); 00443 double rMissHit2 = r2 - rPredHit2; 00444 00445 int subdetector = whichSubdetector(hit2); 00446 00447 00448 if(subdetector == 1){ 00449 phiCut = .006; 00450 }else if(subdetector == 2){ 00451 phiCut = .006; 00452 }else if(subdetector == 3){ 00453 phiCut = .007; 00454 } 00455 00456 00457 if(fabs(scEta) > 1.2 && fabs(scEta) < 1.5){ 00458 zCut = .8; 00459 rCut = .8; 00460 phiCut = .015; 00461 } 00462 00463 bool zDiff = true; 00464 if(z1 > 75 && z1 < 95 && ((z2-z1) > 18 || (z2-z1) < 5)) zDiff = false; 00465 if(z1 > 100 && z1 < 110 && ((z2-z1) > 35 || (z2-z1) < 5)) zDiff = false; 00466 if(z1 > 125 && z1 < 150 && ((z2-z1) > 18 || (z2-z1) < 5)) zDiff = false; 00467 00468 if(subdetector == 1){ 00469 int tibExtraCut = 0; 00470 if(r1 > 23 && r1 < 28 && r2 > 31 && r2 < 37) tibExtraCut = 1; 00471 if(fabs(phiMissHit2) < phiCut && fabs(zMissHit2) < zCut && tibExtraCut == 1) seedCutsSatisfied = true; 00472 }else if(subdetector == 2){ 00473 int tidExtraCut = 0; 00474 if(r1 > 23 && r1 < 34 && r2 > 26 && r2 < 42) tidExtraCut = 1; 00475 if(fabs(phiMissHit2) < phiCut && fabs(rMissHit2) < rCut && tidExtraCut == 1 && zDiff) seedCutsSatisfied = true; 00476 }else if(subdetector == 3){ 00477 int tecExtraCut = 0; 00478 if(r1 > 23 && r1 < 32 && r2 > 26 && r2 < 42) tecExtraCut = 1; 00479 if(fabs(phiMissHit2) < phiCut && fabs(rMissHit2) < rCut && tecExtraCut == 1 && zDiff) seedCutsSatisfied = true; 00480 } 00481 00482 } 00483 00484 if(!seedCutsSatisfied) return false; 00485 00486 // seed checks borrowed from pixel-based algoritm 00487 00488 pts_=0; 00489 00490 /* Some of this code could be better optimized. The Pixel algorithm natively 00491 takes Transient rec hits, so to recycle code we have to build them. 00492 */ 00493 00494 RecHitPointer hit1Trans = TSiStripMatchedRecHit::build(trackerHandle->idToDet((*hit1)->geographicalId()), *hit1, theMatcher_); 00495 RecHitPointer hit2Trans = TSiStripMatchedRecHit::build(trackerHandle->idToDet((*hit2)->geographicalId()), *hit2, theMatcher_); 00496 00497 typedef TrajectoryStateOnSurface TSOS; 00498 00499 double vertexZ = z1 - (r1 * (zc - z1) ) / (rc - r1); 00500 GlobalPoint eleVertex(0.,0.,vertexZ); 00501 00502 // make a spiral 00503 FastHelix helix(hit2Pos,hit1Pos,eleVertex,*theSetup); 00504 if (!helix.isValid()) return false; 00505 00506 FreeTrajectoryState fts = helix.stateAtVertex(); 00507 TSOS propagatedState = thePropagator->propagate(fts,hit1Trans->det()->surface()); 00508 00509 if (!propagatedState.isValid()) return false; 00510 00511 TSOS updatedState = theUpdator->update(propagatedState, *hit1Trans); 00512 TSOS propagatedState_out = thePropagator->propagate(fts,hit2Trans->det()->surface()) ; 00513 00514 if (!propagatedState_out.isValid()) return false; 00515 00516 // the seed has now passed all the cuts 00517 00518 TSOS updatedState_out = theUpdator->update(propagatedState_out, *hit2Trans); 00519 00520 pts_ = transformer_.persistentState(updatedState_out, hit2Trans->geographicalId().rawId()); 00521 00522 return true; 00523 }
void ElectronSiStripSeedGenerator::findSeedsFromCluster | ( | edm::Ref< reco::SuperClusterCollection > | seedCluster, | |
reco::ElectronPixelSeedCollection & | result | |||
) | [private] |
Definition at line 116 of file ElectronSiStripSeedGenerator.cc.
References alongMomentum, checkHitsAndTSOS(), edm::OwnVector< T, P >::clear(), funct::cos(), dir, TransverseImpactPointExtrapolator::extrapolate(), TrackingRecHit::geographicalId(), layer1Hits_, layer2Hits_, BaseSiTrackerRecHit2DLocalPos::localPosition(), matchedHitConverter(), measurementTrackerHandle, GeometricSearchTracker::negTecLayers(), GeometricSearchTracker::negTidLayers(), phiDiff(), GeometricSearchTracker::posTecLayers(), GeometricSearchTracker::posTidLayers(), funct::pow(), preselection(), edm::ESHandle< T >::product(), pts_, edm::OwnVector< T, P >::push_back(), recHits_, funct::sin(), funct::sqrt(), FastHelix::stateAtVertex(), std, theEstimator, thePropagator, theSetup, GeometricSearchTracker::tibLayers(), trackerHandle, useDetLayer(), reco::BeamSpot::x0(), reco::BeamSpot::y0(), and reco::BeamSpot::z0().
Referenced by run().
00117 { 00118 00119 // clear the member vectors of good hits 00120 layer1Hits_.clear(); 00121 layer2Hits_.clear(); 00122 00123 using namespace std; 00124 00125 double sCenergy = seedCluster->energy(); 00126 math::XYZPoint sCposition = seedCluster->position(); 00127 double scEta = seedCluster->eta(); 00128 00129 double scz = sCposition.z(); 00130 double scr = sqrt(pow(sCposition.x(),2)+pow(sCposition.y(),2)); 00131 00132 double pT = sCenergy * seedCluster->position().rho()/sqrt(seedCluster->x()*seedCluster->x()+seedCluster->y()*seedCluster->y()+seedCluster->z()*seedCluster->z()); 00133 00134 double magneticField = 4.0; 00135 00136 // cf Jackson p. 581-2, a little geometry 00137 double phiVsRSlope = -3.00e-3 * magneticField / pT / 2.; 00138 00139 00140 //Need to create TSOS to feed MeasurementTracker 00141 reco::BeamSpot* bs = new reco::BeamSpot(); 00142 GlobalPoint beamSpot(bs->x0(),bs->y0(),bs->z0()); 00143 GlobalPoint superCluster(sCposition.x(),sCposition.y(),sCposition.z()); 00144 double r0 = beamSpot.perp(); 00145 double z0 = beamSpot.z(); 00146 int chargeHypothesis = 0; 00147 if(phiDiff(superCluster.phi(),beamSpot.phi()) > 0) chargeHypothesis = -1; 00148 if(phiDiff(superCluster.phi(),beamSpot.phi()) < 0) chargeHypothesis = 1; 00149 00150 //Use BeamSpot and SC position to estimate 3rd point 00151 double rFake = 25.; 00152 double phiFake = phiDiff(superCluster.phi(),chargeHypothesis * phiVsRSlope * (scr - rFake)); 00153 double zFake = (rFake*(scz-z0)-r0*scz+scr*z0)/(scr-r0); 00154 double xFake = rFake * cos(phiFake); 00155 double yFake = rFake * sin(phiFake); 00156 GlobalPoint fakePoint(xFake,yFake,zFake); 00157 00158 //Use 3 points to make helix 00159 FastHelix initialHelix(superCluster,fakePoint,beamSpot,*theSetup); 00160 00161 //Use helix to get FTS 00162 FreeTrajectoryState initialFTS = initialHelix.stateAtVertex(); 00163 00164 //Use FTS and BeamSpot to create TSOS 00165 TransverseImpactPointExtrapolator* tipe = new TransverseImpactPointExtrapolator(*thePropagator); 00166 TrajectoryStateOnSurface initialTSOS = tipe->extrapolate(initialFTS,beamSpot); 00167 00168 //Use GST to retrieve hits from various DetLayers using layerMeasurements class 00169 const GeometricSearchTracker* gst = measurementTrackerHandle->geometricSearchTracker(); 00170 00171 std::vector<BarrelDetLayer*> tibLayers = gst->tibLayers(); 00172 DetLayer* tib1 = tibLayers.at(0); 00173 DetLayer* tib2 = tibLayers.at(1); 00174 00175 std::vector<ForwardDetLayer*> tecLayers; 00176 std::vector<ForwardDetLayer*> tidLayers; 00177 if(scEta < 0){ 00178 tecLayers = gst->negTecLayers(); 00179 tidLayers = gst->negTidLayers(); 00180 } 00181 if(scEta > 0){ 00182 tecLayers = gst->posTecLayers(); 00183 tidLayers = gst->posTidLayers(); 00184 } 00185 00186 DetLayer* tid1 = tidLayers.at(0); 00187 DetLayer* tid2 = tidLayers.at(1); 00188 DetLayer* tid3 = tidLayers.at(2); 00189 DetLayer* tec1 = tecLayers.at(0); 00190 DetLayer* tec2 = tecLayers.at(1); 00191 DetLayer* tec3 = tecLayers.at(2); 00192 00193 //Figure out which DetLayers to use based on SC Eta 00194 std::vector<bool> useDL = useDetLayer(scEta); 00195 bool useTID = false; 00196 00197 //Use counters to restrict the number of hits in TID and TEC layers 00198 //This reduces seed multiplicity 00199 int tid1MHC = 0; 00200 int tid2MHC = 0; 00201 int tid3MHC = 0; 00202 int tec1MHC = 0; 00203 int tec2MHC = 0; 00204 int tec3MHC = 0; 00205 00206 //Use counter to limit the allowed number of seeds 00207 int seedCounter = 0; 00208 00209 bool hasLay1Hit = false; 00210 bool hasLay2Hit = false; 00211 00212 LayerMeasurements layerMeasurements(measurementTrackerHandle.product()); 00213 00214 std::vector<TrajectoryMeasurement> tib1measurements; 00215 if(useDL.at(0)) tib1measurements = layerMeasurements.measurements(*tib1,initialTSOS,*thePropagator,*theEstimator); 00216 std::vector<TrajectoryMeasurement> tib2measurements; 00217 if(useDL.at(1)) tib2measurements = layerMeasurements.measurements(*tib2,initialTSOS,*thePropagator,*theEstimator); 00218 00219 //Basic idea: Retrieve hits from a given DetLayer 00220 //Check if it is a Matched Hit and satisfies some cuts 00221 //If yes, accept hit for seed making 00222 00223 for(std::vector<TrajectoryMeasurement>::const_iterator tmIter = tib1measurements.begin(); tmIter != tib1measurements.end(); ++ tmIter){ 00224 ConstRecHitPointer hit = tmIter->recHit(); 00225 const SiStripMatchedRecHit2D* matchedHit = matchedHitConverter(hit); 00226 if(matchedHit){ 00227 GlobalPoint position = trackerHandle->idToDet(matchedHit->geographicalId())->surface().toGlobal(matchedHit->localPosition()); 00228 if(preselection(position, superCluster, phiVsRSlope)){ 00229 hasLay1Hit = true; 00230 layer1Hits_.push_back(matchedHit); 00231 } 00232 } 00233 } 00234 00235 for(std::vector<TrajectoryMeasurement>::const_iterator tmIter = tib2measurements.begin(); tmIter != tib2measurements.end(); ++ tmIter){ 00236 ConstRecHitPointer hit = tmIter->recHit(); 00237 const SiStripMatchedRecHit2D* matchedHit = matchedHitConverter(hit); 00238 if(matchedHit){ 00239 GlobalPoint position = trackerHandle->idToDet(matchedHit->geographicalId())->surface().toGlobal(matchedHit->localPosition()); 00240 if(preselection(position, superCluster, phiVsRSlope)){ 00241 hasLay2Hit = true; 00242 layer2Hits_.push_back(matchedHit); 00243 } 00244 } 00245 } 00246 00247 if(!(hasLay1Hit && hasLay2Hit)) useTID = true; 00248 if(fabs(scEta) > 1.2) useTID = true; 00249 std::vector<TrajectoryMeasurement> tid1measurements; 00250 if(useDL.at(2) && useTID) tid1measurements = layerMeasurements.measurements(*tid1,initialTSOS,*thePropagator,*theEstimator); 00251 std::vector<TrajectoryMeasurement> tid2measurements; 00252 if(useDL.at(3) && useTID) tid2measurements = layerMeasurements.measurements(*tid2,initialTSOS,*thePropagator,*theEstimator); 00253 std::vector<TrajectoryMeasurement> tid3measurements; 00254 if(useDL.at(4) && useTID) tid3measurements = layerMeasurements.measurements(*tid3,initialTSOS,*thePropagator,*theEstimator); 00255 00256 for(std::vector<TrajectoryMeasurement>::const_iterator tmIter = tid1measurements.begin(); tmIter != tid1measurements.end(); ++ tmIter){ 00257 if(tid1MHC < 4){ 00258 ConstRecHitPointer hit = tmIter->recHit(); 00259 const SiStripMatchedRecHit2D* matchedHit = matchedHitConverter(hit); 00260 if(matchedHit){ 00261 GlobalPoint position = trackerHandle->idToDet(matchedHit->geographicalId())->surface().toGlobal(matchedHit->localPosition()); 00262 if(preselection(position, superCluster, phiVsRSlope)){ 00263 tid1MHC++; 00264 hasLay1Hit = true; 00265 layer1Hits_.push_back(matchedHit); 00266 hasLay2Hit = true; 00267 layer2Hits_.push_back(matchedHit); 00268 } 00269 } 00270 } 00271 } 00272 00273 for(std::vector<TrajectoryMeasurement>::const_iterator tmIter = tid2measurements.begin(); tmIter != tid2measurements.end(); ++ tmIter){ 00274 if(tid2MHC < 4){ 00275 ConstRecHitPointer hit = tmIter->recHit(); 00276 const SiStripMatchedRecHit2D* matchedHit = matchedHitConverter(hit); 00277 if(matchedHit){ 00278 GlobalPoint position = trackerHandle->idToDet(matchedHit->geographicalId())->surface().toGlobal(matchedHit->localPosition()); 00279 if(preselection(position, superCluster, phiVsRSlope)){ 00280 tid2MHC++; 00281 hasLay1Hit = true; 00282 layer1Hits_.push_back(matchedHit); 00283 hasLay2Hit = true; 00284 layer2Hits_.push_back(matchedHit); 00285 } 00286 } 00287 } 00288 } 00289 00290 for(std::vector<TrajectoryMeasurement>::const_iterator tmIter = tid3measurements.begin(); tmIter != tid3measurements.end(); ++ tmIter){ 00291 if(tid3MHC < 4){ 00292 ConstRecHitPointer hit = tmIter->recHit(); 00293 const SiStripMatchedRecHit2D* matchedHit = matchedHitConverter(hit); 00294 if(matchedHit){ 00295 GlobalPoint position = trackerHandle->idToDet(matchedHit->geographicalId())->surface().toGlobal(matchedHit->localPosition()); 00296 if(preselection(position, superCluster, phiVsRSlope)){ 00297 tid3MHC++; 00298 hasLay1Hit = true; 00299 layer1Hits_.push_back(matchedHit); 00300 hasLay2Hit = true; 00301 layer2Hits_.push_back(matchedHit); 00302 } 00303 } 00304 } 00305 } 00306 00307 std::vector<TrajectoryMeasurement> tec1measurements; 00308 if(useDL.at(5)) tec1measurements = layerMeasurements.measurements(*tec1,initialTSOS,*thePropagator,*theEstimator); 00309 std::vector<TrajectoryMeasurement> tec2measurements; 00310 if(useDL.at(6)) tec2measurements = layerMeasurements.measurements(*tec2,initialTSOS,*thePropagator,*theEstimator); 00311 std::vector<TrajectoryMeasurement> tec3measurements; 00312 if(useDL.at(7)) tec3measurements = layerMeasurements.measurements(*tec3,initialTSOS,*thePropagator,*theEstimator); 00313 00314 for(std::vector<TrajectoryMeasurement>::const_iterator tmIter = tec1measurements.begin(); tmIter != tec1measurements.end(); ++ tmIter){ 00315 if(tec1MHC < 2){ 00316 ConstRecHitPointer hit = tmIter->recHit(); 00317 const SiStripMatchedRecHit2D* matchedHit = matchedHitConverter(hit); 00318 if(matchedHit){ 00319 GlobalPoint position = trackerHandle->idToDet(matchedHit->geographicalId())->surface().toGlobal(matchedHit->localPosition()); 00320 if(preselection(position, superCluster, phiVsRSlope)){ 00321 tec1MHC++; 00322 hasLay1Hit = true; 00323 layer1Hits_.push_back(matchedHit); 00324 hasLay2Hit = true; 00325 layer2Hits_.push_back(matchedHit); 00326 } 00327 } 00328 } 00329 } 00330 00331 for(std::vector<TrajectoryMeasurement>::const_iterator tmIter = tec2measurements.begin(); tmIter != tec2measurements.end(); ++ tmIter){ 00332 if(tec2MHC < 2){ 00333 ConstRecHitPointer hit = tmIter->recHit(); 00334 const SiStripMatchedRecHit2D* matchedHit = matchedHitConverter(hit); 00335 if(matchedHit){ 00336 GlobalPoint position = trackerHandle->idToDet(matchedHit->geographicalId())->surface().toGlobal(matchedHit->localPosition()); 00337 if(preselection(position, superCluster, phiVsRSlope)){ 00338 tec2MHC++; 00339 hasLay1Hit = true; 00340 layer1Hits_.push_back(matchedHit); 00341 hasLay2Hit = true; 00342 layer2Hits_.push_back(matchedHit); 00343 } 00344 } 00345 } 00346 } 00347 00348 for(std::vector<TrajectoryMeasurement>::const_iterator tmIter = tec3measurements.begin(); tmIter != tec3measurements.end(); ++ tmIter){ 00349 if(tec3MHC < 2){ 00350 ConstRecHitPointer hit = tmIter->recHit(); 00351 const SiStripMatchedRecHit2D* matchedHit = matchedHitConverter(hit); 00352 if(matchedHit){ 00353 GlobalPoint position = trackerHandle->idToDet(matchedHit->geographicalId())->surface().toGlobal(matchedHit->localPosition()); 00354 if(preselection(position, superCluster, phiVsRSlope)){ 00355 tec3MHC++; 00356 hasLay2Hit = true; 00357 layer2Hits_.push_back(matchedHit); 00358 } 00359 } 00360 } 00361 } 00362 00363 // We have 2 arrays of hits, combine them to form seeds 00364 if( hasLay1Hit && hasLay2Hit ){ 00365 00366 for (std::vector<const SiStripMatchedRecHit2D*>::const_iterator hit1 = layer1Hits_.begin() ; hit1!= layer1Hits_.end(); ++hit1) { 00367 for (std::vector<const SiStripMatchedRecHit2D*>::const_iterator hit2 = layer2Hits_.begin() ; hit2!= layer2Hits_.end(); ++hit2) { 00368 00369 if(seedCounter < 5){ 00370 00371 if(checkHitsAndTSOS(hit1,hit2,scr,scz,pT,scEta)) { 00372 00373 seedCounter++; 00374 00375 recHits_.clear(); 00376 00377 SiStripMatchedRecHit2D *hit; 00378 hit=new SiStripMatchedRecHit2D(*(dynamic_cast <const SiStripMatchedRecHit2D *> (*hit1) ) ); 00379 recHits_.push_back(hit); 00380 hit=new SiStripMatchedRecHit2D(*(dynamic_cast <const SiStripMatchedRecHit2D *> (*hit2) ) ); 00381 recHits_.push_back(hit); 00382 00383 PropagationDirection dir = alongMomentum; 00384 00385 result.push_back( reco::ElectronPixelSeed (seedCluster,*pts_,recHits_,dir) ); 00386 00387 delete pts_; 00388 pts_=0; 00389 } 00390 00391 } 00392 00393 }// end of hit 2 loop 00394 00395 }// end of hit 1 loop 00396 00397 }//end of seed making 00398 00399 } // end of findSeedsFromCluster
const SiStripMatchedRecHit2D * ElectronSiStripSeedGenerator::matchedHitConverter | ( | ConstRecHitPointer | crhp | ) | [private] |
Definition at line 561 of file ElectronSiStripSeedGenerator.cc.
Referenced by findSeedsFromCluster().
00561 { 00562 const TrackingRecHit* trh = crhp->hit(); 00563 const SiStripMatchedRecHit2D* matchedHit = dynamic_cast<const SiStripMatchedRecHit2D*>(trh); 00564 return matchedHit; 00565 }
double ElectronSiStripSeedGenerator::normalPhi | ( | double | phi | ) | const [inline, private] |
double ElectronSiStripSeedGenerator::phiDiff | ( | double | phi1, | |
double | phi2 | |||
) | [inline, private] |
Definition at line 90 of file ElectronSiStripSeedGenerator.h.
References normalPhi(), and HLT_VtxMuL3::result.
Referenced by checkHitsAndTSOS(), findSeedsFromCluster(), and preselection().
00090 { 00091 double result = normalPhi(phi1) - normalPhi(phi2); 00092 if(result > M_PI) result -= 2*M_PI; 00093 if(result < -M_PI) result += 2*M_PI; 00094 return result; 00095 }
bool ElectronSiStripSeedGenerator::preselection | ( | GlobalPoint | position, | |
GlobalPoint | superCluster, | |||
double | phiVsRSlope | |||
) | [private] |
Definition at line 525 of file ElectronSiStripSeedGenerator.cc.
References PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), phi, phiDiff(), r, HLT_VtxMuL3::result, PV3DBase< T, PVType, FrameType >::z(), and z.
Referenced by findSeedsFromCluster().
00525 { 00526 double r = position.perp(); 00527 double phi = position.phi(); 00528 double z = position.z(); 00529 double scr = superCluster.perp(); 00530 double scphi = superCluster.phi(); 00531 double scz = superCluster.z(); 00532 double psi = phiDiff(phi,scphi); 00533 double deltaPsi = psi - (scr-r)*phiVsRSlope; 00534 double antiDeltaPsi = psi - (r-scr)*phiVsRSlope; 00535 double dP; 00536 if (fabs(deltaPsi)<fabs(antiDeltaPsi)){ 00537 dP = deltaPsi; 00538 }else{ 00539 dP = antiDeltaPsi; 00540 } 00541 double originZ = (scr*z - r*scz)/(scr-r); 00542 bool result = false; 00543 if(fabs(originZ) < 20 && fabs(dP) < .1) result = true; 00544 return result; 00545 }
void ElectronSiStripSeedGenerator::run | ( | edm::Event & | e, | |
const edm::Handle< reco::SuperClusterCollection > & | clusters, | |||
reco::ElectronPixelSeedCollection & | out | |||
) |
Definition at line 97 of file ElectronSiStripSeedGenerator.cc.
References findSeedsFromCluster(), i, edm::Event::id(), LogDebug, and measurementTrackerHandle.
Referenced by ElectronSiStripSeedProducer::produce().
00099 { 00100 measurementTrackerHandle->update(e); 00101 00102 for (unsigned int i=0;i<clusters->size();++i) { 00103 edm::Ref<reco::SuperClusterCollection> theClusB(clusters,i); 00104 // Find the seeds 00105 LogDebug ("run") << "new cluster, calling findSeedsFromCluster"; 00106 findSeedsFromCluster(theClusB,out); 00107 } 00108 00109 LogDebug ("run") << ": For event "<<e.id(); 00110 LogDebug ("run") <<"Nr of superclusters: "<<clusters->size() 00111 <<", no. of ElectronPixelSeeds found = " << out.size(); 00112 }
void ElectronSiStripSeedGenerator::setupES | ( | const edm::EventSetup & | setup, | |
const edm::ParameterSet & | conf | |||
) |
Definition at line 78 of file ElectronSiStripSeedGenerator.cc.
References alongMomentum, Chi2MeasurementEstimatorESProducer_cfi::Chi2MeasurementEstimator, edm::EventSetup::get(), measurementTrackerHandle, measurementTrackerName_, theEstimator, theMagField, thePropagator, theSetup, theUpdator, and trackerHandle.
Referenced by ElectronSiStripSeedProducer::beginJob().
00078 { 00079 using namespace edm; 00080 00081 theSetup= &setup; 00082 00083 setup.get<IdealMagneticFieldRecord>().get(theMagField); 00084 00085 measurementTrackerName_ = ""; 00086 00087 theUpdator = new KFUpdator(); 00088 thePropagator = new PropagatorWithMaterial(alongMomentum,.1057,&(*theMagField)); 00089 theEstimator = new Chi2MeasurementEstimator(30,3); 00090 00091 setup.get<TrackerDigiGeometryRecord>().get(trackerHandle); 00092 00093 setup.get<CkfComponentsRecord>().get(measurementTrackerName_,measurementTrackerHandle); 00094 00095 }
double ElectronSiStripSeedGenerator::unwrapPhi | ( | double | phi | ) | const [inline, private] |
std::vector< bool > ElectronSiStripSeedGenerator::useDetLayer | ( | double | scEta | ) | [private] |
Definition at line 567 of file ElectronSiStripSeedGenerator.cc.
Referenced by findSeedsFromCluster().
00567 { 00568 std::vector<bool> useDetLayer; 00569 double variable = fabs(scEta); 00570 if(variable > 0 && variable < 1.8){ 00571 useDetLayer.push_back(true); 00572 }else{ 00573 useDetLayer.push_back(false); 00574 } 00575 if(variable > 0 && variable < 1.5){ 00576 useDetLayer.push_back(true); 00577 }else{ 00578 useDetLayer.push_back(false); 00579 } 00580 if(variable > 1 && variable < 2.1){ 00581 useDetLayer.push_back(true); 00582 }else{ 00583 useDetLayer.push_back(false); 00584 } 00585 if(variable > 1 && variable < 2.2){ 00586 useDetLayer.push_back(true); 00587 }else{ 00588 useDetLayer.push_back(false); 00589 } 00590 if(variable > 1 && variable < 2.3){ 00591 useDetLayer.push_back(true); 00592 }else{ 00593 useDetLayer.push_back(false); 00594 } 00595 if(variable > 1.8 && variable < 2.5){ 00596 useDetLayer.push_back(true); 00597 }else{ 00598 useDetLayer.push_back(false); 00599 } 00600 if(variable > 1.8 && variable < 2.5){ 00601 useDetLayer.push_back(true); 00602 }else{ 00603 useDetLayer.push_back(false); 00604 } 00605 if(variable > 1.8 && variable < 2.5){ 00606 useDetLayer.push_back(true); 00607 }else{ 00608 useDetLayer.push_back(false); 00609 } 00610 return useDetLayer; 00611 }
int ElectronSiStripSeedGenerator::whichSubdetector | ( | std::vector< const SiStripMatchedRecHit2D * >::const_iterator | hit | ) | [private] |
Definition at line 549 of file ElectronSiStripSeedGenerator.cc.
References HLT_VtxMuL3::result, StripSubdetector::TEC, StripSubdetector::TIB, and StripSubdetector::TID.
Referenced by checkHitsAndTSOS().
00549 { 00550 int result = 0; 00551 if(((*hit)->geographicalId()).subdetId() == StripSubdetector::TIB){ 00552 result = 1; 00553 }else if(((*hit)->geographicalId()).subdetId() == StripSubdetector::TID){ 00554 result = 2; 00555 }else if(((*hit)->geographicalId()).subdetId() == StripSubdetector::TEC){ 00556 result = 3; 00557 } 00558 return result; 00559 }
std::vector<const SiStripMatchedRecHit2D*> ElectronSiStripSeedGenerator::layer1Hits_ [private] |
Definition at line 133 of file ElectronSiStripSeedGenerator.h.
Referenced by findSeedsFromCluster().
std::vector<const SiStripMatchedRecHit2D*> ElectronSiStripSeedGenerator::layer2Hits_ [private] |
Definition at line 134 of file ElectronSiStripSeedGenerator.h.
Referenced by findSeedsFromCluster().
Definition at line 118 of file ElectronSiStripSeedGenerator.h.
Referenced by findSeedsFromCluster(), run(), and setupES().
std::string ElectronSiStripSeedGenerator::measurementTrackerName_ [private] |
Definition at line 130 of file ElectronSiStripSeedGenerator.h.
Referenced by checkHitsAndTSOS(), and findSeedsFromCluster().
Definition at line 129 of file ElectronSiStripSeedGenerator.h.
Referenced by findSeedsFromCluster().
Definition at line 123 of file ElectronSiStripSeedGenerator.h.
Referenced by findSeedsFromCluster(), and setupES().
const SiStripRecHitMatcher* ElectronSiStripSeedGenerator::theMatcher_ [private] |
const NavigationSchool* ElectronSiStripSeedGenerator::theNavigationSchool [private] |
Definition at line 125 of file ElectronSiStripSeedGenerator.h.
Definition at line 122 of file ElectronSiStripSeedGenerator.h.
Referenced by checkHitsAndTSOS(), findSeedsFromCluster(), setupES(), and ~ElectronSiStripSeedGenerator().
const edm::EventSetup* ElectronSiStripSeedGenerator::theSetup [private] |
Definition at line 127 of file ElectronSiStripSeedGenerator.h.
Referenced by checkHitsAndTSOS(), findSeedsFromCluster(), and setupES().
Definition at line 121 of file ElectronSiStripSeedGenerator.h.
Referenced by checkHitsAndTSOS(), setupES(), and ~ElectronSiStripSeedGenerator().
Definition at line 120 of file ElectronSiStripSeedGenerator.h.
Referenced by checkHitsAndTSOS(), findSeedsFromCluster(), and setupES().