CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
AlignmentMonitorSurvey Class Reference

#include <AlignmentMonitorSurvey.h>

Inheritance diagram for AlignmentMonitorSurvey:
AlignmentMonitorBase

Public Member Functions

 AlignmentMonitorSurvey (const edm::ParameterSet &)
 
virtual void book ()
 Book or retrieve histograms; MUST be reimplemented. More...
 
virtual void event (const edm::Event &, const edm::EventSetup &, const ConstTrajTrackPairCollection &)
 Called for each event (by "run()"): may be reimplemented. More...
 
- Public Member Functions inherited from AlignmentMonitorBase
virtual void afterAlignment (const edm::EventSetup &iSetup)
 
 AlignmentMonitorBase (const edm::ParameterSet &cfg, std::string name)
 Constructor. More...
 
void beginOfJob (AlignableTracker *pTracker, AlignableMuon *pMuon, AlignmentParameterStore *pStore)
 Called at beginning of job: don't reimplement. More...
 
void duringLoop (const edm::Event &iEvent, const edm::EventSetup &iSetup, const ConstTrajTrackPairCollection &iTrajTracks)
 Called for each event: don't reimplement. More...
 
void endOfJob ()
 Called at end of processing: don't implement. More...
 
void endOfLoop (const edm::EventSetup &iSetup)
 Called at end of loop: don't reimplement. More...
 
void startingNewLoop ()
 Called at beginning of loop: don't reimplement. More...
 
virtual ~AlignmentMonitorBase ()
 Destructor. More...
 

Private Attributes

std::vector< align::StructureTypetheLevels
 

Additional Inherited Members

- Public Types inherited from AlignmentMonitorBase
typedef std::pair< const
Trajectory *, const
reco::Track * > 
ConstTrajTrackPair
 
typedef std::vector
< ConstTrajTrackPair
ConstTrajTrackPairCollection
 
- Protected Member Functions inherited from AlignmentMonitorBase
TH1F * book1D (std::string dir, std::string name, std::string title, int nchX, double lowX, double highX)
 
TH2F * book2D (std::string dir, std::string name, std::string title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
 
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")
 
TFileDirectorydirectory (std::string dir)
 
int iteration ()
 
AlignableMuonpMuon ()
 
AlignableNavigatorpNavigator ()
 
AlignmentParameterStorepStore ()
 
AlignableTrackerpTracker ()
 
- Protected Attributes inherited from AlignmentMonitorBase
const edm::InputTag m_beamSpotTag
 

Detailed Description

Definition at line 20 of file AlignmentMonitorSurvey.h.

Constructor & Destructor Documentation

AlignmentMonitorSurvey::AlignmentMonitorSurvey ( const edm::ParameterSet cfg)

Definition at line 7 of file AlignmentMonitorSurvey.cc.

References edm::ParameterSet::getUntrackedParameter(), prof2calltree::l, AlignableObjectId::nameToType(), and theLevels.

8  :AlignmentMonitorBase(cfg, "AlignmentMonitorSurvey")
9 {
10  static AlignableObjectId dummy;
11 
12  const std::vector<std::string>& levels = cfg.getUntrackedParameter< std::vector<std::string> >("surveyResiduals");
13 
14  for (unsigned int l = 0; l < levels.size(); ++l)
15  {
16  theLevels.push_back( dummy.nameToType(levels[l]) );
17  }
18 }
T getUntrackedParameter(std::string const &, T const &) const
std::vector< align::StructureType > theLevels
AlignmentMonitorBase(const edm::ParameterSet &cfg, std::string name)
Constructor.
Allows conversion between type and name, and vice-versa.
align::StructureType nameToType(const std::string &name) const
Convert name to type.

Member Function Documentation

void AlignmentMonitorSurvey::book ( )
virtual

Book or retrieve histograms; MUST be reimplemented.

Implements AlignmentMonitorBase.

Definition at line 20 of file AlignmentMonitorSurvey.cc.

References AlignmentParameterStore::alignables(), cond::ecalcond::all, AlignmentMonitorBase::directory(), i, errorMatrix2Lands_multiChannel::id, Alignable::id(), prof2calltree::l, testEve_cfg::level, TFileDirectory::make(), AlignmentMonitorBase::pStore(), SurveyResidual::sensorResidual(), theLevels, and diffTreeTool::tree.

21 {
22  align::ID id;
24 
25  double par[6]; // survey residual
26 
27  TTree* tree = directory("/iterN/")->make<TTree>("survey", "");
28 
29  tree->Branch("id" , &id , "id/i");
30  tree->Branch("level", &level, "level/I");
31  tree->Branch("par" , &par , "par[6]/D");
32 
33  const align::Alignables& all = pStore()->alignables();
34 
35  const unsigned int nAlignable = all.size();
36 
37  for (unsigned int i = 0; i < nAlignable; ++i)
38  {
39  const Alignable* ali = all[i];
40 
41  id = ali->id();
42 
43  for (unsigned int l = 0; l < theLevels.size(); ++l)
44  {
45  level = theLevels[l];
46 
47  SurveyResidual resid(*ali, level, true);
48  AlgebraicVector resParams = resid.sensorResidual();
49 
50  par[0] = resParams[0];
51  par[1] = resParams[1];
52  par[2] = resParams[2];
53  par[3] = resParams[3];
54  par[4] = resParams[4];
55  par[5] = resParams[5];
56 
57  tree->Fill();
58  }
59  }
60 }
align::ID id() const
Return the ID of Alignable, i.e. DetId of &#39;first&#39; component GeomDet(Unit).
Definition: Alignable.h:180
int i
Definition: DBlmapReader.cc:9
AlignmentParameterStore * pStore()
std::vector< align::StructureType > theLevels
uint32_t ID
Definition: Definitions.h:26
TFileDirectory * directory(std::string dir)
CLHEP::HepVector AlgebraicVector
std::vector< Alignable * > Alignables
Definition: Utilities.h:28
T * make() const
make new ROOT object
tuple level
Definition: testEve_cfg.py:34
const align::Alignables & alignables(void) const
get all alignables
virtual void AlignmentMonitorSurvey::event ( const edm::Event iEvent,
const edm::EventSetup iSetup,
const ConstTrajTrackPairCollection iTrajTracks 
)
inlinevirtual

Called for each event (by "run()"): may be reimplemented.

Reimplemented from AlignmentMonitorBase.

Definition at line 29 of file AlignmentMonitorSurvey.h.

31  {}

Member Data Documentation

std::vector<align::StructureType> AlignmentMonitorSurvey::theLevels
private

Definition at line 35 of file AlignmentMonitorSurvey.h.

Referenced by AlignmentMonitorSurvey(), and book().