23 #include "boost/foreach.hpp"
28 : theTracksLabel( iConfig.getParameter<edm::InputTag>(
"Tracks") ),
29 theClustersLabel( iConfig.getParameter<edm::InputTag>(
"Clusters") ),
30 Suffix ( iConfig.getParameter<std::
string>(
"Suffix") ),
33 produces <std::vector<unsigned int> > (
Prefix +
"trackmulti" +
Suffix );
34 produces <std::vector<int> > (
Prefix +
"trackindex" +
Suffix );
35 produces <std::vector<float> > (
Prefix +
"localtheta" +
Suffix );
36 produces <std::vector<float> > (
Prefix +
"localphi" +
Suffix );
37 produces <std::vector<float> > (
Prefix +
"localpitch" +
Suffix );
38 produces <std::vector<float> > (
Prefix +
"localx" +
Suffix );
39 produces <std::vector<float> > (
Prefix +
"localy" +
Suffix );
40 produces <std::vector<float> > (
Prefix +
"localz" +
Suffix );
41 produces <std::vector<float> > (
Prefix +
"strip" +
Suffix );
42 produces <std::vector<float> > (
Prefix +
"globaltheta" +
Suffix );
43 produces <std::vector<float> > (
Prefix +
"globalphi" +
Suffix );
44 produces <std::vector<float> > (
Prefix +
"globalx" +
Suffix );
45 produces <std::vector<float> > (
Prefix +
"globaly" +
Suffix );
46 produces <std::vector<float> > (
Prefix +
"globalz" +
Suffix );
47 produces <std::vector<float> > (
Prefix +
"insidistance"+
Suffix );
48 produces <std::vector<float> > (
Prefix +
"covered" +
Suffix );
49 produces <std::vector<float> > (
Prefix +
"projwidth" +
Suffix );
50 produces <std::vector<float> > (
Prefix +
"BdotY" +
Suffix );
52 produces <std::vector<float> > (
Prefix +
"rhlocalx" +
Suffix );
53 produces <std::vector<float> > (
Prefix +
"rhlocaly" +
Suffix );
54 produces <std::vector<float> > (
Prefix +
"rhlocalxerr" +
Suffix );
55 produces <std::vector<float> > (
Prefix +
"rhlocalyerr" +
Suffix );
56 produces <std::vector<float> > (
Prefix +
"rhglobalx" +
Suffix );
57 produces <std::vector<float> > (
Prefix +
"rhglobaly" +
Suffix );
58 produces <std::vector<float> > (
Prefix +
"rhglobalz" +
Suffix );
59 produces <std::vector<float> > (
Prefix +
"rhstrip" +
Suffix );
60 produces <std::vector<float> > (
Prefix +
"rhmerr" +
Suffix );
62 produces <std::vector<float> > (
Prefix +
"ubstrip" +
Suffix );
63 produces <std::vector<float> > (
Prefix +
"ubmerr" +
Suffix );
65 produces <std::vector<float> > (
Prefix +
"driftx" +
Suffix );
66 produces <std::vector<float> > (
Prefix +
"drifty" +
Suffix );
67 produces <std::vector<float> > (
Prefix +
"driftz" +
Suffix );
68 produces <std::vector<float> > (
Prefix +
"globalZofunitlocalY" +
Suffix );
75 int size = clustermap.size();
76 std::auto_ptr<std::vector<unsigned int> > trackmulti (
new std::vector<unsigned int>(size, 0) );
77 std::auto_ptr<std::vector<int> > trackindex (
new std::vector<int> (size, -1) );
78 std::auto_ptr<std::vector<float> > localtheta (
new std::vector<float> (size, -100) );
79 std::auto_ptr<std::vector<float> > localphi (
new std::vector<float> (size, -100) );
80 std::auto_ptr<std::vector<float> > localpitch (
new std::vector<float> (size, -100) );
81 std::auto_ptr<std::vector<float> > localx (
new std::vector<float> (size, -100) );
82 std::auto_ptr<std::vector<float> > localy (
new std::vector<float> (size, -100) );
83 std::auto_ptr<std::vector<float> > localz (
new std::vector<float> (size, -100) );
84 std::auto_ptr<std::vector<float> > strip (
new std::vector<float> (size, -100) );
85 std::auto_ptr<std::vector<float> > globaltheta (
new std::vector<float> (size, -100) );
86 std::auto_ptr<std::vector<float> > globalphi (
new std::vector<float> (size, -100) );
87 std::auto_ptr<std::vector<float> > globalx (
new std::vector<float> (size, -10000) );
88 std::auto_ptr<std::vector<float> > globaly (
new std::vector<float> (size, -10000) );
89 std::auto_ptr<std::vector<float> > globalz (
new std::vector<float> (size, -10000) );
90 std::auto_ptr<std::vector<float> > insidistance (
new std::vector<float> (size, -1) );
91 std::auto_ptr<std::vector<float> > projwidth (
new std::vector<float> (size, -1000) );
92 std::auto_ptr<std::vector<float> > BdotY (
new std::vector<float> (size, -1000) );
93 std::auto_ptr<std::vector<float> > covered (
new std::vector<float> (size, -1000) );
94 std::auto_ptr<std::vector<float> > rhlocalx (
new std::vector<float>(size, -10000 ));
95 std::auto_ptr<std::vector<float> > rhlocaly (
new std::vector<float>(size, -10000 ));
96 std::auto_ptr<std::vector<float> > rhlocalxerr (
new std::vector<float>(size, -1 ));
97 std::auto_ptr<std::vector<float> > rhlocalyerr (
new std::vector<float>(size, -1 ));
98 std::auto_ptr<std::vector<float> > rhglobalx (
new std::vector<float>(size, -10000 ));
99 std::auto_ptr<std::vector<float> > rhglobaly (
new std::vector<float>(size, -10000 ));
100 std::auto_ptr<std::vector<float> > rhglobalz (
new std::vector<float>(size, -10000 ));
101 std::auto_ptr<std::vector<float> > rhstrip (
new std::vector<float>(size, -10000 ));
102 std::auto_ptr<std::vector<float> > rhmerr (
new std::vector<float>(size, -10000 ));
103 std::auto_ptr<std::vector<float> > ubstrip (
new std::vector<float>(size, -10000 ));
104 std::auto_ptr<std::vector<float> > ubmerr (
new std::vector<float>(size, -10000 ));
105 std::auto_ptr<std::vector<float> > driftx (
new std::vector<float>(size, -10000 ));
106 std::auto_ptr<std::vector<float> > drifty (
new std::vector<float>(size, -10000 ));
107 std::auto_ptr<std::vector<float> > driftz (
new std::vector<float>(size, -10000 ));
108 std::auto_ptr<std::vector<float> > globalZofunitlocalY (
new std::vector<float>(size, -1000));
120 association != associations->end(); association++) {
121 const Trajectory* traj = association->key.get();
133 for(
unsigned h=0;
h<2;
h++) {
135 if(!matchedhit &&
h==1)
continue;
else
136 if( matchedhit &&
h==0) cluster_ptr = &matchedhit->
monoCluster();
else
137 if( matchedhit &&
h==1) cluster_ptr = &matchedhit->
stereoCluster();
else
138 if(hit2D) cluster_ptr = (hit2D->
cluster()).
get();
else
139 if(hit1D) cluster_ptr = (hit1D->
cluster()).
get();
142 shallow::CLUSTERMAP::const_iterator cluster = clustermap.find( std::make_pair( hit->geographicalId().rawId(), cluster_ptr->
firstStrip() ));
143 if(cluster == clustermap.end() )
throw cms::Exception(
"Logic Error") <<
"Cluster not found: this could be a configuration error" << std::endl;
145 unsigned i = cluster->second;
146 if( 0 == (trackmulti->at(i))++ ) {
163 insidistance->at(i) = 1./fabs(
cos(localtheta->at(i)));
164 projwidth->at(i) =
tan(localtheta->at(i))*
cos(localphi->at(i));
166 covered->at(i) = drift.
z()/localpitch->at(i) * fabs(projwidth->at(i) - drift.
x()/drift.
z());
167 rhlocalx->at(i) = hit->localPosition().x();
168 rhlocaly->at(i) = hit->localPosition().y();
169 rhlocalxerr->at(i) =
sqrt(hit->localPositionError().xx());
170 rhlocalyerr->at(i) =
sqrt(hit->localPositionError().yy());
171 rhglobalx->at(i) = theStripDet->
toGlobal(hit->localPosition()).
x();
172 rhglobaly->at(i) = theStripDet->
toGlobal(hit->localPosition()).
y();
173 rhglobalz->at(i) = theStripDet->
toGlobal(hit->localPosition()).
z();
178 driftx->at(i) = drift.
x();
179 drifty->at(i) = drift.
y();
180 driftz->at(i) = drift.
z();
219 iEvent.
put( globalZofunitlocalY,
Prefix +
"globalZofunitlocalY" +
Suffix );
ClusterRef cluster() const
Local3DVector LocalVector
tuple SiStripLorentzAngle
ConstRecHitPointer const & recHit() const
ShallowTrackClustersProducer(const edm::ParameterSet &)
friend struct const_iterator
int findTrackIndex(const edm::Handle< edm::View< reco::Track > > &h, const reco::Track *t)
SiStripCluster const & monoCluster() const
LocalPoint localPosition() const
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
LocalVector drift(const StripGeomDetUnit *, const MagneticField &, const SiStripLorentzAngle &)
Geom::Phi< T > phi() const
void produce(edm::Event &, const edm::EventSetup &)
GlobalPoint globalPosition() const
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
uint16_t firstStrip() const
edm::InputTag theClustersLabel
LocalVector toLocal(const reco::Track::Vector &v, const Surface &s)
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
const Plane & surface() const
The nominal surface of the GeomDet.
LocalError positionError() const
virtual float strip(const LocalPoint &) const =0
Geom::Theta< T > theta() const
DataContainer const & measurements() const
virtual MeasurementError measurementError(const LocalPoint &, const LocalError &) const =0
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Cos< T >::type cos(const T &t)
Tan< T >::type tan(const T &t)
ClusterRef cluster() const
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
const LocalTrajectoryError & localError() const
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
CLUSTERMAP make_cluster_map(const edm::Event &, edm::InputTag &)
TrajectoryStateOnSurface const & forwardPredictedState() const
Access to forward predicted state (from fitter or builder)
edm::InputTag theTracksLabel
SiStripCluster const & stereoCluster() const
std::map< std::pair< uint32_t, uint16_t >, unsigned int > CLUSTERMAP
TrajectoryStateOnSurface const & updatedState() const
const PositionType & position() const
tuple size
Write out results.
TrajectoryStateOnSurface const & backwardPredictedState() const
Access to backward predicted state (from smoother)
GlobalVector globalDirection() const