CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
AlignmentMonitorBase.h
Go to the documentation of this file.
1 #ifndef CommonAlignmentMonitor_AlignmentMonitorBase_h
2 #define CommonAlignmentMonitor_AlignmentMonitorBase_h
3 // -*- C++ -*-
4 //
5 // Package: CommonAlignmentMonitor
6 // Class : AlignmentMonitorBase
7 //
16 //
17 // Original Author: Jim Pivarski
18 // Created: Fri Mar 30 12:21:02 CDT 2007
19 // $Id: AlignmentMonitorBase.h,v 1.11 2010/01/06 15:23:09 mussgill Exp $
20 //
21 
22 // system include files
23 
32 
33 // user include files
35 #include "TH1F.h"
36 #include "TH2F.h"
37 #include "TProfile.h"
38 #include "TTree.h"
39 
40 // forward declarations
41 
43 {
44  public:
45  typedef std::pair<const Trajectory*, const reco::Track*> ConstTrajTrackPair;
46  typedef std::vector<ConstTrajTrackPair> ConstTrajTrackPairCollection;
47 
50 
52  virtual ~AlignmentMonitorBase() {}
53 
56 
58  void startingNewLoop();
59 
61  void duringLoop(const edm::Event &iEvent, const edm::EventSetup &iSetup, const ConstTrajTrackPairCollection &iTrajTracks);
62 
64  void endOfLoop(const edm::EventSetup &iSetup);
65 
67  void endOfJob() {}
68 
70 
72  virtual void book() = 0;
73 
75  virtual void event(const edm::Event &iEvent, const edm::EventSetup &iSetup, const ConstTrajTrackPairCollection &iTrajTracks) { }
76 
79  virtual void afterAlignment(const edm::EventSetup &iSetup) { }
80 
81  protected:
85  TH1F *book1D(std::string dir, std::string name, std::string title, int nchX, double lowX, double highX);
86  TProfile *bookProfile(std::string dir, std::string name, std::string title, int nchX, double lowX, double highX, int nchY=1, double lowY=0., double highY=0., const char *option="s");
87  TH2F *book2D(std::string dir, std::string name, std::string title, int nchX, double lowX, double highX, int nchY, double lowY, double highY);
89 
90  int iteration() { return m_iteration; }
92  AlignableMuon *pMuon() { return mp_muon; }
95 
97 
98  private:
99  AlignmentMonitorBase(const AlignmentMonitorBase&); // stop default
100  const AlignmentMonitorBase& operator=(const AlignmentMonitorBase&); // stop default
101 
102  // ---------- member data --------------------------------
103 
109 
110  std::map<std::vector<std::string>, TFileDirectory*> m_baseDirMap, m_iterDirMap;
111 };
112 
113 
114 #endif
AlignableMuon * pMuon()
AlignableNavigator * pNavigator()
const AlignmentMonitorBase & operator=(const AlignmentMonitorBase &)
AlignmentParameterStore * pStore()
std::map< std::vector< std::string >, TFileDirectory * > m_baseDirMap
virtual void event(const edm::Event &iEvent, const edm::EventSetup &iSetup, const ConstTrajTrackPairCollection &iTrajTracks)
Called for each event (by &quot;run()&quot;): may be reimplemented.
TH2F * book2D(std::string dir, std::string name, std::string title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
std::map< std::vector< std::string >, TFileDirectory * > m_iterDirMap
AlignmentParameterStore * mp_store
AlignmentMonitorBase(const edm::ParameterSet &cfg, std::string name)
Constructor.
AlignableTracker * pTracker()
TProfile * bookProfile(std::string dir, std::string name, std::string title, int nchX, double lowX, double highX, int nchY=1, double lowY=0., double highY=0., const char *option="s")
TFileDirectory * directory(std::string dir)
std::pair< const Trajectory *, const reco::Track * > ConstTrajTrackPair
int iEvent
Definition: GenABIO.cc:243
virtual ~AlignmentMonitorBase()
Destructor.
void endOfJob()
Called at end of processing: don&#39;t implement.
std::vector< ConstTrajTrackPair > ConstTrajTrackPairCollection
const edm::InputTag m_beamSpotTag
TH1F * book1D(std::string dir, std::string name, std::string title, int nchX, double lowX, double highX)
AlignableTracker * mp_tracker
void beginOfJob(AlignableTracker *pTracker, AlignableMuon *pMuon, AlignmentParameterStore *pStore)
Called at beginning of job: don&#39;t reimplement.
AlignableNavigator * mp_navigator
void startingNewLoop()
Called at beginning of loop: don&#39;t reimplement.
void endOfLoop(const edm::EventSetup &iSetup)
Called at end of loop: don&#39;t reimplement.
void duringLoop(const edm::Event &iEvent, const edm::EventSetup &iSetup, const ConstTrajTrackPairCollection &iTrajTracks)
Called for each event: don&#39;t reimplement.
virtual void afterAlignment(const edm::EventSetup &iSetup)
virtual void book()=0
Book or retrieve histograms; MUST be reimplemented.
dbl *** dir
Definition: mlp_gen.cc:35
Constructor of the full muon geometry.
Definition: AlignableMuon.h:36