00001 #ifndef CalibTracker_SiStripLorentzAngle_SiStripCalibLorentzAngle_h 00002 #define CalibTracker_SiStripLorentzAngle_SiStripCalibLorentzAngle_h 00003 00004 #include <string.h> 00005 #include <iostream> 00006 #include <map> 00007 #include "FWCore/Framework/interface/EDAnalyzer.h" 00008 #include "FWCore/Framework/interface/Event.h" 00009 #include "DataFormats/Common/interface/Handle.h" 00010 #include "FWCore/Framework/interface/EventSetup.h" 00011 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00012 #include "CondFormats/SiStripObjects/interface/SiStripLorentzAngle.h" 00013 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" 00014 #include "FWCore/MessageLogger/interface/MessageLogger.h" 00015 #include "DataFormats/DetId/interface/DetId.h" 00016 #include "CommonTools/ConditionDBWriter/interface/ConditionDBWriter.h" 00017 #include "DQMServices/Core/interface/MonitorElement.h" 00018 #include "DQMServices/Core/interface/DQMStore.h" 00019 #include "DataFormats/GeometryVector/interface/GlobalPoint.h" 00020 #include "MagneticField/Engine/interface/MagneticField.h" 00021 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h" 00022 #include <TGraph.h> 00023 #include <TProfile.h> 00024 #include <TStyle.h> 00025 #include <TH1D.h> 00026 #include <TH2D.h> 00027 #include <TF1.h> 00028 #include <TFile.h> 00029 #include <TTree.h> 00030 #include <TGraphErrors.h> 00031 #include <TDirectory.h> 00032 #include "TROOT.h" 00033 #include "Riostream.h" 00034 00035 00036 class SiStripCalibLorentzAngle : public ConditionDBWriter<SiStripLorentzAngle> 00037 { 00038 public: 00039 00040 explicit SiStripCalibLorentzAngle(const edm::ParameterSet& conf); 00041 00042 virtual ~SiStripCalibLorentzAngle(); 00043 00044 SiStripLorentzAngle* getNewObject(); 00045 00046 void algoBeginJob(const edm::EventSetup&); 00047 00048 private: 00049 00050 edm::ESHandle<TrackerGeometry> estracker; 00051 edm::ESHandle<MagneticField> magfield_; 00052 00053 const TrackerGeometry *tracker; 00054 00055 typedef std::map <std::string , TProfile*> ProfileMap; 00056 ProfileMap Profiles; 00057 typedef std::map <std::string , TH1D*> TH1Dmap; 00058 TH1Dmap TH1Ds; 00059 typedef std::map <std::string , TH2D*> TH2Dmap; 00060 TH2Dmap TH2Ds; 00061 std::vector<MonitorElement*> histolist; 00062 00063 TF1 *fitfunc, *fitfunc2IT, *FitFunction2IT, *FitFunction; 00064 00065 float histoEntries, gR, gphi, geta, gz, globalX, globalY, globalZ, muH, theBfield, AsymmParam; 00066 int goodFit, goodFit1IT, badFit, TIB, TOB, Layer, MonoStereo; 00067 const GlobalPoint gposition; 00068 00069 float mean_TIB1, mean_TIB2, mean_TIB3, mean_TIB4, mean_TOB1, mean_TOB2, mean_TOB3, mean_TOB4, mean_TOB5, mean_TOB6; 00070 00071 float hallMobility, meanMobility_TIB, meanMobility_TOB; 00072 00073 bool LayerDB, CalibByMC; 00074 00075 TGraphErrors *TIB_graph, *TOB_graph; 00076 00077 TTree* ModuleTree; 00078 TFile *hFile; 00079 00080 TDirectory *LorentzAngle_Plots, *Rootple, *MuH, *TIB_MuH, *TOB_MuH, *MuH_vs_Phi, *TIB_Phi, *TOB_Phi, *MuH_vs_Eta, *TIB_Eta, *TOB_Eta; 00081 TDirectory *FirstIT_GoodFit_Histos, *TIB_1IT_GoodFit, *TOB_1IT_GoodFit, *SecondIT_GoodFit_Histos, *TIB_2IT_GoodFit, *TOB_2IT_GoodFit, *SecondIT_BadFit_Histos, *TIB_2IT_BadFit, *TOB_2IT_BadFit; 00082 00083 std::map< uint32_t, float> detid_la; 00084 edm::ParameterSet conf_; 00085 00086 }; 00087 00088 00089 #endif