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 (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 ()
 
virtual ~MuonAlignment ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) 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::EDGetTokenT
< reco::TrackCollection
theMuonCollectionLabel
 
edm::EDGetTokenT
< CSCSegmentCollection
theRecHits4DTagCSC
 
edm::EDGetTokenT
< DTRecSegment4DCollection
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
 
- 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::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/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
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 11 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.

11  {
12 
13  metname = "MuonAlignment";
14 
15  LogTrace(metname)<<"[MuonAlignment] Constructor called!"<<std::endl;
16 
17  parameters = pSet;
18 
19  theMuonCollectionLabel = consumes<reco::TrackCollection>(parameters.getParameter<edm::InputTag>("MuonCollection"));
20 
21  theRecHits4DTagDT = consumes<DTRecSegment4DCollection>(parameters.getParameter<edm::InputTag>("RecHits4DDTCollectionTag"));
22  theRecHits4DTagCSC = 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 
49  numberOfHits=0;
50 
52  topFolder << MEFolderName+"/Alignment/Muon";
53 }
edm::EDGetTokenT< CSCSegmentCollection > theRecHits4DTagCSC
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
double resLocalYRangeStation2
double resLocalXRangeStation1
double resLocalYRangeStation1
double resPhiRange
edm::EDGetTokenT< reco::TrackCollection > theMuonCollectionLabel
double meanAngleRange
double resThetaRange
edm::ParameterSet parameters
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
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 220 of file MuonAlignment.cc.

References CSCDetId::chamber(), doCSC, doDT, doMatching(), Reference_intrackfit_cff::endcap, CSCDetId::endcap(), TrajectoryStateOnSurface::freeState(), edm::EventSetup::get(), edm::Event::getByToken(), 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().

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

References funct::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.

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

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

References counter, 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().

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

References funct::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.

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

Definition at line 176 of file MuonAlignment.cc.

References convertSQLitetoXML_cfg::angleErr, AlignableMuon::CSCEndcaps(), AlignableMuon::DTBarrel(), python.multivaluedict::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
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 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, 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 ( const 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(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().

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

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 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:46
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
std::string theCSCSurveyRecordName
Definition: MuonAlignment.h:64
void recursiveList(const align::Alignables &alignables, align::Alignables &theList)
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:46
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(), 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 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:46
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
std::string theDTSurveyErrorRecordName
Definition: MuonAlignment.h:63
void recursiveList(const align::Alignables &alignables, align::Alignables &theList)
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:46
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 87 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 105 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalAngleDT
private

Definition at line 91 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalAngleRmsCSC
private

Definition at line 106 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalAngleRmsDT
private

Definition at line 92 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalPhiMeanCSC
private

Definition at line 112 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalPhiMeanDT
private

Definition at line 98 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalPhiRmsCSC
private

Definition at line 113 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalPhiRmsDT
private

Definition at line 99 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalPositionCSC
private

Definition at line 103 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalPositionDT
private

Definition at line 89 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalPositionRmsCSC
private

Definition at line 104 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalPositionRmsDT
private

Definition at line 90 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalThetaMeanCSC
private

Definition at line 114 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalThetaMeanDT
private

Definition at line 100 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalThetaRmsCSC
private

Definition at line 115 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalThetaRmsDT
private

Definition at line 101 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalXMeanCSC
private

Definition at line 108 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalXMeanDT
private

Definition at line 94 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalXRmsCSC
private

Definition at line 109 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalXRmsDT
private

Definition at line 95 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalYMeanCSC
private

Definition at line 110 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalYMeanDT
private

Definition at line 96 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalYRmsCSC
private

Definition at line 111 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

MonitorElement* MuonAlignment::hLocalYRmsDT
private

Definition at line 97 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 120 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::EDGetTokenT<reco::TrackCollection> MuonAlignment::theMuonCollectionLabel
private

Definition at line 125 of file MuonAlignment.h.

Referenced by analyze(), and MuonAlignment().

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

Definition at line 129 of file MuonAlignment.h.

Referenced by analyze(), and MuonAlignment().

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

Definition at line 127 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().