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
MuonAlignmentAnalyzer Class Reference

#include <MuonAlignmentAnalyzer.h>

Inheritance diagram for MuonAlignmentAnalyzer:
edm::EDAnalyzer

Public Member Functions

void analyze (const edm::Event &event, const edm::EventSetup &eventSetup)
 
virtual void beginJob ()
 
virtual void endJob ()
 
 MuonAlignmentAnalyzer (const edm::ParameterSet &pset)
 Constructor. More...
 
virtual ~MuonAlignmentAnalyzer ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Private Member Functions

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

Private Attributes

std::vector< long > detectorCollection
 
bool doGBplots
 
bool doResplots
 
bool doSAplots
 
edm::Service< TFileServicefs
 
TH1F * hGBChi2
 
TH1F * hGBChi2_Barrel
 
TH1F * hGBChi2_Endcap
 
TH1F * hGBInvM
 
TH1F * hGBInvM_Barrel
 
TH1F * hGBInvM_Endcap
 
TH1F * hGBInvM_Overlap
 
TH1F * hGBinvPTres
 
TH2F * hGBinvPTvsEta
 
TH2F * hGBinvPTvsNhits
 
TH2F * hGBinvPTvsPhi
 
TH1F * hGBNhits
 
TH1F * hGBNhits_Barrel
 
TH1F * hGBNhits_Endcap
 
TH1F * hGBNmuons
 
TH1F * hGBNmuons_Barrel
 
TH1F * hGBNmuons_Endcap
 
TH2F * hGBPhivsEta
 
TH1F * hGBPTDiff
 
TH2F * hGBPTDiffvsEta
 
TH2F * hGBPTDiffvsPhi
 
TH1F * hGBPTRec
 
TH1F * hGBPTRec_Barrel
 
TH1F * hGBPTRec_Endcap
 
TH1F * hGBPTres
 
TH1F * hGBPTres_Barrel
 
TH1F * hGBPTres_Endcap
 
TH2F * hGBPTvsEta
 
TH2F * hGBPTvsPhi
 
TH2F * hprofGlobalAngleCSC
 
TH2F * hprofGlobalAngleDT
 
TH2F * hprofGlobalAngleRmsCSC
 
TH2F * hprofGlobalAngleRmsDT
 
TH1F * hprofGlobalPhiCSC
 
TH1F * hprofGlobalPhiDT
 
TH2F * hprofGlobalPositionCSC
 
TH2F * hprofGlobalPositionDT
 
TH2F * hprofGlobalPositionRmsCSC
 
TH2F * hprofGlobalPositionRmsDT
 
TH1F * hprofGlobalRCSC
 
TH1F * hprofGlobalRPhiCSC
 
TH1F * hprofGlobalRPhiDT
 
TH1F * hprofGlobalThetaCSC
 
TH1F * hprofGlobalThetaDT
 
TH1F * hprofGlobalZDT
 
TH2F * hprofLocalAngleCSC
 
TH2F * hprofLocalAngleDT
 
TH2F * hprofLocalAngleRmsCSC
 
TH2F * hprofLocalAngleRmsDT
 
TH1F * hprofLocalPhiCSC
 
TH1F * hprofLocalPhiDT
 
TH2F * hprofLocalPositionCSC
 
TH2F * hprofLocalPositionDT
 
TH2F * hprofLocalPositionRmsCSC
 
TH2F * hprofLocalPositionRmsDT
 
TH1F * hprofLocalThetaCSC
 
TH1F * hprofLocalThetaDT
 
TH1F * hprofLocalXCSC
 
TH1F * hprofLocalXDT
 
TH1F * hprofLocalYCSC
 
TH1F * hprofLocalYDT
 
TH1F * hResidualGlobalPhiCSC
 
std::vector< TH1F * > hResidualGlobalPhiCSC_ME
 
TH1F * hResidualGlobalPhiDT
 
std::vector< TH1F * > hResidualGlobalPhiDT_MB
 
std::vector< TH1F * > hResidualGlobalPhiDT_W
 
TH1F * hResidualGlobalRCSC
 
std::vector< TH1F * > hResidualGlobalRCSC_ME
 
TH1F * hResidualGlobalRPhiCSC
 
std::vector< TH1F * > hResidualGlobalRPhiCSC_ME
 
TH1F * hResidualGlobalRPhiDT
 
std::vector< TH1F * > hResidualGlobalRPhiDT_MB
 
std::vector< TH1F * > hResidualGlobalRPhiDT_W
 
TH1F * hResidualGlobalThetaCSC
 
std::vector< TH1F * > hResidualGlobalThetaCSC_ME
 
TH1F * hResidualGlobalThetaDT
 
std::vector< TH1F * > hResidualGlobalThetaDT_MB
 
std::vector< TH1F * > hResidualGlobalThetaDT_W
 
TH1F * hResidualGlobalZDT
 
std::vector< TH1F * > hResidualGlobalZDT_MB
 
std::vector< TH1F * > hResidualGlobalZDT_W
 
TH1F * hResidualLocalPhiCSC
 
std::vector< TH1F * > hResidualLocalPhiCSC_ME
 
TH1F * hResidualLocalPhiDT
 
std::vector< TH1F * > hResidualLocalPhiDT_MB
 
std::vector< TH1F * > hResidualLocalPhiDT_W
 
TH1F * hResidualLocalThetaCSC
 
std::vector< TH1F * > hResidualLocalThetaCSC_ME
 
TH1F * hResidualLocalThetaDT
 
std::vector< TH1F * > hResidualLocalThetaDT_MB
 
std::vector< TH1F * > hResidualLocalThetaDT_W
 
TH1F * hResidualLocalXCSC
 
std::vector< TH1F * > hResidualLocalXCSC_ME
 
TH1F * hResidualLocalXDT
 
std::vector< TH1F * > hResidualLocalXDT_MB
 
std::vector< TH1F * > hResidualLocalXDT_W
 
TH1F * hResidualLocalYCSC
 
std::vector< TH1F * > hResidualLocalYCSC_ME
 
TH1F * hResidualLocalYDT
 
std::vector< TH1F * > hResidualLocalYDT_MB
 
std::vector< TH1F * > hResidualLocalYDT_W
 
TH1F * hSAChi2
 
TH1F * hSAChi2_Barrel
 
TH1F * hSAChi2_Endcap
 
TH1F * hSAInvM
 
TH1F * hSAInvM_Barrel
 
TH1F * hSAInvM_Endcap
 
TH1F * hSAInvM_Overlap
 
TH1F * hSAinvPTres
 
TH2F * hSAinvPTvsEta
 
TH2F * hSAinvPTvsNhits
 
TH2F * hSAinvPTvsPhi
 
TH1F * hSANhits
 
TH1F * hSANhits_Barrel
 
TH1F * hSANhits_Endcap
 
TH1F * hSANmuons
 
TH1F * hSANmuons_Barrel
 
TH1F * hSANmuons_Endcap
 
TH2F * hSAPhivsEta
 
TH1F * hSAPTDiff
 
TH2F * hSAPTDiffvsEta
 
TH2F * hSAPTDiffvsPhi
 
TH1F * hSAPTRec
 
TH1F * hSAPTRec_Barrel
 
TH1F * hSAPTRec_Endcap
 
TH1F * hSAPTres
 
TH1F * hSAPTres_Barrel
 
TH1F * hSAPTres_Endcap
 
TH2F * hSAPTvsEta
 
TH2F * hSAPTvsPhi
 
TH1F * hSimInvM
 
TH1F * hSimInvM_Barrel
 
TH1F * hSimInvM_Endcap
 
TH1F * hSimInvM_Overlap
 
TH1F * hSimNmuons
 
TH1F * hSimNmuons_Barrel
 
TH1F * hSimNmuons_Endcap
 
TH2F * hSimPhivsEta
 
TH1F * hSimPT
 
TH1F * hSimPT_Barrel
 
TH1F * hSimPT_Endcap
 
TH2F * hSimPTvsEta
 
TH2F * hSimPTvsPhi
 
double invMassRangeMax
 
double invMassRangeMin
 
unsigned int min1DTrackRecHitSize
 
unsigned int min4DTrackSegmentSize
 
unsigned int nbins
 
int numberOfGBRecTracks
 
int numberOfHits
 
int numberOfSARecTracks
 
int numberOfSimTracks
 
double ptRangeMax
 
double ptRangeMin
 
double resLocalXRangeStation1
 
double resLocalXRangeStation2
 
double resLocalXRangeStation3
 
double resLocalXRangeStation4
 
double resLocalYRangeStation1
 
double resLocalYRangeStation2
 
double resLocalYRangeStation3
 
double resLocalYRangeStation4
 
double resPhiRange
 
double resThetaRange
 
std::string theDataType
 
edm::InputTag theGLBMuonTag
 
PropagatorthePropagator
 
edm::InputTag theRecHits4DTagCSC
 
edm::InputTag theRecHits4DTagDT
 
edm::InputTag theSTAMuonTag
 
std::vector< TH1F * > unitsGlobalPhi
 
std::vector< TH1F * > unitsGlobalRPhi
 
std::vector< TH1F * > unitsGlobalRZ
 
std::vector< TH1F * > unitsGlobalTheta
 
std::vector< TH1F * > unitsLocalPhi
 
std::vector< TH1F * > unitsLocalTheta
 
std::vector< TH1F * > unitsLocalX
 
std::vector< TH1F * > unitsLocalY
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Detailed Description

MuonAlignment offline Monitor Analyzer Makes histograms of high level Muon objects/quantities for Alignment Scenarios/DB comparison

Date:
2010/09/12 08:51:11
Revision:
1.11
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 40 of file MuonAlignmentAnalyzer.h.

Constructor & Destructor Documentation

MuonAlignmentAnalyzer::MuonAlignmentAnalyzer ( const edm::ParameterSet pset)

Constructor.

Definition at line 50 of file MuonAlignmentAnalyzer.cc.

References doGBplots, doResplots, doSAplots, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), invMassRangeMax, invMassRangeMin, min1DTrackRecHitSize, min4DTrackSegmentSize, nbins, numberOfGBRecTracks, numberOfHits, numberOfSARecTracks, numberOfSimTracks, ptRangeMax, ptRangeMin, resLocalXRangeStation1, resLocalXRangeStation2, resLocalXRangeStation3, resLocalXRangeStation4, resLocalYRangeStation1, resLocalYRangeStation2, resLocalYRangeStation3, resLocalYRangeStation4, resPhiRange, resThetaRange, theDataType, theGLBMuonTag, theRecHits4DTagCSC, theRecHits4DTagDT, and theSTAMuonTag.

50  :
75 
76 
77 {
78  theSTAMuonTag = pset.getParameter<edm::InputTag>("StandAloneTrackCollectionTag");
79  theGLBMuonTag = pset.getParameter<edm::InputTag>("GlobalMuonTrackCollectionTag");
80 
81  theRecHits4DTagDT = pset.getParameter<edm::InputTag>("RecHits4DDTCollectionTag");
82  theRecHits4DTagCSC = pset.getParameter<edm::InputTag>("RecHits4DCSCCollectionTag");
83 
84  theDataType = pset.getUntrackedParameter<std::string>("DataType");
85  ptRangeMin = pset.getUntrackedParameter<double>("ptRangeMin");
86  ptRangeMax = pset.getUntrackedParameter<double>("ptRangeMax");
87  invMassRangeMin = pset.getUntrackedParameter<double>("invMassRangeMin");
88  invMassRangeMax = pset.getUntrackedParameter<double>("invMassRangeMax");
89 
90  doSAplots = pset.getUntrackedParameter<bool>("doSAplots");
91  doGBplots = pset.getUntrackedParameter<bool>("doGBplots");
92  doResplots = pset.getUntrackedParameter<bool>("doResplots");
93 
94  resLocalXRangeStation1 = pset.getUntrackedParameter<double>("resLocalXRangeStation1");
95  resLocalXRangeStation2 = pset.getUntrackedParameter<double>("resLocalXRangeStation2");
96  resLocalXRangeStation3 = pset.getUntrackedParameter<double>("resLocalXRangeStation3");
97  resLocalXRangeStation4 = pset.getUntrackedParameter<double>("resLocalXRangeStation4");
98  resLocalYRangeStation1 = pset.getUntrackedParameter<double>("resLocalYRangeStation1");
99  resLocalYRangeStation2 = pset.getUntrackedParameter<double>("resLocalYRangeStation2");
100  resLocalYRangeStation3 = pset.getUntrackedParameter<double>("resLocalYRangeStation3");
101  resLocalYRangeStation4 = pset.getUntrackedParameter<double>("resLocalYRangeStation4");
102  resPhiRange = pset.getUntrackedParameter<double>("resPhiRange");
103  resThetaRange = pset.getUntrackedParameter<double>("resThetaRange");
104  nbins = pset.getUntrackedParameter<unsigned int>("nbins");
105  min1DTrackRecHitSize = pset.getUntrackedParameter<unsigned int>("min1DTrackRecHitSize");
106  min4DTrackSegmentSize = pset.getUntrackedParameter<unsigned int>("min4DTrackSegmentSize");
107 
108  if(theDataType != "RealData" && theDataType != "SimData")
109  edm::LogError("MuonAlignmentAnalyzer") << "Error in Data Type!!"<<std::endl;
110 
114  numberOfHits=0;
115 }
std::vector< TH1F * > hResidualLocalXCSC_ME
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::vector< TH1F * > hResidualLocalThetaDT_W
std::vector< TH1F * > hResidualGlobalZDT_MB
std::vector< TH1F * > hResidualLocalYCSC_ME
std::vector< TH1F * > hResidualGlobalThetaCSC_ME
std::vector< TH1F * > hResidualGlobalPhiCSC_ME
std::vector< TH1F * > hResidualLocalYDT_W
std::vector< TH1F * > hResidualGlobalZDT_W
std::vector< TH1F * > hResidualLocalXDT_W
std::vector< TH1F * > hResidualLocalThetaCSC_ME
std::vector< TH1F * > hResidualLocalPhiDT_W
std::vector< TH1F * > hResidualGlobalRPhiCSC_ME
std::vector< TH1F * > hResidualGlobalThetaDT_W
std::vector< TH1F * > hResidualGlobalRCSC_ME
std::vector< TH1F * > hResidualLocalPhiCSC_ME
std::vector< TH1F * > hResidualGlobalPhiDT_MB
std::vector< TH1F * > hResidualLocalPhiDT_MB
std::vector< TH1F * > hResidualLocalXDT_MB
std::vector< TH1F * > hResidualGlobalRPhiDT_W
std::vector< TH1F * > hResidualGlobalThetaDT_MB
std::vector< TH1F * > hResidualGlobalRPhiDT_MB
std::vector< TH1F * > hResidualLocalYDT_MB
std::vector< TH1F * > hResidualGlobalPhiDT_W
std::vector< TH1F * > hResidualLocalThetaDT_MB
MuonAlignmentAnalyzer::~MuonAlignmentAnalyzer ( )
virtual

Destructor.

Definition at line 118 of file MuonAlignmentAnalyzer.cc.

118  {
119 }

Member Function Documentation

void MuonAlignmentAnalyzer::analyze ( const edm::Event event,
const edm::EventSetup eventSetup 
)
virtual

Implements edm::EDAnalyzer.

Definition at line 1339 of file MuonAlignmentAnalyzer.cc.

References abs, alongMomentum, PV3DBase< T, PVType, FrameType >::barePhi(), barePhi(), PV3DBase< T, PVType, FrameType >::bareTheta(), CSCDetId::chamber(), deltaR(), detectorCollection, doGBplots, doMatching(), doResplots, doSAplots, Reference_intrackfit_cff::endcap, CSCDetId::endcap(), PV3DBase< T, PVType, FrameType >::eta(), TrajectoryStateOnSurface::freeState(), fs, edm::EventSetup::get(), TrajectoryStateOnSurface::globalDirection(), TrajectoryStateOnSurface::hasError(), hGBChi2, hGBChi2_Barrel, hGBChi2_Endcap, hGBInvM, hGBInvM_Barrel, hGBInvM_Endcap, hGBInvM_Overlap, hGBinvPTres, hGBinvPTvsEta, hGBinvPTvsNhits, hGBinvPTvsPhi, hGBNhits, hGBNhits_Barrel, hGBNhits_Endcap, hGBNmuons, hGBNmuons_Barrel, hGBNmuons_Endcap, hGBPhivsEta, hGBPTDiff, hGBPTDiffvsEta, hGBPTDiffvsPhi, hGBPTRec, hGBPTRec_Barrel, hGBPTRec_Endcap, hGBPTres, hGBPTres_Barrel, hGBPTres_Endcap, hGBPTvsEta, hGBPTvsPhi, hResidualGlobalPhiCSC, hResidualGlobalPhiCSC_ME, hResidualGlobalPhiDT, hResidualGlobalPhiDT_MB, hResidualGlobalPhiDT_W, hResidualGlobalRCSC, hResidualGlobalRCSC_ME, hResidualGlobalRPhiCSC, hResidualGlobalRPhiCSC_ME, hResidualGlobalRPhiDT, hResidualGlobalRPhiDT_MB, hResidualGlobalRPhiDT_W, hResidualGlobalThetaCSC, hResidualGlobalThetaCSC_ME, hResidualGlobalThetaDT, hResidualGlobalThetaDT_MB, hResidualGlobalThetaDT_W, hResidualGlobalZDT, hResidualGlobalZDT_MB, hResidualGlobalZDT_W, hResidualLocalPhiCSC, hResidualLocalPhiCSC_ME, hResidualLocalPhiDT, hResidualLocalPhiDT_MB, hResidualLocalPhiDT_W, hResidualLocalThetaCSC, hResidualLocalThetaCSC_ME, hResidualLocalThetaDT, hResidualLocalThetaDT_MB, hResidualLocalThetaDT_W, hResidualLocalXCSC, hResidualLocalXCSC_ME, hResidualLocalXDT, hResidualLocalXDT_MB, hResidualLocalXDT_W, hResidualLocalYCSC, hResidualLocalYCSC_ME, hResidualLocalYDT, hResidualLocalYDT_MB, hResidualLocalYDT_W, hSAChi2, hSAChi2_Barrel, hSAChi2_Endcap, hSAInvM, hSAInvM_Barrel, hSAInvM_Endcap, hSAInvM_Overlap, hSAinvPTres, hSAinvPTvsEta, hSAinvPTvsNhits, hSAinvPTvsPhi, hSANhits, hSANhits_Barrel, hSANhits_Endcap, hSANmuons, hSANmuons_Barrel, hSANmuons_Endcap, hSAPhivsEta, hSAPTDiff, hSAPTDiffvsEta, hSAPTDiffvsPhi, hSAPTRec, hSAPTRec_Barrel, hSAPTRec_Endcap, hSAPTres, hSAPTres_Barrel, hSAPTres_Endcap, hSAPTvsEta, hSAPTvsPhi, hSimInvM, hSimInvM_Barrel, hSimInvM_Endcap, hSimInvM_Overlap, hSimNmuons, hSimNmuons_Barrel, hSimNmuons_Endcap, hSimPhivsEta, hSimPT, hSimPT_Barrel, hSimPT_Endcap, hSimPTvsEta, hSimPTvsPhi, i, getHLTprescales::index, reco::TransientTrack::innermostMeasurementState(), TrajectoryStateOnSurface::isValid(), TrajectoryStateOnSurface::localDirection(), TrajectoryStateOnSurface::localPosition(), PV3DBase< T, PVType, FrameType >::mag(), TFileDirectory::make(), min1DTrackRecHitSize, min4DTrackSegmentSize, nbins, numberOfGBRecTracks, numberOfHits, numberOfSARecTracks, numberOfSimTracks, p1, p2, PV3DBase< T, PVType, FrameType >::perp(), perp(), FreeTrajectoryState::position(), position, Propagator::propagate(), resLocalXRangeStation1, resLocalXRangeStation2, resLocalXRangeStation3, resLocalXRangeStation4, resLocalYRangeStation1, resLocalYRangeStation2, resLocalYRangeStation3, resLocalYRangeStation4, resPhiRange, resThetaRange, relativeConstraints::ring, CSCDetId::ring(), DTChamberId::sector(), findQualityFiles::size, DTChamberId::station(), relativeConstraints::station, CSCDetId::station(), muonTagProbeFilters_cff::staTracks, SteppingHelixPropagator_cfi::SteppingHelixPropagator, DetId::subdetId(), GeomDet::surface(), theDataType, theGLBMuonTag, thePropagator, theRecHits4DTagCSC, theRecHits4DTagDT, theSTAMuonTag, GeomDet::toGlobal(), unitsGlobalPhi, unitsGlobalRPhi, unitsGlobalRZ, unitsGlobalTheta, 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().

1339  {
1340 
1341  GlobalVector p1,p2;
1342  std::vector< double > simPar[4] ; //pt,eta,phi,charge
1343 
1344 
1345 // ######### if data= MC, do Simulation Plots#####
1346  if(theDataType == "SimData"){
1347  double simEta=0;
1348  double simPt=0;
1349  double simPhi=0;
1350  int i=0, ie=0,ib=0;
1351 
1352  // Get the SimTrack collection from the event
1354  event.getByLabel("g4SimHits",simTracks);
1355 
1356 
1357  edm::SimTrackContainer::const_iterator simTrack;
1358 
1359  for (simTrack = simTracks->begin(); simTrack != simTracks->end(); ++simTrack){
1360  if (abs((*simTrack).type()) == 13) {
1361  i++;
1362  simPt=(*simTrack).momentum().Pt();
1363  simEta=(*simTrack).momentum().eta();
1364  simPhi=(*simTrack).momentum().phi();
1366  hSimPT->Fill(simPt);
1367  if(fabs(simEta)<1.04) {hSimPT_Barrel->Fill(simPt);ib++;}
1368  else {hSimPT_Endcap->Fill(simPt);ie++;}
1369  hSimPTvsEta->Fill(simEta,simPt);
1370  hSimPTvsPhi->Fill(simPhi,simPt);
1371  hSimPhivsEta->Fill(simEta,simPhi);
1372 
1373  simPar[0].push_back(simPt);
1374  simPar[1].push_back(simEta);
1375  simPar[2].push_back(simPhi);
1376  simPar[3].push_back((*simTrack).charge());
1377 
1378 // Save the muon pair
1379  if(i==1) p1=GlobalVector((*simTrack).momentum().x(),(*simTrack).momentum().y(),(*simTrack).momentum().z());
1380  if(i==2) p2=GlobalVector((*simTrack).momentum().x(),(*simTrack).momentum().y(),(*simTrack).momentum().z());
1381  }
1382  }
1383  hSimNmuons->Fill(i);
1384  hSimNmuons_Barrel->Fill(ib);
1385  hSimNmuons_Endcap->Fill(ie);
1386 
1387  if(i>1){ // Take 2 first muons :-(
1388  TLorentzVector mu1(p1.x(), p1.y(), p1.z(), p1.mag());
1389  TLorentzVector mu2(p2.x(), p2.y(), p2.z(), p2.mag());
1390  TLorentzVector pair = mu1 + mu2;
1391  double Minv = pair.M();
1392  hSimInvM->Fill(Minv);
1393  if(fabs(p1.eta())<1.04 && fabs(p2.eta())<1.04) hSimInvM_Barrel->Fill(Minv);
1394  else if(fabs(p1.eta())>=1.04 && fabs(p2.eta())>=1.04) hSimInvM_Endcap->Fill(Minv);
1395  else hSimInvM_Overlap->Fill(Minv);
1396  }
1397 
1398  } //simData
1399 
1400 
1401 // ############ Stand Alone Muon plots ###############
1402  if(doSAplots){
1403 
1404  double SArecPt=0.;
1405  double SAeta=0.;
1406  double SAphi=0.;
1407  int i=0, ie=0,ib=0;
1408  double ich=0;
1409 
1410  // Get the RecTrack collection from the event
1412  event.getByLabel(theSTAMuonTag, staTracks);
1413  numberOfSARecTracks += staTracks->size();
1414 
1415  reco::TrackCollection::const_iterator staTrack;
1416 
1417  for (staTrack = staTracks->begin(); staTrack != staTracks->end(); ++staTrack){
1418  i++;
1419 
1420  SArecPt = (*staTrack).pt();
1421  SAeta = (*staTrack).eta();
1422  SAphi = (*staTrack).phi();
1423  ich= (*staTrack).charge();
1424 
1425  hSAPTRec->Fill(SArecPt);
1426  hSAPhivsEta->Fill(SAeta,SAphi);
1427  hSAChi2->Fill((*staTrack).chi2());
1428  hSANhits->Fill((*staTrack).numberOfValidHits());
1429  if(fabs(SAeta)<1.04) {hSAPTRec_Barrel->Fill(SArecPt); hSAChi2_Barrel->Fill((*staTrack).chi2()); hSANhits_Barrel->Fill((*staTrack).numberOfValidHits()); ib++;}
1430  else {hSAPTRec_Endcap->Fill(SArecPt); hSAChi2_Endcap->Fill((*staTrack).chi2()); hSANhits_Endcap->Fill((*staTrack).numberOfValidHits()); ie++;}
1431 
1432 // save the muon pair
1433  if(i==1) p1=GlobalVector((*staTrack).momentum().x(),(*staTrack).momentum().y(),(*staTrack).momentum().z());
1434  if(i==2) p2=GlobalVector((*staTrack).momentum().x(),(*staTrack).momentum().y(),(*staTrack).momentum().z());
1435 
1436 
1437  if(SArecPt && theDataType == "SimData"){
1438 
1439  double candDeltaR= -999.0, dR;
1440  int iCand=0;
1441  if(simPar[0].size()>0){
1442  for(unsigned int iSim = 0; iSim <simPar[0].size(); iSim++) {
1443  dR=deltaR(SAeta,SAphi,simPar[1][iSim],simPar[2][iSim]);
1444  if(candDeltaR<0 || dR<candDeltaR) {
1445  candDeltaR=dR;
1446  iCand=iSim;
1447  }
1448  }}
1449 
1450  double simPt=simPar[0][iCand];
1451  hSAPTres->Fill( (SArecPt-simPt)/simPt);
1452  if(fabs(SAeta)<1.04) hSAPTres_Barrel->Fill((SArecPt-simPt)/simPt);
1453  else hSAPTres_Endcap->Fill((SArecPt-simPt)/simPt);
1454 
1455  hSAPTDiff->Fill(SArecPt-simPt);
1456 
1457  hSAPTDiffvsEta->Fill(SAeta,SArecPt-simPt);
1458  hSAPTDiffvsPhi->Fill(SAphi,SArecPt-simPt);
1459  double ptInvRes= ( ich/SArecPt - simPar[3][iCand]/simPt)/ (simPar[3][iCand]/simPt);
1460  hSAinvPTres->Fill( ptInvRes);
1461 
1462  hSAinvPTvsEta->Fill(SAeta,ptInvRes);
1463  hSAinvPTvsPhi->Fill(SAphi,ptInvRes);
1464  hSAinvPTvsNhits->Fill((*staTrack).numberOfValidHits(),ptInvRes);
1465  }
1466 
1467  hSAPTvsEta->Fill(SAeta,SArecPt);
1468  hSAPTvsPhi->Fill(SAphi,SArecPt);
1469  }
1470 
1471  hSANmuons->Fill(i);
1472  hSANmuons_Barrel->Fill(ib);
1473  hSANmuons_Endcap->Fill(ie);
1474 
1475  if(i>1){ // Take 2 first muons :-(
1476  TLorentzVector mu1(p1.x(), p1.y(), p1.z(), p1.mag());
1477  TLorentzVector mu2(p2.x(), p2.y(), p2.z(), p2.mag());
1478  TLorentzVector pair = mu1 + mu2;
1479  double Minv = pair.M();
1480  hSAInvM->Fill(Minv);
1481  if(fabs(p1.eta())<1.04 && fabs(p2.eta())<1.04) hSAInvM_Barrel->Fill(Minv);
1482  else if(fabs(p1.eta())>=1.04 && fabs(p2.eta())>=1.04) hSAInvM_Endcap->Fill(Minv);
1483  else hSAInvM_Overlap->Fill(Minv);
1484  } // 2 first muons
1485 
1486  }//end doSAplots
1487 
1488 
1489 
1490 // ############### Global Muons plots ##########
1491 
1492  if(doGBplots){
1493  // Get the RecTrack collection from the event
1495  event.getByLabel(theGLBMuonTag, glbTracks);
1496  numberOfGBRecTracks += glbTracks->size();
1497 
1498  double GBrecPt = 0;
1499  double GBeta = 0;
1500  double GBphi = 0;
1501  double ich =0;
1502  int i=0, ie=0,ib=0;
1503 
1504  reco::TrackCollection::const_iterator glbTrack;
1505 
1506  for (glbTrack = glbTracks->begin(); glbTrack != glbTracks->end(); ++glbTrack){
1507  i++;
1508 
1509  GBrecPt = (*glbTrack).pt();
1510  GBeta = (*glbTrack).eta();
1511  GBphi = (*glbTrack).phi();
1512  ich= (*glbTrack).charge();
1513 
1514  hGBPTRec->Fill(GBrecPt);
1515  hGBPhivsEta->Fill(GBeta,GBphi);
1516  hGBChi2->Fill((*glbTrack).chi2());
1517  hGBNhits->Fill((*glbTrack).numberOfValidHits());
1518  if(fabs(GBeta)<1.04) {hGBPTRec_Barrel->Fill(GBrecPt); hGBChi2_Barrel->Fill((*glbTrack).chi2()); hGBNhits_Barrel->Fill((*glbTrack).numberOfValidHits()); ib++;}
1519  else {hGBPTRec_Endcap->Fill(GBrecPt); hGBChi2_Endcap->Fill((*glbTrack).chi2()); hGBNhits_Endcap->Fill((*glbTrack).numberOfValidHits()); ie++;}
1520 
1521 // save the muon pair
1522  if(i==1) p1=GlobalVector((*glbTrack).momentum().x(),(*glbTrack).momentum().y(),(*glbTrack).momentum().z());
1523  if(i==2) p2=GlobalVector((*glbTrack).momentum().x(),(*glbTrack).momentum().y(),(*glbTrack).momentum().z());
1524 
1525  if(GBrecPt && theDataType == "SimData"){
1526  double candDeltaR= -999.0, dR;
1527  int iCand=0;
1528  if(simPar[0].size()>0){
1529  for(unsigned int iSim = 0; iSim <simPar[0].size(); iSim++) {
1530  dR=deltaR(GBeta,GBphi,simPar[1][iSim],simPar[2][iSim]);
1531  if(candDeltaR<0 || dR<candDeltaR) {
1532  candDeltaR=dR;
1533  iCand=iSim;
1534  }
1535  }}
1536 
1537  double simPt=simPar[0][iCand];
1538 
1539  hGBPTres->Fill( (GBrecPt-simPt)/simPt);
1540  if(fabs(GBeta)<1.04) hGBPTres_Barrel->Fill((GBrecPt-simPt)/simPt);
1541  else hGBPTres_Endcap->Fill((GBrecPt-simPt)/simPt);
1542 
1543  hGBPTDiff->Fill(GBrecPt-simPt);
1544 
1545  hGBPTDiffvsEta->Fill(GBeta,GBrecPt-simPt);
1546  hGBPTDiffvsPhi->Fill(GBphi,GBrecPt-simPt);
1547 
1548  double ptInvRes= ( ich/GBrecPt - simPar[3][iCand]/simPt)/ (simPar[3][iCand]/simPt);
1549  hGBinvPTres->Fill( ptInvRes);
1550 
1551  hGBinvPTvsEta->Fill(GBeta,ptInvRes);
1552  hGBinvPTvsPhi->Fill(GBphi,ptInvRes);
1553  hGBinvPTvsNhits->Fill((*glbTrack).numberOfValidHits(),ptInvRes);
1554  }
1555 
1556 
1557  hGBPTvsEta->Fill(GBeta,GBrecPt);
1558  hGBPTvsPhi->Fill(GBphi,GBrecPt);
1559 
1560  }
1561 
1562  hGBNmuons->Fill(i);
1563  hGBNmuons_Barrel->Fill(ib);
1564  hGBNmuons_Endcap->Fill(ie);
1565 
1566  if(i>1){ // Take 2 first muons :-(
1567  TLorentzVector mu1(p1.x(), p1.y(), p1.z(), p1.mag());
1568  TLorentzVector mu2(p2.x(), p2.y(), p2.z(), p2.mag());
1569  TLorentzVector pair = mu1 + mu2;
1570  double Minv = pair.M();
1571  hGBInvM->Fill(Minv);
1572  if(fabs(p1.eta())<1.04 && fabs(p2.eta())<1.04) hGBInvM_Barrel->Fill(Minv);
1573  else if(fabs(p1.eta())>=1.04 && fabs(p2.eta())>=1.04) hGBInvM_Endcap->Fill(Minv);
1574  else hGBInvM_Overlap->Fill(Minv);
1575  }
1576 
1577  } //end doGBplots
1578 
1579 
1580 // ############ Residual plots ###################
1581 
1582  if(doResplots){
1583 
1584  edm::ESHandle<MagneticField> theMGField;
1585  eventSetup.get<IdealMagneticFieldRecord>().get(theMGField);
1586 
1587  edm::ESHandle<GlobalTrackingGeometry> theTrackingGeometry;
1588  eventSetup.get<GlobalTrackingGeometryRecord>().get(theTrackingGeometry);
1589 
1590 
1591  // Get the RecTrack collection from the event
1593  event.getByLabel(theSTAMuonTag, staTracks);
1594 
1595  // Get the 4D DTSegments
1596  edm::Handle<DTRecSegment4DCollection> all4DSegmentsDT;
1597  event.getByLabel(theRecHits4DTagDT, all4DSegmentsDT);
1599 
1600  // Get the 4D CSCSegments
1601  edm::Handle<CSCSegmentCollection> all4DSegmentsCSC;
1602  event.getByLabel(theRecHits4DTagCSC, all4DSegmentsCSC);
1604 
1605  //Vectors used to perform the matching between Segments and hits from Track
1606  intDVector indexCollectionDT;
1607  intDVector indexCollectionCSC;
1608 
1609 /* std::cout << "<MuonAlignmentAnalyzer> List of DTSegments found in Local Reconstruction" << std::endl;
1610  std::cout << "Number: " << all4DSegmentsDT->size() << std::endl;
1611  for (segmentDT = all4DSegmentsDT->begin(); segmentDT != all4DSegmentsDT->end(); ++segmentDT){
1612  const GeomDet* geomDet = theTrackingGeometry->idToDet((*segmentDT).geographicalId());
1613  std::cout << "<MuonAlignmentAnalyzer> " << geomDet->toGlobal((*segmentDT).localPosition()) << std::endl;
1614  std::cout << "<MuonAlignmentAnalyzer> Local " << (*segmentDT).localPosition() << std::endl;
1615  }
1616  std::cout << "<MuonAlignmentAnalyzer> List of CSCSegments found in Local Reconstruction" << std::endl;
1617  for (segmentCSC = all4DSegmentsCSC->begin(); segmentCSC != all4DSegmentsCSC->end(); ++segmentCSC){
1618  const GeomDet* geomDet = theTrackingGeometry->idToDet((*segmentCSC).geographicalId());
1619  std::cout << "<MuonAlignmentAnalyzer>" << geomDet->toGlobal((*segmentCSC).localPosition()) << std::endl;
1620  }
1621 */
1623 
1624  reco::TrackCollection::const_iterator staTrack;
1625  for (staTrack = staTracks->begin(); staTrack != staTracks->end(); ++staTrack){
1626 
1627  int countPoints = 0;
1628 
1629  reco::TransientTrack track(*staTrack,&*theMGField,theTrackingGeometry);
1630 
1631 
1632  if(staTrack->numberOfValidHits()>(min1DTrackRecHitSize-1)) {
1633 
1634  RecHitVector my4DTrack = this->doMatching(*staTrack, all4DSegmentsDT, all4DSegmentsCSC, &indexCollectionDT, &indexCollectionCSC, theTrackingGeometry);
1635 
1636 
1637 //cut in number of segments
1638 
1639  if(my4DTrack.size()>(min4DTrackSegmentSize-1) ){
1640 
1641 // start propagation
1642 // TrajectoryStateOnSurface innerTSOS = track.impactPointState();
1643  TrajectoryStateOnSurface innerTSOS = track.innermostMeasurementState();
1644 
1645  //If the state is valid
1646  if(innerTSOS.isValid()) {
1647 
1648  //Loop over Associated segments
1649  for(RecHitVector::iterator rechit = my4DTrack.begin(); rechit != my4DTrack.end(); ++rechit) {
1650 
1651  const GeomDet* geomDet = theTrackingGeometry->idToDet((*rechit)->geographicalId());
1652 //Otherwise the propagator could throw an exception
1653  const Plane* pDest = dynamic_cast<const Plane*>(&geomDet->surface());
1654  const Cylinder* cDest = dynamic_cast<const Cylinder*>(&geomDet->surface());
1655 
1656  if(pDest != 0 || cDest != 0) { //Donde antes iba el try
1657 
1658  TrajectoryStateOnSurface destiny = thePropagator->propagate(*(innerTSOS.freeState()), geomDet->surface());
1659 
1660  if(!destiny.isValid()|| !destiny.hasError()) continue;
1661 
1662 /* std::cout << "<MuonAlignmentAnalyzer> Segment: " << geomDet->toGlobal((*rechit)->localPosition()) << std::endl;
1663  std::cout << "<MuonAlignmentAnalyzer> Segment local: " << (*rechit)->localPosition() << std::endl;
1664  std::cout << "<MuonAlignmentAnalyzer> Predicted: " << destiny.freeState()->position() << std::endl;
1665  std::cout << "<MuonAlignmentAnalyzer> Predicted local: " << destiny.localPosition() << std::endl;
1666 */
1667  const long rawId= (*rechit)->geographicalId().rawId();
1668  int position = -1;
1669  bool newDetector = true;
1670  //Loop over the DetectorCollection to see if the detector is new and requires a new entry
1671  for(std::vector<long>::iterator myIds = detectorCollection.begin(); myIds != detectorCollection.end(); myIds++) {
1672  ++position;
1673  //If matches newDetector = false
1674  if(*myIds == rawId) {
1675  newDetector = false;
1676  break;
1677  }
1678  }
1679 
1680  DetId myDet(rawId);
1681  int det = myDet.subdetId();
1682  int wheel=0,station=0,sector=0;
1683  int endcap=0,ring=0,chamber=0;
1684 
1685  double residualGlobalRPhi=0,residualGlobalPhi=0,residualGlobalR=0,residualGlobalTheta=0,residualGlobalZ=0;
1686  double residualLocalX=0,residualLocalPhi=0,residualLocalY=0,residualLocalTheta=0;
1687 
1688  // Fill generic histograms
1689  //If it's a DT
1690  if(det == 1) {
1691  DTChamberId myChamber(rawId);
1692  wheel=myChamber.wheel();
1693  station = myChamber.station();
1694  sector=myChamber.sector();
1695 
1696 //global
1697  residualGlobalRPhi = geomDet->toGlobal((*rechit)->localPosition()).perp() * geomDet->toGlobal((*rechit)->localPosition()).barePhi() - destiny.freeState()->position().perp() * destiny.freeState()->position().barePhi();
1698 
1699 //local
1700  residualLocalX = (*rechit)->localPosition().x() -destiny.localPosition().x();
1701 
1702 //global
1703  residualGlobalPhi = geomDet->toGlobal(((RecSegment *)(*rechit))->localDirection()).barePhi() - destiny.globalDirection().barePhi();
1704 
1705 //local
1706  residualLocalPhi = atan2(((RecSegment *)(*rechit))->localDirection().z(),
1707  ((RecSegment*)(*rechit))->localDirection().x()) - atan2(destiny.localDirection().z(), destiny.localDirection().x());
1708 
1709  hResidualGlobalRPhiDT->Fill(residualGlobalRPhi);
1710  hResidualGlobalPhiDT->Fill(residualGlobalPhi);
1711  hResidualLocalXDT->Fill(residualLocalX);
1712  hResidualLocalPhiDT->Fill(residualLocalPhi);
1713 
1714  if(station!=4){
1715 //global
1716  residualGlobalZ = geomDet->toGlobal((*rechit)->localPosition()).z() - destiny.freeState()->position().z();
1717 
1718 //local
1719  residualLocalY = (*rechit)->localPosition().y() - destiny.localPosition().y();
1720 
1721 //global
1722  residualGlobalTheta = geomDet->toGlobal(((RecSegment *)(*rechit))->localDirection()).bareTheta() - destiny.globalDirection().bareTheta();
1723 
1724 //local
1725  residualLocalTheta = atan2(((RecSegment *)(*rechit))->localDirection().z(),
1726  ((RecSegment*)(*rechit))->localDirection().y()) - atan2(destiny.localDirection().z(), destiny.localDirection().y());
1727 
1728 
1729  hResidualGlobalThetaDT->Fill(residualGlobalTheta);
1730  hResidualGlobalZDT->Fill(residualGlobalZ);
1731  hResidualLocalThetaDT->Fill(residualLocalTheta);
1732  hResidualLocalYDT->Fill(residualLocalY);
1733  }
1734 
1735  int index = wheel+2;
1736  hResidualGlobalRPhiDT_W[index]->Fill(residualGlobalRPhi);
1737  hResidualGlobalPhiDT_W[index]->Fill(residualGlobalPhi);
1738  hResidualLocalXDT_W[index]->Fill(residualLocalX);
1739  hResidualLocalPhiDT_W[index]->Fill(residualLocalPhi);
1740  if(station!=4){
1741  hResidualGlobalThetaDT_W[index]->Fill(residualGlobalTheta);
1742  hResidualGlobalZDT_W[index]->Fill(residualGlobalZ);
1743  hResidualLocalThetaDT_W[index]->Fill(residualLocalTheta);
1744  hResidualLocalYDT_W[index]->Fill(residualLocalY);
1745  }
1746 
1747  index=wheel*4+station+7;
1748  hResidualGlobalRPhiDT_MB[index]->Fill(residualGlobalRPhi);
1749  hResidualGlobalPhiDT_MB[index]->Fill(residualGlobalPhi);
1750  hResidualLocalXDT_MB[index]->Fill(residualLocalX);
1751  hResidualLocalPhiDT_MB[index]->Fill(residualLocalPhi);
1752 
1753  if(station!=4){
1754  hResidualGlobalThetaDT_MB[index]->Fill(residualGlobalTheta);
1755  hResidualGlobalZDT_MB[index]->Fill(residualGlobalZ);
1756  hResidualLocalThetaDT_MB[index]->Fill(residualLocalTheta);
1757  hResidualLocalYDT_MB[index]->Fill(residualLocalY);
1758  }
1759  }
1760  else if (det==2){
1761  CSCDetId myChamber(rawId);
1762  endcap= myChamber.endcap();
1763  station = myChamber.station();
1764  if(endcap==2) station = -station;
1765  ring = myChamber.ring();
1766  chamber=myChamber.chamber();
1767 
1768 
1769 //global
1770  residualGlobalRPhi = geomDet->toGlobal((*rechit)->localPosition()).perp() * geomDet->toGlobal((*rechit)->localPosition()).barePhi() - destiny.freeState()->position().perp() * destiny.freeState()->position().barePhi();
1771 
1772 //local
1773  residualLocalX = (*rechit)->localPosition().x() -destiny.localPosition().x();
1774 
1775 //global
1776  residualGlobalR = geomDet->toGlobal((*rechit)->localPosition()).perp() - destiny.freeState()->position().perp();
1777 
1778 //local
1779  residualLocalY = (*rechit)->localPosition().y() - destiny.localPosition().y();
1780 
1781 //global
1782  residualGlobalPhi = geomDet->toGlobal(((RecSegment *)(*rechit))->localDirection()).barePhi() - destiny.globalDirection().barePhi();
1783 
1784 //local
1785  residualLocalPhi = atan2(((RecSegment *)(*rechit))->localDirection().y(),
1786  ((RecSegment*)(*rechit))->localDirection().x()) - atan2(destiny.localDirection().y(), destiny.localDirection().x());
1787 
1788 //global
1789  residualGlobalTheta = geomDet->toGlobal(((RecSegment *)(*rechit))->localDirection()).bareTheta() - destiny.globalDirection().bareTheta();
1790 
1791 //local
1792  residualLocalTheta = atan2(((RecSegment *)(*rechit))->localDirection().y(),
1793  ((RecSegment*)(*rechit))->localDirection().z()) - atan2(destiny.localDirection().y(), destiny.localDirection().z());
1794 
1795  hResidualGlobalRPhiCSC->Fill(residualGlobalRPhi);
1796  hResidualGlobalPhiCSC->Fill(residualGlobalPhi);
1797  hResidualGlobalThetaCSC->Fill(residualGlobalTheta);
1798  hResidualGlobalRCSC->Fill(residualGlobalR);
1799  hResidualLocalXCSC->Fill(residualLocalX);
1800  hResidualLocalPhiCSC->Fill(residualLocalPhi);
1801  hResidualLocalThetaCSC->Fill(residualLocalTheta);
1802  hResidualLocalYCSC->Fill(residualLocalY);
1803 
1804  int index=2*station+ring+7;
1805  if(station==-1) {index=5+ring;
1806  if(ring==4) index=6;}
1807  if(station==1) {index=8+ring;
1808  if(ring==4) index=9;}
1809  hResidualGlobalRPhiCSC_ME[index]->Fill(residualGlobalRPhi);
1810  hResidualGlobalPhiCSC_ME[index]->Fill(residualGlobalPhi);
1811  hResidualGlobalThetaCSC_ME[index]->Fill(residualGlobalTheta);
1812  hResidualGlobalRCSC_ME[index]->Fill(residualGlobalR);
1813  hResidualLocalXCSC_ME[index]->Fill(residualLocalX);
1814  hResidualLocalPhiCSC_ME[index]->Fill(residualLocalPhi);
1815  hResidualLocalThetaCSC_ME[index]->Fill(residualLocalTheta);
1816  hResidualLocalYCSC_ME[index]->Fill(residualLocalY);
1817 
1818  }
1819  else{residualGlobalRPhi=0,residualGlobalPhi=0,residualGlobalR=0,residualGlobalTheta=0,residualGlobalZ=0;
1820  residualLocalX=0,residualLocalPhi=0,residualLocalY=0,residualLocalTheta=0,residualLocalY=0;
1821  }
1822 // Fill individual chamber histograms
1823  if(newDetector) {
1824 
1825  //Create an RawIdDetector, fill it and push it into the collection
1826  detectorCollection.push_back(rawId);
1827 
1828  //This piece of code calculates the range of the residuals
1829  double rangeX = 3.0, rangeY =5.;
1830  switch(abs(station)) {
1831  case 1:
1832  {rangeX = resLocalXRangeStation1; rangeY = resLocalYRangeStation1;}
1833  break;
1834  case 2:
1835  {rangeX = resLocalXRangeStation2; rangeY = resLocalYRangeStation2;}
1836  break;
1837  case 3:
1838  {rangeX = resLocalXRangeStation3; rangeY = resLocalYRangeStation3;}
1839  break;
1840  case 4:
1841  {rangeX = resLocalXRangeStation4; rangeY = resLocalYRangeStation4;}
1842  break;
1843  default:
1844  break;
1845  }
1846 
1847  //create new histograms
1848 
1849  char nameOfHistoLocalX[50];
1850  char nameOfHistoLocalTheta[50];
1851  char nameOfHistoLocalY[50];
1852  char nameOfHistoLocalPhi[50];
1853  char nameOfHistoGlobalRPhi[50];
1854  char nameOfHistoGlobalTheta[50];
1855  char nameOfHistoGlobalR[50];
1856  char nameOfHistoGlobalPhi[50];
1857  char nameOfHistoGlobalZ[50];
1858 
1859  if(det==1){ // DT
1860  sprintf(nameOfHistoLocalX, "ResidualLocalX_W%dMB%1dS%1d",wheel,station,sector );
1861  sprintf(nameOfHistoLocalPhi, "ResidualLocalPhi_W%dMB%1dS%1d",wheel,station,sector);
1862  sprintf(nameOfHistoGlobalRPhi, "ResidualGlobalRPhi_W%dMB%1dS%1d",wheel,station,sector );
1863  sprintf(nameOfHistoGlobalPhi, "ResidualGlobalPhi_W%dMB%1dS%1d",wheel,station,sector);
1864  sprintf(nameOfHistoLocalTheta, "ResidualLocalTheta_W%dMB%1dS%1d",wheel,station,sector);
1865  sprintf(nameOfHistoLocalY, "ResidualLocalY_W%dMB%1dS%1d",wheel,station,sector);
1866  TH1F *histoLocalY = fs->make<TH1F>(nameOfHistoLocalY, nameOfHistoLocalY, nbins, -rangeY, rangeY);
1867  unitsLocalY.push_back(histoLocalY);
1868  sprintf(nameOfHistoGlobalTheta, "ResidualGlobalTheta_W%dMB%1dS%1d",wheel,station,sector);
1869  sprintf(nameOfHistoGlobalZ, "ResidualGlobalZ_W%dMB%1dS%1d",wheel,station,sector);
1870  TH1F *histoGlobalZ = fs->make<TH1F>(nameOfHistoGlobalZ, nameOfHistoGlobalZ, nbins, -rangeY, rangeY);
1871  unitsGlobalRZ.push_back(histoGlobalZ);
1872 
1873  }
1874  else if(det==2){ //CSC
1875  sprintf(nameOfHistoLocalX, "ResidualLocalX_ME%dR%1dC%1d",station,ring,chamber );
1876  sprintf(nameOfHistoLocalPhi, "ResidualLocalPhi_ME%dR%1dC%1d",station,ring,chamber);
1877  sprintf(nameOfHistoLocalTheta, "ResidualLocalTheta_ME%dR%1dC%1d",station,ring,chamber);
1878  sprintf(nameOfHistoLocalY, "ResidualLocalY_ME%dR%1dC%1d",station,ring,chamber);
1879  TH1F *histoLocalY = fs->make<TH1F>(nameOfHistoLocalY, nameOfHistoLocalY, nbins, -rangeY, rangeY);
1880  unitsLocalY.push_back(histoLocalY);
1881  sprintf(nameOfHistoGlobalRPhi, "ResidualGlobalRPhi_ME%dR%1dC%1d",station,ring,chamber );
1882  sprintf(nameOfHistoGlobalPhi, "ResidualGlobalPhi_ME%dR%1dC%1d",station,ring,chamber);
1883  sprintf(nameOfHistoGlobalTheta, "ResidualGlobalTheta_ME%dR%1dC%1d",station,ring,chamber);
1884  sprintf(nameOfHistoGlobalR, "ResidualGlobalR_ME%dR%1dC%1d",station,ring,chamber);
1885  TH1F *histoGlobalR = fs->make<TH1F>(nameOfHistoGlobalR, nameOfHistoGlobalR, nbins, -rangeY, rangeY);
1886  unitsGlobalRZ.push_back(histoGlobalR);
1887  }
1888 
1889  // Common histos to DT and CSC
1890  TH1F *histoLocalX = fs->make<TH1F>(nameOfHistoLocalX, nameOfHistoLocalX, nbins, -rangeX, rangeX);
1891  TH1F *histoGlobalRPhi = fs->make<TH1F>(nameOfHistoGlobalRPhi, nameOfHistoGlobalRPhi, nbins, -rangeX, rangeX);
1892  TH1F *histoLocalPhi = fs->make<TH1F>(nameOfHistoLocalPhi, nameOfHistoLocalPhi, nbins, -resPhiRange, resPhiRange);
1893  TH1F *histoGlobalPhi = fs->make<TH1F>(nameOfHistoGlobalPhi, nameOfHistoGlobalPhi, nbins, -resPhiRange, resPhiRange);
1894  TH1F *histoGlobalTheta = fs->make<TH1F>(nameOfHistoGlobalTheta, nameOfHistoGlobalTheta, nbins, -resThetaRange, resThetaRange);
1895  TH1F *histoLocalTheta = fs->make<TH1F>(nameOfHistoLocalTheta, nameOfHistoLocalTheta, nbins, -resThetaRange, resThetaRange);
1896 
1897  histoLocalX->Fill(residualLocalX);
1898  histoLocalPhi->Fill(residualLocalPhi);
1899  histoLocalTheta->Fill(residualLocalTheta);
1900  histoGlobalRPhi->Fill(residualGlobalRPhi);
1901  histoGlobalPhi->Fill(residualGlobalPhi);
1902  histoGlobalTheta->Fill(residualGlobalTheta);
1903  //Push them into their respective vectors
1904  unitsLocalX.push_back(histoLocalX);
1905  unitsLocalPhi.push_back(histoLocalPhi);
1906  unitsLocalTheta.push_back(histoLocalTheta);
1907  unitsGlobalRPhi.push_back(histoGlobalRPhi);
1908  unitsGlobalPhi.push_back(histoGlobalPhi);
1909  unitsGlobalTheta.push_back(histoGlobalTheta);
1910 
1911  } // new detector
1912  else {
1913  //If the detector was not new, just fill the histogram
1914  unitsLocalX.at(position)->Fill(residualLocalX);
1915  unitsLocalPhi.at(position)->Fill(residualLocalPhi);
1916  unitsLocalTheta.at(position)->Fill(residualLocalTheta);
1917  unitsGlobalRPhi.at(position)->Fill(residualGlobalRPhi);
1918  unitsGlobalPhi.at(position)->Fill(residualGlobalPhi);
1919  unitsGlobalTheta.at(position)->Fill(residualGlobalTheta);
1920  if(det==1) {unitsLocalY.at(position)->Fill(residualLocalY); unitsGlobalRZ.at(position)->Fill(residualGlobalZ);}
1921  else if(det==2) {unitsLocalY.at(position)->Fill(residualLocalY); unitsGlobalRZ.at(position)->Fill(residualGlobalR);}
1922  }
1923 
1924  countPoints++;
1925 
1926  innerTSOS = destiny;
1927 
1928 
1929  }else {
1930  edm::LogError("MuonAlignmentAnalyzer") <<" Error!! Exception in propagator catched" << std::endl;
1931  continue;
1932  }
1933 
1934  } //loop over my4DTrack
1935  } //TSOS was valid
1936 
1937  } // cut in at least 4 segments
1938 
1939  } //end cut in RecHitsSize>36
1940  numberOfHits=numberOfHits+countPoints;
1941  } //loop over STAtracks
1942 
1943  delete thePropagator;
1944 
1945  } //end doResplots
1946 
1947 
1948 }
std::vector< TH1F * > hResidualLocalXCSC_ME
T barePhi() const
int i
Definition: DBlmapReader.cc:9
std::vector< TH1F * > hResidualLocalThetaDT_W
std::vector< TH1F * > hResidualGlobalZDT_MB
std::vector< TH1F * > hResidualLocalYCSC_ME
T perp() const
Definition: PV3DBase.h:66
std::vector< TH1F * > unitsGlobalPhi
std::vector< TH1F * > hResidualGlobalThetaCSC_ME
RecHitVector doMatching(const reco::Track &, edm::Handle< DTRecSegment4DCollection > &, edm::Handle< CSCSegmentCollection > &, intDVector *, intDVector *, edm::ESHandle< GlobalTrackingGeometry > &)
std::vector< TH1F * > hResidualGlobalPhiCSC_ME
LocalVector localDirection() const
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
std::vector< TH1F * > hResidualLocalYDT_W
std::vector< TH1F * > hResidualGlobalZDT_W
T bareTheta() const
Definition: PV3DBase.h:68
T y() const
Definition: PV3DBase.h:57
edm::Service< TFileService > fs
#define abs(x)
Definition: mlp_lapack.h:159
std::vector< TH1F * > unitsGlobalRPhi
std::vector< TH1F * > hResidualLocalXDT_W
std::vector< TH1F * > unitsLocalX
Definition: Plane.h:17
std::vector< TH1F * > hResidualLocalThetaCSC_ME
double double double z
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
std::vector< TrackingRecHit * > RecHitVector
std::vector< TH1F * > hResidualLocalPhiDT_W
std::vector< TH1F * > hResidualGlobalRPhiCSC_ME
std::vector< TH1F * > unitsLocalTheta
T barePhi() const
Definition: PV3DBase.h:62
C::const_iterator const_iterator
constant access iterator type
Definition: RangeMap.h:46
T mag() const
Definition: PV3DBase.h:61
std::vector< TH1F * > hResidualGlobalThetaDT_W
FreeTrajectoryState * freeState(bool withErrors=true) const
T z() const
Definition: PV3DBase.h:58
std::vector< TH1F * > unitsGlobalRZ
std::vector< TH1F * > hResidualGlobalRCSC_ME
std::vector< TH1F * > hResidualLocalPhiCSC_ME
double p2[4]
Definition: TauolaWrapper.h:90
std::vector< TH1F * > hResidualGlobalPhiDT_MB
virtual TrajectoryStateOnSurface propagate(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:9
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
std::vector< TH1F * > unitsLocalPhi
std::vector< TH1F * > hResidualLocalPhiDT_MB
Definition: DetId.h:20
GlobalPoint position() const
std::vector< TH1F * > hResidualLocalXDT_MB
std::vector< std::vector< int > > intDVector
std::vector< TH1F * > hResidualGlobalRPhiDT_W
std::vector< TH1F * > hResidualGlobalThetaDT_MB
std::vector< TH1F * > hResidualGlobalRPhiDT_MB
std::vector< TH1F * > hResidualLocalYDT_MB
const T & get() const
Definition: EventSetup.h:55
std::vector< TH1F * > unitsLocalY
T eta() const
Definition: PV3DBase.h:70
T perp() const
Magnitude of transverse component.
double p1[4]
Definition: TauolaWrapper.h:89
T * make() const
make new ROOT object
std::vector< TH1F * > hResidualGlobalPhiDT_W
Definition: DDAxes.h:10
T x() const
Definition: PV3DBase.h:56
std::vector< long > detectorCollection
std::vector< TH1F * > unitsGlobalTheta
std::vector< TH1F * > hResidualLocalThetaDT_MB
virtual const BoundPlane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
tuple size
Write out results.
Global3DVector GlobalVector
Definition: GlobalVector.h:10
GlobalVector globalDirection() const
void MuonAlignmentAnalyzer::beginJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 121 of file MuonAlignmentAnalyzer.cc.

References doGBplots, doResplots, doSAplots, fs, hGBChi2, hGBChi2_Barrel, hGBChi2_Endcap, hGBInvM, hGBInvM_Barrel, hGBInvM_Endcap, hGBInvM_Overlap, hGBinvPTres, hGBinvPTvsEta, hGBinvPTvsNhits, hGBinvPTvsPhi, hGBNhits, hGBNhits_Barrel, hGBNhits_Endcap, hGBNmuons, hGBNmuons_Barrel, hGBNmuons_Endcap, hGBPhivsEta, hGBPTDiff, hGBPTDiffvsEta, hGBPTDiffvsPhi, hGBPTRec, hGBPTRec_Barrel, hGBPTRec_Endcap, hGBPTres, hGBPTres_Barrel, hGBPTres_Endcap, hGBPTvsEta, hGBPTvsPhi, hprofGlobalAngleCSC, hprofGlobalAngleDT, hprofGlobalAngleRmsCSC, hprofGlobalAngleRmsDT, hprofGlobalPhiCSC, hprofGlobalPhiDT, hprofGlobalPositionCSC, hprofGlobalPositionDT, hprofGlobalPositionRmsCSC, hprofGlobalPositionRmsDT, hprofGlobalRCSC, hprofGlobalRPhiCSC, hprofGlobalRPhiDT, hprofGlobalThetaCSC, hprofGlobalThetaDT, hprofGlobalZDT, hprofLocalAngleCSC, hprofLocalAngleDT, hprofLocalAngleRmsCSC, hprofLocalAngleRmsDT, hprofLocalPhiCSC, hprofLocalPhiDT, hprofLocalPositionCSC, hprofLocalPositionDT, hprofLocalPositionRmsCSC, hprofLocalPositionRmsDT, hprofLocalThetaCSC, hprofLocalThetaDT, hprofLocalXCSC, hprofLocalXDT, hprofLocalYCSC, hprofLocalYDT, hResidualGlobalPhiCSC, hResidualGlobalPhiCSC_ME, hResidualGlobalPhiDT, hResidualGlobalPhiDT_MB, hResidualGlobalPhiDT_W, hResidualGlobalRCSC, hResidualGlobalRCSC_ME, hResidualGlobalRPhiCSC, hResidualGlobalRPhiCSC_ME, hResidualGlobalRPhiDT, hResidualGlobalRPhiDT_MB, hResidualGlobalRPhiDT_W, hResidualGlobalThetaCSC, hResidualGlobalThetaCSC_ME, hResidualGlobalThetaDT, hResidualGlobalThetaDT_MB, hResidualGlobalThetaDT_W, hResidualGlobalZDT, hResidualGlobalZDT_MB, hResidualGlobalZDT_W, hResidualLocalPhiCSC, hResidualLocalPhiCSC_ME, hResidualLocalPhiDT, hResidualLocalPhiDT_MB, hResidualLocalPhiDT_W, hResidualLocalThetaCSC, hResidualLocalThetaCSC_ME, hResidualLocalThetaDT, hResidualLocalThetaDT_MB, hResidualLocalThetaDT_W, hResidualLocalXCSC, hResidualLocalXCSC_ME, hResidualLocalXDT, hResidualLocalXDT_MB, hResidualLocalXDT_W, hResidualLocalYCSC, hResidualLocalYCSC_ME, hResidualLocalYDT, hResidualLocalYDT_MB, hResidualLocalYDT_W, hSAChi2, hSAChi2_Barrel, hSAChi2_Endcap, hSAInvM, hSAInvM_Barrel, hSAInvM_Endcap, hSAInvM_Overlap, hSAinvPTres, hSAinvPTvsEta, hSAinvPTvsNhits, hSAinvPTvsPhi, hSANhits, hSANhits_Barrel, hSANhits_Endcap, hSANmuons, hSANmuons_Barrel, hSANmuons_Endcap, hSAPhivsEta, hSAPTDiff, hSAPTDiffvsEta, hSAPTDiffvsPhi, hSAPTRec, hSAPTRec_Barrel, hSAPTRec_Endcap, hSAPTres, hSAPTres_Barrel, hSAPTres_Endcap, hSAPTvsEta, hSAPTvsPhi, hSimInvM, hSimInvM_Barrel, hSimInvM_Endcap, hSimInvM_Overlap, hSimNmuons, hSimNmuons_Barrel, hSimNmuons_Endcap, hSimPhivsEta, hSimPT, hSimPT_Barrel, hSimPT_Endcap, hSimPTvsEta, hSimPTvsPhi, i, invMassRangeMax, invMassRangeMin, TFileDirectory::make(), ptRangeMax, ptRangeMin, and theDataType.

121  {
122 
123 // eventSetup.get<IdealMagneticFieldRecord>().get(theMGField);
124 
125  //Create the propagator
126 // if(doResplots) thePropagator = new SteppingHelixPropagator(&*theMGField, alongMomentum);
127 
128  int nBinsPt= (int) fabs(ptRangeMax-ptRangeMin);
129  int nBinsMass= (int) fabs(invMassRangeMax-invMassRangeMin);
130 
131 // Define and book histograms for SA and GB muon quantities/objects
132 
133  if(doGBplots) {
134  hGBNmuons = fs->make<TH1F>("GBNmuons","Nmuons",10,0,10);
135  hGBNmuons_Barrel = fs->make<TH1F>("GBNmuons_Barrel","Nmuons",10,0,10);
136  hGBNmuons_Endcap = fs->make<TH1F>("GBNmuons_Endcap","Nmuons",10,0,10);
137  hGBNhits = fs->make<TH1F>("GBNhits","Nhits",100,0,100);
138  hGBNhits_Barrel = fs->make<TH1F>("GBNhits_Barrel","Nhits",100,0,100);
139  hGBNhits_Endcap = fs->make<TH1F>("GBNhits_Endcap","Nhits",100,0,100);
140  hGBPTRec = fs->make<TH1F>("GBpTRec","p_{T}^{rec}",nBinsPt,ptRangeMin,ptRangeMax);
141  hGBPTRec_Barrel = fs->make<TH1F>("GBpTRec_Barrel","p_{T}^{rec}",nBinsPt,ptRangeMin,ptRangeMax);
142  hGBPTRec_Endcap = fs->make<TH1F>("GBpTRec_Endcap","p_{T}^{rec}",nBinsPt,ptRangeMin,ptRangeMax);
143  hGBPTvsEta = fs->make<TH2F> ("GBPTvsEta","p_{T}^{rec} VS #eta",100,-2.5,2.5,nBinsPt,ptRangeMin,ptRangeMax);
144  hGBPTvsPhi = fs->make<TH2F> ("GBPTvsPhi","p_{T}^{rec} VS #phi",100,-3.1416,3.1416,nBinsPt,ptRangeMin,ptRangeMax);
145  hGBPhivsEta = fs->make<TH2F> ("GBPhivsEta","#phi VS #eta",100,-2.5,2.5,100,-3.1416,3.1416);
146 
147  if(theDataType == "SimData"){
148  hGBPTDiff = fs->make<TH1F>("GBpTDiff","p_{T}^{rec} - p_{T}^{gen} ",250,-120,120);
149  hGBPTDiffvsEta = fs->make<TH2F> ("GBPTDiffvsEta","p_{T}^{rec} - p_{T}^{gen} VS #eta",100,-2.5,2.5,250,-120,120);
150  hGBPTDiffvsPhi = fs->make<TH2F> ("GBPTDiffvsPhi","p_{T}^{rec} - p_{T}^{gen} VS #phi",100,-3.1416,3.1416,250,-120,120);
151  hGBPTres = fs->make<TH1F>("GBpTRes","pT Resolution",100,-2,2);
152  hGBPTres_Barrel = fs->make<TH1F>("GBpTRes_Barrel","pT Resolution",100,-2,2);
153  hGBPTres_Endcap = fs->make<TH1F>("GBpTRes_Endcap","pT Resolution",100,-2,2);
154  hGBinvPTres = fs->make<TH1F>("GBinvPTRes","#sigma (q/p_{T}) Resolution",100,-2,2);
155  hGBinvPTvsEta = fs->make<TH2F> ("GBinvPTvsEta","#sigma (q/p_{T}) VS #eta",100,-2.5,2.5,100,-2,2);
156  hGBinvPTvsPhi = fs->make<TH2F> ("GBinvPTvsPhi","#sigma (q/p_{T}) VS #phi",100,-3.1416,3.1416,100,-2,2);
157  hGBinvPTvsNhits = fs->make<TH2F> ("GBinvPTvsNhits","#sigma (q/p_{T}) VS Nhits",100,0,100,100,-2,2);
158  }
159 
160  hGBChi2 = fs->make<TH1F>("GBChi2","Chi2",200,0,200);
161  hGBChi2_Barrel = fs->make<TH1F>("GBChi2_Barrel","Chi2",200,0,200);
162  hGBChi2_Endcap = fs->make<TH1F>("GBChi2_Endcap ","Chi2",200,0,200);
163  hGBInvM = fs->make<TH1F>("GBInvM","M_{inv}^{rec}",nBinsMass,invMassRangeMin,invMassRangeMax);
164  hGBInvM_Barrel = fs->make<TH1F>("GBInvM_Barrel","M_{inv}^{rec}",nBinsMass,invMassRangeMin,invMassRangeMax);
165  hGBInvM_Endcap = fs->make<TH1F>("GBInvM_Endcap ","M_{inv}^{rec}",nBinsMass,invMassRangeMin,invMassRangeMax);
166  hGBInvM_Overlap = fs->make<TH1F>("GBInvM_Overlap","M_{inv}^{rec}",nBinsMass,invMassRangeMin,invMassRangeMax);
167  }
168 
169 
170  if(doSAplots) {
171  hSANmuons = fs->make<TH1F>("SANmuons","Nmuons",10,0,10);
172  hSANmuons_Barrel = fs->make<TH1F>("SANmuons_Barrel","Nmuons",10,0,10);
173  hSANmuons_Endcap = fs->make<TH1F>("SANmuons_Endcap","Nmuons",10,0,10);
174  hSANhits = fs->make<TH1F>("SANhits","Nhits",100,0,100);
175  hSANhits_Barrel = fs->make<TH1F>("SANhits_Barrel","Nhits",100,0,100);
176  hSANhits_Endcap = fs->make<TH1F>("SANhits_Endcap","Nhits",100,0,100);
177  hSAPTRec = fs->make<TH1F>("SApTRec","p_{T}^{rec}",nBinsPt,ptRangeMin,ptRangeMax);
178  hSAPTRec_Barrel = fs->make<TH1F>("SApTRec_Barrel","p_{T}^{rec}",nBinsPt,ptRangeMin,ptRangeMax);
179  hSAPTRec_Endcap = fs->make<TH1F>("SApTRec_Endcap","p_{T}^{rec}",nBinsPt,ptRangeMin,ptRangeMax);
180  hSAPTvsEta = fs->make<TH2F> ("SAPTvsEta","p_{T}^{rec} VS #eta",100,-2.5,2.5,nBinsPt,ptRangeMin,ptRangeMax);
181  hSAPTvsPhi = fs->make<TH2F> ("SAPTvsPhi","p_{T}^{rec} VS #phi",100,-3.1416,3.1416,nBinsPt,ptRangeMin,ptRangeMax);
182  hSAPhivsEta = fs->make<TH2F> ("SAPhivsEta","#phi VS #eta",100,-2.5,2.5,100,-3.1416,3.1416);
183 
184  if(theDataType == "SimData"){
185  hSAPTDiff = fs->make<TH1F>("SApTDiff","p_{T}^{rec} - p_{T}^{gen} ",250,-120,120);
186  hSAPTDiffvsEta = fs->make<TH2F> ("SAPTDiffvsEta","p_{T}^{rec} - p_{T}^{gen} VS #eta",100,-2.5,2.5,250,-120,120);
187  hSAPTDiffvsPhi = fs->make<TH2F> ("SAPTDiffvsPhi","p_{T}^{rec} - p_{T}^{gen} VS #phi",100,-3.1416,3.1416,250,-120,120);
188  hSAPTres = fs->make<TH1F>("SApTRes","pT Resolution",100,-2,2);
189  hSAPTres_Barrel = fs->make<TH1F>("SApTRes_Barrel","pT Resolution",100,-2,2);
190  hSAPTres_Endcap = fs->make<TH1F>("SApTRes_Endcap","pT Resolution",100,-2,2);
191  hSAinvPTres = fs->make<TH1F>("SAinvPTRes","1/pT Resolution",100,-2,2);
192 
193  hSAinvPTvsEta = fs->make<TH2F> ("SAinvPTvsEta","#sigma (q/p_{T}) VS #eta",100,-2.5,2.5,100,-2,2);
194  hSAinvPTvsPhi = fs->make<TH2F> ("SAinvPTvsPhi","#sigma (q/p_{T}) VS #phi",100,-3.1416,3.1416,100,-2,2);
195  hSAinvPTvsNhits = fs->make<TH2F> ("SAinvPTvsNhits","#sigma (q/p_{T}) VS Nhits",100,0,100,100,-2,2);
196  }
197  hSAInvM = fs->make<TH1F>("SAInvM","M_{inv}^{rec}",nBinsMass,invMassRangeMin,invMassRangeMax);
198  hSAInvM_Barrel = fs->make<TH1F>("SAInvM_Barrel","M_{inv}^{rec}",nBinsMass,invMassRangeMin,invMassRangeMax);
199  hSAInvM_Endcap = fs->make<TH1F>("SAInvM_Endcap","M_{inv}^{rec}",nBinsMass,invMassRangeMin,invMassRangeMax);
200  hSAInvM_Overlap = fs->make<TH1F>("SAInvM_Overlap","M_{inv}^{rec}",nBinsMass,invMassRangeMin,invMassRangeMax);
201  hSAChi2 = fs->make<TH1F>("SAChi2","Chi2",200,0,200);
202  hSAChi2_Barrel = fs->make<TH1F>("SAChi2_Barrel","Chi2",200,0,200);
203  hSAChi2_Endcap = fs->make<TH1F>("SAChi2_Endcap","Chi2",200,0,200);
204  }
205 
206 
207  if(theDataType == "SimData"){
208  hSimNmuons = fs->make<TH1F>("SimNmuons","Nmuons",10,0,10);
209  hSimNmuons_Barrel = fs->make<TH1F>("SimNmuons_Barrel","Nmuons",10,0,10);
210  hSimNmuons_Endcap = fs->make<TH1F>("SimNmuons_Endcap","Nmuons",10,0,10);
211  hSimPT = fs->make<TH1F>("SimPT","p_{T}^{gen} ",nBinsPt,ptRangeMin,ptRangeMax);
212  hSimPT_Barrel = fs->make<TH1F>("SimPT_Barrel","p_{T}^{gen} ",nBinsPt,ptRangeMin,ptRangeMax);
213  hSimPT_Endcap = fs->make<TH1F>("SimPT_Endcap","p_{T}^{gen} ",nBinsPt,ptRangeMin,ptRangeMax);
214  hSimPTvsEta = fs->make<TH2F> ("SimPTvsEta","p_{T}^{gen} VS #eta",100,-2.5,2.5,nBinsPt,ptRangeMin,ptRangeMax);
215  hSimPTvsPhi = fs->make<TH2F> ("SimPTvsPhi","p_{T}^{gen} VS #phi",100,-3.1416,3.1416,nBinsPt,ptRangeMin,ptRangeMax);
216  hSimPhivsEta = fs->make<TH2F> ("SimPhivsEta","#phi VS #eta",100,-2.5,2.5,100,-3.1416,3.1416);
217  hSimInvM = fs->make<TH1F>("SimInvM","M_{inv}^{gen} ",nBinsMass,invMassRangeMin,invMassRangeMax);
218  hSimInvM_Barrel = fs->make<TH1F>("SimInvM_Barrel","M_{inv}^{rec}",nBinsMass,invMassRangeMin,invMassRangeMax);
219  hSimInvM_Endcap = fs->make<TH1F>("SimInvM_Endcap","M_{inv}^{gen} ",nBinsMass,invMassRangeMin,invMassRangeMax);
220  hSimInvM_Overlap = fs->make<TH1F>("SimInvM_Overlap","M_{inv}^{gen} ",nBinsMass,invMassRangeMin,invMassRangeMax);
221  }
222 
223  if(doResplots){
224 // All DT and CSC chambers
225  hResidualLocalXDT = fs->make<TH1F>("hResidualLocalXDT","hResidualLocalXDT",200,-10,10);
226  hResidualLocalPhiDT = fs->make<TH1F>("hResidualLocalPhiDT","hResidualLocalPhiDT",100,-1,1);
227  hResidualLocalThetaDT = fs->make<TH1F>("hResidualLocalThetaDT","hResidualLocalThetaDT",100,-1,1);
228  hResidualLocalYDT = fs->make<TH1F>("hResidualLocalYDT","hResidualLocalYDT",200,-10,10);
229  hResidualLocalXCSC = fs->make<TH1F>("hResidualLocalXCSC","hResidualLocalXCSC",200,-10,10);
230  hResidualLocalPhiCSC = fs->make<TH1F>("hResidualLocalPhiCSC","hResidualLocalPhiCSC",100,-1,1);
231  hResidualLocalThetaCSC = fs->make<TH1F>("hResidualLocalThetaCSC","hResidualLocalThetaCSC",100,-1,1);
232  hResidualLocalYCSC = fs->make<TH1F>("hResidualLocalYCSC","hResidualLocalYCSC",200,-10,10);
233  hResidualGlobalRPhiDT = fs->make<TH1F>("hResidualGlobalRPhiDT","hResidualGlobalRPhiDT",200,-10,10);
234  hResidualGlobalPhiDT = fs->make<TH1F>("hResidualGlobalPhiDT","hResidualGlobalPhiDT",100,-1,1);
235  hResidualGlobalThetaDT = fs->make<TH1F>("hResidualGlobalThetaDT","hResidualGlobalThetaDT",100,-1,1);
236  hResidualGlobalZDT = fs->make<TH1F>("hResidualGlobalZDT","hResidualGlobalZDT",200,-10,10);
237  hResidualGlobalRPhiCSC = fs->make<TH1F>("hResidualGlobalRPhiCSC","hResidualGlobalRPhiCSC",200,-10,10);
238  hResidualGlobalPhiCSC = fs->make<TH1F>("hResidualGlobalPhiCSC","hResidualGlobalPhiCSC",100,-1,1);
239  hResidualGlobalThetaCSC = fs->make<TH1F>("hResidualGlobalThetaCSC","hResidualGlobalThetaCSC",100,-1,1);
240  hResidualGlobalRCSC = fs->make<TH1F>("hResidualGlobalRCSC","hResidualGlobalRCSC",200,-10,10);
241 
242 // DT Wheels
243  hResidualLocalXDT_W[0]=fs->make<TH1F>("hResidualLocalXDT_W-2","hResidualLocalXDT_W-2",200,-10,10);
244  hResidualLocalPhiDT_W[0]=fs->make<TH1F>("hResidualLocalPhiDT_W-2","hResidualLocalPhiDT_W-2",200,-1,1);
245  hResidualLocalThetaDT_W[0]=fs->make<TH1F>("hResidualLocalThetaDT_W-2","hResidualLocalThetaDT_W-2",200,-1,1);
246  hResidualLocalYDT_W[0] = fs->make<TH1F>("hResidualLocalYDT_W-2","hResidualLocalYDT_W-2",200,-10,10);
247  hResidualLocalXDT_W[1]=fs->make<TH1F>("hResidualLocalXDT_W-1","hResidualLocalXDT_W-1",200,-10,10);
248  hResidualLocalPhiDT_W[1]=fs->make<TH1F>("hResidualLocalPhiDT_W-1","hResidualLocalPhiDT_W-1",200,-1,1);
249  hResidualLocalThetaDT_W[1]=fs->make<TH1F>("hResidualLocalThetaDT_W-1","hResidualLocalThetaDT_W-1",200,-1,1);
250  hResidualLocalYDT_W[1] = fs->make<TH1F>("hResidualLocalYDT_W-1","hResidualLocalYDT_W-1",200,-10,10);
251  hResidualLocalXDT_W[2]=fs->make<TH1F>("hResidualLocalXDT_W0","hResidualLocalXDT_W0",200,-10,10);
252  hResidualLocalPhiDT_W[2]=fs->make<TH1F>("hResidualLocalPhiDT_W0","hResidualLocalPhiDT_W0",200,-1,1);
253  hResidualLocalThetaDT_W[2]=fs->make<TH1F>("hResidualLocalThetaDT_W0","hResidualLocalThetaDT_W0",200,-1,1);
254  hResidualLocalYDT_W[2] = fs->make<TH1F>("hResidualLocalYDT_W0","hResidualLocalYDT_W0",200,-10,10);
255  hResidualLocalXDT_W[3]=fs->make<TH1F>("hResidualLocalXDT_W1","hResidualLocalXDT_W1",200,-10,10);
256  hResidualLocalPhiDT_W[3]=fs->make<TH1F>("hResidualLocalPhiDT_W1","hResidualLocalPhiDT_W1",200,-1,1);
257  hResidualLocalThetaDT_W[3]=fs->make<TH1F>("hResidualLocalThetaDT_W1","hResidualLocalThetaDT_W1",200,-1,1);
258  hResidualLocalYDT_W[3] = fs->make<TH1F>("hResidualLocalYDT_W1","hResidualLocalYDT_W1",200,-10,10);
259  hResidualLocalXDT_W[4]=fs->make<TH1F>("hResidualLocalXDT_W2","hResidualLocalXDT_W2",200,-10,10);
260  hResidualLocalPhiDT_W[4]=fs->make<TH1F>("hResidualLocalPhiDT_W2","hResidualLocalPhiDT_W2",200,-1,1);
261  hResidualLocalThetaDT_W[4]=fs->make<TH1F>("hResidualLocalThetaDT_W2","hResidualLocalThetaDT_W2",200,-1,1);
262  hResidualLocalYDT_W[4] = fs->make<TH1F>("hResidualLocalYDT_W2","hResidualLocalYDT_W2",200,-10,10);
263  hResidualGlobalRPhiDT_W[0]=fs->make<TH1F>("hResidualGlobalRPhiDT_W-2","hResidualGlobalRPhiDT_W-2",200,-10,10);
264  hResidualGlobalPhiDT_W[0]=fs->make<TH1F>("hResidualGlobalPhiDT_W-2","hResidualGlobalPhiDT_W-2",200,-1,1);
265  hResidualGlobalThetaDT_W[0]=fs->make<TH1F>("hResidualGlobalThetaDT_W-2","hResidualGlobalThetaDT_W-2",200,-1,1);
266  hResidualGlobalZDT_W[0] = fs->make<TH1F>("hResidualGlobalZDT_W-2","hResidualGlobalZDT_W-2",200,-10,10);
267  hResidualGlobalRPhiDT_W[1]=fs->make<TH1F>("hResidualGlobalRPhiDT_W-1","hResidualGlobalRPhiDT_W-1",200,-10,10);
268  hResidualGlobalPhiDT_W[1]=fs->make<TH1F>("hResidualGlobalPhiDT_W-1","hResidualGlobalPhiDT_W-1",200,-1,1);
269  hResidualGlobalThetaDT_W[1]=fs->make<TH1F>("hResidualGlobalThetaDT_W-1","hResidualGlobalThetaDT_W-1",200,-1,1);
270  hResidualGlobalZDT_W[1] = fs->make<TH1F>("hResidualGlobalZDT_W-1","hResidualGlobalZDT_W-1",200,-10,10);
271  hResidualGlobalRPhiDT_W[2]=fs->make<TH1F>("hResidualGlobalRPhiDT_W0","hResidualGlobalRPhiDT_W0",200,-10,10);
272  hResidualGlobalPhiDT_W[2]=fs->make<TH1F>("hResidualGlobalPhiDT_W0","hResidualGlobalPhiDT_W0",200,-1,1);
273  hResidualGlobalThetaDT_W[2]=fs->make<TH1F>("hResidualGlobalThetaDT_W0","hResidualGlobalThetaDT_W0",200,-1,1);
274  hResidualGlobalZDT_W[2] = fs->make<TH1F>("hResidualGlobalZDT_W0","hResidualGlobalZDT_W0",200,-10,10);
275  hResidualGlobalRPhiDT_W[3]=fs->make<TH1F>("hResidualGlobalRPhiDT_W1","hResidualGlobalRPhiDT_W1",200,-10,10);
276  hResidualGlobalPhiDT_W[3]=fs->make<TH1F>("hResidualGlobalPhiDT_W1","hResidualGlobalPhiDT_W1",200,-1,1);
277  hResidualGlobalThetaDT_W[3]=fs->make<TH1F>("hResidualGlobalThetaDT_W1","hResidualGlobalThetaDT_W1",200,-1,1);
278  hResidualGlobalZDT_W[3] = fs->make<TH1F>("hResidualGlobalZDT_W1","hResidualGlobalZDT_W1",200,-10,10);
279  hResidualGlobalRPhiDT_W[4]=fs->make<TH1F>("hResidualGlobalRPhiDT_W2","hResidualGlobalRPhiDT_W2",200,-10,10);
280  hResidualGlobalPhiDT_W[4]=fs->make<TH1F>("hResidualGlobalPhiDT_W2","hResidualGlobalPhiDT_W2",200,-1,1);
281  hResidualGlobalThetaDT_W[4]=fs->make<TH1F>("hResidualGlobalThetaDT_W2","hResidualGlobalThetaDT_W2",200,-1,1);
282  hResidualGlobalZDT_W[4] = fs->make<TH1F>("hResidualGlobalZDT_W2","hResidualGlobalZDT_W2",200,-10,10);
283 
284 // DT Stations
285  hResidualLocalXDT_MB[0]=fs->make<TH1F>("hResidualLocalXDT_MB-2/1","hResidualLocalXDT_MB-2/1",200,-10,10);
286  hResidualLocalPhiDT_MB[0]=fs->make<TH1F>("hResidualLocalPhiDT_MB-2/1","hResidualLocalPhiDT_MB-2/1",200,-1,1);
287  hResidualLocalThetaDT_MB[0]=fs->make<TH1F>("hResidualLocalThetaDT_MB-2/1","hResidualLocalThetaDT_MB-2/1",200,-1,1);
288  hResidualLocalYDT_MB[0] = fs->make<TH1F>("hResidualLocalYDT_MB-2/1","hResidualLocalYDT_MB-2/1",200,-10,10);
289  hResidualLocalXDT_MB[1]=fs->make<TH1F>("hResidualLocalXDT_MB-2/2","hResidualLocalXDT_MB-2/2",200,-10,10);
290  hResidualLocalPhiDT_MB[1]=fs->make<TH1F>("hResidualLocalPhiDT_MB-2/2","hResidualLocalPhiDT_MB-2/2",200,-1,1);
291  hResidualLocalThetaDT_MB[1]=fs->make<TH1F>("hResidualLocalThetaDT_MB-2/2","hResidualLocalThetaDT_MB-2/2",200,-1,1);
292  hResidualLocalYDT_MB[1] = fs->make<TH1F>("hResidualLocalYDT_MB-2/2","hResidualLocalYDT_MB-2/2",200,-10,10);
293  hResidualLocalXDT_MB[2]=fs->make<TH1F>("hResidualLocalXDT_MB-2/3","hResidualLocalXDT_MB-2/3",200,-10,10);
294  hResidualLocalPhiDT_MB[2]=fs->make<TH1F>("hResidualLocalPhiDT_MB-2/3","hResidualLocalPhiDT_MB-2/3",200,-1,1);
295  hResidualLocalThetaDT_MB[2]=fs->make<TH1F>("hResidualLocalThetaDT_MB-2/3","hResidualLocalThetaDT_MB-2/3",200,-1,1);
296  hResidualLocalYDT_MB[2] = fs->make<TH1F>("hResidualLocalYDT_MB-2/3","hResidualLocalYDT_MB-2/3",200,-10,10);
297  hResidualLocalXDT_MB[3]=fs->make<TH1F>("hResidualLocalXDT_MB-2/4","hResidualLocalXDT_MB-2/4",200,-10,10);
298  hResidualLocalPhiDT_MB[3]=fs->make<TH1F>("hResidualLocalPhiDT_MB-2/4","hResidualLocalPhiDT_MB-2/4",200,-1,1);
299  hResidualLocalThetaDT_MB[3]=fs->make<TH1F>("hResidualLocalThetaDT_MB-2/4","hResidualLocalThetaDT_MB-2/4",200,-1,1);
300  hResidualLocalYDT_MB[3] = fs->make<TH1F>("hResidualLocalYDT_MB-2/4","hResidualLocalYDT_MB-2/4",200,-10,10);
301  hResidualLocalXDT_MB[4]=fs->make<TH1F>("hResidualLocalXDT_MB-1/1","hResidualLocalXDT_MB-1/1",200,-10,10);
302  hResidualLocalPhiDT_MB[4]=fs->make<TH1F>("hResidualLocalPhiDT_MB-1/1","hResidualLocalPhiDT_MB-1/1",200,-1,1);
303  hResidualLocalThetaDT_MB[4]=fs->make<TH1F>("hResidualLocalThetaDT_MB-1/1","hResidualLocalThetaDT_MB-1/1",200,-1,1);
304  hResidualLocalYDT_MB[4] = fs->make<TH1F>("hResidualLocalYDT_MB-1/1","hResidualLocalYDT_MB-1/1",200,-10,10);
305  hResidualLocalXDT_MB[5]=fs->make<TH1F>("hResidualLocalXDT_MB-1/2","hResidualLocalXDT_MB-1/2",200,-10,10);
306  hResidualLocalPhiDT_MB[5]=fs->make<TH1F>("hResidualLocalPhiDT_MB-1/2","hResidualLocalPhiDT_MB-1/2",200,-1,1);
307  hResidualLocalThetaDT_MB[5]=fs->make<TH1F>("hResidualLocalThetaDT_MB-1/2","hResidualLocalThetaDT_MB-1/2",200,-1,1);
308  hResidualLocalYDT_MB[5] = fs->make<TH1F>("hResidualLocalYDT_MB-1/2","hResidualLocalYDT_MB-1/2",200,-10,10);
309  hResidualLocalXDT_MB[6]=fs->make<TH1F>("hResidualLocalXDT_MB-1/3","hResidualLocalXDT_MB-1/3",200,-10,10);
310  hResidualLocalPhiDT_MB[6]=fs->make<TH1F>("hResidualLocalPhiDT_MB-1/3","hResidualLocalPhiDT_MB-1/3",200,-1,1);
311  hResidualLocalThetaDT_MB[6]=fs->make<TH1F>("hResidualLocalThetaDT_MB-1/3","hResidualLocalThetaDT_MB-1/3",200,-1,1);
312  hResidualLocalYDT_MB[6] = fs->make<TH1F>("hResidualLocalYDT_MB-1/3","hResidualLocalYDT_MB-1/3",200,-10,10);
313  hResidualLocalXDT_MB[7]=fs->make<TH1F>("hResidualLocalXDT_MB-1/4","hResidualLocalXDT_MB-1/4",200,-10,10);
314  hResidualLocalPhiDT_MB[7]=fs->make<TH1F>("hResidualLocalPhiDT_MB-1/4","hResidualLocalPhiDT_MB-1/4",200,-1,1);
315  hResidualLocalThetaDT_MB[7]=fs->make<TH1F>("hResidualLocalThetaDT_MB-1/4","hResidualLocalThetaDT_MB-1/4",200,-1,1);
316  hResidualLocalYDT_MB[7] = fs->make<TH1F>("hResidualLocalYDT_MB-1/4","hResidualLocalYDT_MB-1/4",200,-10,10);
317  hResidualLocalXDT_MB[8]=fs->make<TH1F>("hResidualLocalXDT_MB0/1","hResidualLocalXDT_MB0/1",200,-10,10);
318  hResidualLocalPhiDT_MB[8]=fs->make<TH1F>("hResidualLocalPhiDT_MB0/1","hResidualLocalPhiDT_MB0/1",200,-1,1);
319  hResidualLocalThetaDT_MB[8]=fs->make<TH1F>("hResidualLocalThetaDT_MB0/1","hResidualLocalThetaDT_MB0/1",200,-1,1);
320  hResidualLocalYDT_MB[8] = fs->make<TH1F>("hResidualLocalYDT_MB0/1","hResidualLocalYDT_MB0/1",200,-10,10);
321  hResidualLocalXDT_MB[9]=fs->make<TH1F>("hResidualLocalXDT_MB0/2","hResidualLocalXDT_MB0/2",200,-10,10);
322  hResidualLocalPhiDT_MB[9]=fs->make<TH1F>("hResidualLocalPhiDT_MB0/2","hResidualLocalPhiDT_MB0/2",200,-1,1);
323  hResidualLocalThetaDT_MB[9]=fs->make<TH1F>("hResidualLocalThetaDT_MB0/2","hResidualLocalThetaDT_MB0/2",200,-1,1);
324  hResidualLocalYDT_MB[9] = fs->make<TH1F>("hResidualLocalYDT_MB0/2","hResidualLocalYDT_MB0/2",200,-10,10);
325  hResidualLocalXDT_MB[10]=fs->make<TH1F>("hResidualLocalXDT_MB0/3","hResidualLocalXDT_MB0/3",200,-10,10);
326  hResidualLocalThetaDT_MB[10]=fs->make<TH1F>("hResidualLocalThetaDT_MB0/3","hResidualLocalThetaDT_MB0/3",200,-1,1);
327  hResidualLocalPhiDT_MB[10]=fs->make<TH1F>("hResidualLocalPhiDT_MB0/3","hResidualLocalPhiDT_MB0/3",200,-1,1);
328  hResidualLocalYDT_MB[10] = fs->make<TH1F>("hResidualLocalYDT_MB0/3","hResidualLocalYDT_MB0/3",200,-10,10);
329  hResidualLocalXDT_MB[11]=fs->make<TH1F>("hResidualLocalXDT_MB0/4","hResidualLocalXDT_MB0/4",200,-10,10);
330  hResidualLocalPhiDT_MB[11]=fs->make<TH1F>("hResidualLocalPhiDT_MB0/4","hResidualLocalPhiDT_MB0/4",200,-1,1);
331  hResidualLocalThetaDT_MB[11]=fs->make<TH1F>("hResidualLocalThetaDT_MB0/4","hResidualLocalThetaDT_MB0/4",200,-1,1);
332  hResidualLocalYDT_MB[11] = fs->make<TH1F>("hResidualLocalYDT_MB0/4","hResidualLocalYDT_MB0/4",200,-10,10);
333  hResidualLocalXDT_MB[12]=fs->make<TH1F>("hResidualLocalXDT_MB1/1","hResidualLocalXDT_MB1/1",200,-10,10);
334  hResidualLocalPhiDT_MB[12]=fs->make<TH1F>("hResidualLocalPhiDT_MB1/1","hResidualLocalPhiDT_MB1/1",200,-1,1);
335  hResidualLocalThetaDT_MB[12]=fs->make<TH1F>("hResidualLocalThetaDT_MB1/1","hResidualLocalThetaDT_MB1/1",200,-1,1);
336  hResidualLocalYDT_MB[12] = fs->make<TH1F>("hResidualLocalYDT_MB1/1","hResidualLocalYDT_MB1/1",200,-10,10);
337  hResidualLocalXDT_MB[13]=fs->make<TH1F>("hResidualLocalXDT_MB1/2","hResidualLocalXDT_MB1/2",200,-10,10);
338  hResidualLocalPhiDT_MB[13]=fs->make<TH1F>("hResidualLocalPhiDT_MB1/2","hResidualLocalPhiDT_MB1/2",200,-1,1);
339  hResidualLocalThetaDT_MB[13]=fs->make<TH1F>("hResidualLocalThetaDT_MB1/2","hResidualLocalThetaDT_MB1/2",200,-1,1);
340  hResidualLocalYDT_MB[13] = fs->make<TH1F>("hResidualLocalYDT_MB1/2","hResidualLocalYDT_MB1/2",200,-10,10);
341  hResidualLocalXDT_MB[14]=fs->make<TH1F>("hResidualLocalXDT_MB1/3","hResidualLocalXDT_MB1/3",200,-10,10);
342  hResidualLocalPhiDT_MB[14]=fs->make<TH1F>("hResidualLocalPhiDT_MB1/3","hResidualLocalPhiDT_MB1/3",200,-1,1);
343  hResidualLocalThetaDT_MB[14]=fs->make<TH1F>("hResidualLocalThetaDT_MB1/3","hResidualLocalThetaDT_MB1/3",200,-1,1);
344  hResidualLocalYDT_MB[14] = fs->make<TH1F>("hResidualLocalYDT_MB1/3","hResidualLocalYDT_MB1/3",200,-10,10);
345  hResidualLocalXDT_MB[15]=fs->make<TH1F>("hResidualLocalXDT_MB1/4","hResidualLocalXDT_MB1/4",200,-10,10);
346  hResidualLocalPhiDT_MB[15]=fs->make<TH1F>("hResidualLocalPhiDT_MB1/4","hResidualLocalPhiDT_MB1/4",200,-1,1);
347  hResidualLocalThetaDT_MB[15]=fs->make<TH1F>("hResidualLocalThetaDT_MB1/4","hResidualLocalThetaDT_MB1/4",200,-1,1);
348  hResidualLocalYDT_MB[15] = fs->make<TH1F>("hResidualLocalYDT_MB1/4","hResidualLocalYDT_MB1/4",200,-10,10);
349  hResidualLocalXDT_MB[16]=fs->make<TH1F>("hResidualLocalXDT_MB2/1","hResidualLocalXDT_MB2/1",200,-10,10);
350  hResidualLocalPhiDT_MB[16]=fs->make<TH1F>("hResidualLocalPhiDT_MB2/1","hResidualLocalPhiDT_MB2/1",200,-1,1);
351  hResidualLocalThetaDT_MB[16]=fs->make<TH1F>("hResidualLocalThetaDT_MB2/1","hResidualLocalThetaDT_MB2/1",200,-1,1);
352  hResidualLocalYDT_MB[16] = fs->make<TH1F>("hResidualLocalYDT_MB2/1","hResidualLocalYDT_MB2/1",200,-10,10);
353  hResidualLocalXDT_MB[17]=fs->make<TH1F>("hResidualLocalXDT_MB2/2","hResidualLocalXDT_MB2/2",200,-10,10);
354  hResidualLocalPhiDT_MB[17]=fs->make<TH1F>("hResidualLocalPhiDT_MB2/2","hResidualLocalPhiDT_MB2/2",200,-1,1);
355  hResidualLocalThetaDT_MB[17]=fs->make<TH1F>("hResidualLocalThetaDT_MB2/2","hResidualLocalThetaDT_MB2/2",200,-1,1);
356  hResidualLocalYDT_MB[17] = fs->make<TH1F>("hResidualLocalYDT_MB2/2","hResidualLocalYDT_MB2/2",200,-10,10);
357  hResidualLocalXDT_MB[18]=fs->make<TH1F>("hResidualLocalXDT_MB2/3","hResidualLocalXDT_MB2/3",200,-10,10);
358  hResidualLocalPhiDT_MB[18]=fs->make<TH1F>("hResidualLocalPhiDT_MB2/3","hResidualLocalPhiDT_MB2/3",200,-1,1);
359  hResidualLocalThetaDT_MB[18]=fs->make<TH1F>("hResidualLocalThetaDT_MB2/3","hResidualLocalThetaDT_MB2/3",200,-1,1);
360  hResidualLocalYDT_MB[18] = fs->make<TH1F>("hResidualLocalYDT_MB2/3","hResidualLocalYDT_MB2/3",200,-10,10);
361  hResidualLocalXDT_MB[19]=fs->make<TH1F>("hResidualLocalXDT_MB2/4","hResidualLocalXDT_MB2/4",200,-10,10);
362  hResidualLocalPhiDT_MB[19]=fs->make<TH1F>("hResidualLocalPhiDT_MB2/4","hResidualLocalPhiDT_MB2/4",200,-1,1);
363  hResidualLocalThetaDT_MB[19]=fs->make<TH1F>("hResidualLocalThetaDT_MB2/4","hResidualLocalThetaDT_MB2/4",200,-1,1);
364  hResidualLocalYDT_MB[19] = fs->make<TH1F>("hResidualLocalYDT_MB2/4","hResidualLocalYDT_MB2/4",200,-10,10);
365  hResidualGlobalRPhiDT_MB[0]=fs->make<TH1F>("hResidualGlobalRPhiDT_MB-2/1","hResidualGlobalRPhiDT_MB-2/1",200,-10,10);
366  hResidualGlobalPhiDT_MB[0]=fs->make<TH1F>("hResidualGlobalPhiDT_MB-2/1","hResidualGlobalPhiDT_MB-2/1",200,-1,1);
367  hResidualGlobalThetaDT_MB[0]=fs->make<TH1F>("hResidualGlobalThetaDT_MB-2/1","hResidualGlobalThetaDT_MB-2/1",200,-1,1);
368  hResidualGlobalZDT_MB[0] = fs->make<TH1F>("hResidualGlobalZDT_MB-2/1","hResidualGlobalZDT_MB-2/1",200,-10,10);
369  hResidualGlobalRPhiDT_MB[1]=fs->make<TH1F>("hResidualGlobalRPhiDT_MB-2/2","hResidualGlobalRPhiDT_MB-2/2",200,-10,10);
370  hResidualGlobalPhiDT_MB[1]=fs->make<TH1F>("hResidualGlobalPhiDT_MB-2/2","hResidualGlobalPhiDT_MB-2/2",200,-1,1);
371  hResidualGlobalThetaDT_MB[1]=fs->make<TH1F>("hResidualGlobalThetaDT_MB-2/2","hResidualGlobalThetaDT_MB-2/2",200,-1,1);
372  hResidualGlobalZDT_MB[1] = fs->make<TH1F>("hResidualGlobalZDT_MB-2/2","hResidualGlobalZDT_MB-2/2",200,-10,10);
373  hResidualGlobalRPhiDT_MB[2]=fs->make<TH1F>("hResidualGlobalRPhiDT_MB-2/3","hResidualGlobalRPhiDT_MB-2/3",200,-10,10);
374  hResidualGlobalPhiDT_MB[2]=fs->make<TH1F>("hResidualGlobalPhiDT_MB-2/3","hResidualGlobalPhiDT_MB-2/3",200,-1,1);
375  hResidualGlobalThetaDT_MB[2]=fs->make<TH1F>("hResidualGlobalThetaDT_MB-2/3","hResidualGlobalThetaDT_MB-2/3",200,-1,1);
376  hResidualGlobalZDT_MB[2] = fs->make<TH1F>("hResidualGlobalZDT_MB-2/3","hResidualGlobalZDT_MB-2/3",200,-10,10);
377  hResidualGlobalRPhiDT_MB[3]=fs->make<TH1F>("hResidualGlobalRPhiDT_MB-2/4","hResidualGlobalRPhiDT_MB-2/4",200,-10,10);
378  hResidualGlobalPhiDT_MB[3]=fs->make<TH1F>("hResidualGlobalPhiDT_MB-2/4","hResidualGlobalPhiDT_MB-2/4",200,-1,1);
379  hResidualGlobalThetaDT_MB[3]=fs->make<TH1F>("hResidualGlobalThetaDT_MB-2/4","hResidualGlobalThetaDT_MB-2/4",200,-1,1);
380  hResidualGlobalZDT_MB[3] = fs->make<TH1F>("hResidualGlobalZDT_MB-2/4","hResidualGlobalZDT_MB-2/4",200,-10,10);
381  hResidualGlobalRPhiDT_MB[4]=fs->make<TH1F>("hResidualGlobalRPhiDT_MB-1/1","hResidualGlobalRPhiDT_MB-1/1",200,-10,10);
382  hResidualGlobalPhiDT_MB[4]=fs->make<TH1F>("hResidualGlobalPhiDT_MB-1/1","hResidualGlobalPhiDT_MB-1/1",200,-1,1);
383  hResidualGlobalThetaDT_MB[4]=fs->make<TH1F>("hResidualGlobalThetaDT_MB-1/1","hResidualGlobalThetaDT_MB-1/1",200,-1,1);
384  hResidualGlobalZDT_MB[4] = fs->make<TH1F>("hResidualGlobalZDT_MB-1/1","hResidualGlobalZDT_MB-1/1",200,-10,10);
385  hResidualGlobalRPhiDT_MB[5]=fs->make<TH1F>("hResidualGlobalRPhiDT_MB-1/2","hResidualGlobalRPhiDT_MB-1/2",200,-10,10);
386  hResidualGlobalPhiDT_MB[5]=fs->make<TH1F>("hResidualGlobalPhiDT_MB-1/2","hResidualGlobalPhiDT_MB-1/2",200,-1,1);
387  hResidualGlobalThetaDT_MB[5]=fs->make<TH1F>("hResidualGlobalThetaDT_MB-1/2","hResidualGlobalThetaDT_MB-1/2",200,-1,1);
388  hResidualGlobalZDT_MB[5] = fs->make<TH1F>("hResidualGlobalZDT_MB-1/2","hResidualGlobalZDT_MB-1/2",200,-10,10);
389  hResidualGlobalRPhiDT_MB[6]=fs->make<TH1F>("hResidualGlobalRPhiDT_MB-1/3","hResidualGlobalRPhiDT_MB-1/3",200,-10,10);
390  hResidualGlobalPhiDT_MB[6]=fs->make<TH1F>("hResidualGlobalPhiDT_MB-1/3","hResidualGlobalPhiDT_MB-1/3",200,-1,1);
391  hResidualGlobalThetaDT_MB[6]=fs->make<TH1F>("hResidualGlobalThetaDT_MB-1/3","hResidualGlobalThetaDT_MB-1/3",200,-1,1);
392  hResidualGlobalZDT_MB[6] = fs->make<TH1F>("hResidualGlobalZDT_MB-1/3","hResidualGlobalZDT_MB-1/3",200,-10,10);
393  hResidualGlobalRPhiDT_MB[7]=fs->make<TH1F>("hResidualGlobalRPhiDT_MB-1/4","hResidualGlobalRPhiDT_MB-1/4",200,-10,10);
394  hResidualGlobalPhiDT_MB[7]=fs->make<TH1F>("hResidualGlobalPhiDT_MB-1/4","hResidualGlobalPhiDT_MB-1/4",200,-1,1);
395  hResidualGlobalThetaDT_MB[7]=fs->make<TH1F>("hResidualGlobalThetaDT_MB-1/4","hResidualGlobalThetaDT_MB-1/4",200,-1,1);
396  hResidualGlobalZDT_MB[7] = fs->make<TH1F>("hResidualGlobalZDT_MB-1/4","hResidualGlobalZDT_MB-1/4",200,-10,10);
397  hResidualGlobalRPhiDT_MB[8]=fs->make<TH1F>("hResidualGlobalRPhiDT_MB0/1","hResidualGlobalRPhiDT_MB0/1",200,-10,10);
398  hResidualGlobalPhiDT_MB[8]=fs->make<TH1F>("hResidualGlobalPhiDT_MB0/1","hResidualGlobalPhiDT_MB0/1",200,-1,1);
399  hResidualGlobalThetaDT_MB[8]=fs->make<TH1F>("hResidualGlobalThetaDT_MB0/1","hResidualGlobalThetaDT_MB0/1",200,-1,1);
400  hResidualGlobalZDT_MB[8] = fs->make<TH1F>("hResidualGlobalZDT_MB0/1","hResidualGlobalZDT_MB0/1",200,-10,10);
401  hResidualGlobalRPhiDT_MB[9]=fs->make<TH1F>("hResidualGlobalRPhiDT_MB0/2","hResidualGlobalRPhiDT_MB0/2",200,-10,10);
402  hResidualGlobalPhiDT_MB[9]=fs->make<TH1F>("hResidualGlobalPhiDT_MB0/2","hResidualGlobalPhiDT_MB0/2",200,-1,1);
403  hResidualGlobalThetaDT_MB[9]=fs->make<TH1F>("hResidualGlobalThetaDT_MB0/2","hResidualGlobalThetaDT_MB0/2",200,-1,1);
404  hResidualGlobalZDT_MB[9] = fs->make<TH1F>("hResidualGlobalZDT_MB0/2","hResidualGlobalZDT_MB0/2",200,-10,10);
405  hResidualGlobalRPhiDT_MB[10]=fs->make<TH1F>("hResidualGlobalRPhiDT_MB0/3","hResidualGlobalRPhiDT_MB0/3",200,-10,10);
406  hResidualGlobalThetaDT_MB[10]=fs->make<TH1F>("hResidualGlobalThetaDT_MB0/3","hResidualGlobalThetaDT_MB0/3",200,-1,1);
407  hResidualGlobalPhiDT_MB[10]=fs->make<TH1F>("hResidualGlobalPhiDT_MB0/3","hResidualGlobalPhiDT_MB0/3",200,-1,1);
408  hResidualGlobalZDT_MB[10] = fs->make<TH1F>("hResidualGlobalZDT_MB0/3","hResidualGlobalZDT_MB0/3",200,-10,10);
409  hResidualGlobalRPhiDT_MB[11]=fs->make<TH1F>("hResidualGlobalRPhiDT_MB0/4","hResidualGlobalRPhiDT_MB0/4",200,-10,10);
410  hResidualGlobalPhiDT_MB[11]=fs->make<TH1F>("hResidualGlobalPhiDT_MB0/4","hResidualGlobalPhiDT_MB0/4",200,-1,1);
411  hResidualGlobalThetaDT_MB[11]=fs->make<TH1F>("hResidualGlobalThetaDT_MB0/4","hResidualGlobalThetaDT_MB0/4",200,-1,1);
412  hResidualGlobalZDT_MB[11] = fs->make<TH1F>("hResidualGlobalZDT_MB0/4","hResidualGlobalZDT_MB0/4",200,-10,10);
413  hResidualGlobalRPhiDT_MB[12]=fs->make<TH1F>("hResidualGlobalRPhiDT_MB1/1","hResidualGlobalRPhiDT_MB1/1",200,-10,10);
414  hResidualGlobalPhiDT_MB[12]=fs->make<TH1F>("hResidualGlobalPhiDT_MB1/1","hResidualGlobalPhiDT_MB1/1",200,-1,1);
415  hResidualGlobalThetaDT_MB[12]=fs->make<TH1F>("hResidualGlobalThetaDT_MB1/1","hResidualGlobalThetaDT_MB1/1",200,-1,1);
416  hResidualGlobalZDT_MB[12] = fs->make<TH1F>("hResidualGlobalZDT_MB1/1","hResidualGlobalZDT_MB1/1",200,-10,10);
417  hResidualGlobalRPhiDT_MB[13]=fs->make<TH1F>("hResidualGlobalRPhiDT_MB1/2","hResidualGlobalRPhiDT_MB1/2",200,-10,10);
418  hResidualGlobalPhiDT_MB[13]=fs->make<TH1F>("hResidualGlobalPhiDT_MB1/2","hResidualGlobalPhiDT_MB1/2",200,-1,1);
419  hResidualGlobalThetaDT_MB[13]=fs->make<TH1F>("hResidualGlobalThetaDT_MB1/2","hResidualGlobalThetaDT_MB1/2",200,-1,1);
420  hResidualGlobalZDT_MB[13] = fs->make<TH1F>("hResidualGlobalZDT_MB1/2","hResidualGlobalZDT_MB1/2",200,-10,10);
421  hResidualGlobalRPhiDT_MB[14]=fs->make<TH1F>("hResidualGlobalRPhiDT_MB1/3","hResidualGlobalRPhiDT_MB1/3",200,-10,10);
422  hResidualGlobalPhiDT_MB[14]=fs->make<TH1F>("hResidualGlobalPhiDT_MB1/3","hResidualGlobalPhiDT_MB1/3",200,-1,1);
423  hResidualGlobalThetaDT_MB[14]=fs->make<TH1F>("hResidualGlobalThetaDT_MB1/3","hResidualGlobalThetaDT_MB1/3",200,-1,1);
424  hResidualGlobalZDT_MB[14] = fs->make<TH1F>("hResidualGlobalZDT_MB1/3","hResidualGlobalZDT_MB1/3",200,-10,10);
425  hResidualGlobalRPhiDT_MB[15]=fs->make<TH1F>("hResidualGlobalRPhiDT_MB1/4","hResidualGlobalRPhiDT_MB1/4",200,-10,10);
426  hResidualGlobalPhiDT_MB[15]=fs->make<TH1F>("hResidualGlobalPhiDT_MB1/4","hResidualGlobalPhiDT_MB1/4",200,-1,1);
427  hResidualGlobalThetaDT_MB[15]=fs->make<TH1F>("hResidualGlobalThetaDT_MB1/4","hResidualGlobalThetaDT_MB1/4",200,-1,1);
428  hResidualGlobalZDT_MB[15] = fs->make<TH1F>("hResidualGlobalZDT_MB1/4","hResidualGlobalZDT_MB1/4",200,-10,10);
429  hResidualGlobalRPhiDT_MB[16]=fs->make<TH1F>("hResidualGlobalRPhiDT_MB2/1","hResidualGlobalRPhiDT_MB2/1",200,-10,10);
430  hResidualGlobalPhiDT_MB[16]=fs->make<TH1F>("hResidualGlobalPhiDT_MB2/1","hResidualGlobalPhiDT_MB2/1",200,-1,1);
431  hResidualGlobalThetaDT_MB[16]=fs->make<TH1F>("hResidualGlobalThetaDT_MB2/1","hResidualGlobalThetaDT_MB2/1",200,-1,1);
432  hResidualGlobalZDT_MB[16] = fs->make<TH1F>("hResidualGlobalZDT_MB2/1","hResidualGlobalZDT_MB2/1",200,-10,10);
433  hResidualGlobalRPhiDT_MB[17]=fs->make<TH1F>("hResidualGlobalRPhiDT_MB2/2","hResidualGlobalRPhiDT_MB2/2",200,-10,10);
434  hResidualGlobalPhiDT_MB[17]=fs->make<TH1F>("hResidualGlobalPhiDT_MB2/2","hResidualGlobalPhiDT_MB2/2",200,-1,1);
435  hResidualGlobalThetaDT_MB[17]=fs->make<TH1F>("hResidualGlobalThetaDT_MB2/2","hResidualGlobalThetaDT_MB2/2",200,-1,1);
436  hResidualGlobalZDT_MB[17] = fs->make<TH1F>("hResidualGlobalZDT_MB2/2","hResidualGlobalZDT_MB2/2",200,-10,10);
437  hResidualGlobalRPhiDT_MB[18]=fs->make<TH1F>("hResidualGlobalRPhiDT_MB2/3","hResidualGlobalRPhiDT_MB2/3",200,-10,10);
438  hResidualGlobalPhiDT_MB[18]=fs->make<TH1F>("hResidualGlobalPhiDT_MB2/3","hResidualGlobalPhiDT_MB2/3",200,-1,1);
439  hResidualGlobalThetaDT_MB[18]=fs->make<TH1F>("hResidualGlobalThetaDT_MB2/3","hResidualGlobalThetaDT_MB2/3",200,-1,1);
440  hResidualGlobalZDT_MB[18] = fs->make<TH1F>("hResidualGlobalZDT_MB2/3","hResidualGlobalZDT_MB2/3",200,-10,10);
441  hResidualGlobalRPhiDT_MB[19]=fs->make<TH1F>("hResidualGlobalRPhiDT_MB2/4","hResidualGlobalRPhiDT_MB2/4",200,-10,10);
442  hResidualGlobalPhiDT_MB[19]=fs->make<TH1F>("hResidualGlobalPhiDT_MB2/4","hResidualGlobalPhiDT_MB2/4",200,-1,1);
443  hResidualGlobalThetaDT_MB[19]=fs->make<TH1F>("hResidualGlobalThetaDT_MB2/4","hResidualGlobalThetaDT_MB2/4",200,-1,1);
444  hResidualGlobalZDT_MB[19] = fs->make<TH1F>("hResidualGlobalZDT_MB2/4","hResidualGlobalZDT_MB2/4",200,-10,10);
445 
446 
447 // CSC Stations
448  hResidualLocalXCSC_ME[0]=fs->make<TH1F>("hResidualLocalXCSC_ME-4/1","hResidualLocalXCSC_ME-4/1",200,-10,10);
449  hResidualLocalPhiCSC_ME[0]=fs->make<TH1F>("hResidualLocalPhiCSC_ME-4/1","hResidualLocalPhiCSC_ME-4/1",200,-1,1);
450  hResidualLocalThetaCSC_ME[0]=fs->make<TH1F>("hResidualLocalThetaCSC_ME-4/1","hResidualLocalThetaCSC_ME-4/1",200,-1,1);
451  hResidualLocalYCSC_ME[0] = fs->make<TH1F>("hResidualLocalYCSC_ME-4/1","hResidualLocalYCSC_ME-4/1",200,-10,10);
452  hResidualLocalXCSC_ME[1]=fs->make<TH1F>("hResidualLocalXCSC_ME-4/2","hResidualLocalXCSC_ME-4/2",200,-10,10);
453  hResidualLocalPhiCSC_ME[1]=fs->make<TH1F>("hResidualLocalPhiCSC_ME-4/2","hResidualLocalPhiCSC_ME-4/2",200,-1,1);
454  hResidualLocalThetaCSC_ME[1]=fs->make<TH1F>("hResidualLocalThetaCSC_ME-4/2","hResidualLocalThetaCSC_ME-4/2",200,-1,1);
455  hResidualLocalYCSC_ME[1] = fs->make<TH1F>("hResidualLocalYCSC_ME-4/2","hResidualLocalYCSC_ME-4/2",200,-10,10);
456  hResidualLocalXCSC_ME[2]=fs->make<TH1F>("hResidualLocalXCSC_ME-3/1","hResidualLocalXCSC_ME-3/1",200,-10,10);
457  hResidualLocalPhiCSC_ME[2]=fs->make<TH1F>("hResidualLocalPhiCSC_ME-3/1","hResidualLocalPhiCSC_ME-3/1",200,-1,1);
458  hResidualLocalThetaCSC_ME[2]=fs->make<TH1F>("hResidualLocalThetaCSC_ME-3/1","hResidualLocalThetaCSC_ME-3/1",200,-1,1);
459  hResidualLocalYCSC_ME[2] = fs->make<TH1F>("hResidualLocalYCSC_ME-3/1","hResidualLocalYCSC_ME-3/1",200,-10,10);
460  hResidualLocalXCSC_ME[3]=fs->make<TH1F>("hResidualLocalXCSC_ME-3/2","hResidualLocalXCSC_ME-3/2",200,-10,10);
461  hResidualLocalPhiCSC_ME[3]=fs->make<TH1F>("hResidualLocalPhiCSC_ME-3/2","hResidualLocalPhiCSC_ME-3/2",200,-1,1);
462  hResidualLocalThetaCSC_ME[3]=fs->make<TH1F>("hResidualLocalThetaCSC_ME-3/2","hResidualLocalThetaCSC_ME-3/2",200,-1,1);
463  hResidualLocalYCSC_ME[3] = fs->make<TH1F>("hResidualLocalYCSC_ME-3/2","hResidualLocalYCSC_ME-3/2",200,-10,10);
464  hResidualLocalXCSC_ME[4]=fs->make<TH1F>("hResidualLocalXCSC_ME-2/1","hResidualLocalXCSC_ME-2/1",200,-10,10);
465  hResidualLocalPhiCSC_ME[4]=fs->make<TH1F>("hResidualLocalPhiCSC_ME-2/1","hResidualLocalPhiCSC_ME-2/1",200,-1,1);
466  hResidualLocalThetaCSC_ME[4]=fs->make<TH1F>("hResidualLocalThetaCSC_ME-2/1","hResidualLocalThetaCSC_ME-2/1",200,-1,1);
467  hResidualLocalYCSC_ME[4] = fs->make<TH1F>("hResidualLocalYCSC_ME-2/1","hResidualLocalYCSC_ME-2/1",200,-10,10);
468  hResidualLocalXCSC_ME[5]=fs->make<TH1F>("hResidualLocalXCSC_ME-2/2","hResidualLocalXCSC_ME-2/2",200,-10,10);
469  hResidualLocalPhiCSC_ME[5]=fs->make<TH1F>("hResidualLocalPhiCSC_ME-2/2","hResidualLocalPhiCSC_ME-2/2",200,-1,1);
470  hResidualLocalThetaCSC_ME[5]=fs->make<TH1F>("hResidualLocalThetaCSC_ME-2/2","hResidualLocalThetaCSC_ME-2/2",200,-1,1);
471  hResidualLocalYCSC_ME[5] = fs->make<TH1F>("hResidualLocalYCSC_ME-2/2","hResidualLocalYCSC_ME-2/2",200,-10,10);
472  hResidualLocalXCSC_ME[6]=fs->make<TH1F>("hResidualLocalXCSC_ME-1/1","hResidualLocalXCSC_ME-1/1",200,-10,10);
473  hResidualLocalPhiCSC_ME[6]=fs->make<TH1F>("hResidualLocalPhiCSC_ME-1/1","hResidualLocalPhiCSC_ME-1/1",200,-1,1);
474  hResidualLocalThetaCSC_ME[6]=fs->make<TH1F>("hResidualLocalThetaCSC_ME-1/1","hResidualLocalThetaCSC_ME-1/1",200,-1,1);
475  hResidualLocalYCSC_ME[6] = fs->make<TH1F>("hResidualLocalYCSC_ME-1/1","hResidualLocalYCSC_ME-1/1",200,-10,10);
476  hResidualLocalXCSC_ME[7]=fs->make<TH1F>("hResidualLocalXCSC_ME-1/2","hResidualLocalXCSC_ME-1/2",200,-10,10);
477  hResidualLocalPhiCSC_ME[7]=fs->make<TH1F>("hResidualLocalPhiCSC_ME-1/2","hResidualLocalPhiCSC_ME-1/2",200,-1,1);
478  hResidualLocalThetaCSC_ME[7]=fs->make<TH1F>("hResidualLocalThetaCSC_ME-1/2","hResidualLocalThetaCSC_ME-1/2",200,-1,1);
479  hResidualLocalYCSC_ME[7] = fs->make<TH1F>("hResidualLocalYCSC_ME-1/2","hResidualLocalYCSC_ME-1/2",200,-10,10);
480  hResidualLocalXCSC_ME[8]=fs->make<TH1F>("hResidualLocalXCSC_ME-1/3","hResidualLocalXCSC_ME-1/3",200,-10,10);
481  hResidualLocalPhiCSC_ME[8]=fs->make<TH1F>("hResidualLocalPhiCSC_ME-1/3","hResidualLocalPhiCSC_ME-1/3",200,-1,1);
482  hResidualLocalThetaCSC_ME[8]=fs->make<TH1F>("hResidualLocalThetaCSC_ME-1/3","hResidualLocalThetaCSC_ME-1/3",200,-1,1);
483  hResidualLocalYCSC_ME[8] = fs->make<TH1F>("hResidualLocalYCSC_ME-1/3","hResidualLocalYCSC_ME-1/3",200,-10,10);
484  hResidualLocalXCSC_ME[9]=fs->make<TH1F>("hResidualLocalXCSC_ME1/1","hResidualLocalXCSC_ME1/1",200,-10,10);
485  hResidualLocalPhiCSC_ME[9]=fs->make<TH1F>("hResidualLocalPhiCSC_ME1/1","hResidualLocalPhiCSC_ME1/1",100,-1,1);
486  hResidualLocalThetaCSC_ME[9]=fs->make<TH1F>("hResidualLocalThetaCSC_ME1/1","hResidualLocalThetaCSC_ME1/1",200,-1,1);
487  hResidualLocalYCSC_ME[9] = fs->make<TH1F>("hResidualLocalYCSC_ME1/1","hResidualLocalYCSC_ME1/1",200,-10,10);
488  hResidualLocalXCSC_ME[10]=fs->make<TH1F>("hResidualLocalXCSC_ME1/2","hResidualLocalXCSC_ME1/2",200,-10,10);
489  hResidualLocalPhiCSC_ME[10]=fs->make<TH1F>("hResidualLocalPhiCSC_ME1/2","hResidualLocalPhiCSC_ME1/2",200,-1,1);
490  hResidualLocalThetaCSC_ME[10]=fs->make<TH1F>("hResidualLocalThetaCSC_ME1/2","hResidualLocalThetaCSC_ME1/2",200,-1,1);
491  hResidualLocalYCSC_ME[10] = fs->make<TH1F>("hResidualLocalYCSC_ME1/2","hResidualLocalYCSC_ME1/2",200,-10,10);
492  hResidualLocalXCSC_ME[11]=fs->make<TH1F>("hResidualLocalXCSC_ME1/3","hResidualLocalXCSC_ME1/3",200,-10,10);
493  hResidualLocalPhiCSC_ME[11]=fs->make<TH1F>("hResidualLocalPhiCSC_ME1/3","hResidualLocalPhiCSC_ME1/3",200,-1,1);
494  hResidualLocalThetaCSC_ME[11]=fs->make<TH1F>("hResidualLocalThetaCSC_ME1/3","hResidualLocalThetaCSC_ME1/3",200,-1,1);
495  hResidualLocalYCSC_ME[11] = fs->make<TH1F>("hResidualLocalYCSC_ME1/3","hResidualLocalYCSC_ME1/3",200,-10,10);
496  hResidualLocalXCSC_ME[12]=fs->make<TH1F>("hResidualLocalXCSC_ME2/1","hResidualLocalXCSC_ME2/1",200,-10,10);
497  hResidualLocalPhiCSC_ME[12]=fs->make<TH1F>("hResidualLocalPhiCSC_ME2/1","hResidualLocalPhiCSC_ME2/1",200,-1,1);
498  hResidualLocalThetaCSC_ME[12]=fs->make<TH1F>("hResidualLocalThetaCSC_ME2/1","hResidualLocalThetaCSC_ME2/1",200,-1,1);
499  hResidualLocalYCSC_ME[12] = fs->make<TH1F>("hResidualLocalYCSC_ME2/1","hResidualLocalYCSC_ME2/1",200,-10,10);
500  hResidualLocalXCSC_ME[13]=fs->make<TH1F>("hResidualLocalXCSC_ME2/2","hResidualLocalXCSC_ME2/2",200,-10,10);
501  hResidualLocalPhiCSC_ME[13]=fs->make<TH1F>("hResidualLocalPhiCSC_ME2/2","hResidualLocalPhiCSC_ME2/2",200,-1,1);
502  hResidualLocalThetaCSC_ME[13]=fs->make<TH1F>("hResidualLocalThetaCSC_ME2/2","hResidualLocalThetaCSC_ME2/2",200,-1,1);
503  hResidualLocalYCSC_ME[13] = fs->make<TH1F>("hResidualLocalYCSC_ME2/2","hResidualLocalYCSC_ME2/2",200,-10,10);
504  hResidualLocalXCSC_ME[14]=fs->make<TH1F>("hResidualLocalXCSC_ME3/1","hResidualLocalXCSC_ME3/1",200,-10,10);
505  hResidualLocalPhiCSC_ME[14]=fs->make<TH1F>("hResidualLocalPhiCSC_ME3/1","hResidualLocalPhiCSC_ME3/1",200,-1,1);
506  hResidualLocalThetaCSC_ME[14]=fs->make<TH1F>("hResidualLocalThetaCSC_ME3/1","hResidualLocalThetaCSC_ME3/1",200,-1,1);
507  hResidualLocalYCSC_ME[14] = fs->make<TH1F>("hResidualLocalYCSC_ME3/1","hResidualLocalYCSC_ME3/1",200,-10,10);
508  hResidualLocalXCSC_ME[15]=fs->make<TH1F>("hResidualLocalXCSC_ME3/2","hResidualLocalXCSC_ME3/2",200,-10,10);
509  hResidualLocalPhiCSC_ME[15]=fs->make<TH1F>("hResidualLocalPhiCSC_ME3/2","hResidualLocalPhiCSC_ME3/2",200,-1,1);
510  hResidualLocalThetaCSC_ME[15]=fs->make<TH1F>("hResidualLocalThetaCSC_ME3/2","hResidualLocalThetaCSC_ME3/2",200,-1,1);
511  hResidualLocalYCSC_ME[15] = fs->make<TH1F>("hResidualLocalYCSC_ME3/2","hResidualLocalYCSC_ME3/2",200,-10,10);
512  hResidualLocalXCSC_ME[16]=fs->make<TH1F>("hResidualLocalXCSC_ME4/1","hResidualLocalXCSC_ME4/1",200,-10,10);
513  hResidualLocalPhiCSC_ME[16]=fs->make<TH1F>("hResidualLocalPhiCSC_ME4/1","hResidualLocalPhiCSC_ME4/1",200,-1,1);
514  hResidualLocalThetaCSC_ME[16]=fs->make<TH1F>("hResidualLocalThetaCSC_ME4/1","hResidualLocalThetaCSC_ME4/1",200,-1,1);
515  hResidualLocalYCSC_ME[16] = fs->make<TH1F>("hResidualLocalYCSC_ME4/1","hResidualLocalYCSC_ME4/1",200,-10,10);
516  hResidualLocalXCSC_ME[17]=fs->make<TH1F>("hResidualLocalXCSC_ME4/2","hResidualLocalXCSC_ME4/2",200,-10,10);
517  hResidualLocalPhiCSC_ME[17]=fs->make<TH1F>("hResidualLocalPhiCSC_ME4/2","hResidualLocalPhiCSC_ME4/2",200,-1,1);
518  hResidualLocalThetaCSC_ME[17]=fs->make<TH1F>("hResidualLocalThetaCSC_ME4/2","hResidualLocalThetaCSC_ME4/2",200,-1,1);
519  hResidualLocalYCSC_ME[17] = fs->make<TH1F>("hResidualLocalYCSC_ME4/2","hResidualLocalYCSC_ME4/2",200,-10,10);
520  hResidualGlobalRPhiCSC_ME[0]=fs->make<TH1F>("hResidualGlobalRPhiCSC_ME-4/1","hResidualGlobalRPhiCSC_ME-4/1",200,-10,10);
521  hResidualGlobalPhiCSC_ME[0]=fs->make<TH1F>("hResidualGlobalPhiCSC_ME-4/1","hResidualGlobalPhiCSC_ME-4/1",200,-1,1);
522  hResidualGlobalThetaCSC_ME[0]=fs->make<TH1F>("hResidualGlobalThetaCSC_ME-4/1","hResidualGlobalThetaCSC_ME-4/1",200,-1,1);
523  hResidualGlobalRCSC_ME[0] = fs->make<TH1F>("hResidualGlobalRCSC_ME-4/1","hResidualGlobalRCSC_ME-4/1",200,-10,10);
524  hResidualGlobalRPhiCSC_ME[1]=fs->make<TH1F>("hResidualGlobalRPhiCSC_ME-4/2","hResidualGlobalRPhiCSC_ME-4/2",200,-10,10);
525  hResidualGlobalPhiCSC_ME[1]=fs->make<TH1F>("hResidualGlobalPhiCSC_ME-4/2","hResidualGlobalPhiCSC_ME-4/2",200,-1,1);
526  hResidualGlobalThetaCSC_ME[1]=fs->make<TH1F>("hResidualGlobalThetaCSC_ME-4/2","hResidualGlobalThetaCSC_ME-4/2",200,-1,1);
527  hResidualGlobalRCSC_ME[1] = fs->make<TH1F>("hResidualGlobalRCSC_ME-4/2","hResidualGlobalRCSC_ME-4/2",200,-10,10);
528  hResidualGlobalRPhiCSC_ME[2]=fs->make<TH1F>("hResidualGlobalRPhiCSC_ME-3/1","hResidualGlobalRPhiCSC_ME-3/1",200,-10,10);
529  hResidualGlobalPhiCSC_ME[2]=fs->make<TH1F>("hResidualGlobalPhiCSC_ME-3/1","hResidualGlobalPhiCSC_ME-3/1",200,-1,1);
530  hResidualGlobalThetaCSC_ME[2]=fs->make<TH1F>("hResidualGlobalThetaCSC_ME-3/1","hResidualGlobalThetaCSC_ME-3/1",200,-1,1);
531  hResidualGlobalRCSC_ME[2] = fs->make<TH1F>("hResidualGlobalRCSC_ME-3/1","hResidualGlobalRCSC_ME-3/1",200,-10,10);
532  hResidualGlobalRPhiCSC_ME[3]=fs->make<TH1F>("hResidualGlobalRPhiCSC_ME-3/2","hResidualGlobalRPhiCSC_ME-3/2",200,-10,10);
533  hResidualGlobalPhiCSC_ME[3]=fs->make<TH1F>("hResidualGlobalPhiCSC_ME-3/2","hResidualGlobalPhiCSC_ME-3/2",200,-1,1);
534  hResidualGlobalThetaCSC_ME[3]=fs->make<TH1F>("hResidualGlobalThetaCSC_ME-3/2","hResidualGlobalThetaCSC_ME-3/2",200,-1,1);
535  hResidualGlobalRCSC_ME[3] = fs->make<TH1F>("hResidualGlobalRCSC_ME-3/2","hResidualGlobalRCSC_ME-3/2",200,-10,10);
536  hResidualGlobalRPhiCSC_ME[4]=fs->make<TH1F>("hResidualGlobalRPhiCSC_ME-2/1","hResidualGlobalRPhiCSC_ME-2/1",200,-10,10);
537  hResidualGlobalPhiCSC_ME[4]=fs->make<TH1F>("hResidualGlobalPhiCSC_ME-2/1","hResidualGlobalPhiCSC_ME-2/1",200,-1,1);
538  hResidualGlobalThetaCSC_ME[4]=fs->make<TH1F>("hResidualGlobalThetaCSC_ME-2/1","hResidualGlobalThetaCSC_ME-2/1",200,-1,1);
539  hResidualGlobalRCSC_ME[4] = fs->make<TH1F>("hResidualGlobalRCSC_ME-2/1","hResidualGlobalRCSC_ME-2/1",200,-10,10);
540  hResidualGlobalRPhiCSC_ME[5]=fs->make<TH1F>("hResidualGlobalRPhiCSC_ME-2/2","hResidualGlobalRPhiCSC_ME-2/2",200,-10,10);
541  hResidualGlobalPhiCSC_ME[5]=fs->make<TH1F>("hResidualGlobalPhiCSC_ME-2/2","hResidualGlobalPhiCSC_ME-2/2",200,-1,1);
542  hResidualGlobalThetaCSC_ME[5]=fs->make<TH1F>("hResidualGlobalThetaCSC_ME-2/2","hResidualGlobalThetaCSC_ME-2/2",200,-1,1);
543  hResidualGlobalRCSC_ME[5] = fs->make<TH1F>("hResidualGlobalRCSC_ME-2/2","hResidualGlobalRCSC_ME-2/2",200,-10,10);
544  hResidualGlobalRPhiCSC_ME[6]=fs->make<TH1F>("hResidualGlobalRPhiCSC_ME-1/1","hResidualGlobalRPhiCSC_ME-1/1",200,-10,10);
545  hResidualGlobalPhiCSC_ME[6]=fs->make<TH1F>("hResidualGlobalPhiCSC_ME-1/1","hResidualGlobalPhiCSC_ME-1/1",200,-1,1);
546  hResidualGlobalThetaCSC_ME[6]=fs->make<TH1F>("hResidualGlobalThetaCSC_ME-1/1","hResidualGlobalThetaCSC_ME-1/1",200,-1,1);
547  hResidualGlobalRCSC_ME[6] = fs->make<TH1F>("hResidualGlobalRCSC_ME-1/1","hResidualGlobalRCSC_ME-1/1",200,-10,10);
548  hResidualGlobalRPhiCSC_ME[7]=fs->make<TH1F>("hResidualGlobalRPhiCSC_ME-1/2","hResidualGlobalRPhiCSC_ME-1/2",200,-10,10);
549  hResidualGlobalPhiCSC_ME[7]=fs->make<TH1F>("hResidualGlobalPhiCSC_ME-1/2","hResidualGlobalPhiCSC_ME-1/2",200,-1,1);
550  hResidualGlobalThetaCSC_ME[7]=fs->make<TH1F>("hResidualGlobalThetaCSC_ME-1/2","hResidualGlobalThetaCSC_ME-1/2",200,-1,1);
551  hResidualGlobalRCSC_ME[7] = fs->make<TH1F>("hResidualGlobalRCSC_ME-1/2","hResidualGlobalRCSC_ME-1/2",200,-10,10);
552  hResidualGlobalRPhiCSC_ME[8]=fs->make<TH1F>("hResidualGlobalRPhiCSC_ME-1/3","hResidualGlobalRPhiCSC_ME-1/3",200,-10,10);
553  hResidualGlobalPhiCSC_ME[8]=fs->make<TH1F>("hResidualGlobalPhiCSC_ME-1/3","hResidualGlobalPhiCSC_ME-1/3",200,-1,1);
554  hResidualGlobalThetaCSC_ME[8]=fs->make<TH1F>("hResidualGlobalThetaCSC_ME-1/3","hResidualGlobalThetaCSC_ME-1/3",200,-1,1);
555  hResidualGlobalRCSC_ME[8] = fs->make<TH1F>("hResidualGlobalRCSC_ME-1/3","hResidualGlobalRCSC_ME-1/3",200,-10,10);
556  hResidualGlobalRPhiCSC_ME[9]=fs->make<TH1F>("hResidualGlobalRPhiCSC_ME1/1","hResidualGlobalRPhiCSC_ME1/1",200,-10,10);
557  hResidualGlobalPhiCSC_ME[9]=fs->make<TH1F>("hResidualGlobalPhiCSC_ME1/1","hResidualGlobalPhiCSC_ME1/1",100,-1,1);
558  hResidualGlobalThetaCSC_ME[9]=fs->make<TH1F>("hResidualGlobalThetaCSC_ME1/1","hResidualGlobalThetaCSC_ME1/1",200,-1,1);
559  hResidualGlobalRCSC_ME[9] = fs->make<TH1F>("hResidualGlobalRCSC_ME1/1","hResidualGlobalRCSC_ME1/1",200,-10,10);
560  hResidualGlobalRPhiCSC_ME[10]=fs->make<TH1F>("hResidualGlobalRPhiCSC_ME1/2","hResidualGlobalRPhiCSC_ME1/2",200,-10,10);
561  hResidualGlobalPhiCSC_ME[10]=fs->make<TH1F>("hResidualGlobalPhiCSC_ME1/2","hResidualGlobalPhiCSC_ME1/2",200,-1,1);
562  hResidualGlobalThetaCSC_ME[10]=fs->make<TH1F>("hResidualGlobalThetaCSC_ME1/2","hResidualGlobalThetaCSC_ME1/2",200,-1,1);
563  hResidualGlobalRCSC_ME[10] = fs->make<TH1F>("hResidualGlobalRCSC_ME1/2","hResidualGlobalRCSC_ME1/2",200,-10,10);
564  hResidualGlobalRPhiCSC_ME[11]=fs->make<TH1F>("hResidualGlobalRPhiCSC_ME1/3","hResidualGlobalRPhiCSC_ME1/3",200,-10,10);
565  hResidualGlobalPhiCSC_ME[11]=fs->make<TH1F>("hResidualGlobalPhiCSC_ME1/3","hResidualGlobalPhiCSC_ME1/3",200,-1,1);
566  hResidualGlobalThetaCSC_ME[11]=fs->make<TH1F>("hResidualGlobalThetaCSC_ME1/3","hResidualGlobalThetaCSC_ME1/3",200,-1,1);
567  hResidualGlobalRCSC_ME[11] = fs->make<TH1F>("hResidualGlobalRCSC_ME1/3","hResidualGlobalRCSC_ME1/3",200,-10,10);
568  hResidualGlobalRPhiCSC_ME[12]=fs->make<TH1F>("hResidualGlobalRPhiCSC_ME2/1","hResidualGlobalRPhiCSC_ME2/1",200,-10,10);
569  hResidualGlobalPhiCSC_ME[12]=fs->make<TH1F>("hResidualGlobalPhiCSC_ME2/1","hResidualGlobalPhiCSC_ME2/1",200,-1,1);
570  hResidualGlobalThetaCSC_ME[12]=fs->make<TH1F>("hResidualGlobalThetaCSC_ME2/1","hResidualGlobalThetaCSC_ME2/1",200,-1,1);
571  hResidualGlobalRCSC_ME[12] = fs->make<TH1F>("hResidualGlobalRCSC_ME2/1","hResidualGlobalRCSC_ME2/1",200,-10,10);
572  hResidualGlobalRPhiCSC_ME[13]=fs->make<TH1F>("hResidualGlobalRPhiCSC_ME2/2","hResidualGlobalRPhiCSC_ME2/2",200,-10,10);
573  hResidualGlobalPhiCSC_ME[13]=fs->make<TH1F>("hResidualGlobalPhiCSC_ME2/2","hResidualGlobalPhiCSC_ME2/2",200,-1,1);
574  hResidualGlobalThetaCSC_ME[13]=fs->make<TH1F>("hResidualGlobalThetaCSC_ME2/2","hResidualGlobalThetaCSC_ME2/2",200,-1,1);
575  hResidualGlobalRCSC_ME[13] = fs->make<TH1F>("hResidualGlobalRCSC_ME2/2","hResidualGlobalRCSC_ME2/2",200,-10,10);
576  hResidualGlobalRPhiCSC_ME[14]=fs->make<TH1F>("hResidualGlobalRPhiCSC_ME3/1","hResidualGlobalRPhiCSC_ME3/1",200,-10,10);
577  hResidualGlobalPhiCSC_ME[14]=fs->make<TH1F>("hResidualGlobalPhiCSC_ME3/1","hResidualGlobalPhiCSC_ME3/1",200,-1,1);
578  hResidualGlobalThetaCSC_ME[14]=fs->make<TH1F>("hResidualGlobalThetaCSC_ME3/1","hResidualGlobalThetaCSC_ME3/1",200,-1,1);
579  hResidualGlobalRCSC_ME[14] = fs->make<TH1F>("hResidualGlobalRCSC_ME3/1","hResidualGlobalRCSC_ME3/1",200,-10,10);
580  hResidualGlobalRPhiCSC_ME[15]=fs->make<TH1F>("hResidualGlobalRPhiCSC_ME3/2","hResidualGlobalRPhiCSC_ME3/2",200,-10,10);
581  hResidualGlobalPhiCSC_ME[15]=fs->make<TH1F>("hResidualGlobalPhiCSC_ME3/2","hResidualGlobalPhiCSC_ME3/2",200,-1,1);
582  hResidualGlobalThetaCSC_ME[15]=fs->make<TH1F>("hResidualGlobalThetaCSC_ME3/2","hResidualGlobalThetaCSC_ME3/2",200,-1,1);
583  hResidualGlobalRCSC_ME[15] = fs->make<TH1F>("hResidualGlobalRCSC_ME3/2","hResidualGlobalRCSC_ME3/2",200,-10,10);
584  hResidualGlobalRPhiCSC_ME[16]=fs->make<TH1F>("hResidualGlobalRPhiCSC_ME4/1","hResidualGlobalRPhiCSC_ME4/1",200,-10,10);
585  hResidualGlobalPhiCSC_ME[16]=fs->make<TH1F>("hResidualGlobalPhiCSC_ME4/1","hResidualGlobalPhiCSC_ME4/1",200,-1,1);
586  hResidualGlobalThetaCSC_ME[16]=fs->make<TH1F>("hResidualGlobalThetaCSC_ME4/1","hResidualGlobalThetaCSC_ME4/1",200,-1,1);
587  hResidualGlobalRCSC_ME[16] = fs->make<TH1F>("hResidualGlobalRCSC_ME4/1","hResidualGlobalRCSC_ME4/1",200,-10,10);
588  hResidualGlobalRPhiCSC_ME[17]=fs->make<TH1F>("hResidualGlobalRPhiCSC_ME4/2","hResidualGlobalRPhiCSC_ME4/2",200,-10,10);
589  hResidualGlobalPhiCSC_ME[17]=fs->make<TH1F>("hResidualGlobalPhiCSC_ME4/2","hResidualGlobalPhiCSC_ME4/2",200,-1,1);
590  hResidualGlobalThetaCSC_ME[17]=fs->make<TH1F>("hResidualGlobalThetaCSC_ME4/2","hResidualGlobalThetaCSC_ME4/2",200,-1,1);
591  hResidualGlobalRCSC_ME[17] = fs->make<TH1F>("hResidualGlobalRCSC_ME4/2","hResidualGlobalRCSC_ME4/2",200,-10,10);
592 
593  //DQM plots: mean residual with RMS as error
594  hprofLocalXDT=fs->make<TH1F>("hprofLocalXDT","Local X DT;;X (cm)", 280,0, 280);
595  hprofLocalPhiDT=fs->make<TH1F>("hprofLocalPhiDT","Local Phi DT;;Phi (rad)", 280,0, 280);
596  hprofLocalThetaDT=fs->make<TH1F>("hprofLocalThetaDT","Local Theta DT;;Theta (rad)", 280,0, 280);
597  hprofLocalYDT=fs->make<TH1F>("hprofLocalYDT","Local Y DT;;Y (cm)", 280,0, 280);
598  hprofLocalXCSC=fs->make<TH1F>("hprofLocalXCSC","Local X CSC;;X (cm)", 540,0, 540);
599  hprofLocalPhiCSC=fs->make<TH1F>("hprofLocalPhiCSC","Local Phi CSC;;Phi (rad)", 540,0, 540);
600  hprofLocalThetaCSC=fs->make<TH1F>("hprofLocalThetaCSC","Local Theta CSC;;Theta (rad)", 540,0, 540);
601  hprofLocalYCSC=fs->make<TH1F>("hprofLocalYCSC","Local Y CSC;;Y (cm)", 540,0, 540);
602  hprofGlobalRPhiDT=fs->make<TH1F>("hprofGlobalRPhiDT","Global RPhi DT;;RPhi (cm)", 280,0, 280);
603  hprofGlobalPhiDT=fs->make<TH1F>("hprofGlobalPhiDT","Global Phi DT;;Phi (rad)", 280,0, 280);
604  hprofGlobalThetaDT=fs->make<TH1F>("hprofGlobalThetaDT","Global Theta DT;;Theta (rad)", 280,0, 280);
605  hprofGlobalZDT=fs->make<TH1F>("hprofGlobalZDT","Global Z DT;;Z (cm)", 280,0, 280);
606  hprofGlobalRPhiCSC=fs->make<TH1F>("hprofGlobalRPhiCSC","Global RPhi CSC;;RPhi (cm)", 540,0, 540);
607  hprofGlobalPhiCSC=fs->make<TH1F>("hprofGlobalPhiCSC","Global Phi CSC;;Phi (cm)", 540,0, 540);
608  hprofGlobalThetaCSC=fs->make<TH1F>("hprofGlobalThetaCSC","Global Theta CSC;;Theta (rad)", 540,0, 540);
609  hprofGlobalRCSC=fs->make<TH1F>("hprofGlobalRCSC","Global R CSC;;R (cm)", 540,0, 540);
610 
611  // TH1F options
612  hprofLocalXDT->GetXaxis()->SetLabelSize(0.025);
613  hprofLocalPhiDT->GetXaxis()->SetLabelSize(0.025);
614  hprofLocalThetaDT->GetXaxis()->SetLabelSize(0.025);
615  hprofLocalYDT->GetXaxis()->SetLabelSize(0.025);
616  hprofLocalXCSC->GetXaxis()->SetLabelSize(0.025);
617  hprofLocalPhiCSC->GetXaxis()->SetLabelSize(0.025);
618  hprofLocalThetaCSC->GetXaxis()->SetLabelSize(0.025);
619  hprofLocalYCSC->GetXaxis()->SetLabelSize(0.025);
620  hprofGlobalRPhiDT->GetXaxis()->SetLabelSize(0.025);
621  hprofGlobalPhiDT->GetXaxis()->SetLabelSize(0.025);
622  hprofGlobalThetaDT->GetXaxis()->SetLabelSize(0.025);
623  hprofGlobalZDT->GetXaxis()->SetLabelSize(0.025);
624  hprofGlobalRPhiCSC->GetXaxis()->SetLabelSize(0.025);
625  hprofGlobalPhiCSC->GetXaxis()->SetLabelSize(0.025);
626  hprofGlobalThetaCSC->GetXaxis()->SetLabelSize(0.025);
627  hprofGlobalRCSC->GetXaxis()->SetLabelSize(0.025);
628 
629  // TH2F histos definition
630  hprofGlobalPositionDT=fs->make<TH2F>("hprofGlobalPositionDT","Global DT position (cm) absolute MEAN residuals;Sector;;cm", 14,0, 14,40,0,40);
631  hprofGlobalAngleDT=fs->make<TH2F>("hprofGlobalAngleDT","Global DT angle (rad) absolute MEAN residuals;Sector;;rad", 14,0, 14,40,0,40);
632  hprofGlobalPositionRmsDT=fs->make<TH2F>("hprofGlobalPositionRmsDT","Global DT position (cm) RMS residuals;Sector;;rad", 14,0, 14,40,0,40);
633  hprofGlobalAngleRmsDT=fs->make<TH2F>("hprofGlobalAngleRmsDT","Global DT angle (rad) RMS residuals;Sector;;rad", 14,0, 14,40,0,40);
634  hprofLocalPositionDT=fs->make<TH2F>("hprofLocalPositionDT","Local DT position (cm) absolute MEAN residuals;Sector;;cm", 14,0, 14,40,0,40);
635  hprofLocalAngleDT=fs->make<TH2F>("hprofLocalAngleDT","Local DT angle (rad) absolute MEAN residuals;Sector;;rad", 14,0, 14,40,0,40);
636  hprofLocalPositionRmsDT=fs->make<TH2F>("hprofLocalPositionRmsDT","Local DT position (cm) RMS residuals;Sector;;rad", 14,0, 14,40,0,40);
637  hprofLocalAngleRmsDT=fs->make<TH2F>("hprofLocalAngleRmsDT","Local DT angle (rad) RMS residuals;Sector;;rad", 14,0, 14,40,0,40);
638 
639  hprofGlobalPositionCSC=fs->make<TH2F>("hprofGlobalPositionCSC","Global CSC position (cm) absolute MEAN residuals;Sector;;cm", 36,0,36,36,0,36);
640  hprofGlobalAngleCSC=fs->make<TH2F>("hprofGlobalAngleCSC","Global CSC angle (rad) absolute MEAN residuals;Sector;;rad", 36,0,36,36,0,36);
641  hprofGlobalPositionRmsCSC=fs->make<TH2F>("hprofGlobalPositionRmsCSC","Global CSC position (cm) RMS residuals;Sector;;rad", 36,0,36,36,0,36);
642  hprofGlobalAngleRmsCSC=fs->make<TH2F>("hprofGlobalAngleRmsCSC","Global CSC angle (rad) RMS residuals;Sector;;rad", 36,0,36,36,0,36);
643  hprofLocalPositionCSC=fs->make<TH2F>("hprofLocalPositionCSC","Local CSC position (cm) absolute MEAN residuals;Sector;;cm", 36,0,36,36,0,36);
644  hprofLocalAngleCSC=fs->make<TH2F>("hprofLocalAngleCSC","Local CSC angle (rad) absolute MEAN residuals;Sector;;rad", 36,0,36,36,0,36);
645  hprofLocalPositionRmsCSC=fs->make<TH2F>("hprofLocalPositionRmsCSC","Local CSC position (cm) RMS residuals;Sector;;rad", 36,0,36,36,0,36);
646  hprofLocalAngleRmsCSC=fs->make<TH2F>("hprofLocalAngleRmsCSC","Local CSC angle (rad) RMS residuals;Sector;;rad", 36,0,36,36,0,36);
647 
648  // histos options
649  Float_t labelSize=0.025;
650  hprofGlobalPositionDT->GetYaxis()->SetLabelSize(labelSize);
651  hprofGlobalAngleDT->GetYaxis()->SetLabelSize(labelSize);
652  hprofGlobalPositionRmsDT->GetYaxis()->SetLabelSize(labelSize);
653  hprofGlobalAngleRmsDT->GetYaxis()->SetLabelSize(labelSize);
654  hprofLocalPositionDT->GetYaxis()->SetLabelSize(labelSize);
655  hprofLocalAngleDT->GetYaxis()->SetLabelSize(labelSize);
656  hprofLocalPositionRmsDT->GetYaxis()->SetLabelSize(labelSize);
657  hprofLocalAngleRmsDT->GetYaxis()->SetLabelSize(labelSize);
658 
659  hprofGlobalPositionCSC->GetYaxis()->SetLabelSize(labelSize);
660  hprofGlobalAngleCSC->GetYaxis()->SetLabelSize(labelSize);
661  hprofGlobalPositionRmsCSC->GetYaxis()->SetLabelSize(labelSize);
662  hprofGlobalAngleRmsCSC->GetYaxis()->SetLabelSize(labelSize);
663  hprofLocalPositionCSC->GetYaxis()->SetLabelSize(labelSize);
664  hprofLocalAngleCSC->GetYaxis()->SetLabelSize(labelSize);
665  hprofLocalPositionRmsCSC->GetYaxis()->SetLabelSize(labelSize);
666  hprofLocalAngleRmsCSC->GetYaxis()->SetLabelSize(labelSize);
667 
668  char binLabel[15];
669  for (int i=1;i<15;i++){
670  sprintf(binLabel, "Sec-%d", i );
671  hprofGlobalPositionDT->GetXaxis()->SetBinLabel(i,binLabel);
672  hprofGlobalAngleDT->GetXaxis()->SetBinLabel(i,binLabel);
673  hprofGlobalPositionRmsDT->GetXaxis()->SetBinLabel(i,binLabel);
674  hprofGlobalAngleRmsDT->GetXaxis()->SetBinLabel(i,binLabel);
675  hprofLocalPositionDT->GetXaxis()->SetBinLabel(i,binLabel);
676  hprofLocalAngleDT->GetXaxis()->SetBinLabel(i,binLabel);
677  hprofLocalPositionRmsDT->GetXaxis()->SetBinLabel(i,binLabel);
678  hprofLocalAngleRmsDT->GetXaxis()->SetBinLabel(i,binLabel);
679  }
680 
681  for (int i=1;i<37;i++){
682  sprintf(binLabel, "Ch-%d", i );
683  hprofGlobalPositionCSC->GetXaxis()->SetBinLabel(i,binLabel);
684  hprofGlobalAngleCSC->GetXaxis()->SetBinLabel(i,binLabel);
685  hprofGlobalPositionRmsCSC->GetXaxis()->SetBinLabel(i,binLabel);
686  hprofGlobalAngleRmsCSC->GetXaxis()->SetBinLabel(i,binLabel);
687  hprofLocalPositionCSC->GetXaxis()->SetBinLabel(i,binLabel);
688  hprofLocalAngleCSC->GetXaxis()->SetBinLabel(i,binLabel);
689  hprofLocalPositionRmsCSC->GetXaxis()->SetBinLabel(i,binLabel);
690  hprofLocalAngleRmsCSC->GetXaxis()->SetBinLabel(i,binLabel);
691  }
692 
693  }
694 
695 }
std::vector< TH1F * > hResidualLocalXCSC_ME
int i
Definition: DBlmapReader.cc:9
std::vector< TH1F * > hResidualLocalThetaDT_W
std::vector< TH1F * > hResidualGlobalZDT_MB
std::vector< TH1F * > hResidualLocalYCSC_ME
std::vector< TH1F * > hResidualGlobalThetaCSC_ME
std::vector< TH1F * > hResidualGlobalPhiCSC_ME
std::vector< TH1F * > hResidualLocalYDT_W
std::vector< TH1F * > hResidualGlobalZDT_W
edm::Service< TFileService > fs
std::vector< TH1F * > hResidualLocalXDT_W
std::vector< TH1F * > hResidualLocalThetaCSC_ME
std::vector< TH1F * > hResidualLocalPhiDT_W
std::vector< TH1F * > hResidualGlobalRPhiCSC_ME
std::vector< TH1F * > hResidualGlobalThetaDT_W
std::vector< TH1F * > hResidualGlobalRCSC_ME
std::vector< TH1F * > hResidualLocalPhiCSC_ME
std::vector< TH1F * > hResidualGlobalPhiDT_MB
std::vector< TH1F * > hResidualLocalPhiDT_MB
std::vector< TH1F * > hResidualLocalXDT_MB
std::vector< TH1F * > hResidualGlobalRPhiDT_W
std::vector< TH1F * > hResidualGlobalThetaDT_MB
std::vector< TH1F * > hResidualGlobalRPhiDT_MB
std::vector< TH1F * > hResidualLocalYDT_MB
T * make() const
make new ROOT object
std::vector< TH1F * > hResidualGlobalPhiDT_W
std::vector< TH1F * > hResidualLocalThetaDT_MB
RecHitVector MuonAlignmentAnalyzer::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 1950 of file MuonAlignmentAnalyzer.cc.

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

Referenced by analyze().

1950  {
1951 
1954 
1955  std::vector<int> positionDT;
1956  std::vector<int> positionCSC;
1957  RecHitVector my4DTrack;
1958 
1959  //Loop over the hits of the track
1960  for( int counter = 0; counter != staTrack.numberOfValidHits()-1; counter++) {
1961 
1962  TrackingRecHitRef myRef = staTrack.recHit(counter);
1963  const TrackingRecHit *rechit = myRef.get();
1964  const GeomDet* geomDet = theTrackingGeometry->idToDet(rechit->geographicalId());
1965 
1966  //It's a DT Hit
1967  if(geomDet->subDetector() == GeomDetEnumerators::DT) {
1968 
1969  //Take the layer associated to this hit
1970  DTLayerId myLayer(rechit->geographicalId().rawId());
1971 
1972  int NumberOfDTSegment = 0;
1973  //Loop over segments
1974  for(segmentDT = all4DSegmentsDT->begin(); segmentDT != all4DSegmentsDT->end(); ++segmentDT) {
1975 
1976  //By default the chamber associated to this Segment is new
1977  bool isNewChamber = true;
1978 
1979  //Loop over segments already included in the vector of segments in the actual track
1980  for(std::vector<int>::iterator positionIt = positionDT.begin(); positionIt != positionDT.end(); positionIt++) {
1981 
1982  //If this segment has been used before isNewChamber = false
1983  if(NumberOfDTSegment == *positionIt) isNewChamber = false;
1984  }
1985 
1986  //Loop over vectors of segments associated to previous tracks
1987  for(std::vector<std::vector<int> >::iterator collect = indexCollectionDT->begin(); collect != indexCollectionDT->end(); ++collect) {
1988 
1989  //Loop over segments associated to a track
1990  for(std::vector<int>::iterator positionIt = (*collect).begin(); positionIt != (*collect).end(); positionIt++) {
1991 
1992  //If this segment was used in a previos track then isNewChamber = false
1993  if(NumberOfDTSegment == *positionIt) isNewChamber = false;
1994  }
1995  }
1996 
1997  //If the chamber is new
1998  if(isNewChamber) {
1999 
2000  DTChamberId myChamber((*segmentDT).geographicalId().rawId());
2001  //If the layer of the hit belongs to the chamber of the 4D Segment
2002  if(myLayer.wheel() == myChamber.wheel() && myLayer.station() == myChamber.station() && myLayer.sector() == myChamber.sector()) {
2003 
2004  //push position of the segment and tracking rechit
2005  positionDT.push_back(NumberOfDTSegment);
2006  my4DTrack.push_back((TrackingRecHit *) &(*segmentDT));
2007  }
2008  }
2009  NumberOfDTSegment++;
2010  }
2011  //In case is a CSC
2012  } else if (geomDet->subDetector() == GeomDetEnumerators::CSC) {
2013 
2014  //Take the layer associated to this hit
2015  CSCDetId myLayer(rechit->geographicalId().rawId());
2016 
2017  int NumberOfCSCSegment = 0;
2018  //Loop over 4Dsegments
2019  for(segmentCSC = all4DSegmentsCSC->begin(); segmentCSC != all4DSegmentsCSC->end(); segmentCSC++) {
2020 
2021  //By default the chamber associated to the segment is new
2022  bool isNewChamber = true;
2023 
2024  //Loop over segments in the current track
2025  for(std::vector<int>::iterator positionIt = positionCSC.begin(); positionIt != positionCSC.end(); positionIt++) {
2026 
2027  //If this segment has been used then newchamber = false
2028  if(NumberOfCSCSegment == *positionIt) isNewChamber = false;
2029  }
2030  //Loop over vectors of segments in previous tracks
2031  for(std::vector<std::vector<int> >::iterator collect = indexCollectionCSC->begin(); collect != indexCollectionCSC->end(); ++collect) {
2032 
2033  //Loop over segments in a track
2034  for(std::vector<int>::iterator positionIt = (*collect).begin(); positionIt != (*collect).end(); positionIt++) {
2035 
2036  //If the segment was used in a previous track isNewChamber = false
2037  if(NumberOfCSCSegment == *positionIt) isNewChamber = false;
2038  }
2039  }
2040  //If the chamber is new
2041  if(isNewChamber) {
2042 
2043  CSCDetId myChamber((*segmentCSC).geographicalId().rawId());
2044  //If the chambers are the same
2045  if(myLayer.chamberId() == myChamber.chamberId()) {
2046  //push
2047  positionCSC.push_back(NumberOfCSCSegment);
2048  my4DTrack.push_back((TrackingRecHit *) &(*segmentCSC));
2049  }
2050  }
2051  NumberOfCSCSegment++;
2052  }
2053  }
2054  }
2055 
2056  indexCollectionDT->push_back(positionDT);
2057  indexCollectionCSC->push_back(positionCSC);
2058 
2059  return my4DTrack;
2060 }
virtual SubDetector subDetector() const =0
Which subdetector.
std::vector< TrackingRecHit * > RecHitVector
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
C::const_iterator const_iterator
constant access iterator type
Definition: RangeMap.h:46
unsigned short numberOfValidHits() const
number of valid hits found
Definition: TrackBase.h:232
TrackingRecHitRef recHit(size_t i) const
Get i-th hit on the track.
Definition: Track.h:67
DetId geographicalId() const
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:241
void MuonAlignmentAnalyzer::endJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 697 of file MuonAlignmentAnalyzer.cc.

References abs, doGBplots, doResplots, doSAplots, hprofGlobalAngleCSC, hprofGlobalAngleDT, hprofGlobalAngleRmsCSC, hprofGlobalAngleRmsDT, hprofGlobalPhiCSC, hprofGlobalPhiDT, hprofGlobalPositionCSC, hprofGlobalPositionDT, hprofGlobalPositionRmsCSC, hprofGlobalPositionRmsDT, hprofGlobalRCSC, hprofGlobalRPhiCSC, hprofGlobalRPhiDT, hprofGlobalThetaCSC, hprofGlobalThetaDT, hprofGlobalZDT, hprofLocalAngleCSC, hprofLocalAngleDT, hprofLocalAngleRmsCSC, hprofLocalAngleRmsDT, hprofLocalPhiCSC, hprofLocalPhiDT, hprofLocalPositionCSC, hprofLocalPositionDT, hprofLocalPositionRmsCSC, hprofLocalPositionRmsDT, hprofLocalThetaCSC, hprofLocalThetaDT, hprofLocalXCSC, hprofLocalXDT, hprofLocalYCSC, hprofLocalYDT, i, numberOfGBRecTracks, numberOfHits, numberOfSARecTracks, numberOfSimTracks, relativeConstraints::ring, relativeConstraints::station, theDataType, unitsGlobalPhi, unitsGlobalRPhi, unitsGlobalRZ, unitsGlobalTheta, unitsLocalPhi, unitsLocalTheta, unitsLocalX, and unitsLocalY.

697  {
698 
699 
700  edm::LogInfo("MuonAlignmentAnalyzer") << "----------------- " << std::endl << std::endl;
701 
702  if(theDataType == "SimData")
703  edm::LogInfo("MuonAlignmentAnalyzer") << "Number of Sim tracks: " << numberOfSimTracks << std::endl << std::endl;
704 
705  if(doSAplots)
706  edm::LogInfo("MuonAlignmentAnalyzer") << "Number of SA Reco tracks: " << numberOfSARecTracks << std::endl << std::endl;
707 
708  if(doGBplots)
709  edm::LogInfo("MuonAlignmentAnalyzer") << "Number of GB Reco tracks: " << numberOfGBRecTracks << std::endl << std::endl;
710 
711  if(doResplots){
712 
713 // delete thePropagator;
714 
715  edm::LogInfo("MuonAlignmentAnalyzer") << "Number of Hits considered for residuals: " << numberOfHits << std::endl << std::endl;
716 
717 
718 
719  char binLabel[15];
720 
721  for(unsigned int i=0 ; i<unitsLocalX.size() ; i++)
722  {
723 
724  TString nameHistoLocalX=unitsLocalX[i]->GetName();
725 
726  TString nameHistoLocalPhi=unitsLocalPhi[i]->GetName();
727 
728  TString nameHistoLocalTheta=unitsLocalTheta[i]->GetName();
729 
730  TString nameHistoLocalY=unitsLocalY[i]->GetName();
731 
732  TString nameHistoGlobalRPhi=unitsGlobalRPhi[i]->GetName();
733 
734  TString nameHistoGlobalPhi=unitsGlobalPhi[i]->GetName();
735 
736  TString nameHistoGlobalTheta=unitsGlobalTheta[i]->GetName();
737 
738  TString nameHistoGlobalRZ=unitsGlobalRZ[i]->GetName();
739 
740  if (nameHistoLocalX.Contains("MB")) // HistoLocalX DT
741  {
742  int wheel, station, sector;
743 
744  sscanf(nameHistoLocalX, "ResidualLocalX_W%dMB%1dS%d",&wheel,&station,&sector);
745 
746  Int_t nstation=station - 1;
747  Int_t nwheel=wheel+2;
748 
749  Double_t MeanRPhi=unitsLocalX[i]->GetMean();
750  Double_t ErrorRPhi=unitsLocalX[i]->GetMeanError();
751 
752  Int_t xbin=sector+14*nstation+14*4*nwheel;
753 
754  sprintf(binLabel, "MB%d/%dS%d", wheel, station, sector );
755 
756  hprofLocalXDT->SetMarkerStyle(21);
757  hprofLocalXDT->SetMarkerColor(kRed);
758  hprofLocalXDT->SetBinContent(xbin,MeanRPhi);
759  hprofLocalXDT->SetBinError(xbin, ErrorRPhi);
760  hprofLocalXDT->GetXaxis()->SetBinLabel(xbin, binLabel);
761 
762  Int_t ybin=1+nwheel*8+nstation*2;
763  hprofLocalPositionDT->SetBinContent(sector,ybin,fabs(MeanRPhi));
764  sprintf(binLabel, "MB%d/%d_LocalX",wheel, station );
765  hprofLocalPositionDT->GetYaxis()->SetBinLabel(ybin,binLabel);
766  hprofLocalPositionRmsDT->SetBinContent(sector,ybin,ErrorRPhi);
767  hprofLocalPositionRmsDT->GetYaxis()->SetBinLabel(ybin,binLabel);
768  }
769 
770  if (nameHistoLocalX.Contains("ME")) // HistoLocalX CSC
771  {
772 
773  int station, ring, chamber;
774 
775  sscanf(nameHistoLocalX, "ResidualLocalX_ME%dR%1dC%d",&station,&ring,&chamber);
776 
777  Double_t MeanRPhi=unitsLocalX[i]->GetMean();
778  Double_t ErrorRPhi=unitsLocalX[i]->GetMeanError();
779 
780  Int_t xbin=abs(station)*2+ring;
781  if(abs(station)==1) xbin=ring;
782  if (station>0) xbin=xbin+9;
783  else xbin = 10 -xbin;
784 
785  // To avoid holes in xAxis, I can't imagine right now a simpler way...
786  if(xbin<5) xbin= 18*(((Int_t)(xbin/3))*2+(Int_t)(xbin/2))+chamber;
787  else if(xbin<6) xbin=108+chamber;
788  else if(xbin<14) xbin=126 +(xbin-6)*36+chamber;
789  else if(xbin<18) xbin=414+18*(((Int_t)(xbin-13)/3)*2+((Int_t)(xbin-13)/2))+chamber;
790  else xbin=522+chamber;
791 
792  sprintf(binLabel, "ME%d/%dC%d", station, ring, chamber );
793 
794  hprofLocalXCSC->SetMarkerStyle(21);
795  hprofLocalXCSC->SetMarkerColor(kRed);
796  hprofLocalXCSC->SetBinContent(xbin,MeanRPhi);
797  hprofLocalXCSC->SetBinError(xbin, ErrorRPhi);
798  hprofLocalXCSC->GetXaxis()->SetBinLabel(xbin, binLabel);
799 
800  Int_t ybin=abs(station)*2+ring;
801  if(abs(station)==1) ybin=ring;
802  if (station>0) ybin=ybin+9;
803  else ybin = 10 -ybin;
804  ybin=2*ybin-1;
805  hprofLocalPositionCSC->SetBinContent(chamber,ybin,fabs(MeanRPhi));
806  sprintf(binLabel, "ME%d/%d_LocalX", station,ring );
807  hprofLocalPositionCSC->GetYaxis()->SetBinLabel(ybin,binLabel);
808  hprofLocalPositionRmsCSC->SetBinContent(chamber,ybin,ErrorRPhi);
809  hprofLocalPositionRmsCSC->GetYaxis()->SetBinLabel(ybin,binLabel);
810  }
811 
812  if (nameHistoLocalTheta.Contains("MB")) // HistoLocalTheta DT
813  {
814 
815  int wheel, station, sector;
816 
817  sscanf(nameHistoLocalTheta, "ResidualLocalTheta_W%dMB%1dS%d",&wheel,&station,&sector);
818 
819  if(station != 4){
820  Int_t nstation=station - 1;
821  Int_t nwheel=wheel+2;
822 
823  Double_t MeanTheta=unitsLocalTheta[i]->GetMean();
824  Double_t ErrorTheta=unitsLocalTheta[i]->GetMeanError();
825 
826  Int_t xbin=sector+14*nstation+14*4*nwheel;
827 
828  sprintf(binLabel, "MB%d/%dS%d", wheel, station, sector );
829 
830  hprofLocalThetaDT->SetBinContent(xbin,MeanTheta);
831  hprofLocalThetaDT->SetBinError(xbin, ErrorTheta);
832  hprofLocalThetaDT->SetMarkerStyle(21);
833  hprofLocalThetaDT->SetMarkerColor(kRed);
834  hprofLocalThetaDT->GetXaxis()->SetBinLabel(xbin, binLabel);
835 
836  Int_t ybin=2+nwheel*8+nstation*2;
837  hprofLocalAngleDT->SetBinContent(sector,ybin,fabs(MeanTheta));
838  sprintf(binLabel, "MB%d/%d_LocalTheta",wheel,station );
839  hprofLocalAngleDT->GetYaxis()->SetBinLabel(ybin,binLabel);
840  hprofLocalAngleRmsDT->SetBinContent(sector,ybin,ErrorTheta);
841  hprofLocalAngleRmsDT->GetYaxis()->SetBinLabel(ybin,binLabel);
842 
843  }
844  }
845 
846  if (nameHistoLocalPhi.Contains("MB")) // HistoLocalPhi DT
847  {
848 
849  int wheel, station, sector;
850 
851  sscanf(nameHistoLocalPhi, "ResidualLocalPhi_W%dMB%1dS%d",&wheel,&station,&sector);
852 
853  Int_t nstation=station - 1;
854  Int_t nwheel=wheel+2;
855 
856  Double_t MeanPhi=unitsLocalPhi[i]->GetMean();
857  Double_t ErrorPhi=unitsLocalPhi[i]->GetMeanError();
858 
859  Int_t xbin=sector+14*nstation+14*4*nwheel;
860 
861  sprintf(binLabel, "MB%d/%dS%d", wheel, station, sector );
862 
863  hprofLocalPhiDT->SetBinContent(xbin,MeanPhi);
864  hprofLocalPhiDT->SetBinError(xbin, ErrorPhi);
865  hprofLocalPhiDT->SetMarkerStyle(21);
866  hprofLocalPhiDT->SetMarkerColor(kRed);
867  hprofLocalPhiDT->GetXaxis()->SetBinLabel(xbin, binLabel);
868 
869  Int_t ybin=1+nwheel*8+nstation*2;
870  hprofLocalAngleDT->SetBinContent(sector,ybin,fabs(MeanPhi));
871  sprintf(binLabel, "MB%d/%d_LocalPhi", wheel,station );
872  hprofLocalAngleDT->GetYaxis()->SetBinLabel(ybin,binLabel);
873  hprofLocalAngleRmsDT->SetBinContent(sector,ybin,ErrorPhi);
874  hprofLocalAngleRmsDT->GetYaxis()->SetBinLabel(ybin,binLabel);
875  }
876 
877  if (nameHistoLocalPhi.Contains("ME")) // HistoLocalPhi CSC
878  {
879 
880  int station, ring, chamber;
881 
882  sscanf(nameHistoLocalPhi, "ResidualLocalPhi_ME%dR%1dC%d",&station,&ring,&chamber);
883 
884  Double_t MeanPhi=unitsLocalPhi[i]->GetMean();
885  Double_t ErrorPhi=unitsLocalPhi[i]->GetMeanError();
886 
887  Int_t xbin=abs(station)*2+ring;
888  if(abs(station)==1) xbin=ring;
889  if (station>0) xbin=xbin+9;
890  else xbin = 10 -xbin;
891 
892  // To avoid holes in xAxis, I can't imagine right now a simpler way...
893  if(xbin<5) xbin= 18*(((Int_t)(xbin/3))*2+(Int_t)(xbin/2))+chamber;
894  else if(xbin<6) xbin=108+chamber;
895  else if(xbin<14) xbin=126 +(xbin-6)*36+chamber;
896  else if(xbin<18) xbin=414+18*(((Int_t)(xbin-13)/3)*2+((Int_t)(xbin-13)/2))+chamber;
897  else xbin=522+chamber;
898 
899  sprintf(binLabel, "ME%d/%dC%d", station, ring, chamber );
900 
901  hprofLocalPhiCSC->SetMarkerStyle(21);
902  hprofLocalPhiCSC->SetMarkerColor(kRed);
903  hprofLocalPhiCSC->SetBinContent(xbin,MeanPhi);
904  hprofLocalPhiCSC->SetBinError(xbin, ErrorPhi);
905  hprofLocalPhiCSC->GetXaxis()->SetBinLabel(xbin, binLabel);
906 
907  Int_t ybin=abs(station)*2+ring;
908  if(abs(station)==1) ybin=ring;
909  if (station>0) ybin=ybin+9;
910  else ybin = 10 -ybin;
911  ybin=2*ybin-1;
912  hprofLocalAngleCSC->SetBinContent(chamber,ybin,fabs(MeanPhi));
913  sprintf(binLabel, "ME%d/%d_LocalPhi", station,ring );
914  hprofLocalAngleCSC->GetYaxis()->SetBinLabel(ybin,binLabel);
915  hprofLocalAngleRmsCSC->SetBinContent(chamber,ybin,ErrorPhi);
916  hprofLocalAngleRmsCSC->GetYaxis()->SetBinLabel(ybin,binLabel);
917  }
918 
919  if (nameHistoLocalTheta.Contains("ME")) // HistoLocalTheta CSC
920  {
921 
922  int station, ring, chamber;
923 
924  sscanf(nameHistoLocalTheta, "ResidualLocalTheta_ME%dR%1dC%d",&station,&ring,&chamber);
925 
926  Double_t MeanTheta=unitsLocalTheta[i]->GetMean();
927  Double_t ErrorTheta=unitsLocalTheta[i]->GetMeanError();
928 
929  Int_t xbin=abs(station)*2+ring;
930  if(abs(station)==1) xbin=ring;
931  if (station>0) xbin=xbin+9;
932  else xbin = 10 -xbin;
933 
934  // To avoid holes in xAxis, I can't imagine right now a simpler way...
935  if(xbin<5) xbin= 18*(((Int_t)(xbin/3))*2+(Int_t)(xbin/2))+chamber;
936  else if(xbin<6) xbin=108+chamber;
937  else if(xbin<14) xbin=126 +(xbin-6)*36+chamber;
938  else if(xbin<18) xbin=414+18*(((Int_t)(xbin-13)/3)*2+((Int_t)(xbin-13)/2))+chamber;
939  else xbin=522+chamber;
940 
941  sprintf(binLabel, "ME%d/%dC%d", station, ring, chamber );
942 
943  hprofLocalThetaCSC->SetMarkerStyle(21);
944  hprofLocalThetaCSC->SetMarkerColor(kRed);
945  hprofLocalThetaCSC->SetBinContent(xbin,MeanTheta);
946  hprofLocalThetaCSC->SetBinError(xbin, ErrorTheta);
947  hprofLocalThetaCSC->GetXaxis()->SetBinLabel(xbin, binLabel);
948 
949  Int_t ybin=abs(station)*2+ring;
950  if(abs(station)==1) ybin=ring;
951  if (station>0) ybin=ybin+9;
952  else ybin = 10 -ybin;
953  ybin=2*ybin;
954  hprofLocalAngleCSC->SetBinContent(chamber,ybin,fabs(MeanTheta));
955  sprintf(binLabel, "ME%d/%d_LocalTheta", station,ring );
956  hprofLocalAngleCSC->GetYaxis()->SetBinLabel(ybin,binLabel);
957  hprofLocalAngleRmsCSC->SetBinContent(chamber,ybin,ErrorTheta);
958  hprofLocalAngleRmsCSC->GetYaxis()->SetBinLabel(ybin,binLabel);
959  }
960 
961  if (nameHistoLocalY.Contains("MB")) // HistoLocalY DT
962  {
963 
964  int wheel, station, sector;
965 
966  sscanf(nameHistoLocalY, "ResidualLocalY_W%dMB%1dS%d",&wheel,&station,&sector);
967 
968  if(station!=4){
969  Int_t nstation=station - 1;
970  Int_t nwheel=wheel+2;
971 
972  Double_t MeanZ=unitsLocalY[i]->GetMean();
973  Double_t ErrorZ=unitsLocalY[i]->GetMeanError();
974 
975  Int_t xbin=sector+14*nstation+14*4*nwheel;
976 
977  sprintf(binLabel, "MB%d/%dS%d", wheel, station, sector );
978 
979  hprofLocalYDT->SetMarkerStyle(21);
980  hprofLocalYDT->SetMarkerColor(kRed);
981  hprofLocalYDT->SetBinContent(xbin,MeanZ);
982  hprofLocalYDT->SetBinError(xbin, ErrorZ);
983  hprofLocalYDT->GetXaxis()->SetBinLabel(xbin, binLabel);
984 
985  Int_t ybin=2+nwheel*8+nstation*2;
986  hprofLocalPositionDT->SetBinContent(sector,ybin,fabs(MeanZ));
987  sprintf(binLabel, "MB%d/%d_LocalY", wheel,station );
988  hprofLocalPositionDT->GetYaxis()->SetBinLabel(ybin,binLabel);
989  hprofLocalPositionRmsDT->SetBinContent(sector,ybin,ErrorZ);
990  hprofLocalPositionRmsDT->GetYaxis()->SetBinLabel(ybin,binLabel);
991  }
992  }
993 
994  if (nameHistoLocalY.Contains("ME")) // HistoLocalY CSC
995  {
996 
997  int station, ring, chamber;
998 
999  sscanf(nameHistoLocalY, "ResidualLocalY_ME%dR%1dC%d",&station,&ring,&chamber);
1000 
1001  Double_t MeanR=unitsLocalY[i]->GetMean();
1002  Double_t ErrorR=unitsLocalY[i]->GetMeanError();
1003 
1004  Int_t xbin=abs(station)*2+ring;
1005  if(abs(station)==1) xbin=ring;
1006  if (station>0) xbin=xbin+9;
1007  else xbin = 10 -xbin;
1008 
1009  // To avoid holes in xAxis, I can't imagine right now a simpler way...
1010  if(xbin<5) xbin= 18*(((Int_t)(xbin/3))*2+(Int_t)(xbin/2))+chamber;
1011  else if(xbin<6) xbin=108+chamber;
1012  else if(xbin<14) xbin=126 +(xbin-6)*36+chamber;
1013  else if(xbin<18) xbin=414+18*(((Int_t)(xbin-13)/3)*2+((Int_t)(xbin-13)/2))+chamber;
1014  else xbin=522+chamber;
1015 
1016  sprintf(binLabel, "ME%d/%dC%d", station, ring, chamber );
1017 
1018  hprofLocalYCSC->SetMarkerStyle(21);
1019  hprofLocalYCSC->SetMarkerColor(kRed);
1020  hprofLocalYCSC->SetBinContent(xbin,MeanR);
1021  hprofLocalYCSC->SetBinError(xbin, ErrorR);
1022  hprofLocalYCSC->GetXaxis()->SetBinLabel(xbin, binLabel);
1023 
1024  Int_t ybin=abs(station)*2+ring;
1025  if(abs(station)==1) ybin=ring;
1026  if (station>0) ybin=ybin+9;
1027  else ybin = 10 -ybin;
1028  ybin=2*ybin;
1029  hprofLocalPositionCSC->SetBinContent(chamber,ybin,fabs(MeanR));
1030  sprintf(binLabel, "ME%d/%d_LocalY", station,ring );
1031  hprofLocalPositionCSC->GetYaxis()->SetBinLabel(ybin,binLabel);
1032  hprofLocalPositionRmsCSC->SetBinContent(chamber,ybin,ErrorR);
1033  hprofLocalPositionRmsCSC->GetYaxis()->SetBinLabel(ybin,binLabel);
1034  }
1035 
1036  if (nameHistoGlobalRPhi.Contains("MB")) // HistoGlobalRPhi DT
1037  {
1038  int wheel, station, sector;
1039 
1040  sscanf(nameHistoGlobalRPhi, "ResidualGlobalRPhi_W%dMB%1dS%d",&wheel,&station,&sector);
1041 
1042  Int_t nstation=station - 1;
1043  Int_t nwheel=wheel+2;
1044 
1045  Double_t MeanRPhi=unitsGlobalRPhi[i]->GetMean();
1046  Double_t ErrorRPhi=unitsGlobalRPhi[i]->GetMeanError();
1047 
1048  Int_t xbin=sector+14*nstation+14*4*nwheel;
1049 
1050  sprintf(binLabel, "MB%d/%dS%d", wheel, station, sector );
1051 
1052  hprofGlobalRPhiDT->SetMarkerStyle(21);
1053  hprofGlobalRPhiDT->SetMarkerColor(kRed);
1054  hprofGlobalRPhiDT->SetBinContent(xbin,MeanRPhi);
1055  hprofGlobalRPhiDT->SetBinError(xbin, ErrorRPhi);
1056  hprofGlobalRPhiDT->GetXaxis()->SetBinLabel(xbin, binLabel);
1057 
1058  Int_t ybin=1+nwheel*8+nstation*2;
1059  hprofGlobalPositionDT->SetBinContent(sector,ybin,fabs(MeanRPhi));
1060  sprintf(binLabel, "MB%d/%d_GlobalRPhi", wheel,station );
1061  hprofGlobalPositionDT->GetYaxis()->SetBinLabel(ybin,binLabel);
1062  hprofGlobalPositionRmsDT->SetBinContent(sector,ybin,ErrorRPhi);
1063  hprofGlobalPositionRmsDT->GetYaxis()->SetBinLabel(ybin,binLabel);
1064  }
1065 
1066  if (nameHistoGlobalRPhi.Contains("ME")) // HistoGlobalRPhi CSC
1067  {
1068 
1069  int station, ring, chamber;
1070 
1071  sscanf(nameHistoGlobalRPhi, "ResidualGlobalRPhi_ME%dR%1dC%d",&station,&ring,&chamber);
1072 
1073  Double_t MeanRPhi=unitsGlobalRPhi[i]->GetMean();
1074  Double_t ErrorRPhi=unitsGlobalRPhi[i]->GetMeanError();
1075 
1076  Int_t xbin=abs(station)*2+ring;
1077  if(abs(station)==1) xbin=ring;
1078  if (station>0) xbin=xbin+9;
1079  else xbin = 10 -xbin;
1080 
1081  // To avoid holes in xAxis, I can't imagine right now a simpler way...
1082  if(xbin<5) xbin= 18*(((Int_t)(xbin/3))*2+(Int_t)(xbin/2))+chamber;
1083  else if(xbin<6) xbin=108+chamber;
1084  else if(xbin<14) xbin=126 +(xbin-6)*36+chamber;
1085  else if(xbin<18) xbin=414+18*(((Int_t)(xbin-13)/3)*2+((Int_t)(xbin-13)/2))+chamber;
1086  else xbin=522+chamber;
1087 
1088  sprintf(binLabel, "ME%d/%dC%d", station, ring, chamber );
1089 
1090  hprofGlobalRPhiCSC->SetMarkerStyle(21);
1091  hprofGlobalRPhiCSC->SetMarkerColor(kRed);
1092  hprofGlobalRPhiCSC->SetBinContent(xbin,MeanRPhi);
1093  hprofGlobalRPhiCSC->SetBinError(xbin, ErrorRPhi);
1094  hprofGlobalRPhiCSC->GetXaxis()->SetBinLabel(xbin, binLabel);
1095 
1096  Int_t ybin=abs(station)*2+ring;
1097  if(abs(station)==1) ybin=ring;
1098  if (station>0) ybin=ybin+9;
1099  else ybin = 10 -ybin;
1100  ybin=2*ybin-1;
1101  hprofGlobalPositionCSC->SetBinContent(chamber,ybin,fabs(MeanRPhi));
1102  sprintf(binLabel, "ME%d/%d_GlobalRPhi", station,ring );
1103  hprofGlobalPositionCSC->GetYaxis()->SetBinLabel(ybin,binLabel);
1104  hprofGlobalPositionRmsCSC->SetBinContent(chamber,ybin,ErrorRPhi);
1105  hprofGlobalPositionRmsCSC->GetYaxis()->SetBinLabel(ybin,binLabel);
1106  }
1107 
1108  if (nameHistoGlobalTheta.Contains("MB")) // HistoGlobalRTheta DT
1109  {
1110 
1111  int wheel, station, sector;
1112 
1113  sscanf(nameHistoGlobalTheta, "ResidualGlobalTheta_W%dMB%1dS%d",&wheel,&station,&sector);
1114 
1115  if(station!=4){
1116  Int_t nstation=station - 1;
1117  Int_t nwheel=wheel+2;
1118 
1119  Double_t MeanTheta=unitsGlobalTheta[i]->GetMean();
1120  Double_t ErrorTheta=unitsGlobalTheta[i]->GetMeanError();
1121 
1122  Int_t xbin=sector+14*nstation+14*4*nwheel;
1123 
1124  sprintf(binLabel, "MB%d/%dS%d", wheel, station, sector );
1125 
1126  hprofGlobalThetaDT->SetBinContent(xbin,MeanTheta);
1127  hprofGlobalThetaDT->SetBinError(xbin, ErrorTheta);
1128  hprofGlobalThetaDT->SetMarkerStyle(21);
1129  hprofGlobalThetaDT->SetMarkerColor(kRed);
1130  hprofGlobalThetaDT->GetXaxis()->SetBinLabel(xbin, binLabel);
1131 
1132  Int_t ybin=2+nwheel*8+nstation*2;
1133  hprofGlobalAngleDT->SetBinContent(sector,ybin,fabs(MeanTheta));
1134  sprintf(binLabel, "MB%d/%d_GlobalTheta", wheel,station );
1135  hprofGlobalAngleDT->GetYaxis()->SetBinLabel(ybin,binLabel);
1136  hprofGlobalAngleRmsDT->SetBinContent(sector,ybin,ErrorTheta);
1137  hprofGlobalAngleRmsDT->GetYaxis()->SetBinLabel(ybin,binLabel);
1138  }
1139  }
1140 
1141  if (nameHistoGlobalPhi.Contains("MB")) // HistoGlobalPhi DT
1142  {
1143 
1144  int wheel, station, sector;
1145 
1146  sscanf(nameHistoGlobalPhi, "ResidualGlobalPhi_W%dMB%1dS%d",&wheel,&station,&sector);
1147 
1148  Int_t nstation=station - 1;
1149  Int_t nwheel=wheel+2;
1150 
1151  Double_t MeanPhi=unitsGlobalPhi[i]->GetMean();
1152  Double_t ErrorPhi=unitsGlobalPhi[i]->GetMeanError();
1153 
1154  Int_t xbin=sector+14*nstation+14*4*nwheel;
1155 
1156  sprintf(binLabel, "MB%d/%dS%d", wheel, station, sector );
1157 
1158  hprofGlobalPhiDT->SetBinContent(xbin,MeanPhi);
1159  hprofGlobalPhiDT->SetBinError(xbin, ErrorPhi);
1160  hprofGlobalPhiDT->SetMarkerStyle(21);
1161  hprofGlobalPhiDT->SetMarkerColor(kRed);
1162  hprofGlobalPhiDT->GetXaxis()->SetBinLabel(xbin, binLabel);
1163 
1164  Int_t ybin=1+nwheel*8+nstation*2;
1165  hprofGlobalAngleDT->SetBinContent(sector,ybin,fabs(MeanPhi));
1166  sprintf(binLabel, "MB%d/%d_GlobalPhi", wheel,station );
1167  hprofGlobalAngleDT->GetYaxis()->SetBinLabel(ybin,binLabel);
1168  hprofGlobalAngleRmsDT->SetBinContent(sector,ybin,ErrorPhi);
1169  hprofGlobalAngleRmsDT->GetYaxis()->SetBinLabel(ybin,binLabel);
1170  }
1171 
1172  if (nameHistoGlobalPhi.Contains("ME")) // HistoGlobalPhi CSC
1173  {
1174 
1175  int station, ring, chamber;
1176 
1177  sscanf(nameHistoGlobalPhi, "ResidualGlobalPhi_ME%dR%1dC%d",&station,&ring,&chamber);
1178 
1179  Double_t MeanPhi=unitsGlobalPhi[i]->GetMean();
1180  Double_t ErrorPhi=unitsGlobalPhi[i]->GetMeanError();
1181 
1182  Int_t xbin=abs(station)*2+ring;
1183  if(abs(station)==1) xbin=ring;
1184  if (station>0) xbin=xbin+9;
1185  else xbin = 10 -xbin;
1186 
1187  // To avoid holes in xAxis, I can't imagine right now a simpler way...
1188  if(xbin<5) xbin= 18*(((Int_t)(xbin/3))*2+(Int_t)(xbin/2))+chamber;
1189  else if(xbin<6) xbin=108+chamber;
1190  else if(xbin<14) xbin=126 +(xbin-6)*36+chamber;
1191  else if(xbin<18) xbin=414+18*(((Int_t)(xbin-13)/3)*2+((Int_t)(xbin-13)/2))+chamber;
1192  else xbin=522+chamber;
1193 
1194  sprintf(binLabel, "ME%d/%dC%d", station, ring, chamber );
1195 
1196  hprofGlobalPhiCSC->SetMarkerStyle(21);
1197  hprofGlobalPhiCSC->SetMarkerColor(kRed);
1198  hprofGlobalPhiCSC->SetBinContent(xbin,MeanPhi);
1199  hprofGlobalPhiCSC->SetBinError(xbin, ErrorPhi);
1200  hprofGlobalPhiCSC->GetXaxis()->SetBinLabel(xbin, binLabel);
1201 
1202  Int_t ybin=abs(station)*2+ring;
1203  if(abs(station)==1) ybin=ring;
1204  if (station>0) ybin=ybin+9;
1205  else ybin = 10 -ybin;
1206  ybin=2*ybin-1;
1207  hprofGlobalAngleCSC->SetBinContent(chamber,ybin,fabs(MeanPhi));
1208  sprintf(binLabel, "ME%d/%d_GlobalPhi", station,ring );
1209  hprofGlobalAngleCSC->GetYaxis()->SetBinLabel(ybin,binLabel);
1210  hprofGlobalAngleRmsCSC->SetBinContent(chamber,ybin,ErrorPhi);
1211  hprofGlobalAngleRmsCSC->GetYaxis()->SetBinLabel(ybin,binLabel);
1212  }
1213 
1214  if (nameHistoGlobalTheta.Contains("ME")) // HistoGlobalTheta CSC
1215  {
1216 
1217  int station, ring, chamber;
1218 
1219  sscanf(nameHistoGlobalTheta, "ResidualGlobalTheta_ME%dR%1dC%d",&station,&ring,&chamber);
1220 
1221  Double_t MeanTheta=unitsGlobalTheta[i]->GetMean();
1222  Double_t ErrorTheta=unitsGlobalTheta[i]->GetMeanError();
1223 
1224  Int_t xbin=abs(station)*2+ring;
1225  if(abs(station)==1) xbin=ring;
1226  if (station>0) xbin=xbin+9;
1227  else xbin = 10 -xbin;
1228 
1229  // To avoid holes in xAxis, I can't imagine right now a simpler way...
1230  if(xbin<5) xbin= 18*(((Int_t)(xbin/3))*2+(Int_t)(xbin/2))+chamber;
1231  else if(xbin<6) xbin=108+chamber;
1232  else if(xbin<14) xbin=126 +(xbin-6)*36+chamber;
1233  else if(xbin<18) xbin=414+18*(((Int_t)(xbin-13)/3)*2+((Int_t)(xbin-13)/2))+chamber;
1234  else xbin=522+chamber;
1235 
1236  sprintf(binLabel, "ME%d/%dC%d", station, ring, chamber );
1237 
1238  hprofGlobalThetaCSC->SetMarkerStyle(21);
1239  hprofGlobalThetaCSC->SetMarkerColor(kRed);
1240  hprofGlobalThetaCSC->SetBinContent(xbin,MeanTheta);
1241  hprofGlobalThetaCSC->SetBinError(xbin, ErrorTheta);
1242  hprofGlobalThetaCSC->GetXaxis()->SetBinLabel(xbin, binLabel);
1243 
1244  Int_t ybin=abs(station)*2+ring;
1245  if(abs(station)==1) ybin=ring;
1246  if (station>0) ybin=ybin+9;
1247  else ybin = 10 -ybin;
1248  ybin=2*ybin;
1249  hprofGlobalAngleCSC->SetBinContent(chamber,ybin,fabs(MeanTheta));
1250  sprintf(binLabel, "ME%d/%d_GlobalTheta", station,ring );
1251  hprofGlobalAngleCSC->GetYaxis()->SetBinLabel(ybin,binLabel);
1252  hprofGlobalAngleRmsCSC->SetBinContent(chamber,ybin,ErrorTheta);
1253  hprofGlobalAngleRmsCSC->GetYaxis()->SetBinLabel(ybin,binLabel);
1254  }
1255 
1256  if (nameHistoGlobalRZ.Contains("MB")) // HistoGlobalZ DT
1257  {
1258 
1259  int wheel, station, sector;
1260 
1261  sscanf(nameHistoGlobalRZ, "ResidualGlobalZ_W%dMB%1dS%d",&wheel,&station,&sector);
1262 
1263  if(station!=4){
1264  Int_t nstation=station - 1;
1265  Int_t nwheel=wheel+2;
1266 
1267  Double_t MeanZ=unitsGlobalRZ[i]->GetMean();
1268  Double_t ErrorZ=unitsGlobalRZ[i]->GetMeanError();
1269 
1270  Int_t xbin=sector+14*nstation+14*4*nwheel;
1271 
1272  sprintf(binLabel, "MB%d/%dS%d", wheel, station, sector );
1273 
1274  hprofGlobalZDT->SetMarkerStyle(21);
1275  hprofGlobalZDT->SetMarkerColor(kRed);
1276 
1277  hprofGlobalZDT->SetBinContent(xbin,MeanZ);
1278  hprofGlobalZDT->SetBinError(xbin, ErrorZ);
1279  hprofGlobalZDT->GetXaxis()->SetBinLabel(xbin, binLabel);
1280 
1281  Int_t ybin=2+nwheel*8+nstation*2;
1282  hprofGlobalPositionDT->SetBinContent(sector,ybin,fabs(MeanZ));
1283  sprintf(binLabel, "MB%d/%d_GlobalZ", wheel,station );
1284  hprofGlobalPositionDT->GetYaxis()->SetBinLabel(ybin,binLabel);
1285  hprofGlobalPositionRmsDT->SetBinContent(sector,ybin,ErrorZ);
1286  hprofGlobalPositionRmsDT->GetYaxis()->SetBinLabel(ybin,binLabel);
1287  }
1288  }
1289 
1290  if (nameHistoGlobalRZ.Contains("ME")) // HistoGlobalR CSC
1291  {
1292 
1293  int station, ring, chamber;
1294 
1295  sscanf(nameHistoGlobalRZ, "ResidualGlobalR_ME%dR%1dC%d",&station,&ring,&chamber);
1296 
1297  Double_t MeanR=unitsGlobalRZ[i]->GetMean();
1298  Double_t ErrorR=unitsGlobalRZ[i]->GetMeanError();
1299 
1300  Int_t xbin=abs(station)*2+ring;
1301  if(abs(station)==1) xbin=ring;
1302  if (station>0) xbin=xbin+9;
1303  else xbin = 10 -xbin;
1304 
1305  // To avoid holes in xAxis, I can't imagine right now a simpler way...
1306  if(xbin<5) xbin= 18*(((Int_t)(xbin/3))*2+(Int_t)(xbin/2))+chamber;
1307  else if(xbin<6) xbin=108+chamber;
1308  else if(xbin<14) xbin=126 +(xbin-6)*36+chamber;
1309  else if(xbin<18) xbin=414+18*(((Int_t)(xbin-13)/3)*2+((Int_t)(xbin-13)/2))+chamber;
1310  else xbin=522+chamber;
1311 
1312  sprintf(binLabel, "ME%d/%dC%d", station, ring, chamber );
1313 
1314  hprofGlobalRCSC->SetMarkerStyle(21);
1315  hprofGlobalRCSC->SetMarkerColor(kRed);
1316  hprofGlobalRCSC->SetBinContent(xbin,MeanR);
1317  hprofGlobalRCSC->SetBinError(xbin, ErrorR);
1318  hprofGlobalRCSC->GetXaxis()->SetBinLabel(xbin, binLabel);
1319 
1320  Int_t ybin=abs(station)*2+ring;
1321  if(abs(station)==1) ybin=ring;
1322  if (station>0) ybin=ybin+9;
1323  else ybin = 10 -ybin;
1324  ybin=2*ybin;
1325  hprofGlobalPositionCSC->SetBinContent(chamber,ybin,fabs(MeanR));
1326  sprintf(binLabel, "ME%d/%d_GlobalR", station,ring );
1327  hprofGlobalPositionCSC->GetYaxis()->SetBinLabel(ybin,binLabel);
1328  hprofGlobalPositionRmsCSC->SetBinContent(chamber,ybin,ErrorR);
1329  hprofGlobalPositionRmsCSC->GetYaxis()->SetBinLabel(ybin,binLabel);
1330  }
1331 
1332  } // for in histos
1333 
1334  } // doResPlots
1335 
1336 }
int i
Definition: DBlmapReader.cc:9
std::vector< TH1F * > unitsGlobalPhi
#define abs(x)
Definition: mlp_lapack.h:159
std::vector< TH1F * > unitsGlobalRPhi
std::vector< TH1F * > unitsLocalX
std::vector< TH1F * > unitsLocalTheta
std::vector< TH1F * > unitsGlobalRZ
std::vector< TH1F * > unitsLocalPhi
std::vector< TH1F * > unitsLocalY
std::vector< TH1F * > unitsGlobalTheta

Member Data Documentation

std::vector<long> MuonAlignmentAnalyzer::detectorCollection
private

Definition at line 254 of file MuonAlignmentAnalyzer.h.

Referenced by analyze().

bool MuonAlignmentAnalyzer::doGBplots
private

Definition at line 73 of file MuonAlignmentAnalyzer.h.

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

bool MuonAlignmentAnalyzer::doResplots
private

Definition at line 73 of file MuonAlignmentAnalyzer.h.

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

bool MuonAlignmentAnalyzer::doSAplots
private

Definition at line 73 of file MuonAlignmentAnalyzer.h.

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

edm::Service<TFileService> MuonAlignmentAnalyzer::fs
private

Definition at line 60 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hGBChi2
private

Definition at line 97 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hGBChi2_Barrel
private

Definition at line 99 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hGBChi2_Endcap
private

Definition at line 101 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hGBInvM
private

Definition at line 105 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hGBInvM_Barrel
private

Definition at line 109 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hGBInvM_Endcap
private

Definition at line 113 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hGBInvM_Overlap
private

Definition at line 118 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hGBinvPTres
private

Definition at line 148 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH2F* MuonAlignmentAnalyzer::hGBinvPTvsEta
private

Definition at line 160 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH2F* MuonAlignmentAnalyzer::hGBinvPTvsNhits
private

Definition at line 165 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH2F* MuonAlignmentAnalyzer::hGBinvPTvsPhi
private

Definition at line 161 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hGBNhits
private

Definition at line 89 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hGBNhits_Barrel
private

Definition at line 90 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hGBNhits_Endcap
private

Definition at line 91 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hGBNmuons
private

Definition at line 78 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hGBNmuons_Barrel
private

Definition at line 81 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hGBNmuons_Endcap
private

Definition at line 84 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH2F* MuonAlignmentAnalyzer::hGBPhivsEta
private

Definition at line 142 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hGBPTDiff
private

Definition at line 155 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH2F* MuonAlignmentAnalyzer::hGBPTDiffvsEta
private

Definition at line 158 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH2F* MuonAlignmentAnalyzer::hGBPTDiffvsPhi
private

Definition at line 159 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hGBPTRec
private

Definition at line 124 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hGBPTRec_Barrel
private

Definition at line 127 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hGBPTRec_Endcap
private

Definition at line 130 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hGBPTres
private

Definition at line 147 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hGBPTres_Barrel
private

Definition at line 151 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hGBPTres_Endcap
private

Definition at line 152 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH2F* MuonAlignmentAnalyzer::hGBPTvsEta
private

Definition at line 132 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH2F* MuonAlignmentAnalyzer::hGBPTvsPhi
private

Definition at line 133 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH2F* MuonAlignmentAnalyzer::hprofGlobalAngleCSC
private

Definition at line 225 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and endJob().

TH2F* MuonAlignmentAnalyzer::hprofGlobalAngleDT
private

Definition at line 233 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and endJob().

TH2F* MuonAlignmentAnalyzer::hprofGlobalAngleRmsCSC
private

Definition at line 227 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and endJob().

TH2F* MuonAlignmentAnalyzer::hprofGlobalAngleRmsDT
private

Definition at line 235 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and endJob().

TH1F* MuonAlignmentAnalyzer::hprofGlobalPhiCSC
private

Definition at line 250 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and endJob().

TH1F* MuonAlignmentAnalyzer::hprofGlobalPhiDT
private

Definition at line 246 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and endJob().

TH2F* MuonAlignmentAnalyzer::hprofGlobalPositionCSC
private

Definition at line 224 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and endJob().

TH2F* MuonAlignmentAnalyzer::hprofGlobalPositionDT
private

Definition at line 232 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and endJob().

TH2F* MuonAlignmentAnalyzer::hprofGlobalPositionRmsCSC
private

Definition at line 226 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and endJob().

TH2F* MuonAlignmentAnalyzer::hprofGlobalPositionRmsDT
private

Definition at line 234 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and endJob().

TH1F* MuonAlignmentAnalyzer::hprofGlobalRCSC
private

Definition at line 252 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and endJob().

TH1F* MuonAlignmentAnalyzer::hprofGlobalRPhiCSC
private

Definition at line 249 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and endJob().

TH1F* MuonAlignmentAnalyzer::hprofGlobalRPhiDT
private

Definition at line 245 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and endJob().

TH1F* MuonAlignmentAnalyzer::hprofGlobalThetaCSC
private

Definition at line 251 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and endJob().

TH1F* MuonAlignmentAnalyzer::hprofGlobalThetaDT
private

Definition at line 247 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and endJob().

TH1F* MuonAlignmentAnalyzer::hprofGlobalZDT
private

Definition at line 248 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and endJob().

TH2F* MuonAlignmentAnalyzer::hprofLocalAngleCSC
private

Definition at line 221 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and endJob().

TH2F* MuonAlignmentAnalyzer::hprofLocalAngleDT
private

Definition at line 229 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and endJob().

TH2F* MuonAlignmentAnalyzer::hprofLocalAngleRmsCSC
private

Definition at line 223 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and endJob().

TH2F* MuonAlignmentAnalyzer::hprofLocalAngleRmsDT
private

Definition at line 231 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and endJob().

TH1F* MuonAlignmentAnalyzer::hprofLocalPhiCSC
private

Definition at line 242 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and endJob().

TH1F* MuonAlignmentAnalyzer::hprofLocalPhiDT
private

Definition at line 238 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and endJob().

TH2F* MuonAlignmentAnalyzer::hprofLocalPositionCSC
private

Definition at line 220 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and endJob().

TH2F* MuonAlignmentAnalyzer::hprofLocalPositionDT
private

Definition at line 228 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and endJob().

TH2F* MuonAlignmentAnalyzer::hprofLocalPositionRmsCSC
private

Definition at line 222 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and endJob().

TH2F* MuonAlignmentAnalyzer::hprofLocalPositionRmsDT
private

Definition at line 230 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and endJob().

TH1F* MuonAlignmentAnalyzer::hprofLocalThetaCSC
private

Definition at line 243 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and endJob().

TH1F* MuonAlignmentAnalyzer::hprofLocalThetaDT
private

Definition at line 239 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and endJob().

TH1F* MuonAlignmentAnalyzer::hprofLocalXCSC
private

Definition at line 241 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and endJob().

TH1F* MuonAlignmentAnalyzer::hprofLocalXDT
private

Definition at line 237 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and endJob().

TH1F* MuonAlignmentAnalyzer::hprofLocalYCSC
private

Definition at line 244 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and endJob().

TH1F* MuonAlignmentAnalyzer::hprofLocalYDT
private

Definition at line 240 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and endJob().

TH1F* MuonAlignmentAnalyzer::hResidualGlobalPhiCSC
private

Definition at line 203 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<TH1F*> MuonAlignmentAnalyzer::hResidualGlobalPhiCSC_ME
private

Definition at line 211 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hResidualGlobalPhiDT
private

Definition at line 199 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<TH1F*> MuonAlignmentAnalyzer::hResidualGlobalPhiDT_MB
private

Definition at line 215 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<TH1F*> MuonAlignmentAnalyzer::hResidualGlobalPhiDT_W
private

Definition at line 207 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hResidualGlobalRCSC
private

Definition at line 205 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<TH1F*> MuonAlignmentAnalyzer::hResidualGlobalRCSC_ME
private

Definition at line 213 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hResidualGlobalRPhiCSC
private

Definition at line 202 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<TH1F*> MuonAlignmentAnalyzer::hResidualGlobalRPhiCSC_ME
private

Definition at line 210 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hResidualGlobalRPhiDT
private

Definition at line 198 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<TH1F*> MuonAlignmentAnalyzer::hResidualGlobalRPhiDT_MB
private

Definition at line 214 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<TH1F*> MuonAlignmentAnalyzer::hResidualGlobalRPhiDT_W
private

Definition at line 206 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hResidualGlobalThetaCSC
private

Definition at line 204 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<TH1F*> MuonAlignmentAnalyzer::hResidualGlobalThetaCSC_ME
private

Definition at line 212 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hResidualGlobalThetaDT
private

Definition at line 200 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<TH1F*> MuonAlignmentAnalyzer::hResidualGlobalThetaDT_MB
private

Definition at line 216 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<TH1F*> MuonAlignmentAnalyzer::hResidualGlobalThetaDT_W
private

Definition at line 208 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hResidualGlobalZDT
private

Definition at line 201 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<TH1F*> MuonAlignmentAnalyzer::hResidualGlobalZDT_MB
private

Definition at line 217 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<TH1F*> MuonAlignmentAnalyzer::hResidualGlobalZDT_W
private

Definition at line 209 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hResidualLocalPhiCSC
private

Definition at line 183 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<TH1F*> MuonAlignmentAnalyzer::hResidualLocalPhiCSC_ME
private

Definition at line 191 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hResidualLocalPhiDT
private

Definition at line 179 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<TH1F*> MuonAlignmentAnalyzer::hResidualLocalPhiDT_MB
private

Definition at line 195 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<TH1F*> MuonAlignmentAnalyzer::hResidualLocalPhiDT_W
private

Definition at line 187 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hResidualLocalThetaCSC
private

Definition at line 184 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<TH1F*> MuonAlignmentAnalyzer::hResidualLocalThetaCSC_ME
private

Definition at line 192 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hResidualLocalThetaDT
private

Definition at line 180 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<TH1F*> MuonAlignmentAnalyzer::hResidualLocalThetaDT_MB
private

Definition at line 196 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<TH1F*> MuonAlignmentAnalyzer::hResidualLocalThetaDT_W
private

Definition at line 188 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hResidualLocalXCSC
private

Definition at line 182 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<TH1F*> MuonAlignmentAnalyzer::hResidualLocalXCSC_ME
private

Definition at line 190 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hResidualLocalXDT
private

Definition at line 178 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<TH1F*> MuonAlignmentAnalyzer::hResidualLocalXDT_MB
private

Definition at line 194 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<TH1F*> MuonAlignmentAnalyzer::hResidualLocalXDT_W
private

Definition at line 186 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hResidualLocalYCSC
private

Definition at line 185 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<TH1F*> MuonAlignmentAnalyzer::hResidualLocalYCSC_ME
private

Definition at line 193 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hResidualLocalYDT
private

Definition at line 181 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<TH1F*> MuonAlignmentAnalyzer::hResidualLocalYDT_MB
private

Definition at line 197 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<TH1F*> MuonAlignmentAnalyzer::hResidualLocalYDT_W
private

Definition at line 189 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hSAChi2
private

Definition at line 98 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hSAChi2_Barrel
private

Definition at line 100 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hSAChi2_Endcap
private

Definition at line 102 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hSAInvM
private

Definition at line 106 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hSAInvM_Barrel
private

Definition at line 110 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hSAInvM_Endcap
private

Definition at line 114 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hSAInvM_Overlap
private

Definition at line 119 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hSAinvPTres
private

Definition at line 146 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH2F* MuonAlignmentAnalyzer::hSAinvPTvsEta
private

Definition at line 162 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH2F* MuonAlignmentAnalyzer::hSAinvPTvsNhits
private

Definition at line 164 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH2F* MuonAlignmentAnalyzer::hSAinvPTvsPhi
private

Definition at line 163 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hSANhits
private

Definition at line 92 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hSANhits_Barrel
private

Definition at line 93 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hSANhits_Endcap
private

Definition at line 94 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hSANmuons
private

Definition at line 79 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hSANmuons_Barrel
private

Definition at line 82 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hSANmuons_Endcap
private

Definition at line 85 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH2F* MuonAlignmentAnalyzer::hSAPhivsEta
private

Definition at line 141 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hSAPTDiff
private

Definition at line 154 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH2F* MuonAlignmentAnalyzer::hSAPTDiffvsEta
private

Definition at line 156 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH2F* MuonAlignmentAnalyzer::hSAPTDiffvsPhi
private

Definition at line 157 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hSAPTRec
private

Definition at line 123 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hSAPTRec_Barrel
private

Definition at line 126 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hSAPTRec_Endcap
private

Definition at line 129 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hSAPTres
private

Definition at line 145 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hSAPTres_Barrel
private

Definition at line 149 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hSAPTres_Endcap
private

Definition at line 150 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH2F* MuonAlignmentAnalyzer::hSAPTvsEta
private

Definition at line 134 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH2F* MuonAlignmentAnalyzer::hSAPTvsPhi
private

Definition at line 135 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hSimInvM
private

Definition at line 107 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hSimInvM_Barrel
private

Definition at line 111 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hSimInvM_Endcap
private

Definition at line 115 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hSimInvM_Overlap
private

Definition at line 120 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hSimNmuons
private

Definition at line 80 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hSimNmuons_Barrel
private

Definition at line 83 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hSimNmuons_Endcap
private

Definition at line 86 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH2F* MuonAlignmentAnalyzer::hSimPhivsEta
private

Definition at line 140 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hSimPT
private

Definition at line 125 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hSimPT_Barrel
private

Definition at line 128 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* MuonAlignmentAnalyzer::hSimPT_Endcap
private

Definition at line 131 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH2F* MuonAlignmentAnalyzer::hSimPTvsEta
private

Definition at line 136 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

TH2F* MuonAlignmentAnalyzer::hSimPTvsPhi
private

Definition at line 137 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and beginJob().

double MuonAlignmentAnalyzer::invMassRangeMax
private

Definition at line 267 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and MuonAlignmentAnalyzer().

double MuonAlignmentAnalyzer::invMassRangeMin
private

Definition at line 267 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and MuonAlignmentAnalyzer().

unsigned int MuonAlignmentAnalyzer::min1DTrackRecHitSize
private

Definition at line 272 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and MuonAlignmentAnalyzer().

unsigned int MuonAlignmentAnalyzer::min4DTrackSegmentSize
private

Definition at line 272 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and MuonAlignmentAnalyzer().

unsigned int MuonAlignmentAnalyzer::nbins
private
int MuonAlignmentAnalyzer::numberOfGBRecTracks
private

Definition at line 262 of file MuonAlignmentAnalyzer.h.

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

int MuonAlignmentAnalyzer::numberOfHits
private

Definition at line 264 of file MuonAlignmentAnalyzer.h.

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

int MuonAlignmentAnalyzer::numberOfSARecTracks
private

Definition at line 263 of file MuonAlignmentAnalyzer.h.

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

int MuonAlignmentAnalyzer::numberOfSimTracks
private

Definition at line 261 of file MuonAlignmentAnalyzer.h.

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

double MuonAlignmentAnalyzer::ptRangeMax
private

Definition at line 267 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and MuonAlignmentAnalyzer().

double MuonAlignmentAnalyzer::ptRangeMin
private

Definition at line 267 of file MuonAlignmentAnalyzer.h.

Referenced by beginJob(), and MuonAlignmentAnalyzer().

double MuonAlignmentAnalyzer::resLocalXRangeStation1
private

Definition at line 269 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and MuonAlignmentAnalyzer().

double MuonAlignmentAnalyzer::resLocalXRangeStation2
private

Definition at line 269 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and MuonAlignmentAnalyzer().

double MuonAlignmentAnalyzer::resLocalXRangeStation3
private

Definition at line 269 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and MuonAlignmentAnalyzer().

double MuonAlignmentAnalyzer::resLocalXRangeStation4
private

Definition at line 269 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and MuonAlignmentAnalyzer().

double MuonAlignmentAnalyzer::resLocalYRangeStation1
private

Definition at line 270 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and MuonAlignmentAnalyzer().

double MuonAlignmentAnalyzer::resLocalYRangeStation2
private

Definition at line 270 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and MuonAlignmentAnalyzer().

double MuonAlignmentAnalyzer::resLocalYRangeStation3
private

Definition at line 270 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and MuonAlignmentAnalyzer().

double MuonAlignmentAnalyzer::resLocalYRangeStation4
private

Definition at line 270 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and MuonAlignmentAnalyzer().

double MuonAlignmentAnalyzer::resPhiRange
private

Definition at line 271 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and MuonAlignmentAnalyzer().

double MuonAlignmentAnalyzer::resThetaRange
private

Definition at line 271 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and MuonAlignmentAnalyzer().

std::string MuonAlignmentAnalyzer::theDataType
private

Definition at line 71 of file MuonAlignmentAnalyzer.h.

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

edm::InputTag MuonAlignmentAnalyzer::theGLBMuonTag
private

Definition at line 63 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and MuonAlignmentAnalyzer().

Propagator* MuonAlignmentAnalyzer::thePropagator
private

Definition at line 258 of file MuonAlignmentAnalyzer.h.

Referenced by analyze().

edm::InputTag MuonAlignmentAnalyzer::theRecHits4DTagCSC
private

Definition at line 68 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and MuonAlignmentAnalyzer().

edm::InputTag MuonAlignmentAnalyzer::theRecHits4DTagDT
private

Definition at line 67 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and MuonAlignmentAnalyzer().

edm::InputTag MuonAlignmentAnalyzer::theSTAMuonTag
private

Definition at line 64 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and MuonAlignmentAnalyzer().

std::vector<TH1F *> MuonAlignmentAnalyzer::unitsGlobalPhi
private

Definition at line 173 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and endJob().

std::vector<TH1F *> MuonAlignmentAnalyzer::unitsGlobalRPhi
private

Definition at line 172 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and endJob().

std::vector<TH1F *> MuonAlignmentAnalyzer::unitsGlobalRZ
private

Definition at line 175 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and endJob().

std::vector<TH1F *> MuonAlignmentAnalyzer::unitsGlobalTheta
private

Definition at line 174 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and endJob().

std::vector<TH1F *> MuonAlignmentAnalyzer::unitsLocalPhi
private

Definition at line 169 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and endJob().

std::vector<TH1F *> MuonAlignmentAnalyzer::unitsLocalTheta
private

Definition at line 170 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and endJob().

std::vector<TH1F *> MuonAlignmentAnalyzer::unitsLocalX
private

Definition at line 168 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and endJob().

std::vector<TH1F *> MuonAlignmentAnalyzer::unitsLocalY
private

Definition at line 171 of file MuonAlignmentAnalyzer.h.

Referenced by analyze(), and endJob().