00001 #ifndef CalibTracker_SiStripLorentzAngle_SiStripLAProfileBooker_h 00002 #define CalibTracker_SiStripLorentzAngle_SiStripLAProfileBooker_h 00003 00004 #include <map> 00005 00006 #include "FWCore/Framework/interface/EDAnalyzer.h" 00007 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00008 00009 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" 00010 00011 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h" 00012 #include "MagneticField/Engine/interface/MagneticField.h" 00013 00014 #include "DQMServices/Core/interface/MonitorElement.h" 00015 #include "DQMServices/Core/interface/DQMStore.h" 00016 00017 #include "DataFormats/DetId/interface/DetId.h" 00018 #include "DataFormats/GeometryVector/interface/LocalVector.h" 00019 00020 #include "TrackingTools/PatternTools/interface/Trajectory.h" 00021 #include "TrackingTools/PatternTools/interface/TrajTrackAssociation.h" 00022 00023 #include <TTree.h> 00024 #include <TFile.h> 00025 #include <TH1D.h> 00026 00027 class SiStripLAProfileBooker : public edm::EDAnalyzer 00028 { 00029 public: 00030 typedef struct {double chi2; int ndf; double p0; double p1; double p2; double errp0; double errp1; double errp2;} histofit ; 00031 typedef std::map <unsigned int, histofit*> fitmap; 00032 00033 explicit SiStripLAProfileBooker(const edm::ParameterSet& conf); 00034 00035 ~SiStripLAProfileBooker(); 00036 00037 void beginJob(const edm::EventSetup& c); 00038 00039 void endJob(); 00040 00041 void analyze(const edm::Event& e, const edm::EventSetup& c); 00042 00043 void getlayer(const DetId & detid, std::string &name,unsigned int &layerid); 00044 00045 private: 00046 00047 typedef struct {float thickness; float pitch; LocalVector magfield;} detparameters; 00048 typedef std::map <unsigned int, detparameters*> detparmap; 00049 typedef std::map <unsigned int, MonitorElement*> histomap; 00050 00051 int trackcollsize, trajsize,RunNumber, EventNumber, ClSize, HitCharge, Type, Layer, Wheel, bw_fw, Ext_Int, MonoStereo, ParticleCharge; 00052 float sumx, hit_std_dev, barycenter, TanTrackAngle, SignCorrection, MagField, XGlobal, YGlobal, ZGlobal, Momentum, pt, chi2norm, EtaTrack; 00053 int nstrip, eventcounter, trajcounter, size, HitNr, hitcounter, hitcounter_2ndloop, worse_double_hit, better_double_hit, HitPerTrack; 00054 00055 TTree* HitsTree; 00056 TFile* hFile; 00057 00058 histomap histos; 00059 histomap summaryhisto; 00060 00061 DQMStore* dbe_; 00062 00063 detparmap detmap; 00064 detparmap summarydetmap; 00065 fitmap summaryfits; 00066 edm::ParameterSet conf_; 00067 std::string treename_; 00068 00069 const TrackerGeometry * tracker; 00070 00071 }; 00072 00073 00074 #endif