CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/Alignment/MuonAlignmentAlgorithms/plugins/CSCOverlapsAlignmentAlgorithm.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Package:    MuonAlignmentAlgorithms
00004 // Class:      CSCOverlapsAlignmentAlgorithm
00005 // 
00013 //
00014 // Original Author:  Jim Pivarski,,,
00015 //         Created:  Tue Oct  7 14:56:49 CDT 2008
00016 // $Id: CSCOverlapsAlignmentAlgorithm.h,v 1.6 2010/09/10 11:56:11 mussgill Exp $
00017 //
00018 //
00019 
00020 #include "Alignment/CommonAlignmentAlgorithm/interface/AlignmentAlgorithmBase.h"
00021 #include "Alignment/CommonAlignmentAlgorithm/interface/AlignmentParameterSelector.h"
00022 #include "Alignment/CommonAlignmentAlgorithm/interface/AlignmentParameterStore.h"
00023 #include "Alignment/CommonAlignment/interface/Alignable.h"  
00024 #include "Alignment/CommonAlignment/interface/AlignableNavigator.h"  
00025 #include "Alignment/CommonAlignment/interface/AlignableObjectId.h"  
00026 #include "Alignment/CommonAlignment/interface/AlignmentParameters.h"
00027 #include "Alignment/MuonAlignment/interface/AlignableMuon.h"
00028 #include "Alignment/TrackerAlignment/interface/AlignableTracker.h"
00029 #include "DataFormats/CLHEP/interface/AlgebraicObjects.h"
00030 #include "DataFormats/GeometrySurface/interface/LocalError.h"
00031 #include "DataFormats/MuonDetId/interface/CSCDetId.h"
00032 #include "DataFormats/MuonDetId/interface/MuonSubdetId.h"
00033 #include "DataFormats/TrackReco/interface/Track.h"
00034 #include "FWCore/Framework/interface/ESHandle.h"
00035 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00036 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00037 #include "Geometry/CSCGeometry/interface/CSCGeometry.h"
00038 #include "Geometry/Records/interface/MuonGeometryRecord.h"
00039 #include "FWCore/ServiceRegistry/interface/Service.h"
00040 #include "CommonTools/UtilAlgos/interface/TFileService.h"
00041 #include "TrackingTools/PatternTools/interface/Trajectory.h"
00042 #include "TrackingTools/TrackRefitter/interface/TrackTransformer.h"
00043 #include "TrackingTools/TransientTrack/interface/TransientTrackBuilder.h"
00044 #include "TrackingTools/Records/interface/TransientTrackRecord.h"
00045 #include "TrackingTools/TransientTrack/interface/TransientTrack.h"
00046 #include "TrackingTools/GeomPropagators/interface/Propagator.h"
00047 #include "TrackingTools/Records/interface/TrackingComponentsRecord.h"
00048 
00049 #include "Alignment/MuonAlignmentAlgorithms/interface/CSCPairConstraint.h"
00050 #include "Alignment/MuonAlignmentAlgorithms/plugins/CSCChamberFitter.h"
00051 #include "Alignment/MuonAlignmentAlgorithms/plugins/CSCAlignmentCorrections.h"
00052 
00053 #include "TH1F.h"
00054 #include "TH2F.h"
00055 #include "TProfile.h"
00056 #include "TStyle.h"
00057 
00058 #include <sstream>
00059 #include <map>
00060 
00061 class CSCOverlapsAlignmentAlgorithm : public AlignmentAlgorithmBase {
00062 public:
00063   CSCOverlapsAlignmentAlgorithm(const edm::ParameterSet& iConfig);
00064   ~CSCOverlapsAlignmentAlgorithm();
00065   
00066   void initialize(const edm::EventSetup& iSetup, AlignableTracker* alignableTracker, AlignableMuon* alignableMuon,
00067                   AlignableExtras* alignableExtras, AlignmentParameterStore* alignmentParameterStore);
00068   void run(const edm::EventSetup& iSetup, const EventInfo &eventInfo);
00069 
00070   void terminate();
00071 
00072   // having to make read-only accessors for all of these would be ridiculous, so they're public
00073   TH1F *m_hitsPerChamber;
00074 
00075   TProfile *m_fiducial_ME11;
00076   TProfile *m_fiducial_ME12;
00077   TProfile *m_fiducial_MEx1;
00078   TProfile *m_fiducial_MEx2;
00079 
00080   TH1F *m_slope;
00081   TH1F *m_slope_MEp4;
00082   TH1F *m_slope_MEp3;
00083   TH1F *m_slope_MEp2;
00084   TH1F *m_slope_MEp1;
00085   TH1F *m_slope_MEm1;
00086   TH1F *m_slope_MEm2;
00087   TH1F *m_slope_MEm3;
00088   TH1F *m_slope_MEm4;
00089 
00090   TH1F *m_slopeResiduals;
00091   TH1F *m_slopeResiduals_weighted;
00092   TH1F *m_slopeResiduals_normalized;
00093   TH1F *m_offsetResiduals;
00094   TH1F *m_offsetResiduals_weighted;
00095   TH1F *m_offsetResiduals_normalized;
00096 
00097   TH1F *m_drdz;
00098 
00099   TH2F *m_occupancy;
00100   TH2F *m_XYpos_mep1;
00101   TH2F *m_XYpos_mep2;
00102   TH2F *m_XYpos_mep3;
00103   TH2F *m_XYpos_mep4;
00104   TH2F *m_XYpos_mem1;
00105   TH2F *m_XYpos_mem2;
00106   TH2F *m_XYpos_mem3;
00107   TH2F *m_XYpos_mem4;
00108   TH2F *m_RPhipos_mep1;
00109   TH2F *m_RPhipos_mep2;
00110   TH2F *m_RPhipos_mep3;
00111   TH2F *m_RPhipos_mep4;
00112   TH2F *m_RPhipos_mem1;
00113   TH2F *m_RPhipos_mem2;
00114   TH2F *m_RPhipos_mem3;
00115   TH2F *m_RPhipos_mem4;
00116 
00117   int m_mode;
00118   int m_minHitsPerChamber;
00119   double m_maxdrdz;
00120   bool m_fiducial;
00121   bool m_useHitWeights;
00122   bool m_slopeFromTrackRefit;
00123   int m_minStationsInTrackRefits;
00124   double m_truncateSlopeResid;
00125   double m_truncateOffsetResid;
00126   bool m_combineME11;
00127   bool m_useTrackWeights;
00128   bool m_errorFromRMS;
00129   int m_minTracksPerOverlap;
00130   bool m_makeHistograms;
00131 
00132 private:
00133   std::string m_mode_string;
00134   std::string m_reportFileName;
00135   double m_minP;
00136   double m_maxRedChi2;
00137   std::string m_writeTemporaryFile;
00138   std::vector<std::string> m_readTemporaryFiles;
00139   bool m_doAlignment;
00140 
00141   AlignmentParameterStore* m_alignmentParameterStore;
00142   std::vector<Alignable*> m_alignables;
00143   AlignableNavigator *m_alignableNavigator;
00144   std::vector<CSCChamberFitter> m_fitters;
00145   std::vector<CSCPairResidualsConstraint*> m_residualsConstraints;
00146   std::map<std::pair<CSCDetId,CSCDetId>,CSCPairResidualsConstraint*> m_quickChamberLookup;
00147 
00148   TrackTransformer *m_trackTransformer;
00149   std::string m_propagatorName;
00150   const Propagator *m_propagatorPointer;
00151 
00152   TH1F *m_histP10;
00153   TH1F *m_histP100;
00154   TH1F *m_histP1000;
00155 };