CMS 3D CMS Logo

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