CMS 3D CMS Logo

MuonDetCleaner.cc
Go to the documentation of this file.
2 
6 
11 
15 
16 //-------------------------------------------------------------------------------
17 // define 'getDetIds' functions used for different types of recHits
18 //-------------------------------------------------------------------------------
19 
20 template <typename T1, typename T2>
22  assert(0); // CV: make sure general function never gets called;
23  // always use template specializations
24 }
25 
26 template <>
28  return recHit.cscDetId().rawId();
29 }
30 
31 template <>
33  return recHit.geographicalId().rawId();
34 }
35 
36 template <>
38  return recHit.rpcId().rawId();
39 }
40 
41 //-------------------------------------------------------------------------------
42 // find out what the kind of RecHit used by imput muons rechit
43 //-------------------------------------------------------------------------------
44 
45 template <typename T1, typename T2>
47  edm::LogError("TauEmbedding") << "!!!! Please add the checkrecHit for the individual class templates " assert(0);
48 }
49 
50 template <>
52  const std::type_info& hit_type = typeid(recHit);
53  if (hit_type == typeid(CSCSegment)) {
54  return true;
55  } // This should be the default one (which are included in the global (outer) muon track)
56  else if (hit_type == typeid(CSCRecHit2D)) {
57  return true;
58  }
59  //else {std::cout<<"else "<<hit_type.name()<<std::endl;}
60  return false;
61 }
62 
63 template <>
65  const std::type_info& hit_type = typeid(recHit);
66  if (hit_type == typeid(DTRecSegment4D)) {
67  return true;
68  } // This should be the default one (which are included in the global (outer) muon track)
69  else if (hit_type == typeid(DTRecHit1D)) {
70  return true;
71  } else if (hit_type == typeid(DTSLRecCluster)) {
72  return true;
73  } else if (hit_type == typeid(DTSLRecSegment2D)) {
74  return true;
75  }
76  // else {std::cout<<"else "<<hit_type.name()<<std::endl;}
77  return false;
78 }
79 
80 template <>
82  const std::type_info& hit_type = typeid(recHit);
83  if (hit_type == typeid(RPCRecHit)) {
84  return true;
85  } // This should be the default one (which are included in the global (outer) muon track)
86  //else {std::cout<<"else "<<hit_type.name()<<std::endl;}
87  return false;
88 }
89 
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
uint32_t getRawDetId(const T2 &)
MuonDetCleaner< CSCDetId, CSCRecHit2D > CSCRecHitColCleaner
bool checkrecHit(const TrackingRecHit &)
Log< level::Error, false > LogError
assert(be >=bs)
MuonDetCleaner< RPCDetId, RPCRecHit > RPCRecHitColCleaner
MuonDetCleaner< DTLayerId, DTRecHit1DPair > DTRecHitColCleaner