CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
MuonAlignment Class Reference

#include <MuonAlignment.h>

Inheritance diagram for MuonAlignment:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 Get the analysis. More...
 
void beginJob () override
 Inizialize parameters for histo binning. More...
 
void copyAlignmentToSurvey (double shiftErr, double angleErr)
 
void copySurveyToAlignment ()
 
void endJob (void) override
 Save the histos. More...
 
void fillGapsInSurvey (double shiftErr, double angleErr)
 
AlignableMuongetAlignableMuon ()
 
AlignableNavigatorgetAlignableNavigator ()
 
void moveAlignableGlobalCoord (DetId &, align::Scalars &, align::Scalars &)
 
void moveAlignableLocalCoord (DetId &, align::Scalars &, align::Scalars &)
 
 MuonAlignment (const edm::EventSetup &iSetup)
 
 MuonAlignment (const edm::EventSetup &iSetup, const MuonAlignmentInputMethod &input)
 
 MuonAlignment (const edm::ParameterSet &)
 Constructor. More...
 
void recursiveList (const align::Alignables &alignables, align::Alignables &theList)
 
void recursiveMap (const align::Alignables &alignables, std::map< align::ID, Alignable * > &theMap)
 
void recursiveStructureMap (const align::Alignables &alignables, std::map< std::pair< align::StructureType, align::ID >, Alignable * > &theMap)
 
void saveCSCSurveyToDB ()
 
void saveCSCtoDB ()
 
void saveDTSurveyToDB ()
 
void saveDTtoDB ()
 
void saveSurveyToDB ()
 
void saveToDB ()
 
void writeXML (const edm::ParameterSet &iConfig, const edm::EventSetup &iSetup)
 
 ~MuonAlignment ()
 
 ~MuonAlignment () override
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

RecHitVector doMatching (const reco::Track &, edm::Handle< DTRecSegment4DCollection > &, edm::Handle< CSCSegmentCollection > &, intDVector *, intDVector *, edm::ESHandle< GlobalTrackingGeometry > &)
 
void init ()
 
void recursiveCopySurveyToAlignment (Alignable *alignable)
 

Private Attributes

DQMStoredbe
 
align::Scalars displacements
 
bool doCSC
 
bool doDT
 
bool doSummary
 
MonitorElementhLocalAngleCSC
 
MonitorElementhLocalAngleDT
 
MonitorElementhLocalAngleRmsCSC
 
MonitorElementhLocalAngleRmsDT
 
MonitorElementhLocalPhiMeanCSC
 
MonitorElementhLocalPhiMeanDT
 
MonitorElementhLocalPhiRmsCSC
 
MonitorElementhLocalPhiRmsDT
 
MonitorElementhLocalPositionCSC
 
MonitorElementhLocalPositionDT
 
MonitorElementhLocalPositionRmsCSC
 
MonitorElementhLocalPositionRmsDT
 
MonitorElementhLocalThetaMeanCSC
 
MonitorElementhLocalThetaMeanDT
 
MonitorElementhLocalThetaRmsCSC
 
MonitorElementhLocalThetaRmsDT
 
MonitorElementhLocalXMeanCSC
 
MonitorElementhLocalXMeanDT
 
MonitorElementhLocalXRmsCSC
 
MonitorElementhLocalXRmsDT
 
MonitorElementhLocalYMeanCSC
 
MonitorElementhLocalYMeanDT
 
MonitorElementhLocalYRmsCSC
 
MonitorElementhLocalYRmsDT
 
double meanAngleRange
 
double meanPositionRange
 
std::string MEFolderName
 
std::string metname
 
unsigned int min1DTrackRecHitSize
 
unsigned int min4DTrackSegmentSize
 
unsigned int nbins
 
int numberOfHits
 
int numberOfTracks
 
edm::ParameterSet parameters
 
double resLocalXRangeStation1
 
double resLocalXRangeStation2
 
double resLocalXRangeStation3
 
double resLocalXRangeStation4
 
double resLocalYRangeStation1
 
double resLocalYRangeStation2
 
double resLocalYRangeStation3
 
double resLocalYRangeStation4
 
double resPhiRange
 
double resThetaRange
 
double rmsAngleRange
 
double rmsPositionRange
 
align::Scalars rotations
 
AlignableMuontheAlignableMuon
 
AlignableNavigatortheAlignableNavigator
 
std::string theCSCAlignRecordName
 
std::string theCSCErrorRecordName
 
std::string theCSCSurveyErrorRecordName
 
std::string theCSCSurveyRecordName
 
std::string theDTAlignRecordName
 
std::string theDTErrorRecordName
 
std::string theDTSurveyErrorRecordName
 
std::string theDTSurveyRecordName
 
edm::EDGetTokenT< reco::TrackCollectiontheMuonCollectionLabel
 
edm::EDGetTokenT< CSCSegmentCollectiontheRecHits4DTagCSC
 
edm::EDGetTokenT< DTRecSegment4DCollectiontheRecHits4DTagDT
 
std::stringstream topFolder
 
std::string trackRefitterType
 
std::vector< MonitorElement * > unitsLocalPhi
 
std::vector< MonitorElement * > unitsLocalTheta
 
std::vector< MonitorElement * > unitsLocalX
 
std::vector< MonitorElement * > unitsLocalY
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

The MuonAlignment helper class for alignment jobs

Date
2011/06/07 19:28:47
Revision
1.14
Author
Andre Sznajder - UERJ(Brazil)

DQM muon alignment analysis monitoring

Author
J. Fernandez - Univ. Oviedo Javie.nosp@m.r.Fe.nosp@m.rnand.nosp@m.ez@c.nosp@m.ern.c.nosp@m.h

Definition at line 20 of file MuonAlignment.h.

Constructor & Destructor Documentation

MuonAlignment::MuonAlignment ( const edm::EventSetup iSetup)

Definition at line 45 of file MuonAlignment.cc.

References align::AlignableMuon, edm::EventSetup::get(), init(), theAlignableMuon, and theAlignableNavigator.

46 {
47  init();
48 
49  edm::ESHandle<DTGeometry> dtGeometry;
50  edm::ESHandle<CSCGeometry> cscGeometry;
51  iSetup.get<MuonGeometryRecord>().get( dtGeometry );
52  iSetup.get<MuonGeometryRecord>().get( cscGeometry );
53 
54  theAlignableMuon = new AlignableMuon( &(*dtGeometry) , &(*cscGeometry) );
56 }
AlignableNavigator * theAlignableNavigator
Definition: MuonAlignment.h:72
AlignableMuon * theAlignableMuon
Definition: MuonAlignment.h:70
T get() const
Definition: EventSetup.h:71
MuonAlignment::MuonAlignment ( const edm::EventSetup iSetup,
const MuonAlignmentInputMethod input 
)

Definition at line 58 of file MuonAlignment.cc.

References init(), MuonAlignmentInputMethod::newAlignableMuon(), theAlignableMuon, and theAlignableNavigator.

59 {
60  init();
61 
62  theAlignableMuon = input.newAlignableMuon( iSetup );
64 }
AlignableNavigator * theAlignableNavigator
Definition: MuonAlignment.h:72
AlignableMuon * theAlignableMuon
Definition: MuonAlignment.h:70
virtual AlignableMuon * newAlignableMuon(const edm::EventSetup &iSetup) const
MuonAlignment::~MuonAlignment ( )
inline

Definition at line 28 of file MuonAlignment.h.

References theAlignableMuon, and theAlignableNavigator.

Referenced by MuonAlignment().

28 { delete theAlignableMuon; delete theAlignableNavigator; }
AlignableNavigator * theAlignableNavigator
Definition: MuonAlignment.h:72
AlignableMuon * theAlignableMuon
Definition: MuonAlignment.h:70
MuonAlignment::MuonAlignment ( const edm::ParameterSet pSet)

Constructor.

Definition at line 10 of file MuonAlignment.cc.

References doCSC, doDT, doSummary, LogTrace, meanAngleRange, meanPositionRange, MEFolderName, metname, min1DTrackRecHitSize, min4DTrackSegmentSize, nbins, numberOfHits, numberOfTracks, resLocalXRangeStation1, resLocalXRangeStation2, resLocalXRangeStation3, resLocalXRangeStation4, resLocalYRangeStation1, resLocalYRangeStation2, resLocalYRangeStation3, resLocalYRangeStation4, resPhiRange, resThetaRange, rmsAngleRange, rmsPositionRange, AlCaHLTBitMon_QueryRunRegistry::string, theMuonCollectionLabel, theRecHits4DTagCSC, theRecHits4DTagDT, topFolder, and ~MuonAlignment().

10  {
11  metname = "MuonAlignment";
12 
13  LogTrace(metname) << "[MuonAlignment] Constructor called!" << std::endl;
14 
15  parameters = pSet;
16 
17  theMuonCollectionLabel = consumes<reco::TrackCollection>(parameters.getParameter<edm::InputTag>("MuonCollection"));
18 
20  consumes<DTRecSegment4DCollection>(parameters.getParameter<edm::InputTag>("RecHits4DDTCollectionTag"));
22  consumes<CSCSegmentCollection>(parameters.getParameter<edm::InputTag>("RecHits4DCSCCollectionTag"));
23 
24  resLocalXRangeStation1 = parameters.getUntrackedParameter<double>("resLocalXRangeStation1");
25  resLocalXRangeStation2 = parameters.getUntrackedParameter<double>("resLocalXRangeStation2");
26  resLocalXRangeStation3 = parameters.getUntrackedParameter<double>("resLocalXRangeStation3");
27  resLocalXRangeStation4 = parameters.getUntrackedParameter<double>("resLocalXRangeStation4");
28  resLocalYRangeStation1 = parameters.getUntrackedParameter<double>("resLocalYRangeStation1");
29  resLocalYRangeStation2 = parameters.getUntrackedParameter<double>("resLocalYRangeStation2");
30  resLocalYRangeStation3 = parameters.getUntrackedParameter<double>("resLocalYRangeStation3");
31  resLocalYRangeStation4 = parameters.getUntrackedParameter<double>("resLocalYRangeStation4");
32  resPhiRange = parameters.getUntrackedParameter<double>("resPhiRange");
33  resThetaRange = parameters.getUntrackedParameter<double>("resThetaRange");
34 
35  meanPositionRange = parameters.getUntrackedParameter<double>("meanPositionRange");
36  rmsPositionRange = parameters.getUntrackedParameter<double>("rmsPositionRange");
37  meanAngleRange = parameters.getUntrackedParameter<double>("meanAngleRange");
38  rmsAngleRange = parameters.getUntrackedParameter<double>("rmsAngleRange");
39 
40  nbins = parameters.getUntrackedParameter<unsigned int>("nbins");
41  min1DTrackRecHitSize = parameters.getUntrackedParameter<unsigned int>("min1DTrackRecHitSize");
42  min4DTrackSegmentSize = parameters.getUntrackedParameter<unsigned int>("min4DTrackSegmentSize");
43 
44  doDT = parameters.getUntrackedParameter<bool>("doDT");
45  doCSC = parameters.getUntrackedParameter<bool>("doCSC");
46  doSummary = parameters.getUntrackedParameter<bool>("doSummary");
47 
48  numberOfTracks = 0;
49  numberOfHits = 0;
50 
51  MEFolderName = parameters.getParameter<std::string>("FolderName");
52  topFolder << MEFolderName + "/Alignment/Muon";
53 }
edm::EDGetTokenT< CSCSegmentCollection > theRecHits4DTagCSC
double resLocalYRangeStation2
double resLocalXRangeStation1
double resLocalYRangeStation1
double resPhiRange
edm::EDGetTokenT< reco::TrackCollection > theMuonCollectionLabel
double meanAngleRange
double resThetaRange
std::string MEFolderName
double resLocalXRangeStation2
std::string metname
#define LogTrace(id)
unsigned int nbins
double rmsPositionRange
double rmsAngleRange
edm::EDGetTokenT< DTRecSegment4DCollection > theRecHits4DTagDT
double resLocalYRangeStation3
unsigned int min1DTrackRecHitSize
double resLocalYRangeStation4
double meanPositionRange
unsigned int min4DTrackSegmentSize
std::stringstream topFolder
double resLocalXRangeStation4
double resLocalXRangeStation3
MuonAlignment::~MuonAlignment ( )
override

Destructor.

Member Function Documentation

void MuonAlignment::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Get the analysis.

Definition at line 306 of file MuonAlignment.cc.

References relativeConstraints::chamber, CSCDetId::chamber(), doCSC, doDT, doMatching(), CSCDetId::endcap(), makeMuonMisalignmentScenario::endcap, TrajectoryStateOnSurface::freeState(), edm::EventSetup::get(), edm::Event::getByToken(), getName(), TrajectoryStateOnSurface::globalPosition(), TrajectoryStateOnSurface::hasError(), mps_fire::i, GlobalTrackingGeometry::idToDet(), reco::TransientTrack::innermostMeasurementState(), TrajectoryStateOnSurface::isValid(), TrajectoryStateOnSurface::localDirection(), TrajectoryStateOnSurface::localPosition(), LogTrace, metname, min1DTrackRecHitSize, min4DTrackSegmentSize, metsig::muon, extraflags_cff::muons, numberOfHits, numberOfTracks, reco::TransientTrack::outermostMeasurementState(), PV3DBase< T, PVType, FrameType >::perp(), position, edm::ESHandle< T >::product(), Propagator::propagate(), relativeConstraints::ring, CSCDetId::ring(), DTChamberId::sector(), DTChamberId::station(), relativeConstraints::station, CSCDetId::station(), AlCaHLTBitMon_QueryRunRegistry::string, DetId::subdetId(), GeomDet::surface(), theMuonCollectionLabel, theRecHits4DTagCSC, theRecHits4DTagDT, trackRefitterType, unitsLocalPhi, unitsLocalTheta, unitsLocalX, unitsLocalY, DTChamberId::wheel(), makeMuonMisalignmentScenario::wheel, x, PV3DBase< T, PVType, FrameType >::x(), y, PV3DBase< T, PVType, FrameType >::y(), z, and PV3DBase< T, PVType, FrameType >::z().

306  {
307  LogTrace(metname) << "[MuonAlignment] Analysis of event # ";
308 
309  edm::ESHandle<MagneticField> theMGField;
310  iSetup.get<IdealMagneticFieldRecord>().get(theMGField);
311 
312  edm::ESHandle<GlobalTrackingGeometry> theTrackingGeometry;
313  iSetup.get<GlobalTrackingGeometryRecord>().get(theTrackingGeometry);
314 
315  edm::ESHandle<Propagator> thePropagatorOpp;
316  iSetup.get<TrackingComponentsRecord>().get("SmartPropagatorOpposite", thePropagatorOpp);
317 
318  edm::ESHandle<Propagator> thePropagatorAlo;
319  iSetup.get<TrackingComponentsRecord>().get("SmartPropagator", thePropagatorAlo);
320 
321  // edm::ESHandle<Propagator> thePropagator;
322  // iSetup.get<TrackingComponentsRecord>().get(
323  // "SmartPropagatorAnyOpposite", thePropagator );
324 
325  // Get the RecoMuons collection from the event
327  iEvent.getByToken(theMuonCollectionLabel, muons);
328 
329  // Get the 4D DTSegments
331  iEvent.getByToken(theRecHits4DTagDT, all4DSegmentsDT);
333 
334  // Get the 4D CSCSegments
335  edm::Handle<CSCSegmentCollection> all4DSegmentsCSC;
336  iEvent.getByToken(theRecHits4DTagCSC, all4DSegmentsCSC);
338 
339  // Vectors used to perform the matching between Segments and hits from Track
340  intDVector indexCollectionDT;
341  intDVector indexCollectionCSC;
342 
343  // thePropagator = new SteppingHelixPropagator(&*theMGField,
344  // alongMomentum);
345 
346  int countTracks = 0;
347  reco::TrackCollection::const_iterator muon;
348  for (muon = muons->begin(); muon != muons->end(); ++muon) {
349  // if(muon->isGlobalMuon()){
350  // if(muon->isStandAloneMuon()){
351 
352  int countPoints = 0;
353 
354  // reco::TrackRef trackTR = muon->innerTrack();
355  // reco::TrackRef trackSA = muon->outerTrack();
356  // reco::TrackRef trackSA = muon;
357 
358  if (muon->recHitsSize() > (min1DTrackRecHitSize - 1)) {
359  // reco::TransientTrack tTrackTR( *trackTR, &*theMGField,
360  // theTrackingGeometry );
361  reco::TransientTrack tTrackSA(*muon, &*theMGField, theTrackingGeometry);
362 
363  // Adapted code for muonCosmics
364 
365  Double_t innerPerpSA = tTrackSA.innermostMeasurementState().globalPosition().perp();
366  Double_t outerPerpSA = tTrackSA.outermostMeasurementState().globalPosition().perp();
367 
368  TrajectoryStateOnSurface innerTSOS = tTrackSA.outermostMeasurementState();
369  // PropagationDirection propagationDir=alongMomentum;
370  const Propagator *thePropagator;
371 
372  // Define which kind of reco track is used
373  if ((outerPerpSA - innerPerpSA) > 0) {
374  trackRefitterType = "LHCLike";
375  innerTSOS = tTrackSA.innermostMeasurementState();
376  thePropagator = thePropagatorAlo.product();
377  // propagationDir = alongMomentum;
378 
379  } else { // if ((outerPerpSA-innerPerpSA) < 0 ) {
380 
381  trackRefitterType = "CosmicLike";
382  innerTSOS = tTrackSA.outermostMeasurementState();
383  thePropagator = thePropagatorOpp.product();
384  // propagationDir = oppositeToMomentum;
385  }
386 
387  RecHitVector my4DTrack = this->doMatching(
388  *muon, all4DSegmentsDT, all4DSegmentsCSC, &indexCollectionDT, &indexCollectionCSC, theTrackingGeometry);
389 
390  // cut in number of segments
391  if (my4DTrack.size() > (min4DTrackSegmentSize - 1)) {
392  // start propagation
393  // TrajectoryStateOnSurface innerTSOS = track.impactPointState();
394  // TrajectoryStateOnSurface innerTSOS =
395  // track.innermostMeasurementState();
396 
397  // If the state is valid
398  if (innerTSOS.isValid()) {
399  // Loop over Associated segments
400  for (RecHitVector::iterator rechit = my4DTrack.begin(); rechit != my4DTrack.end(); ++rechit) {
401  const GeomDet *geomDet = theTrackingGeometry->idToDet((*rechit)->geographicalId());
402  // Otherwise the propagator could throw an exception
403  const Plane *pDest = dynamic_cast<const Plane *>(&geomDet->surface());
404  const Cylinder *cDest = dynamic_cast<const Cylinder *>(&geomDet->surface());
405 
406  if (pDest != nullptr || cDest != nullptr) {
407  // Propagator
408  //*updatePropagator=thePropagator->clone();
409  // updatePropagator->setPropagationDirection(propagationDir);
410  TrajectoryStateOnSurface destiny = thePropagator->propagate(*(innerTSOS.freeState()), geomDet->surface());
411 
412  if (!destiny.isValid() || !destiny.hasError())
413  continue;
414 
415  const long rawId = (*rechit)->geographicalId().rawId();
416  int position = -1;
417 
418  DetId myDet(rawId);
419  int det = myDet.subdetId();
420  int wheel = 0, station = 0, sector = 0;
421  int endcap = 0, ring = 0, chamber = 0;
422  bool goAhead = (det == 1 && doDT) || (det == 2 && doCSC);
423 
424  double residualLocalX = 0, residualLocalPhi = 0, residualLocalY = 0, residualLocalTheta = 0;
425 
426  // Fill generic histograms
427  // If it's a DT
428  if (det == 1 && doDT) {
429  DTChamberId myChamber(rawId);
430  wheel = myChamber.wheel();
431  station = myChamber.station();
432  sector = myChamber.sector();
433 
434  residualLocalX = (*rechit)->localPosition().x() - destiny.localPosition().x();
435 
436  residualLocalPhi = atan2(((RecSegment *)(*rechit))->localDirection().z(),
437  ((RecSegment *)(*rechit))->localDirection().x()) -
438  atan2(destiny.localDirection().z(), destiny.localDirection().x());
439  if (station != 4) {
440  residualLocalY = (*rechit)->localPosition().y() - destiny.localPosition().y();
441 
442  residualLocalTheta = atan2(((RecSegment *)(*rechit))->localDirection().z(),
443  ((RecSegment *)(*rechit))->localDirection().y()) -
444  atan2(destiny.localDirection().z(), destiny.localDirection().y());
445  }
446 
447  } else if (det == 2 && doCSC) {
448  CSCDetId myChamber(rawId);
449  endcap = myChamber.endcap();
450  station = myChamber.station();
451  if (endcap == 2)
452  station = -station;
453  ring = myChamber.ring();
454  chamber = myChamber.chamber();
455 
456  residualLocalX = (*rechit)->localPosition().x() - destiny.localPosition().x();
457 
458  residualLocalY = (*rechit)->localPosition().y() - destiny.localPosition().y();
459 
460  residualLocalPhi = atan2(((RecSegment *)(*rechit))->localDirection().y(),
461  ((RecSegment *)(*rechit))->localDirection().x()) -
462  atan2(destiny.localDirection().y(), destiny.localDirection().x());
463 
464  residualLocalTheta = atan2(((RecSegment *)(*rechit))->localDirection().y(),
465  ((RecSegment *)(*rechit))->localDirection().z()) -
466  atan2(destiny.localDirection().y(), destiny.localDirection().z());
467 
468  } else {
469  residualLocalX = 0, residualLocalPhi = 0, residualLocalY = 0, residualLocalTheta = 0;
470  }
471 
472  // Fill individual chamber histograms
473 
474  std::string nameOfHistoLocalX;
475 
476  if (det == 1 && doDT) { // DT
477  std::stringstream Wheel;
478  Wheel << wheel;
479  std::stringstream Station;
480  Station << station;
481  std::stringstream Sector;
482  Sector << sector;
483 
484  nameOfHistoLocalX = "ResidualLocalX_W" + Wheel.str() + "MB" + Station.str() + "S" + Sector.str();
485 
486  } else if (det == 2 && doCSC) { // CSC
487  std::stringstream Ring;
488  Ring << ring;
489  std::stringstream Station;
490  Station << station;
491  std::stringstream Chamber;
492  Chamber << chamber;
493 
494  nameOfHistoLocalX = "ResidualLocalX_ME" + Station.str() + "R" + Ring.str() + "C" + Chamber.str();
495  }
496 
497  if (goAhead) {
498  for (unsigned int i = 0; i < unitsLocalX.size(); i++) {
499  if (nameOfHistoLocalX == unitsLocalX[i]->getName()) {
500  position = i;
501  break;
502  }
503  }
504 
505  if (trackRefitterType == "CosmicLike") { // problem with angle convention in reverse
506  // extrapolation
507  residualLocalPhi += 3.1416;
508  residualLocalTheta += 3.1416;
509  }
510 
511  unitsLocalX.at(position)->Fill(residualLocalX);
512  unitsLocalPhi.at(position)->Fill(residualLocalPhi);
513 
514  if (det == 1 && station != 4) {
515  unitsLocalY.at(position)->Fill(residualLocalY);
516  unitsLocalTheta.at(position)->Fill(residualLocalTheta);
517  }
518 
519  else if (det == 2) {
520  unitsLocalY.at(position)->Fill(residualLocalY);
521  unitsLocalTheta.at(position)->Fill(residualLocalTheta);
522  }
523 
524  countPoints++;
525  // if at least one point from this track is used, count this
526  // track
527  if (countPoints == 1)
528  countTracks++;
529  }
530 
531  innerTSOS = destiny;
532 
533  // delete thePropagator;
534 
535  } else {
536  edm::LogError("MuonAlignment") << " Error!! Exception in propagator catched" << std::endl;
537  continue;
538  }
539 
540  } // loop over my4DTrack
541  } // TSOS was valid
542 
543  } // cut in at least 4 segments
544 
545  } // end cut in RecHitsSize>36
546  numberOfHits = numberOfHits + countPoints;
547  // } //Muon is GlobalMuon
548  } // loop over Muons
549  numberOfTracks = numberOfTracks + countTracks;
550 
551  // delete thePropagator;
552 
553  // else edm::LogError("MuonAlignment")<<"Error!! Specified MuonCollection
554  //"<< theMuonTrackCollectionLabel <<" is not present in event.
555  // ProductNotFound!!"<<std::endl;
556 }
edm::EDGetTokenT< CSCSegmentCollection > theRecHits4DTagCSC
std::vector< MonitorElement * > unitsLocalX
RecHitVector doMatching(const reco::Track &, edm::Handle< DTRecSegment4DCollection > &, edm::Handle< CSCSegmentCollection > &, intDVector *, intDVector *, edm::ESHandle< GlobalTrackingGeometry > &)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
LocalVector localDirection() const
std::string trackRefitterType
T y() const
Definition: PV3DBase.h:63
edm::EDGetTokenT< reco::TrackCollection > theMuonCollectionLabel
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:42
Definition: Plane.h:17
std::vector< TrackingRecHit * > RecHitVector
C::const_iterator const_iterator
constant access iterator type
Definition: RangeMap.h:43
FreeTrajectoryState const * freeState(bool withErrors=true) const
T z() const
Definition: PV3DBase.h:64
std::string metname
std::vector< MonitorElement * > unitsLocalTheta
#define LogTrace(id)
std::vector< MonitorElement * > unitsLocalPhi
Definition: DetId.h:18
std::vector< std::vector< int > > intDVector
TString getName(TString structure, int layer, TString geometry)
Definition: DMRtrends.cc:167
std::vector< MonitorElement * > unitsLocalY
edm::EDGetTokenT< DTRecSegment4DCollection > theRecHits4DTagDT
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:53
unsigned int min1DTrackRecHitSize
static int position[264][3]
Definition: ReadPGInfo.cc:509
T get() const
Definition: EventSetup.h:71
const GeomDet * idToDet(DetId) const override
unsigned int min4DTrackSegmentSize
T x() const
Definition: PV3DBase.h:62
T const * product() const
Definition: ESHandle.h:86
void MuonAlignment::beginJob ( void  )
overridevirtual

Inizialize parameters for histo binning.

Reimplemented from edm::EDAnalyzer.

Definition at line 57 of file MuonAlignment.cc.

References funct::abs(), DQMStore::book1D(), DQMStore::book2D(), relativeConstraints::chamber, dbe, doCSC, doDT, doSummary, cmsRelvalreport::exit, hLocalAngleCSC, hLocalAngleDT, hLocalAngleRmsCSC, hLocalAngleRmsDT, hLocalPhiMeanCSC, hLocalPhiMeanDT, hLocalPhiRmsCSC, hLocalPhiRmsDT, hLocalPositionCSC, hLocalPositionDT, hLocalPositionRmsCSC, hLocalPositionRmsDT, hLocalThetaMeanCSC, hLocalThetaMeanDT, hLocalThetaRmsCSC, hLocalThetaRmsDT, hLocalXMeanCSC, hLocalXMeanDT, hLocalXRmsCSC, hLocalXRmsDT, hLocalYMeanCSC, hLocalYMeanDT, hLocalYRmsCSC, hLocalYRmsDT, LogTrace, meanAngleRange, meanPositionRange, metname, nbins, Utilities::operator, resLocalXRangeStation1, resLocalXRangeStation2, resLocalXRangeStation3, resLocalXRangeStation4, resLocalYRangeStation1, resLocalYRangeStation2, resLocalYRangeStation3, resLocalYRangeStation4, resPhiRange, resThetaRange, relativeConstraints::ring, rmsAngleRange, rmsPositionRange, DQMStore::setCurrentFolder(), relativeConstraints::station, AlCaHLTBitMon_QueryRunRegistry::string, topFolder, unitsLocalPhi, unitsLocalTheta, unitsLocalX, unitsLocalY, and makeMuonMisalignmentScenario::wheel.

57  {
58  LogTrace(metname) << "[MuonAlignment] Parameters initialization";
59 
60  if (!(doDT || doCSC)) {
61  edm::LogError("MuonAlignment") << " Error!! At least one Muon subsystem "
62  "(DT or CSC) must be monitorized!!"
63  << std::endl;
64  edm::LogError("MuonAlignment") << " Please enable doDT or doCSC to True in your python cfg file!!!" << std::endl;
65  exit(1);
66  }
67 
69 
70  if (doSummary) {
71  if (doDT) {
72  dbe->setCurrentFolder(topFolder.str() + "/DT");
74  "hLocalPositionDT", "Local DT position (cm) absolute MEAN residuals;Sector;;cm", 14, 1, 15, 40, 0, 40);
76  "hLocalAngleDT", "Local DT angle (rad) absolute MEAN residuals;Sector;;rad", 14, 1, 15, 40, 0, 40);
78  dbe->book2D("hLocalPositionRmsDT", "Local DT position (cm) RMS residuals;Sector;;cm", 14, 1, 15, 40, 0, 40);
80  dbe->book2D("hLocalAngleRmsDT", "Local DT angle (rad) RMS residuals;Sector;;rad", 14, 1, 15, 40, 0, 40);
81 
82  hLocalXMeanDT = dbe->book1D("hLocalXMeanDT",
83  "Distribution of absolute MEAN Local X (cm) residuals "
84  "for DT;<X> (cm);number of chambers",
85  100,
86  0,
88  hLocalXRmsDT = dbe->book1D("hLocalXRmsDT",
89  "Distribution of RMS Local X (cm) residuals "
90  "for DT;X RMS (cm);number of chambers",
91  100,
92  0,
94  hLocalYMeanDT = dbe->book1D("hLocalYMeanDT",
95  "Distribution of absolute MEAN Local Y (cm) residuals "
96  "for DT;<Y> (cm);number of chambers",
97  100,
98  0,
100  hLocalYRmsDT = dbe->book1D("hLocalYRmsDT",
101  "Distribution of RMS Local Y (cm) residuals "
102  "for DT;Y RMS (cm);number of chambers",
103  100,
104  0,
106 
107  hLocalPhiMeanDT = dbe->book1D("hLocalPhiMeanDT",
108  "Distribution of MEAN #phi (rad) residuals "
109  "for DT;<#phi>(rad);number of chambers",
110  100,
113  hLocalPhiRmsDT = dbe->book1D("hLocalPhiRmsDT",
114  "Distribution of RMS #phi (rad) residuals "
115  "for DT;#phi RMS (rad);number of chambers",
116  100,
117  0,
118  rmsAngleRange);
119  hLocalThetaMeanDT = dbe->book1D("hLocalThetaMeanDT",
120  "Distribution of MEAN #theta (rad) residuals for "
121  "DT;<#theta>(rad);number of chambers",
122  100,
125  hLocalThetaRmsDT = dbe->book1D("hLocalThetaRmsDT",
126  "Distribution of RMS #theta (rad) residuals for "
127  "DT;#theta RMS (rad);number of chambers",
128  100,
129  0,
130  rmsAngleRange);
131  }
132 
133  if (doCSC) {
134  dbe->setCurrentFolder(topFolder.str() + "/CSC");
136  "hLocalPositionCSC", "Local CSC position (cm) absolute MEAN residuals;Sector;;cm", 36, 1, 37, 40, 0, 40);
138  "hLocalAngleCSC", "Local CSC angle (rad) absolute MEAN residuals;Sector;;rad", 36, 1, 37, 40, 0, 40);
140  dbe->book2D("hLocalPositionRmsCSC", "Local CSC position (cm) RMS residuals;Sector;;cm", 36, 1, 37, 40, 0, 40);
142  dbe->book2D("hLocalAngleRmsCSC", "Local CSC angle (rad) RMS residuals;Sector;;rad", 36, 1, 37, 40, 0, 40);
143 
144  hLocalXMeanCSC = dbe->book1D("hLocalXMeanCSC",
145  "Distribution of absolute MEAN Local X (cm) residuals "
146  "for CSC;<X> (cm);number of chambers",
147  100,
148  0,
150  hLocalXRmsCSC = dbe->book1D("hLocalXRmsCSC",
151  "Distribution of RMS Local X (cm) residuals "
152  "for CSC;X RMS (cm);number of chambers",
153  100,
154  0,
156  hLocalYMeanCSC = dbe->book1D("hLocalYMeanCSC",
157  "Distribution of absolute MEAN Local Y (cm) residuals "
158  "for CSC;<Y> (cm);number of chambers",
159  100,
160  0,
162  hLocalYRmsCSC = dbe->book1D("hLocalYRmsCSC",
163  "Distribution of RMS Local Y (cm) residuals "
164  "for CSC;Y RMS (cm);number of chambers",
165  100,
166  0,
168 
169  hLocalPhiMeanCSC = dbe->book1D("hLocalPhiMeanCSC",
170  "Distribution of absolute MEAN #phi (rad) residuals for "
171  "CSC;<#phi>(rad);number of chambers",
172  100,
173  0,
175  hLocalPhiRmsCSC = dbe->book1D("hLocalPhiRmsCSC",
176  "Distribution of RMS #phi (rad) residuals "
177  "for CSC;#phi RMS (rad);number of chambers",
178  100,
179  0,
180  rmsAngleRange);
181  hLocalThetaMeanCSC = dbe->book1D("hLocalThetaMeanCSC",
182  "Distribution of absolute MEAN #theta (rad) residuals "
183  "for CSC;<#theta>(rad);number of chambers",
184  100,
185  0,
187  hLocalThetaRmsCSC = dbe->book1D("hLocalThetaRmsCSC",
188  "Distribution of RMS #theta (rad) residuals for "
189  "CSC;#theta RMS (rad);number of chambers",
190  100,
191  0,
192  rmsAngleRange);
193  }
194  }
195 
196  // Chamber individual histograms
197  // I need to create all of them even if they are empty to allow proper root
198  // merging
199 
200  // variables for histos ranges
201  double rangeX = 0, rangeY = 0;
202  std::string nameOfHistoLocalX, nameOfHistoLocalY, nameOfHistoLocalPhi, nameOfHistoLocalTheta;
203 
204  for (int station = -4; station < 5; station++) {
205  // This piece of code calculates the range of the residuals
206  switch (abs(station)) {
207  case 1: {
208  rangeX = resLocalXRangeStation1;
209  rangeY = resLocalYRangeStation1;
210  } break;
211  case 2: {
212  rangeX = resLocalXRangeStation2;
213  rangeY = resLocalYRangeStation2;
214  } break;
215  case 3: {
216  rangeX = resLocalXRangeStation3;
217  rangeY = resLocalYRangeStation3;
218  } break;
219  case 4: {
220  rangeX = resLocalXRangeStation4;
221  rangeY = resLocalYRangeStation4;
222  } break;
223  default:
224  break;
225  }
226  if (doDT) {
227  if (station > 0) {
228  for (int wheel = -2; wheel < 3; wheel++) {
229  for (int sector = 1; sector < 15; sector++) {
230  if (!((sector == 13 || sector == 14) && station != 4)) {
231  std::stringstream Wheel;
232  Wheel << wheel;
233  std::stringstream Station;
234  Station << station;
235  std::stringstream Sector;
236  Sector << sector;
237 
238  nameOfHistoLocalX = "ResidualLocalX_W" + Wheel.str() + "MB" + Station.str() + "S" + Sector.str();
239  nameOfHistoLocalPhi = "ResidualLocalPhi_W" + Wheel.str() + "MB" + Station.str() + "S" + Sector.str();
240  nameOfHistoLocalTheta = "ResidualLocalTheta_W" + Wheel.str() + "MB" + Station.str() + "S" + Sector.str();
241  nameOfHistoLocalY = "ResidualLocalY_W" + Wheel.str() + "MB" + Station.str() + "S" + Sector.str();
242 
243  dbe->setCurrentFolder(topFolder.str() + "/DT/Wheel" + Wheel.str() + "/Station" + Station.str() +
244  "/Sector" + Sector.str());
245 
246  // Create ME and push histos into their respective vectors
247 
248  MonitorElement *histoLocalX = dbe->book1D(nameOfHistoLocalX, nameOfHistoLocalX, nbins, -rangeX, rangeX);
249  unitsLocalX.push_back(histoLocalX);
250  MonitorElement *histoLocalPhi =
251  dbe->book1D(nameOfHistoLocalPhi, nameOfHistoLocalPhi, nbins, -resPhiRange, resPhiRange);
252  unitsLocalPhi.push_back(histoLocalPhi);
253  MonitorElement *histoLocalTheta =
254  dbe->book1D(nameOfHistoLocalTheta, nameOfHistoLocalTheta, nbins, -resThetaRange, resThetaRange);
255  unitsLocalTheta.push_back(histoLocalTheta);
256  MonitorElement *histoLocalY = dbe->book1D(nameOfHistoLocalY, nameOfHistoLocalY, nbins, -rangeY, rangeY);
257  unitsLocalY.push_back(histoLocalY);
258  }
259  }
260  }
261  } // station>0
262  } // doDT
263 
264  if (doCSC) {
265  if (station != 0) {
266  for (int ring = 1; ring < 5; ring++) {
267  for (int chamber = 1; chamber < 37; chamber++) {
268  if (!(((abs(station) == 2 || abs(station) == 3 || abs(station) == 4) && ring == 1 && chamber > 18) ||
269  ((abs(station) == 2 || abs(station) == 3 || abs(station) == 4) && ring > 2))) {
270  std::stringstream Ring;
271  Ring << ring;
272  std::stringstream Station;
273  Station << station;
274  std::stringstream Chamber;
275  Chamber << chamber;
276 
277  nameOfHistoLocalX = "ResidualLocalX_ME" + Station.str() + "R" + Ring.str() + "C" + Chamber.str();
278  nameOfHistoLocalPhi = "ResidualLocalPhi_ME" + Station.str() + "R" + Ring.str() + "C" + Chamber.str();
279  nameOfHistoLocalTheta = "ResidualLocalTheta_ME" + Station.str() + "R" + Ring.str() + "C" + Chamber.str();
280  nameOfHistoLocalY = "ResidualLocalY_ME" + Station.str() + "R" + Ring.str() + "C" + Chamber.str();
281 
282  dbe->setCurrentFolder(topFolder.str() + "/CSC/Station" + Station.str() + "/Ring" + Ring.str() +
283  "/Chamber" + Chamber.str());
284 
285  // Create ME and push histos into their respective vectors
286 
287  MonitorElement *histoLocalX = dbe->book1D(nameOfHistoLocalX, nameOfHistoLocalX, nbins, -rangeX, rangeX);
288  unitsLocalX.push_back(histoLocalX);
289  MonitorElement *histoLocalPhi =
290  dbe->book1D(nameOfHistoLocalPhi, nameOfHistoLocalPhi, nbins, -resPhiRange, resPhiRange);
291  unitsLocalPhi.push_back(histoLocalPhi);
292  MonitorElement *histoLocalTheta =
293  dbe->book1D(nameOfHistoLocalTheta, nameOfHistoLocalTheta, nbins, -resThetaRange, resThetaRange);
294  unitsLocalTheta.push_back(histoLocalTheta);
295  MonitorElement *histoLocalY = dbe->book1D(nameOfHistoLocalY, nameOfHistoLocalY, nbins, -rangeY, rangeY);
296  unitsLocalY.push_back(histoLocalY);
297  }
298  }
299  }
300  } // station!=0
301  } // doCSC
302 
303  } // loop on stations
304 }
MonitorElement * hLocalPhiRmsDT
Definition: MuonAlignment.h:96
MonitorElement * book2D(char_string const &name, char_string const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1173
std::vector< MonitorElement * > unitsLocalX
MonitorElement * hLocalPositionRmsDT
Definition: MuonAlignment.h:87
MonitorElement * hLocalThetaMeanCSC
MonitorElement * hLocalYMeanDT
Definition: MuonAlignment.h:93
MonitorElement * hLocalPhiRmsCSC
double resLocalYRangeStation2
DQMStore * dbe
Definition: MuonAlignment.h:84
MonitorElement * hLocalYRmsCSC
MonitorElement * hLocalPositionCSC
double resLocalXRangeStation1
MonitorElement * hLocalXMeanDT
Definition: MuonAlignment.h:91
double resLocalYRangeStation1
double resPhiRange
MonitorElement * hLocalPhiMeanDT
Definition: MuonAlignment.h:95
MonitorElement * book1D(char_string const &name, char_string const &title, int const nchX, double const lowX, double const highX)
Book 1D histogram.
Definition: DQMStore.cc:1098
double meanAngleRange
double resThetaRange
MonitorElement * hLocalAngleRmsCSC
MonitorElement * hLocalAngleRmsDT
Definition: MuonAlignment.h:89
double resLocalXRangeStation2
std::string metname
MonitorElement * hLocalAngleDT
Definition: MuonAlignment.h:88
MonitorElement * hLocalThetaRmsDT
Definition: MuonAlignment.h:98
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< MonitorElement * > unitsLocalTheta
MonitorElement * hLocalYRmsDT
Definition: MuonAlignment.h:94
MonitorElement * hLocalThetaRmsCSC
MonitorElement * hLocalXMeanCSC
MonitorElement * hLocalYMeanCSC
#define LogTrace(id)
unsigned int nbins
std::vector< MonitorElement * > unitsLocalPhi
double rmsPositionRange
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:571
double rmsAngleRange
std::vector< MonitorElement * > unitsLocalY
MonitorElement * hLocalPhiMeanCSC
MonitorElement * hLocalAngleCSC
double resLocalYRangeStation3
MonitorElement * hLocalXRmsDT
Definition: MuonAlignment.h:92
double resLocalYRangeStation4
double meanPositionRange
MonitorElement * hLocalPositionRmsCSC
MonitorElement * hLocalXRmsCSC
std::stringstream topFolder
MonitorElement * hLocalThetaMeanDT
Definition: MuonAlignment.h:97
MonitorElement * hLocalPositionDT
Definition: MuonAlignment.h:86
double resLocalXRangeStation4
double resLocalXRangeStation3
void MuonAlignment::copyAlignmentToSurvey ( double  shiftErr,
double  angleErr 
)

Definition at line 139 of file MuonAlignment.cc.

References popcon2dropbox::copy(), AlignableMuon::cscAlignmentErrorsExtended(), AlignableMuon::CSCEndcaps(), AlignableMuon::dtAlignmentErrorsExtended(), AlignableMuon::DTBarrel(), fillGapsInSurvey(), mps_fire::i, AlignmentErrorsExtended::m_alignError, recursiveMap(), Alignable::setSurvey(), Alignable::surface(), and theAlignableMuon.

Referenced by MuonGeometryDBConverter::analyze(), and getAlignableNavigator().

139  {
140  std::map<align::ID, Alignable*> alignableMap;
141  recursiveMap(theAlignableMuon->DTBarrel(), alignableMap);
142  recursiveMap(theAlignableMuon->CSCEndcaps(), alignableMap);
143 
144  // Set the survey error to the alignable error, expanding the matrix as needed
147  std::vector<AlignTransformErrorExtended> alignmentErrors;
148  std::copy(dtAlignmentErrorsExtended->m_alignError.begin(), dtAlignmentErrorsExtended->m_alignError.end(), std::back_inserter(alignmentErrors));
149  std::copy(cscAlignmentErrorsExtended->m_alignError.begin(), cscAlignmentErrorsExtended->m_alignError.end(), std::back_inserter(alignmentErrors));
150 
151  for (std::vector<AlignTransformErrorExtended>::const_iterator alignmentError = alignmentErrors.begin();
152  alignmentError != alignmentErrors.end();
153  ++alignmentError) {
154  align::ErrorMatrix matrix6x6 = ROOT::Math::SMatrixIdentity(); // start from (0, 0)
155  CLHEP::HepSymMatrix matrix6x6new = alignmentError->matrix(); // start from (1, 1)
156 
157  for (int i = 0; i < 6; i++) {
158  for (int j = 0; j < 6; j++) {
159  matrix6x6(i, j) = matrix6x6new(i + 1, j + 1);
160  }
161  }
162  //matrix6x6(3,3) = angleErr;
163  //matrix6x6(4,4) = angleErr;
164  //matrix6x6(5,5) = angleErr;
165 
166  Alignable *alignable = alignableMap[alignmentError->rawId()];
167  alignable->setSurvey(new SurveyDet(alignable->surface(), matrix6x6));
168  }
169 
171 }
def copy(args, dbName)
align::Alignables DTBarrel()
align::Alignables CSCEndcaps()
AlignableMuon * theAlignableMuon
Definition: MuonAlignment.h:70
AlignmentErrorsExtended * cscAlignmentErrorsExtended()
Get CSC alignment errors sorted by DetId.
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
Definition: Alignable.h:135
void fillGapsInSurvey(double shiftErr, double angleErr)
std::vector< AlignTransformErrorExtended > m_alignError
void setSurvey(const SurveyDet *)
Set survey info.
Definition: Alignable.cc:340
AlignmentErrorsExtended * dtAlignmentErrorsExtended()
Get DT alignment errors sorted by DetId.
void recursiveMap(const align::Alignables &alignables, std::map< align::ID, Alignable * > &theMap)
math::Error< 6 >::type ErrorMatrix
Definition: Definitions.h:39
void MuonAlignment::copySurveyToAlignment ( )

Definition at line 233 of file MuonAlignment.cc.

References recursiveCopySurveyToAlignment(), and theAlignableMuon.

Referenced by MuonGeometryDBConverter::analyze(), and getAlignableNavigator().

233  {
235 }
void recursiveCopySurveyToAlignment(Alignable *alignable)
AlignableMuon * theAlignableMuon
Definition: MuonAlignment.h:70
RecHitVector MuonAlignment::doMatching ( const reco::Track staTrack,
edm::Handle< DTRecSegment4DCollection > &  all4DSegmentsDT,
edm::Handle< CSCSegmentCollection > &  all4DSegmentsCSC,
intDVector indexCollectionDT,
intDVector indexCollectionCSC,
edm::ESHandle< GlobalTrackingGeometry > &  theTrackingGeometry 
)
private

Definition at line 558 of file MuonAlignment.cc.

References GeomDetEnumerators::CSC, GeomDetEnumerators::DT, TrackingRecHit::geographicalId(), edm::Ref< C, T, F >::get(), GlobalTrackingGeometry::idToDet(), DetId::rawId(), reco::Track::recHit(), reco::Track::recHitsSize(), groupFilesInBlocks::reverse, GeomDet::subDetector(), and trackRefitterType.

Referenced by analyze().

563  {
566 
567  std::vector<int> positionDT;
568  std::vector<int> positionCSC;
569  RecHitVector my4DTrack;
570 
571  // Loop over the hits of the track
572  for (unsigned int counter = 0; counter != staTrack.recHitsSize() - 1; counter++) {
573  TrackingRecHitRef myRef = staTrack.recHit(counter);
574  const TrackingRecHit *rechit = myRef.get();
575  const GeomDet *geomDet = theTrackingGeometry->idToDet(rechit->geographicalId());
576 
577  // It's a DT Hit
578  if (geomDet->subDetector() == GeomDetEnumerators::DT) {
579  // Take the layer associated to this hit
580  DTLayerId myLayer(rechit->geographicalId().rawId());
581 
582  int NumberOfDTSegment = 0;
583  // Loop over segments
584  for (segmentDT = all4DSegmentsDT->begin(); segmentDT != all4DSegmentsDT->end(); ++segmentDT) {
585  // By default the chamber associated to this Segment is new
586  bool isNewChamber = true;
587 
588  // Loop over segments already included in the vector of segments in the
589  // actual track
590  for (std::vector<int>::iterator positionIt = positionDT.begin(); positionIt != positionDT.end(); positionIt++) {
591  // If this segment has been used before isNewChamber = false
592  if (NumberOfDTSegment == *positionIt)
593  isNewChamber = false;
594  }
595 
596  // Loop over vectors of segments associated to previous tracks
597  for (std::vector<std::vector<int>>::iterator collect = indexCollectionDT->begin();
598  collect != indexCollectionDT->end();
599  ++collect) {
600  // Loop over segments associated to a track
601  for (std::vector<int>::iterator positionIt = (*collect).begin(); positionIt != (*collect).end();
602  positionIt++) {
603  // If this segment was used in a previos track then isNewChamber =
604  // false
605  if (NumberOfDTSegment == *positionIt)
606  isNewChamber = false;
607  }
608  }
609 
610  // If the chamber is new
611  if (isNewChamber) {
612  DTChamberId myChamber((*segmentDT).geographicalId().rawId());
613  // If the layer of the hit belongs to the chamber of the 4D Segment
614  if (myLayer.wheel() == myChamber.wheel() && myLayer.station() == myChamber.station() &&
615  myLayer.sector() == myChamber.sector()) {
616  // push position of the segment and tracking rechit
617  positionDT.push_back(NumberOfDTSegment);
618  my4DTrack.push_back((TrackingRecHit *)&(*segmentDT));
619  }
620  }
621  NumberOfDTSegment++;
622  }
623  // In case is a CSC
624  } else if (geomDet->subDetector() == GeomDetEnumerators::CSC) {
625  // Take the layer associated to this hit
626  CSCDetId myLayer(rechit->geographicalId().rawId());
627 
628  int NumberOfCSCSegment = 0;
629  // Loop over 4Dsegments
630  for (segmentCSC = all4DSegmentsCSC->begin(); segmentCSC != all4DSegmentsCSC->end(); segmentCSC++) {
631  // By default the chamber associated to the segment is new
632  bool isNewChamber = true;
633 
634  // Loop over segments in the current track
635  for (std::vector<int>::iterator positionIt = positionCSC.begin(); positionIt != positionCSC.end();
636  positionIt++) {
637  // If this segment has been used then newchamber = false
638  if (NumberOfCSCSegment == *positionIt)
639  isNewChamber = false;
640  }
641  // Loop over vectors of segments in previous tracks
642  for (std::vector<std::vector<int>>::iterator collect = indexCollectionCSC->begin();
643  collect != indexCollectionCSC->end();
644  ++collect) {
645  // Loop over segments in a track
646  for (std::vector<int>::iterator positionIt = (*collect).begin(); positionIt != (*collect).end();
647  positionIt++) {
648  // If the segment was used in a previous track isNewChamber = false
649  if (NumberOfCSCSegment == *positionIt)
650  isNewChamber = false;
651  }
652  }
653  // If the chamber is new
654  if (isNewChamber) {
655  CSCDetId myChamber((*segmentCSC).geographicalId().rawId());
656  // If the chambers are the same
657  if (myLayer.chamberId() == myChamber.chamberId()) {
658  // push
659  positionCSC.push_back(NumberOfCSCSegment);
660  my4DTrack.push_back((TrackingRecHit *)&(*segmentCSC));
661  }
662  }
663  NumberOfCSCSegment++;
664  }
665  }
666  }
667 
668  indexCollectionDT->push_back(positionDT);
669  indexCollectionCSC->push_back(positionCSC);
670 
671  if (trackRefitterType == "CosmicLike") {
672  std::reverse(my4DTrack.begin(), my4DTrack.end());
673  }
674  return my4DTrack;
675 }
size_t recHitsSize() const
Get number of RecHits. (Warning, this includes invalid hits, which are not physical hits)...
Definition: Track.h:124
std::string trackRefitterType
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
std::vector< TrackingRecHit * > RecHitVector
C::const_iterator const_iterator
constant access iterator type
Definition: RangeMap.h:43
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:243
TrackingRecHitRef recHit(size_t i) const
Get i-th hit on the track.
Definition: Track.h:119
const GeomDet * idToDet(DetId) const override
DetId geographicalId() const
virtual SubDetector subDetector() const
Which subdetector.
Definition: GeomDet.cc:44
void MuonAlignment::endJob ( void  )
overridevirtual

Save the histos.

Reimplemented from edm::EDAnalyzer.

Definition at line 677 of file MuonAlignment.cc.

References funct::abs(), relativeConstraints::chamber, dbe, doSummary, MonitorElement::Fill(), DQMStore::get(), hLocalAngleCSC, hLocalAngleDT, hLocalAngleRmsCSC, hLocalAngleRmsDT, hLocalPhiMeanCSC, hLocalPhiMeanDT, hLocalPhiRmsCSC, hLocalPhiRmsDT, hLocalPositionCSC, hLocalPositionDT, hLocalPositionRmsCSC, hLocalPositionRmsDT, hLocalThetaMeanCSC, hLocalThetaMeanDT, hLocalThetaRmsCSC, hLocalThetaRmsDT, hLocalXMeanCSC, hLocalXMeanDT, hLocalXRmsCSC, hLocalXRmsDT, hLocalYMeanCSC, hLocalYMeanDT, hLocalYRmsCSC, hLocalYRmsDT, mps_fire::i, LogTrace, Mean, metname, numberOfHits, numberOfTracks, PostProcessorHGCAL_cfi::outputFileName, relativeConstraints::ring, DQMStore::save(), MonitorElement::setBinContent(), MonitorElement::setBinLabel(), relativeConstraints::station, AlCaHLTBitMon_QueryRunRegistry::string, topFolder, unitsLocalPhi, unitsLocalTheta, unitsLocalX, unitsLocalY, and makeMuonMisalignmentScenario::wheel.

677  {
678  LogTrace(metname) << "[MuonAlignment] Saving the histos";
679  bool outputMEsInRootFile = parameters.getParameter<bool>("OutputMEsInRootFile");
680  std::string outputFileName = parameters.getParameter<std::string>("OutputFileName");
681 
682  edm::LogInfo("MuonAlignment") << "Number of Tracks considered for residuals: " << numberOfTracks << std::endl
683  << std::endl;
684  edm::LogInfo("MuonAlignment") << "Number of Hits considered for residuals: " << numberOfHits << std::endl
685  << std::endl;
686 
687  if (doSummary) {
688  char binLabel[15];
689 
690  // check if ME still there (and not killed by MEtoEDM for memory saving)
691  if (dbe) {
692  // check existence of first histo in the list
693  if (!dbe->get(topFolder.str() + "/DT/hLocalPositionDT"))
694  return;
695  } else
696  return;
697 
698  for (unsigned int i = 0; i < unitsLocalX.size(); i++) {
699  if (unitsLocalX[i]->getEntries() != 0) {
700  TString nameHistoLocalX = unitsLocalX[i]->getName();
701 
702  TString nameHistoLocalPhi = unitsLocalPhi[i]->getName();
703 
704  TString nameHistoLocalTheta = unitsLocalTheta[i]->getName();
705 
706  TString nameHistoLocalY = unitsLocalY[i]->getName();
707 
708  if (nameHistoLocalX.Contains("MB")) // HistoLocalX DT
709  {
710  int wheel, station, sector;
711 
712  sscanf(nameHistoLocalX, "ResidualLocalX_W%dMB%1dS%d", &wheel, &station, &sector);
713 
714  Int_t nstation = station - 1;
715  Int_t nwheel = wheel + 2;
716 
717  Double_t Mean = unitsLocalX[i]->getMean();
718  Double_t Error = unitsLocalX[i]->getMeanError();
719 
720  Int_t ybin = 1 + nwheel * 8 + nstation * 2;
721  hLocalPositionDT->setBinContent(sector, ybin, fabs(Mean));
722  snprintf(binLabel, sizeof(binLabel), "MB%d/%d_X", wheel, station);
723  hLocalPositionDT->setBinLabel(ybin, binLabel, 2);
724  hLocalPositionRmsDT->setBinContent(sector, ybin, Error);
725  hLocalPositionRmsDT->setBinLabel(ybin, binLabel, 2);
726 
727  hLocalXMeanDT->Fill(fabs(Mean));
728  hLocalXRmsDT->Fill(Error);
729  }
730 
731  if (nameHistoLocalX.Contains("ME")) // HistoLocalX CSC
732  {
733  int station, ring, chamber;
734 
735  sscanf(nameHistoLocalX, "ResidualLocalX_ME%dR%1dC%d", &station, &ring, &chamber);
736 
737  Double_t Mean = unitsLocalX[i]->getMean();
738  Double_t Error = unitsLocalX[i]->getMeanError();
739 
740  Int_t ybin = abs(station) * 2 + ring;
741  if (abs(station) == 1)
742  ybin = ring;
743  if (station > 0)
744  ybin = ybin + 10;
745  else
746  ybin = 11 - ybin;
747  ybin = 2 * ybin - 1;
748  hLocalPositionCSC->setBinContent(chamber, ybin, fabs(Mean));
749  snprintf(binLabel, sizeof(binLabel), "ME%d/%d_X", station, ring);
750  hLocalPositionCSC->setBinLabel(ybin, binLabel, 2);
751  hLocalPositionRmsCSC->setBinContent(chamber, ybin, Error);
752  hLocalPositionRmsCSC->setBinLabel(ybin, binLabel, 2);
753 
754  hLocalXMeanCSC->Fill(fabs(Mean));
755  hLocalXRmsCSC->Fill(Error);
756  }
757 
758  if (nameHistoLocalTheta.Contains("MB")) // HistoLocalTheta DT
759  {
760  int wheel, station, sector;
761 
762  sscanf(nameHistoLocalTheta, "ResidualLocalTheta_W%dMB%1dS%d", &wheel, &station, &sector);
763 
764  if (station != 4) {
765  Int_t nstation = station - 1;
766  Int_t nwheel = wheel + 2;
767 
768  Double_t Mean = unitsLocalTheta[i]->getMean();
769  Double_t Error = unitsLocalTheta[i]->getMeanError();
770 
771  Int_t ybin = 2 + nwheel * 8 + nstation * 2;
772  hLocalAngleDT->setBinContent(sector, ybin, fabs(Mean));
773  snprintf(binLabel, sizeof(binLabel), "MB%d/%d_#theta", wheel, station);
774  hLocalAngleDT->setBinLabel(ybin, binLabel, 2);
775  hLocalAngleRmsDT->setBinContent(sector, ybin, Error);
776  hLocalAngleRmsDT->setBinLabel(ybin, binLabel, 2);
777 
778  hLocalThetaMeanDT->Fill(fabs(Mean));
779  hLocalThetaRmsDT->Fill(Error);
780  }
781  }
782 
783  if (nameHistoLocalPhi.Contains("MB")) // HistoLocalPhi DT
784  {
785  int wheel, station, sector;
786 
787  sscanf(nameHistoLocalPhi, "ResidualLocalPhi_W%dMB%1dS%d", &wheel, &station, &sector);
788 
789  Int_t nstation = station - 1;
790  Int_t nwheel = wheel + 2;
791 
792  Double_t Mean = unitsLocalPhi[i]->getMean();
793  Double_t Error = unitsLocalPhi[i]->getMeanError();
794 
795  Int_t ybin = 1 + nwheel * 8 + nstation * 2;
796  hLocalAngleDT->setBinContent(sector, ybin, fabs(Mean));
797  snprintf(binLabel, sizeof(binLabel), "MB%d/%d_#phi", wheel, station);
798  hLocalAngleDT->setBinLabel(ybin, binLabel, 2);
799  hLocalAngleRmsDT->setBinContent(sector, ybin, Error);
800  hLocalAngleRmsDT->setBinLabel(ybin, binLabel, 2);
801 
802  hLocalPhiMeanDT->Fill(fabs(Mean));
803  hLocalPhiRmsDT->Fill(Error);
804  }
805 
806  if (nameHistoLocalPhi.Contains("ME")) // HistoLocalPhi CSC
807  {
808  int station, ring, chamber;
809 
810  sscanf(nameHistoLocalPhi, "ResidualLocalPhi_ME%dR%1dC%d", &station, &ring, &chamber);
811 
812  Double_t Mean = unitsLocalPhi[i]->getMean();
813  Double_t Error = unitsLocalPhi[i]->getMeanError();
814 
815  Int_t ybin = abs(station) * 2 + ring;
816  if (abs(station) == 1)
817  ybin = ring;
818  if (station > 0)
819  ybin = ybin + 10;
820  else
821  ybin = 11 - ybin;
822  ybin = 2 * ybin - 1;
823  hLocalAngleCSC->setBinContent(chamber, ybin, fabs(Mean));
824  snprintf(binLabel, sizeof(binLabel), "ME%d/%d_#phi", station, ring);
825  hLocalAngleCSC->setBinLabel(ybin, binLabel, 2);
826  hLocalAngleRmsCSC->setBinContent(chamber, ybin, Error);
827  hLocalAngleRmsCSC->setBinLabel(ybin, binLabel, 2);
828 
829  hLocalPhiMeanCSC->Fill(fabs(Mean));
830  hLocalPhiRmsCSC->Fill(Error);
831  }
832 
833  if (nameHistoLocalTheta.Contains("ME")) // HistoLocalTheta CSC
834  {
835  int station, ring, chamber;
836 
837  sscanf(nameHistoLocalTheta, "ResidualLocalTheta_ME%dR%1dC%d", &station, &ring, &chamber);
838 
839  Double_t Mean = unitsLocalTheta[i]->getMean();
840  Double_t Error = unitsLocalTheta[i]->getMeanError();
841 
842  Int_t ybin = abs(station) * 2 + ring;
843  if (abs(station) == 1)
844  ybin = ring;
845  if (station > 0)
846  ybin = ybin + 10;
847  else
848  ybin = 11 - ybin;
849  ybin = 2 * ybin;
850  hLocalAngleCSC->setBinContent(chamber, ybin, fabs(Mean));
851  snprintf(binLabel, sizeof(binLabel), "ME%d/%d_#theta", station, ring);
852  hLocalAngleCSC->setBinLabel(ybin, binLabel, 2);
853  hLocalAngleRmsCSC->setBinContent(chamber, ybin, Error);
854  hLocalAngleRmsCSC->setBinLabel(ybin, binLabel, 2);
855 
856  hLocalThetaMeanCSC->Fill(fabs(Mean));
857  hLocalThetaRmsCSC->Fill(Error);
858  }
859 
860  if (nameHistoLocalY.Contains("MB")) // HistoLocalY DT
861  {
862  int wheel, station, sector;
863 
864  sscanf(nameHistoLocalY, "ResidualLocalY_W%dMB%1dS%d", &wheel, &station, &sector);
865 
866  if (station != 4) {
867  Int_t nstation = station - 1;
868  Int_t nwheel = wheel + 2;
869 
870  Double_t Mean = unitsLocalY[i]->getMean();
871  Double_t Error = unitsLocalY[i]->getMeanError();
872 
873  Int_t ybin = 2 + nwheel * 8 + nstation * 2;
874  hLocalPositionDT->setBinContent(sector, ybin, fabs(Mean));
875  snprintf(binLabel, sizeof(binLabel), "MB%d/%d_Y", wheel, station);
876  hLocalPositionDT->setBinLabel(ybin, binLabel, 2);
877  hLocalPositionRmsDT->setBinContent(sector, ybin, Error);
878  hLocalPositionRmsDT->setBinLabel(ybin, binLabel, 2);
879 
880  hLocalYMeanDT->Fill(fabs(Mean));
881  hLocalYRmsDT->Fill(Error);
882  }
883  }
884 
885  if (nameHistoLocalY.Contains("ME")) // HistoLocalY CSC
886  {
887  int station, ring, chamber;
888 
889  sscanf(nameHistoLocalY, "ResidualLocalY_ME%dR%1dC%d", &station, &ring, &chamber);
890 
891  Double_t Mean = unitsLocalY[i]->getMean();
892  Double_t Error = unitsLocalY[i]->getMeanError();
893 
894  Int_t ybin = abs(station) * 2 + ring;
895  if (abs(station) == 1)
896  ybin = ring;
897  if (station > 0)
898  ybin = ybin + 10;
899  else
900  ybin = 11 - ybin;
901  ybin = 2 * ybin;
902  hLocalPositionCSC->setBinContent(chamber, ybin, fabs(Mean));
903  snprintf(binLabel, sizeof(binLabel), "ME%d/%d_Y", station, ring);
904  hLocalPositionCSC->setBinLabel(ybin, binLabel, 2);
905  hLocalPositionRmsCSC->setBinContent(chamber, ybin, Error);
906  hLocalPositionRmsCSC->setBinLabel(ybin, binLabel, 2);
907 
908  hLocalYMeanCSC->Fill(fabs(Mean));
909  hLocalYRmsCSC->Fill(Error);
910  }
911  } // check in # entries
912  } // loop on vector of histos
913  } // doSummary
914 
915  if (outputMEsInRootFile) {
916  // dbe->showDirStructure();
917  dbe->save(outputFileName);
918  }
919 }
MonitorElement * hLocalPhiRmsDT
Definition: MuonAlignment.h:96
std::vector< MonitorElement * > unitsLocalX
edm::ErrorSummaryEntry Error
MonitorElement * hLocalPositionRmsDT
Definition: MuonAlignment.h:87
MonitorElement * hLocalThetaMeanCSC
MonitorElement * hLocalYMeanDT
Definition: MuonAlignment.h:93
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * hLocalPhiRmsCSC
DQMStore * dbe
Definition: MuonAlignment.h:84
MonitorElement * hLocalYRmsCSC
MonitorElement * hLocalPositionCSC
MonitorElement * hLocalXMeanDT
Definition: MuonAlignment.h:91
MonitorElement * hLocalPhiMeanDT
Definition: MuonAlignment.h:95
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * hLocalAngleRmsCSC
void Fill(long long x)
MonitorElement * hLocalAngleRmsDT
Definition: MuonAlignment.h:89
MonitorElement * get(std::string const &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
Definition: DQMStore.cc:1613
std::string metname
MonitorElement * hLocalAngleDT
Definition: MuonAlignment.h:88
MonitorElement * hLocalThetaRmsDT
Definition: MuonAlignment.h:98
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< MonitorElement * > unitsLocalTheta
MonitorElement * hLocalYRmsDT
Definition: MuonAlignment.h:94
MonitorElement * hLocalThetaRmsCSC
MonitorElement * hLocalXMeanCSC
MonitorElement * hLocalYMeanCSC
#define LogTrace(id)
std::vector< MonitorElement * > unitsLocalPhi
std::vector< MonitorElement * > unitsLocalY
MonitorElement * hLocalPhiMeanCSC
MonitorElement * hLocalAngleCSC
void save(std::string const &filename, std::string const &path="", std::string const &pattern="", std::string const &rewrite="", uint32_t run=0, uint32_t lumi=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, std::string const &fileupdate="RECREATE")
Definition: DQMStore.cc:2465
MonitorElement * hLocalXRmsDT
Definition: MuonAlignment.h:92
MonitorElement * hLocalPositionRmsCSC
MonitorElement * hLocalXRmsCSC
std::stringstream topFolder
MonitorElement * hLocalThetaMeanDT
Definition: MuonAlignment.h:97
MonitorElement * hLocalPositionDT
Definition: MuonAlignment.h:86
void MuonAlignment::fillGapsInSurvey ( double  shiftErr,
double  angleErr 
)

Definition at line 176 of file MuonAlignment.cc.

References convertSQLitetoXML_cfg::angleErr, AlignableMuon::CSCEndcaps(), AlignableMuon::DTBarrel(), genParticles_cff::map, recursiveStructureMap(), convertSQLitetoXML_cfg::shiftErr, and theAlignableMuon.

Referenced by MuonGeometryArrange::analyze(), MuonGeometryDBConverter::analyze(), copyAlignmentToSurvey(), and getAlignableNavigator().

176  {
177  // get all the ones we missed
178  std::map<std::pair<align::StructureType, align::ID>, Alignable*> alignableStructureMap;
179  recursiveStructureMap(theAlignableMuon->DTBarrel(), alignableStructureMap);
180  recursiveStructureMap(theAlignableMuon->CSCEndcaps(), alignableStructureMap);
181 
182  for (std::map<std::pair<align::StructureType, align::ID>, Alignable*>::const_iterator iter = alignableStructureMap.begin();
183  iter != alignableStructureMap.end();
184  ++iter) {
185  if (iter->second->survey() == nullptr) {
186  align::ErrorMatrix matrix6x6 = ROOT::Math::SMatrixIdentity();
187  matrix6x6(0,0) = shiftErr;
188  matrix6x6(1,1) = shiftErr;
189  matrix6x6(2,2) = shiftErr;
190  matrix6x6(3,3) = angleErr;
191  matrix6x6(4,4) = angleErr;
192  matrix6x6(5,5) = angleErr;
193  iter->second->setSurvey(new SurveyDet(iter->second->surface(), matrix6x6));
194  }
195  }
196 }
align::Alignables DTBarrel()
align::Alignables CSCEndcaps()
AlignableMuon * theAlignableMuon
Definition: MuonAlignment.h:70
void recursiveStructureMap(const align::Alignables &alignables, std::map< std::pair< align::StructureType, align::ID >, Alignable * > &theMap)
math::Error< 6 >::type ErrorMatrix
Definition: Definitions.h:39
AlignableMuon* MuonAlignment::getAlignableMuon ( )
inline

Definition at line 30 of file MuonAlignment.h.

References theAlignableMuon.

Referenced by MuonGeometryArrange::analyze(), and MuonGeometryDBConverter::analyze().

30 { return theAlignableMuon; }
AlignableMuon * theAlignableMuon
Definition: MuonAlignment.h:70
AlignableNavigator* MuonAlignment::getAlignableNavigator ( )
inline
void MuonAlignment::init ( )
private

Definition at line 31 of file MuonAlignment.cc.

References theAlignableMuon, theAlignableNavigator, theCSCAlignRecordName, theCSCErrorRecordName, theCSCSurveyErrorRecordName, theCSCSurveyRecordName, theDTAlignRecordName, theDTErrorRecordName, theDTSurveyErrorRecordName, and theDTSurveyRecordName.

Referenced by getAlignableNavigator(), and MuonAlignment().

32 {
33  theDTAlignRecordName = "DTAlignmentRcd";
34  theDTErrorRecordName = "DTAlignmentErrorExtendedRcd";
35  theCSCAlignRecordName = "CSCAlignmentRcd";
36  theCSCErrorRecordName = "CSCAlignmentErrorExtendedRcd";
37  theDTSurveyRecordName = "DTSurveyRcd";
38  theDTSurveyErrorRecordName = "DTSurveyErrorExtendedRcd";
39  theCSCSurveyRecordName = "CSCSurveyRcd";
40  theCSCSurveyErrorRecordName = "CSCSurveyErrorExtendedRcd";
41  theAlignableMuon = nullptr;
42  theAlignableNavigator = nullptr;
43 }
AlignableNavigator * theAlignableNavigator
Definition: MuonAlignment.h:72
std::string theCSCErrorRecordName
Definition: MuonAlignment.h:62
std::string theDTAlignRecordName
Definition: MuonAlignment.h:61
std::string theDTSurveyRecordName
Definition: MuonAlignment.h:63
std::string theCSCSurveyErrorRecordName
Definition: MuonAlignment.h:64
AlignableMuon * theAlignableMuon
Definition: MuonAlignment.h:70
std::string theCSCSurveyRecordName
Definition: MuonAlignment.h:64
std::string theDTSurveyErrorRecordName
Definition: MuonAlignment.h:63
std::string theCSCAlignRecordName
Definition: MuonAlignment.h:62
std::string theDTErrorRecordName
Definition: MuonAlignment.h:61
void MuonAlignment::moveAlignableGlobalCoord ( DetId detid,
align::Scalars displacements,
align::Scalars rotations 
)

Definition at line 89 of file MuonAlignment.cc.

References AlignableNavigator::alignableFromDetId(), Alignable::move(), Alignable::rotateAroundGlobalX(), Alignable::rotateAroundGlobalY(), Alignable::rotateAroundGlobalZ(), and theAlignableNavigator.

Referenced by getAlignableNavigator().

89  {
90 
91  // Displace and rotate DT an Alignable associated to a GeomDet or GeomDetUnit
92  Alignable* theAlignable = theAlignableNavigator->alignableFromDetId( detid );
93 
94  // Convert std::vector to GlobalVector
95  align::GlobalVector gvector( displacements.at(0), displacements.at(1), displacements.at(2));
96 
97  // global displacement of the chamber
98  theAlignable->move( gvector );
99 
100  // local rotation of the chamber
101  theAlignable->rotateAroundGlobalX( rotations.at(0) ); // Global X axis rotation
102  theAlignable->rotateAroundGlobalY( rotations.at(1) ); // Global Y axis rotation
103  theAlignable->rotateAroundGlobalZ( rotations.at(2) ); // Global Z axis rotation
104 
105 }
AlignableNavigator * theAlignableNavigator
Definition: MuonAlignment.h:72
virtual void move(const GlobalVector &displacement)=0
Movement with respect to the global reference frame.
virtual void rotateAroundGlobalZ(Scalar radians)
Rotation around global z-axis.
Definition: Alignable.cc:220
virtual void rotateAroundGlobalX(Scalar radians)
Rotation around global x-axis.
Definition: Alignable.cc:168
virtual void rotateAroundGlobalY(Scalar radians)
Rotation around global y-axis.
Definition: Alignable.cc:194
align::Scalars rotations
Definition: MuonAlignment.h:68
align::Scalars displacements
Definition: MuonAlignment.h:66
AlignableDetOrUnitPtr alignableFromDetId(const DetId &detid)
Returns AlignableDetOrUnitPtr corresponding to given DetId.
void MuonAlignment::moveAlignableLocalCoord ( DetId detid,
align::Scalars displacements,
align::Scalars rotations 
)

Definition at line 68 of file MuonAlignment.cc.

References AlignableNavigator::alignableFromDetId(), Alignable::move(), Alignable::rotateAroundLocalX(), Alignable::rotateAroundLocalY(), Alignable::rotateAroundLocalZ(), Alignable::surface(), and theAlignableNavigator.

Referenced by getAlignableNavigator().

68  {
69 
70  // Displace and rotate DT an Alignable associated to a GeomDet or GeomDetUnit
71  Alignable* theAlignable = theAlignableNavigator->alignableFromDetId( detid );
72 
73  // Convert local to global diplacements
74  align::LocalVector lvector( displacements.at(0), displacements.at(1), displacements.at(2));
75  align::GlobalVector gvector = ( theAlignable->surface()).toGlobal( lvector );
76 
77  // global displacement of the chamber
78  theAlignable->move( gvector );
79 
80  // local rotation of the chamber
81  theAlignable->rotateAroundLocalX( rotations.at(0) ); // Local X axis rotation
82  theAlignable->rotateAroundLocalY( rotations.at(1) ); // Local Y axis rotation
83  theAlignable->rotateAroundLocalZ( rotations.at(2) ); // Local Z axis rotation
84 
85 }
AlignableNavigator * theAlignableNavigator
Definition: MuonAlignment.h:72
virtual void rotateAroundLocalZ(Scalar radians)
Rotation around local z-axis.
Definition: Alignable.cc:233
virtual void move(const GlobalVector &displacement)=0
Movement with respect to the global reference frame.
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
Definition: Alignable.h:135
virtual void rotateAroundLocalY(Scalar radians)
Rotation around local y-axis.
Definition: Alignable.cc:207
align::Scalars rotations
Definition: MuonAlignment.h:68
virtual void rotateAroundLocalX(Scalar radians)
Rotation around local x-axis.
Definition: Alignable.cc:181
align::Scalars displacements
Definition: MuonAlignment.h:66
AlignableDetOrUnitPtr alignableFromDetId(const DetId &detid)
Returns AlignableDetOrUnitPtr corresponding to given DetId.
void MuonAlignment::recursiveCopySurveyToAlignment ( Alignable alignable)
private

Definition at line 200 of file MuonAlignment.cc.

References AlCaHLTBitMon_QueryRunRegistry::comp, makeMuonMisalignmentScenario::components, Alignable::components(), SurveyDet::errors(), Alignable::globalPosition(), Alignable::globalRotation(), mps_fire::i, Alignable::move(), SurveyDet::position(), makeMuonMisalignmentScenario::rot, Alignable::rotateInGlobalFrame(), SurveyDet::rotation(), Alignable::setAlignmentPositionError(), Alignable::survey(), TkRotation< T >::transposed(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by copySurveyToAlignment(), and getAlignableNavigator().

200  {
201  if (alignable->survey() != nullptr) {
202  const SurveyDet *survey = alignable->survey();
203 
204  const align::PositionType& pos = survey->position();
205  align::RotationType rot = survey->rotation();
206 
207  align::PositionType oldpos = alignable->globalPosition();
208  align::RotationType oldrot = alignable->globalRotation();
209  alignable->move(align::GlobalVector(-oldpos.x(), -oldpos.y(), -oldpos.z()));
210  alignable->rotateInGlobalFrame(oldrot.transposed());
211  alignable->rotateInGlobalFrame(rot);
212  alignable->move(align::GlobalVector(pos.x(), pos.y(), pos.z()));
213 
214  align::ErrorMatrix matrix6x6 = survey->errors(); // start from 0,0
215  AlgebraicSymMatrix66 matrix6x6new; // start from 0,0
216  for (int i = 0; i < 6; i++) {
217  for (int j = 0; j <= i; j++) {
218  matrix6x6new(i, j) = matrix6x6(i, j);
219  }
220  }
221 
222  // this sets APEs at this level and (since 2nd argument is true) all lower levels
224  }
225 
226  // do lower levels afterward to thwart the cumulative setting of APEs
227  align::Alignables components = alignable->components();
228  for (align::Alignables::const_iterator comp = components.begin(); comp != components.end(); ++comp) {
230  }
231 }
const SurveyDet * survey() const
Return survey info.
Definition: Alignable.h:225
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > AlgebraicSymMatrix66
T y() const
Definition: PV3DBase.h:63
const RotationType & globalRotation() const
Return the global orientation of the object.
Definition: Alignable.h:141
virtual void move(const GlobalVector &displacement)=0
Movement with respect to the global reference frame.
const align::ErrorMatrix & errors() const
Definition: SurveyDet.h:73
virtual const Alignables & components() const =0
Return vector of all direct components.
const align::RotationType & rotation() const
Definition: SurveyDet.h:68
const align::PositionType & position() const
Definition: SurveyDet.h:63
void recursiveCopySurveyToAlignment(Alignable *alignable)
T z() const
Definition: PV3DBase.h:64
virtual void setAlignmentPositionError(const AlignmentPositionError &ape, bool propagateDown)=0
Set the alignment position error - if (!propagateDown) do not affect daughters.
GlobalErrorBaseExtended< double, ErrorMatrixTag > GlobalErrorExtended
Definition: GlobalError.h:14
virtual void rotateInGlobalFrame(const RotationType &rotation)=0
std::vector< Alignable * > Alignables
Definition: Utilities.h:32
TkRotation transposed() const
const PositionType & globalPosition() const
Return the global position of the object.
Definition: Alignable.h:138
math::Error< 6 >::type ErrorMatrix
Definition: Definitions.h:39
T x() const
Definition: PV3DBase.h:62
void MuonAlignment::recursiveList ( const align::Alignables alignables,
align::Alignables theList 
)

Definition at line 109 of file MuonAlignment.cc.

Referenced by getAlignableNavigator(), saveCSCSurveyToDB(), and saveDTSurveyToDB().

109  {
110  for (align::Alignables::const_iterator alignable = alignables.begin(); alignable != alignables.end(); ++alignable) {
111  recursiveList((*alignable)->components(), theList);
112  theList.push_back(*alignable);
113  }
114 }
void recursiveList(const align::Alignables &alignables, align::Alignables &theList)
void MuonAlignment::recursiveMap ( const align::Alignables alignables,
std::map< align::ID, Alignable * > &  theMap 
)

Definition at line 118 of file MuonAlignment.cc.

Referenced by copyAlignmentToSurvey(), and getAlignableNavigator().

118  {
119  for (align::Alignables::const_iterator alignable = alignables.begin(); alignable != alignables.end(); ++alignable) {
120  unsigned int rawId = (*alignable)->geomDetId().rawId();
121  if (rawId != 0) {
122  theMap[rawId] = *alignable;
123  }
124  recursiveMap((*alignable)->components(), theMap);
125  }
126 }
void recursiveMap(const align::Alignables &alignables, std::map< align::ID, Alignable * > &theMap)
void MuonAlignment::recursiveStructureMap ( const align::Alignables alignables,
std::map< std::pair< align::StructureType, align::ID >, Alignable * > &  theMap 
)

Definition at line 130 of file MuonAlignment.cc.

Referenced by fillGapsInSurvey(), and getAlignableNavigator().

130  {
131  for (align::Alignables::const_iterator alignable = alignables.begin(); alignable != alignables.end(); ++alignable) {
132  theMap[std::pair<align::StructureType, align::ID>((*alignable)->alignableObjectId(), (*alignable)->id())] = *alignable;
133  recursiveStructureMap((*alignable)->components(), theMap);
134  }
135 }
void recursiveStructureMap(const align::Alignables &alignables, std::map< std::pair< align::StructureType, align::ID >, Alignable * > &theMap)
void MuonAlignment::saveCSCSurveyToDB ( void  )

Definition at line 277 of file MuonAlignment.cc.

References AlignableMuon::CSCEndcaps(), cond::service::PoolDBOutputService::currentTime(), relativeConstraints::error, edm::Service< T >::isAvailable(), Alignments::m_align, SurveyErrors::m_surveyErrors, recursiveList(), makeMuonMisalignmentScenario::rot, theAlignableMuon, theCSCSurveyErrorRecordName, theCSCSurveyRecordName, relativeConstraints::value, cond::service::PoolDBOutputService::writeOne(), PV3DBase< T, PVType, FrameType >::x(), TkRotation< T >::xx(), TkRotation< T >::xy(), TkRotation< T >::xz(), PV3DBase< T, PVType, FrameType >::y(), TkRotation< T >::yx(), TkRotation< T >::yy(), TkRotation< T >::yz(), PV3DBase< T, PVType, FrameType >::z(), TkRotation< T >::zx(), TkRotation< T >::zy(), and TkRotation< T >::zz().

Referenced by getAlignableNavigator(), and saveSurveyToDB().

277  {
278  // Call service
280  if( !poolDbService.isAvailable() ) // Die if not available
281  throw cms::Exception("NotAvailable") << "PoolDBOutputService not available";
282 
283  // Get alignments and errors
284  Alignments *cscAlignments = new Alignments();
285  SurveyErrors *cscSurveyErrors = new SurveyErrors();
286 
287  align::Alignables alignableList;
288  recursiveList(theAlignableMuon->CSCEndcaps(), alignableList);
289 
290  for (align::Alignables::const_iterator alignable = alignableList.begin(); alignable != alignableList.end(); ++alignable) {
291  const align::PositionType &pos = (*alignable)->survey()->position();
292  const align::RotationType &rot = (*alignable)->survey()->rotation();
293 
294  AlignTransform value(CLHEP::Hep3Vector(pos.x(), pos.y(), pos.z()),
295  CLHEP::HepRotation(CLHEP::HepRep3x3(rot.xx(), rot.xy(), rot.xz(),
296  rot.yx(), rot.yy(), rot.yz(),
297  rot.zx(), rot.zy(), rot.zz())),
298  (*alignable)->id());
299  SurveyError error((*alignable)->alignableObjectId(), (*alignable)->id(), (*alignable)->survey()->errors());
300 
301  cscAlignments->m_align.push_back(value);
302  cscSurveyErrors->m_surveyErrors.push_back(error);
303  }
304 
305  // Store CSC alignments and errors
306  poolDbService->writeOne<Alignments>( &(*cscAlignments), poolDbService->currentTime(), theCSCSurveyRecordName);
307  poolDbService->writeOne<SurveyErrors>( &(*cscSurveyErrors), poolDbService->currentTime(), theCSCSurveyErrorRecordName);
308 }
T xx() const
T y() const
Definition: PV3DBase.h:63
T yx() const
std::vector< AlignTransform > m_align
Definition: Alignments.h:19
T zx() const
T xy() const
T zz() const
align::Alignables CSCEndcaps()
T z() const
Definition: PV3DBase.h:64
bool isAvailable() const
Definition: Service.h:40
T zy() const
void writeOne(T *payload, Time_t time, const std::string &recordName, bool withlogging=false)
Definition: value.py:1
T yy() const
std::string theCSCSurveyErrorRecordName
Definition: MuonAlignment.h:64
AlignableMuon * theAlignableMuon
Definition: MuonAlignment.h:70
std::string theCSCSurveyRecordName
Definition: MuonAlignment.h:64
void recursiveList(const align::Alignables &alignables, align::Alignables &theList)
std::vector< Alignable * > Alignables
Definition: Utilities.h:32
T xz() const
std::vector< SurveyError > m_surveyErrors
Definition: SurveyErrors.h:23
T x() const
Definition: PV3DBase.h:62
T yz() const
void MuonAlignment::saveCSCtoDB ( void  )

Definition at line 330 of file MuonAlignment.cc.

References AlignableMuon::cscAlignmentErrorsExtended(), AlignableMuon::cscAlignments(), cond::service::PoolDBOutputService::currentTime(), edm::Service< T >::isAvailable(), theAlignableMuon, theCSCAlignRecordName, theCSCErrorRecordName, and cond::service::PoolDBOutputService::writeOne().

Referenced by getAlignableNavigator(), and saveToDB().

330  {
331  // Call service
333  if( !poolDbService.isAvailable() ) // Die if not available
334  throw cms::Exception("NotAvailable") << "PoolDBOutputService not available";
335 
336  // Get alignments and errors
337  Alignments* csc_Alignments = theAlignableMuon->cscAlignments();
338  AlignmentErrorsExtended* csc_AlignmentErrorsExtended = theAlignableMuon->cscAlignmentErrorsExtended();
339 
340  // Store CSC alignments and errors
341  poolDbService->writeOne<Alignments>( &(*csc_Alignments), poolDbService->currentTime(), theCSCAlignRecordName);
342  poolDbService->writeOne<AlignmentErrorsExtended>( &(*csc_AlignmentErrorsExtended), poolDbService->currentTime(), theCSCErrorRecordName);
343 }
std::string theCSCErrorRecordName
Definition: MuonAlignment.h:62
bool isAvailable() const
Definition: Service.h:40
void writeOne(T *payload, Time_t time, const std::string &recordName, bool withlogging=false)
AlignableMuon * theAlignableMuon
Definition: MuonAlignment.h:70
AlignmentErrorsExtended * cscAlignmentErrorsExtended()
Get CSC alignment errors sorted by DetId.
Alignments * cscAlignments()
Get CSC alignments sorted by DetId.
std::string theCSCAlignRecordName
Definition: MuonAlignment.h:62
void MuonAlignment::saveDTSurveyToDB ( void  )

Definition at line 244 of file MuonAlignment.cc.

References cond::service::PoolDBOutputService::currentTime(), AlignableMuon::DTBarrel(), relativeConstraints::error, edm::Service< T >::isAvailable(), Alignments::m_align, SurveyErrors::m_surveyErrors, recursiveList(), makeMuonMisalignmentScenario::rot, theAlignableMuon, theDTSurveyErrorRecordName, theDTSurveyRecordName, relativeConstraints::value, cond::service::PoolDBOutputService::writeOne(), PV3DBase< T, PVType, FrameType >::x(), TkRotation< T >::xx(), TkRotation< T >::xy(), TkRotation< T >::xz(), PV3DBase< T, PVType, FrameType >::y(), TkRotation< T >::yx(), TkRotation< T >::yy(), TkRotation< T >::yz(), PV3DBase< T, PVType, FrameType >::z(), TkRotation< T >::zx(), TkRotation< T >::zy(), and TkRotation< T >::zz().

Referenced by getAlignableNavigator(), and saveSurveyToDB().

244  {
245  // Call service
247  if( !poolDbService.isAvailable() ) // Die if not available
248  throw cms::Exception("NotAvailable") << "PoolDBOutputService not available";
249 
250  // Get alignments and errors
251  Alignments *dtAlignments = new Alignments();
252  SurveyErrors *dtSurveyErrors = new SurveyErrors();
253 
254  align::Alignables alignableList;
255  recursiveList(theAlignableMuon->DTBarrel(), alignableList);
256 
257  for (align::Alignables::const_iterator alignable = alignableList.begin(); alignable != alignableList.end(); ++alignable) {
258  const align::PositionType &pos = (*alignable)->survey()->position();
259  const align::RotationType &rot = (*alignable)->survey()->rotation();
260 
261  AlignTransform value(CLHEP::Hep3Vector(pos.x(), pos.y(), pos.z()),
262  CLHEP::HepRotation(CLHEP::HepRep3x3(rot.xx(), rot.xy(), rot.xz(),
263  rot.yx(), rot.yy(), rot.yz(),
264  rot.zx(), rot.zy(), rot.zz())),
265  (*alignable)->id());
266  SurveyError error((*alignable)->alignableObjectId(), (*alignable)->id(), (*alignable)->survey()->errors());
267 
268  dtAlignments->m_align.push_back(value);
269  dtSurveyErrors->m_surveyErrors.push_back(error);
270  }
271 
272  // Store DT alignments and errors
273  poolDbService->writeOne<Alignments>( &(*dtAlignments), poolDbService->currentTime(), theDTSurveyRecordName);
274  poolDbService->writeOne<SurveyErrors>( &(*dtSurveyErrors), poolDbService->currentTime(), theDTSurveyErrorRecordName);
275 }
T xx() const
align::Alignables DTBarrel()
T y() const
Definition: PV3DBase.h:63
T yx() const
std::vector< AlignTransform > m_align
Definition: Alignments.h:19
T zx() const
T xy() const
T zz() const
std::string theDTSurveyRecordName
Definition: MuonAlignment.h:63
T z() const
Definition: PV3DBase.h:64
bool isAvailable() const
Definition: Service.h:40
T zy() const
void writeOne(T *payload, Time_t time, const std::string &recordName, bool withlogging=false)
Definition: value.py:1
T yy() const
AlignableMuon * theAlignableMuon
Definition: MuonAlignment.h:70
std::string theDTSurveyErrorRecordName
Definition: MuonAlignment.h:63
void recursiveList(const align::Alignables &alignables, align::Alignables &theList)
std::vector< Alignable * > Alignables
Definition: Utilities.h:32
T xz() const
std::vector< SurveyError > m_surveyErrors
Definition: SurveyErrors.h:23
T x() const
Definition: PV3DBase.h:62
T yz() const
void MuonAlignment::saveDTtoDB ( void  )

Definition at line 315 of file MuonAlignment.cc.

References cond::service::PoolDBOutputService::currentTime(), AlignableMuon::dtAlignmentErrorsExtended(), AlignableMuon::dtAlignments(), edm::Service< T >::isAvailable(), theAlignableMuon, theDTAlignRecordName, theDTErrorRecordName, and cond::service::PoolDBOutputService::writeOne().

Referenced by getAlignableNavigator(), and saveToDB().

315  {
316  // Call service
318  if( !poolDbService.isAvailable() ) // Die if not available
319  throw cms::Exception("NotAvailable") << "PoolDBOutputService not available";
320 
321  // Get alignments and errors
322  Alignments* dt_Alignments = theAlignableMuon->dtAlignments() ;
323  AlignmentErrorsExtended* dt_AlignmentErrorsExtended = theAlignableMuon->dtAlignmentErrorsExtended();
324 
325  // Store DT alignments and errors
326  poolDbService->writeOne<Alignments>( &(*dt_Alignments), poolDbService->currentTime(), theDTAlignRecordName);
327  poolDbService->writeOne<AlignmentErrorsExtended>( &(*dt_AlignmentErrorsExtended), poolDbService->currentTime(), theDTErrorRecordName);
328 }
std::string theDTAlignRecordName
Definition: MuonAlignment.h:61
Alignments * dtAlignments()
Get DT alignments sorted by DetId.
bool isAvailable() const
Definition: Service.h:40
void writeOne(T *payload, Time_t time, const std::string &recordName, bool withlogging=false)
AlignableMuon * theAlignableMuon
Definition: MuonAlignment.h:70
AlignmentErrorsExtended * dtAlignmentErrorsExtended()
Get DT alignment errors sorted by DetId.
std::string theDTErrorRecordName
Definition: MuonAlignment.h:61
void MuonAlignment::saveSurveyToDB ( void  )

Definition at line 310 of file MuonAlignment.cc.

References saveCSCSurveyToDB(), and saveDTSurveyToDB().

Referenced by MuonGeometryDBConverter::analyze(), and getAlignableNavigator().

310  {
313 }
void saveDTSurveyToDB()
void saveCSCSurveyToDB()
void MuonAlignment::saveToDB ( void  )

Definition at line 345 of file MuonAlignment.cc.

References saveCSCtoDB(), and saveDTtoDB().

Referenced by DTSurveyConvert::analyze(), MuonGeometryDBConverter::analyze(), and getAlignableNavigator().

345  {
346  saveDTtoDB();
347  saveCSCtoDB();
348 }
void MuonAlignment::writeXML ( const edm::ParameterSet iConfig,
const edm::EventSetup iSetup 
)

Definition at line 240 of file MuonAlignment.cc.

References theAlignableMuon, and MuonAlignmentOutputXML::write().

Referenced by MuonGeometryDBConverter::analyze(), and getAlignableNavigator().

240  {
242 }
void write(AlignableMuon *alignableMuon, const edm::EventSetup &iSetup) const
AlignableMuon * theAlignableMuon
Definition: MuonAlignment.h:70

Member Data Documentation

DQMStore* MuonAlignment::dbe
private

Definition at line 84 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

align::Scalars MuonAlignment::displacements
private

Definition at line 66 of file MuonAlignment.h.

bool MuonAlignment::doCSC
private

Definition at line 147 of file MuonAlignment.h.

Referenced by analyze(), beginJob(), and MuonAlignment().

bool MuonAlignment::doDT
private

Definition at line 147 of file MuonAlignment.h.

Referenced by analyze(), beginJob(), and MuonAlignment().

bool MuonAlignment::doSummary
private

Definition at line 147 of file MuonAlignment.h.

Referenced by beginJob(), endJob(), and MuonAlignment().

MonitorElement* MuonAlignment::hLocalAngleCSC
private

Definition at line 102 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalAngleDT
private

Definition at line 88 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalAngleRmsCSC
private

Definition at line 103 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalAngleRmsDT
private

Definition at line 89 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalPhiMeanCSC
private

Definition at line 109 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalPhiMeanDT
private

Definition at line 95 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalPhiRmsCSC
private

Definition at line 110 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalPhiRmsDT
private

Definition at line 96 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalPositionCSC
private

Definition at line 100 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalPositionDT
private

Definition at line 86 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalPositionRmsCSC
private

Definition at line 101 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalPositionRmsDT
private

Definition at line 87 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalThetaMeanCSC
private

Definition at line 111 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalThetaMeanDT
private

Definition at line 97 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalThetaRmsCSC
private

Definition at line 112 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalThetaRmsDT
private

Definition at line 98 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalXMeanCSC
private

Definition at line 105 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalXMeanDT
private

Definition at line 91 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalXRmsCSC
private

Definition at line 106 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalXRmsDT
private

Definition at line 92 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalYMeanCSC
private

Definition at line 107 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalYMeanDT
private

Definition at line 93 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalYRmsCSC
private

Definition at line 108 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalYRmsDT
private

Definition at line 94 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

double MuonAlignment::meanAngleRange
private

Definition at line 141 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

double MuonAlignment::meanPositionRange
private

Definition at line 141 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

std::string MuonAlignment::MEFolderName
private

Definition at line 163 of file MuonAlignment.h.

Referenced by MuonAlignment().

std::string MuonAlignment::metname
private

Definition at line 117 of file MuonAlignment.h.

Referenced by analyze(), beginJob(), endJob(), and MuonAlignment().

unsigned int MuonAlignment::min1DTrackRecHitSize
private

Definition at line 144 of file MuonAlignment.h.

Referenced by analyze(), and MuonAlignment().

unsigned int MuonAlignment::min4DTrackSegmentSize
private

Definition at line 144 of file MuonAlignment.h.

Referenced by analyze(), and MuonAlignment().

unsigned int MuonAlignment::nbins
private
int MuonAlignment::numberOfHits
private

Definition at line 160 of file MuonAlignment.h.

Referenced by analyze(), endJob(), and MuonAlignment().

int MuonAlignment::numberOfTracks
private

Definition at line 159 of file MuonAlignment.h.

Referenced by analyze(), endJob(), and MuonAlignment().

edm::ParameterSet MuonAlignment::parameters
private
double MuonAlignment::resLocalXRangeStation1
private

Definition at line 136 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

double MuonAlignment::resLocalXRangeStation2
private

Definition at line 136 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

double MuonAlignment::resLocalXRangeStation3
private

Definition at line 136 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

double MuonAlignment::resLocalXRangeStation4
private

Definition at line 136 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

double MuonAlignment::resLocalYRangeStation1
private

Definition at line 137 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

double MuonAlignment::resLocalYRangeStation2
private

Definition at line 137 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

double MuonAlignment::resLocalYRangeStation3
private

Definition at line 137 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

double MuonAlignment::resLocalYRangeStation4
private

Definition at line 137 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

double MuonAlignment::resPhiRange
private

Definition at line 138 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

double MuonAlignment::resThetaRange
private

Definition at line 138 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

double MuonAlignment::rmsAngleRange
private

Definition at line 141 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

double MuonAlignment::rmsPositionRange
private

Definition at line 141 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

align::Scalars MuonAlignment::rotations
private

Definition at line 68 of file MuonAlignment.h.

AlignableMuon* MuonAlignment::theAlignableMuon
private
AlignableNavigator* MuonAlignment::theAlignableNavigator
private
std::string MuonAlignment::theCSCAlignRecordName
private

Definition at line 62 of file MuonAlignment.h.

Referenced by init(), and saveCSCtoDB().

std::string MuonAlignment::theCSCErrorRecordName
private

Definition at line 62 of file MuonAlignment.h.

Referenced by init(), and saveCSCtoDB().

std::string MuonAlignment::theCSCSurveyErrorRecordName
private

Definition at line 64 of file MuonAlignment.h.

Referenced by init(), and saveCSCSurveyToDB().

std::string MuonAlignment::theCSCSurveyRecordName
private

Definition at line 64 of file MuonAlignment.h.

Referenced by init(), and saveCSCSurveyToDB().

std::string MuonAlignment::theDTAlignRecordName
private

Definition at line 61 of file MuonAlignment.h.

Referenced by init(), and saveDTtoDB().

std::string MuonAlignment::theDTErrorRecordName
private

Definition at line 61 of file MuonAlignment.h.

Referenced by init(), and saveDTtoDB().

std::string MuonAlignment::theDTSurveyErrorRecordName
private

Definition at line 63 of file MuonAlignment.h.

Referenced by init(), and saveDTSurveyToDB().

std::string MuonAlignment::theDTSurveyRecordName
private

Definition at line 63 of file MuonAlignment.h.

Referenced by init(), and saveDTSurveyToDB().

edm::EDGetTokenT<reco::TrackCollection> MuonAlignment::theMuonCollectionLabel
private

Definition at line 127 of file MuonAlignment.h.

Referenced by analyze(), and MuonAlignment().

edm::EDGetTokenT<CSCSegmentCollection> MuonAlignment::theRecHits4DTagCSC
private

Definition at line 131 of file MuonAlignment.h.

Referenced by analyze(), and MuonAlignment().

edm::EDGetTokenT<DTRecSegment4DCollection> MuonAlignment::theRecHits4DTagDT
private

Definition at line 129 of file MuonAlignment.h.

Referenced by analyze(), and MuonAlignment().

std::stringstream MuonAlignment::topFolder
private

Definition at line 164 of file MuonAlignment.h.

Referenced by beginJob(), endJob(), and MuonAlignment().

std::string MuonAlignment::trackRefitterType
private

Definition at line 133 of file MuonAlignment.h.

Referenced by analyze(), and doMatching().

std::vector<MonitorElement *> MuonAlignment::unitsLocalPhi
private

Definition at line 154 of file MuonAlignment.h.

Referenced by analyze(), beginJob(), and endJob().

std::vector<MonitorElement *> MuonAlignment::unitsLocalTheta
private

Definition at line 155 of file MuonAlignment.h.

Referenced by analyze(), beginJob(), and endJob().

std::vector<MonitorElement *> MuonAlignment::unitsLocalX
private

Definition at line 153 of file MuonAlignment.h.

Referenced by analyze(), beginJob(), and endJob().

std::vector<MonitorElement *> MuonAlignment::unitsLocalY
private

Definition at line 156 of file MuonAlignment.h.

Referenced by analyze(), beginJob(), and endJob().