58 dynamicphiroad_(pset.getParameter<bool>(
"dynamicPhiRoad")),
59 lowPtThreshold_(pset.getParameter<double>(
"LowPtThreshold")),
60 highPtThreshold_(pset.getParameter<double>(
"HighPtThreshold")),
61 sizeWindowENeg_(pset.getParameter<double>(
"SizeWindowENeg")),
62 phimin2_(pset.getParameter<double>(
"PhiMin2")),
63 phimax2_(pset.getParameter<double>(
"PhiMax2")),
64 deltaPhi1Low_(pset.getParameter<double>(
"DeltaPhi1Low")),
65 deltaPhi1High_(pset.getParameter<double>(
"DeltaPhi1High")),
66 deltaPhi2_(pset.getParameter<double>(
"DeltaPhi2")),
69 fromTrackerSeeds_(pset.getParameter<bool>(
"fromTrackerSeeds")),
70 theUpdator(0), thePropagator(0),
73 theSetup(0), theBeamSpot(beamSpot)
158 double sigmaZ=recoBeamSpotHandle->sigmaZ();
159 double sigmaZ0Error=recoBeamSpotHandle->sigmaZ0Error();
160 double sq=
sqrt(sigmaZ*sigmaZ+sigmaZ0Error*sigmaZ0Error);
164 std::cout <<
"Z Range for pixel matcher : " << zmin1 <<
" " <<
BSPosition_.z() <<
" " << zmax1 << std::endl;
169 std::map<unsigned,std::vector<reco::ElectronSeed> > myPixelSeeds;
172 if(theGSRecHits->
size() == 0)
return;
177 const std::vector<unsigned> theSimTrackIds = theGSRecHits->
ids();
180 for (
unsigned tkId=0; tkId != theSimTrackIds.size(); ++tkId ) {
182 unsigned simTrackId = theSimTrackIds[tkId];
183 const SimTrack& theSimTrack = (*theSimTracks)[simTrackId];
189 unsigned numberOfRecHits = 0;
195 std::vector<unsigned> layerHit(6,static_cast<unsigned>(0));
198 std::vector<TrackerRecHit> theHits;
207 for ( iterRecHit = theRecHitRangeIteratorBegin;
208 iterRecHit != theRecHitRangeIteratorEnd;
213 if ( ( currentHit.
subDetId() <= 2 ) ||
222 theHits.push_back(currentHit);
226 if ( numberOfRecHits < 3 )
continue;
229 if ( theHits.size() < 2 )
continue;
233 unsigned csize = sclRefs.
size();
234 for (
unsigned int i=0;
i<csize;++
i) {
237 LogDebug (
"run") <<
"new cluster, calling addAseedFromThisCluster";
248 std::cout <<
"We have " << seeds->size() <<
" tracker seeds!" << std::endl;
250 for (
unsigned int i=0;
i<seeds->size();++
i) {
253 std::vector<TrackerRecHit> theHits;
260 for ( ; theSeedItr != theSeedRangeIteratorEnd; ++theSeedItr ) {
264 theHits.push_back(currentHit);
268 unsigned csize = sclRefs.
size();
269 for (
unsigned int i=0;
i<csize;++
i) {
273 std::cout <<
"new cluster, calling addAseedFromThisCluster" << std::endl;
286 std::map<unsigned,std::vector<reco::ElectronSeed> >::const_iterator px = myPixelSeeds.begin();
287 std::map<unsigned,std::vector<reco::ElectronSeed> >::const_iterator pxEnd = myPixelSeeds.end();
288 for ( ; px!=pxEnd; ++px ) {
289 unsigned nSeeds = (px->second).
size();
290 for (
unsigned ipx = 0; ipx<nSeeds; ++ipx ) {
291 out.push_back((px->second)[ipx]);
297 LogDebug (
"run") <<
"Nr of superclusters: "<<sclRefs.
size()
298 <<
", no. of ElectronSeeds found = " << out.size();
302 <<
", no. of ElectronSeeds found = " << out.size() << std::endl;
309 std::vector<TrackerRecHit>& theHits,
311 std::vector<reco::ElectronSeed>&
result)
314 float clusterEnergy = seedCluster->energy();
315 GlobalPoint clusterPos(seedCluster->position().x(),
316 seedCluster->position().y(),
317 seedCluster->position().z());
321 std::cout <<
"[FastElectronSeedGenerator::seedsFromThisCluster] "
322 <<
"new supercluster with energy: " << clusterEnergy << std::endl;
323 std::cout <<
"[FastElectronSeedGenerator::seedsFromThisCluster] "
324 <<
"and position: " << clusterPos << std::endl;
325 std::cout <<
"Vertex position : " << vertexPos << std::endl;
330 float clusterEnergyT = clusterEnergy*
sin(seedCluster->position().theta()) ;
332 float deltaPhi1 = 0.875/clusterEnergyT + 0.055;
354 std::vector<std::pair<ConstRecHitPointer,ConstRecHitPointer> > compatPixelHits =
362 if (!compatPixelHits.empty() ) {
364 std::cout <<
"[FastElectronSeedGenerator::seedsFromThisCluster] "
365 <<
" electron compatible hits found " << std::endl;
370 std::vector<std::pair<ConstRecHitPointer,ConstRecHitPointer> >::iterator
v;
371 for (v = compatPixelHits.begin(); v != compatPixelHits.end(); ++
v ) {
394 std::cout <<
"[FastElectronSeedGenerator::seedsFromThisCluster] "
395 <<
" No electron compatible hits found " << std::endl;
410 LogDebug(
"") <<
"[FastElectronSeedGenerator::prepareElTrackSeed] "
411 <<
"inner PixelHit x,y,z "<<innerhit->globalPosition();
412 LogDebug(
"") <<
"[FastElectronSeedGenerator::prepareElTrackSeed] "
413 <<
"outer PixelHit x,y,z "<<outerhit->globalPosition();
416 FastHelix helix(outerhit->globalPosition(),innerhit->globalPosition(),vertexPos,*
theSetup);
417 if ( !helix.isValid())
return false;
426 if (!propagatedState.
isValid())
return false;
void setCaloCluster(const CaloClusterRef &, unsigned char hitsMask=0, int subDet2=0, int subDet1=0, float hoe1=std::numeric_limits< float >::infinity(), float hoe2=std::numeric_limits< float >::infinity())
PTrajectoryStateOnDet pts_
T getParameter(std::string const &) const
std::pair< const_iterator, const_iterator > range
iterator range
void setupES(const edm::EventSetup &setup)
size_t size() const
return number of contained object
ROOT::Math::SMatrixIdentity AlgebraicMatrixID
const edm::EventSetup * theSetup
Sin< T >::type sin(const T &t)
const MagneticFieldMap * theMagneticFieldMap
range get(ID id, CMP comparator) const
const TrackerInteractionGeometry * theTrackerInteractionGeometry
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
TrajectorySeedCollection * theInitialSeedColl
unsigned int ringNumber() const
The Ring Number.
void set1stLayer(float ephimin, float ephimax, float pphimin, float pphimax)
PropagatorWithMaterial * thePropagator
C::const_iterator const_iterator
constant access iterator type
PRecHitContainer recHits_
void set1stLayerZRange(double zmin1, double zmax1)
std::vector< TrajectorySeed > TrajectorySeedCollection
FastElectronSeedGenerator(const edm::ParameterSet &pset, double pTMin, const edm::InputTag &beamSpot)
std::vector< std::pair< ConstRecHitPointer, ConstRecHitPointer > > compatibleHits(const GlobalPoint &xmeas, const GlobalPoint &vprim, float energy, std::vector< TrackerRecHit > &theHits)
recHitContainer::const_iterator const_iterator
void run(edm::Event &e, const reco::SuperClusterRefVector &sclRefs, const SiTrackerGSMatchedRecHit2DCollection *theGSRecHits, const edm::SimTrackContainer *theSimTracks, TrajectorySeedCollection *seeds, reco::ElectronSeedCollection &out)
std::pair< const_iterator, const_iterator > range
const GeometricSearchTracker * theGeomSearchTracker
std::vector< ElectronSeed > ElectronSeedCollection
collection of ElectronSeed objects
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
FastPixelHitMatcher * myGSPixelMatcher
virtual TrajectoryStateOnSurface propagate(const TrajectoryStateOnSurface &tsos, const Plane &plane) const
void setCurvilinearError(const CurvilinearTrajectoryError &err)
void addASeedToThisCluster(edm::Ref< reco::SuperClusterCollection > seedCluster, std::vector< TrackerRecHit > &theHits, const TrajectorySeed &theTrackerSeed, std::vector< reco::ElectronSeed > &result)
bool prepareElTrackSeed(ConstRecHitPointer outerhit, ConstRecHitPointer innerhit, const GlobalPoint &vertexPos)
math::XYZPoint BSPosition_
unsigned int layerNumber() const
The Layer Number.
ESHandle< TrackerGeometry > geometry
const math::XYZTLorentzVectorD & momentum() const
particle info...
unsigned int subDetId() const
The subdet Id.
size_type size() const
Size of the RefVector.
void setES(const MagneticFieldMap *aFieldMap, const TrackerGeometry *aTrackerGeometry, const GeometricSearchTracker *geomSearchTracker, const TrackerInteractionGeometry *interactionGeometry)
std::vector< ID > ids() const
indentifier vector
const MagneticField * theMagField
~FastElectronSeedGenerator()
const edm::InputTag theBeamSpot
std::vector< SimTrack > SimTrackContainer
void set2ndLayer(float phimin, float phimax)
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
tuple size
Write out results.
const TrackerGeometry * theTrackerGeometry