CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_1/src/Alignment/OfflineValidation/interface/TrackerValidationVariables.h

Go to the documentation of this file.
00001 #ifndef TrackerTrackerValidationVariables_h
00002 #define TrackerTrackerValidationVariables_h
00003 
00004 // system include files
00005 #include <vector>
00006 
00007 #include "FWCore/Framework/interface/Event.h"
00008 #include "FWCore/Framework/interface/EventSetup.h"
00009 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00010 #include "FWCore/Framework/interface/ESHandle.h"
00011 
00012 class MagneticField;
00013 class TrackerGeometry;
00014 class Trajectory;
00015 
00016 class TrackerValidationVariables
00017 { 
00018  public:  
00019  
00020   struct AVHitStruct
00021   {
00022   AVHitStruct() : resX(-999.), resY(-999.), resErrX(-999.), resErrY(-999.), resXprime(-999.), resXatTrkY(-999.), resXprimeErr(-999.),  
00023       resYprime(-999.), resYprimeErr(-999.), phi(-999.), eta(-999.),
00024      inside(false), localX(-999.), localY(-999.), localXnorm(-999.), localYnorm(-999.), localAlpha(-999.), localBeta(-999.),
00025       rawDetId(0) {}
00026     float resX;
00027     float resY;
00028     float resErrX;
00029     float resErrY;
00030     float resXprime;
00031     float resXatTrkY;
00032     float resXprimeErr;
00033     float resYprime;
00034     float resYprimeErr;
00035     float phi;
00036     float eta;
00037     bool inside;
00038     float localX;
00039     float localY;
00040     float localXnorm;
00041     float localYnorm;
00042     float localAlpha;    
00043     float localBeta;
00044     uint32_t rawDetId;
00045   };
00046   
00047   struct AVTrackStruct
00048   {
00049   AVTrackStruct() : p(0.), pt(0.), ptError(0.), px(0.), py(0.), pz(0.), eta(0.), phi(0.), kappa(0.),
00050       chi2(0.), chi2Prob(0.), normchi2(0), d0(-999.), dz(-999.), charge(-999), numberOfValidHits(0), numberOfLostHits(0) {};
00051     float p;
00052     float pt;
00053     float ptError;
00054     float px;
00055     float py;
00056     float pz;
00057     float eta;
00058     float phi;
00059     float kappa;
00060     float chi2;
00061     float chi2Prob;
00062     float normchi2;
00063     float d0;
00064     float dz;
00065     int charge;
00066     int numberOfValidHits;
00067     int numberOfLostHits;
00068     std::vector<AVHitStruct> hits;
00069   };
00070 
00071   TrackerValidationVariables();
00072   TrackerValidationVariables(const edm::EventSetup&, const edm::ParameterSet&);
00073   ~TrackerValidationVariables();
00074 
00075   void fillHitQuantities(const Trajectory* trajectory, std::vector<AVHitStruct> & v_avhitout);
00076   void fillTrackQuantities(const edm::Event&, std::vector<AVTrackStruct> & v_avtrackout);
00077 
00078   // need the following method for MonitorTrackResiduals in DQM/TrackerMonitorTrack
00079   void fillHitQuantities(const edm::Event&, std::vector<AVHitStruct> & v_avhitout);
00080 
00081  private:
00082 
00083   const edm::ParameterSet conf_;
00084   edm::ESHandle<TrackerGeometry> tkGeom_;
00085   edm::ESHandle<MagneticField> magneticField_;
00086 };
00087 
00088 #endif