CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

MuonAlignment Class Reference

#include <MuonAlignment.h>

Inheritance diagram for MuonAlignment:
edm::EDAnalyzer

List of all members.

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &)
 Get the analysis.
void beginJob ()
 Inizialize parameters for histo binning.
void copyAlignmentToSurvey (double shiftErr, double angleErr)
void copySurveyToAlignment ()
void endJob (void)
 Save the histos.
void fillGapsInSurvey (double shiftErr, double angleErr)
AlignableMuongetAlignableMuon ()
AlignableNavigatorgetAlignableNavigator ()
void moveAlignableGlobalCoord (DetId &, std::vector< float > &, std::vector< float > &)
void moveAlignableLocalCoord (DetId &, std::vector< float > &, std::vector< float > &)
 MuonAlignment (const edm::EventSetup &iSetup, const MuonAlignmentInputMethod &input)
 MuonAlignment (const edm::ParameterSet &)
 Constructor.
 MuonAlignment (const edm::EventSetup &iSetup)
void recursiveList (std::vector< Alignable * > alignables, std::vector< Alignable * > &theList)
void recursiveMap (std::vector< Alignable * > alignables, std::map< align::ID, Alignable * > &theMap)
void recursiveStructureMap (std::vector< Alignable * > 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)
virtual ~MuonAlignment ()
 Destructor.
 ~MuonAlignment ()

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
std::vector< float > 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
std::vector< float > 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

Detailed Description

The MuonAlignment helper class for alignment jobs

Date:
2008/03/26 22:02:51
Revision:
1.13
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 <Javier.Fernandez@cern.ch>

Definition at line 21 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.

{
   init();

   edm::ESHandle<DTGeometry> dtGeometry;
   edm::ESHandle<CSCGeometry> cscGeometry;
   iSetup.get<MuonGeometryRecord>().get( dtGeometry );     
   iSetup.get<MuonGeometryRecord>().get( cscGeometry );

   theAlignableMuon = new AlignableMuon( &(*dtGeometry) , &(*cscGeometry) );
   theAlignableNavigator = new AlignableNavigator( theAlignableMuon );
}
MuonAlignment::MuonAlignment ( const edm::EventSetup iSetup,
const MuonAlignmentInputMethod input 
)
MuonAlignment::~MuonAlignment ( ) [inline]

Definition at line 29 of file MuonAlignment.h.

References theAlignableMuon, and theAlignableNavigator.

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, theMuonCollectionLabel, theRecHits4DTagCSC, theRecHits4DTagDT, and topFolder.

                                                        {

    metname = "MuonAlignment";

    LogTrace(metname)<<"[MuonAlignment] Constructor called!"<<std::endl;

    parameters = pSet;

    theMuonCollectionLabel = parameters.getParameter<edm::InputTag>("MuonCollection");
  
    theRecHits4DTagDT = parameters.getParameter<edm::InputTag>("RecHits4DDTCollectionTag");
    theRecHits4DTagCSC = parameters.getParameter<edm::InputTag>("RecHits4DCSCCollectionTag");
  
    resLocalXRangeStation1 = parameters.getUntrackedParameter<double>("resLocalXRangeStation1");
    resLocalXRangeStation2 = parameters.getUntrackedParameter<double>("resLocalXRangeStation2");
    resLocalXRangeStation3 = parameters.getUntrackedParameter<double>("resLocalXRangeStation3");
    resLocalXRangeStation4 = parameters.getUntrackedParameter<double>("resLocalXRangeStation4");
    resLocalYRangeStation1 = parameters.getUntrackedParameter<double>("resLocalYRangeStation1");
    resLocalYRangeStation2 = parameters.getUntrackedParameter<double>("resLocalYRangeStation2");
    resLocalYRangeStation3 = parameters.getUntrackedParameter<double>("resLocalYRangeStation3");
    resLocalYRangeStation4 = parameters.getUntrackedParameter<double>("resLocalYRangeStation4");
    resPhiRange = parameters.getUntrackedParameter<double>("resPhiRange");
    resThetaRange = parameters.getUntrackedParameter<double>("resThetaRange");

    meanPositionRange = parameters.getUntrackedParameter<double>("meanPositionRange");
    rmsPositionRange = parameters.getUntrackedParameter<double>("rmsPositionRange");
    meanAngleRange = parameters.getUntrackedParameter<double>("meanAngleRange");
    rmsAngleRange = parameters.getUntrackedParameter<double>("rmsAngleRange");

    nbins = parameters.getUntrackedParameter<unsigned int>("nbins");
    min1DTrackRecHitSize = parameters.getUntrackedParameter<unsigned int>("min1DTrackRecHitSize");
    min4DTrackSegmentSize = parameters.getUntrackedParameter<unsigned int>("min4DTrackSegmentSize");

    doDT = parameters.getUntrackedParameter<bool>("doDT");
    doCSC = parameters.getUntrackedParameter<bool>("doCSC");
    doSummary = parameters.getUntrackedParameter<bool>("doSummary");

    numberOfTracks=0;
    numberOfHits=0;
  
    MEFolderName = parameters.getParameter<std::string>("FolderName");  
    topFolder << MEFolderName+"/Alignment/Muon";
}
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(), edm::getName(), TrajectoryStateOnSurface::globalPosition(), TrajectoryStateOnSurface::hasError(), i, reco::TransientTrack::innermostMeasurementState(), TrajectoryStateOnSurface::isValid(), TrajectoryStateOnSurface::localDirection(), TrajectoryStateOnSurface::localPosition(), LogTrace, metname, min1DTrackRecHitSize, min4DTrackSegmentSize, metsig::muon, ExpressReco_HICollisions_FallBack::muons, numberOfHits, numberOfTracks, reco::TransientTrack::outermostMeasurementState(), PV3DBase< T, PVType, FrameType >::perp(), position, edm::ESHandle< T >::product(), Propagator::propagate(), CSCDetId::ring(), relativeConstraints::ring, DTChamberId::sector(), relativeConstraints::station, DTChamberId::station(), CSCDetId::station(), DetId::subdetId(), GeomDet::surface(), theMuonCollectionLabel, theRecHits4DTagCSC, theRecHits4DTagDT, trackRefitterType, unitsLocalPhi, unitsLocalTheta, unitsLocalX, unitsLocalY, DTChamberId::wheel(), ExpressReco_HICollisions_FallBack::x, PV3DBase< T, PVType, FrameType >::x(), ExpressReco_HICollisions_FallBack::y, PV3DBase< T, PVType, FrameType >::y(), PV3DBase< T, PVType, FrameType >::z(), and z.

                                                                               {

    LogTrace(metname)<<"[MuonAlignment] Analysis of event # ";
  
    edm::ESHandle<MagneticField> theMGField;
    iSetup.get<IdealMagneticFieldRecord>().get(theMGField);

    edm::ESHandle<GlobalTrackingGeometry> theTrackingGeometry;
    iSetup.get<GlobalTrackingGeometryRecord>().get(theTrackingGeometry);

        edm::ESHandle<Propagator> thePropagatorOpp;
        iSetup.get<TrackingComponentsRecord>().get( "SmartPropagatorOpposite", thePropagatorOpp );
  
        edm::ESHandle<Propagator> thePropagatorAlo;
        iSetup.get<TrackingComponentsRecord>().get( "SmartPropagator", thePropagatorAlo );

//      edm::ESHandle<Propagator> thePropagator;
//      iSetup.get<TrackingComponentsRecord>().get( "SmartPropagatorAnyOpposite", thePropagator );

    // Get the RecoMuons collection from the event
    edm::Handle<reco::TrackCollection> muons;
    iEvent.getByLabel(theMuonCollectionLabel, muons);

    // Get the 4D DTSegments
    edm::Handle<DTRecSegment4DCollection> all4DSegmentsDT;
    iEvent.getByLabel(theRecHits4DTagDT, all4DSegmentsDT);
    DTRecSegment4DCollection::const_iterator segmentDT;

    // Get the 4D CSCSegments
    edm::Handle<CSCSegmentCollection> all4DSegmentsCSC;
    iEvent.getByLabel(theRecHits4DTagCSC, all4DSegmentsCSC);
    CSCSegmentCollection::const_iterator segmentCSC;
  
    //Vectors used to perform the matching between Segments and hits from Track
    intDVector indexCollectionDT;
    intDVector indexCollectionCSC;

        
//        thePropagator = new SteppingHelixPropagator(&*theMGField, alongMomentum);

    int countTracks   = 0;
    reco::TrackCollection::const_iterator muon;
    for (muon = muons->begin(); muon != muons->end(); ++muon){
//      if(muon->isGlobalMuon()){
//      if(muon->isStandAloneMuon()){

        int countPoints   = 0;

//      reco::TrackRef trackTR = muon->innerTrack();
//      reco::TrackRef trackSA = muon->outerTrack();
        //reco::TrackRef trackSA = muon;
    
        if(muon->recHitsSize()>(min1DTrackRecHitSize-1)) {

//      reco::TransientTrack tTrackTR( *trackTR, &*theMGField, theTrackingGeometry );
            reco::TransientTrack tTrackSA(*muon,&*theMGField,theTrackingGeometry); 

            // Adapted code for muonCosmics
   
            Double_t  innerPerpSA  = tTrackSA.innermostMeasurementState().globalPosition().perp();
            Double_t  outerPerpSA  = tTrackSA.outermostMeasurementState().globalPosition().perp();
     
            TrajectoryStateOnSurface innerTSOS=tTrackSA.outermostMeasurementState();
//      PropagationDirection propagationDir=alongMomentum;
            const Propagator * thePropagator;
      
            // Define which kind of reco track is used
            if ( (outerPerpSA-innerPerpSA) > 0 ) {

                trackRefitterType = "LHCLike";
                innerTSOS = tTrackSA.innermostMeasurementState();
                thePropagator = thePropagatorAlo.product();
//      propagationDir = alongMomentum;
          
            }else {//if ((outerPerpSA-innerPerpSA) < 0 ) {
        
                trackRefitterType = "CosmicLike";
                innerTSOS = tTrackSA.outermostMeasurementState();
                thePropagator = thePropagatorOpp.product(); 
//      propagationDir = oppositeToMomentum;
      
            }   

            RecHitVector  my4DTrack = this->doMatching(*muon, all4DSegmentsDT, all4DSegmentsCSC, &indexCollectionDT, &indexCollectionCSC, theTrackingGeometry);
  
    
//cut in number of segments
            if(my4DTrack.size()>(min4DTrackSegmentSize-1) ){


// start propagation
//    TrajectoryStateOnSurface innerTSOS = track.impactPointState();
//                    TrajectoryStateOnSurface innerTSOS = track.innermostMeasurementState();

                //If the state is valid
                if(innerTSOS.isValid()) {

                    //Loop over Associated segments
                    for(RecHitVector::iterator rechit = my4DTrack.begin(); rechit != my4DTrack.end(); ++rechit) {
        
                        const GeomDet* geomDet = theTrackingGeometry->idToDet((*rechit)->geographicalId());
//Otherwise the propagator could throw an exception
                        const Plane* pDest = dynamic_cast<const Plane*>(&geomDet->surface());
                        const Cylinder* cDest = dynamic_cast<const Cylinder*>(&geomDet->surface());

                        if(pDest != 0 || cDest != 0) {   
 
//                                  Propagator *updatePropagator=thePropagator->clone();
//                                  updatePropagator->setPropagationDirection(propagationDir);
                            TrajectoryStateOnSurface destiny = thePropagator->propagate(*(innerTSOS.freeState()), geomDet->surface());

                            if(!destiny.isValid()|| !destiny.hasError()) continue;

                            const long rawId= (*rechit)->geographicalId().rawId();
                            int position = -1;

                            DetId myDet(rawId);
                            int det = myDet.subdetId();
                            int wheel=0,station=0,sector=0;
                            int endcap=0,ring=0,chamber=0;
                            bool goAhead = (det==1 && doDT) || (det==2 && doCSC);

                            double residualLocalX=0,residualLocalPhi=0,residualLocalY=0,residualLocalTheta=0;

                            // Fill generic histograms
                            //If it's a DT
                            if(det == 1 && doDT) {
                                DTChamberId myChamber(rawId);
                                wheel=myChamber.wheel();
                                station = myChamber.station();
                                sector=myChamber.sector();
              
                                residualLocalX = (*rechit)->localPosition().x() -destiny.localPosition().x();
                

                                residualLocalPhi = atan2(((RecSegment *)(*rechit))->localDirection().z(), 
                                                         ((RecSegment*)(*rechit))->localDirection().x()) - atan2(destiny.localDirection().z(), destiny.localDirection().x());
                                if(station!=4){
                
                                    residualLocalY = (*rechit)->localPosition().y() - destiny.localPosition().y();
                

                                    residualLocalTheta = atan2(((RecSegment *)(*rechit))->localDirection().z(), 
                                                               ((RecSegment*)(*rechit))->localDirection().y()) - atan2(destiny.localDirection().z(), destiny.localDirection().y());

                                }

                            } 
                            else if (det==2 && doCSC){
                                CSCDetId myChamber(rawId);
                                endcap= myChamber.endcap();
                                station = myChamber.station();
                                if(endcap==2) station = -station;
                                ring = myChamber.ring();
                                chamber=myChamber.chamber();

                                residualLocalX = (*rechit)->localPosition().x() -destiny.localPosition().x();
                
                                residualLocalY = (*rechit)->localPosition().y() - destiny.localPosition().y();
                
                                residualLocalPhi = atan2(((RecSegment *)(*rechit))->localDirection().y(), 
                                                         ((RecSegment*)(*rechit))->localDirection().x()) - atan2(destiny.localDirection().y(), destiny.localDirection().x());

                                residualLocalTheta = atan2(((RecSegment *)(*rechit))->localDirection().y(), 
                                                           ((RecSegment*)(*rechit))->localDirection().z()) - atan2(destiny.localDirection().y(), destiny.localDirection().z());

                            }
                            else{
                                residualLocalX=0,residualLocalPhi=0,residualLocalY=0,residualLocalTheta=0;
                            }
                        
                            // Fill individual chamber histograms


                            std::string nameOfHistoLocalX;

        
                            if(det==1 && doDT){ // DT
                                std::stringstream Wheel; Wheel<<wheel;
                                std::stringstream Station; Station<<station;
                                std::stringstream Sector; Sector<<sector;
                                        
                                nameOfHistoLocalX="ResidualLocalX_W"+Wheel.str()+"MB"+Station.str()+"S"+Sector.str();
 
                            }
                            else if(det==2 && doCSC){ //CSC
                                std::stringstream Ring; Ring<<ring;
                                std::stringstream Station; Station<<station;
                                std::stringstream Chamber; Chamber<<chamber;
                                                                               
                                nameOfHistoLocalX="ResidualLocalX_ME"+Station.str()+"R"+Ring.str()+"C"+Chamber.str();
                            }               
            
                            if (goAhead){
                                    
                                for(unsigned int i=0 ; i<unitsLocalX.size() ; i++)
                                {

                                    if( nameOfHistoLocalX==unitsLocalX[i]->getName()){
                                        position=i; break;}
                                }
                                            
                                            
                                    if(trackRefitterType == "CosmicLike") { //problem with angle convention in reverse extrapolation
                                    residualLocalPhi += 3.1416;
                                    residualLocalTheta +=3.1416;
                                }
                                
                                unitsLocalX.at(position)->Fill(residualLocalX);
                                unitsLocalPhi.at(position)->Fill(residualLocalPhi);

                                if(det==1 && station!=4) {unitsLocalY.at(position)->Fill(residualLocalY); 
                                    unitsLocalTheta.at(position)->Fill(residualLocalTheta);}
 
                                else if(det==2) {unitsLocalY.at(position)->Fill(residualLocalY);
                                    unitsLocalTheta.at(position)->Fill(residualLocalTheta);}
                                
           
                                countPoints++;
                                // if at least one point from this track is used, count this track
                                if (countPoints==1) countTracks++;
                            }           
        
                            innerTSOS = destiny;

                            //delete thePropagator;

                        }else {
                            edm::LogError("MuonAlignment") <<" Error!! Exception in propagator catched" << std::endl;
                            continue;
                        }

                    } //loop over my4DTrack
                } //TSOS was valid

            } // cut in at least 4 segments

        } //end cut in RecHitsSize>36
        numberOfHits=numberOfHits+countPoints;
//       } //Muon is GlobalMuon
    } //loop over Muons
    numberOfTracks=numberOfTracks+countTracks;

//        delete thePropagator;

//      else edm::LogError("MuonAlignment")<<"Error!! Specified MuonCollection "<< theMuonTrackCollectionLabel <<" is not present in event. ProductNotFound!!"<<std::endl;
}
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, cmsCodeRules::cppFunctionSkipper::operator, resLocalXRangeStation1, resLocalXRangeStation2, resLocalXRangeStation3, resLocalXRangeStation4, resLocalYRangeStation1, resLocalYRangeStation2, resLocalYRangeStation3, resLocalYRangeStation4, resPhiRange, resThetaRange, relativeConstraints::ring, rmsAngleRange, rmsPositionRange, DQMStore::setCurrentFolder(), relativeConstraints::station, topFolder, unitsLocalPhi, unitsLocalTheta, unitsLocalX, and unitsLocalY.

                             {


    LogTrace(metname)<<"[MuonAlignment] Parameters initialization";
  
    if(!(doDT || doCSC) ) { 
        edm::LogError("MuonAlignment") <<" Error!! At least one Muon subsystem (DT or CSC) must be monitorized!!" << std::endl;
        edm::LogError("MuonAlignment") <<" Please enable doDT or doCSC to True in your python cfg file!!!" << std::endl;
        exit(1);
    }
  
    dbe = edm::Service<DQMStore>().operator->();

    if (doSummary){
        if (doDT){
            dbe->setCurrentFolder(topFolder.str()+"/DT");
            hLocalPositionDT=dbe->book2D("hLocalPositionDT","Local DT position (cm) absolute MEAN residuals;Sector;;cm", 14,1, 15,40,0,40);
            hLocalAngleDT=dbe->book2D("hLocalAngleDT","Local DT angle (rad) absolute MEAN residuals;Sector;;rad", 14,1, 15,40,0,40); 
            hLocalPositionRmsDT=dbe->book2D("hLocalPositionRmsDT","Local DT position (cm) RMS residuals;Sector;;cm", 14,1, 15,40,0,40);
            hLocalAngleRmsDT=dbe->book2D("hLocalAngleRmsDT","Local DT angle (rad) RMS residuals;Sector;;rad", 14,1, 15,40,0,40); 

            hLocalXMeanDT=dbe->book1D("hLocalXMeanDT","Distribution of absolute MEAN Local X (cm) residuals for DT;<X> (cm);number of chambers",100,0,meanPositionRange);
            hLocalXRmsDT=dbe->book1D("hLocalXRmsDT","Distribution of RMS Local X (cm) residuals for DT;X RMS (cm);number of chambers", 100,0,rmsPositionRange);
            hLocalYMeanDT=dbe->book1D("hLocalYMeanDT","Distribution of absolute MEAN Local Y (cm) residuals for DT;<Y> (cm);number of chambers", 100,0,meanPositionRange);
            hLocalYRmsDT=dbe->book1D("hLocalYRmsDT","Distribution of RMS Local Y (cm) residuals for DT;Y RMS (cm);number of chambers", 100,0,rmsPositionRange);

            hLocalPhiMeanDT=dbe->book1D("hLocalPhiMeanDT","Distribution of MEAN #phi (rad) residuals for DT;<#phi>(rad);number of chambers", 100,-meanAngleRange,meanAngleRange);
            hLocalPhiRmsDT=dbe->book1D("hLocalPhiRmsDT","Distribution of RMS #phi (rad) residuals for DT;#phi RMS (rad);number of chambers", 100,0,rmsAngleRange);
            hLocalThetaMeanDT=dbe->book1D("hLocalThetaMeanDT","Distribution of MEAN #theta (rad) residuals for DT;<#theta>(rad);number of chambers", 100,-meanAngleRange,meanAngleRange);
            hLocalThetaRmsDT=dbe->book1D("hLocalThetaRmsDT","Distribution of RMS #theta (rad) residuals for DT;#theta RMS (rad);number of chambers",100,0,rmsAngleRange);
        }
        
        if (doCSC){
            dbe->setCurrentFolder(topFolder.str()+"/CSC");
            hLocalPositionCSC=dbe->book2D("hLocalPositionCSC","Local CSC position (cm) absolute MEAN residuals;Sector;;cm",36,1,37,40,0,40);
            hLocalAngleCSC=dbe->book2D("hLocalAngleCSC","Local CSC angle (rad) absolute MEAN residuals;Sector;;rad", 36,1,37,40,0,40); 
            hLocalPositionRmsCSC=dbe->book2D("hLocalPositionRmsCSC","Local CSC position (cm) RMS residuals;Sector;;cm", 36,1,37,40,0,40);
            hLocalAngleRmsCSC=dbe->book2D("hLocalAngleRmsCSC","Local CSC angle (rad) RMS residuals;Sector;;rad", 36,1,37,40,0,40); 
        
            hLocalXMeanCSC=dbe->book1D("hLocalXMeanCSC","Distribution of absolute MEAN Local X (cm) residuals for CSC;<X> (cm);number of chambers",100,0,meanPositionRange);
            hLocalXRmsCSC=dbe->book1D("hLocalXRmsCSC","Distribution of RMS Local X (cm) residuals for CSC;X RMS (cm);number of chambers", 100,0,rmsPositionRange);
            hLocalYMeanCSC=dbe->book1D("hLocalYMeanCSC","Distribution of absolute MEAN Local Y (cm) residuals for CSC;<Y> (cm);number of chambers", 100,0,meanPositionRange);
            hLocalYRmsCSC=dbe->book1D("hLocalYRmsCSC","Distribution of RMS Local Y (cm) residuals for CSC;Y RMS (cm);number of chambers", 100,0,rmsPositionRange);

            hLocalPhiMeanCSC=dbe->book1D("hLocalPhiMeanCSC","Distribution of absolute MEAN #phi (rad) residuals for CSC;<#phi>(rad);number of chambers", 100,0,meanAngleRange);
            hLocalPhiRmsCSC=dbe->book1D("hLocalPhiRmsCSC","Distribution of RMS #phi (rad) residuals for CSC;#phi RMS (rad);number of chambers", 100,0,rmsAngleRange);
            hLocalThetaMeanCSC=dbe->book1D("hLocalThetaMeanCSC","Distribution of absolute MEAN #theta (rad) residuals for CSC;<#theta>(rad);number of chambers", 100,0,meanAngleRange);
            hLocalThetaRmsCSC=dbe->book1D("hLocalThetaRmsCSC","Distribution of RMS #theta (rad) residuals for CSC;#theta RMS (rad);number of chambers",100,0,rmsAngleRange);
        }
    }


        // Chamber individual histograms
        // I need to create all of them even if they are empty to allow proper root merging

        // variables for histos ranges  
        double rangeX=0,rangeY=0;
        std::string nameOfHistoLocalX,nameOfHistoLocalY,nameOfHistoLocalPhi,nameOfHistoLocalTheta;

        for (int station = -4; station<5; station++){

        //This piece of code calculates the range of the residuals
        switch(abs(station)) {
            case 1:
            {rangeX = resLocalXRangeStation1; rangeY = resLocalYRangeStation1;}
            break;
            case 2:
            {rangeX = resLocalXRangeStation2; rangeY = resLocalYRangeStation2;}
            break;
            case 3:
            {rangeX = resLocalXRangeStation3; rangeY = resLocalYRangeStation3;}
            break;
            case 4:
            {rangeX = resLocalXRangeStation4; rangeY = resLocalYRangeStation4;}
            break;
            default:
                break;
        }
        if (doDT){
            if(station>0){
                                        
                for(int wheel=-2;wheel<3;wheel++){
                        
                    for (int sector=1;sector<15;sector++){
                                
                        if(!((sector==13 || sector ==14) && station!=4)){
                                        
                            std::stringstream Wheel; Wheel<<wheel;
                            std::stringstream Station; Station<<station;
                            std::stringstream Sector; Sector<<sector;
                                                                                
                            nameOfHistoLocalX="ResidualLocalX_W"+Wheel.str()+"MB"+Station.str()+"S"+Sector.str();
                            nameOfHistoLocalPhi= "ResidualLocalPhi_W"+Wheel.str()+"MB"+Station.str()+"S"+Sector.str();
                            nameOfHistoLocalTheta= "ResidualLocalTheta_W"+Wheel.str()+"MB"+Station.str()+"S"+Sector.str();
                            nameOfHistoLocalY= "ResidualLocalY_W"+Wheel.str()+"MB"+Station.str()+"S"+Sector.str();
                                                                               
                            dbe->setCurrentFolder(topFolder.str()+
                                                  "/DT/Wheel"+Wheel.str()+
                                                  "/Station"+Station.str()+
                                                  "/Sector"+Sector.str());

                            //Create ME and push histos into their respective vectors

                            MonitorElement *histoLocalX = dbe->book1D(nameOfHistoLocalX, nameOfHistoLocalX, nbins, -rangeX, rangeX);
                            unitsLocalX.push_back(histoLocalX);
                            MonitorElement *histoLocalPhi = dbe->book1D(nameOfHistoLocalPhi, nameOfHistoLocalPhi, nbins, -resPhiRange, resPhiRange);
                            unitsLocalPhi.push_back(histoLocalPhi);
                            MonitorElement *histoLocalTheta = dbe->book1D(nameOfHistoLocalTheta, nameOfHistoLocalTheta, nbins, -resThetaRange, resThetaRange);
                            unitsLocalTheta.push_back(histoLocalTheta);
                            MonitorElement *histoLocalY = dbe->book1D(nameOfHistoLocalY, nameOfHistoLocalY, nbins, -rangeY, rangeY);
                            unitsLocalY.push_back(histoLocalY);
                                        }
                    }
                }
            } //station>0
        }// doDT
        
        if (doCSC){
            if(station!=0){

                for(int ring=1;ring<5;ring++){

                    for(int chamber=1;chamber<37;chamber++){
                                
                        if( !( ((abs(station)==2 || abs(station)==3 || abs(station)==4) && ring==1 && chamber>18) || 
                               ((abs(station)==2 || abs(station)==3 || abs(station)==4) && ring>2)) ){
                            std::stringstream Ring; Ring<<ring;
                            std::stringstream Station; Station<<station;
                            std::stringstream Chamber; Chamber<<chamber;
                                                                               
                            nameOfHistoLocalX="ResidualLocalX_ME"+Station.str()+"R"+Ring.str()+"C"+Chamber.str();
                            nameOfHistoLocalPhi= "ResidualLocalPhi_ME"+Station.str()+"R"+Ring.str()+"C"+Chamber.str();
                            nameOfHistoLocalTheta= "ResidualLocalTheta_ME"+Station.str()+"R"+Ring.str()+"C"+Chamber.str();
                            nameOfHistoLocalY= "ResidualLocalY_ME"+Station.str()+"R"+Ring.str()+"C"+Chamber.str();
                                                                               
                            dbe->setCurrentFolder(topFolder.str()+
                                                  "/CSC/Station"+Station.str()+
                                                  "/Ring"+Ring.str()+
                                                  "/Chamber"+Chamber.str());

                            //Create ME and push histos into their respective vectors

                            MonitorElement *histoLocalX = dbe->book1D(nameOfHistoLocalX, nameOfHistoLocalX, nbins, -rangeX, rangeX);
                            unitsLocalX.push_back(histoLocalX);
                            MonitorElement *histoLocalPhi = dbe->book1D(nameOfHistoLocalPhi, nameOfHistoLocalPhi, nbins, -resPhiRange, resPhiRange);
                            unitsLocalPhi.push_back(histoLocalPhi);
                            MonitorElement *histoLocalTheta = dbe->book1D(nameOfHistoLocalTheta, nameOfHistoLocalTheta, nbins, -resThetaRange, resThetaRange);
                            unitsLocalTheta.push_back(histoLocalTheta);
                            MonitorElement *histoLocalY = dbe->book1D(nameOfHistoLocalY, nameOfHistoLocalY, nbins, -rangeY, rangeY);
                            unitsLocalY.push_back(histoLocalY);

                        }
                    }
                }
            } // station!=0
        }// doCSC

        } // loop on stations
}
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().

                                                                          {
   std::map<align::ID, Alignable*> alignableMap;
   recursiveMap(theAlignableMuon->DTBarrel(), alignableMap);
   recursiveMap(theAlignableMuon->CSCEndcaps(), alignableMap);

   // Set the survey error to the alignable error, expanding the matrix as needed
   AlignmentErrors* dtAlignmentErrors = theAlignableMuon->dtAlignmentErrors();
   AlignmentErrors* cscAlignmentErrors = theAlignableMuon->cscAlignmentErrors();
   std::vector<AlignTransformError> alignmentErrors;
   std::copy(dtAlignmentErrors->m_alignError.begin(), dtAlignmentErrors->m_alignError.end(), std::back_inserter(alignmentErrors));
   std::copy(cscAlignmentErrors->m_alignError.begin(), cscAlignmentErrors->m_alignError.end(), std::back_inserter(alignmentErrors));

   for (std::vector<AlignTransformError>::const_iterator alignmentError = alignmentErrors.begin();
        alignmentError != alignmentErrors.end();
        ++alignmentError) {
      align::ErrorMatrix matrix6x6 = ROOT::Math::SMatrixIdentity();
      CLHEP::HepSymMatrix matrix3x3 = alignmentError->matrix();

      for (int i = 0;  i < 3;  i++) {
         for (int j = 0;  j < 3;  j++) {
            matrix6x6(i, j) = matrix3x3(i+1, j+1);
         }
      }
      matrix6x6(3,3) = angleErr;
      matrix6x6(4,4) = angleErr;
      matrix6x6(5,5) = angleErr;

      Alignable *alignable = alignableMap[alignmentError->rawId()];
      alignable->setSurvey(new SurveyDet(alignable->surface(), matrix6x6));
   }

   fillGapsInSurvey(shiftErr, angleErr);
}
void MuonAlignment::copySurveyToAlignment ( )
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 cmsDriverOptions::counter, 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().

                                                                                                                                                                                                                                                                                                  {

    DTRecSegment4DCollection::const_iterator segmentDT;
    CSCSegmentCollection::const_iterator segmentCSC;
  
    std::vector<int> positionDT;
    std::vector<int> positionCSC;
    RecHitVector my4DTrack;
  
    //Loop over the hits of the track
    for(unsigned int counter = 0; counter != staTrack.recHitsSize()-1; counter++) {
    
        TrackingRecHitRef myRef = staTrack.recHit(counter);
        const TrackingRecHit *rechit = myRef.get();
        const GeomDet* geomDet = theTrackingGeometry->idToDet(rechit->geographicalId());
    
        //It's a DT Hit
        if(geomDet->subDetector() == GeomDetEnumerators::DT) {
      
            //Take the layer associated to this hit
            DTLayerId myLayer(rechit->geographicalId().rawId());
      
            int NumberOfDTSegment = 0;
            //Loop over segments
            for(segmentDT = all4DSegmentsDT->begin(); segmentDT != all4DSegmentsDT->end(); ++segmentDT) {
        
                //By default the chamber associated to this Segment is new
                bool isNewChamber = true;
        
                //Loop over segments already included in the vector of segments in the actual track
                for(std::vector<int>::iterator positionIt = positionDT.begin(); positionIt != positionDT.end(); positionIt++) {
          
                    //If this segment has been used before isNewChamber = false
                    if(NumberOfDTSegment == *positionIt) isNewChamber = false;
                }
        
                //Loop over vectors of segments associated to previous tracks
                for(std::vector<std::vector<int> >::iterator collect = indexCollectionDT->begin(); collect != indexCollectionDT->end(); ++collect) {
          
                    //Loop over segments associated to a track
                    for(std::vector<int>::iterator positionIt = (*collect).begin(); positionIt != (*collect).end(); positionIt++) {
            
                        //If this segment was used in a previos track then isNewChamber = false
                        if(NumberOfDTSegment == *positionIt) isNewChamber = false;
                    }
                }
        
                //If the chamber is new
                if(isNewChamber) {
          
                    DTChamberId myChamber((*segmentDT).geographicalId().rawId());
                    //If the layer of the hit belongs to the chamber of the 4D Segment
                    if(myLayer.wheel() == myChamber.wheel() && myLayer.station() == myChamber.station() && myLayer.sector() == myChamber.sector()) {
            
                        //push position of the segment and tracking rechit
                        positionDT.push_back(NumberOfDTSegment);
                        my4DTrack.push_back((TrackingRecHit *) &(*segmentDT));
                    }
                }
                NumberOfDTSegment++;
            }
            //In case is a CSC
        } else if (geomDet->subDetector() == GeomDetEnumerators::CSC) {
      
            //Take the layer associated to this hit
            CSCDetId myLayer(rechit->geographicalId().rawId());
      
            int NumberOfCSCSegment = 0;
            //Loop over 4Dsegments
            for(segmentCSC = all4DSegmentsCSC->begin(); segmentCSC != all4DSegmentsCSC->end(); segmentCSC++) {
        
                //By default the chamber associated to the segment is new
                bool isNewChamber = true;
        
                //Loop over segments in the current track
                for(std::vector<int>::iterator positionIt = positionCSC.begin(); positionIt != positionCSC.end(); positionIt++) {
          
                    //If this segment has been used then newchamber = false
                    if(NumberOfCSCSegment == *positionIt) isNewChamber = false;
                }
                //Loop over vectors of segments in previous tracks
                for(std::vector<std::vector<int> >::iterator collect = indexCollectionCSC->begin(); collect != indexCollectionCSC->end(); ++collect) {
          
                    //Loop over segments in a track
                    for(std::vector<int>::iterator positionIt = (*collect).begin(); positionIt != (*collect).end(); positionIt++) {
            
                        //If the segment was used in a previous track isNewChamber = false
                        if(NumberOfCSCSegment == *positionIt) isNewChamber = false;
                    }
                }
                //If the chamber is new
                if(isNewChamber) {
          
                    CSCDetId myChamber((*segmentCSC).geographicalId().rawId());
                    //If the chambers are the same
                    if(myLayer.chamberId() == myChamber.chamberId()) {
                        //push
                        positionCSC.push_back(NumberOfCSCSegment);
                        my4DTrack.push_back((TrackingRecHit *) &(*segmentCSC));
                    }
                }
                NumberOfCSCSegment++;
            }
        }
    }
  
    indexCollectionDT->push_back(positionDT);
    indexCollectionCSC->push_back(positionCSC);
  
    if ( trackRefitterType == "CosmicLike") {

        std::reverse(my4DTrack.begin(),my4DTrack.end());

    }
    return my4DTrack;


}
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, ExpressReco_HICollisions_FallBack::outputFileName, parameters, relativeConstraints::ring, DQMStore::save(), MonitorElement::setBinContent(), MonitorElement::setBinLabel(), relativeConstraints::station, topFolder, unitsLocalPhi, unitsLocalTheta, unitsLocalX, and unitsLocalY.

                               {


    LogTrace(metname)<<"[MuonAlignment] Saving the histos";
    bool outputMEsInRootFile = parameters.getParameter<bool>("OutputMEsInRootFile");
    std::string outputFileName = parameters.getParameter<std::string>("OutputFileName");

    edm::LogInfo("MuonAlignment")  << "Number of Tracks considered for residuals: " << numberOfTracks << std::endl << std::endl;
    edm::LogInfo("MuonAlignment")  << "Number of Hits considered for residuals: " << numberOfHits << std::endl << std::endl;

    if (doSummary){
        char binLabel[15];

        // check if ME still there (and not killed by MEtoEDM for memory saving)
        if( dbe )
          {
            // check existence of first histo in the list
            if (! dbe->get(topFolder.str()+"/DT/hLocalPositionDT")) return;
          }
        else 
          return;
        

        for(unsigned int i=0 ; i<unitsLocalX.size() ; i++)
        {

            if(unitsLocalX[i]->getEntries()!=0){

                TString nameHistoLocalX=unitsLocalX[i]->getName();

                TString nameHistoLocalPhi=unitsLocalPhi[i]->getName();

                TString nameHistoLocalTheta=unitsLocalTheta[i]->getName();

                TString nameHistoLocalY=unitsLocalY[i]->getName();


                if (nameHistoLocalX.Contains("MB") ) // HistoLocalX DT
                {
                    int wheel, station, sector;

                    sscanf(nameHistoLocalX, "ResidualLocalX_W%dMB%1dS%d",&wheel,&station,&sector);

                    Int_t nstation=station - 1;
                    Int_t nwheel=wheel+2;

                    Double_t Mean=unitsLocalX[i]->getMean();
                    Double_t Error=unitsLocalX[i]->getMeanError();

                    Int_t ybin=1+nwheel*8+nstation*2;
                    hLocalPositionDT->setBinContent(sector,ybin,fabs(Mean));
                    sprintf(binLabel, "MB%d/%d_X",wheel, station );
                    hLocalPositionDT->setBinLabel(ybin,binLabel,2);
                    hLocalPositionRmsDT->setBinContent(sector,ybin,Error);
                    hLocalPositionRmsDT->setBinLabel(ybin,binLabel,2);
                
                    hLocalXMeanDT->Fill(fabs(Mean));
                    hLocalXRmsDT->Fill(Error);
                }

                if (nameHistoLocalX.Contains("ME")) // HistoLocalX CSC
                {
                    int station, ring, chamber;

                    sscanf(nameHistoLocalX, "ResidualLocalX_ME%dR%1dC%d",&station,&ring,&chamber);

                    Double_t Mean=unitsLocalX[i]->getMean();
                    Double_t Error=unitsLocalX[i]->getMeanError();

                    Int_t ybin=abs(station)*2+ring;
                    if(abs(station)==1) ybin=ring;
                    if (station>0) ybin=ybin+10;
                    else ybin = 11 -ybin;
                    ybin=2*ybin-1;
                    hLocalPositionCSC->setBinContent(chamber,ybin,fabs(Mean));
                    sprintf(binLabel, "ME%d/%d_X", station,ring );
                    hLocalPositionCSC->setBinLabel(ybin,binLabel,2);
                    hLocalPositionRmsCSC->setBinContent(chamber,ybin,Error);
                    hLocalPositionRmsCSC->setBinLabel(ybin,binLabel,2);

                    hLocalXMeanCSC->Fill(fabs(Mean));
                    hLocalXRmsCSC->Fill(Error);
                }

                if (nameHistoLocalTheta.Contains("MB")) // HistoLocalTheta DT
                {       

                    int wheel, station, sector;

                    sscanf(nameHistoLocalTheta, "ResidualLocalTheta_W%dMB%1dS%d",&wheel,&station,&sector);

                    if(station != 4){
                        Int_t nstation=station - 1;
                        Int_t nwheel=wheel+2;

                        Double_t Mean=unitsLocalTheta[i]->getMean();
                        Double_t Error=unitsLocalTheta[i]->getMeanError();

                        Int_t ybin=2+nwheel*8+nstation*2;
                        hLocalAngleDT->setBinContent(sector,ybin,fabs(Mean));
                        sprintf(binLabel, "MB%d/%d_#theta",wheel,station );
                        hLocalAngleDT->setBinLabel(ybin,binLabel,2);
                        hLocalAngleRmsDT->setBinContent(sector,ybin,Error);
                        hLocalAngleRmsDT->setBinLabel(ybin,binLabel,2);
        
                        hLocalThetaMeanDT->Fill(fabs(Mean));
                        hLocalThetaRmsDT->Fill(Error);
                    }
                }

                if (nameHistoLocalPhi.Contains("MB")) // HistoLocalPhi DT
                {       

                    int wheel, station, sector;

                    sscanf(nameHistoLocalPhi, "ResidualLocalPhi_W%dMB%1dS%d",&wheel,&station,&sector);

                    Int_t nstation=station - 1;
                    Int_t nwheel=wheel+2;

                    Double_t Mean=unitsLocalPhi[i]->getMean();
                    Double_t Error=unitsLocalPhi[i]->getMeanError();

                    Int_t ybin=1+nwheel*8+nstation*2;
                    hLocalAngleDT->setBinContent(sector,ybin,fabs(Mean));
                    sprintf(binLabel, "MB%d/%d_#phi", wheel,station );
                    hLocalAngleDT->setBinLabel(ybin,binLabel,2);
                    hLocalAngleRmsDT->setBinContent(sector,ybin,Error);
                    hLocalAngleRmsDT->setBinLabel(ybin,binLabel,2);

                    hLocalPhiMeanDT->Fill(fabs(Mean));
                    hLocalPhiRmsDT->Fill(Error);
                }

                if (nameHistoLocalPhi.Contains("ME")) // HistoLocalPhi CSC
                {

                    int station, ring, chamber;

                    sscanf(nameHistoLocalPhi, "ResidualLocalPhi_ME%dR%1dC%d",&station,&ring,&chamber);

                    Double_t Mean=unitsLocalPhi[i]->getMean();
                    Double_t Error=unitsLocalPhi[i]->getMeanError();

                    Int_t ybin=abs(station)*2+ring;
                    if(abs(station)==1) ybin=ring;
                    if (station>0) ybin=ybin+10;
                    else ybin = 11 -ybin;
                    ybin=2*ybin-1;
                    hLocalAngleCSC->setBinContent(chamber,ybin,fabs(Mean));
                    sprintf(binLabel, "ME%d/%d_#phi", station,ring );
                    hLocalAngleCSC->setBinLabel(ybin,binLabel,2);
                    hLocalAngleRmsCSC->setBinContent(chamber,ybin,Error);
                    hLocalAngleRmsCSC->setBinLabel(ybin,binLabel,2);

                    hLocalPhiMeanCSC->Fill(fabs(Mean));
                    hLocalPhiRmsCSC->Fill(Error);
                }

                if (nameHistoLocalTheta.Contains("ME")) // HistoLocalTheta CSC
                {

                    int station, ring, chamber;

                    sscanf(nameHistoLocalTheta, "ResidualLocalTheta_ME%dR%1dC%d",&station,&ring,&chamber);

                    Double_t Mean=unitsLocalTheta[i]->getMean();
                    Double_t Error=unitsLocalTheta[i]->getMeanError();

                    Int_t ybin=abs(station)*2+ring;
                    if(abs(station)==1) ybin=ring;
                    if (station>0) ybin=ybin+10;
                    else ybin = 11 -ybin;
                    ybin=2*ybin;
                    hLocalAngleCSC->setBinContent(chamber,ybin,fabs(Mean));
                    sprintf(binLabel, "ME%d/%d_#theta", station,ring );
                    hLocalAngleCSC->setBinLabel(ybin,binLabel,2);
                    hLocalAngleRmsCSC->setBinContent(chamber,ybin,Error);
                    hLocalAngleRmsCSC->setBinLabel(ybin,binLabel,2);

                    hLocalThetaMeanCSC->Fill(fabs(Mean));
                    hLocalThetaRmsCSC->Fill(Error);

                }

                if (nameHistoLocalY.Contains("MB")) // HistoLocalY DT
                {

                    int wheel, station, sector;

                    sscanf(nameHistoLocalY, "ResidualLocalY_W%dMB%1dS%d",&wheel,&station,&sector);

                    if(station!=4){
                        Int_t nstation=station - 1;
                        Int_t nwheel=wheel+2;

                        Double_t Mean=unitsLocalY[i]->getMean();
                        Double_t Error=unitsLocalY[i]->getMeanError();

                        Int_t ybin=2+nwheel*8+nstation*2;
                        hLocalPositionDT->setBinContent(sector,ybin,fabs(Mean));
                        sprintf(binLabel, "MB%d/%d_Y", wheel,station );
                        hLocalPositionDT->setBinLabel(ybin,binLabel,2);
                        hLocalPositionRmsDT->setBinContent(sector,ybin,Error);
                        hLocalPositionRmsDT->setBinLabel(ybin,binLabel,2);

                        hLocalYMeanDT->Fill(fabs(Mean));
                        hLocalYRmsDT->Fill(Error);
                    }
                }

                if (nameHistoLocalY.Contains("ME")) // HistoLocalY CSC
                {

                    int station, ring, chamber;

                    sscanf(nameHistoLocalY, "ResidualLocalY_ME%dR%1dC%d",&station,&ring,&chamber);

                    Double_t Mean=unitsLocalY[i]->getMean();
                    Double_t Error=unitsLocalY[i]->getMeanError();

                    Int_t ybin=abs(station)*2+ring;
                    if(abs(station)==1) ybin=ring;
                    if (station>0) ybin=ybin+10;
                    else ybin = 11 -ybin;
                    ybin=2*ybin;
                    hLocalPositionCSC->setBinContent(chamber,ybin,fabs(Mean));
                    sprintf(binLabel, "ME%d/%d_Y", station,ring );
                    hLocalPositionCSC->setBinLabel(ybin,binLabel,2);
                    hLocalPositionRmsCSC->setBinContent(chamber,ybin,Error);
                    hLocalPositionRmsCSC->setBinLabel(ybin,binLabel,2);

                    hLocalYMeanCSC->Fill(fabs(Mean));
                    hLocalYRmsCSC->Fill(Error);
                }
            } // check in # entries
        } // loop on vector of histos
    } //doSummary
    
    if(outputMEsInRootFile){
//    dbe->showDirStructure();
        dbe->save(outputFileName);
    }


}
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 MuonGeometryArrange::analyze(), MuonGeometryDBConverter::analyze(), and copyAlignmentToSurvey().

                                                                     {
   // get all the ones we missed
   std::map<std::pair<align::StructureType, align::ID>, Alignable*> alignableStructureMap;
   recursiveStructureMap(theAlignableMuon->DTBarrel(), alignableStructureMap);
   recursiveStructureMap(theAlignableMuon->CSCEndcaps(), alignableStructureMap);

   for (std::map<std::pair<align::StructureType, align::ID>, Alignable*>::const_iterator iter = alignableStructureMap.begin();
        iter != alignableStructureMap.end();
        ++iter) {
      if (iter->second->survey() == NULL) {
         align::ErrorMatrix matrix6x6 = ROOT::Math::SMatrixIdentity();
         matrix6x6(0,0) = shiftErr;
         matrix6x6(1,1) = shiftErr;
         matrix6x6(2,2) = shiftErr;
         matrix6x6(3,3) = angleErr;
         matrix6x6(4,4) = angleErr;
         matrix6x6(5,5) = angleErr;
         iter->second->setSurvey(new SurveyDet(iter->second->surface(), matrix6x6));
      }
   }
}
AlignableMuon* MuonAlignment::getAlignableMuon ( ) [inline]

Definition at line 31 of file MuonAlignment.h.

References theAlignableMuon.

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

{ return theAlignableMuon; }
AlignableNavigator* MuonAlignment::getAlignableNavigator ( ) [inline]

Definition at line 33 of file MuonAlignment.h.

References theAlignableNavigator.

Referenced by MuonGeometrySVGTemplate::analyze().

void MuonAlignment::init ( ) [private]
void MuonAlignment::moveAlignableGlobalCoord ( DetId detid,
std::vector< float > &  displacements,
std::vector< float > &  rotations 
)

Definition at line 89 of file MuonAlignment.cc.

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

                                                                                                                        {

  // Displace and rotate DT an Alignable associated to a GeomDet or GeomDetUnit
  Alignable* theAlignable = theAlignableNavigator->alignableFromDetId( detid );
 
  // Convert std::vector to GlobalVector
  GlobalVector gvector( displacements.at(0), displacements.at(1), displacements.at(2)); 

  // global displacement of the chamber
  theAlignable->move( gvector );

  // local rotation of the chamber
  theAlignable->rotateAroundGlobalX( rotations.at(0) ); // Global X axis rotation
  theAlignable->rotateAroundGlobalY( rotations.at(1) ); // Global Y axis rotation
  theAlignable->rotateAroundGlobalZ( rotations.at(2) ); // Global Z axis rotation

}
void MuonAlignment::moveAlignableLocalCoord ( DetId detid,
std::vector< float > &  displacements,
std::vector< float > &  rotations 
)

Definition at line 68 of file MuonAlignment.cc.

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

                                                                                                                       {

  // Displace and rotate DT an Alignable associated to a GeomDet or GeomDetUnit
  Alignable* theAlignable = theAlignableNavigator->alignableFromDetId( detid );
 
  // Convert local to global diplacements
  LocalVector lvector( displacements.at(0), displacements.at(1), displacements.at(2)); 
  GlobalVector gvector = ( theAlignable->surface()).toGlobal( lvector );

  // global displacement of the chamber
  theAlignable->move( gvector );

  // local rotation of the chamber
  theAlignable->rotateAroundLocalX( rotations.at(0) ); // Local X axis rotation
  theAlignable->rotateAroundLocalY( rotations.at(1) ); // Local Y axis rotation
  theAlignable->rotateAroundLocalZ( rotations.at(2) ); // Local Z axis rotation

}
void MuonAlignment::recursiveCopySurveyToAlignment ( Alignable alignable) [private]

Definition at line 200 of file MuonAlignment.cc.

References Alignable::components(), SurveyDet::errors(), Alignable::globalPosition(), Alignable::globalRotation(), i, j, Alignable::move(), NULL, pos, SurveyDet::position(), 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().

                                                                       {
   if (alignable->survey() != NULL) {
      const SurveyDet *survey = alignable->survey();

      align::PositionType pos = survey->position();
      align::RotationType rot = survey->rotation();

      align::PositionType oldpos = alignable->globalPosition();
      align::RotationType oldrot = alignable->globalRotation();
      alignable->move(GlobalVector(-oldpos.x(), -oldpos.y(), -oldpos.z()));
      alignable->rotateInGlobalFrame(oldrot.transposed());
      alignable->rotateInGlobalFrame(rot);
      alignable->move(GlobalVector(pos.x(), pos.y(), pos.z()));

      align::ErrorMatrix matrix6x6 = survey->errors();  // start from 0,0
      CLHEP::HepSymMatrix matrix3x3(3);                 // start from 1,1
      for (int i = 0;  i < 3;  i++) {
         for (int j = 0;  j < 3;  j++) {
            matrix3x3(i+1, j+1) = matrix6x6(i, j);
         }
      }

      // this sets APEs at this level and (since 2nd argument is true) all lower levels
      alignable->setAlignmentPositionError(AlignmentPositionError(GlobalError(matrix3x3)), true);
   }

   // do lower levels afterward to thwart the cumulative setting of APEs
   std::vector<Alignable*> components = alignable->components();
   for (std::vector<Alignable*>::const_iterator comp = components.begin();  comp != components.end();  ++comp) {
      recursiveCopySurveyToAlignment(*comp);
   }
}
void MuonAlignment::recursiveList ( std::vector< Alignable * >  alignables,
std::vector< Alignable * > &  theList 
)

Definition at line 109 of file MuonAlignment.cc.

References cmsLHEtoEOSManager::theList.

Referenced by saveCSCSurveyToDB(), and saveDTSurveyToDB().

                                                                                                  {
   for (std::vector<Alignable*>::const_iterator alignable = alignables.begin();  alignable != alignables.end();  ++alignable) {
      recursiveList((*alignable)->components(), theList);
      theList.push_back(*alignable);
   }
}
void MuonAlignment::recursiveMap ( std::vector< Alignable * >  alignables,
std::map< align::ID, Alignable * > &  theMap 
)

Definition at line 118 of file MuonAlignment.cc.

Referenced by copyAlignmentToSurvey().

                                                                                                      {
   for (std::vector<Alignable*>::const_iterator alignable = alignables.begin();  alignable != alignables.end();  ++alignable) {
      unsigned int rawId = (*alignable)->geomDetId().rawId();
      if (rawId != 0) {
         theMap[rawId] = *alignable;
      }
      recursiveMap((*alignable)->components(), theMap);
   }
}
void MuonAlignment::recursiveStructureMap ( std::vector< Alignable * >  alignables,
std::map< std::pair< align::StructureType, align::ID >, Alignable * > &  theMap 
)

Definition at line 130 of file MuonAlignment.cc.

Referenced by fillGapsInSurvey().

                                                                                                                                            {
   for (std::vector<Alignable*>::const_iterator alignable = alignables.begin();  alignable != alignables.end();  ++alignable) {
      theMap[std::pair<align::StructureType, align::ID>((*alignable)->alignableObjectId(), (*alignable)->id())] = *alignable;
      recursiveStructureMap((*alignable)->components(), theMap);
   }
}
void MuonAlignment::saveCSCSurveyToDB ( void  )

Definition at line 277 of file MuonAlignment.cc.

References AlignableMuon::CSCEndcaps(), error, edm::Service< T >::isAvailable(), Alignments::m_align, SurveyErrors::m_surveyErrors, pos, recursiveList(), theAlignableMuon, theCSCSurveyErrorRecordName, theCSCSurveyRecordName, relativeConstraints::value, 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().

                                          {
   // Call service
  edm::Service<cond::service::PoolDBOutputService> poolDbService;
  if( !poolDbService.isAvailable() ) // Die if not available
     throw cms::Exception("NotAvailable") << "PoolDBOutputService not available";

  // Get alignments and errors
  Alignments *cscAlignments = new Alignments();
  SurveyErrors *cscSurveyErrors = new SurveyErrors();

  std::vector<Alignable*> alignableList;
  recursiveList(theAlignableMuon->CSCEndcaps(), alignableList);

  for (std::vector<Alignable*>::const_iterator alignable = alignableList.begin();  alignable != alignableList.end();  ++alignable) {
     const align::PositionType &pos = (*alignable)->survey()->position();
     const align::RotationType &rot = (*alignable)->survey()->rotation();

     AlignTransform value(CLHEP::Hep3Vector(pos.x(), pos.y(), pos.z()),
                            CLHEP::HepRotation(CLHEP::HepRep3x3(rot.xx(), rot.xy(), rot.xz(),
                                                                      rot.yx(), rot.yy(), rot.yz(),
                                                                      rot.zx(), rot.zy(), rot.zz())),
                            (*alignable)->id());
     SurveyError error((*alignable)->alignableObjectId(), (*alignable)->id(), (*alignable)->survey()->errors());
     
     cscAlignments->m_align.push_back(value);
     cscSurveyErrors->m_surveyErrors.push_back(error);
  }

  // Store CSC alignments and errors
  poolDbService->writeOne<Alignments>( &(*cscAlignments), poolDbService->currentTime(), theCSCSurveyRecordName);
  poolDbService->writeOne<SurveyErrors>( &(*cscSurveyErrors), poolDbService->currentTime(), theCSCSurveyErrorRecordName);
}
void MuonAlignment::saveCSCtoDB ( void  )

Definition at line 330 of file MuonAlignment.cc.

References AlignableMuon::cscAlignmentErrors(), AlignableMuon::cscAlignments(), edm::Service< T >::isAvailable(), theAlignableMuon, theCSCAlignRecordName, and theCSCErrorRecordName.

Referenced by saveToDB().

                                    {
   // Call service
  edm::Service<cond::service::PoolDBOutputService> poolDbService;
  if( !poolDbService.isAvailable() ) // Die if not available
        throw cms::Exception("NotAvailable") << "PoolDBOutputService not available";

  // Get alignments and errors
  Alignments*      csc_Alignments      = theAlignableMuon->cscAlignments();
  AlignmentErrors* csc_AlignmentErrors = theAlignableMuon->cscAlignmentErrors();

  // Store CSC alignments and errors
  poolDbService->writeOne<Alignments>( &(*csc_Alignments), poolDbService->currentTime(), theCSCAlignRecordName);
  poolDbService->writeOne<AlignmentErrors>( &(*csc_AlignmentErrors), poolDbService->currentTime(), theCSCErrorRecordName);
}
void MuonAlignment::saveDTSurveyToDB ( void  )

Definition at line 244 of file MuonAlignment.cc.

References AlignableMuon::DTBarrel(), error, edm::Service< T >::isAvailable(), Alignments::m_align, SurveyErrors::m_surveyErrors, pos, recursiveList(), theAlignableMuon, theDTSurveyErrorRecordName, theDTSurveyRecordName, relativeConstraints::value, 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().

                                         {
   // Call service
  edm::Service<cond::service::PoolDBOutputService> poolDbService;
  if( !poolDbService.isAvailable() ) // Die if not available
     throw cms::Exception("NotAvailable") << "PoolDBOutputService not available";

  // Get alignments and errors
  Alignments *dtAlignments = new Alignments();
  SurveyErrors *dtSurveyErrors = new SurveyErrors();

  std::vector<Alignable*> alignableList;
  recursiveList(theAlignableMuon->DTBarrel(), alignableList);

  for (std::vector<Alignable*>::const_iterator alignable = alignableList.begin();  alignable != alignableList.end();  ++alignable) {
     const align::PositionType &pos = (*alignable)->survey()->position();
     const align::RotationType &rot = (*alignable)->survey()->rotation();

     AlignTransform value(CLHEP::Hep3Vector(pos.x(), pos.y(), pos.z()),
                            CLHEP::HepRotation(CLHEP::HepRep3x3(rot.xx(), rot.xy(), rot.xz(),
                                                                      rot.yx(), rot.yy(), rot.yz(),
                                                                      rot.zx(), rot.zy(), rot.zz())),
                            (*alignable)->id());
     SurveyError error((*alignable)->alignableObjectId(), (*alignable)->id(), (*alignable)->survey()->errors());
     
     dtAlignments->m_align.push_back(value);
     dtSurveyErrors->m_surveyErrors.push_back(error);
  }

  // Store DT alignments and errors
  poolDbService->writeOne<Alignments>( &(*dtAlignments), poolDbService->currentTime(), theDTSurveyRecordName);
  poolDbService->writeOne<SurveyErrors>( &(*dtSurveyErrors), poolDbService->currentTime(), theDTSurveyErrorRecordName);
}
void MuonAlignment::saveDTtoDB ( void  )

Definition at line 315 of file MuonAlignment.cc.

References AlignableMuon::dtAlignmentErrors(), AlignableMuon::dtAlignments(), edm::Service< T >::isAvailable(), theAlignableMuon, theDTAlignRecordName, and theDTErrorRecordName.

Referenced by saveToDB().

                                   {
   // Call service
  edm::Service<cond::service::PoolDBOutputService> poolDbService;
  if( !poolDbService.isAvailable() ) // Die if not available
        throw cms::Exception("NotAvailable") << "PoolDBOutputService not available";

  // Get alignments and errors
  Alignments*      dt_Alignments       = theAlignableMuon->dtAlignments() ;
  AlignmentErrors* dt_AlignmentErrors  = theAlignableMuon->dtAlignmentErrors();

  // Store DT alignments and errors
  poolDbService->writeOne<Alignments>( &(*dt_Alignments), poolDbService->currentTime(), theDTAlignRecordName);
  poolDbService->writeOne<AlignmentErrors>( &(*dt_AlignmentErrors), poolDbService->currentTime(), theDTErrorRecordName);
}
void MuonAlignment::saveSurveyToDB ( void  )
void MuonAlignment::saveToDB ( void  )

Definition at line 345 of file MuonAlignment.cc.

References saveCSCtoDB(), and saveDTtoDB().

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

void MuonAlignment::writeXML ( const edm::ParameterSet  iConfig,
const edm::EventSetup iSetup 
)

Member Data Documentation

Definition at line 89 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

std::vector<float> MuonAlignment::displacements [private]

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

Definition at line 107 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

Definition at line 93 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

Definition at line 108 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

Definition at line 94 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

Definition at line 114 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

Definition at line 100 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

Definition at line 115 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

Definition at line 101 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

Definition at line 105 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

Definition at line 91 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

Definition at line 106 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

Definition at line 92 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

Definition at line 116 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

Definition at line 102 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

Definition at line 117 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

Definition at line 103 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

Definition at line 110 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

Definition at line 96 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

Definition at line 111 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

Definition at line 97 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

Definition at line 112 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

Definition at line 98 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

Definition at line 113 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

Definition at line 99 of file MuonAlignment.h.

Referenced by beginJob(), and endJob().

Definition at line 139 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

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]

Definition at line 142 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

Definition at line 159 of file MuonAlignment.h.

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

Definition at line 158 of file MuonAlignment.h.

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

Definition at line 119 of file MuonAlignment.h.

Referenced by endJob(), and MuonAlignment().

Definition at line 134 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

Definition at line 134 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

Definition at line 134 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

Definition at line 134 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

Definition at line 135 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

Definition at line 135 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

Definition at line 135 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

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

Definition at line 139 of file MuonAlignment.h.

Referenced by beginJob(), and MuonAlignment().

std::vector<float> MuonAlignment::rotations [private]

Definition at line 69 of file MuonAlignment.h.

std::string MuonAlignment::theCSCAlignRecordName [private]

Definition at line 63 of file MuonAlignment.h.

Referenced by init(), and saveCSCtoDB().

std::string MuonAlignment::theCSCErrorRecordName [private]

Definition at line 63 of file MuonAlignment.h.

Referenced by init(), and saveCSCtoDB().

Definition at line 65 of file MuonAlignment.h.

Referenced by init(), and saveCSCSurveyToDB().

Definition at line 65 of file MuonAlignment.h.

Referenced by init(), and saveCSCSurveyToDB().

std::string MuonAlignment::theDTAlignRecordName [private]

Definition at line 62 of file MuonAlignment.h.

Referenced by init(), and saveDTtoDB().

std::string MuonAlignment::theDTErrorRecordName [private]

Definition at line 62 of file MuonAlignment.h.

Referenced by init(), and saveDTtoDB().

Definition at line 64 of file MuonAlignment.h.

Referenced by init(), and saveDTSurveyToDB().

std::string MuonAlignment::theDTSurveyRecordName [private]

Definition at line 64 of file MuonAlignment.h.

Referenced by init(), and saveDTSurveyToDB().

Definition at line 127 of file MuonAlignment.h.

Referenced by analyze(), and MuonAlignment().

Definition at line 130 of file MuonAlignment.h.

Referenced by analyze(), and MuonAlignment().

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

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