test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MuonDetCleaner.cc
Go to the documentation of this file.
2 
3 
7 
12 
13 
17 
18 
19 //-------------------------------------------------------------------------------
20 // define 'getDetIds' functions used for different types of recHits
21 //-------------------------------------------------------------------------------
22 
23 
24 template <typename T1, typename T2>
25 uint32_t MuonDetCleaner<T1,T2>::getRawDetId(const T2& recHit)
26 {
27  assert(0); // CV: make sure general function never gets called;
28  // always use template specializations
29 }
30 
31 template <>
33 {
34  return recHit.cscDetId().rawId();
35 }
36 
37 template <>
39 {
40  return recHit.geographicalId().rawId();
41 }
42 
43 template <>
45 {
46  return recHit.rpcId().rawId();
47 }
48 
49 
50 //-------------------------------------------------------------------------------
51 // find out what the kind of RecHit used by imput muons rechit
52 //-------------------------------------------------------------------------------
53 
54 template <typename T1, typename T2>
56 {
57  std::cout<<"!!!! Please add the checkrecHit for the individual class templates "
58  assert(0);
59 }
60 
61 
62 template <>
64 {
65  const std::type_info &hit_type = typeid(recHit);
66  if (hit_type == typeid(CSCSegment)) {return true;} // This should be the default one (which are included in the global (outer) muon track)
67  else if (hit_type == typeid(CSCRecHit2D)) {return true;}
68  //else {std::cout<<"else "<<hit_type.name()<<std::endl;}
69  return false;
70 }
71 
72 
73 template <>
75 {
76  const std::type_info &hit_type = typeid(recHit);
77  if (hit_type == typeid(DTRecSegment4D)) {return true;} // This should be the default one (which are included in the global (outer) muon track)
78  else if (hit_type == typeid(DTRecHit1D)) {return true;}
79  else if (hit_type == typeid(DTSLRecCluster)) {return true; }
80  else if (hit_type == typeid(DTSLRecSegment2D)) {return true; }
81  // else {std::cout<<"else "<<hit_type.name()<<std::endl;}
82  return false;
83 }
84 
85 
86 template <>
88 {
89  const std::type_info &hit_type = typeid(recHit);
90  if (hit_type == typeid(RPCRecHit)) {return true;} // This should be the default one (which are included in the global (outer) muon track)
91  //else {std::cout<<"else "<<hit_type.name()<<std::endl;}
92  return false;
93 }
94 
95 
96 
98 
CSCDetId cscDetId() const
Definition: CSCRecHit2D.h:52
MuonDetCleaner< CSCDetId, CSCRecHit2D > CSCRecHitCleaner
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
assert(m_qm.get())
uint32_t getRawDetId(const T2 &)
bool checkrecHit(const TrackingRecHit &)
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
RPCDetId rpcId() const
Return the rpcId.
Definition: RPCRecHit.h:103
virtual DetId geographicalId() const
Return the detId of the Det (a DTLayer).
MuonDetCleaner< DTLayerId, DTRecHit1DPair > DTRecHitCleaner
MuonDetCleaner< RPCDetId, RPCRecHit > RPCRecHitCleaner
tuple cout
Definition: gather_cfg.py:145