10 : tracks_token_(consumes<edm::
View<
reco::Track>>(iConfig.getParameter<edm::
InputTag>(
"Tracks"))),
12 Suffix(iConfig.getParameter<std::
string>(
"Suffix")),
13 numberPut_(produces<unsigned int>(
Prefix +
"number" + Suffix)),
14 chi2Put_(produces<std::
vector<double>>(
Prefix +
"chi2" + Suffix)),
15 ndofPut_(produces<std::
vector<double>>(
Prefix +
"ndof" + Suffix)),
16 chi2ndofPut_(produces<std::
vector<double>>(
Prefix +
"chi2ndof" + Suffix)),
17 chargePut_(produces<std::
vector<float>>(
Prefix +
"charge" + Suffix)),
18 momentumPut_(produces<std::
vector<float>>(
Prefix +
"momentum" + Suffix)),
19 ptPut_(produces<std::
vector<float>>(
Prefix +
"pt" + Suffix)),
20 pterrPut_(produces<std::
vector<float>>(
Prefix +
"pterr" + Suffix)),
21 hitsvalidPut_(produces<std::
vector<unsigned int>>(
Prefix +
"hitsvalid" + Suffix)),
22 hitslostPut_(produces<std::
vector<unsigned int>>(
Prefix +
"hitslost" + Suffix)),
23 thetaPut_(produces<std::
vector<double>>(
Prefix +
"theta" + Suffix)),
24 thetaerrPut_(produces<std::
vector<double>>(
Prefix +
"thetaerr" + Suffix)),
25 phiPut_(produces<std::
vector<double>>(
Prefix +
"phi" + Suffix)),
26 phierrPut_(produces<std::
vector<double>>(
Prefix +
"phierr" + Suffix)),
27 etaPut_(produces<std::
vector<double>>(
Prefix +
"eta" + Suffix)),
28 etaerrPut_(produces<std::
vector<double>>(
Prefix +
"etaerr" + Suffix)),
29 dxyPut_(produces<std::
vector<double>>(
Prefix +
"dxy" + Suffix)),
30 dxyerrPut_(produces<std::
vector<double>>(
Prefix +
"dxyerr" + Suffix)),
31 dszPut_(produces<std::
vector<double>>(
Prefix +
"dsz" + Suffix)),
32 dszerrPut_(produces<std::
vector<double>>(
Prefix +
"dszerr" + Suffix)),
33 qoverpPut_(produces<std::
vector<double>>(
Prefix +
"qoverp" + Suffix)),
34 qoverperrPut_(produces<std::
vector<double>>(
Prefix +
"qoverperr" + Suffix)),
35 vxPut_(produces<std::
vector<double>>(
Prefix +
"vx" + Suffix)),
36 vyPut_(produces<std::
vector<double>>(
Prefix +
"vy" + Suffix)),
37 vzPut_(produces<std::
vector<double>>(
Prefix +
"vz" + Suffix)),
38 algoPut_(produces<std::
vector<int>>(
Prefix +
"algo" + Suffix)) {}
44 unsigned int number = tracks->size();
45 std::vector<double>
chi2;
47 std::vector<double>
ndof;
49 std::vector<double> chi2ndof;
50 chi2ndof.reserve(number);
52 charge.reserve(number);
53 std::vector<float> momentum;
54 momentum.reserve(number);
55 std::vector<float>
pt;
57 std::vector<float> pterr;
58 pterr.reserve(number);
59 std::vector<unsigned int> hitsvalid;
60 hitsvalid.reserve(number);
61 std::vector<unsigned int> hitslost;
62 hitslost.reserve(number);
63 std::vector<double>
theta;
64 theta.reserve(number);
65 std::vector<double> thetaerr;
66 thetaerr.reserve(number);
67 std::vector<double>
phi;
69 std::vector<double> phierr;
70 phierr.reserve(number);
71 std::vector<double>
eta;
73 std::vector<double> etaerr;
74 etaerr.reserve(number);
75 std::vector<double>
dxy;
77 std::vector<double> dxyerr;
78 dxyerr.reserve(number);
79 std::vector<double> dsz;
81 std::vector<double> dszerr;
82 dszerr.reserve(number);
83 std::vector<double> qoverp;
84 qoverp.reserve(number);
85 std::vector<double> qoverperr;
86 qoverperr.reserve(number);
87 std::vector<double> vx;
89 std::vector<double> vy;
91 std::vector<double> vz;
93 std::vector<int>
algo;
96 for (
auto const&
track : *tracks) {
97 chi2.push_back(
track.chi2());
98 ndof.push_back(
track.ndof());
99 chi2ndof.push_back(
track.chi2() /
track.ndof());
100 charge.push_back(
track.charge());
101 momentum.push_back(
track.p());
102 pt.push_back(
track.pt());
103 pterr.push_back(
track.ptError());
104 hitsvalid.push_back(
track.numberOfValidHits());
105 hitslost.push_back(
track.numberOfLostHits());
106 theta.push_back(
track.theta());
107 thetaerr.push_back(
track.thetaError());
108 phi.push_back(
track.phi());
109 phierr.push_back(
track.phiError());
110 eta.push_back(
track.eta());
111 etaerr.push_back(
track.etaError());
112 dxy.push_back(
track.dxy());
113 dxyerr.push_back(
track.dxyError());
114 dsz.push_back(
track.dsz());
115 dszerr.push_back(
track.dszError());
116 qoverp.push_back(
track.qoverp());
117 qoverperr.push_back(
track.qoverpError());
118 vx.push_back(
track.vx());
119 vy.push_back(
track.vy());
120 vz.push_back(
track.vz());
121 algo.push_back((
int)
track.algo());
const edm::EDPutTokenT< std::vector< double > > dxyPut_
const edm::EDPutTokenT< std::vector< double > > dszerrPut_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Geom::Theta< T > theta() const
const edm::EDPutTokenT< std::vector< float > > ptPut_
const edm::EDPutTokenT< std::vector< int > > algoPut_
auto const & tracks
cannot be loose
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
const edm::EDPutTokenT< std::vector< double > > qoverperrPut_
const edm::EDGetTokenT< edm::View< reco::Track > > tracks_token_
const edm::EDPutTokenT< std::vector< double > > vyPut_
const edm::EDPutTokenT< std::vector< float > > momentumPut_
const edm::EDPutTokenT< std::vector< unsigned int > > hitslostPut_
const edm::EDPutTokenT< std::vector< double > > dxyerrPut_
const edm::EDPutTokenT< std::vector< double > > ndofPut_
const edm::EDPutTokenT< std::vector< float > > pterrPut_
ShallowTracksProducer(const edm::ParameterSet &)
const edm::EDPutTokenT< unsigned int > numberPut_
const edm::EDPutTokenT< std::vector< double > > vzPut_
OrphanHandle< PROD > emplace(EDPutTokenT< PROD > token, Args &&...args)
puts a new product
const edm::EDPutTokenT< std::vector< double > > phierrPut_
const edm::EDPutTokenT< std::vector< double > > qoverpPut_
const edm::EDPutTokenT< std::vector< double > > chi2ndofPut_
const edm::EDPutTokenT< std::vector< double > > thetaerrPut_
const edm::EDPutTokenT< std::vector< double > > chi2Put_
const edm::EDPutTokenT< std::vector< unsigned int > > hitsvalidPut_
const edm::EDPutTokenT< std::vector< double > > vxPut_
const edm::EDPutTokenT< std::vector< double > > phiPut_
const edm::EDPutTokenT< std::vector< double > > etaPut_
const edm::EDPutTokenT< std::vector< double > > dszPut_
const edm::EDPutTokenT< std::vector< double > > etaerrPut_
const edm::EDPutTokenT< std::vector< float > > chargePut_
const edm::EDPutTokenT< std::vector< double > > thetaPut_