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 #include <TDirectory.h> 00027 00028 class SiStripLAProfileBooker : public edm::EDAnalyzer 00029 { 00030 public: 00031 00032 explicit SiStripLAProfileBooker(const edm::ParameterSet& conf); 00033 00034 ~SiStripLAProfileBooker(); 00035 00036 void beginRun(const edm::EventSetup& c); 00037 00038 void endJob(); 00039 00040 void analyze(const edm::Event& e, const edm::EventSetup& c); 00041 00042 void getlayer(const DetId & detid, std::string &name,unsigned int &layerid); 00043 00044 private: 00045 00046 typedef struct {float thickness; float pitch; LocalVector magfield;} detparameters; 00047 typedef std::map <unsigned int, detparameters*> detparmap; 00048 typedef std::map <unsigned int, MonitorElement*> histomap; 00049 00050 int trackcollsize, trajsize,RunNumber, EventNumber, ClSize, HitCharge, Type, Layer, Wheel, bw_fw, Ext_Int, MonoStereo, ParticleCharge; 00051 float sumx, hit_std_dev, barycenter, TanTrackAngle, TanTrackAngleParallel, SignCorrection, MagField, XGlobal, YGlobal, ZGlobal, Momentum, pt, chi2norm, EtaTrack, PhiTrack; 00052 int nstrip, eventcounter,size, HitNr, hitcounter, hitcounter_2ndloop, worse_double_hit, better_double_hit, HitPerTrack; 00053 int id_detector, TrackCounter, EventCounter; 00054 float thick_detector, pitch_detector; 00055 uint8_t Amplitudes[100]; 00056 00057 TTree *HitsTree, *TrackTree, *EventTree; 00058 TFile* hFile; 00059 00060 TDirectory *Hit_Tree, *Track_Tree, *Event_Tree; 00061 00062 histomap histos; 00063 histomap summaryhisto; 00064 00065 DQMStore* dbe_; 00066 00067 detparmap detmap; 00068 detparmap summarydetmap; 00069 edm::ParameterSet conf_; 00070 std::string treename_; 00071 00072 const TrackerGeometry * tracker; 00073 00074 }; 00075 00076 00077 #endif