CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TransientTrackingRecHit.cc
Go to the documentation of this file.
2 
4 
5 
6 #ifdef COUNT_HITS
7 #include<cstdio>
8 namespace {
9 
10  struct Stat {
11  ~Stat() {
12  printf("TTRH: %d/%d/%d/%d\n",tot[0],tot[1],tot[2],tot[3]);
13  }
14  int tot[4]={0};
15  };
16  Stat stat;
17 }
18 
20  ++stat.tot[type];
21 }
22 #endif
23 
24 
26 {
27  return dynamic_cast<const GeomDetUnit*>(det());
28 }
29 
30 
31 
32 
34 {
35  // no components by default
36  return ConstRecHitContainer();
37 }
38 
41  return RecHitPointer(const_cast<TransientTrackingRecHit*>(this));
42 }
ReferenceCountingPointer< TransientTrackingRecHit > RecHitPointer
type
Definition: HCALResponse.h:21
virtual TransientTrackingRecHit * clone() const =0
virtual const GeomDet * det() const =0
The GomeDet* can be zero for InvalidTransientRecHits and for TConstraintRecHit2Ds.
std::vector< ConstRecHitPointer > ConstRecHitContainer
void countTTRH(TrackingRecHit::Type)
virtual const GeomDetUnit * detUnit() const
virtual ConstRecHitContainer transientHits() const
Composite interface: returns the component hits, if any.