ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/ShallowTools/plugins/ShallowTrackClustersProducer.cc
(Generate patch)

Comparing UserCode/ShallowTools/plugins/ShallowTrackClustersProducer.cc (file contents):
Revision 1.5 by bbetchar, Wed Jun 17 01:34:26 2009 UTC vs.
Revision 1.7 by bbetchar, Wed Sep 2 12:05:33 2009 UTC

# Line 41 | Line 41 | ShallowTrackClustersProducer::ShallowTra
41    produces <std::vector<float> >        ( Prefix + "insidistance"+ Suffix );
42    produces <std::vector<float> >        ( Prefix + "covered"     + Suffix );
43    produces <std::vector<float> >        ( Prefix + "projwidth"   + Suffix );
44 +  produces <std::vector<float> >        ( Prefix + "BdotY"       + Suffix );
45  
46    produces <std::vector<float> >        ( Prefix + "rhlocalx"     + Suffix );  
47    produces <std::vector<float> >        ( Prefix + "rhlocaly"     + Suffix );  
# Line 58 | Line 59 | ShallowTrackClustersProducer::ShallowTra
59    produces <std::vector<float> >       ( Prefix + "driftx"        + Suffix );
60    produces <std::vector<float> >       ( Prefix + "drifty"        + Suffix );
61    produces <std::vector<float> >       ( Prefix + "driftz"        + Suffix );
62 +  produces <std::vector<float> >       ( Prefix + "globalZofunitlocalY" + Suffix );            
63   }
64  
65   void ShallowTrackClustersProducer::
# Line 81 | Line 83 | produce(edm::Event& iEvent, const edm::E
83    std::auto_ptr<std::vector<float> >        globalz      ( new std::vector<float>       (size, -10000) );
84    std::auto_ptr<std::vector<float> >        insidistance ( new std::vector<float>       (size,     -1) );
85    std::auto_ptr<std::vector<float> >        projwidth    ( new std::vector<float>       (size,  -1000) );
86 +  std::auto_ptr<std::vector<float> >        BdotY        ( new std::vector<float>       (size,  -1000) );
87    std::auto_ptr<std::vector<float> >        covered      ( new std::vector<float>       (size,  -1000) );
88    std::auto_ptr<std::vector<float> >  rhlocalx      ( new std::vector<float>(size,  -10000  ));  
89    std::auto_ptr<std::vector<float> >  rhlocaly      ( new std::vector<float>(size,  -10000  ));  
# Line 96 | Line 99 | produce(edm::Event& iEvent, const edm::E
99    std::auto_ptr<std::vector<float> >  driftx        ( new std::vector<float>(size,  -10000  ));
100    std::auto_ptr<std::vector<float> >  drifty        ( new std::vector<float>(size,  -10000  ));
101    std::auto_ptr<std::vector<float> >  driftz        ( new std::vector<float>(size,  -10000  ));
102 +  std::auto_ptr<std::vector<float> >  globalZofunitlocalY ( new std::vector<float>(size, -1000));
103  
104    edm::ESHandle<TrackerGeometry> theTrackerGeometry;         iSetup.get<TrackerDigiGeometryRecord>().get( theTrackerGeometry );  
105    edm::ESHandle<MagneticField> magfield;                     iSetup.get<IdealMagneticFieldRecord>().get(magfield);                    
# Line 124 | Line 128 | produce(edm::Event& iEvent, const edm::E
128        if( 0 == (trackmulti->at(i))++ ) {
129          const StripGeomDetUnit* theStripDet = dynamic_cast<const StripGeomDetUnit*>( theTrackerGeometry->idToDet( hit->geographicalId() ) );
130          LocalVector drift = shallow::drift( theStripDet, *magfield, *SiStripLorentzAngle);
131 <        
131 >
132          trackindex->at(i)   = shallow::findTrackIndex(tracks, track);
133          localtheta->at(i)   = (theStripDet->toLocal(tsos.globalDirection())).theta();
134          localphi->at(i)     = (theStripDet->toLocal(tsos.globalDirection())).phi();  
# Line 140 | Line 144 | produce(edm::Event& iEvent, const edm::E
144          globalz->at(i)      = tsos.globalPosition().z();                            
145          insidistance->at(i) = 1./fabs(cos(localtheta->at(i)));                      
146          projwidth->at(i)    = tan(localtheta->at(i))*cos(localphi->at(i));        
147 +        BdotY->at(i)        = (theStripDet->surface()).toLocal( magfield->inTesla(theStripDet->surface().position())).y();
148          covered->at(i)      = drift.z()/localpitch->at(i) * fabs(projwidth->at(i) - drift.x()/drift.z());
149          rhlocalx->at(i)     = hit->localPosition().x();
150          rhlocaly->at(i)     = hit->localPosition().y();
# Line 155 | Line 160 | produce(edm::Event& iEvent, const edm::E
160          driftx->at(i)       = drift.x();
161          drifty->at(i)       = drift.y();
162          driftz->at(i)       = drift.z();
163 +        globalZofunitlocalY->at(i) = (theStripDet->toGlobal(LocalVector(0,1,0))).z();
164        }
165      }
166    }
# Line 176 | Line 182 | produce(edm::Event& iEvent, const edm::E
182    iEvent.put(insidistance,Prefix + "insidistance"+ Suffix );
183    iEvent.put(covered,     Prefix + "covered"     + Suffix );
184    iEvent.put(projwidth,   Prefix + "projwidth"   + Suffix );
185 +  iEvent.put(BdotY,       Prefix + "BdotY"       + Suffix );
186    iEvent.put(rhlocalx,    Prefix + "rhlocalx"    + Suffix );  
187    iEvent.put(rhlocaly,    Prefix + "rhlocaly"    + Suffix );  
188    iEvent.put(rhlocalxerr, Prefix + "rhlocalxerr" + Suffix );  
# Line 187 | Line 194 | produce(edm::Event& iEvent, const edm::E
194    iEvent.put(rhmerr,      Prefix + "rhmerr"      + Suffix );  
195    iEvent.put(ubstrip,     Prefix + "ubstrip"     + Suffix );  
196    iEvent.put(ubmerr,      Prefix + "ubmerr"      + Suffix );  
197 <  iEvent.put( driftx,        Prefix + "driftx"        );
198 <  iEvent.put( drifty,        Prefix + "drifty"        );
199 <  iEvent.put( driftz,        Prefix + "driftz"        );
197 >  iEvent.put( driftx,     Prefix + "driftx"      + Suffix );
198 >  iEvent.put( drifty,     Prefix + "drifty"      + Suffix );
199 >  iEvent.put( driftz,     Prefix + "driftz"      + Suffix );
200 >  iEvent.put( globalZofunitlocalY, Prefix + "globalZofunitlocalY" + Suffix );
201   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines