CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TripletFilter.cc
Go to the documentation of this file.
2 
5 
9 
12 
15 
17 
18 using namespace std;
19 
20 /*****************************************************************************/
22 {
23  // Get cluster shape hit filter
25  es.get<CkfComponentsRecord>().get("ClusterShapeHitFilter",shape);
26  theFilter = shape.product();
27 }
28 
29 /*****************************************************************************/
31 {
32 }
33 
34 /*****************************************************************************/
36  (vector<const TrackingRecHit*> recHits, vector<LocalVector> localDirs)
37 {
38  bool ok = true;
39 
40  vector<LocalVector>::const_iterator localDir = localDirs.begin();
41  for(vector<const TrackingRecHit*>::const_iterator recHit = recHits.begin();
42  recHit!= recHits.end();
43  recHit++)
44  {
45  const SiPixelRecHit* pixelRecHit =
46  dynamic_cast<const SiPixelRecHit *>(*recHit);
47 
48  if(! pixelRecHit->isValid())
49  { ok = false; break; }
50 
51  if(! theFilter->isCompatible(*pixelRecHit, *localDir))
52  {
53  LogTrace("MinBiasTracking")
54  << " [TripletFilter] clusShape problem"
55  << HitInfo::getInfo(**recHit);
56 
57  ok = false; break;
58  }
59 
60  localDir++;
61  }
62 
63  return ok;
64 }
65 
66 /*****************************************************************************/
68  (vector<const TrackingRecHit*> recHits, vector<GlobalVector> globalDirs)
69 {
70  bool ok = true;
71 
72  vector<GlobalVector>::const_iterator globalDir = globalDirs.begin();
73  for(vector<const TrackingRecHit*>::const_iterator recHit = recHits.begin();
74  recHit!= recHits.end();
75  recHit++)
76  {
77  const SiPixelRecHit* pixelRecHit =
78  dynamic_cast<const SiPixelRecHit *>(*recHit);
79 
80  if(! pixelRecHit->isValid())
81  { ok = false; break; }
82 
83  if(! theFilter->isCompatible(*pixelRecHit, *globalDir))
84  {
85  LogTrace("MinBiasTracking")
86  << " [TripletFilter] clusShape problem"
87  << HitInfo::getInfo(**recHit);
88 
89  ok = false; break;
90  }
91 
92  globalDir++;
93  }
94 
95  return ok;
96 }
97 
static std::string getInfo(const DetId &id)
Definition: HitInfo.cc:24
#define LogTrace(id)
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
bool isValid() const
TripletFilter(const edm::EventSetup &es)
bool checkTrack(std::vector< const TrackingRecHit * > recHits, std::vector< LocalVector > localDirs)
Our base class.
Definition: SiPixelRecHit.h:22