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.10 2009/09/15 17:09:49 pivarski 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  public:
44  typedef std::pair<const Trajectory*, const reco::Track*> ConstTrajTrackPair;
45  typedef std::vector<ConstTrajTrackPair> ConstTrajTrackPairCollection;
46 
48  AlignmentMonitorBase(const edm::ParameterSet &cfg, std::string name);
49 
51  virtual ~AlignmentMonitorBase() {}
52 
55 
57  void startingNewLoop();
58 
60  void duringLoop(const edm::Event &iEvent, const edm::EventSetup &iSetup, const ConstTrajTrackPairCollection &iTrajTracks);
61 
63  void endOfLoop(const edm::EventSetup &iSetup);
64 
66  void endOfJob();
67 
69 
71  virtual void book() = 0;
72 
74  virtual void event(const edm::Event &iEvent, const edm::EventSetup &iSetup, const ConstTrajTrackPairCollection &iTrajTracks) { };
75 
78  virtual void afterAlignment(const edm::EventSetup &iSetup) { };
79 
80  protected:
84  TH1F *book1D(std::string dir, std::string name, std::string title, int nchX, double lowX, double highX);
85  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");
86  TH2F *book2D(std::string dir, std::string name, std::string title, int nchX, double lowX, double highX, int nchY, double lowY, double highY);
87  TFileDirectory *directory(std::string dir);
88 
89  int iteration() { return m_iteration; };
91  AlignableMuon *pMuon() { return mp_muon; };
94 
95  private:
96  AlignmentMonitorBase(const AlignmentMonitorBase&); // stop default
97  const AlignmentMonitorBase& operator=(const AlignmentMonitorBase&); // stop default
98 
99  // ---------- member data --------------------------------
100 
106 
107  std::map<std::vector<std::string>, TFileDirectory*> m_baseDirMap, m_iterDirMap;
108 };
109 
110 
111 #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
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:39