10 template <
class T>
T sqr(
T t) {
return t*
t;}
28 if ( hits.
size() < 2)
return 0;
44 LogDebug(
"CosmicSeedCreator") <<
"initial momentum = " << initialMomentum;
61 bool reverseAll =
false;
62 if ( fabs(tth1->globalPosition().perp()) < fabs(tth2->globalPosition().perp()) )
75 bool bottomSeed = (usedHit->globalPosition().y()<0);
83 LogDebug(
"CosmicSeedCreator") <<
"Reverse all applied";
101 if (reverseAll) initialMomentum *=-1;
106 initialMomentum *=-1;
116 initialMomentum,
charge, &*bfield),
120 LogDebug(
"CosmicSeedCreator")<<
"Position freeState: " << usedHit->globalPosition()
121 <<
"\nCharge: "<< charge
122 <<
"\nInitial momentum :" << initialMomentum ;
129 if (filter == 0 || filter->
compatible(seed)) {
130 seedCollection.push_back(seed);
143 <<
"Using SeedCreator---------->\n"
144 <<
"seedCollections size = " << seedCollection.size();
146 if ( seedCollection.size() >
maxseeds_ ) {
147 edm::LogError(
"TooManySeeds") <<
"Found too many seeds (" << seedCollection.size() <<
" > " <<
maxseeds_ <<
"), bailing out.\n";
148 seedCollection.clear();
152 return (seedCollection.empty() ? 0 : &seedCollection.back());
virtual bool compatible(const SeedingHitSet &hits, const TrackingRegion ®ion) const =0
virtual GlobalVector direction() const =0
the direction around which region is constructed
std::vector< TrajectorySeed > TrajectorySeedCollection
const TrajectorySeed * trajectorySeed(TrajectorySeedCollection &seedCollection, const SeedingHitSet &ordered, const TrackingRegion ®ion, const edm::EventSetup &es, const SeedComparitor *filter)
Square< F >::type sqr(const F &f)
unsigned int size() const