CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
TestSmoothHits Class Reference

#include <RecoTracker/DebugTools/src/TestSmoothHits.cc>

Inheritance diagram for TestSmoothHits:
edm::EDAnalyzer

Public Member Functions

 TestSmoothHits (const edm::ParameterSet &)
 
 ~TestSmoothHits ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginRun (edm::Run &run, const edm::EventSetup &)
 
virtual void endJob ()
 
std::pair< LocalPoint,
LocalVector
projectHit (const PSimHit &, const StripGeomDetUnit *, const BoundPlane &)
 

Private Attributes

std::string builderName
 
const edm::ParameterSet conf_
 
TFile * file
 
edm::ESHandle< TrajectoryFitterfit
 
std::string fname
 
TH2F * hChi2_vs_clsize
 
TH2F * hChi2_vs_Process
 
std::map< std::string, TH1F * > hChi2Increment
 
TrackerHitAssociatorhitAssociator
 
std::map< std::string, TH1F * > hPullGM_X_ts
 
std::map< std::string, TH1F * > hPullGM_X_ts_mono
 
std::map< std::string, TH1F * > hPullGM_X_ts_stereo
 
std::map< std::string, TH1F * > hPullGM_Y_ts
 
std::map< std::string, TH1F * > hPullGM_Y_ts_mono
 
std::map< std::string, TH1F * > hPullGM_Y_ts_stereo
 
std::map< std::string, TH1F * > hPullGM_Z_ts
 
std::map< std::string, TH1F * > hPullGM_Z_ts_mono
 
std::map< std::string, TH1F * > hPullGM_Z_ts_stereo
 
std::map< std::string, TH1F * > hPullGP_X_rs
 
std::map< std::string, TH1F * > hPullGP_X_rs_mono
 
std::map< std::string, TH1F * > hPullGP_X_rs_stereo
 
std::map< std::string, TH1F * > hPullGP_X_tr
 
std::map< std::string, TH1F * > hPullGP_X_tr_mono
 
std::map< std::string, TH1F * > hPullGP_X_tr_stereo
 
std::map< std::string, TH1F * > hPullGP_X_ts
 
std::map< std::string, TH1F * > hPullGP_X_ts_mono
 
std::map< std::string, TH1F * > hPullGP_X_ts_stereo
 
std::map< std::string, TH1F * > hPullGP_Y_rs
 
std::map< std::string, TH1F * > hPullGP_Y_rs_mono
 
std::map< std::string, TH1F * > hPullGP_Y_rs_stereo
 
std::map< std::string, TH1F * > hPullGP_Y_tr
 
std::map< std::string, TH1F * > hPullGP_Y_tr_mono
 
std::map< std::string, TH1F * > hPullGP_Y_tr_stereo
 
std::map< std::string, TH1F * > hPullGP_Y_ts
 
std::map< std::string, TH1F * > hPullGP_Y_ts_mono
 
std::map< std::string, TH1F * > hPullGP_Y_ts_stereo
 
std::map< std::string, TH1F * > hPullGP_Z_rs
 
std::map< std::string, TH1F * > hPullGP_Z_rs_mono
 
std::map< std::string, TH1F * > hPullGP_Z_rs_stereo
 
std::map< std::string, TH1F * > hPullGP_Z_tr
 
std::map< std::string, TH1F * > hPullGP_Z_tr_mono
 
std::map< std::string, TH1F * > hPullGP_Z_tr_stereo
 
std::map< std::string, TH1F * > hPullGP_Z_ts
 
std::map< std::string, TH1F * > hPullGP_Z_ts_mono
 
std::map< std::string, TH1F * > hPullGP_Z_ts_stereo
 
TH1F * hTotChi2Increment
 
double maxeta
 
double mineta
 
std::string propagatorName
 
edm::ESHandle< TrajectorySmoothersmooth
 
std::string sname
 
std::string srcName
 
edm::ESHandle
< TransientTrackingRecHitBuilder
theBuilder
 
edm::ESHandle< TrackerGeometrytheG
 
edm::ESHandle< MagneticFieldtheMF
 
edm::ESHandle< PropagatorthePropagator
 
edm::Handle
< TrackCandidateCollection
theTCCollection
 
std::stringstream title
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 51 of file TestSmoothHits.h.

Constructor & Destructor Documentation

TestSmoothHits::TestSmoothHits ( const edm::ParameterSet iConfig)
explicit

Definition at line 27 of file TestSmoothHits.cc.

References builderName, conf_, fname, edm::ParameterSet::getParameter(), LogTrace, maxeta, mineta, propagatorName, sname, and srcName.

27  :
28  conf_(iConfig){
29  LogTrace("TestSmoothHits") << conf_<< std::endl;
30  propagatorName = conf_.getParameter<std::string>("Propagator");
31  builderName = conf_.getParameter<std::string>("TTRHBuilder");
32  srcName = conf_.getParameter<std::string>("src");
33  fname = conf_.getParameter<std::string>("Fitter");
34  sname = conf_.getParameter<std::string>("Smoother");
35  mineta = conf_.getParameter<double>("mineta");
36  maxeta = conf_.getParameter<double>("maxeta");
37 }
T getParameter(std::string const &) const
std::string srcName
std::string propagatorName
std::string fname
const edm::ParameterSet conf_
std::string sname
#define LogTrace(id)
std::string builderName
TestSmoothHits::~TestSmoothHits ( )

Definition at line 39 of file TestSmoothHits.cc.

39 {}

Member Function Documentation

void TestSmoothHits::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDAnalyzer.

Definition at line 193 of file TestSmoothHits.cc.

References TrackerHitAssociator::associateHit(), TrajectoryStateOnSurface::cartesianError(), heavyFlavorValidationHarvestingSequence_cff::combiner, GlobalErrorBase< T, ErrorWeightType >::cxx(), GlobalErrorBase< T, ErrorWeightType >::cyy(), GlobalErrorBase< T, ErrorWeightType >::czz(), delta, PTrajectoryStateOnDet::detId(), fit, edm::Event::getByLabel(), TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), hChi2_vs_clsize, hChi2_vs_Process, hChi2Increment, hitAssociator, hPullGM_X_ts, hPullGM_X_ts_mono, hPullGM_X_ts_stereo, hPullGM_Y_ts, hPullGM_Y_ts_mono, hPullGM_Y_ts_stereo, hPullGM_Z_ts, hPullGM_Z_ts_mono, hPullGM_Z_ts_stereo, hPullGP_X_rs, hPullGP_X_rs_mono, hPullGP_X_rs_stereo, hPullGP_X_tr, hPullGP_X_tr_mono, hPullGP_X_tr_stereo, hPullGP_X_ts, hPullGP_X_ts_mono, hPullGP_X_ts_stereo, hPullGP_Y_rs, hPullGP_Y_rs_mono, hPullGP_Y_rs_stereo, hPullGP_Y_tr, hPullGP_Y_tr_mono, hPullGP_Y_tr_stereo, hPullGP_Y_ts, hPullGP_Y_ts_mono, hPullGP_Y_ts_stereo, hPullGP_Z_rs, hPullGP_Z_rs_mono, hPullGP_Z_rs_stereo, hPullGP_Z_tr, hPullGP_Z_tr_mono, hPullGP_Z_tr_stereo, hPullGP_Z_ts, hPullGP_Z_ts_mono, hPullGP_Z_ts_stereo, hTotChi2Increment, i, TrajectoryStateOnSurface::isValid(), PSimHit::localPosition(), LogTrace, m, mag(), CartesianTrajectoryError::matrix(), maxeta, mineta, PSimHit::momentumAtEntry(), CartesianTrajectoryError::position(), PSimHit::processType(), edm::ESHandle< class >::product(), projectHit(), TrackCandidate::recHits(), query::result, TrackCandidate::seed(), smooth, mathSSE::sqrt(), srcName, evf::utils::state, theBuilder, theG, theMF, thePropagator, theTCCollection, title, Surface::toGlobal(), TrackCandidate::trajectoryStateOnDet(), TrajectoryStateTransform::transientState(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

194 {
195  LogTrace("TestSmoothHits") << "new event" << std::endl;
196 
198  hitAssociator = new TrackerHitAssociator(iEvent);
199 
201 
202  for (TrackCandidateCollection::const_iterator i=theTCCollection->begin(); i!=theTCCollection->end();i++){
203 
204  LogTrace("TestSmoothHits") << "new candidate" << std::endl;
205 
206  const TrackCandidate * theTC = &(*i);
208  const TrackCandidate::range& recHitVec=theTC->recHits();
209 
210  //convert PTrajectoryStateOnDet to TrajectoryStateOnSurface
211  TrajectoryStateTransform transformer;
212 
213  DetId detId(state.detId());
214  TrajectoryStateOnSurface theTSOS=
215  transformer.transientState(state, &(theG->idToDet(detId)->surface()),theMF.product());
216 
217  if (theTSOS.globalMomentum().eta()>maxeta || theTSOS.globalMomentum().eta()<mineta) continue;
218 
219  //convert the TrackingRecHit vector to a TransientTrackingRecHit vector
221 
223  i!=recHitVec.second; i++){
224  hits.push_back(theBuilder->build(&(*i) ));
225  }
226 
227  //call the fitter
228  std::vector<Trajectory> fitted = fit->fit(theTC->seed(), hits, theTSOS);
229  //call the smoother
230  std::vector<Trajectory> result;
231  for(std::vector<Trajectory>::iterator it = fitted.begin(); it != fitted.end(); it++) {
232  std::vector<Trajectory> smoothed = smooth->trajectories(*it);
233  result.insert(result.end(), smoothed.begin(), smoothed.end());
234  }
235  if (result.size()==0) continue;
236  std::vector<TrajectoryMeasurement> vtm = result[0].measurements();
237 
238  TSOS lastState = theTSOS;
239  for (std::vector<TrajectoryMeasurement>::iterator tm=vtm.begin(); tm!=vtm.end();tm++){
240 
242  if ((rhit)->isValid()==0&&rhit->det()!=0) continue;
243  LogTrace("TestSmoothHits") << "new hit" ;
244 
245  int subdetId = rhit->det()->geographicalId().subdetId();
246  int layerId = 0;
247  DetId id = rhit->det()->geographicalId();
248  if (id.subdetId()==3) layerId = ((TIBDetId)(id)).layer();
249  if (id.subdetId()==5) layerId = ((TOBDetId)(id)).layer();
250  if (id.subdetId()==1) layerId = ((PXBDetId)(id)).layer();
251  if (id.subdetId()==4) layerId = ((TIDDetId)(id)).wheel();
252  if (id.subdetId()==6) layerId = ((TECDetId)(id)).wheel();
253  if (id.subdetId()==2) layerId = ((PXFDetId)(id)).disk();
254  LogTrace("TestSmoothHits") << "subdetId=" << subdetId << " layerId=" << layerId ;
255 
256  double delta = 99999;
257  LocalPoint rhitLPv = rhit->localPosition();
258 
259  std::vector<PSimHit> assSimHits = hitAssociator->associateHit(*(rhit->hit()));
260  if (assSimHits.size()==0) continue;
261  PSimHit shit;
262  for(std::vector<PSimHit>::const_iterator m=assSimHits.begin(); m<assSimHits.end(); m++){
263  if ((m->localPosition()-rhitLPv).mag()<delta) {
264  shit=*m;
265  delta = (m->localPosition()-rhitLPv).mag();
266  }
267  }
268 
269  TSOS currentState = combiner(tm->backwardPredictedState(), tm->forwardPredictedState());
270  TSOS updatedState = tm->updatedState();
271 
272  //plot chi2 increment
273  double chi2increment = tm->estimate();
274  LogTrace("TestSmoothHits") << "tm->estimate()=" << tm->estimate();
275  title.str("");
276  title << "Chi2Increment_" << subdetId << "-" << layerId;
277  hChi2Increment[title.str()]->Fill( chi2increment );
278  hTotChi2Increment->Fill( chi2increment );
279  hChi2_vs_Process->Fill( chi2increment, shit.processType() );
280  if (dynamic_cast<const SiPixelRecHit*>(rhit->hit()))
281  hChi2_vs_clsize->Fill( chi2increment, ((const SiPixelRecHit*)(rhit->hit()))->cluster()->size() );
282  if (dynamic_cast<const SiStripRecHit2D*>(rhit->hit()))
283  hChi2_vs_clsize->Fill( chi2increment, ((const SiStripRecHit2D*)(rhit->hit()))->cluster()->amplitudes().size() );
284 
285  //test hits
286  const Surface * surf = &( (rhit)->det()->surface() );
287  LocalVector shitLMom;
288  LocalPoint shitLPos;
289  if (dynamic_cast<const SiStripMatchedRecHit2D*>(rhit->hit())) {
290  double rechitmatchedx = rhit->localPosition().x();
291  double rechitmatchedy = rhit->localPosition().y();
292  double mindist = 999999;
293  float distx, disty;
294  std::pair<LocalPoint,LocalVector> closestPair;
295  const StripGeomDetUnit* stripDet =(StripGeomDetUnit*) ((const GluedGeomDet *)(rhit)->det())->stereoDet();
296  const BoundPlane& plane = (rhit)->det()->surface();
297  for(std::vector<PSimHit>::const_iterator m=assSimHits.begin(); m<assSimHits.end(); m++) {
298  //project simhit;
299  std::pair<LocalPoint,LocalVector> hitPair = projectHit((*m),stripDet,plane);
300  distx = fabs(rechitmatchedx - hitPair.first.x());
301  disty = fabs(rechitmatchedy - hitPair.first.y());
302  double dist = distx*distx+disty*disty;
303  if(sqrt(dist)<mindist){
304  mindist = dist;
305  closestPair = hitPair;
306  }
307  }
308  shitLPos = closestPair.first;
309  shitLMom = closestPair.second;
310  } else {
311  shitLPos = shit.localPosition();
312  shitLMom = shit.momentumAtEntry();
313  }
314  GlobalVector shitGMom = surf->toGlobal(shitLMom);
315  GlobalPoint shitGPos = surf->toGlobal(shitLPos);
316 // if (dynamic_cast<const SiStripMatchedRecHit2D*>((rhit)->hit())) {
317 // double rechitmatchedx = rhit->localPosition().x();
318 // double rechitmatchedy = rhit->localPosition().y();
319 // double mindist = 999999;
320 // double distx, disty;
321 // std::pair<LocalPoint,LocalVector> closestPair;
322 // const StripGeomDetUnit* stripDet =(StripGeomDetUnit*) ((const GluedGeomDet *)(rhit)->det())->stereoDet();
323 // const BoundPlane& plane = (rhit)->det()->surface();
324 // for(std::vector<PSimHit>::const_iterator m=assSimHits.begin(); m<assSimHits.end(); m++){
325 // const PSimHit& hit = *m;
326 // const StripTopology& topol = stripDet->specificTopology();
327 // GlobalPoint globalpos = stripDet->surface().toGlobal(hit.localPosition());
328 // LocalPoint localHit = plane.toLocal(globalpos);
329 // //track direction
330 // LocalVector locdir=hit.localDirection();
331 // //rotate track in new frame
332 // GlobalVector globaldir= stripDet->surface().toGlobal(locdir);
333 // LocalVector dir=plane.toLocal(globaldir);
334 // float scale = -localHit.z() / dir.z();
335 // LocalPoint projectedPos = localHit + scale*dir;
336 // float selfAngle = topol.stripAngle( topol.strip( hit.localPosition()));
337 // LocalVector stripDir( sin(selfAngle), cos(selfAngle), 0); // vector along strip in hit frame
338 // LocalVector localStripDir = LocalVector( plane.toLocal(stripDet->surface().toGlobal( stripDir)));
339 // std::pair<LocalPoint,LocalVector> hitPair( projectedPos, localStripDir);
340 // distx = fabs(rechitmatchedx - hitPair.first.x());
341 // disty = fabs(rechitmatchedy - hitPair.first.y());
342 // double dist = distx*distx+disty*disty;
343 // if(sqrt(dist)<mindist){
344 // mindist = dist;
345 // closestPair = hitPair;
346 // }
347 // }
348 // shitLPos = closestPair.first;
349 // shitLMom = closestPair.second;
350 // } else {
351 // shitLPos = shit.localPosition();
352 // shitLMom = shit.momentumAtEntry();
353 // }
354 // GlobalVector shitGMom = surf->toGlobal(shitLMom);
355 // GlobalPoint shitGPos = surf->toGlobal(shitLPos);
356 
357  GlobalVector tsosGMom = currentState.globalMomentum();
358  GlobalError tsosGMEr(currentState.cartesianError().matrix().Sub<AlgebraicSymMatrix33>(3,3));
359  GlobalPoint tsosGPos = currentState.globalPosition();
360  GlobalError tsosGPEr = currentState.cartesianError().position();
361 
362  GlobalPoint rhitGPos = (rhit)->globalPosition();
363  GlobalError rhitGPEr = (rhit)->globalPositionError();
364 
365  double pullGPX_rs = (rhitGPos.x()-shitGPos.x())/sqrt(rhitGPEr.cxx());
366  double pullGPY_rs = (rhitGPos.y()-shitGPos.y())/sqrt(rhitGPEr.cyy());
367  double pullGPZ_rs = (rhitGPos.z()-shitGPos.z())/sqrt(rhitGPEr.czz());
368  //double pullGPX_rs = (rhitGPos.x()-shitGPos.x());
369  //double pullGPY_rs = (rhitGPos.y()-shitGPos.y());
370  //double pullGPZ_rs = (rhitGPos.z()-shitGPos.z());
371 
372  LogTrace("TestSmoothHits") << "rs" << std::endl;
373 
374  title.str("");
375  title << "PullGP_X_" << subdetId << "-" << layerId << "_rs";
376  hPullGP_X_rs[title.str()]->Fill( pullGPX_rs );
377  title.str("");
378  title << "PullGP_Y_" << subdetId << "-" << layerId << "_rs";
379  hPullGP_Y_rs[title.str()]->Fill( pullGPY_rs );
380  title.str("");
381  title << "PullGP_Z_" << subdetId << "-" << layerId << "_rs";
382  hPullGP_Z_rs[title.str()]->Fill( pullGPZ_rs );
383 
384  double pullGPX_tr = (tsosGPos.x()-rhitGPos.x())/sqrt(tsosGPEr.cxx()+rhitGPEr.cxx());
385  double pullGPY_tr = (tsosGPos.y()-rhitGPos.y())/sqrt(tsosGPEr.cyy()+rhitGPEr.cyy());
386  double pullGPZ_tr = (tsosGPos.z()-rhitGPos.z())/sqrt(tsosGPEr.czz()+rhitGPEr.czz());
387  //double pullGPX_tr = (tsosGPos.x()-rhitGPos.x());
388  //double pullGPY_tr = (tsosGPos.y()-rhitGPos.y());
389  //double pullGPZ_tr = (tsosGPos.z()-rhitGPos.z());
390 
391  LogTrace("TestSmoothHits") << "tr" << std::endl;
392 
393  title.str("");
394  title << "PullGP_X_" << subdetId << "-" << layerId << "_tr";
395  hPullGP_X_tr[title.str()]->Fill( pullGPX_tr );
396  title.str("");
397  title << "PullGP_Y_" << subdetId << "-" << layerId << "_tr";
398  hPullGP_Y_tr[title.str()]->Fill( pullGPY_tr );
399  title.str("");
400  title << "PullGP_Z_" << subdetId << "-" << layerId << "_tr";
401  hPullGP_Z_tr[title.str()]->Fill( pullGPZ_tr );
402 
403  double pullGPX_ts = (tsosGPos.x()-shitGPos.x())/sqrt(tsosGPEr.cxx());
404  double pullGPY_ts = (tsosGPos.y()-shitGPos.y())/sqrt(tsosGPEr.cyy());
405  double pullGPZ_ts = (tsosGPos.z()-shitGPos.z())/sqrt(tsosGPEr.czz());
406  //double pullGPX_ts = (tsosGPos.x()-shitGPos.x());
407  //double pullGPY_ts = (tsosGPos.y()-shitGPos.y());
408  //double pullGPZ_ts = (tsosGPos.z()-shitGPos.z());
409 
410  LogTrace("TestSmoothHits") << "ts1" << std::endl;
411 
412  title.str("");
413  title << "PullGP_X_" << subdetId << "-" << layerId << "_ts";
414  hPullGP_X_ts[title.str()]->Fill( pullGPX_ts );
415  title.str("");
416  title << "PullGP_Y_" << subdetId << "-" << layerId << "_ts";
417  hPullGP_Y_ts[title.str()]->Fill( pullGPY_ts );
418  title.str("");
419  title << "PullGP_Z_" << subdetId << "-" << layerId << "_ts";
420  hPullGP_Z_ts[title.str()]->Fill( pullGPZ_ts );
421 
422  double pullGMX_ts = (tsosGMom.x()-shitGMom.x())/sqrt(tsosGMEr.cxx());
423  double pullGMY_ts = (tsosGMom.y()-shitGMom.y())/sqrt(tsosGMEr.cyy());
424  double pullGMZ_ts = (tsosGMom.z()-shitGMom.z())/sqrt(tsosGMEr.czz());
425  //double pullGMX_ts = (tsosGMom.x()-shitGMom.x());
426  //double pullGMY_ts = (tsosGMom.y()-shitGMom.y());
427  //double pullGMZ_ts = (tsosGMom.z()-shitGMom.z());
428 
429  LogTrace("TestSmoothHits") << "ts2" << std::endl;
430 
431  title.str("");
432  title << "PullGM_X_" << subdetId << "-" << layerId << "_ts";
433  hPullGM_X_ts[title.str()]->Fill( pullGMX_ts );
434  title.str("");
435  title << "PullGM_Y_" << subdetId << "-" << layerId << "_ts";
436  hPullGM_Y_ts[title.str()]->Fill( pullGMY_ts );
437  title.str("");
438  title << "PullGM_Z_" << subdetId << "-" << layerId << "_ts";
439  hPullGM_Z_ts[title.str()]->Fill( pullGMZ_ts );
440 
441  if (dynamic_cast<const SiStripMatchedRecHit2D*>((rhit)->hit())) {
442  //mono
443  LogTrace("TestSmoothHits") << "MONO HIT" << std::endl;
444  CTTRHp tMonoHit =
445  theBuilder->build(dynamic_cast<const SiStripMatchedRecHit2D*>((rhit)->hit())->monoHit());
446  if (tMonoHit==0) continue;
447  vector<PSimHit> assMonoSimHits = hitAssociator->associateHit(*tMonoHit->hit());
448  if (assMonoSimHits.size()==0) continue;
449  const PSimHit sMonoHit = *(assSimHits.begin());
450  const Surface * monoSurf = &( tMonoHit->det()->surface() );
451  if (monoSurf==0) continue;
452  TSOS monoState = thePropagator->propagate(lastState,*monoSurf);
453  if (monoState.isValid()==0) continue;
454 
455  LocalVector monoShitLMom = sMonoHit.momentumAtEntry();
456  GlobalVector monoShitGMom = monoSurf->toGlobal(monoShitLMom);
457  LocalPoint monoShitLPos = sMonoHit.localPosition();
458  GlobalPoint monoShitGPos = monoSurf->toGlobal(monoShitLPos);
459 
460  GlobalVector monoTsosGMom = monoState.globalMomentum();
461  GlobalError monoTsosGMEr(monoState.cartesianError().matrix().Sub<AlgebraicSymMatrix33>(3,3));
462  GlobalPoint monoTsosGPos = monoState.globalPosition();
463  GlobalError monoTsosGPEr = monoState.cartesianError().position();
464 
465  GlobalPoint monoRhitGPos = tMonoHit->globalPosition();
466  GlobalError monoRhitGPEr = tMonoHit->globalPositionError();
467 
468  double pullGPX_rs_mono = (monoRhitGPos.x()-monoShitGPos.x())/sqrt(monoRhitGPEr.cxx());
469  double pullGPY_rs_mono = (monoRhitGPos.y()-monoShitGPos.y())/sqrt(monoRhitGPEr.cyy());
470  double pullGPZ_rs_mono = (monoRhitGPos.z()-monoShitGPos.z())/sqrt(monoRhitGPEr.czz());
471  //double pullGPX_rs_mono = (monoRhitGPos.x()-monoShitGPos.x());
472  //double pullGPY_rs_mono = (monoRhitGPos.y()-monoShitGPos.y());
473  //double pullGPZ_rs_mono = (monoRhitGPos.z()-monoShitGPos.z());
474 
475  title.str("");
476  title << "PullGP_X_" << subdetId << "-" << layerId << "_rs_mono";
477  hPullGP_X_rs_mono[title.str()]->Fill( pullGPX_rs_mono );
478  title.str("");
479  title << "PullGP_Y_" << subdetId << "-" << layerId << "_rs_mono";
480  hPullGP_Y_rs_mono[title.str()]->Fill( pullGPY_rs_mono );
481  title.str("");
482  title << "PullGP_Z_" << subdetId << "-" << layerId << "_rs_mono";
483  hPullGP_Z_rs_mono[title.str()]->Fill( pullGPZ_rs_mono );
484 
485  double pullGPX_tr_mono = (monoTsosGPos.x()-monoRhitGPos.x())/sqrt(monoTsosGPEr.cxx()+monoRhitGPEr.cxx());
486  double pullGPY_tr_mono = (monoTsosGPos.y()-monoRhitGPos.y())/sqrt(monoTsosGPEr.cyy()+monoRhitGPEr.cyy());
487  double pullGPZ_tr_mono = (monoTsosGPos.z()-monoRhitGPos.z())/sqrt(monoTsosGPEr.czz()+monoRhitGPEr.czz());
488  //double pullGPX_tr_mono = (monoTsosGPos.x()-monoRhitGPos.x());
489  //double pullGPY_tr_mono = (monoTsosGPos.y()-monoRhitGPos.y());
490  //double pullGPZ_tr_mono = (monoTsosGPos.z()-monoRhitGPos.z());
491 
492  title.str("");
493  title << "PullGP_X_" << subdetId << "-" << layerId << "_tr_mono";
494  hPullGP_X_tr_mono[title.str()]->Fill( pullGPX_tr_mono );
495  title.str("");
496  title << "PullGP_Y_" << subdetId << "-" << layerId << "_tr_mono";
497  hPullGP_Y_tr_mono[title.str()]->Fill( pullGPY_tr_mono );
498  title.str("");
499  title << "PullGP_Z_" << subdetId << "-" << layerId << "_tr_mono";
500  hPullGP_Z_tr_mono[title.str()]->Fill( pullGPZ_tr_mono );
501 
502  double pullGPX_ts_mono = (monoTsosGPos.x()-monoShitGPos.x())/sqrt(monoTsosGPEr.cxx());
503  double pullGPY_ts_mono = (monoTsosGPos.y()-monoShitGPos.y())/sqrt(monoTsosGPEr.cyy());
504  double pullGPZ_ts_mono = (monoTsosGPos.z()-monoShitGPos.z())/sqrt(monoTsosGPEr.czz());
505  //double pullGPX_ts_mono = (monoTsosGPos.x()-monoShitGPos.x());
506  //double pullGPY_ts_mono = (monoTsosGPos.y()-monoShitGPos.y());
507  //double pullGPZ_ts_mono = (monoTsosGPos.z()-monoShitGPos.z());
508 
509  title.str("");
510  title << "PullGP_X_" << subdetId << "-" << layerId << "_ts_mono";
511  hPullGP_X_ts_mono[title.str()]->Fill( pullGPX_ts_mono );
512  title.str("");
513  title << "PullGP_Y_" << subdetId << "-" << layerId << "_ts_mono";
514  hPullGP_Y_ts_mono[title.str()]->Fill( pullGPY_ts_mono );
515  title.str("");
516  title << "PullGP_Z_" << subdetId << "-" << layerId << "_ts_mono";
517  hPullGP_Z_ts_mono[title.str()]->Fill( pullGPZ_ts_mono );
518 
519  double pullGMX_ts_mono = (monoTsosGMom.x()-monoShitGMom.x())/sqrt(monoTsosGMEr.cxx());
520  double pullGMY_ts_mono = (monoTsosGMom.y()-monoShitGMom.y())/sqrt(monoTsosGMEr.cyy());
521  double pullGMZ_ts_mono = (monoTsosGMom.z()-monoShitGMom.z())/sqrt(monoTsosGMEr.czz());
522  //double pullGMX_ts_mono = (monoTsosGMom.x()-monoShitGMom.x());
523  //double pullGMY_ts_mono = (monoTsosGMom.y()-monoShitGMom.y());
524  //double pullGMZ_ts_mono = (monoTsosGMom.z()-monoShitGMom.z());
525 
526  title.str("");
527  title << "PullGM_X_" << subdetId << "-" << layerId << "_ts_mono";
528  hPullGM_X_ts_mono[title.str()]->Fill( pullGMX_ts_mono );
529  title.str("");
530  title << "PullGM_Y_" << subdetId << "-" << layerId << "_ts_mono";
531  hPullGM_Y_ts_mono[title.str()]->Fill( pullGMY_ts_mono );
532  title.str("");
533  title << "PullGM_Z_" << subdetId << "-" << layerId << "_ts_mono";
534  hPullGM_Z_ts_mono[title.str()]->Fill( pullGMZ_ts_mono );
535 
536  //stereo
537  LogTrace("TestSmoothHits") << "STEREO HIT" << std::endl;
538  CTTRHp tStereoHit =
539  theBuilder->build(dynamic_cast<const SiStripMatchedRecHit2D*>((rhit)->hit())->stereoHit());
540  if (tStereoHit==0) continue;
541  vector<PSimHit> assStereoSimHits = hitAssociator->associateHit(*tStereoHit->hit());
542  if (assStereoSimHits.size()==0) continue;
543  const PSimHit sStereoHit = *(assSimHits.begin());
544  const Surface * stereoSurf = &( tStereoHit->det()->surface() );
545  if (stereoSurf==0) continue;
546  TSOS stereoState = thePropagator->propagate(lastState,*stereoSurf);
547  if (stereoState.isValid()==0) continue;
548 
549  LocalVector stereoShitLMom = sStereoHit.momentumAtEntry();
550  GlobalVector stereoShitGMom = stereoSurf->toGlobal(stereoShitLMom);
551  LocalPoint stereoShitLPos = sStereoHit.localPosition();
552  GlobalPoint stereoShitGPos = stereoSurf->toGlobal(stereoShitLPos);
553 
554  GlobalVector stereoTsosGMom = stereoState.globalMomentum();
555  GlobalError stereoTsosGMEr(stereoState.cartesianError().matrix().Sub<AlgebraicSymMatrix33>(3,3));
556  GlobalPoint stereoTsosGPos = stereoState.globalPosition();
557  GlobalError stereoTsosGPEr = stereoState.cartesianError().position();
558 
559  GlobalPoint stereoRhitGPos = tStereoHit->globalPosition();
560  GlobalError stereoRhitGPEr = tStereoHit->globalPositionError();
561 
562  double pullGPX_rs_stereo = (stereoRhitGPos.x()-stereoShitGPos.x())/sqrt(stereoRhitGPEr.cxx());
563  double pullGPY_rs_stereo = (stereoRhitGPos.y()-stereoShitGPos.y())/sqrt(stereoRhitGPEr.cyy());
564  double pullGPZ_rs_stereo = (stereoRhitGPos.z()-stereoShitGPos.z())/sqrt(stereoRhitGPEr.czz());
565  //double pullGPX_rs_stereo = (stereoRhitGPos.x()-stereoShitGPos.x());
566  //double pullGPY_rs_stereo = (stereoRhitGPos.y()-stereoShitGPos.y());
567  //double pullGPZ_rs_stereo = (stereoRhitGPos.z()-stereoShitGPos.z());
568 
569  title.str("");
570  title << "PullGP_X_" << subdetId << "-" << layerId << "_rs_stereo";
571  hPullGP_X_rs_stereo[title.str()]->Fill( pullGPX_rs_stereo );
572  title.str("");
573  title << "PullGP_Y_" << subdetId << "-" << layerId << "_rs_stereo";
574  hPullGP_Y_rs_stereo[title.str()]->Fill( pullGPY_rs_stereo );
575  title.str("");
576  title << "PullGP_Z_" << subdetId << "-" << layerId << "_rs_stereo";
577  hPullGP_Z_rs_stereo[title.str()]->Fill( pullGPZ_rs_stereo );
578 
579  double pullGPX_tr_stereo = (stereoTsosGPos.x()-stereoRhitGPos.x())/sqrt(stereoTsosGPEr.cxx()+stereoRhitGPEr.cxx());
580  double pullGPY_tr_stereo = (stereoTsosGPos.y()-stereoRhitGPos.y())/sqrt(stereoTsosGPEr.cyy()+stereoRhitGPEr.cyy());
581  double pullGPZ_tr_stereo = (stereoTsosGPos.z()-stereoRhitGPos.z())/sqrt(stereoTsosGPEr.czz()+stereoRhitGPEr.czz());
582  //double pullGPX_tr_stereo = (stereoTsosGPos.x()-stereoRhitGPos.x());
583  //double pullGPY_tr_stereo = (stereoTsosGPos.y()-stereoRhitGPos.y());
584  //double pullGPZ_tr_stereo = (stereoTsosGPos.z()-stereoRhitGPos.z());
585 
586  title.str("");
587  title << "PullGP_X_" << subdetId << "-" << layerId << "_tr_stereo";
588  hPullGP_X_tr_stereo[title.str()]->Fill( pullGPX_tr_stereo );
589  title.str("");
590  title << "PullGP_Y_" << subdetId << "-" << layerId << "_tr_stereo";
591  hPullGP_Y_tr_stereo[title.str()]->Fill( pullGPY_tr_stereo );
592  title.str("");
593  title << "PullGP_Z_" << subdetId << "-" << layerId << "_tr_stereo";
594  hPullGP_Z_tr_stereo[title.str()]->Fill( pullGPZ_tr_stereo );
595 
596  double pullGPX_ts_stereo = (stereoTsosGPos.x()-stereoShitGPos.x())/sqrt(stereoTsosGPEr.cxx());
597  double pullGPY_ts_stereo = (stereoTsosGPos.y()-stereoShitGPos.y())/sqrt(stereoTsosGPEr.cyy());
598  double pullGPZ_ts_stereo = (stereoTsosGPos.z()-stereoShitGPos.z())/sqrt(stereoTsosGPEr.czz());
599  //double pullGPX_ts_stereo = (stereoTsosGPos.x()-stereoShitGPos.x());
600  //double pullGPY_ts_stereo = (stereoTsosGPos.y()-stereoShitGPos.y());
601  //double pullGPZ_ts_stereo = (stereoTsosGPos.z()-stereoShitGPos.z());
602 
603  title.str("");
604  title << "PullGP_X_" << subdetId << "-" << layerId << "_ts_stereo";
605  hPullGP_X_ts_stereo[title.str()]->Fill( pullGPX_ts_stereo );
606  title.str("");
607  title << "PullGP_Y_" << subdetId << "-" << layerId << "_ts_stereo";
608  hPullGP_Y_ts_stereo[title.str()]->Fill( pullGPY_ts_stereo );
609  title.str("");
610  title << "PullGP_Z_" << subdetId << "-" << layerId << "_ts_stereo";
611  hPullGP_Z_ts_stereo[title.str()]->Fill( pullGPZ_ts_stereo );
612 
613  double pullGMX_ts_stereo = (stereoTsosGMom.x()-stereoShitGMom.x())/sqrt(stereoTsosGMEr.cxx());
614  double pullGMY_ts_stereo = (stereoTsosGMom.y()-stereoShitGMom.y())/sqrt(stereoTsosGMEr.cyy());
615  double pullGMZ_ts_stereo = (stereoTsosGMom.z()-stereoShitGMom.z())/sqrt(stereoTsosGMEr.czz());
616  //double pullGMX_ts_stereo = (stereoTsosGMom.x()-stereoShitGMom.x());
617  //double pullGMY_ts_stereo = (stereoTsosGMom.y()-stereoShitGMom.y());
618  //double pullGMZ_ts_stereo = (stereoTsosGMom.z()-stereoShitGMom.z());
619 
620  title.str("");
621  title << "PullGM_X_" << subdetId << "-" << layerId << "_ts_stereo";
622  hPullGM_X_ts_stereo[title.str()]->Fill( pullGMX_ts_stereo );
623  title.str("");
624  title << "PullGM_Y_" << subdetId << "-" << layerId << "_ts_stereo";
625  hPullGM_Y_ts_stereo[title.str()]->Fill( pullGMY_ts_stereo );
626  title.str("");
627  title << "PullGM_Z_" << subdetId << "-" << layerId << "_ts_stereo";
628  hPullGM_Z_ts_stereo[title.str()]->Fill( pullGMZ_ts_stereo );
629  }
630  lastState = updatedState;
631  //#endif
632  }
633  }
634  delete hitAssociator;
635  LogTrace("TestSmoothHits") << "end of event" << std::endl;
636 }
std::map< std::string, TH1F * > hPullGP_Z_rs_stereo
dbl * delta
Definition: mlp_gen.cc:36
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:78
int i
Definition: DBlmapReader.cc:9
std::string srcName
TrackerHitAssociator * hitAssociator
std::map< std::string, TH1F * > hPullGP_X_ts_mono
std::map< std::string, TH1F * > hPullGM_Y_ts_mono
edm::Handle< TrackCandidateCollection > theTCCollection
std::stringstream title
range recHits() const
LocalVector momentumAtEntry() const
The momentum of the track that produced the hit, at entry point.
Definition: PSimHit.h:47
std::map< std::string, TH1F * > hChi2Increment
std::map< std::string, TH1F * > hPullGP_X_rs_mono
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
TrajectorySeed const & seed() const
std::map< std::string, TH1F * > hPullGM_Z_ts_stereo
T y() const
Definition: PV3DBase.h:57
GlobalPoint globalPosition() const
std::map< std::string, TH1F * > hPullGP_Y_rs
std::map< std::string, TH1F * > hPullGM_X_ts_mono
std::map< std::string, TH1F * > hPullGP_Z_tr
std::map< std::string, TH1F * > hPullGP_X_ts
std::pair< const_iterator, const_iterator > range
std::map< std::string, TH1F * > hPullGP_Y_tr_stereo
std::map< std::string, TH1F * > hPullGP_Z_ts
std::map< std::string, TH1F * > hPullGP_X_rs_stereo
std::vector< ConstRecHitPointer > RecHitContainer
edm::ESHandle< TrajectorySmoother > smooth
std::map< std::string, TH1F * > hPullGP_Y_rs_mono
std::map< std::string, TH1F * > hPullGM_Y_ts_stereo
edm::ESHandle< TrajectoryFitter > fit
PTrajectoryStateOnDet const & trajectoryStateOnDet() const
TH2F * hChi2_vs_Process
std::map< std::string, TH1F * > hPullGP_Z_rs_mono
edm::ESHandle< MagneticField > theMF
TH2F * hChi2_vs_clsize
std::map< std::string, TH1F * > hPullGP_Y_ts_mono
std::map< std::string, TH1F * > hPullGM_Y_ts
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
std::map< std::string, TH1F * > hPullGP_Z_tr_mono
Local3DPoint localPosition() const
Definition: PSimHit.h:44
const CartesianTrajectoryError & cartesianError() const
T sqrt(T t)
Definition: SSEVec.h:28
T z() const
Definition: PV3DBase.h:58
tuple result
Definition: query.py:137
std::map< std::string, TH1F * > hPullGM_Z_ts
std::map< std::string, TH1F * > hPullGP_X_tr
TrajectoryStateOnSurface transientState(const PTrajectoryStateOnDet &ts, const Surface *surface, const MagneticField *field) const
std::map< std::string, TH1F * > hPullGP_Y_rs_stereo
edm::ESHandle< TransientTrackingRecHitBuilder > theBuilder
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:355
#define LogTrace(id)
std::map< std::string, TH1F * > hPullGP_Y_tr_mono
const AlgebraicSymMatrix66 & matrix() const
GlobalError position() const
Position error submatrix.
std::map< std::string, TH1F * > hPullGP_X_ts_stereo
std::map< std::string, TH1F * > hPullGP_Y_ts
std::map< std::string, TH1F * > hPullGP_Z_ts_stereo
Definition: DetId.h:20
std::map< std::string, TH1F * > hPullGM_Z_ts_mono
std::map< std::string, TH1F * > hPullGP_X_rs
TH1F * hTotChi2Increment
edm::ESHandle< Propagator > thePropagator
const unsigned int detId() const
T const * product() const
Definition: ESHandle.h:62
std::map< std::string, TH1F * > hPullGP_X_tr_stereo
unsigned short processType() const
Definition: PSimHit.h:118
char state
Definition: procUtils.cc:75
edm::ESHandle< TrackerGeometry > theG
std::map< std::string, TH1F * > hPullGP_X_tr_mono
std::pair< LocalPoint, LocalVector > projectHit(const PSimHit &, const StripGeomDetUnit *, const BoundPlane &)
GlobalVector globalMomentum() const
std::vector< PSimHit > associateHit(const TrackingRecHit &thit)
std::map< std::string, TH1F * > hPullGP_Z_tr_stereo
std::map< std::string, TH1F * > hPullGP_Z_rs
std::map< std::string, TH1F * > hPullGP_Y_ts_stereo
std::map< std::string, TH1F * > hPullGP_Z_ts_mono
std::map< std::string, TH1F * > hPullGM_X_ts
T x() const
Definition: PV3DBase.h:56
std::map< std::string, TH1F * > hPullGM_X_ts_stereo
std::map< std::string, TH1F * > hPullGP_Y_tr
Our base class.
Definition: SiPixelRecHit.h:27
void TestSmoothHits::beginRun ( edm::Run run,
const edm::EventSetup iSetup 
)
privatevirtual

Definition at line 41 of file TestSmoothHits.cc.

References builderName, file, fit, fname, edm::EventSetup::get(), hChi2_vs_clsize, hChi2_vs_Process, hChi2Increment, hPullGM_X_ts, hPullGM_X_ts_mono, hPullGM_X_ts_stereo, hPullGM_Y_ts, hPullGM_Y_ts_mono, hPullGM_Y_ts_stereo, hPullGM_Z_ts, hPullGM_Z_ts_mono, hPullGM_Z_ts_stereo, hPullGP_X_rs, hPullGP_X_rs_mono, hPullGP_X_rs_stereo, hPullGP_X_tr, hPullGP_X_tr_mono, hPullGP_X_tr_stereo, hPullGP_X_ts, hPullGP_X_ts_mono, hPullGP_X_ts_stereo, hPullGP_Y_rs, hPullGP_Y_rs_mono, hPullGP_Y_rs_stereo, hPullGP_Y_tr, hPullGP_Y_tr_mono, hPullGP_Y_tr_stereo, hPullGP_Y_ts, hPullGP_Y_ts_mono, hPullGP_Y_ts_stereo, hPullGP_Z_rs, hPullGP_Z_rs_mono, hPullGP_Z_rs_stereo, hPullGP_Z_tr, hPullGP_Z_tr_mono, hPullGP_Z_tr_stereo, hPullGP_Z_ts, hPullGP_Z_ts_mono, hPullGP_Z_ts_stereo, hTotChi2Increment, i, j, propagatorName, smooth, sname, theBuilder, theG, theMF, thePropagator, and title.

42 {
43 
44  iSetup.get<TrackerDigiGeometryRecord>().get(theG);
45  iSetup.get<IdealMagneticFieldRecord>().get(theMF);
48  iSetup.get<TrajectoryFitter::Record>().get(fname, fit);
49  iSetup.get<TrajectoryFitter::Record>().get(sname, smooth);
50 
51  file = new TFile("testSmoothHits.root","recreate");
52  for (int i=0; i!=6; i++)
53  for (int j=0; j!=9; j++){
54  if (i==0 && j>2) break;
55  if (i==1 && j>1) break;
56  if (i==2 && j>3) break;
57  if (i==3 && j>2) break;
58  if (i==4 && j>5) break;
59  if (i==5 && j>8) break;
60  title.str("");
61  title << "PullGP_X_" << i+1 << "-" << j+1 << "_ts";
62  hPullGP_X_ts[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
63  title.str("");
64  title << "PullGP_Y_" << i+1 << "-" << j+1 << "_ts";
65  hPullGP_Y_ts[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
66  title.str("");
67  title << "PullGP_Z_" << i+1 << "-" << j+1 << "_ts";
68  hPullGP_Z_ts[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
69  title.str("");
70  title << "Chi2Increment_" << i+1 << "-" << j+1;
71  hChi2Increment[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,0,100);
72 
73  title.str("");
74  title << "PullGM_X_" << i+1 << "-" << j+1 << "_ts";
75  hPullGM_X_ts[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
76  title.str("");
77  title << "PullGM_Y_" << i+1 << "-" << j+1 << "_ts";
78  hPullGM_Y_ts[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
79  title.str("");
80  title << "PullGM_Z_" << i+1 << "-" << j+1 << "_ts";
81  hPullGM_Z_ts[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
82 
83  title.str("");
84  title << "PullGP_X_" << i+1 << "-" << j+1 << "_tr";
85  hPullGP_X_tr[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
86  title.str("");
87  title << "PullGP_Y_" << i+1 << "-" << j+1 << "_tr";
88  hPullGP_Y_tr[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
89  title.str("");
90  title << "PullGP_Z_" << i+1 << "-" << j+1 << "_tr";
91  hPullGP_Z_tr[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
92 
93  title.str("");
94  title << "PullGP_X_" << i+1 << "-" << j+1 << "_rs";
95  hPullGP_X_rs[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
96  title.str("");
97  title << "PullGP_Y_" << i+1 << "-" << j+1 << "_rs";
98  hPullGP_Y_rs[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
99  title.str("");
100  title << "PullGP_Z_" << i+1 << "-" << j+1 << "_rs";
101  hPullGP_Z_rs[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
102 
103  if ( ((i==2||i==4)&&(j==0||j==1)) || (i==3||i==5) ){
104  //mono
105  title.str("");
106  title << "PullGP_X_" << i+1 << "-" << j+1 << "_ts_mono";
107  hPullGP_X_ts_mono[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
108  title.str("");
109  title << "PullGP_Y_" << i+1 << "-" << j+1 << "_ts_mono";
110  hPullGP_Y_ts_mono[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
111  title.str("");
112  title << "PullGP_Z_" << i+1 << "-" << j+1 << "_ts_mono";
113  hPullGP_Z_ts_mono[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
114 
115  title.str("");
116  title << "PullGM_X_" << i+1 << "-" << j+1 << "_ts_mono";
117  hPullGM_X_ts_mono[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
118  title.str("");
119  title << "PullGM_Y_" << i+1 << "-" << j+1 << "_ts_mono";
120  hPullGM_Y_ts_mono[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
121  title.str("");
122  title << "PullGM_Z_" << i+1 << "-" << j+1 << "_ts_mono";
123  hPullGM_Z_ts_mono[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
124 
125  title.str("");
126  title << "PullGP_X_" << i+1 << "-" << j+1 << "_tr_mono";
127  hPullGP_X_tr_mono[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
128  title.str("");
129  title << "PullGP_Y_" << i+1 << "-" << j+1 << "_tr_mono";
130  hPullGP_Y_tr_mono[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
131  title.str("");
132  title << "PullGP_Z_" << i+1 << "-" << j+1 << "_tr_mono";
133  hPullGP_Z_tr_mono[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
134 
135  title.str("");
136  title << "PullGP_X_" << i+1 << "-" << j+1 << "_rs_mono";
137  hPullGP_X_rs_mono[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
138  title.str("");
139  title << "PullGP_Y_" << i+1 << "-" << j+1 << "_rs_mono";
140  hPullGP_Y_rs_mono[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
141  title.str("");
142  title << "PullGP_Z_" << i+1 << "-" << j+1 << "_rs_mono";
143  hPullGP_Z_rs_mono[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
144 
145  //stereo
146  title.str("");
147  title << "PullGP_X_" << i+1 << "-" << j+1 << "_ts_stereo";
148  hPullGP_X_ts_stereo[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
149  title.str("");
150  title << "PullGP_Y_" << i+1 << "-" << j+1 << "_ts_stereo";
151  hPullGP_Y_ts_stereo[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
152  title.str("");
153  title << "PullGP_Z_" << i+1 << "-" << j+1 << "_ts_stereo";
154  hPullGP_Z_ts_stereo[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
155 
156  title.str("");
157  title << "PullGM_X_" << i+1 << "-" << j+1 << "_ts_stereo";
158  hPullGM_X_ts_stereo[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
159  title.str("");
160  title << "PullGM_Y_" << i+1 << "-" << j+1 << "_ts_stereo";
161  hPullGM_Y_ts_stereo[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
162  title.str("");
163  title << "PullGM_Z_" << i+1 << "-" << j+1 << "_ts_stereo";
164  hPullGM_Z_ts_stereo[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
165 
166  title.str("");
167  title << "PullGP_X_" << i+1 << "-" << j+1 << "_tr_stereo";
168  hPullGP_X_tr_stereo[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
169  title.str("");
170  title << "PullGP_Y_" << i+1 << "-" << j+1 << "_tr_stereo";
171  hPullGP_Y_tr_stereo[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
172  title.str("");
173  title << "PullGP_Z_" << i+1 << "-" << j+1 << "_tr_stereo";
174  hPullGP_Z_tr_stereo[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
175 
176  title.str("");
177  title << "PullGP_X_" << i+1 << "-" << j+1 << "_rs_stereo";
178  hPullGP_X_rs_stereo[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
179  title.str("");
180  title << "PullGP_Y_" << i+1 << "-" << j+1 << "_rs_stereo";
181  hPullGP_Y_rs_stereo[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
182  title.str("");
183  title << "PullGP_Z_" << i+1 << "-" << j+1 << "_rs_stereo";
184  hPullGP_Z_rs_stereo[title.str()] = new TH1F(title.str().c_str(),title.str().c_str(),1000,-50,50);
185  }
186  }
187  hTotChi2Increment = new TH1F("TotChi2Increment","TotChi2Increment",1000,0,100);
188  hChi2_vs_Process = new TH2F("Chi2_vs_Process","Chi2_vs_Process",1000,0,100,17,-0.5,16.5);
189  hChi2_vs_clsize = new TH2F("Chi2_vs_clsize","Chi2_vs_clsize",1000,0,100,17,-0.5,16.5);
190 }
std::map< std::string, TH1F * > hPullGP_Z_rs_stereo
int i
Definition: DBlmapReader.cc:9
std::map< std::string, TH1F * > hPullGP_X_ts_mono
std::map< std::string, TH1F * > hPullGM_Y_ts_mono
std::stringstream title
std::map< std::string, TH1F * > hChi2Increment
std::map< std::string, TH1F * > hPullGP_X_rs_mono
std::string propagatorName
std::map< std::string, TH1F * > hPullGM_Z_ts_stereo
std::map< std::string, TH1F * > hPullGP_Y_rs
std::map< std::string, TH1F * > hPullGM_X_ts_mono
std::map< std::string, TH1F * > hPullGP_Z_tr
std::map< std::string, TH1F * > hPullGP_X_ts
std::string fname
std::map< std::string, TH1F * > hPullGP_Y_tr_stereo
std::map< std::string, TH1F * > hPullGP_Z_ts
std::map< std::string, TH1F * > hPullGP_X_rs_stereo
edm::ESHandle< TrajectorySmoother > smooth
std::map< std::string, TH1F * > hPullGP_Y_rs_mono
std::map< std::string, TH1F * > hPullGM_Y_ts_stereo
edm::ESHandle< TrajectoryFitter > fit
TH2F * hChi2_vs_Process
std::map< std::string, TH1F * > hPullGP_Z_rs_mono
edm::ESHandle< MagneticField > theMF
TH2F * hChi2_vs_clsize
std::map< std::string, TH1F * > hPullGP_Y_ts_mono
std::map< std::string, TH1F * > hPullGM_Y_ts
std::map< std::string, TH1F * > hPullGP_Z_tr_mono
std::map< std::string, TH1F * > hPullGM_Z_ts
std::map< std::string, TH1F * > hPullGP_X_tr
int j
Definition: DBlmapReader.cc:9
std::map< std::string, TH1F * > hPullGP_Y_rs_stereo
std::string sname
edm::ESHandle< TransientTrackingRecHitBuilder > theBuilder
std::map< std::string, TH1F * > hPullGP_Y_tr_mono
std::map< std::string, TH1F * > hPullGP_X_ts_stereo
std::map< std::string, TH1F * > hPullGP_Y_ts
std::map< std::string, TH1F * > hPullGP_Z_ts_stereo
std::map< std::string, TH1F * > hPullGM_Z_ts_mono
std::map< std::string, TH1F * > hPullGP_X_rs
TH1F * hTotChi2Increment
edm::ESHandle< Propagator > thePropagator
const T & get() const
Definition: EventSetup.h:55
std::map< std::string, TH1F * > hPullGP_X_tr_stereo
std::string builderName
edm::ESHandle< TrackerGeometry > theG
std::map< std::string, TH1F * > hPullGP_X_tr_mono
std::map< std::string, TH1F * > hPullGP_Z_tr_stereo
std::map< std::string, TH1F * > hPullGP_Z_rs
std::map< std::string, TH1F * > hPullGP_Y_ts_stereo
std::map< std::string, TH1F * > hPullGP_Z_ts_mono
std::map< std::string, TH1F * > hPullGM_X_ts
std::map< std::string, TH1F * > hPullGM_X_ts_stereo
std::map< std::string, TH1F * > hPullGP_Y_tr
void TestSmoothHits::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 638 of file TestSmoothHits.cc.

References file, hChi2_vs_clsize, hChi2_vs_Process, hChi2Increment, hPullGM_X_ts, hPullGM_X_ts_mono, hPullGM_X_ts_stereo, hPullGM_Y_ts, hPullGM_Y_ts_mono, hPullGM_Y_ts_stereo, hPullGM_Z_ts, hPullGM_Z_ts_mono, hPullGM_Z_ts_stereo, hPullGP_X_rs, hPullGP_X_rs_mono, hPullGP_X_rs_stereo, hPullGP_X_tr, hPullGP_X_tr_mono, hPullGP_X_tr_stereo, hPullGP_X_ts, hPullGP_X_ts_mono, hPullGP_X_ts_stereo, hPullGP_Y_rs, hPullGP_Y_rs_mono, hPullGP_Y_rs_stereo, hPullGP_Y_tr, hPullGP_Y_tr_mono, hPullGP_Y_tr_stereo, hPullGP_Y_ts, hPullGP_Y_ts_mono, hPullGP_Y_ts_stereo, hPullGP_Z_rs, hPullGP_Z_rs_mono, hPullGP_Z_rs_stereo, hPullGP_Z_tr, hPullGP_Z_tr_mono, hPullGP_Z_tr_stereo, hPullGP_Z_ts, hPullGP_Z_ts_mono, hPullGP_Z_ts_stereo, hTotChi2Increment, i, j, and title.

638  {
639  //file->Write();
640  TDirectory * chi2i = file->mkdir("Chi2_Increment");
641 
642  TDirectory * gp_ts = file->mkdir("GP_TSOS-SimHit");
643  TDirectory * gm_ts = file->mkdir("GM_TSOS-SimHit");
644  TDirectory * gp_tr = file->mkdir("GP_TSOS-RecHit");
645  TDirectory * gp_rs = file->mkdir("GP_RecHit-SimHit");
646 
647  TDirectory * gp_tsx = gp_ts->mkdir("X");
648  TDirectory * gp_tsy = gp_ts->mkdir("Y");
649  TDirectory * gp_tsz = gp_ts->mkdir("Z");
650  TDirectory * gm_tsx = gm_ts->mkdir("X");
651  TDirectory * gm_tsy = gm_ts->mkdir("Y");
652  TDirectory * gm_tsz = gm_ts->mkdir("Z");
653  TDirectory * gp_trx = gp_tr->mkdir("X");
654  TDirectory * gp_try = gp_tr->mkdir("Y");
655  TDirectory * gp_trz = gp_tr->mkdir("Z");
656  TDirectory * gp_rsx = gp_rs->mkdir("X");
657  TDirectory * gp_rsy = gp_rs->mkdir("Y");
658  TDirectory * gp_rsz = gp_rs->mkdir("Z");
659 
660  TDirectory * gp_tsx_mono = gp_ts->mkdir("MONOX");
661  TDirectory * gp_tsy_mono = gp_ts->mkdir("MONOY");
662  TDirectory * gp_tsz_mono = gp_ts->mkdir("MONOZ");
663  TDirectory * gm_tsx_mono = gm_ts->mkdir("MONOX");
664  TDirectory * gm_tsy_mono = gm_ts->mkdir("MONOY");
665  TDirectory * gm_tsz_mono = gm_ts->mkdir("MONOZ");
666  TDirectory * gp_trx_mono = gp_tr->mkdir("MONOX");
667  TDirectory * gp_try_mono = gp_tr->mkdir("MONOY");
668  TDirectory * gp_trz_mono = gp_tr->mkdir("MONOZ");
669  TDirectory * gp_rsx_mono = gp_rs->mkdir("MONOX");
670  TDirectory * gp_rsy_mono = gp_rs->mkdir("MONOY");
671  TDirectory * gp_rsz_mono = gp_rs->mkdir("MONOZ");
672 
673  TDirectory * gp_tsx_stereo = gp_ts->mkdir("STEREOX");
674  TDirectory * gp_tsy_stereo = gp_ts->mkdir("STEREOY");
675  TDirectory * gp_tsz_stereo = gp_ts->mkdir("STEREOZ");
676  TDirectory * gm_tsx_stereo = gm_ts->mkdir("STEREOX");
677  TDirectory * gm_tsy_stereo = gm_ts->mkdir("STEREOY");
678  TDirectory * gm_tsz_stereo = gm_ts->mkdir("STEREOZ");
679  TDirectory * gp_trx_stereo = gp_tr->mkdir("STEREOX");
680  TDirectory * gp_try_stereo = gp_tr->mkdir("STEREOY");
681  TDirectory * gp_trz_stereo = gp_tr->mkdir("STEREOZ");
682  TDirectory * gp_rsx_stereo = gp_rs->mkdir("STEREOX");
683  TDirectory * gp_rsy_stereo = gp_rs->mkdir("STEREOY");
684  TDirectory * gp_rsz_stereo = gp_rs->mkdir("STEREOZ");
685 
686  chi2i->cd();
687  hTotChi2Increment->Write();
688  hChi2_vs_Process->Write();
689  hChi2_vs_clsize->Write();
690  for (int i=0; i!=6; i++)
691  for (int j=0; j!=9; j++){
692  if (i==0 && j>2) break;
693  if (i==1 && j>1) break;
694  if (i==2 && j>3) break;
695  if (i==3 && j>2) break;
696  if (i==4 && j>5) break;
697  if (i==5 && j>8) break;
698  chi2i->cd();
699  title.str("");
700  title << "Chi2Increment_" << i+1 << "-" << j+1;
701  hChi2Increment[title.str()]->Write();
702 
703  gp_ts->cd();
704  gp_tsx->cd();
705  title.str("");
706  title << "PullGP_X_" << i+1 << "-" << j+1 << "_ts";
707  hPullGP_X_ts[title.str()]->Write();
708  gp_tsy->cd();
709  title.str("");
710  title << "PullGP_Y_" << i+1 << "-" << j+1 << "_ts";
711  hPullGP_Y_ts[title.str()]->Write();
712  gp_tsz->cd();
713  title.str("");
714  title << "PullGP_Z_" << i+1 << "-" << j+1 << "_ts";
715  hPullGP_Z_ts[title.str()]->Write();
716 
717  gm_ts->cd();
718  gm_tsx->cd();
719  title.str("");
720  title << "PullGM_X_" << i+1 << "-" << j+1 << "_ts";
721  hPullGM_X_ts[title.str()]->Write();
722  gm_tsy->cd();
723  title.str("");
724  title << "PullGM_Y_" << i+1 << "-" << j+1 << "_ts";
725  hPullGM_Y_ts[title.str()]->Write();
726  gm_tsz->cd();
727  title.str("");
728  title << "PullGM_Z_" << i+1 << "-" << j+1 << "_ts";
729  hPullGM_Z_ts[title.str()]->Write();
730 
731  gp_tr->cd();
732  gp_trx->cd();
733  title.str("");
734  title << "PullGP_X_" << i+1 << "-" << j+1 << "_tr";
735  hPullGP_X_tr[title.str()]->Write();
736  gp_try->cd();
737  title.str("");
738  title << "PullGP_Y_" << i+1 << "-" << j+1 << "_tr";
739  hPullGP_Y_tr[title.str()]->Write();
740  gp_trz->cd();
741  title.str("");
742  title << "PullGP_Z_" << i+1 << "-" << j+1 << "_tr";
743  hPullGP_Z_tr[title.str()]->Write();
744 
745  gp_rs->cd();
746  gp_rsx->cd();
747  title.str("");
748  title << "PullGP_X_" << i+1 << "-" << j+1 << "_rs";
749  hPullGP_X_rs[title.str()]->Write();
750  gp_rsy->cd();
751  title.str("");
752  title << "PullGP_Y_" << i+1 << "-" << j+1 << "_rs";
753  hPullGP_Y_rs[title.str()]->Write();
754  gp_rsz->cd();
755  title.str("");
756  title << "PullGP_Z_" << i+1 << "-" << j+1 << "_rs";
757  hPullGP_Z_rs[title.str()]->Write();
758 
759  if ( ((i==2||i==4)&&(j==0||j==1)) || (i==3||i==5) ){
760  //mono
761  gp_ts->cd();
762  gp_tsx_mono->cd();
763  title.str("");
764  title << "PullGP_X_" << i+1 << "-" << j+1 << "_ts_mono";
765  hPullGP_X_ts_mono[title.str()]->Write();
766  gp_tsy_mono->cd();
767  title.str("");
768  title << "PullGP_Y_" << i+1 << "-" << j+1 << "_ts_mono";
769  hPullGP_Y_ts_mono[title.str()]->Write();
770  gp_tsz_mono->cd();
771  title.str("");
772  title << "PullGP_Z_" << i+1 << "-" << j+1 << "_ts_mono";
773  hPullGP_Z_ts_mono[title.str()]->Write();
774 
775  gm_ts->cd();
776  gm_tsx_mono->cd();
777  title.str("");
778  title << "PullGM_X_" << i+1 << "-" << j+1 << "_ts_mono";
779  hPullGM_X_ts_mono[title.str()]->Write();
780  gm_tsy_mono->cd();
781  title.str("");
782  title << "PullGM_Y_" << i+1 << "-" << j+1 << "_ts_mono";
783  hPullGM_Y_ts_mono[title.str()]->Write();
784  gm_tsz_mono->cd();
785  title.str("");
786  title << "PullGM_Z_" << i+1 << "-" << j+1 << "_ts_mono";
787  hPullGM_Z_ts_mono[title.str()]->Write();
788 
789  gp_tr->cd();
790  gp_trx_mono->cd();
791  title.str("");
792  title << "PullGP_X_" << i+1 << "-" << j+1 << "_tr_mono";
793  hPullGP_X_tr_mono[title.str()]->Write();
794  gp_try_mono->cd();
795  title.str("");
796  title << "PullGP_Y_" << i+1 << "-" << j+1 << "_tr_mono";
797  hPullGP_Y_tr_mono[title.str()]->Write();
798  gp_trz_mono->cd();
799  title.str("");
800  title << "PullGP_Z_" << i+1 << "-" << j+1 << "_tr_mono";
801  hPullGP_Z_tr_mono[title.str()]->Write();
802 
803  gp_rs->cd();
804  gp_rsx_mono->cd();
805  title.str("");
806  title << "PullGP_X_" << i+1 << "-" << j+1 << "_rs_mono";
807  hPullGP_X_rs_mono[title.str()]->Write();
808  gp_rsy_mono->cd();
809  title.str("");
810  title << "PullGP_Y_" << i+1 << "-" << j+1 << "_rs_mono";
811  hPullGP_Y_rs_mono[title.str()]->Write();
812  gp_rsz_mono->cd();
813  title.str("");
814  title << "PullGP_Z_" << i+1 << "-" << j+1 << "_rs_mono";
815  hPullGP_Z_rs_mono[title.str()]->Write();
816 
817  //stereo
818  gp_ts->cd();
819  gp_tsx_stereo->cd();
820  title.str("");
821  title << "PullGP_X_" << i+1 << "-" << j+1 << "_ts_stereo";
822  hPullGP_X_ts_stereo[title.str()]->Write();
823  gp_tsy_stereo->cd();
824  title.str("");
825  title << "PullGP_Y_" << i+1 << "-" << j+1 << "_ts_stereo";
826  hPullGP_Y_ts_stereo[title.str()]->Write();
827  gp_tsz_stereo->cd();
828  title.str("");
829  title << "PullGP_Z_" << i+1 << "-" << j+1 << "_ts_stereo";
830  hPullGP_Z_ts_stereo[title.str()]->Write();
831 
832  gm_ts->cd();
833  gm_tsx_stereo->cd();
834  title.str("");
835  title << "PullGM_X_" << i+1 << "-" << j+1 << "_ts_stereo";
836  hPullGM_X_ts_stereo[title.str()]->Write();
837  gm_tsy_stereo->cd();
838  title.str("");
839  title << "PullGM_Y_" << i+1 << "-" << j+1 << "_ts_stereo";
840  hPullGM_Y_ts_stereo[title.str()]->Write();
841  gm_tsz_stereo->cd();
842  title.str("");
843  title << "PullGM_Z_" << i+1 << "-" << j+1 << "_ts_stereo";
844  hPullGM_Z_ts_stereo[title.str()]->Write();
845 
846  gp_tr->cd();
847  gp_trx_stereo->cd();
848  title.str("");
849  title << "PullGP_X_" << i+1 << "-" << j+1 << "_tr_stereo";
850  hPullGP_X_tr_stereo[title.str()]->Write();
851  gp_try_stereo->cd();
852  title.str("");
853  title << "PullGP_Y_" << i+1 << "-" << j+1 << "_tr_stereo";
854  hPullGP_Y_tr_stereo[title.str()]->Write();
855  gp_trz_stereo->cd();
856  title.str("");
857  title << "PullGP_Z_" << i+1 << "-" << j+1 << "_tr_stereo";
858  hPullGP_Z_tr_stereo[title.str()]->Write();
859 
860  gp_rs->cd();
861  gp_rsx_stereo->cd();
862  title.str("");
863  title << "PullGP_X_" << i+1 << "-" << j+1 << "_rs_stereo";
864  hPullGP_X_rs_stereo[title.str()]->Write();
865  gp_rsy_stereo->cd();
866  title.str("");
867  title << "PullGP_Y_" << i+1 << "-" << j+1 << "_rs_stereo";
868  hPullGP_Y_rs_stereo[title.str()]->Write();
869  gp_rsz_stereo->cd();
870  title.str("");
871  title << "PullGP_Z_" << i+1 << "-" << j+1 << "_rs_stereo";
872  hPullGP_Z_rs_stereo[title.str()]->Write();
873  }
874  }
875 
876  file->Close();
877 }
std::map< std::string, TH1F * > hPullGP_Z_rs_stereo
int i
Definition: DBlmapReader.cc:9
std::map< std::string, TH1F * > hPullGP_X_ts_mono
std::map< std::string, TH1F * > hPullGM_Y_ts_mono
std::stringstream title
std::map< std::string, TH1F * > hChi2Increment
std::map< std::string, TH1F * > hPullGP_X_rs_mono
std::map< std::string, TH1F * > hPullGM_Z_ts_stereo
std::map< std::string, TH1F * > hPullGP_Y_rs
std::map< std::string, TH1F * > hPullGM_X_ts_mono
std::map< std::string, TH1F * > hPullGP_Z_tr
std::map< std::string, TH1F * > hPullGP_X_ts
std::map< std::string, TH1F * > hPullGP_Y_tr_stereo
std::map< std::string, TH1F * > hPullGP_Z_ts
std::map< std::string, TH1F * > hPullGP_X_rs_stereo
std::map< std::string, TH1F * > hPullGP_Y_rs_mono
std::map< std::string, TH1F * > hPullGM_Y_ts_stereo
TH2F * hChi2_vs_Process
std::map< std::string, TH1F * > hPullGP_Z_rs_mono
TH2F * hChi2_vs_clsize
std::map< std::string, TH1F * > hPullGP_Y_ts_mono
std::map< std::string, TH1F * > hPullGM_Y_ts
std::map< std::string, TH1F * > hPullGP_Z_tr_mono
std::map< std::string, TH1F * > hPullGM_Z_ts
std::map< std::string, TH1F * > hPullGP_X_tr
int j
Definition: DBlmapReader.cc:9
std::map< std::string, TH1F * > hPullGP_Y_rs_stereo
std::map< std::string, TH1F * > hPullGP_Y_tr_mono
std::map< std::string, TH1F * > hPullGP_X_ts_stereo
std::map< std::string, TH1F * > hPullGP_Y_ts
std::map< std::string, TH1F * > hPullGP_Z_ts_stereo
std::map< std::string, TH1F * > hPullGM_Z_ts_mono
std::map< std::string, TH1F * > hPullGP_X_rs
TH1F * hTotChi2Increment
std::map< std::string, TH1F * > hPullGP_X_tr_stereo
std::map< std::string, TH1F * > hPullGP_X_tr_mono
std::map< std::string, TH1F * > hPullGP_Z_tr_stereo
std::map< std::string, TH1F * > hPullGP_Z_rs
std::map< std::string, TH1F * > hPullGP_Y_ts_stereo
std::map< std::string, TH1F * > hPullGP_Z_ts_mono
std::map< std::string, TH1F * > hPullGM_X_ts
std::map< std::string, TH1F * > hPullGM_X_ts_stereo
std::map< std::string, TH1F * > hPullGP_Y_tr
std::pair< LocalPoint, LocalVector > TestSmoothHits::projectHit ( const PSimHit hit,
const StripGeomDetUnit stripDet,
const BoundPlane plane 
)
private

Definition at line 882 of file TestSmoothHits.cc.

References funct::cos(), dir, PSimHit::localDirection(), PSimHit::localPosition(), funct::sin(), StripGeomDetUnit::specificTopology(), StripTopology::strip(), StripTopology::stripAngle(), GeomDet::surface(), Surface::toGlobal(), GloballyPositioned< T >::toLocal(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by analyze().

883 {
884  const StripTopology& topol = stripDet->specificTopology();
885  GlobalPoint globalpos= stripDet->surface().toGlobal(hit.localPosition());
886  LocalPoint localHit = plane.toLocal(globalpos);
887  //track direction
888  LocalVector locdir=hit.localDirection();
889  //rotate track in new frame
890 
891  GlobalVector globaldir= stripDet->surface().toGlobal(locdir);
892  LocalVector dir=plane.toLocal(globaldir);
893  float scale = -localHit.z() / dir.z();
894 
895  LocalPoint projectedPos = localHit + scale*dir;
896 
897  float selfAngle = topol.stripAngle( topol.strip( hit.localPosition()));
898 
899  LocalVector stripDir( sin(selfAngle), cos(selfAngle), 0); // vector along strip in hit frame
900 
901  LocalVector localStripDir( plane.toLocal(stripDet->surface().toGlobal( stripDir)));
902 
903  return std::pair<LocalPoint,LocalVector>( projectedPos, localStripDir);
904 }
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:78
virtual float stripAngle(float strip) const =0
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
virtual float strip(const LocalPoint &) const =0
Local3DPoint localPosition() const
Definition: PSimHit.h:44
LocalPoint toLocal(const GlobalPoint &gp) const
T z() const
Definition: PV3DBase.h:58
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
LocalVector localDirection() const
Obsolete. Same as momentumAtEntry().unit(), for backward compatibility.
Definition: PSimHit.h:52
dbl *** dir
Definition: mlp_gen.cc:35
virtual const BoundPlane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37

Member Data Documentation

std::string TestSmoothHits::builderName
private

Definition at line 69 of file TestSmoothHits.h.

Referenced by beginRun(), and TestSmoothHits().

const edm::ParameterSet TestSmoothHits::conf_
private

Definition at line 63 of file TestSmoothHits.h.

Referenced by TestSmoothHits().

TFile* TestSmoothHits::file
private

Definition at line 82 of file TestSmoothHits.h.

Referenced by beginRun(), and endJob().

edm::ESHandle<TrajectoryFitter> TestSmoothHits::fit
private

Definition at line 79 of file TestSmoothHits.h.

Referenced by analyze(), and beginRun().

std::string TestSmoothHits::fname
private

Definition at line 71 of file TestSmoothHits.h.

Referenced by beginRun(), and TestSmoothHits().

TH2F * TestSmoothHits::hChi2_vs_clsize
private

Definition at line 98 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

TH2F* TestSmoothHits::hChi2_vs_Process
private

Definition at line 98 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hChi2Increment
private

Definition at line 96 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

TrackerHitAssociator* TestSmoothHits::hitAssociator
private

Definition at line 64 of file TestSmoothHits.h.

Referenced by analyze().

std::map<std::string,TH1F*> TestSmoothHits::hPullGM_X_ts
private

Definition at line 87 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hPullGM_X_ts_mono
private

Definition at line 103 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hPullGM_X_ts_stereo
private

Definition at line 116 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hPullGM_Y_ts
private

Definition at line 88 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hPullGM_Y_ts_mono
private

Definition at line 104 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hPullGM_Y_ts_stereo
private

Definition at line 117 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hPullGM_Z_ts
private

Definition at line 89 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hPullGM_Z_ts_mono
private

Definition at line 105 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hPullGM_Z_ts_stereo
private

Definition at line 118 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hPullGP_X_rs
private

Definition at line 90 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hPullGP_X_rs_mono
private

Definition at line 106 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hPullGP_X_rs_stereo
private

Definition at line 119 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hPullGP_X_tr
private

Definition at line 93 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hPullGP_X_tr_mono
private

Definition at line 109 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hPullGP_X_tr_stereo
private

Definition at line 122 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hPullGP_X_ts
private

Definition at line 84 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hPullGP_X_ts_mono
private

Definition at line 100 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hPullGP_X_ts_stereo
private

Definition at line 113 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hPullGP_Y_rs
private

Definition at line 91 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hPullGP_Y_rs_mono
private

Definition at line 107 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hPullGP_Y_rs_stereo
private

Definition at line 120 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hPullGP_Y_tr
private

Definition at line 94 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hPullGP_Y_tr_mono
private

Definition at line 110 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hPullGP_Y_tr_stereo
private

Definition at line 123 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hPullGP_Y_ts
private

Definition at line 85 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hPullGP_Y_ts_mono
private

Definition at line 101 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hPullGP_Y_ts_stereo
private

Definition at line 114 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hPullGP_Z_rs
private

Definition at line 92 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hPullGP_Z_rs_mono
private

Definition at line 108 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hPullGP_Z_rs_stereo
private

Definition at line 121 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hPullGP_Z_tr
private

Definition at line 95 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hPullGP_Z_tr_mono
private

Definition at line 111 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hPullGP_Z_tr_stereo
private

Definition at line 124 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hPullGP_Z_ts
private

Definition at line 86 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hPullGP_Z_ts_mono
private

Definition at line 102 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

std::map<std::string,TH1F*> TestSmoothHits::hPullGP_Z_ts_stereo
private

Definition at line 115 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

TH1F* TestSmoothHits::hTotChi2Increment
private

Definition at line 97 of file TestSmoothHits.h.

Referenced by analyze(), beginRun(), and endJob().

double TestSmoothHits::maxeta
private

Definition at line 66 of file TestSmoothHits.h.

Referenced by analyze(), and TestSmoothHits().

double TestSmoothHits::mineta
private

Definition at line 66 of file TestSmoothHits.h.

Referenced by analyze(), and TestSmoothHits().

std::string TestSmoothHits::propagatorName
private

Definition at line 68 of file TestSmoothHits.h.

Referenced by beginRun(), and TestSmoothHits().

edm::ESHandle<TrajectorySmoother> TestSmoothHits::smooth
private

Definition at line 80 of file TestSmoothHits.h.

Referenced by analyze(), and beginRun().

std::string TestSmoothHits::sname
private

Definition at line 72 of file TestSmoothHits.h.

Referenced by beginRun(), and TestSmoothHits().

std::string TestSmoothHits::srcName
private

Definition at line 70 of file TestSmoothHits.h.

Referenced by analyze(), and TestSmoothHits().

edm::ESHandle<TransientTrackingRecHitBuilder> TestSmoothHits::theBuilder
private

Definition at line 77 of file TestSmoothHits.h.

Referenced by analyze(), and beginRun().

edm::ESHandle<TrackerGeometry> TestSmoothHits::theG
private

Definition at line 74 of file TestSmoothHits.h.

Referenced by analyze(), and beginRun().

edm::ESHandle<MagneticField> TestSmoothHits::theMF
private

Definition at line 75 of file TestSmoothHits.h.

Referenced by analyze(), and beginRun().

edm::ESHandle<Propagator> TestSmoothHits::thePropagator
private

Definition at line 76 of file TestSmoothHits.h.

Referenced by analyze(), and beginRun().

edm::Handle<TrackCandidateCollection> TestSmoothHits::theTCCollection
private

Definition at line 78 of file TestSmoothHits.h.

Referenced by analyze().

std::stringstream TestSmoothHits::title
private