23 #include "boost/foreach.hpp"
27 : theTracksLabel( iConfig.getParameter<edm::InputTag>(
"Tracks") ),
28 theClustersLabel( iConfig.getParameter<edm::InputTag>(
"Clusters") ),
29 Suffix ( iConfig.getParameter<std::string>(
"Suffix") ),
30 Prefix ( iConfig.getParameter<std::string>(
"Prefix") )
32 produces <std::vector<unsigned int> > (
Prefix +
"trackmulti" +
Suffix );
33 produces <std::vector<int> > (
Prefix +
"trackindex" +
Suffix );
34 produces <std::vector<float> > (
Prefix +
"localtheta" +
Suffix );
35 produces <std::vector<float> > (
Prefix +
"localphi" +
Suffix );
36 produces <std::vector<float> > (
Prefix +
"localpitch" +
Suffix );
37 produces <std::vector<float> > (
Prefix +
"localx" +
Suffix );
38 produces <std::vector<float> > (
Prefix +
"localy" +
Suffix );
39 produces <std::vector<float> > (
Prefix +
"localz" +
Suffix );
40 produces <std::vector<float> > (
Prefix +
"strip" +
Suffix );
41 produces <std::vector<float> > (
Prefix +
"globaltheta" +
Suffix );
42 produces <std::vector<float> > (
Prefix +
"globalphi" +
Suffix );
43 produces <std::vector<float> > (
Prefix +
"globalx" +
Suffix );
44 produces <std::vector<float> > (
Prefix +
"globaly" +
Suffix );
45 produces <std::vector<float> > (
Prefix +
"globalz" +
Suffix );
46 produces <std::vector<float> > (
Prefix +
"insidistance"+
Suffix );
47 produces <std::vector<float> > (
Prefix +
"covered" +
Suffix );
48 produces <std::vector<float> > (
Prefix +
"projwidth" +
Suffix );
49 produces <std::vector<float> > (
Prefix +
"BdotY" +
Suffix );
51 produces <std::vector<float> > (
Prefix +
"rhlocalx" +
Suffix );
52 produces <std::vector<float> > (
Prefix +
"rhlocaly" +
Suffix );
53 produces <std::vector<float> > (
Prefix +
"rhlocalxerr" +
Suffix );
54 produces <std::vector<float> > (
Prefix +
"rhlocalyerr" +
Suffix );
55 produces <std::vector<float> > (
Prefix +
"rhglobalx" +
Suffix );
56 produces <std::vector<float> > (
Prefix +
"rhglobaly" +
Suffix );
57 produces <std::vector<float> > (
Prefix +
"rhglobalz" +
Suffix );
58 produces <std::vector<float> > (
Prefix +
"rhstrip" +
Suffix );
59 produces <std::vector<float> > (
Prefix +
"rhmerr" +
Suffix );
61 produces <std::vector<float> > (
Prefix +
"ubstrip" +
Suffix );
62 produces <std::vector<float> > (
Prefix +
"ubmerr" +
Suffix );
64 produces <std::vector<float> > (
Prefix +
"driftx" +
Suffix );
65 produces <std::vector<float> > (
Prefix +
"drifty" +
Suffix );
66 produces <std::vector<float> > (
Prefix +
"driftz" +
Suffix );
67 produces <std::vector<float> > (
Prefix +
"globalZofunitlocalY" +
Suffix );
74 int size = clustermap.size();
75 std::auto_ptr<std::vector<unsigned int> > trackmulti (
new std::vector<unsigned int>(size, 0) );
76 std::auto_ptr<std::vector<int> > trackindex (
new std::vector<int> (size, -1) );
77 std::auto_ptr<std::vector<float> > localtheta (
new std::vector<float> (size, -100) );
78 std::auto_ptr<std::vector<float> > localphi (
new std::vector<float> (size, -100) );
79 std::auto_ptr<std::vector<float> > localpitch (
new std::vector<float> (size, -100) );
80 std::auto_ptr<std::vector<float> > localx (
new std::vector<float> (size, -100) );
81 std::auto_ptr<std::vector<float> > localy (
new std::vector<float> (size, -100) );
82 std::auto_ptr<std::vector<float> > localz (
new std::vector<float> (size, -100) );
83 std::auto_ptr<std::vector<float> >
strip (
new std::vector<float> (size, -100) );
84 std::auto_ptr<std::vector<float> > globaltheta (
new std::vector<float> (size, -100) );
85 std::auto_ptr<std::vector<float> > globalphi (
new std::vector<float> (size, -100) );
86 std::auto_ptr<std::vector<float> > globalx (
new std::vector<float> (size, -10000) );
87 std::auto_ptr<std::vector<float> > globaly (
new std::vector<float> (size, -10000) );
88 std::auto_ptr<std::vector<float> > globalz (
new std::vector<float> (size, -10000) );
89 std::auto_ptr<std::vector<float> > insidistance (
new std::vector<float> (size, -1) );
90 std::auto_ptr<std::vector<float> > projwidth (
new std::vector<float> (size, -1000) );
91 std::auto_ptr<std::vector<float> > BdotY (
new std::vector<float> (size, -1000) );
92 std::auto_ptr<std::vector<float> > covered (
new std::vector<float> (size, -1000) );
93 std::auto_ptr<std::vector<float> > rhlocalx (
new std::vector<float>(size, -10000 ));
94 std::auto_ptr<std::vector<float> > rhlocaly (
new std::vector<float>(size, -10000 ));
95 std::auto_ptr<std::vector<float> > rhlocalxerr (
new std::vector<float>(size, -1 ));
96 std::auto_ptr<std::vector<float> > rhlocalyerr (
new std::vector<float>(size, -1 ));
97 std::auto_ptr<std::vector<float> > rhglobalx (
new std::vector<float>(size, -10000 ));
98 std::auto_ptr<std::vector<float> > rhglobaly (
new std::vector<float>(size, -10000 ));
99 std::auto_ptr<std::vector<float> > rhglobalz (
new std::vector<float>(size, -10000 ));
100 std::auto_ptr<std::vector<float> > rhstrip (
new std::vector<float>(size, -10000 ));
101 std::auto_ptr<std::vector<float> > rhmerr (
new std::vector<float>(size, -10000 ));
102 std::auto_ptr<std::vector<float> > ubstrip (
new std::vector<float>(size, -10000 ));
103 std::auto_ptr<std::vector<float> > ubmerr (
new std::vector<float>(size, -10000 ));
104 std::auto_ptr<std::vector<float> > driftx (
new std::vector<float>(size, -10000 ));
105 std::auto_ptr<std::vector<float> > drifty (
new std::vector<float>(size, -10000 ));
106 std::auto_ptr<std::vector<float> > driftz (
new std::vector<float>(size, -10000 ));
107 std::auto_ptr<std::vector<float> > globalZofunitlocalY (
new std::vector<float>(size, -1000));
119 association != associations->end(); association++) {
120 const Trajectory* traj = association->key.get();
132 for(
unsigned h=0;
h<2;
h++) {
134 if(!matchedhit &&
h==1)
continue;
else
135 if( matchedhit &&
h==0) cluster_ptr = (matchedhit->
monoHit() ->
cluster()).
get();
else
136 if( matchedhit &&
h==1) cluster_ptr = (matchedhit->
stereoHit()->
cluster()).
get();
else
137 if(hit2D) cluster_ptr = (hit2D->
cluster()).
get();
else
138 if(hit1D) cluster_ptr = (hit1D->
cluster()).
get();
141 shallow::CLUSTERMAP::const_iterator cluster = clustermap.find( std::make_pair( hit->geographicalId().rawId(), cluster_ptr->
firstStrip() ));
142 if(cluster == clustermap.end() )
throw cms::Exception(
"Logic Error") <<
"Cluster not found: this could be a configuration error" << std::endl;
144 unsigned i = cluster->second;
145 if( 0 == (trackmulti->at(i))++ ) {
162 insidistance->at(i) = 1./fabs(
cos(localtheta->at(i)));
163 projwidth->at(i) =
tan(localtheta->at(i))*
cos(localphi->at(i));
165 covered->at(i) = drift.
z()/localpitch->at(i) * fabs(projwidth->at(i) - drift.
x()/drift.
z());
166 rhlocalx->at(i) = hit->localPosition().x();
167 rhlocaly->at(i) = hit->localPosition().y();
168 rhlocalxerr->at(i) =
sqrt(hit->localPositionError().xx());
169 rhlocalyerr->at(i) =
sqrt(hit->localPositionError().yy());
170 rhglobalx->at(i) = theStripDet->
toGlobal(hit->localPosition()).
x();
171 rhglobaly->at(i) = theStripDet->
toGlobal(hit->localPosition()).
y();
172 rhglobalz->at(i) = theStripDet->
toGlobal(hit->localPosition()).
z();
177 driftx->at(i) = drift.
x();
178 drifty->at(i) = drift.
y();
179 driftz->at(i) = drift.
z();
218 iEvent.
put( globalZofunitlocalY,
Prefix +
"globalZofunitlocalY" +
Suffix );
Local3DVector LocalVector
tuple SiStripLorentzAngle
ShallowTrackClustersProducer(const edm::ParameterSet &)
TrajectoryStateOnSurface forwardPredictedState() const
Access to forward predicted state (from fitter or builder)
int findTrackIndex(const edm::Handle< edm::View< reco::Track > > &h, const reco::Track *t)
const SiStripRecHit2D * stereoHit() 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.
ConstRecHitPointer recHit() const
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.
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)
TrajectoryStateOnSurface updatedState() const
const LocalTrajectoryError & localError() const
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
CLUSTERMAP make_cluster_map(const edm::Event &, edm::InputTag &)
ClusterRef const & cluster() const
edm::InputTag theTracksLabel
std::map< std::pair< uint32_t, uint16_t >, unsigned int > CLUSTERMAP
ClusterRef const & cluster() const
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
const SiStripRecHit2D * monoHit() const
const PositionType & position() const
virtual const BoundPlane & surface() const
The nominal surface of the GeomDet.
tuple size
Write out results.
TrajectoryStateOnSurface backwardPredictedState() const
Access to backward predicted state (from smoother)
GlobalVector globalDirection() const