21 |
|
|
22 |
|
ShallowTrackClustersProducer::ShallowTrackClustersProducer(const edm::ParameterSet& iConfig) |
23 |
|
: theTracksLabel( iConfig.getParameter<edm::InputTag>("Tracks") ), |
24 |
+ |
theClustersLabel( iConfig.getParameter<edm::InputTag>("Clusters") ), |
25 |
|
Suffix ( iConfig.getParameter<std::string>("Suffix") ), |
26 |
|
Prefix ( iConfig.getParameter<std::string>("Prefix") ) |
27 |
|
{ |
42 |
|
produces <std::vector<float> > ( Prefix + "insidistance"+ Suffix ); |
43 |
|
produces <std::vector<float> > ( Prefix + "covered" + Suffix ); |
44 |
|
produces <std::vector<float> > ( Prefix + "projwidth" + Suffix ); |
45 |
+ |
produces <std::vector<float> > ( Prefix + "BdotY" + Suffix ); |
46 |
|
|
47 |
|
produces <std::vector<float> > ( Prefix + "rhlocalx" + Suffix ); |
48 |
|
produces <std::vector<float> > ( Prefix + "rhlocaly" + Suffix ); |
60 |
|
produces <std::vector<float> > ( Prefix + "driftx" + Suffix ); |
61 |
|
produces <std::vector<float> > ( Prefix + "drifty" + Suffix ); |
62 |
|
produces <std::vector<float> > ( Prefix + "driftz" + Suffix ); |
63 |
+ |
produces <std::vector<float> > ( Prefix + "globalZofunitlocalY" + Suffix ); |
64 |
|
} |
65 |
|
|
66 |
|
void ShallowTrackClustersProducer:: |
67 |
|
produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { |
68 |
< |
shallow::CLUSTERMAP clustermap = shallow::make_cluster_map(iEvent); |
68 |
> |
shallow::CLUSTERMAP clustermap = shallow::make_cluster_map(iEvent,theClustersLabel); |
69 |
|
|
70 |
|
int size = clustermap.size(); |
71 |
|
std::auto_ptr<std::vector<unsigned int> > trackmulti ( new std::vector<unsigned int>(size, 0) ); |
84 |
|
std::auto_ptr<std::vector<float> > globalz ( new std::vector<float> (size, -10000) ); |
85 |
|
std::auto_ptr<std::vector<float> > insidistance ( new std::vector<float> (size, -1) ); |
86 |
|
std::auto_ptr<std::vector<float> > projwidth ( new std::vector<float> (size, -1000) ); |
87 |
+ |
std::auto_ptr<std::vector<float> > BdotY ( new std::vector<float> (size, -1000) ); |
88 |
|
std::auto_ptr<std::vector<float> > covered ( new std::vector<float> (size, -1000) ); |
89 |
|
std::auto_ptr<std::vector<float> > rhlocalx ( new std::vector<float>(size, -10000 )); |
90 |
|
std::auto_ptr<std::vector<float> > rhlocaly ( new std::vector<float>(size, -10000 )); |
100 |
|
std::auto_ptr<std::vector<float> > driftx ( new std::vector<float>(size, -10000 )); |
101 |
|
std::auto_ptr<std::vector<float> > drifty ( new std::vector<float>(size, -10000 )); |
102 |
|
std::auto_ptr<std::vector<float> > driftz ( new std::vector<float>(size, -10000 )); |
103 |
+ |
std::auto_ptr<std::vector<float> > globalZofunitlocalY ( new std::vector<float>(size, -1000)); |
104 |
|
|
105 |
|
edm::ESHandle<TrackerGeometry> theTrackerGeometry; iSetup.get<TrackerDigiGeometryRecord>().get( theTrackerGeometry ); |
106 |
|
edm::ESHandle<MagneticField> magfield; iSetup.get<IdealMagneticFieldRecord>().get(magfield); |
129 |
|
if( 0 == (trackmulti->at(i))++ ) { |
130 |
|
const StripGeomDetUnit* theStripDet = dynamic_cast<const StripGeomDetUnit*>( theTrackerGeometry->idToDet( hit->geographicalId() ) ); |
131 |
|
LocalVector drift = shallow::drift( theStripDet, *magfield, *SiStripLorentzAngle); |
132 |
< |
|
132 |
> |
|
133 |
|
trackindex->at(i) = shallow::findTrackIndex(tracks, track); |
134 |
|
localtheta->at(i) = (theStripDet->toLocal(tsos.globalDirection())).theta(); |
135 |
|
localphi->at(i) = (theStripDet->toLocal(tsos.globalDirection())).phi(); |
145 |
|
globalz->at(i) = tsos.globalPosition().z(); |
146 |
|
insidistance->at(i) = 1./fabs(cos(localtheta->at(i))); |
147 |
|
projwidth->at(i) = tan(localtheta->at(i))*cos(localphi->at(i)); |
148 |
+ |
BdotY->at(i) = (theStripDet->surface()).toLocal( magfield->inTesla(theStripDet->surface().position())).y(); |
149 |
|
covered->at(i) = drift.z()/localpitch->at(i) * fabs(projwidth->at(i) - drift.x()/drift.z()); |
150 |
|
rhlocalx->at(i) = hit->localPosition().x(); |
151 |
|
rhlocaly->at(i) = hit->localPosition().y(); |
161 |
|
driftx->at(i) = drift.x(); |
162 |
|
drifty->at(i) = drift.y(); |
163 |
|
driftz->at(i) = drift.z(); |
164 |
+ |
globalZofunitlocalY->at(i) = (theStripDet->toGlobal(LocalVector(0,1,0))).z(); |
165 |
|
} |
166 |
|
} |
167 |
|
} |
183 |
|
iEvent.put(insidistance,Prefix + "insidistance"+ Suffix ); |
184 |
|
iEvent.put(covered, Prefix + "covered" + Suffix ); |
185 |
|
iEvent.put(projwidth, Prefix + "projwidth" + Suffix ); |
186 |
+ |
iEvent.put(BdotY, Prefix + "BdotY" + Suffix ); |
187 |
|
iEvent.put(rhlocalx, Prefix + "rhlocalx" + Suffix ); |
188 |
|
iEvent.put(rhlocaly, Prefix + "rhlocaly" + Suffix ); |
189 |
|
iEvent.put(rhlocalxerr, Prefix + "rhlocalxerr" + Suffix ); |
195 |
|
iEvent.put(rhmerr, Prefix + "rhmerr" + Suffix ); |
196 |
|
iEvent.put(ubstrip, Prefix + "ubstrip" + Suffix ); |
197 |
|
iEvent.put(ubmerr, Prefix + "ubmerr" + Suffix ); |
198 |
< |
iEvent.put( driftx, Prefix + "driftx" ); |
199 |
< |
iEvent.put( drifty, Prefix + "drifty" ); |
200 |
< |
iEvent.put( driftz, Prefix + "driftz" ); |
198 |
> |
iEvent.put( driftx, Prefix + "driftx" + Suffix ); |
199 |
> |
iEvent.put( drifty, Prefix + "drifty" + Suffix ); |
200 |
> |
iEvent.put( driftz, Prefix + "driftz" + Suffix ); |
201 |
> |
iEvent.put( globalZofunitlocalY, Prefix + "globalZofunitlocalY" + Suffix ); |
202 |
|
} |