CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
MultiHitGeneratorFromChi2 Class Referencefinal

#include <MultiHitGeneratorFromChi2.h>

Inheritance diagram for MultiHitGeneratorFromChi2:
MultiHitGeneratorFromPairAndLayers MultiHitGenerator OrderedHitsGenerator

Public Member Functions

virtual void hitSets (const TrackingRegion &region, OrderedMultiHits &trs, const edm::Event &ev, const edm::EventSetup &es)
 
void init (const HitPairGenerator &pairs, LayerCacheType *layerCache) override
 
void initES (const edm::EventSetup &es) override
 
 MultiHitGeneratorFromChi2 (const edm::ParameterSet &cfg)
 
const HitPairGeneratorpairGenerator () const
 
void setSeedingLayers (SeedingLayerSetsHits::SeedingLayerSet pairLayers, std::vector< SeedingLayerSetsHits::SeedingLayer > thirdLayers) override
 
virtual ~MultiHitGeneratorFromChi2 ()
 
- Public Member Functions inherited from MultiHitGeneratorFromPairAndLayers
virtual ~MultiHitGeneratorFromPairAndLayers ()
 
- Public Member Functions inherited from MultiHitGenerator
virtual void clear ()
 
virtual void hitSets (const TrackingRegion &reg, OrderedMultiHits &prs, const edm::EventSetup &es)
 
 MultiHitGenerator (unsigned int size=400)
 
 MultiHitGenerator (MultiHitGenerator const &other)
 
virtual const OrderedMultiHitsrun (const TrackingRegion &region, const edm::Event &ev, const edm::EventSetup &es) final
 
virtual ~MultiHitGenerator ()
 
- Public Member Functions inherited from OrderedHitsGenerator
 OrderedHitsGenerator ()
 
virtual ~OrderedHitsGenerator ()
 

Private Types

using HitOwnPtr = mayown_ptr< BaseTrackerRecHit >
 
typedef
CombinedMultiHitGenerator::LayerCacheType 
LayerCacheType
 

Private Member Functions

bool checkPhiInRange (float phi, float phi1, float phi2) const
 
std::pair< float, float > mergePhiRanges (const std::pair< float, float > &r1, const std::pair< float, float > &r2) const
 
void refit2Hits (HitOwnPtr &hit0, HitOwnPtr &hit1, TrajectoryStateOnSurface &tsos0, TrajectoryStateOnSurface &tsos1, const TrackingRegion &region, float nomField, bool isDebug)
 

Private Attributes

const MagneticFieldbfield
 
TkTransientTrackingRecHitBuilder
const * 
builder
 
std::string builderName_
 
std::vector< double > chi2_cuts
 
bool chi2VsPtCut
 
TkClonerImpl cloner
 
bool debug
 
std::vector< int > detIdsToDebug
 
float dphi
 
float extraHitRPhitolerance
 
float extraHitRZtolerance
 
float extraPhiKDBox
 
float extraRKDBox
 
float extraZKDBox
 
const ClusterShapeHitFilterfilter
 
std::string filterName_
 
double fnSigmaRZ
 
double maxChi2
 
std::string mfName_
 
float nomField
 
double nSigmaPhi
 
double nSigmaRZ
 
std::vector< double > pt_interv
 
bool refitHits
 
LayerCacheTypetheLayerCache
 
std::vector
< SeedingLayerSetsHits::SeedingLayer
theLayers
 
HitPairGeneratorthePairGenerator
 
bool useFixedPreFiltering
 
bool useSimpleMF_
 

Additional Inherited Members

- Public Types inherited from MultiHitGeneratorFromPairAndLayers
typedef LayerHitMapCache LayerCacheType
 
- Public Attributes inherited from OrderedHitsGenerator
unsigned int theMaxElement
 
- Protected Types inherited from MultiHitGenerator
using cacheHitPointer = std::unique_ptr< BaseTrackerRecHit >
 
using cacheHits = std::vector< cacheHitPointer >
 
- Protected Attributes inherited from MultiHitGenerator
cacheHits cache
 
edm::RunningAverage localRA
 

Detailed Description

A MultiHitGenerator from HitPairGenerator and vector of Layers. The HitPairGenerator provides a set of hit pairs. For each pair the search for compatible hit(s) is done among provided Layers

Definition at line 27 of file MultiHitGeneratorFromChi2.h.

Member Typedef Documentation

Definition at line 49 of file MultiHitGeneratorFromChi2.h.

Definition at line 29 of file MultiHitGeneratorFromChi2.h.

Constructor & Destructor Documentation

MultiHitGeneratorFromChi2::MultiHitGeneratorFromChi2 ( const edm::ParameterSet cfg)

Definition at line 50 of file MultiHitGeneratorFromChi2.cc.

References bfield, chi2_cuts, chi2VsPtCut, debug, detIdsToDebug, dphi, edm::ParameterSet::exists(), filter, edm::ParameterSet::getParameter(), mfName_, nomField, pt_interv, AlCaHLTBitMon_QueryRunRegistry::string, OrderedHitsGenerator::theMaxElement, useFixedPreFiltering, and useSimpleMF_.

51  : thePairGenerator(0),
52  theLayerCache(0),
53  useFixedPreFiltering(cfg.getParameter<bool>("useFixedPreFiltering")),
54  extraHitRZtolerance(cfg.getParameter<double>("extraHitRZtolerance")),//extra window in ThirdHitRZPrediction range
55  extraHitRPhitolerance(cfg.getParameter<double>("extraHitRPhitolerance")),//extra window in ThirdHitPredictionFromCircle range (divide by R to get phi)
56  extraZKDBox(cfg.getParameter<double>("extraZKDBox")),//extra windown in Z when building the KDTree box (used in barrel)
57  extraRKDBox(cfg.getParameter<double>("extraRKDBox")),//extra windown in R when building the KDTree box (used in endcap)
58  extraPhiKDBox(cfg.getParameter<double>("extraPhiKDBox")),//extra windown in Phi when building the KDTree box
59  fnSigmaRZ(cfg.getParameter<double>("fnSigmaRZ")),//this multiplies the max hit error on the layer when building the KDTree box
60  chi2VsPtCut(cfg.getParameter<bool>("chi2VsPtCut")),
61  maxChi2(cfg.getParameter<double>("maxChi2")),
62  refitHits(cfg.getParameter<bool>("refitHits")),
63  debug(cfg.getParameter<bool>("debug")),
64  filterName_(cfg.getParameter<std::string>("ClusterShapeHitFilterName")),
65  builderName_(cfg.existsAs<std::string>("TTRHBuilder") ? cfg.getParameter<std::string>("TTRHBuilder") : std::string("WithTrackAngle")),
66  useSimpleMF_(false),
67  mfName_("")
68 {
69  theMaxElement=cfg.getParameter<unsigned int>("maxElement");
71  dphi = cfg.getParameter<double>("phiPreFiltering");
72  if (chi2VsPtCut) {
73  pt_interv = cfg.getParameter<std::vector<double> >("pt_interv");
74  chi2_cuts = cfg.getParameter<std::vector<double> >("chi2_cuts");
75  }
76  if (debug) {
77  detIdsToDebug = cfg.getParameter<std::vector<int> >("detIdsToDebug");
78  //if (detIdsToDebug.size()<3) //fixme
79  } else {
80  detIdsToDebug.push_back(0);
81  detIdsToDebug.push_back(0);
82  detIdsToDebug.push_back(0);
83  }
84  // 2014/02/11 mia:
85  // we should get rid of the boolean parameter useSimpleMF,
86  // and use only a string magneticField [instead of SimpleMagneticField]
87  // or better an edm::ESInputTag (at the moment HLT does not handle ESInputTag)
88  if (cfg.exists("SimpleMagneticField")) {
89  useSimpleMF_ = true;
90  mfName_ = cfg.getParameter<std::string>("SimpleMagneticField");
91  }
92  filter = 0;
93  bfield = 0;
94  nomField = -1.;
95 }
T getParameter(std::string const &) const
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:184
const ClusterShapeHitFilter * filter
bool exists(std::string const &parameterName) const
checks if a parameter exists
virtual MultiHitGeneratorFromChi2::~MultiHitGeneratorFromChi2 ( )
inlinevirtual

Definition at line 34 of file MultiHitGeneratorFromChi2.h.

34 { delete thePairGenerator; }

Member Function Documentation

bool MultiHitGeneratorFromChi2::checkPhiInRange ( float  phi,
float  phi1,
float  phi2 
) const
private

Definition at line 648 of file MultiHitGeneratorFromChi2.cc.

References M_PI.

649 { while (phi > phi2) phi -= 2. * M_PI;
650  while (phi < phi1) phi += 2. * M_PI;
651  return phi <= phi2;
652 }
#define M_PI
Definition: DDAxes.h:10
void MultiHitGeneratorFromChi2::hitSets ( const TrackingRegion region,
OrderedMultiHits trs,
const edm::Event ev,
const edm::EventSetup es 
)
virtual

Implements MultiHitGenerator.

Definition at line 143 of file MultiHitGeneratorFromChi2.cc.

References RecHitsSortedInPhi::all(), angle(), GeomDetEnumerators::barrel, bfield, KDTreeLinkerAlgo< DATA >::build(), MultiHitGenerator::cache, RZLine::chi2(), chi2_cuts, chi2VsPtCut, cloner, gather_cfg::cout, ThirdHitPredictionFromCircle::curvature(), PixelRecoUtilities::curvature(), debug, detIdsToDebug, dphi, relativeConstraints::empty, mayown_ptr< T, N >::empty(), ev, extraHitRPhitolerance, extraHitRZtolerance, extraPhiKDBox, extraRKDBox, extraZKDBox, filter, RZLine::fit(), fnSigmaRZ, ClusterShapeHitFilter::isCompatible(), edm::isNotFinite(), mayown_ptr< T, N >::isOwn(), geometryCSVtoXML::line, TrajectoryStateOnSurface::localMomentum(), DetLayer::location(), M_PI, bookConverter::max, maxChi2, SiStripMatchedRecHit2D::monoCluster(), SiStripMatchedRecHit2D::monoId(), mergeVDriftHistosByStation::name, nomField, ProjectedSiStripRecHit2D::originalHit(), TrackingRegion::originRBound(), filesave_online::pairs, PV3DBase< T, PVType, FrameType >::perp(), ThirdHitPredictionFromCircle::phi(), Geom::pi(), PixelSubdetector::PixelBarrel, EnergyCorrector::pt, pt_interv, TrackingRegion::ptMin(), CosmicsPD_Skims::radius, refit2Hits(), refitHits, mayown_ptr< T, N >::release(), mayown_ptr< T, N >::reset(), ProxyBase11< T >::reset(), rho, KDTreeLinkerAlgo< DATA >::search(), OrderedMultiHits::size(), OrderedHitPairs::size(), findQualityFiles::size, SiStripMatchedRecHit2D::stereoCluster(), SiStripMatchedRecHit2D::stereoId(), theLayers, OrderedHitsGenerator::theMaxElement, thePairGenerator, StripSubdetector::TIB, SiStripDetId::TIB, SiStripDetId::TID, StripSubdetector::TOB, Geom::twoPi(), unlikely, useFixedPreFiltering, and PV3DBase< T, PVType, FrameType >::z().

147 {
148 
149  unsigned int debug_Id0 = detIdsToDebug[0];
150  unsigned int debug_Id1 = detIdsToDebug[1];
151  unsigned int debug_Id2 = detIdsToDebug[2];
152 
153  if (debug) cout << "pair: " << ((HitPairGeneratorFromLayerPair*) thePairGenerator)->innerLayer().name() << "+" << ((HitPairGeneratorFromLayerPair*) thePairGenerator)->outerLayer().name() << " 3rd lay size: " << theLayers.size() << endl;
154 
155  //gc: first get the pairs
157  pairs.reserve(30000);
158  thePairGenerator->hitPairs(region,pairs,ev,es);
159  if (debug) cout << endl;
160  if (pairs.empty()) {
161  //cout << "empy pairs" << endl;
162  return;
163  }
164 
165  //gc: these are all the layers compatible with the layer pairs (as defined in the config file)
166  int size = theLayers.size();
167 
168 
169  //gc: initialize a KDTree per each 3rd layer
170  std::vector<KDTreeNodeInfo<RecHitsSortedInPhi::HitIter> > layerTree; // re-used throughout
171  std::vector<RecHitsSortedInPhi::HitIter> foundNodes; // re-used thoughout
172  foundNodes.reserve(100);
173  #ifdef __clang__
174  std::vector<KDTreeLinkerAlgo<RecHitsSortedInPhi::HitIter>> hitTree(size);
175  #else
177  #endif
178  float rzError[size]; //save maximum errors
179  double maxphi = Geom::twoPi(), minphi = -maxphi; //increase to cater for any range
180 
181  map<std::string, LayerRZPredictions> mapPred;//need to use the name as map key since we may have more than one SeedingLayer per DetLayer (e.g. TID and MTID)
182  const RecHitsSortedInPhi * thirdHitMap[size];//gc: this comes from theLayerCache
183 
184  //gc: loop over each layer
185  for(int il = 0; il < size; il++) {
186  thirdHitMap[il] = &(*theLayerCache)(theLayers[il], region, ev, es);
187  if (debug) cout << "considering third layer: " << theLayers[il].name() << " with hits: " << thirdHitMap[il]->all().second-thirdHitMap[il]->all().first << endl;
188  const DetLayer *layer = theLayers[il].detLayer();
189  LayerRZPredictions &predRZ = mapPred[theLayers[il].name()];
190  predRZ.line.initLayer(layer);
191  predRZ.line.initTolerance(extraHitRZtolerance);
192 
193  //gc: now we take all hits in the layer and fill the KDTree
194  RecHitsSortedInPhi::Range hitRange = thirdHitMap[il]->all(); // Get iterators
195  layerTree.clear();
196  double minz=999999.0, maxz= -999999.0; // Initialise to extreme values in case no hits
197  float maxErr=0.0f;
198  bool barrelLayer = (theLayers[il].detLayer()->location() == GeomDetEnumerators::barrel);
199  if (hitRange.first != hitRange.second)
200  { minz = barrelLayer? hitRange.first->hit()->globalPosition().z() : hitRange.first->hit()->globalPosition().perp();
201  maxz = minz; //In case there's only one hit on the layer
202  for (RecHitsSortedInPhi::HitIter hi=hitRange.first; hi != hitRange.second; ++hi)
203  { double angle = hi->phi();
204  double myz = barrelLayer? hi->hit()->globalPosition().z() : hi->hit()->globalPosition().perp();
205 
206  if (debug && hi->hit()->rawId()==debug_Id2) {
207  cout << "filling KDTree with hit in id=" << debug_Id2
208  << " with pos: " << hi->hit()->globalPosition()
209  << " phi=" << hi->hit()->globalPosition().phi()
210  << " z=" << hi->hit()->globalPosition().z()
211  << " r=" << hi->hit()->globalPosition().perp()
212  << endl;
213  }
214  //use (phi,r) for endcaps rather than (phi,z)
215  if (myz < minz) { minz = myz;} else { if (myz > maxz) {maxz = myz;}}
216  float myerr = barrelLayer? hi->hit()->errorGlobalZ(): hi->hit()->errorGlobalR();
217  if (myerr > maxErr) { maxErr = myerr;}
218  layerTree.push_back(KDTreeNodeInfo<RecHitsSortedInPhi::HitIter>(hi, angle, myz)); // save it
219  if (angle < 0) // wrap all points in phi
220  { layerTree.push_back(KDTreeNodeInfo<RecHitsSortedInPhi::HitIter>(hi, angle+Geom::twoPi(), myz));}
221  else
222  { layerTree.push_back(KDTreeNodeInfo<RecHitsSortedInPhi::HitIter>(hi, angle-Geom::twoPi(), myz));}
223  }
224  }
225  KDTreeBox phiZ(minphi, maxphi, minz-0.01, maxz+0.01); // declare our bounds
226  //add fudge factors in case only one hit and also for floating-point inaccuracy
227  hitTree[il].build(layerTree, phiZ); // make KDtree
228  rzError[il] = maxErr; //save error
229  }
230  //gc: now we have initialized the KDTrees and we are out of the layer loop
231 
232  //gc: this sets the minPt of the triplet
233  double curv = PixelRecoUtilities::curvature(1. / region.ptMin(), es);
234 
235  if (debug) std::cout << "pair size=" << pairs.size() << std::endl;
236 
237  //gc: now we loop over all pairs
238  for (OrderedHitPairs::const_iterator ip = pairs.begin(); ip != pairs.end(); ++ip) {
239 
240  int foundTripletsFromPair = 0;
241  bool usePair = false;
242  cacheHitPointer bestH2;
244 
245  SeedingHitSet::ConstRecHitPointer oriHit0 = ip->inner();
246  SeedingHitSet::ConstRecHitPointer oriHit1 = ip->outer();
247 
248  HitOwnPtr hit0(*oriHit0);
249  HitOwnPtr hit1(*oriHit1);
250  GlobalPoint gp0 = hit0->globalPosition();
251  GlobalPoint gp1 = hit1->globalPosition();
252 
253  bool debugPair = debug && ip->inner()->rawId()==debug_Id0 && ip->outer()->rawId()==debug_Id1;
254 
255  if (debugPair) {
256  cout << endl << endl
257  << "found new pair with ids "<<debug_Id0<<" "<<debug_Id1<<" with pos: " << gp0 << " " << gp1
258  << endl;
259  }
260 
261  if (refitHits) {
262 
263  TrajectoryStateOnSurface tsos0, tsos1;
264  assert(!hit0.isOwn()); assert(!hit1.isOwn());
265  refit2Hits(hit0,hit1,tsos0,tsos1,region,nomField,debugPair);
266  assert(hit0.isOwn()); assert(hit1.isOwn());
267 
268  //fixme add pixels
269  bool passFilterHit0 = true;
270  if (//hit0->geographicalId().subdetId() > 2
271  hit0->geographicalId().subdetId()==SiStripDetId::TIB
272  || hit0->geographicalId().subdetId()==SiStripDetId::TID
273  //|| hit0->geographicalId().subdetId()==SiStripDetId::TOB
274  //|| hit0->geographicalId().subdetId()==SiStripDetId::TEC
275  ) {
276  const std::type_info &tid = typeid(*hit0->hit());
277  if (tid == typeid(SiStripMatchedRecHit2D)) {
278  const SiStripMatchedRecHit2D* matchedHit = dynamic_cast<const SiStripMatchedRecHit2D *>(hit0->hit());
279  if (filter->isCompatible(DetId(matchedHit->monoId()), matchedHit->monoCluster(), tsos0.localMomentum())==0 ||
280  filter->isCompatible(DetId(matchedHit->stereoId()), matchedHit->stereoCluster(), tsos0.localMomentum())==0) passFilterHit0 = false;
281  } else if (tid == typeid(SiStripRecHit2D)) {
282  const SiStripRecHit2D* recHit = dynamic_cast<const SiStripRecHit2D *>(hit0->hit());
283  if (filter->isCompatible(*recHit, tsos0.localMomentum())==0) passFilterHit0 = false;
284  } else if (tid == typeid(ProjectedSiStripRecHit2D)) {
285  const ProjectedSiStripRecHit2D* precHit = dynamic_cast<const ProjectedSiStripRecHit2D *>(hit0->hit());
286  if (filter->isCompatible(precHit->originalHit(), tsos0.localMomentum())==0) passFilterHit0 = false; //FIXME
287  }
288  }
289  if (debugPair&&!passFilterHit0) cout << "hit0 did not pass cluster shape filter" << endl;
290  if (!passFilterHit0) continue;
291  bool passFilterHit1 = true;
292  if (//hit1->geographicalId().subdetId() > 2
293  hit1->geographicalId().subdetId()==SiStripDetId::TIB
294  || hit1->geographicalId().subdetId()==SiStripDetId::TID
295  //|| hit1->geographicalId().subdetId()==SiStripDetId::TOB
296  //|| hit1->geographicalId().subdetId()==SiStripDetId::TEC
297  ) {
298  const std::type_info &tid = typeid(*hit1->hit());
299  if (tid == typeid(SiStripMatchedRecHit2D)) {
300  const SiStripMatchedRecHit2D* matchedHit = dynamic_cast<const SiStripMatchedRecHit2D *>(hit1->hit());
301  if (filter->isCompatible(DetId(matchedHit->monoId()), matchedHit->monoCluster(), tsos1.localMomentum())==0 ||
302  filter->isCompatible(DetId(matchedHit->stereoId()), matchedHit->stereoCluster(), tsos1.localMomentum())==0) passFilterHit1 = false;
303  } else if (tid == typeid(SiStripRecHit2D)) {
304  const SiStripRecHit2D* recHit = dynamic_cast<const SiStripRecHit2D *>(hit1->hit());
305  if (filter->isCompatible(*recHit, tsos1.localMomentum())==0) passFilterHit1 = false;
306  } else if (tid == typeid(ProjectedSiStripRecHit2D)) {
307  const ProjectedSiStripRecHit2D* precHit = dynamic_cast<const ProjectedSiStripRecHit2D *>(hit1->hit());
308  if (filter->isCompatible(precHit->originalHit(), tsos1.localMomentum())==0) passFilterHit1 = false; //FIXME
309  }
310  }
311  if (debugPair&&!passFilterHit1) cout << "hit1 did not pass cluster shape filter" << endl;
312  if (!passFilterHit1) continue;
313 
314  } else {
315  // not refit clone anyhow
316  hit0.reset((BaseTrackerRecHit *)hit0->clone());
317  hit1.reset((BaseTrackerRecHit *)hit1->clone());
318  }
319 
320  //gc: create the RZ line for the pair
321  SimpleLineRZ line(PixelRecoPointRZ(gp0.perp(),gp0.z()), PixelRecoPointRZ(gp1.perp(),gp1.z()));
322  ThirdHitPredictionFromCircle predictionRPhi(gp0, gp1, extraHitRPhitolerance);
323 
324  //gc: this is the curvature of the two hits assuming the region
325  Range pairCurvature = predictionRPhi.curvature(region.originRBound());
326  //gc: intersect not only returns a bool but may change pairCurvature to intersection with curv
327  if (!intersect(pairCurvature, Range(-curv, curv))) {
328  if (debugPair) std::cout << "curvature cut: curv=" << curv
329  << " gc=(" << pairCurvature.first << ", " << pairCurvature.second << ")" << std::endl;
330  continue;
331  }
332 
333  //gc: loop over all third layers compatible with the pair
334  for(int il = 0; (il < size) & (!usePair); il++) {
335 
336  if (debugPair)
337  cout << "cosider layer: " << theLayers[il].name() << " for this pair. Location: " << theLayers[il].detLayer()->location() << endl;
338 
339  if (hitTree[il].empty()) {
340  if (debugPair) {
341  cout << "empty hitTree" << endl;
342  }
343  continue; // Don't bother if no hits
344  }
345 
346  cacheHitPointer bestL2;
347  float chi2FromThisLayer = std::numeric_limits<float>::max();
348 
349  const DetLayer *layer = theLayers[il].detLayer();
350  bool barrelLayer = layer->location() == GeomDetEnumerators::barrel;
351 
352  LayerRZPredictions &predRZ = mapPred.find(theLayers[il].name())->second;
353  predRZ.line.initPropagator(&line);
354 
355  //gc: this takes the z at R-thick/2 and R+thick/2 according to
356  // the line from the two points and the adds the extra tolerance
357  Range rzRange = predRZ.line();
358 
359  if (rzRange.first >= rzRange.second) {
360  if (debugPair) {
361  cout << "rzRange empty" << endl;
362  }
363  continue;
364  }
365  //gc: check that rzRange is compatible with detector bounds
366  // note that intersect may change rzRange to intersection with bounds
367  if (!intersect(rzRange, predRZ.line.detSize())) {// theDetSize = Range(-maxZ, maxZ);
368  if (debugPair) {
369  cout << "rzRange and detector do not intersect" << endl;
370  }
371  continue;
372  }
373  Range radius = barrelLayer ? predRZ.line.detRange() : rzRange;
374 
375  //gc: define the phi range of the hits
376  Range phiRange;
377  if (useFixedPreFiltering) {
378  //gc: in this case it takes as range the phi of the outer
379  // hit +/- the phiPreFiltering value from cfg
380  float phi0 = ip->outer()->globalPosition().phi();
381  phiRange = Range(phi0 - dphi, phi0 + dphi);
382  } else {
383  //gc: predictionRPhi uses the cosine rule to find the phi of the 3rd point at radius, assuming the pairCurvature range [-c,+c]
384  if (pairCurvature.first<0. && pairCurvature.second<0.) {
385  float phi12 = predictionRPhi.phi(pairCurvature.first,radius.second);
386  float phi21 = predictionRPhi.phi(pairCurvature.second,radius.first);
387  while(unlikely(phi12 < phi21)) phi12 += float(2. * M_PI);
388  phiRange = Range(phi21,phi12);
389  } else if (pairCurvature.first>=0. && pairCurvature.second>=0.) {
390  float phi11 = predictionRPhi.phi(pairCurvature.first,radius.first);
391  float phi22 = predictionRPhi.phi(pairCurvature.second,radius.second);
392  while(unlikely(phi11 < phi22)) phi11 += float(2. * M_PI);
393  phiRange = Range(phi22,phi11);
394  } else {
395  float phi12 = predictionRPhi.phi(pairCurvature.first,radius.second);
396  float phi22 = predictionRPhi.phi(pairCurvature.second,radius.second);
397  while(unlikely(phi12 < phi22)) phi12 += float(2. * M_PI);
398  phiRange = Range(phi22,phi12);
399  }
400  }
401 
402  //gc: this is the place where hits in the compatible region are put in the foundNodes
404  foundNodes.clear(); // Now recover hits in bounding box...
405  // This needs range -twoPi to +twoPi to work
406  float prmin=phiRange.min(), prmax=phiRange.max(); //get contiguous range
407  if ((prmax-prmin) > Geom::twoPi()) {
408  prmax=Geom::pi(); prmin = -Geom::pi();
409  } else {
410  while (prmax>maxphi) { prmin -= Geom::twoPi(); prmax -= Geom::twoPi();}
411  while (prmin<minphi) { prmin += Geom::twoPi(); prmax += Geom::twoPi();}
412  }
413 
414  if (debugPair) cout << "defining kd tree box" << endl;
415 
416  if (barrelLayer) {
417  KDTreeBox phiZ(prmin-extraPhiKDBox, prmax+extraPhiKDBox,
418  rzRange.min()-fnSigmaRZ*rzError[il]-extraZKDBox,
419  rzRange.max()+fnSigmaRZ*rzError[il]+extraZKDBox);
420  hitTree[il].search(phiZ, foundNodes);
421 
422  if (debugPair) cout << "kd tree box bounds, phi: " << prmin-extraPhiKDBox <<","<< prmax+extraPhiKDBox
423  << " z: "<< rzRange.min()-fnSigmaRZ*rzError[il]-extraZKDBox <<","<<rzRange.max()+fnSigmaRZ*rzError[il]+extraZKDBox
424  << " rzRange: " << rzRange.min() <<","<<rzRange.max()
425  << endl;
426 
427  } else {
428  KDTreeBox phiR(prmin-extraPhiKDBox, prmax+extraPhiKDBox,
429  rzRange.min()-fnSigmaRZ*rzError[il]-extraRKDBox,
430  rzRange.max()+fnSigmaRZ*rzError[il]+extraRKDBox);
431  hitTree[il].search(phiR, foundNodes);
432 
433  if (debugPair) cout << "kd tree box bounds, phi: " << prmin-extraPhiKDBox <<","<< prmax+extraPhiKDBox
434  << " r: "<< rzRange.min()-fnSigmaRZ*rzError[il]-extraRKDBox <<","<<rzRange.max()+fnSigmaRZ*rzError[il]+extraRKDBox
435  << " rzRange: " << rzRange.min() <<","<<rzRange.max()
436  << endl;
437  }
438 
439  if (debugPair) cout << "kd tree box size: " << foundNodes.size() << endl;
440 
441 
442  //gc: now we loop over the hits in the box for this layer
443  for (std::vector<RecHitsSortedInPhi::HitIter>::iterator ih = foundNodes.begin();
444  ih !=foundNodes.end() && !usePair; ++ih) {
445 
446  if (debugPair) std::cout << endl << "triplet candidate" << std::endl;
447 
448  const RecHitsSortedInPhi::HitIter KDdata = *ih;
449 
450  SeedingHitSet::ConstRecHitPointer oriHit2 = KDdata->hit();
451  cacheHitPointer hit2;
452 
453  if (refitHits) {//fixme
454 
455  //fitting all 3 hits takes too much time... do it quickly only for 3rd hit
456  GlobalVector initMomentum(oriHit2->globalPosition() - gp1);
457  initMomentum *= (1./initMomentum.perp()); //set pT=1
458  GlobalTrajectoryParameters kine = GlobalTrajectoryParameters(oriHit2->globalPosition(), initMomentum, 1, &*bfield);
459  TrajectoryStateOnSurface state(kine,*oriHit2->surface());
460  hit2.reset((SeedingHitSet::RecHitPointer)(cloner(*oriHit2,state)));
461 
462  //fixme add pixels
463  bool passFilterHit2 = true;
464  if (hit2->geographicalId().subdetId()==SiStripDetId::TIB
465  || hit2->geographicalId().subdetId()==SiStripDetId::TID
466  // || hit2->geographicalId().subdetId()==SiStripDetId::TOB
467  // || hit2->geographicalId().subdetId()==SiStripDetId::TEC
468  ) {
469  const std::type_info &tid = typeid(*hit2->hit());
470  if (tid == typeid(SiStripMatchedRecHit2D)) {
471  const SiStripMatchedRecHit2D* matchedHit = dynamic_cast<const SiStripMatchedRecHit2D *>(hit2->hit());
472  if (filter->isCompatible(DetId(matchedHit->monoId()), matchedHit->monoCluster(), initMomentum)==0 ||
473  filter->isCompatible(DetId(matchedHit->stereoId()), matchedHit->stereoCluster(), initMomentum)==0) passFilterHit2 = false;
474  } else if (tid == typeid(SiStripRecHit2D)) {
475  const SiStripRecHit2D* recHit = dynamic_cast<const SiStripRecHit2D *>(hit2->hit());
476  if (filter->isCompatible(*recHit, initMomentum)==0) passFilterHit2 = false;
477  } else if (tid == typeid(ProjectedSiStripRecHit2D)) {
478  const ProjectedSiStripRecHit2D* precHit = dynamic_cast<const ProjectedSiStripRecHit2D *>(hit2->hit());
479  if (filter->isCompatible(precHit->originalHit(), initMomentum)==0) passFilterHit2 = false;
480  }
481  }
482  if (debugPair&&!passFilterHit2) cout << "hit2 did not pass cluster shape filter" << endl;
483  if (!passFilterHit2) continue;
484 
485  // fitting all 3 hits takes too much time :-(
486  // TrajectoryStateOnSurface tsos0, tsos1, tsos2;
487  // refit3Hits(hit0,hit1,hit2,tsos0,tsos1,tsos2,nomField,debugPair);
488  // if (hit2->geographicalId().subdetId()==SiStripDetId::TIB
489  // // || hit2->geographicalId().subdetId()==SiStripDetId::TOB
490  // // || hit2->geographicalId().subdetId()==SiStripDetId::TID
491  // // || hit2->geographicalId().subdetId()==SiStripDetId::TEC
492  // ) {
493  // const std::type_info &tid = typeid(*hit2->hit());
494  // if (tid == typeid(SiStripMatchedRecHit2D)) {
495  // const SiStripMatchedRecHit2D* matchedHit = dynamic_cast<const SiStripMatchedRecHit2D *>(hit2->hit());
496  // if (filter->isCompatible(DetId(matchedHit->monoId()), matchedHit->monoCluster(), tsos2.localMomentum())==0 ||
497  // filter->isCompatible(DetId(matchedHit->stereoId()), matchedHit->stereoCluster(), tsos2.localMomentum())==0) continue;
498  // } else if (tid == typeid(SiStripRecHit2D)) {
499  // const SiStripRecHit2D* recHit = dynamic_cast<const SiStripRecHit2D *>(hit2->hit());
500  // if (filter->isCompatible(*recHit, tsos2.localMomentum())==0) continue;
501  // } else if (tid == typeid(ProjectedSiStripRecHit2D)) {
502  // const ProjectedSiStripRecHit2D* precHit = dynamic_cast<const ProjectedSiStripRecHit2D *>(hit2->hit());
503  // if (filter->isCompatible(precHit->originalHit(), tsos2.localMomentum())==0) continue;;
504  // }
505  // }
506 
507  } else {
508  // not refit clone anyhow
509  hit2.reset((BaseTrackerRecHit*)oriHit2->clone());
510  }
511 
512  //gc: add the chi2 cut
513  vector<GlobalPoint> gp(3);
514  vector<GlobalError> ge(3);
515  vector<bool> bl(3);
516  gp[0] = hit0->globalPosition();
517  ge[0] = hit0->globalPositionError();
518  int subid0 = hit0->geographicalId().subdetId();
519  bl[0] = (subid0 == StripSubdetector::TIB || subid0 == StripSubdetector::TOB || subid0 == (int) PixelSubdetector::PixelBarrel);
520  gp[1] = hit1->globalPosition();
521  ge[1] = hit1->globalPositionError();
522  int subid1 = hit1->geographicalId().subdetId();
523  bl[1] = (subid1 == StripSubdetector::TIB || subid1 == StripSubdetector::TOB || subid1 == (int) PixelSubdetector::PixelBarrel);
524  gp[2] = hit2->globalPosition();
525  ge[2] = hit2->globalPositionError();
526  int subid2 = hit2->geographicalId().subdetId();
527  bl[2] = (subid2 == StripSubdetector::TIB || subid2 == StripSubdetector::TOB || subid2 == (int) PixelSubdetector::PixelBarrel);
528  RZLine rzLine(gp,ge,bl);
529  float cottheta, intercept, covss, covii, covsi;
530  rzLine.fit(cottheta, intercept, covss, covii, covsi);
531  float chi2 = rzLine.chi2(cottheta, intercept);
532 
533  bool debugTriplet = debugPair && hit2->rawId()==debug_Id2;
534  if (debugTriplet) {
535  std::cout << endl << "triplet candidate in debug id" << std::endl;
536  cout << "hit in id="<<hit2->rawId()<<" (from KDTree) with pos: " << KDdata->hit()->globalPosition()
537  << " refitted: " << hit2->globalPosition()
538  << " chi2: " << chi2
539  << endl;
540  //cout << state << endl;
541  }
542  // should fix nan
543  if ( (chi2 > maxChi2) | edm::isNotFinite(chi2) ) continue;
544 
545  if (chi2VsPtCut) {
546 
547  FastCircle theCircle(hit2->globalPosition(),hit1->globalPosition(),hit0->globalPosition());
548  float tesla0 = 0.1*nomField;
549  float rho = theCircle.rho();
550  float cm2GeV = 0.01 * 0.3*tesla0;
551  float pt = cm2GeV * rho;
552  if (debugTriplet) {
553  std::cout << "triplet pT=" << pt << std::endl;
554  }
555  if (pt<region.ptMin()) continue;
556 
557  if (chi2_cuts.size()==4) {
558  if ( ( pt>pt_interv[0] && pt<=pt_interv[1] && chi2 > chi2_cuts[0] ) ||
559  ( pt>pt_interv[1] && pt<=pt_interv[2] && chi2 > chi2_cuts[1] ) ||
560  ( pt>pt_interv[2] && pt<=pt_interv[3] && chi2 > chi2_cuts[2] ) ||
561  ( pt>pt_interv[3] && chi2 > chi2_cuts[3] ) ) continue;
562  }
563 
564  // apparently this takes too much time...
565  // if (chi2_cuts.size()>1) {
566  // int ncuts = chi2_cuts.size();
567  // if ( pt<=pt_interv[0] && chi2 > chi2_cuts[0] ) continue;
568  // bool pass = true;
569  // for (int icut=1; icut<ncuts-1; icut++){
570  // if ( pt>pt_interv[icut-1] && pt<=pt_interv[icut] && chi2 > chi2_cuts[icut] ) pass=false;
571  // }
572  // if (!pass) continue;
573  // if ( pt>pt_interv[ncuts-2] && chi2 > chi2_cuts[ncuts-1] ) continue;
574  // if (debug && hit0->rawId()==debug_Id0 && hit1->rawId()==debug_Id1 && hit2->rawId()==debug_Id2) {
575  // std::cout << "triplet passed chi2 vs pt cut" << std::endl;
576  // }
577  // }
578 
579  }
580 
581  if (theMaxElement!=0 && result.size() >= theMaxElement) {
582  result.clear();
583  edm::LogError("TooManyTriplets")<<" number of triples exceed maximum. no triplets produced.";
584  return;
585  }
586  if (debugPair) std::cout << "triplet made" << std::endl;
587  //result.push_back(SeedingHitSet(hit0, hit1, hit2));
588  /* no refit so keep only hit2
589  assert(tripletFromThisLayer.empty());
590  assert(hit0.isOwn()); assert(hit1.isOwn());assert(hit2.isOwn());
591  tripletFromThisLayer.emplace_back(std::move(hit0));
592  tripletFromThisLayer.emplace_back(std::move(hit1));
593  tripletFromThisLayer.emplace_back(std::move(hit2));
594  assert(hit0.isEmpty()); assert(hit1.isEmpty());assert(hit2.isEmpty());
595  */
596  bestL2 = std::move(hit2);
597  chi2FromThisLayer = chi2;
598  foundTripletsFromPair++;
599  if (foundTripletsFromPair>=2) {
600  usePair=true;
601  if (debugPair)
602  std::cout << "using pair" << std::endl;
603  break;
604  }
605  }//loop over hits in KDTree
606 
607  if (usePair) break;
608  else {
609  //if there is one triplet in more than one layer, try picking the one with best chi2
610  if (chi2FromThisLayer<minChi2) {
611  bestH2 = std::move(bestL2);
612  minChi2 = chi2FromThisLayer;
613  }
614  /*
615  else {
616  if (!bestH2 && foundTripletsFromPair>0)
617  std::cout << "what?? " << minChi2 << ' ' << chi2FromThisLayer << std::endl;
618  }
619  */
620  }
621 
622  }//loop over layers
623 
624  if (foundTripletsFromPair==0) continue;
625 
626  //push back only (max) once per pair
627  if (debugPair) std::cout << "Done seed #" << result.size() << std::endl;
628  if (usePair) result.push_back(SeedingHitSet(ip->inner(), ip->outer()));
629  else {
630  assert(1==foundTripletsFromPair);
631  assert(bestH2);
632  result.emplace_back(&*hit0,&*hit1,&*bestH2);
633  assert(hit0.isOwn()); assert(hit1.isOwn());
634  cache.emplace_back(const_cast<BaseTrackerRecHit*>(hit0.release()));
635  cache.emplace_back(const_cast<BaseTrackerRecHit*>(hit1.release()));
636  cache.emplace_back(std::move(bestH2));
637  assert(hit0.empty()); assert(hit1.empty());assert(!bestH2);
638  }
639  // std::cout << (usePair ? "pair " : "triplet ") << minChi2 <<' ' << cache.size() << std::endl;
640 
641 
642  }//loop over pairs
643  if (debug) {
644  std::cout << "triplet size=" << result.size() << std::endl;
645  }
646 }
void reset()
Definition: ProxyBase11.h:64
unsigned int stereoId() const
void build(std::vector< KDTreeNodeInfo > &eltList, const KDTreeBox &region)
T perp() const
Definition: PV3DBase.h:72
virtual Location location() const =0
Which part of the detector (barrel, endcap)
SiStripCluster const & monoCluster() const
const ClusterShapeHitFilter * filter
Definition: DDAxes.h:10
bool ev
virtual unsigned int size() const
void search(const KDTreeBox &searchBox, std::vector< KDTreeNodeInfo > &resRecHitList)
std::vector< SeedingLayerSetsHits::SeedingLayer > theLayers
LocalVector localMomentum() const
#define unlikely(x)
std::pair< HitIter, HitIter > Range
BaseTrackerRecHit const * ConstRecHitPointer
Definition: SeedingHitSet.h:11
bool isNotFinite(T x)
Definition: isFinite.h:10
T curvature(T InversePt, const edm::EventSetup &iSetup)
std::vector< HitWithPhi >::const_iterator HitIter
virtual void hitPairs(const TrackingRegion &reg, OrderedHitPairs &prs, const edm::EventSetup &es)
T z() const
Definition: PV3DBase.h:64
tuple result
Definition: query.py:137
#define M_PI
bool isCompatible(const SiPixelRecHit &recHit, const LocalVector &ldir, const SiPixelClusterShapeCache &clusterShapeCache, PixelData const *pd=0) const
SeedingHitSet::ConstRecHitPointer Hit
BaseTrackerRecHit const * Hit
Definition: RZLine.h:8
SiStripRecHit2D originalHit() const
Definition: DetId.h:18
PixelRecoRange< float > Range
mayown_ptr< BaseTrackerRecHit > HitOwnPtr
SiStripCluster const & stereoCluster() const
double pi()
Definition: Pi.h:31
double twoPi()
Definition: Pi.h:32
tuple cout
Definition: gather_cfg.py:121
unsigned int monoId() const
std::unique_ptr< BaseTrackerRecHit > cacheHitPointer
list pairs
sort tag files by run number
tuple size
Write out results.
void refit2Hits(HitOwnPtr &hit0, HitOwnPtr &hit1, TrajectoryStateOnSurface &tsos0, TrajectoryStateOnSurface &tsos1, const TrackingRegion &region, float nomField, bool isDebug)
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11
void MultiHitGeneratorFromChi2::init ( const HitPairGenerator pairs,
LayerCacheType layerCache 
)
overridevirtual

Implements MultiHitGeneratorFromPairAndLayers.

Definition at line 97 of file MultiHitGeneratorFromChi2.cc.

References HitPairGenerator::clone(), theLayerCache, and thePairGenerator.

99 {
100  thePairGenerator = pairs.clone();
101  theLayerCache = layerCache;
102 }
virtual HitPairGenerator * clone() const =0
void MultiHitGeneratorFromChi2::initES ( const edm::EventSetup es)
overridevirtual

Implements MultiHitGeneratorFromPairAndLayers.

Definition at line 104 of file MultiHitGeneratorFromChi2.cc.

References bfield, builder, builderName_, cloner, filter, filterName_, edm::EventSetup::get(), mfName_, nomField, MagneticField::nominalValue(), edm::ESHandle< class >::product(), and useSimpleMF_.

105 {
106 
108  if (useSimpleMF_) es.get<IdealMagneticFieldRecord>().get(mfName_, bfield_h);
109  else es.get<IdealMagneticFieldRecord>().get(bfield_h);
110  bfield = bfield_h.product();
112 
114  es.get<CkfComponentsRecord>().get(filterName_, filterHandle_);
115  filter = filterHandle_.product();
116 
118  es.get<TransientRecHitRecord>().get(builderName_, builderH);
119  builder = (TkTransientTrackingRecHitBuilder const *)(builderH.product());
120  cloner = (*builder).cloner();
121 }
int nominalValue() const
The nominal field value for this map in kGauss.
Definition: MagneticField.h:56
TkTransientTrackingRecHitBuilder const * builder
const ClusterShapeHitFilter * filter
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:86
std::pair< float, float > MultiHitGeneratorFromChi2::mergePhiRanges ( const std::pair< float, float > &  r1,
const std::pair< float, float > &  r2 
) const
private

Definition at line 655 of file MultiHitGeneratorFromChi2.cc.

References M_PI, bookConverter::max, and min().

657 { float r2Min = r2.first;
658  float r2Max = r2.second;
659  while (r1.first - r2Min > +M_PI) r2Min += 2. * M_PI, r2Max += 2. * M_PI;
660  while (r1.first - r2Min < -M_PI) r2Min -= 2. * M_PI, r2Max -= 2. * M_PI;
661  //std::cout << "mergePhiRanges " << fabs(r1.first-r2Min) << " " << fabs(r1.second-r2Max) << endl;
662  return std::make_pair(min(r1.first, r2Min), max(r1.second, r2Max));
663 }
T min(T a, T b)
Definition: MathUtil.h:58
#define M_PI
const HitPairGenerator& MultiHitGeneratorFromChi2::pairGenerator ( ) const
inline

Definition at line 46 of file MultiHitGeneratorFromChi2.h.

46 { return *thePairGenerator; }
void MultiHitGeneratorFromChi2::refit2Hits ( HitOwnPtr hit0,
HitOwnPtr hit1,
TrajectoryStateOnSurface tsos0,
TrajectoryStateOnSurface tsos1,
const TrackingRegion region,
float  nomField,
bool  isDebug 
)
private

Definition at line 665 of file MultiHitGeneratorFromChi2.cc.

References bfield, cloner, gather_cfg::cout, PV3DBase< T, PVType, FrameType >::eta(), TrajectoryStateOnSurface::globalMomentum(), nomField, TrackingRegion::origin(), p1, p2, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), EnergyCorrector::pt, lumiQueryAPI::q, mayown_ptr< T, N >::reset(), rho, FastCircle::rho(), funct::tan(), PV3DBase< T, PVType, FrameType >::theta(), x, PV3DBase< T, PVType, FrameType >::x(), FastCircle::x0(), detailsBasic3DVector::y, PV3DBase< T, PVType, FrameType >::y(), and FastCircle::y0().

Referenced by hitSets().

669  {
670 
671  //these need to be sorted in R
672  GlobalPoint gp0 = region.origin();
673  GlobalPoint gp1 = hit1->globalPosition();
674  GlobalPoint gp2 = hit2->globalPosition();
675 
676  if (isDebug) {
677  cout << "positions before refitting: " << hit1->globalPosition() << " " << hit2->globalPosition() <<endl;
678  }
679 
680  FastCircle theCircle(gp2,gp1,gp0);
681  GlobalPoint cc(theCircle.x0(),theCircle.y0(),0);
682  float tesla0 = 0.1*nomField;
683  float rho = theCircle.rho();
684  float cm2GeV = 0.01 * 0.3*tesla0;
685  float pt = cm2GeV * rho;
686 
687  GlobalVector vec20 = gp2-gp0;
688  //if (isDebug) { cout << "vec20.eta=" << vec20.eta() << endl; }
689 
690  GlobalVector p0( gp0.y()-cc.y(), -gp0.x()+cc.x(), 0. );
691  p0 = p0*pt/p0.perp();
692  GlobalVector p1( gp1.y()-cc.y(), -gp1.x()+cc.x(), 0. );
693  p1 = p1*pt/p1.perp();
694  GlobalVector p2( gp2.y()-cc.y(), -gp2.x()+cc.x(), 0. );
695  p2 = p2*pt/p2.perp();
696 
697  //check sign according to scalar product
698  if ( (p0.x()*(gp1.x()-gp0.x())+p0.y()*(gp1.y()-gp0.y()) ) < 0 ) {
699  p0*=-1.;
700  p1*=-1.;
701  p2*=-1.;
702  }
703 
704  //now set z component
705  p0 = GlobalVector(p0.x(),p0.y(),p0.perp()/tan(vec20.theta()));
706  p1 = GlobalVector(p1.x(),p1.y(),p1.perp()/tan(vec20.theta()));
707  p2 = GlobalVector(p2.x(),p2.y(),p2.perp()/tan(vec20.theta()));
708 
709  //get charge from vectorial product
710  TrackCharge q = 1;
711  if ((gp1-cc).x()*p1.y() - (gp1-cc).y()*p1.x() > 0) q =-q;
712 
714  state1 = TrajectoryStateOnSurface(kine1,*hit1->surface());
715  hit1.reset((SeedingHitSet::RecHitPointer)(cloner(*hit1,state1)));
716 
718  state2 = TrajectoryStateOnSurface(kine2,*hit2->surface());
719  hit2.reset((SeedingHitSet::RecHitPointer)(cloner(*hit2,state2)));
720 
721  if (isDebug) {
722  cout << "charge=" << q << endl;
723  cout << "state1 pt=" << state1.globalMomentum().perp() << " eta=" << state1.globalMomentum().eta() << " phi=" << state1.globalMomentum().phi() << endl;
724  cout << "state2 pt=" << state2.globalMomentum().perp() << " eta=" << state2.globalMomentum().eta() << " phi=" << state2.globalMomentum().phi() << endl;
725  cout << "positions after refitting: " << hit1->globalPosition() << " " << hit2->globalPosition() <<endl;
726  }
727 
728 }
void reset()
Definition: ProxyBase11.h:64
T perp() const
Definition: PV3DBase.h:72
GlobalPoint const & origin() const
Definition: DDAxes.h:10
T y() const
Definition: PV3DBase.h:63
Geom::Theta< T > theta() const
Definition: PV3DBase.h:75
int TrackCharge
Definition: TrackCharge.h:4
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
double p2[4]
Definition: TauolaWrapper.h:90
double p1[4]
Definition: TauolaWrapper.h:89
tuple cout
Definition: gather_cfg.py:121
Definition: DDAxes.h:10
T x() const
Definition: PV3DBase.h:62
Global3DVector GlobalVector
Definition: GlobalVector.h:10
void MultiHitGeneratorFromChi2::setSeedingLayers ( SeedingLayerSetsHits::SeedingLayerSet  pairLayers,
std::vector< SeedingLayerSetsHits::SeedingLayer thirdLayers 
)
overridevirtual

Implements MultiHitGeneratorFromPairAndLayers.

Definition at line 123 of file MultiHitGeneratorFromChi2.cc.

References HitPairGenerator::setSeedingLayers(), theLayers, and thePairGenerator.

124  {
125  thePairGenerator->setSeedingLayers(pairLayers);
126  theLayers = thirdLayers;
127 }
std::vector< SeedingLayerSetsHits::SeedingLayer > theLayers
virtual void setSeedingLayers(SeedingLayerSetsHits::SeedingLayerSet layers)=0

Member Data Documentation

const MagneticField* MultiHitGeneratorFromChi2::bfield
private

Definition at line 84 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets(), initES(), MultiHitGeneratorFromChi2(), and refit2Hits().

TkTransientTrackingRecHitBuilder const* MultiHitGeneratorFromChi2::builder
private

Definition at line 74 of file MultiHitGeneratorFromChi2.h.

Referenced by initES().

std::string MultiHitGeneratorFromChi2::builderName_
private

Definition at line 94 of file MultiHitGeneratorFromChi2.h.

Referenced by initES().

std::vector<double> MultiHitGeneratorFromChi2::chi2_cuts
private

Definition at line 90 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets(), and MultiHitGeneratorFromChi2().

bool MultiHitGeneratorFromChi2::chi2VsPtCut
private

Definition at line 87 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets(), and MultiHitGeneratorFromChi2().

TkClonerImpl MultiHitGeneratorFromChi2::cloner
private

Definition at line 75 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets(), initES(), and refit2Hits().

bool MultiHitGeneratorFromChi2::debug
private

Definition at line 92 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets(), and MultiHitGeneratorFromChi2().

std::vector<int> MultiHitGeneratorFromChi2::detIdsToDebug
private

Definition at line 99 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets(), and MultiHitGeneratorFromChi2().

float MultiHitGeneratorFromChi2::dphi
private

Definition at line 83 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets(), and MultiHitGeneratorFromChi2().

float MultiHitGeneratorFromChi2::extraHitRPhitolerance
private

Definition at line 79 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets().

float MultiHitGeneratorFromChi2::extraHitRZtolerance
private

Definition at line 78 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets().

float MultiHitGeneratorFromChi2::extraPhiKDBox
private

Definition at line 82 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets().

float MultiHitGeneratorFromChi2::extraRKDBox
private

Definition at line 81 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets().

float MultiHitGeneratorFromChi2::extraZKDBox
private

Definition at line 80 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets().

const ClusterShapeHitFilter* MultiHitGeneratorFromChi2::filter
private
std::string MultiHitGeneratorFromChi2::filterName_
private

Definition at line 93 of file MultiHitGeneratorFromChi2.h.

Referenced by initES().

double MultiHitGeneratorFromChi2::fnSigmaRZ
private

Definition at line 86 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets().

double MultiHitGeneratorFromChi2::maxChi2
private

Definition at line 88 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets().

std::string MultiHitGeneratorFromChi2::mfName_
private

Definition at line 97 of file MultiHitGeneratorFromChi2.h.

Referenced by initES(), and MultiHitGeneratorFromChi2().

float MultiHitGeneratorFromChi2::nomField
private

Definition at line 85 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets(), initES(), MultiHitGeneratorFromChi2(), and refit2Hits().

double MultiHitGeneratorFromChi2::nSigmaPhi
private

Definition at line 86 of file MultiHitGeneratorFromChi2.h.

double MultiHitGeneratorFromChi2::nSigmaRZ
private

Definition at line 86 of file MultiHitGeneratorFromChi2.h.

std::vector<double> MultiHitGeneratorFromChi2::pt_interv
private

Definition at line 89 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets(), and MultiHitGeneratorFromChi2().

bool MultiHitGeneratorFromChi2::refitHits
private

Definition at line 91 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets().

LayerCacheType* MultiHitGeneratorFromChi2::theLayerCache
private

Definition at line 72 of file MultiHitGeneratorFromChi2.h.

Referenced by init().

std::vector<SeedingLayerSetsHits::SeedingLayer> MultiHitGeneratorFromChi2::theLayers
private

Definition at line 71 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets(), and setSeedingLayers().

HitPairGenerator* MultiHitGeneratorFromChi2::thePairGenerator
private

Definition at line 70 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets(), init(), and setSeedingLayers().

bool MultiHitGeneratorFromChi2::useFixedPreFiltering
private

Definition at line 77 of file MultiHitGeneratorFromChi2.h.

Referenced by hitSets(), and MultiHitGeneratorFromChi2().

bool MultiHitGeneratorFromChi2::useSimpleMF_
private

Definition at line 96 of file MultiHitGeneratorFromChi2.h.

Referenced by initES(), and MultiHitGeneratorFromChi2().