CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private 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 &)
 Get the analysis. More...
 
void beginJob ()
 Inizialize parameters for histo binning. More...
 
void copyAlignmentToSurvey (double shiftErr, double angleErr)
 
void copySurveyToAlignment ()
 
void endJob (void)
 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 (align::Alignables alignables, align::Alignables &theList)
 
void recursiveMap (align::Alignables alignables, std::map< align::ID, Alignable * > &theMap)
 
void recursiveStructureMap (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 ()
 
virtual ~MuonAlignment ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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::InputTag theMuonCollectionLabel
 
edm::InputTag theRecHits4DTagCSC
 
edm::InputTag theRecHits4DTagDT
 
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
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
CurrentProcessingContext const * currentContext () const
 
- 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 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/09/15 11:52:25
Revision:
1.16
Author
Andre Sznajder - UERJ(Brazil)

DQM muon alignment analysis monitoring

Date:
2010/03/29 13:18:44
Revision:
1.4
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
const T & get() const
Definition: EventSetup.h:55
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.

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 13 of file MuonAlignment.cc.

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

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

Destructor.

Member Function Documentation

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

Get the analysis.

Implements edm::EDAnalyzer.

Definition at line 222 of file MuonAlignment.cc.

References CSCDetId::chamber(), doCSC, doDT, doMatching(), Reference_intrackfit_cff::endcap, CSCDetId::endcap(), TrajectoryStateOnSurface::freeState(), edm::EventSetup::get(), edm::Event::getByLabel(), TrajectoryStateOnSurface::globalPosition(), TrajectoryStateOnSurface::hasError(), i, reco::TransientTrack::innermostMeasurementState(), TrajectoryStateOnSurface::isValid(), TrajectoryStateOnSurface::localDirection(), TrajectoryStateOnSurface::localPosition(), LogTrace, metname, min1DTrackRecHitSize, min4DTrackSegmentSize, metsig::muon, patZpeak::muons, numberOfHits, numberOfTracks, reco::TransientTrack::outermostMeasurementState(), PV3DBase< T, PVType, FrameType >::perp(), position, edm::ESHandle< class >::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(), x, PV3DBase< T, PVType, FrameType >::x(), detailsBasic3DVector::y, PV3DBase< T, PVType, FrameType >::y(), detailsBasic3DVector::z, and PV3DBase< T, PVType, FrameType >::z().

222  {
223 
224  LogTrace(metname)<<"[MuonAlignment] Analysis of event # ";
225 
226  edm::ESHandle<MagneticField> theMGField;
227  iSetup.get<IdealMagneticFieldRecord>().get(theMGField);
228 
229  edm::ESHandle<GlobalTrackingGeometry> theTrackingGeometry;
230  iSetup.get<GlobalTrackingGeometryRecord>().get(theTrackingGeometry);
231 
232  edm::ESHandle<Propagator> thePropagatorOpp;
233  iSetup.get<TrackingComponentsRecord>().get( "SmartPropagatorOpposite", thePropagatorOpp );
234 
235  edm::ESHandle<Propagator> thePropagatorAlo;
236  iSetup.get<TrackingComponentsRecord>().get( "SmartPropagator", thePropagatorAlo );
237 
238 // edm::ESHandle<Propagator> thePropagator;
239 // iSetup.get<TrackingComponentsRecord>().get( "SmartPropagatorAnyOpposite", thePropagator );
240 
241  // Get the RecoMuons collection from the event
243  iEvent.getByLabel(theMuonCollectionLabel, muons);
244 
245  // Get the 4D DTSegments
247  iEvent.getByLabel(theRecHits4DTagDT, all4DSegmentsDT);
249 
250  // Get the 4D CSCSegments
251  edm::Handle<CSCSegmentCollection> all4DSegmentsCSC;
252  iEvent.getByLabel(theRecHits4DTagCSC, all4DSegmentsCSC);
254 
255  //Vectors used to perform the matching between Segments and hits from Track
256  intDVector indexCollectionDT;
257  intDVector indexCollectionCSC;
258 
259 
260 // thePropagator = new SteppingHelixPropagator(&*theMGField, alongMomentum);
261 
262  int countTracks = 0;
263  reco::TrackCollection::const_iterator muon;
264  for (muon = muons->begin(); muon != muons->end(); ++muon){
265 // if(muon->isGlobalMuon()){
266 // if(muon->isStandAloneMuon()){
267 
268  int countPoints = 0;
269 
270 // reco::TrackRef trackTR = muon->innerTrack();
271 // reco::TrackRef trackSA = muon->outerTrack();
272  //reco::TrackRef trackSA = muon;
273 
274  if(muon->recHitsSize()>(min1DTrackRecHitSize-1)) {
275 
276 // reco::TransientTrack tTrackTR( *trackTR, &*theMGField, theTrackingGeometry );
277  reco::TransientTrack tTrackSA(*muon,&*theMGField,theTrackingGeometry);
278 
279  // Adapted code for muonCosmics
280 
281  Double_t innerPerpSA = tTrackSA.innermostMeasurementState().globalPosition().perp();
282  Double_t outerPerpSA = tTrackSA.outermostMeasurementState().globalPosition().perp();
283 
284  TrajectoryStateOnSurface innerTSOS=tTrackSA.outermostMeasurementState();
285 // PropagationDirection propagationDir=alongMomentum;
286  const Propagator * thePropagator;
287 
288  // Define which kind of reco track is used
289  if ( (outerPerpSA-innerPerpSA) > 0 ) {
290 
291  trackRefitterType = "LHCLike";
292  innerTSOS = tTrackSA.innermostMeasurementState();
293  thePropagator = thePropagatorAlo.product();
294 // propagationDir = alongMomentum;
295 
296  }else {//if ((outerPerpSA-innerPerpSA) < 0 ) {
297 
298  trackRefitterType = "CosmicLike";
299  innerTSOS = tTrackSA.outermostMeasurementState();
300  thePropagator = thePropagatorOpp.product();
301 // propagationDir = oppositeToMomentum;
302 
303  }
304 
305  RecHitVector my4DTrack = this->doMatching(*muon, all4DSegmentsDT, all4DSegmentsCSC, &indexCollectionDT, &indexCollectionCSC, theTrackingGeometry);
306 
307 
308 //cut in number of segments
309  if(my4DTrack.size()>(min4DTrackSegmentSize-1) ){
310 
311 
312 // start propagation
313 // TrajectoryStateOnSurface innerTSOS = track.impactPointState();
314 // TrajectoryStateOnSurface innerTSOS = track.innermostMeasurementState();
315 
316  //If the state is valid
317  if(innerTSOS.isValid()) {
318 
319  //Loop over Associated segments
320  for(RecHitVector::iterator rechit = my4DTrack.begin(); rechit != my4DTrack.end(); ++rechit) {
321 
322  const GeomDet* geomDet = theTrackingGeometry->idToDet((*rechit)->geographicalId());
323 //Otherwise the propagator could throw an exception
324  const Plane* pDest = dynamic_cast<const Plane*>(&geomDet->surface());
325  const Cylinder* cDest = dynamic_cast<const Cylinder*>(&geomDet->surface());
326 
327  if(pDest != 0 || cDest != 0) {
328 
329 // Propagator *updatePropagator=thePropagator->clone();
330 // updatePropagator->setPropagationDirection(propagationDir);
331  TrajectoryStateOnSurface destiny = thePropagator->propagate(*(innerTSOS.freeState()), geomDet->surface());
332 
333  if(!destiny.isValid()|| !destiny.hasError()) continue;
334 
335  const long rawId= (*rechit)->geographicalId().rawId();
336  int position = -1;
337 
338  DetId myDet(rawId);
339  int det = myDet.subdetId();
340  int wheel=0,station=0,sector=0;
341  int endcap=0,ring=0,chamber=0;
342  bool goAhead = (det==1 && doDT) || (det==2 && doCSC);
343 
344  double residualLocalX=0,residualLocalPhi=0,residualLocalY=0,residualLocalTheta=0;
345 
346  // Fill generic histograms
347  //If it's a DT
348  if(det == 1 && doDT) {
349  DTChamberId myChamber(rawId);
350  wheel=myChamber.wheel();
351  station = myChamber.station();
352  sector=myChamber.sector();
353 
354  residualLocalX = (*rechit)->localPosition().x() -destiny.localPosition().x();
355 
356 
357  residualLocalPhi = atan2(((RecSegment *)(*rechit))->localDirection().z(),
358  ((RecSegment*)(*rechit))->localDirection().x()) - atan2(destiny.localDirection().z(), destiny.localDirection().x());
359  if(station!=4){
360 
361  residualLocalY = (*rechit)->localPosition().y() - destiny.localPosition().y();
362 
363 
364  residualLocalTheta = atan2(((RecSegment *)(*rechit))->localDirection().z(),
365  ((RecSegment*)(*rechit))->localDirection().y()) - atan2(destiny.localDirection().z(), destiny.localDirection().y());
366 
367  }
368 
369  }
370  else if (det==2 && doCSC){
371  CSCDetId myChamber(rawId);
372  endcap= myChamber.endcap();
373  station = myChamber.station();
374  if(endcap==2) station = -station;
375  ring = myChamber.ring();
376  chamber=myChamber.chamber();
377 
378  residualLocalX = (*rechit)->localPosition().x() -destiny.localPosition().x();
379 
380  residualLocalY = (*rechit)->localPosition().y() - destiny.localPosition().y();
381 
382  residualLocalPhi = atan2(((RecSegment *)(*rechit))->localDirection().y(),
383  ((RecSegment*)(*rechit))->localDirection().x()) - atan2(destiny.localDirection().y(), destiny.localDirection().x());
384 
385  residualLocalTheta = atan2(((RecSegment *)(*rechit))->localDirection().y(),
386  ((RecSegment*)(*rechit))->localDirection().z()) - atan2(destiny.localDirection().y(), destiny.localDirection().z());
387 
388  }
389  else{
390  residualLocalX=0,residualLocalPhi=0,residualLocalY=0,residualLocalTheta=0;
391  }
392 
393  // Fill individual chamber histograms
394 
395 
396  std::string nameOfHistoLocalX;
397 
398 
399  if(det==1 && doDT){ // DT
400  std::stringstream Wheel; Wheel<<wheel;
401  std::stringstream Station; Station<<station;
402  std::stringstream Sector; Sector<<sector;
403 
404  nameOfHistoLocalX="ResidualLocalX_W"+Wheel.str()+"MB"+Station.str()+"S"+Sector.str();
405 
406  }
407  else if(det==2 && doCSC){ //CSC
408  std::stringstream Ring; Ring<<ring;
409  std::stringstream Station; Station<<station;
410  std::stringstream Chamber; Chamber<<chamber;
411 
412  nameOfHistoLocalX="ResidualLocalX_ME"+Station.str()+"R"+Ring.str()+"C"+Chamber.str();
413  }
414 
415  if (goAhead){
416 
417  for(unsigned int i=0 ; i<unitsLocalX.size() ; i++)
418  {
419 
420  if( nameOfHistoLocalX==unitsLocalX[i]->getName()){
421  position=i; break;}
422  }
423 
424 
425  if(trackRefitterType == "CosmicLike") { //problem with angle convention in reverse extrapolation
426  residualLocalPhi += 3.1416;
427  residualLocalTheta +=3.1416;
428  }
429 
430  unitsLocalX.at(position)->Fill(residualLocalX);
431  unitsLocalPhi.at(position)->Fill(residualLocalPhi);
432 
433  if(det==1 && station!=4) {unitsLocalY.at(position)->Fill(residualLocalY);
434  unitsLocalTheta.at(position)->Fill(residualLocalTheta);}
435 
436  else if(det==2) {unitsLocalY.at(position)->Fill(residualLocalY);
437  unitsLocalTheta.at(position)->Fill(residualLocalTheta);}
438 
439 
440  countPoints++;
441  // if at least one point from this track is used, count this track
442  if (countPoints==1) countTracks++;
443  }
444 
445  innerTSOS = destiny;
446 
447  //delete thePropagator;
448 
449  }else {
450  edm::LogError("MuonAlignment") <<" Error!! Exception in propagator catched" << std::endl;
451  continue;
452  }
453 
454  } //loop over my4DTrack
455  } //TSOS was valid
456 
457  } // cut in at least 4 segments
458 
459  } //end cut in RecHitsSize>36
460  numberOfHits=numberOfHits+countPoints;
461 // } //Muon is GlobalMuon
462  } //loop over Muons
463  numberOfTracks=numberOfTracks+countTracks;
464 
465 // delete thePropagator;
466 
467 // else edm::LogError("MuonAlignment")<<"Error!! Specified MuonCollection "<< theMuonTrackCollectionLabel <<" is not present in event. ProductNotFound!!"<<std::endl;
468 }
std::vector< MonitorElement * > unitsLocalX
int i
Definition: DBlmapReader.cc:9
RecHitVector doMatching(const reco::Track &, edm::Handle< DTRecSegment4DCollection > &, edm::Handle< CSCSegmentCollection > &, intDVector *, intDVector *, edm::ESHandle< GlobalTrackingGeometry > &)
LocalVector localDirection() const
std::string trackRefitterType
T y() const
Definition: PV3DBase.h:63
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:35
Definition: Plane.h:17
float float float z
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
std::vector< TrackingRecHit * > RecHitVector
C::const_iterator const_iterator
constant access iterator type
Definition: RangeMap.h:45
edm::InputTag theMuonCollectionLabel
FreeTrajectoryState * freeState(bool withErrors=true) const
T z() const
Definition: PV3DBase.h:64
std::string metname
std::vector< MonitorElement * > unitsLocalTheta
edm::InputTag theRecHits4DTagDT
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
#define LogTrace(id)
std::vector< MonitorElement * > unitsLocalPhi
virtual TrajectoryStateOnSurface propagate(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:12
Definition: DetId.h:20
std::vector< std::vector< int > > intDVector
std::vector< MonitorElement * > unitsLocalY
edm::InputTag theRecHits4DTagCSC
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
unsigned int min1DTrackRecHitSize
tuple muons
Definition: patZpeak.py:38
Definition: DDAxes.h:10
unsigned int min4DTrackSegmentSize
T x() const
Definition: PV3DBase.h:62
void MuonAlignment::beginJob ( void  )
virtual

Inizialize parameters for histo binning.

Reimplemented from edm::EDAnalyzer.

Definition at line 61 of file MuonAlignment.cc.

References abs, DQMStore::book1D(), DQMStore::book2D(), 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, cppFunctionSkipper::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, and unitsLocalY.

61  {
62 
63 
64  LogTrace(metname)<<"[MuonAlignment] Parameters initialization";
65 
66  if(!(doDT || doCSC) ) {
67  edm::LogError("MuonAlignment") <<" Error!! At least one Muon subsystem (DT or CSC) must be monitorized!!" << std::endl;
68  edm::LogError("MuonAlignment") <<" Please enable doDT or doCSC to True in your python cfg file!!!" << std::endl;
69  exit(1);
70  }
71 
73 
74  if (doSummary){
75  if (doDT){
76  dbe->setCurrentFolder(topFolder.str()+"/DT");
77  hLocalPositionDT=dbe->book2D("hLocalPositionDT","Local DT position (cm) absolute MEAN residuals;Sector;;cm", 14,1, 15,40,0,40);
78  hLocalAngleDT=dbe->book2D("hLocalAngleDT","Local DT angle (rad) absolute MEAN residuals;Sector;;rad", 14,1, 15,40,0,40);
79  hLocalPositionRmsDT=dbe->book2D("hLocalPositionRmsDT","Local DT position (cm) RMS residuals;Sector;;cm", 14,1, 15,40,0,40);
80  hLocalAngleRmsDT=dbe->book2D("hLocalAngleRmsDT","Local DT angle (rad) RMS residuals;Sector;;rad", 14,1, 15,40,0,40);
81 
82  hLocalXMeanDT=dbe->book1D("hLocalXMeanDT","Distribution of absolute MEAN Local X (cm) residuals for DT;<X> (cm);number of chambers",100,0,meanPositionRange);
83  hLocalXRmsDT=dbe->book1D("hLocalXRmsDT","Distribution of RMS Local X (cm) residuals for DT;X RMS (cm);number of chambers", 100,0,rmsPositionRange);
84  hLocalYMeanDT=dbe->book1D("hLocalYMeanDT","Distribution of absolute MEAN Local Y (cm) residuals for DT;<Y> (cm);number of chambers", 100,0,meanPositionRange);
85  hLocalYRmsDT=dbe->book1D("hLocalYRmsDT","Distribution of RMS Local Y (cm) residuals for DT;Y RMS (cm);number of chambers", 100,0,rmsPositionRange);
86 
87  hLocalPhiMeanDT=dbe->book1D("hLocalPhiMeanDT","Distribution of MEAN #phi (rad) residuals for DT;<#phi>(rad);number of chambers", 100,-meanAngleRange,meanAngleRange);
88  hLocalPhiRmsDT=dbe->book1D("hLocalPhiRmsDT","Distribution of RMS #phi (rad) residuals for DT;#phi RMS (rad);number of chambers", 100,0,rmsAngleRange);
89  hLocalThetaMeanDT=dbe->book1D("hLocalThetaMeanDT","Distribution of MEAN #theta (rad) residuals for DT;<#theta>(rad);number of chambers", 100,-meanAngleRange,meanAngleRange);
90  hLocalThetaRmsDT=dbe->book1D("hLocalThetaRmsDT","Distribution of RMS #theta (rad) residuals for DT;#theta RMS (rad);number of chambers",100,0,rmsAngleRange);
91  }
92 
93  if (doCSC){
94  dbe->setCurrentFolder(topFolder.str()+"/CSC");
95  hLocalPositionCSC=dbe->book2D("hLocalPositionCSC","Local CSC position (cm) absolute MEAN residuals;Sector;;cm",36,1,37,40,0,40);
96  hLocalAngleCSC=dbe->book2D("hLocalAngleCSC","Local CSC angle (rad) absolute MEAN residuals;Sector;;rad", 36,1,37,40,0,40);
97  hLocalPositionRmsCSC=dbe->book2D("hLocalPositionRmsCSC","Local CSC position (cm) RMS residuals;Sector;;cm", 36,1,37,40,0,40);
98  hLocalAngleRmsCSC=dbe->book2D("hLocalAngleRmsCSC","Local CSC angle (rad) RMS residuals;Sector;;rad", 36,1,37,40,0,40);
99 
100  hLocalXMeanCSC=dbe->book1D("hLocalXMeanCSC","Distribution of absolute MEAN Local X (cm) residuals for CSC;<X> (cm);number of chambers",100,0,meanPositionRange);
101  hLocalXRmsCSC=dbe->book1D("hLocalXRmsCSC","Distribution of RMS Local X (cm) residuals for CSC;X RMS (cm);number of chambers", 100,0,rmsPositionRange);
102  hLocalYMeanCSC=dbe->book1D("hLocalYMeanCSC","Distribution of absolute MEAN Local Y (cm) residuals for CSC;<Y> (cm);number of chambers", 100,0,meanPositionRange);
103  hLocalYRmsCSC=dbe->book1D("hLocalYRmsCSC","Distribution of RMS Local Y (cm) residuals for CSC;Y RMS (cm);number of chambers", 100,0,rmsPositionRange);
104 
105  hLocalPhiMeanCSC=dbe->book1D("hLocalPhiMeanCSC","Distribution of absolute MEAN #phi (rad) residuals for CSC;<#phi>(rad);number of chambers", 100,0,meanAngleRange);
106  hLocalPhiRmsCSC=dbe->book1D("hLocalPhiRmsCSC","Distribution of RMS #phi (rad) residuals for CSC;#phi RMS (rad);number of chambers", 100,0,rmsAngleRange);
107  hLocalThetaMeanCSC=dbe->book1D("hLocalThetaMeanCSC","Distribution of absolute MEAN #theta (rad) residuals for CSC;<#theta>(rad);number of chambers", 100,0,meanAngleRange);
108  hLocalThetaRmsCSC=dbe->book1D("hLocalThetaRmsCSC","Distribution of RMS #theta (rad) residuals for CSC;#theta RMS (rad);number of chambers",100,0,rmsAngleRange);
109  }
110  }
111 
112 
113  // Chamber individual histograms
114  // I need to create all of them even if they are empty to allow proper root merging
115 
116  // variables for histos ranges
117  double rangeX=0,rangeY=0;
118  std::string nameOfHistoLocalX,nameOfHistoLocalY,nameOfHistoLocalPhi,nameOfHistoLocalTheta;
119 
120  for (int station = -4; station<5; station++){
121 
122  //This piece of code calculates the range of the residuals
123  switch(abs(station)) {
124  case 1:
125  {rangeX = resLocalXRangeStation1; rangeY = resLocalYRangeStation1;}
126  break;
127  case 2:
128  {rangeX = resLocalXRangeStation2; rangeY = resLocalYRangeStation2;}
129  break;
130  case 3:
131  {rangeX = resLocalXRangeStation3; rangeY = resLocalYRangeStation3;}
132  break;
133  case 4:
134  {rangeX = resLocalXRangeStation4; rangeY = resLocalYRangeStation4;}
135  break;
136  default:
137  break;
138  }
139  if (doDT){
140  if(station>0){
141 
142  for(int wheel=-2;wheel<3;wheel++){
143 
144  for (int sector=1;sector<15;sector++){
145 
146  if(!((sector==13 || sector ==14) && station!=4)){
147 
148  std::stringstream Wheel; Wheel<<wheel;
149  std::stringstream Station; Station<<station;
150  std::stringstream Sector; Sector<<sector;
151 
152  nameOfHistoLocalX="ResidualLocalX_W"+Wheel.str()+"MB"+Station.str()+"S"+Sector.str();
153  nameOfHistoLocalPhi= "ResidualLocalPhi_W"+Wheel.str()+"MB"+Station.str()+"S"+Sector.str();
154  nameOfHistoLocalTheta= "ResidualLocalTheta_W"+Wheel.str()+"MB"+Station.str()+"S"+Sector.str();
155  nameOfHistoLocalY= "ResidualLocalY_W"+Wheel.str()+"MB"+Station.str()+"S"+Sector.str();
156 
158  "/DT/Wheel"+Wheel.str()+
159  "/Station"+Station.str()+
160  "/Sector"+Sector.str());
161 
162  //Create ME and push histos into their respective vectors
163 
164  MonitorElement *histoLocalX = dbe->book1D(nameOfHistoLocalX, nameOfHistoLocalX, nbins, -rangeX, rangeX);
165  unitsLocalX.push_back(histoLocalX);
166  MonitorElement *histoLocalPhi = dbe->book1D(nameOfHistoLocalPhi, nameOfHistoLocalPhi, nbins, -resPhiRange, resPhiRange);
167  unitsLocalPhi.push_back(histoLocalPhi);
168  MonitorElement *histoLocalTheta = dbe->book1D(nameOfHistoLocalTheta, nameOfHistoLocalTheta, nbins, -resThetaRange, resThetaRange);
169  unitsLocalTheta.push_back(histoLocalTheta);
170  MonitorElement *histoLocalY = dbe->book1D(nameOfHistoLocalY, nameOfHistoLocalY, nbins, -rangeY, rangeY);
171  unitsLocalY.push_back(histoLocalY);
172  }
173  }
174  }
175  } //station>0
176  }// doDT
177 
178  if (doCSC){
179  if(station!=0){
180 
181  for(int ring=1;ring<5;ring++){
182 
183  for(int chamber=1;chamber<37;chamber++){
184 
185  if( !( ((abs(station)==2 || abs(station)==3 || abs(station)==4) && ring==1 && chamber>18) ||
186  ((abs(station)==2 || abs(station)==3 || abs(station)==4) && ring>2)) ){
187  std::stringstream Ring; Ring<<ring;
188  std::stringstream Station; Station<<station;
189  std::stringstream Chamber; Chamber<<chamber;
190 
191  nameOfHistoLocalX="ResidualLocalX_ME"+Station.str()+"R"+Ring.str()+"C"+Chamber.str();
192  nameOfHistoLocalPhi= "ResidualLocalPhi_ME"+Station.str()+"R"+Ring.str()+"C"+Chamber.str();
193  nameOfHistoLocalTheta= "ResidualLocalTheta_ME"+Station.str()+"R"+Ring.str()+"C"+Chamber.str();
194  nameOfHistoLocalY= "ResidualLocalY_ME"+Station.str()+"R"+Ring.str()+"C"+Chamber.str();
195 
197  "/CSC/Station"+Station.str()+
198  "/Ring"+Ring.str()+
199  "/Chamber"+Chamber.str());
200 
201  //Create ME and push histos into their respective vectors
202 
203  MonitorElement *histoLocalX = dbe->book1D(nameOfHistoLocalX, nameOfHistoLocalX, nbins, -rangeX, rangeX);
204  unitsLocalX.push_back(histoLocalX);
205  MonitorElement *histoLocalPhi = dbe->book1D(nameOfHistoLocalPhi, nameOfHistoLocalPhi, nbins, -resPhiRange, resPhiRange);
206  unitsLocalPhi.push_back(histoLocalPhi);
207  MonitorElement *histoLocalTheta = dbe->book1D(nameOfHistoLocalTheta, nameOfHistoLocalTheta, nbins, -resThetaRange, resThetaRange);
208  unitsLocalTheta.push_back(histoLocalTheta);
209  MonitorElement *histoLocalY = dbe->book1D(nameOfHistoLocalY, nameOfHistoLocalY, nbins, -rangeY, rangeY);
210  unitsLocalY.push_back(histoLocalY);
211 
212  }
213  }
214  }
215  } // station!=0
216  }// doCSC
217 
218  } // loop on stations
219 }
MonitorElement * hLocalPhiRmsDT
std::vector< MonitorElement * > unitsLocalX
MonitorElement * hLocalPositionRmsDT
Definition: MuonAlignment.h:92
MonitorElement * hLocalThetaMeanCSC
MonitorElement * hLocalYMeanDT
Definition: MuonAlignment.h:98
MonitorElement * hLocalPhiRmsCSC
double resLocalYRangeStation2
DQMStore * dbe
Definition: MuonAlignment.h:89
MonitorElement * hLocalYRmsCSC
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:722
MonitorElement * hLocalPositionCSC
double resLocalXRangeStation1
MonitorElement * hLocalXMeanDT
Definition: MuonAlignment.h:96
double resLocalYRangeStation1
double resPhiRange
MonitorElement * hLocalPhiMeanDT
#define abs(x)
Definition: mlp_lapack.h:159
double meanAngleRange
double resThetaRange
MonitorElement * hLocalAngleRmsCSC
MonitorElement * hLocalAngleRmsDT
Definition: MuonAlignment.h:94
double resLocalXRangeStation2
std::string metname
MonitorElement * hLocalAngleDT
Definition: MuonAlignment.h:93
MonitorElement * hLocalThetaRmsDT
std::vector< MonitorElement * > unitsLocalTheta
MonitorElement * hLocalYRmsDT
Definition: MuonAlignment.h:99
MonitorElement * hLocalThetaRmsCSC
MonitorElement * hLocalXMeanCSC
MonitorElement * hLocalYMeanCSC
#define LogTrace(id)
unsigned int nbins
std::vector< MonitorElement * > unitsLocalPhi
double rmsPositionRange
double rmsAngleRange
std::vector< MonitorElement * > unitsLocalY
MonitorElement * hLocalPhiMeanCSC
MonitorElement * hLocalAngleCSC
double resLocalYRangeStation3
MonitorElement * hLocalXRmsDT
Definition: MuonAlignment.h:97
double resLocalYRangeStation4
double meanPositionRange
MonitorElement * hLocalPositionRmsCSC
MonitorElement * hLocalXRmsCSC
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:850
std::stringstream topFolder
MonitorElement * hLocalThetaMeanDT
MonitorElement * hLocalPositionDT
Definition: MuonAlignment.h:91
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
double resLocalXRangeStation4
double resLocalXRangeStation3
void MuonAlignment::copyAlignmentToSurvey ( double  shiftErr,
double  angleErr 
)

Definition at line 139 of file MuonAlignment.cc.

References convertSQLitetoXML_cfg::angleErr, filterCSVwithJSON::copy, AlignableMuon::cscAlignmentErrors(), AlignableMuon::CSCEndcaps(), AlignableMuon::dtAlignmentErrors(), AlignableMuon::DTBarrel(), fillGapsInSurvey(), i, j, AlignmentErrors::m_alignError, recursiveMap(), Alignable::setSurvey(), Alignable::surface(), and theAlignableMuon.

Referenced by MuonGeometryDBConverter::analyze().

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
145  AlignmentErrors* dtAlignmentErrors = theAlignableMuon->dtAlignmentErrors();
146  AlignmentErrors* cscAlignmentErrors = theAlignableMuon->cscAlignmentErrors();
147  std::vector<AlignTransformError> alignmentErrors;
148  std::copy(dtAlignmentErrors->m_alignError.begin(), dtAlignmentErrors->m_alignError.end(), std::back_inserter(alignmentErrors));
149  std::copy(cscAlignmentErrors->m_alignError.begin(), cscAlignmentErrors->m_alignError.end(), std::back_inserter(alignmentErrors));
150 
151  for (std::vector<AlignTransformError>::const_iterator alignmentError = alignmentErrors.begin();
152  alignmentError != alignmentErrors.end();
153  ++alignmentError) {
154  align::ErrorMatrix matrix6x6 = ROOT::Math::SMatrixIdentity();
155  CLHEP::HepSymMatrix matrix3x3 = alignmentError->matrix();
156 
157  for (int i = 0; i < 3; i++) {
158  for (int j = 0; j < 3; j++) {
159  matrix6x6(i, j) = matrix3x3(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 }
int i
Definition: DBlmapReader.cc:9
AlignmentErrors * dtAlignmentErrors()
align::Alignables DTBarrel()
std::vector< AlignTransformError > m_alignError
align::Alignables CSCEndcaps()
AlignmentErrors * cscAlignmentErrors()
int j
Definition: DBlmapReader.cc:9
AlignableMuon * theAlignableMuon
Definition: MuonAlignment.h:70
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
Definition: Alignable.h:126
void fillGapsInSurvey(double shiftErr, double angleErr)
void setSurvey(const SurveyDet *)
Set survey info.
Definition: Alignable.cc:268
void recursiveMap(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().

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 470 of file MuonAlignment.cc.

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

Referenced by analyze().

470  {
471 
474 
475  std::vector<int> positionDT;
476  std::vector<int> positionCSC;
477  RecHitVector my4DTrack;
478 
479  //Loop over the hits of the track
480  for(unsigned int counter = 0; counter != staTrack.recHitsSize()-1; counter++) {
481 
482  TrackingRecHitRef myRef = staTrack.recHit(counter);
483  const TrackingRecHit *rechit = myRef.get();
484  const GeomDet* geomDet = theTrackingGeometry->idToDet(rechit->geographicalId());
485 
486  //It's a DT Hit
487  if(geomDet->subDetector() == GeomDetEnumerators::DT) {
488 
489  //Take the layer associated to this hit
490  DTLayerId myLayer(rechit->geographicalId().rawId());
491 
492  int NumberOfDTSegment = 0;
493  //Loop over segments
494  for(segmentDT = all4DSegmentsDT->begin(); segmentDT != all4DSegmentsDT->end(); ++segmentDT) {
495 
496  //By default the chamber associated to this Segment is new
497  bool isNewChamber = true;
498 
499  //Loop over segments already included in the vector of segments in the actual track
500  for(std::vector<int>::iterator positionIt = positionDT.begin(); positionIt != positionDT.end(); positionIt++) {
501 
502  //If this segment has been used before isNewChamber = false
503  if(NumberOfDTSegment == *positionIt) isNewChamber = false;
504  }
505 
506  //Loop over vectors of segments associated to previous tracks
507  for(std::vector<std::vector<int> >::iterator collect = indexCollectionDT->begin(); collect != indexCollectionDT->end(); ++collect) {
508 
509  //Loop over segments associated to a track
510  for(std::vector<int>::iterator positionIt = (*collect).begin(); positionIt != (*collect).end(); positionIt++) {
511 
512  //If this segment was used in a previos track then isNewChamber = false
513  if(NumberOfDTSegment == *positionIt) isNewChamber = false;
514  }
515  }
516 
517  //If the chamber is new
518  if(isNewChamber) {
519 
520  DTChamberId myChamber((*segmentDT).geographicalId().rawId());
521  //If the layer of the hit belongs to the chamber of the 4D Segment
522  if(myLayer.wheel() == myChamber.wheel() && myLayer.station() == myChamber.station() && myLayer.sector() == myChamber.sector()) {
523 
524  //push position of the segment and tracking rechit
525  positionDT.push_back(NumberOfDTSegment);
526  my4DTrack.push_back((TrackingRecHit *) &(*segmentDT));
527  }
528  }
529  NumberOfDTSegment++;
530  }
531  //In case is a CSC
532  } else if (geomDet->subDetector() == GeomDetEnumerators::CSC) {
533 
534  //Take the layer associated to this hit
535  CSCDetId myLayer(rechit->geographicalId().rawId());
536 
537  int NumberOfCSCSegment = 0;
538  //Loop over 4Dsegments
539  for(segmentCSC = all4DSegmentsCSC->begin(); segmentCSC != all4DSegmentsCSC->end(); segmentCSC++) {
540 
541  //By default the chamber associated to the segment is new
542  bool isNewChamber = true;
543 
544  //Loop over segments in the current track
545  for(std::vector<int>::iterator positionIt = positionCSC.begin(); positionIt != positionCSC.end(); positionIt++) {
546 
547  //If this segment has been used then newchamber = false
548  if(NumberOfCSCSegment == *positionIt) isNewChamber = false;
549  }
550  //Loop over vectors of segments in previous tracks
551  for(std::vector<std::vector<int> >::iterator collect = indexCollectionCSC->begin(); collect != indexCollectionCSC->end(); ++collect) {
552 
553  //Loop over segments in a track
554  for(std::vector<int>::iterator positionIt = (*collect).begin(); positionIt != (*collect).end(); positionIt++) {
555 
556  //If the segment was used in a previous track isNewChamber = false
557  if(NumberOfCSCSegment == *positionIt) isNewChamber = false;
558  }
559  }
560  //If the chamber is new
561  if(isNewChamber) {
562 
563  CSCDetId myChamber((*segmentCSC).geographicalId().rawId());
564  //If the chambers are the same
565  if(myLayer.chamberId() == myChamber.chamberId()) {
566  //push
567  positionCSC.push_back(NumberOfCSCSegment);
568  my4DTrack.push_back((TrackingRecHit *) &(*segmentCSC));
569  }
570  }
571  NumberOfCSCSegment++;
572  }
573  }
574  }
575 
576  indexCollectionDT->push_back(positionDT);
577  indexCollectionCSC->push_back(positionCSC);
578 
579  if ( trackRefitterType == "CosmicLike") {
580 
581  std::reverse(my4DTrack.begin(),my4DTrack.end());
582 
583  }
584  return my4DTrack;
585 
586 
587 }
size_t recHitsSize() const
Get number of RecHits. (Warning, this includes invalid hits, which are not physical hits)...
Definition: Track.h:69
std::string trackRefitterType
virtual SubDetector subDetector() const =0
Which subdetector.
std::vector< TrackingRecHit * > RecHitVector
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
C::const_iterator const_iterator
constant access iterator type
Definition: RangeMap.h:45
TrackingRecHitRef recHit(size_t i) const
Get i-th hit on the track.
Definition: Track.h:67
DetId geographicalId() const
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:242
void MuonAlignment::endJob ( void  )
virtual

Save the histos.

Reimplemented from edm::EDAnalyzer.

Definition at line 591 of file MuonAlignment.cc.

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

591  {
592 
593 
594  LogTrace(metname)<<"[MuonAlignment] Saving the histos";
595  bool outputMEsInRootFile = parameters.getParameter<bool>("OutputMEsInRootFile");
597 
598  edm::LogInfo("MuonAlignment") << "Number of Tracks considered for residuals: " << numberOfTracks << std::endl << std::endl;
599  edm::LogInfo("MuonAlignment") << "Number of Hits considered for residuals: " << numberOfHits << std::endl << std::endl;
600 
601  if (doSummary){
602  char binLabel[15];
603 
604  // check if ME still there (and not killed by MEtoEDM for memory saving)
605  if( dbe )
606  {
607  // check existence of first histo in the list
608  if (! dbe->get(topFolder.str()+"/DT/hLocalPositionDT")) return;
609  }
610  else
611  return;
612 
613 
614  for(unsigned int i=0 ; i<unitsLocalX.size() ; i++)
615  {
616 
617  if(unitsLocalX[i]->getEntries()!=0){
618 
619  TString nameHistoLocalX=unitsLocalX[i]->getName();
620 
621  TString nameHistoLocalPhi=unitsLocalPhi[i]->getName();
622 
623  TString nameHistoLocalTheta=unitsLocalTheta[i]->getName();
624 
625  TString nameHistoLocalY=unitsLocalY[i]->getName();
626 
627 
628  if (nameHistoLocalX.Contains("MB") ) // HistoLocalX DT
629  {
630  int wheel, station, sector;
631 
632  sscanf(nameHistoLocalX, "ResidualLocalX_W%dMB%1dS%d",&wheel,&station,&sector);
633 
634  Int_t nstation=station - 1;
635  Int_t nwheel=wheel+2;
636 
637  Double_t Mean=unitsLocalX[i]->getMean();
638  Double_t Error=unitsLocalX[i]->getMeanError();
639 
640  Int_t ybin=1+nwheel*8+nstation*2;
641  hLocalPositionDT->setBinContent(sector,ybin,fabs(Mean));
642  snprintf(binLabel, sizeof(binLabel), "MB%d/%d_X",wheel, station );
643  hLocalPositionDT->setBinLabel(ybin,binLabel,2);
644  hLocalPositionRmsDT->setBinContent(sector,ybin,Error);
645  hLocalPositionRmsDT->setBinLabel(ybin,binLabel,2);
646 
647  hLocalXMeanDT->Fill(fabs(Mean));
648  hLocalXRmsDT->Fill(Error);
649  }
650 
651  if (nameHistoLocalX.Contains("ME")) // HistoLocalX CSC
652  {
653  int station, ring, chamber;
654 
655  sscanf(nameHistoLocalX, "ResidualLocalX_ME%dR%1dC%d",&station,&ring,&chamber);
656 
657  Double_t Mean=unitsLocalX[i]->getMean();
658  Double_t Error=unitsLocalX[i]->getMeanError();
659 
660  Int_t ybin=abs(station)*2+ring;
661  if(abs(station)==1) ybin=ring;
662  if (station>0) ybin=ybin+10;
663  else ybin = 11 -ybin;
664  ybin=2*ybin-1;
665  hLocalPositionCSC->setBinContent(chamber,ybin,fabs(Mean));
666  snprintf(binLabel, sizeof(binLabel), "ME%d/%d_X", station,ring );
667  hLocalPositionCSC->setBinLabel(ybin,binLabel,2);
668  hLocalPositionRmsCSC->setBinContent(chamber,ybin,Error);
669  hLocalPositionRmsCSC->setBinLabel(ybin,binLabel,2);
670 
671  hLocalXMeanCSC->Fill(fabs(Mean));
672  hLocalXRmsCSC->Fill(Error);
673  }
674 
675  if (nameHistoLocalTheta.Contains("MB")) // HistoLocalTheta DT
676  {
677 
678  int wheel, station, sector;
679 
680  sscanf(nameHistoLocalTheta, "ResidualLocalTheta_W%dMB%1dS%d",&wheel,&station,&sector);
681 
682  if(station != 4){
683  Int_t nstation=station - 1;
684  Int_t nwheel=wheel+2;
685 
686  Double_t Mean=unitsLocalTheta[i]->getMean();
687  Double_t Error=unitsLocalTheta[i]->getMeanError();
688 
689  Int_t ybin=2+nwheel*8+nstation*2;
690  hLocalAngleDT->setBinContent(sector,ybin,fabs(Mean));
691  snprintf(binLabel, sizeof(binLabel), "MB%d/%d_#theta",wheel,station );
692  hLocalAngleDT->setBinLabel(ybin,binLabel,2);
693  hLocalAngleRmsDT->setBinContent(sector,ybin,Error);
694  hLocalAngleRmsDT->setBinLabel(ybin,binLabel,2);
695 
696  hLocalThetaMeanDT->Fill(fabs(Mean));
697  hLocalThetaRmsDT->Fill(Error);
698  }
699  }
700 
701  if (nameHistoLocalPhi.Contains("MB")) // HistoLocalPhi DT
702  {
703 
704  int wheel, station, sector;
705 
706  sscanf(nameHistoLocalPhi, "ResidualLocalPhi_W%dMB%1dS%d",&wheel,&station,&sector);
707 
708  Int_t nstation=station - 1;
709  Int_t nwheel=wheel+2;
710 
711  Double_t Mean=unitsLocalPhi[i]->getMean();
712  Double_t Error=unitsLocalPhi[i]->getMeanError();
713 
714  Int_t ybin=1+nwheel*8+nstation*2;
715  hLocalAngleDT->setBinContent(sector,ybin,fabs(Mean));
716  snprintf(binLabel, sizeof(binLabel), "MB%d/%d_#phi", wheel,station );
717  hLocalAngleDT->setBinLabel(ybin,binLabel,2);
718  hLocalAngleRmsDT->setBinContent(sector,ybin,Error);
719  hLocalAngleRmsDT->setBinLabel(ybin,binLabel,2);
720 
721  hLocalPhiMeanDT->Fill(fabs(Mean));
722  hLocalPhiRmsDT->Fill(Error);
723  }
724 
725  if (nameHistoLocalPhi.Contains("ME")) // HistoLocalPhi CSC
726  {
727 
728  int station, ring, chamber;
729 
730  sscanf(nameHistoLocalPhi, "ResidualLocalPhi_ME%dR%1dC%d",&station,&ring,&chamber);
731 
732  Double_t Mean=unitsLocalPhi[i]->getMean();
733  Double_t Error=unitsLocalPhi[i]->getMeanError();
734 
735  Int_t ybin=abs(station)*2+ring;
736  if(abs(station)==1) ybin=ring;
737  if (station>0) ybin=ybin+10;
738  else ybin = 11 -ybin;
739  ybin=2*ybin-1;
740  hLocalAngleCSC->setBinContent(chamber,ybin,fabs(Mean));
741  snprintf(binLabel, sizeof(binLabel), "ME%d/%d_#phi", station,ring );
742  hLocalAngleCSC->setBinLabel(ybin,binLabel,2);
743  hLocalAngleRmsCSC->setBinContent(chamber,ybin,Error);
744  hLocalAngleRmsCSC->setBinLabel(ybin,binLabel,2);
745 
746  hLocalPhiMeanCSC->Fill(fabs(Mean));
747  hLocalPhiRmsCSC->Fill(Error);
748  }
749 
750  if (nameHistoLocalTheta.Contains("ME")) // HistoLocalTheta CSC
751  {
752 
753  int station, ring, chamber;
754 
755  sscanf(nameHistoLocalTheta, "ResidualLocalTheta_ME%dR%1dC%d",&station,&ring,&chamber);
756 
757  Double_t Mean=unitsLocalTheta[i]->getMean();
758  Double_t Error=unitsLocalTheta[i]->getMeanError();
759 
760  Int_t ybin=abs(station)*2+ring;
761  if(abs(station)==1) ybin=ring;
762  if (station>0) ybin=ybin+10;
763  else ybin = 11 -ybin;
764  ybin=2*ybin;
765  hLocalAngleCSC->setBinContent(chamber,ybin,fabs(Mean));
766  snprintf(binLabel, sizeof(binLabel), "ME%d/%d_#theta", station,ring );
767  hLocalAngleCSC->setBinLabel(ybin,binLabel,2);
768  hLocalAngleRmsCSC->setBinContent(chamber,ybin,Error);
769  hLocalAngleRmsCSC->setBinLabel(ybin,binLabel,2);
770 
771  hLocalThetaMeanCSC->Fill(fabs(Mean));
772  hLocalThetaRmsCSC->Fill(Error);
773 
774  }
775 
776  if (nameHistoLocalY.Contains("MB")) // HistoLocalY DT
777  {
778 
779  int wheel, station, sector;
780 
781  sscanf(nameHistoLocalY, "ResidualLocalY_W%dMB%1dS%d",&wheel,&station,&sector);
782 
783  if(station!=4){
784  Int_t nstation=station - 1;
785  Int_t nwheel=wheel+2;
786 
787  Double_t Mean=unitsLocalY[i]->getMean();
788  Double_t Error=unitsLocalY[i]->getMeanError();
789 
790  Int_t ybin=2+nwheel*8+nstation*2;
791  hLocalPositionDT->setBinContent(sector,ybin,fabs(Mean));
792  snprintf(binLabel, sizeof(binLabel), "MB%d/%d_Y", wheel,station );
793  hLocalPositionDT->setBinLabel(ybin,binLabel,2);
794  hLocalPositionRmsDT->setBinContent(sector,ybin,Error);
795  hLocalPositionRmsDT->setBinLabel(ybin,binLabel,2);
796 
797  hLocalYMeanDT->Fill(fabs(Mean));
798  hLocalYRmsDT->Fill(Error);
799  }
800  }
801 
802  if (nameHistoLocalY.Contains("ME")) // HistoLocalY CSC
803  {
804 
805  int station, ring, chamber;
806 
807  sscanf(nameHistoLocalY, "ResidualLocalY_ME%dR%1dC%d",&station,&ring,&chamber);
808 
809  Double_t Mean=unitsLocalY[i]->getMean();
810  Double_t Error=unitsLocalY[i]->getMeanError();
811 
812  Int_t ybin=abs(station)*2+ring;
813  if(abs(station)==1) ybin=ring;
814  if (station>0) ybin=ybin+10;
815  else ybin = 11 -ybin;
816  ybin=2*ybin;
817  hLocalPositionCSC->setBinContent(chamber,ybin,fabs(Mean));
818  snprintf(binLabel, sizeof(binLabel), "ME%d/%d_Y", station,ring );
819  hLocalPositionCSC->setBinLabel(ybin,binLabel,2);
820  hLocalPositionRmsCSC->setBinContent(chamber,ybin,Error);
821  hLocalPositionRmsCSC->setBinLabel(ybin,binLabel,2);
822 
823  hLocalYMeanCSC->Fill(fabs(Mean));
824  hLocalYRmsCSC->Fill(Error);
825  }
826  } // check in # entries
827  } // loop on vector of histos
828  } //doSummary
829 
830  if(outputMEsInRootFile){
831 // dbe->showDirStructure();
832  dbe->save(outputFileName);
833  }
834 
835 
836 }
MonitorElement * hLocalPhiRmsDT
std::vector< MonitorElement * > unitsLocalX
MonitorElement * hLocalPositionRmsDT
Definition: MuonAlignment.h:92
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
MonitorElement * hLocalThetaMeanCSC
MonitorElement * hLocalYMeanDT
Definition: MuonAlignment.h:98
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * hLocalPhiRmsCSC
DQMStore * dbe
Definition: MuonAlignment.h:89
MonitorElement * hLocalYRmsCSC
MonitorElement * hLocalPositionCSC
MonitorElement * hLocalXMeanDT
Definition: MuonAlignment.h:96
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
Definition: DQMStore.cc:2118
MonitorElement * hLocalPhiMeanDT
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)
#define abs(x)
Definition: mlp_lapack.h:159
MonitorElement * hLocalAngleRmsCSC
void Fill(long long x)
edm::ParameterSet parameters
MonitorElement * hLocalAngleRmsDT
Definition: MuonAlignment.h:94
std::string metname
MonitorElement * hLocalAngleDT
Definition: MuonAlignment.h:93
MonitorElement * hLocalThetaRmsDT
std::vector< MonitorElement * > unitsLocalTheta
MonitorElement * hLocalYRmsDT
Definition: MuonAlignment.h:99
MonitorElement * hLocalThetaRmsCSC
MonitorElement * hLocalXMeanCSC
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1473
MonitorElement * hLocalYMeanCSC
#define LogTrace(id)
std::vector< MonitorElement * > unitsLocalPhi
std::vector< MonitorElement * > unitsLocalY
MonitorElement * hLocalPhiMeanCSC
MonitorElement * hLocalAngleCSC
MonitorElement * hLocalXRmsDT
Definition: MuonAlignment.h:97
MonitorElement * hLocalPositionRmsCSC
MonitorElement * hLocalXRmsCSC
std::stringstream topFolder
MonitorElement * hLocalThetaMeanDT
MonitorElement * hLocalPositionDT
Definition: MuonAlignment.h:91
void MuonAlignment::fillGapsInSurvey ( double  shiftErr,
double  angleErr 
)

Definition at line 176 of file MuonAlignment.cc.

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

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

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() == NULL) {
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()
#define NULL
Definition: scimark2.h:8
dictionary map
Definition: Association.py:205
align::Alignables CSCEndcaps()
AlignableMuon * theAlignableMuon
Definition: MuonAlignment.h:70
math::Error< 6 >::type ErrorMatrix
Definition: Definitions.h:39
void recursiveStructureMap(align::Alignables alignables, std::map< std::pair< align::StructureType, align::ID >, Alignable * > &theMap)
AlignableMuon* MuonAlignment::getAlignableMuon ( )
inline

Definition at line 30 of file MuonAlignment.h.

References theAlignableMuon.

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

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

Definition at line 32 of file MuonAlignment.h.

References theAlignableNavigator.

Referenced by MuonGeometrySVGTemplate::analyze().

32 { return theAlignableNavigator; }
AlignableNavigator * theAlignableNavigator
Definition: MuonAlignment.h:72
void MuonAlignment::init ( )
private

Definition at line 31 of file MuonAlignment.cc.

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

Referenced by MuonAlignment().

32 {
33  theDTAlignRecordName = "DTAlignmentRcd";
34  theDTErrorRecordName = "DTAlignmentErrorRcd";
35  theCSCAlignRecordName = "CSCAlignmentRcd";
36  theCSCErrorRecordName = "CSCAlignmentErrorRcd";
37  theDTSurveyRecordName = "DTSurveyRcd";
38  theDTSurveyErrorRecordName = "DTSurveyErrorRcd";
39  theCSCSurveyRecordName = "CSCSurveyRcd";
40  theCSCSurveyErrorRecordName = "CSCSurveyErrorRcd";
43 }
AlignableNavigator * theAlignableNavigator
Definition: MuonAlignment.h:72
std::string theCSCErrorRecordName
Definition: MuonAlignment.h:62
#define NULL
Definition: scimark2.h:8
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.

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:174
virtual void rotateAroundGlobalX(Scalar radians)
Rotation around global x-axis.
Definition: Alignable.cc:122
virtual void rotateAroundGlobalY(Scalar radians)
Rotation around global y-axis.
Definition: Alignable.cc:148
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.

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:187
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:126
virtual void rotateAroundLocalY(Scalar radians)
Rotation around local y-axis.
Definition: Alignable.cc:161
align::Scalars rotations
Definition: MuonAlignment.h:68
virtual void rotateAroundLocalX(Scalar radians)
Rotation around local x-axis.
Definition: Alignable.cc:135
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(), i, j, Alignable::move(), NULL, pos, 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().

200  {
201  if (alignable->survey() != NULL) {
202  const SurveyDet *survey = alignable->survey();
203 
204  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  AlgebraicSymMatrix33 matrix3x3; // start from 0,0
216  for (int i = 0; i < 3; i++) {
217  for (int j = 0; j <= i; j++) {
218  matrix3x3(i, j) = matrix6x6(i, j);
219  }
220  }
221 
222  // this sets APEs at this level and (since 2nd argument is true) all lower levels
223  alignable->setAlignmentPositionError(AlignmentPositionError(GlobalError(matrix3x3)), true);
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 }
int i
Definition: DBlmapReader.cc:9
const SurveyDet * survey() const
Return survey info.
Definition: Alignable.h:205
T y() const
Definition: PV3DBase.h:63
#define NULL
Definition: scimark2.h:8
const RotationType & globalRotation() const
Return the global orientation of the object.
Definition: Alignable.h:132
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 Alignables components() const =0
Return vector of all direct components.
const align::RotationType & rotation() const
Definition: SurveyDet.h:68
GlobalErrorBase< double, ErrorMatrixTag > GlobalError
Definition: GlobalError.h:11
const align::PositionType & position() const
Definition: SurveyDet.h:63
void recursiveCopySurveyToAlignment(Alignable *alignable)
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
T z() const
Definition: PV3DBase.h:64
int j
Definition: DBlmapReader.cc:9
virtual void setAlignmentPositionError(const AlignmentPositionError &ape, bool propagateDown)=0
Set the alignment position error - if (!propagateDown) do not affect daughters.
virtual void rotateInGlobalFrame(const RotationType &rotation)=0
std::vector< Alignable * > Alignables
Definition: Utilities.h:28
TkRotation transposed() const
const PositionType & globalPosition() const
Return the global position of the object.
Definition: Alignable.h:129
math::Error< 6 >::type ErrorMatrix
Definition: Definitions.h:39
T x() const
Definition: PV3DBase.h:62
void MuonAlignment::recursiveList ( align::Alignables  alignables,
align::Alignables theList 
)

Definition at line 109 of file MuonAlignment.cc.

References cmsLHEtoEOSManager::theList.

Referenced by 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(align::Alignables alignables, align::Alignables &theList)
void MuonAlignment::recursiveMap ( align::Alignables  alignables,
std::map< align::ID, Alignable * > &  theMap 
)

Definition at line 118 of file MuonAlignment.cc.

Referenced by copyAlignmentToSurvey().

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(align::Alignables alignables, std::map< align::ID, Alignable * > &theMap)
void MuonAlignment::recursiveStructureMap ( align::Alignables  alignables,
std::map< std::pair< align::StructureType, align::ID >, Alignable * > &  theMap 
)

Definition at line 130 of file MuonAlignment.cc.

Referenced by fillGapsInSurvey().

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(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(), error, edm::Service< T >::isAvailable(), Alignments::m_align, SurveyErrors::m_surveyErrors, pos, 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 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:17
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:47
T zy() const
void writeOne(T *payload, Time_t time, const std::string &recordName, bool withlogging=false)
T yy() const
std::string theCSCSurveyErrorRecordName
Definition: MuonAlignment.h:64
AlignableMuon * theAlignableMuon
Definition: MuonAlignment.h:70
void recursiveList(align::Alignables alignables, align::Alignables &theList)
std::string theCSCSurveyRecordName
Definition: MuonAlignment.h:64
std::vector< Alignable * > Alignables
Definition: Utilities.h:28
T xz() const
std::vector< SurveyError > m_surveyErrors
Definition: SurveyErrors.h:21
T x() const
Definition: PV3DBase.h:62
T yz() const
void MuonAlignment::saveCSCtoDB ( void  )

Definition at line 330 of file MuonAlignment.cc.

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

Referenced by 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  AlignmentErrors* csc_AlignmentErrors = theAlignableMuon->cscAlignmentErrors();
339 
340  // Store CSC alignments and errors
341  poolDbService->writeOne<Alignments>( &(*csc_Alignments), poolDbService->currentTime(), theCSCAlignRecordName);
342  poolDbService->writeOne<AlignmentErrors>( &(*csc_AlignmentErrors), poolDbService->currentTime(), theCSCErrorRecordName);
343 }
std::string theCSCErrorRecordName
Definition: MuonAlignment.h:62
bool isAvailable() const
Definition: Service.h:47
AlignmentErrors * cscAlignmentErrors()
void writeOne(T *payload, Time_t time, const std::string &recordName, bool withlogging=false)
AlignableMuon * theAlignableMuon
Definition: MuonAlignment.h:70
Alignments * cscAlignments()
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(), error, edm::Service< T >::isAvailable(), Alignments::m_align, SurveyErrors::m_surveyErrors, pos, 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 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:17
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:47
T zy() const
void writeOne(T *payload, Time_t time, const std::string &recordName, bool withlogging=false)
T yy() const
AlignableMuon * theAlignableMuon
Definition: MuonAlignment.h:70
void recursiveList(align::Alignables alignables, align::Alignables &theList)
std::string theDTSurveyErrorRecordName
Definition: MuonAlignment.h:63
std::vector< Alignable * > Alignables
Definition: Utilities.h:28
T xz() const
std::vector< SurveyError > m_surveyErrors
Definition: SurveyErrors.h:21
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::dtAlignmentErrors(), AlignableMuon::dtAlignments(), edm::Service< T >::isAvailable(), theAlignableMuon, theDTAlignRecordName, theDTErrorRecordName, and cond::service::PoolDBOutputService::writeOne().

Referenced by 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  AlignmentErrors* dt_AlignmentErrors = theAlignableMuon->dtAlignmentErrors();
324 
325  // Store DT alignments and errors
326  poolDbService->writeOne<Alignments>( &(*dt_Alignments), poolDbService->currentTime(), theDTAlignRecordName);
327  poolDbService->writeOne<AlignmentErrors>( &(*dt_AlignmentErrors), poolDbService->currentTime(), theDTErrorRecordName);
328 }
AlignmentErrors * dtAlignmentErrors()
std::string theDTAlignRecordName
Definition: MuonAlignment.h:61
Alignments * dtAlignments()
bool isAvailable() const
Definition: Service.h:47
void writeOne(T *payload, Time_t time, const std::string &recordName, bool withlogging=false)
AlignableMuon * theAlignableMuon
Definition: MuonAlignment.h:70
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().

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

Definition at line 345 of file MuonAlignment.cc.

References saveCSCtoDB(), and saveDTtoDB().

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

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().

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 89 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 145 of file MuonAlignment.h.

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

bool MuonAlignment::doDT
private

Definition at line 145 of file MuonAlignment.h.

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

bool MuonAlignment::doSummary
private

Definition at line 145 of file MuonAlignment.h.

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

MonitorElement* MuonAlignment::hLocalAngleCSC
private

Definition at line 107 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalAngleDT
private

Definition at line 93 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalAngleRmsCSC
private

Definition at line 108 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalAngleRmsDT
private

Definition at line 94 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalPhiMeanCSC
private

Definition at line 114 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalPhiMeanDT
private

Definition at line 100 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalPhiRmsCSC
private

Definition at line 115 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalPhiRmsDT
private

Definition at line 101 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalPositionCSC
private

Definition at line 105 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalPositionDT
private

Definition at line 91 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalPositionRmsCSC
private

Definition at line 106 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalPositionRmsDT
private

Definition at line 92 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalThetaMeanCSC
private

Definition at line 116 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalThetaMeanDT
private

Definition at line 102 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalThetaRmsCSC
private

Definition at line 117 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalThetaRmsDT
private

Definition at line 103 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalXMeanCSC
private

Definition at line 110 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalXMeanDT
private

Definition at line 96 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalXRmsCSC
private

Definition at line 111 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalXRmsDT
private

Definition at line 97 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalYMeanCSC
private

Definition at line 112 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalYMeanDT
private

Definition at line 98 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalYRmsCSC
private

Definition at line 113 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalYRmsDT
private

Definition at line 99 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

double MuonAlignment::meanAngleRange
private

Definition at line 139 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

double MuonAlignment::meanPositionRange
private

Definition at line 139 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

std::string MuonAlignment::MEFolderName
private

Definition at line 162 of file MuonAlignment.h.

Referenced by MuonAlignment().

std::string MuonAlignment::metname
private

Definition at line 122 of file MuonAlignment.h.

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

unsigned int MuonAlignment::min1DTrackRecHitSize
private

Definition at line 142 of file MuonAlignment.h.

Referenced by analyze(), and MuonAlignment().

unsigned int MuonAlignment::min4DTrackSegmentSize
private

Definition at line 142 of file MuonAlignment.h.

Referenced by analyze(), and MuonAlignment().

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

Definition at line 159 of file MuonAlignment.h.

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

int MuonAlignment::numberOfTracks
private

Definition at line 158 of file MuonAlignment.h.

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

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

Definition at line 134 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

double MuonAlignment::resLocalXRangeStation2
private

Definition at line 134 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

double MuonAlignment::resLocalXRangeStation3
private

Definition at line 134 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

double MuonAlignment::resLocalXRangeStation4
private

Definition at line 134 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

double MuonAlignment::resLocalYRangeStation1
private

Definition at line 135 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

double MuonAlignment::resLocalYRangeStation2
private

Definition at line 135 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

double MuonAlignment::resLocalYRangeStation3
private

Definition at line 135 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

double MuonAlignment::resLocalYRangeStation4
private

Definition at line 135 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

double MuonAlignment::resPhiRange
private

Definition at line 136 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

double MuonAlignment::resThetaRange
private

Definition at line 136 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

double MuonAlignment::rmsAngleRange
private

Definition at line 139 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

double MuonAlignment::rmsPositionRange
private

Definition at line 139 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::InputTag MuonAlignment::theMuonCollectionLabel
private

Definition at line 127 of file MuonAlignment.h.

Referenced by analyze(), and MuonAlignment().

edm::InputTag MuonAlignment::theRecHits4DTagCSC
private

Definition at line 130 of file MuonAlignment.h.

Referenced by analyze(), and MuonAlignment().

edm::InputTag MuonAlignment::theRecHits4DTagDT
private

Definition at line 129 of file MuonAlignment.h.

Referenced by analyze(), and MuonAlignment().

std::stringstream MuonAlignment::topFolder
private

Definition at line 163 of file MuonAlignment.h.

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

std::string MuonAlignment::trackRefitterType
private

Definition at line 131 of file MuonAlignment.h.

Referenced by analyze(), and doMatching().

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

Definition at line 153 of file MuonAlignment.h.

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

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

Definition at line 154 of file MuonAlignment.h.

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

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

Definition at line 152 of file MuonAlignment.h.

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

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

Definition at line 155 of file MuonAlignment.h.

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