CMS 3D CMS Logo

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"
40 
41 // forward declarations
42 
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,
62  const edm::EventSetup &iSetup,
63  const ConstTrajTrackPairCollection &iTrajTracks);
64 
66  void endOfLoop();
67 
69  void endOfJob() {}
70 
72 
74  virtual void book() = 0;
75 
77  virtual void event(const edm::Event &iEvent,
78  const edm::EventSetup &iSetup,
79  const ConstTrajTrackPairCollection &iTrajTracks) {}
80 
83  virtual void afterAlignment() {}
84 
85 protected:
89  TH1F *book1D(std::string dir, std::string name, std::string title, int nchX, double lowX, double highX);
90  TProfile *bookProfile(std::string dir,
93  int nchX,
94  double lowX,
95  double highX,
96  int nchY = 1,
97  double lowY = 0.,
98  double highY = 0.,
99  const char *option = "s");
100  TH2F *book2D(std::string dir,
103  int nchX,
104  double lowX,
105  double highX,
106  int nchY,
107  double lowY,
108  double highY);
110 
111  int iteration() { return m_iteration; }
113  AlignableMuon *pMuon() { return mp_muon; }
116 
118 
119 public:
120  AlignmentMonitorBase(const AlignmentMonitorBase &) = delete; // stop default
121  const AlignmentMonitorBase &operator=(const AlignmentMonitorBase &) = delete; // stop default
122 
123 private:
124  // ---------- member data --------------------------------
125 
131 
132  std::map<std::vector<std::string>, TFileDirectory *> m_baseDirMap, m_iterDirMap;
133 };
134 
135 /*** Global typedefs ***/
136 using AlignmentMonitors = std::vector<std::unique_ptr<AlignmentMonitorBase> >;
137 
138 #endif
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
AlignmentMonitorBase::mp_tracker
AlignableTracker * mp_tracker
Definition: AlignmentMonitorBase.h:127
AlignmentMonitorBase::mp_navigator
AlignableNavigator * mp_navigator
Definition: AlignmentMonitorBase.h:130
AlignmentMonitorBase::pTracker
AlignableTracker * pTracker()
Definition: AlignmentMonitorBase.h:112
AlignmentMonitorBase::directory
TFileDirectory * directory(std::string dir)
Definition: AlignmentMonitorBase.cc:73
AlignmentMonitorBase::pStore
AlignmentParameterStore * pStore()
Definition: AlignmentMonitorBase.h:114
AlignmentMonitorBase::event
virtual void event(const edm::Event &iEvent, const edm::EventSetup &iSetup, const ConstTrajTrackPairCollection &iTrajTracks)
Called for each event (by "run()"): may be reimplemented.
Definition: AlignmentMonitorBase.h:77
AlignmentMonitorBase::afterAlignment
virtual void afterAlignment()
Definition: AlignmentMonitorBase.h:83
AlignmentMonitorBase::m_iteration
int m_iteration
Definition: AlignmentMonitorBase.h:126
TFileDirectory
Definition: TFileDirectory.h:24
AlignmentMonitorBase::ConstTrajTrackPair
std::pair< const Trajectory *, const reco::Track * > ConstTrajTrackPair
Definition: AlignmentMonitorBase.h:45
fileinputsource_cfi.option
option
Definition: fileinputsource_cfi.py:94
AlignmentMonitorBase::book2D
TH2F * book2D(std::string dir, std::string name, std::string title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Definition: AlignmentMonitorBase.cc:131
AlignmentMonitorBase::pNavigator
AlignableNavigator * pNavigator()
Definition: AlignmentMonitorBase.h:115
AlignmentMonitorBase::mp_store
AlignmentParameterStore * mp_store
Definition: AlignmentMonitorBase.h:129
TFileDirectory.h
Track.h
AlignmentMonitorBase::operator=
const AlignmentMonitorBase & operator=(const AlignmentMonitorBase &)=delete
AlignmentMonitorBase::duringLoop
void duringLoop(const edm::Event &iEvent, const edm::EventSetup &iSetup, const ConstTrajTrackPairCollection &iTrajTracks)
Called for each event: don't reimplement.
Definition: AlignmentMonitorBase.cc:65
AlignmentMonitorBase::endOfLoop
void endOfLoop()
Called at end of loop: don't reimplement.
Definition: AlignmentMonitorBase.cc:71
AlignableTracker
Definition: AlignableTracker.h:17
AlignableNavigator.h
AlignableNavigator
Definition: AlignableNavigator.h:25
AlignmentParameterStore.h
AlignmentMonitorBase::m_baseDirMap
std::map< std::vector< std::string >, TFileDirectory * > m_baseDirMap
Definition: AlignmentMonitorBase.h:132
edm::ParameterSet
Definition: ParameterSet.h:47
AlignmentMonitorBase::bookProfile
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")
Definition: AlignmentMonitorBase.cc:114
Event.h
AlignmentMonitors
std::vector< std::unique_ptr< AlignmentMonitorBase > > AlignmentMonitors
Definition: AlignmentMonitorBase.h:136
AlignmentMonitorBase::~AlignmentMonitorBase
virtual ~AlignmentMonitorBase()
Destructor.
Definition: AlignmentMonitorBase.h:52
AlignableMuon.h
AlignmentMonitorBase::beginOfJob
void beginOfJob(AlignableTracker *pTracker, AlignableMuon *pMuon, AlignmentParameterStore *pStore)
Called at beginning of job: don't reimplement.
Definition: AlignmentMonitorBase.cc:32
AlignableMuon
Constructor of the full muon geometry.
Definition: AlignableMuon.h:38
AlignmentMonitorBase
Definition: AlignmentMonitorBase.h:43
iEvent
int iEvent
Definition: GenABIO.cc:224
AlignmentMonitorBase::m_beamSpotTag
const edm::InputTag m_beamSpotTag
Definition: AlignmentMonitorBase.h:117
AlignmentMonitorBase::mp_muon
AlignableMuon * mp_muon
Definition: AlignmentMonitorBase.h:128
edm::EventSetup
Definition: EventSetup.h:58
AlignmentMonitorBase::book
virtual void book()=0
Book or retrieve histograms; MUST be reimplemented.
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
looper.cfg
cfg
Definition: looper.py:296
AlignmentMonitorBase::book1D
TH1F * book1D(std::string dir, std::string name, std::string title, int nchX, double lowX, double highX)
Definition: AlignmentMonitorBase.cc:109
Trajectory.h
AlignmentMonitorBase::iteration
int iteration()
Definition: AlignmentMonitorBase.h:111
AlignmentMonitorBase::startingNewLoop
void startingNewLoop()
Called at beginning of loop: don't reimplement.
Definition: AlignmentMonitorBase.cc:47
AlignmentMonitorBase::endOfJob
void endOfJob()
Called at end of processing: don't implement.
Definition: AlignmentMonitorBase.h:69
AlignmentParameterStore
Definition: AlignmentParameterStore.h:23
Frameworkfwd.h
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
AlignmentMonitorBase::ConstTrajTrackPairCollection
std::vector< ConstTrajTrackPair > ConstTrajTrackPairCollection
Definition: AlignmentMonitorBase.h:46
AlignableTracker.h
ConsumesCollector.h
AlignmentMonitorBase::m_iterDirMap
std::map< std::vector< std::string >, TFileDirectory * > m_iterDirMap
Definition: AlignmentMonitorBase.h:132
edm::Event
Definition: Event.h:73
AlignmentMonitorBase::pMuon
AlignableMuon * pMuon()
Definition: AlignmentMonitorBase.h:113
edm::InputTag
Definition: InputTag.h:15
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23
AlignmentMonitorBase::AlignmentMonitorBase
AlignmentMonitorBase(const edm::ParameterSet &cfg, const edm::ConsumesCollector &iC, std::string name)
Constructor.
Definition: AlignmentMonitorBase.cc:20