Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
RecoTracker
TkSeedingLayers
src
HitExtractor.h
Go to the documentation of this file.
1
#ifndef RecoTracker_TkSeedingLayers_HitExtractor_H
2
#define RecoTracker_TkSeedingLayers_HitExtractor_H
3
4
#include <vector>
5
#include <iterator>
6
#include "
RecoTracker/TransientTrackingRecHit/interface/TkTransientTrackingRecHitBuilder.h
"
7
#include "
FWCore/Framework/interface/ConsumesCollector.h
"
8
#include "
FWCore/Utilities/interface/EDGetToken.h
"
9
#include "
DataFormats/Common/interface/ContainerMask.h
"
10
11
#include "
DataFormats/TrackerRecHit2D/interface/BaseTrackerRecHit.h
"
12
#include "
DataFormats/TrackingRecHit/interface/mayown_ptr.h
"
13
#include <limits>
14
15
namespace
edm {
class
Event
;
class
EventSetup
;
class
ConsumesCollector;}
16
namespace
ctfseeding {
class
SeedingLayer; }
17
18
namespace
ctfseeding {
19
20
class
HitExtractor
{
21
public
:
22
using
TkHit
=
BaseTrackerRecHit
;
23
using
TkHitRef
=
BaseTrackerRecHit
const
&;
24
using
HitPointer
=
mayown_ptr<BaseTrackerRecHit>
;
25
using
Hits
=std::vector<HitPointer>;
26
27
virtual
~HitExtractor
(){}
28
HitExtractor
() {}
29
30
virtual
Hits
hits
(
const
TkTransientTrackingRecHitBuilder
& ttrhBuilder,
const
edm::Event
& ,
const
edm::EventSetup
& )
const
=0;
31
virtual
HitExtractor
*
clone
()
const
= 0;
32
33
//skip clusters
34
void
useSkipClusters
(
const
edm::InputTag
&
m
,
edm::ConsumesCollector
& iC) {
35
skipClusters
=
true
;
maskCluster
=
true
;
36
useSkipClusters_
(m, iC);
37
}
38
bool
skipClusters
=
false
;
39
bool
filterCluster
=
false
;
40
bool
maskCluster
=
false
;
41
float
minGoodCharge
=0;
42
43
protected
:
44
virtual
void
useSkipClusters_
(
const
edm::InputTag
&
m
,
edm::ConsumesCollector
& iC) = 0;
45
};
46
47
48
template
<
typename
DSTV,
typename
A,
typename
B>
49
inline
void
range2SeedingHits
(DSTV
const
& dstv,
50
HitExtractor::Hits
&
v
,
51
std::pair<A,B>
const
&
sel
) {
52
typename
DSTV::Range
range = dstv.equal_range(sel.first,sel.second);
53
size_t
ts = v.size();
54
for
(
typename
DSTV::const_iterator
id
=range.first;
id
!=range.second;
id
++)
55
ts +=
std::distance
((*id).begin(), (*id).end());
56
v.reserve(ts);
57
for
(
typename
DSTV::const_iterator
id
=range.first;
id
!=range.second;
id
++){
58
for
(
auto
const
&
h
: (*
id
) ) v.emplace_back(
h
);
59
}
60
61
}
62
}
63
#endif
ctfseeding::range2SeedingHits
void range2SeedingHits(DSTV const &dstv, HitExtractor::Hits &v, std::pair< A, B > const &sel)
Definition:
HitExtractor.h:49
EDGetToken.h
ctfseeding::HitExtractor::Hits
std::vector< HitPointer > Hits
Definition:
HitExtractor.h:25
ctfseeding::HitExtractor::TkHitRef
BaseTrackerRecHit const & TkHitRef
Definition:
HitExtractor.h:23
ctfseeding::HitExtractor
Definition:
HitExtractor.h:20
EgammaValidation_Wenu_cff.sel
tuple sel
Definition:
EgammaValidation_Wenu_cff.py:33
mayown_ptr
Definition:
mayown_ptr.h:14
findQualityFiles.v
v
Definition:
findQualityFiles.py:177
ctfseeding::HitExtractor::filterCluster
bool filterCluster
Definition:
HitExtractor.h:39
ctfseeding::HitExtractor::clone
virtual HitExtractor * clone() const =0
visualization-live-secondInstance_cfg.m
tuple m
Definition:
visualization-live-secondInstance_cfg.py:45
EventSetup
TkTransientTrackingRecHitBuilder.h
h
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition:
Activities.doc:4
edm::EventSetup
Definition:
EventSetup.h:44
HLT_25ns14e33_v1_cff.distance
tuple distance
Definition:
HLT_25ns14e33_v1_cff.py:1675
mayown_ptr.h
ctfseeding::HitExtractor::minGoodCharge
float minGoodCharge
Definition:
HitExtractor.h:41
Range
PixelRecoRange< float > Range
Definition:
PixelTripletHLTGenerator.cc:27
BaseTrackerRecHit.h
TkTransientTrackingRecHitBuilder
Definition:
TkTransientTrackingRecHitBuilder.h:15
ctfseeding::HitExtractor::maskCluster
bool maskCluster
Definition:
HitExtractor.h:40
ctfseeding::HitExtractor::~HitExtractor
virtual ~HitExtractor()
Definition:
HitExtractor.h:27
BaseTrackerRecHit
Definition:
BaseTrackerRecHit.h:33
ContainerMask.h
Event
ctfseeding::HitExtractor::skipClusters
bool skipClusters
Definition:
HitExtractor.h:38
edm::InputTag
Definition:
InputTag.h:17
ctfseeding::HitExtractor::hits
virtual Hits hits(const TkTransientTrackingRecHitBuilder &ttrhBuilder, const edm::Event &, const edm::EventSetup &) const =0
ctfseeding::HitExtractor::HitExtractor
HitExtractor()
Definition:
HitExtractor.h:28
edm::Event
Definition:
Event.h:59
ConsumesCollector.h
ctfseeding::HitExtractor::useSkipClusters
void useSkipClusters(const edm::InputTag &m, edm::ConsumesCollector &iC)
Definition:
HitExtractor.h:34
edm::ConsumesCollector
Definition:
ConsumesCollector.h:32
ctfseeding::HitExtractor::useSkipClusters_
virtual void useSkipClusters_(const edm::InputTag &m, edm::ConsumesCollector &iC)=0
Generated for CMSSW Reference Manual by
1.8.5