CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules 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 public:
44  typedef std::pair<const Trajectory *, const reco::Track *> ConstTrajTrackPair;
45  typedef std::vector<ConstTrajTrackPair> ConstTrajTrackPairCollection;
46 
49 
51  virtual ~AlignmentMonitorBase() {}
52 
55 
57  void startingNewLoop();
58 
60  void duringLoop(const edm::Event &iEvent,
61  const edm::EventSetup &iSetup,
62  const ConstTrajTrackPairCollection &iTrajTracks);
63 
65  void endOfLoop();
66 
68  void endOfJob() {}
69 
71 
73  virtual void book() = 0;
74 
76  virtual void event(const edm::Event &iEvent,
77  const edm::EventSetup &iSetup,
78  const ConstTrajTrackPairCollection &iTrajTracks) {}
79 
82  virtual void afterAlignment() {}
83 
84 protected:
88  TH1F *book1D(std::string dir, std::string name, std::string title, int nchX, double lowX, double highX);
89  TProfile *bookProfile(std::string dir,
92  int nchX,
93  double lowX,
94  double highX,
95  int nchY = 1,
96  double lowY = 0.,
97  double highY = 0.,
98  const char *option = "s");
99  TH2F *book2D(std::string dir,
102  int nchX,
103  double lowX,
104  double highX,
105  int nchY,
106  double lowY,
107  double highY);
109 
110  int iteration() { return m_iteration; }
112  AlignableMuon *pMuon() { return mp_muon; }
115 
117 
118 private:
119  AlignmentMonitorBase(const AlignmentMonitorBase &) = delete; // stop default
120  const AlignmentMonitorBase &operator=(const AlignmentMonitorBase &) = delete; // stop default
121 
122  // ---------- member data --------------------------------
123 
129 
130  std::map<std::vector<std::string>, TFileDirectory *> m_baseDirMap, m_iterDirMap;
131 };
132 
133 /*** Global typedefs ***/
134 using AlignmentMonitors = std::vector<std::unique_ptr<AlignmentMonitorBase> >;
135 
136 #endif
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
AlignmentMonitorBase::mp_tracker
AlignableTracker * mp_tracker
Definition: AlignmentMonitorBase.h:125
AlignmentMonitorBase::AlignmentMonitorBase
AlignmentMonitorBase(const edm::ParameterSet &cfg, std::string name)
Constructor.
Definition: AlignmentMonitorBase.cc:20
AlignmentMonitorBase::mp_navigator
AlignableNavigator * mp_navigator
Definition: AlignmentMonitorBase.h:128
AlignmentMonitorBase::pTracker
AlignableTracker * pTracker()
Definition: AlignmentMonitorBase.h:111
AlignmentMonitorBase::directory
TFileDirectory * directory(std::string dir)
Definition: AlignmentMonitorBase.cc:71
AlignmentMonitorBase::pStore
AlignmentParameterStore * pStore()
Definition: AlignmentMonitorBase.h:113
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:76
AlignmentMonitorBase::afterAlignment
virtual void afterAlignment()
Definition: AlignmentMonitorBase.h:82
AlignmentMonitorBase::m_iteration
int m_iteration
Definition: AlignmentMonitorBase.h:124
TFileDirectory
Definition: TFileDirectory.h:24
AlignmentMonitorBase::ConstTrajTrackPair
std::pair< const Trajectory *, const reco::Track * > ConstTrajTrackPair
Definition: AlignmentMonitorBase.h:44
fileinputsource_cfi.option
option
Definition: fileinputsource_cfi.py:87
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:129
AlignmentMonitorBase::pNavigator
AlignableNavigator * pNavigator()
Definition: AlignmentMonitorBase.h:114
AlignmentMonitorBase::mp_store
AlignmentParameterStore * mp_store
Definition: AlignmentMonitorBase.h:127
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:63
AlignmentMonitorBase::endOfLoop
void endOfLoop()
Called at end of loop: don't reimplement.
Definition: AlignmentMonitorBase.cc:69
AlignableTracker
Definition: AlignableTracker.h:17
AlignableNavigator.h
AlignableNavigator
Definition: AlignableNavigator.h:25
AlignmentParameterStore.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
AlignmentMonitorBase::m_baseDirMap
std::map< std::vector< std::string >, TFileDirectory * > m_baseDirMap
Definition: AlignmentMonitorBase.h:130
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:112
Event.h
AlignmentMonitors
std::vector< std::unique_ptr< AlignmentMonitorBase > > AlignmentMonitors
Definition: AlignmentMonitorBase.h:134
AlignmentMonitorBase::~AlignmentMonitorBase
virtual ~AlignmentMonitorBase()
Destructor.
Definition: AlignmentMonitorBase.h:51
AlignableMuon.h
AlignmentMonitorBase::beginOfJob
void beginOfJob(AlignableTracker *pTracker, AlignableMuon *pMuon, AlignmentParameterStore *pStore)
Called at beginning of job: don't reimplement.
Definition: AlignmentMonitorBase.cc:30
AlignableMuon
Constructor of the full muon geometry.
Definition: AlignableMuon.h:33
AlignmentMonitorBase
Definition: AlignmentMonitorBase.h:42
iEvent
int iEvent
Definition: GenABIO.cc:224
AlignmentMonitorBase::m_beamSpotTag
const edm::InputTag m_beamSpotTag
Definition: AlignmentMonitorBase.h:116
AlignmentMonitorBase::mp_muon
AlignableMuon * mp_muon
Definition: AlignmentMonitorBase.h:126
edm::EventSetup
Definition: EventSetup.h:57
AlignmentMonitorBase::book
virtual void book()=0
Book or retrieve histograms; MUST be reimplemented.
looper.cfg
cfg
Definition: looper.py:297
AlignmentMonitorBase::book1D
TH1F * book1D(std::string dir, std::string name, std::string title, int nchX, double lowX, double highX)
Definition: AlignmentMonitorBase.cc:107
Trajectory.h
AlignmentMonitorBase::iteration
int iteration()
Definition: AlignmentMonitorBase.h:110
AlignmentMonitorBase::startingNewLoop
void startingNewLoop()
Called at beginning of loop: don't reimplement.
Definition: AlignmentMonitorBase.cc:45
AlignmentMonitorBase::endOfJob
void endOfJob()
Called at end of processing: don't implement.
Definition: AlignmentMonitorBase.h:68
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:45
AlignableTracker.h
AlignmentMonitorBase::m_iterDirMap
std::map< std::vector< std::string >, TFileDirectory * > m_iterDirMap
Definition: AlignmentMonitorBase.h:130
edm::Event
Definition: Event.h:73
AlignmentMonitorBase::pMuon
AlignableMuon * pMuon()
Definition: AlignmentMonitorBase.h:112
edm::InputTag
Definition: InputTag.h:15
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23