CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes
MuonGeometryArrange Class Reference

#include <MuonGeometryArrange.h>

Inheritance diagram for MuonGeometryArrange:
edm::EDAnalyzer edm::EDConsumerBase

Classes

struct  MGACollection
 

Public Types

typedef AlignTransform SurveyValue
 
typedef Alignments SurveyValues
 
- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 Read from DB and print survey info. More...
 
 MuonGeometryArrange (const edm::ParameterSet &)
 Do nothing. Required by framework. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

bool checkChosen (Alignable *ali)
 
void compare (Alignable *refAli, Alignable *curAli, Alignable *curAliCopy2)
 
void compareGeometries (Alignable *refAli, Alignable *curAli, Alignable *curAliCopy2)
 
void createROOTGeometry (const edm::EventSetup &iSetup)
 
void endHist ()
 
void fillTree (Alignable *refAli, const AlgebraicVector &diff)
 
bool isMother (Alignable *ali)
 
void makeGraph (int sizeI, float smi, float sma, float minV, float maxV, TH2F *dxh, TGraph *grx, const char *name, const char *title, const char *titleg, const char *axis, const float *xp, const float *yp, int numEntries)
 
bool passChosen (Alignable *ali)
 
bool passIdCut (uint32_t)
 

Private Attributes

TTree * _alignTree
 
float _alphaVal
 
float _betaVal
 
align::StructureType _commonMuonLevel
 
float _dalphaVal
 
float _dbetaVal
 
int _detDim
 
bool _detIdFlag
 
std::string _detIdFlagFile
 
std::vector< uint32_t > _detIdFlagVector
 
float _dgammaVal
 
float _dphiVal
 
float _drotxVal
 
float _drotyVal
 
float _drotzVal
 
float _drVal
 
float _dxVal
 
float _dyVal
 
float _dzVal
 
int _endcap
 
float _etaVal
 
std::string _filename
 
float _gammaVal
 
int _id
 
std::string _inputFilename1
 
std::string _inputFilename2
 
TFile * _inputRootFile1
 
TFile * _inputRootFile2
 
TTree * _inputTree1
 
TTree * _inputTree2
 
std::string _inputTreename
 
std::string _inputXMLCurrent
 
std::string _inputXMLReference
 
float _ldphiVal
 
float _ldrVal
 
float _ldxVal
 
float _ldyVal
 
float _ldzVal
 
int _level
 
const std::vector< std::string > _levelStrings
 
std::vector< MGACollection_mgacollection
 
int _mid
 
int _mlevel
 
align::PositionType _MuonCommonCM
 
align::EulerAngles _MuonCommonR
 
align::GlobalVector _MuonCommonT
 
float _phiVal
 
int _ring
 
float _rotxVal
 
float _rotyVal
 
float _rotzVal
 
float _rVal
 
std::string _setCommonMuonSystem
 
int _station
 
int _sublevel
 
float _surLength
 
double _surRot [9]
 
float _surWidth
 
TFile * _theFile
 
int _useDetId
 
std::string _weightBy
 
bool _weightById
 
std::string _weightByIdFile
 
std::vector< unsigned int > _weightByIdVector
 
bool _writeToDB
 
float _xVal
 
float _yVal
 
float _zVal
 
AlignableMuoncurrentMuon
 
AlignableMuondummyMuon
 
bool firstEvent_
 
MuonAlignmentinputAlign1
 
MuonAlignmentinputAlign2
 
MuonAlignmentinputAlign2a
 
AlignableinputGeometry1
 
AlignableinputGeometry2
 
edm::ParameterSet m_params
 
AlignableMuonreferenceMuon
 
std::vector< align::StructureTypetheLevels
 
const SurveyErrorstheSurveyErrors
 
unsigned int theSurveyIndex
 
const AlignmentstheSurveyValues
 

Additional Inherited Members

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

Detailed Description

Module that reads survey info from DB and prints them out.

Usage: module comparator = MuonGeometryArrange {

lots of stuff

} path p = { comparator }

Date
2009/09/15 17:09:58
Revision
1.2
Author
Nhan Tran

Definition at line 38 of file MuonGeometryArrange.h.

Member Typedef Documentation

◆ SurveyValue

Definition at line 40 of file MuonGeometryArrange.h.

◆ SurveyValues

Definition at line 41 of file MuonGeometryArrange.h.

Constructor & Destructor Documentation

◆ MuonGeometryArrange()

MuonGeometryArrange::MuonGeometryArrange ( const edm::ParameterSet cfg)

Do nothing. Required by framework.

Definition at line 42 of file MuonGeometryArrange.cc.

43  : theSurveyIndex(0),
44  _levelStrings(cfg.getUntrackedParameter<std::vector<std::string> >("levels")),
45  _writeToDB(false),
47  firstEvent_(true) {
48  referenceMuon = nullptr;
49  currentMuon = nullptr;
50  // Input is XML
51  _inputXMLCurrent = cfg.getUntrackedParameter<std::string>("inputXMLCurrent");
52  _inputXMLReference = cfg.getUntrackedParameter<std::string>("inputXMLReference");
53 
54  //input is ROOT
55  _inputFilename1 = cfg.getUntrackedParameter<std::string>("inputROOTFile1");
56  _inputFilename2 = cfg.getUntrackedParameter<std::string>("inputROOTFile2");
57  _inputTreename = cfg.getUntrackedParameter<std::string>("treeName");
58 
59  //output file
60  _filename = cfg.getUntrackedParameter<std::string>("outputFile");
61 
62  _weightBy = cfg.getUntrackedParameter<std::string>("weightBy");
63  _detIdFlag = cfg.getUntrackedParameter<bool>("detIdFlag");
64  _detIdFlagFile = cfg.getUntrackedParameter<std::string>("detIdFlagFile");
65  _weightById = cfg.getUntrackedParameter<bool>("weightById");
66  _weightByIdFile = cfg.getUntrackedParameter<std::string>("weightByIdFile");
67  _endcap = cfg.getUntrackedParameter<int>("endcapNumber");
68  _station = cfg.getUntrackedParameter<int>("stationNumber");
69  _ring = cfg.getUntrackedParameter<int>("ringNumber");
70 
71  // if want to use, make id cut list
72  if (_detIdFlag) {
73  std::ifstream fin;
74  fin.open(_detIdFlagFile.c_str());
75 
76  while (!fin.eof() && fin.good()) {
77  uint32_t id;
78  fin >> id;
79  _detIdFlagVector.push_back(id);
80  }
81  fin.close();
82  }
83 
84  // turn weightByIdFile into weightByIdVector
85  unsigned int lastID = 999999999;
86  if (_weightById) {
87  std::ifstream inFile;
88  inFile.open(_weightByIdFile.c_str());
89  int ctr = 0;
90  while (!inFile.eof()) {
91  ctr++;
92  unsigned int listId;
93  inFile >> listId;
94  inFile.ignore(256, '\n');
95  if (listId != lastID) {
96  _weightByIdVector.push_back(listId);
97  }
98  lastID = listId;
99  }
100  inFile.close();
101  }
102 
103  //root configuration
104  _theFile = new TFile(_filename.c_str(), "RECREATE");
105  _alignTree = new TTree("alignTree", "alignTree");
106  _alignTree->Branch("id", &_id, "id/I");
107  _alignTree->Branch("level", &_level, "level/I");
108  _alignTree->Branch("mid", &_mid, "mid/I");
109  _alignTree->Branch("mlevel", &_mlevel, "mlevel/I");
110  _alignTree->Branch("sublevel", &_sublevel, "sublevel/I");
111  _alignTree->Branch("x", &_xVal, "x/F");
112  _alignTree->Branch("y", &_yVal, "y/F");
113  _alignTree->Branch("z", &_zVal, "z/F");
114  _alignTree->Branch("r", &_rVal, "r/F");
115  _alignTree->Branch("phi", &_phiVal, "phi/F");
116  _alignTree->Branch("eta", &_etaVal, "eta/F");
117  _alignTree->Branch("alpha", &_alphaVal, "alpha/F");
118  _alignTree->Branch("beta", &_betaVal, "beta/F");
119  _alignTree->Branch("gamma", &_gammaVal, "gamma/F");
120  _alignTree->Branch("dx", &_dxVal, "dx/F");
121  _alignTree->Branch("dy", &_dyVal, "dy/F");
122  _alignTree->Branch("dz", &_dzVal, "dz/F");
123  _alignTree->Branch("dr", &_drVal, "dr/F");
124  _alignTree->Branch("dphi", &_dphiVal, "dphi/F");
125  _alignTree->Branch("dalpha", &_dalphaVal, "dalpha/F");
126  _alignTree->Branch("dbeta", &_dbetaVal, "dbeta/F");
127  _alignTree->Branch("dgamma", &_dgammaVal, "dgamma/F");
128  _alignTree->Branch("ldx", &_ldxVal, "ldx/F");
129  _alignTree->Branch("ldy", &_ldyVal, "ldy/F");
130  _alignTree->Branch("ldz", &_ldzVal, "ldz/F");
131  _alignTree->Branch("ldr", &_ldrVal, "ldr/F");
132  _alignTree->Branch("ldphi", &_ldphiVal, "ldphi/F");
133  _alignTree->Branch("useDetId", &_useDetId, "useDetId/I");
134  _alignTree->Branch("detDim", &_detDim, "detDim/I");
135  _alignTree->Branch("rotx", &_rotxVal, "rotx/F");
136  _alignTree->Branch("roty", &_rotyVal, "roty/F");
137  _alignTree->Branch("rotz", &_rotzVal, "rotz/F");
138  _alignTree->Branch("drotx", &_drotxVal, "drotx/F");
139  _alignTree->Branch("droty", &_drotyVal, "droty/F");
140  _alignTree->Branch("drotz", &_drotzVal, "drotz/F");
141  _alignTree->Branch("surW", &_surWidth, "surW/F");
142  _alignTree->Branch("surL", &_surLength, "surL/F");
143  _alignTree->Branch("surRot", &_surRot, "surRot[9]/D");
144 
145  _mgacollection.clear();
146 }

References _alignTree, _alphaVal, _betaVal, _dalphaVal, _dbetaVal, _detDim, _detIdFlag, _detIdFlagFile, _detIdFlagVector, _dgammaVal, _dphiVal, _drotxVal, _drotyVal, _drotzVal, _drVal, _dxVal, _dyVal, _dzVal, _endcap, _etaVal, _filename, _gammaVal, _id, _inputFilename1, _inputFilename2, _inputTreename, _inputXMLCurrent, _inputXMLReference, _ldphiVal, _ldrVal, _ldxVal, _ldyVal, _ldzVal, _level, _mgacollection, _mid, _mlevel, _phiVal, _ring, _rotxVal, _rotyVal, _rotzVal, _rVal, _station, _sublevel, _surLength, _surRot, _surWidth, _theFile, _useDetId, _weightBy, _weightById, _weightByIdFile, _weightByIdVector, _xVal, _yVal, _zVal, looper::cfg, dqmiodatasetharvest::ctr, currentMuon, groupFilesInBlocks::fin, triggerObjects_cff::id, referenceMuon, and AlCaHLTBitMon_QueryRunRegistry::string.

Member Function Documentation

◆ analyze()

void MuonGeometryArrange::analyze ( const edm::Event ,
const edm::EventSetup iSetup 
)
overridevirtual

Implements edm::EDAnalyzer.

Definition at line 620 of file MuonGeometryArrange.cc.

620  {
621  if (firstEvent_) {
622  // My stuff
624  inputAlign1 = new MuonAlignment(iSetup, inputMethod1);
627  inputAlign2 = new MuonAlignment(iSetup, inputMethod2);
630  inputAlign2a = new MuonAlignment(iSetup, inputMethod3);
632 
633  inputGeometry1 = static_cast<Alignable*>(inputAlign1->getAlignableMuon());
634  inputGeometry2 = static_cast<Alignable*>(inputAlign2->getAlignableMuon());
635  auto inputGeometry2Copy2 = inputAlign2a->getAlignableMuon();
636 
637  //setting the levels being used in the geometry comparator
638  edm::LogInfo("MuonGeometryArrange") << "levels: " << _levelStrings.size();
639  for (const auto& level : _levelStrings) {
640  theLevels.push_back(inputGeometry2Copy2->objectIdProvider().stringToId(level));
641  edm::LogInfo("MuonGeometryArrange") << "level: " << level;
642  }
643 
644  //compare the goemetries
645  compare(inputGeometry1, inputGeometry2, inputGeometry2Copy2);
646 
647  //write out ntuple
648  //might be better to do within output module
649  _theFile->cd();
650  _alignTree->Write();
651  endHist();
652  // _theFile->Close();
653 
654  firstEvent_ = false;
655  }
656 }

References _alignTree, _inputXMLCurrent, _inputXMLReference, _levelStrings, _theFile, compare(), endHist(), MuonAlignment::fillGapsInSurvey(), firstEvent_, MuonAlignment::getAlignableMuon(), inputAlign1, inputAlign2, inputAlign2a, inputGeometry1, inputGeometry2, personalPlayback::level, and theLevels.

◆ beginJob()

void MuonGeometryArrange::beginJob ( void  )
overridevirtual

Read from DB and print survey info.

Reimplemented from edm::EDAnalyzer.

Definition at line 615 of file MuonGeometryArrange.cc.

615 { firstEvent_ = true; }

References firstEvent_.

◆ checkChosen()

bool MuonGeometryArrange::checkChosen ( Alignable ali)
private

Definition at line 1111 of file MuonGeometryArrange.cc.

1111  {
1112  // Check whether the item passed satisfies the criteria given.
1113  if (ali == nullptr)
1114  return false; // elementary sanity
1115  // Is this in the CSC section? If not, bail. Later may extend.
1116  if (ali->geomDetId().det() != DetId::Muon || ali->geomDetId().subdetId() != MuonSubdetId::CSC)
1117  return false;
1118  // If it is a CSC alignable, then check that the station, etc are
1119  // those requested.
1120  // One might think of aligning more than a single ring at a time,
1121  // by using a vector of ring numbers. I don't see the sense in
1122  // trying to align more than one station at a time for comparison.
1123  CSCDetId cscId(ali->geomDetId());
1124 #ifdef jnbdebug
1125  std::cout << "JNB " << ali->id() << " " << cscId.endcap() << " " << cscId.station() << " " << cscId.ring() << " "
1126  << cscId.chamber() << " " << _endcap << " " << _station << " " << _ring << "\n"
1127  << std::flush;
1128 #endif
1129  if (cscId.endcap() == _endcap && cscId.station() == _station && cscId.ring() == _ring) {
1130  return true;
1131  }
1132  return false;
1133 }

References _endcap, _ring, _station, gather_cfg::cout, MuonSubdetId::CSC, DetId::det(), Alignable::geomDetId(), Alignable::id(), DetId::Muon, and DetId::subdetId().

Referenced by isMother(), and passChosen().

◆ compare()

void MuonGeometryArrange::compare ( Alignable refAli,
Alignable curAli,
Alignable curAliCopy2 
)
private

Definition at line 659 of file MuonGeometryArrange.cc.

659  {
660  // First sanity
661  if (refAli == nullptr) {
662  return;
663  }
664  if (curAli == nullptr) {
665  return;
666  }
667 
668  const auto& refComp = refAli->components();
669  const auto& curComp = curAli->components();
670  const auto& curComp2 = curAliCopy2->components();
671  compareGeometries(refAli, curAli, curAliCopy2);
672 
673  int nComp = refComp.size();
674  for (int i = 0; i < nComp; i++) {
675  compare(refComp[i], curComp[i], curComp2[i]);
676  }
677  return;
678 }

References compareGeometries(), Alignable::components(), and mps_fire::i.

Referenced by analyze().

◆ compareGeometries()

void MuonGeometryArrange::compareGeometries ( Alignable refAli,
Alignable curAli,
Alignable curAliCopy2 
)
private

Definition at line 681 of file MuonGeometryArrange.cc.

681  {
682  // First sanity
683  if (refAli == nullptr) {
684  return;
685  }
686  if (curAli == nullptr) {
687  return;
688  }
689  // Is this the Ring we want to align? If so it will contain the
690  // chambers specified in the configuration file
691  if (!isMother(refAli))
692  return; // Not the desired alignable object
693  // But... There are granddaughters involved--and I don't want to monkey with
694  // the layers of the chambers. So, if the mother of this is also an approved
695  // mother, bail.
696  if (isMother(refAli->mother()))
697  return;
698  const auto& refComp = refAli->components();
699  const auto& curComp = curCopy->components();
700  if (refComp.size() != curComp.size()) {
701  return;
702  }
703  // GlobalVectors is a vector of GlobalVector which is a 3D vector
704  align::GlobalVectors originalVectors;
705  align::GlobalVectors currentVectors;
706  align::GlobalVectors originalRelativeVectors;
707  align::GlobalVectors currentRelativeVectors;
708 
709  int nComp = refComp.size();
710  int nUsed = 0;
711  // Use the total displacements here:
712  CLHEP::Hep3Vector TotalX, TotalL;
713  TotalX.set(0., 0., 0.);
714  TotalL.set(0., 0., 0.);
715  // CLHEP::Hep3Vector* Rsubtotal, Wsubtotal, DRsubtotal, DWsubtotal;
716  std::vector<CLHEP::Hep3Vector> Positions;
717  std::vector<CLHEP::Hep3Vector> DelPositions;
718 
719  double xrcenter = 0.;
720  double yrcenter = 0.;
721  double zrcenter = 0.;
722  double xccenter = 0.;
723  double yccenter = 0.;
724  double zccenter = 0.;
725 
726  bool useIt;
727  // Create the "center" for the reference alignment chambers, and
728  // load a vector of their centers
729  for (int ich = 0; ich < nComp; ich++) {
730  useIt = true;
731  if (_weightById) {
732  if (!align::readModuleList(curComp[ich]->id(), curComp[ich]->id(), _weightByIdVector))
733  useIt = false;
734  }
735  if (!useIt)
736  continue;
737  align::GlobalVectors curVs;
739  align::GlobalVector pointsCM = align::centerOfMass(curVs);
740  originalVectors.push_back(pointsCM);
741  nUsed++;
742  xrcenter += pointsCM.x();
743  yrcenter += pointsCM.y();
744  zrcenter += pointsCM.z();
745  }
746  xrcenter = xrcenter / nUsed;
747  yrcenter = yrcenter / nUsed;
748  zrcenter = zrcenter / nUsed;
749 
750  // Create the "center" for the current alignment chambers, and
751  // load a vector of their centers
752  for (int ich = 0; ich < nComp; ich++) {
753  useIt = true;
754  if (_weightById) {
755  if (!align::readModuleList(curComp[ich]->id(), curComp[ich]->id(), _weightByIdVector))
756  useIt = false;
757  }
758  if (!useIt)
759  continue;
760  align::GlobalVectors curVs;
762  align::GlobalVector pointsCM = align::centerOfMass(curVs);
763  currentVectors.push_back(pointsCM);
764 
765  xccenter += pointsCM.x();
766  yccenter += pointsCM.y();
767  zccenter += pointsCM.z();
768  }
769  xccenter = xccenter / nUsed;
770  yccenter = yccenter / nUsed;
771  zccenter = zccenter / nUsed;
772 
773  // OK, now load the <very approximate> vectors from the ring "centers"
774  align::GlobalVector CCur(xccenter, yccenter, zccenter);
775  align::GlobalVector CRef(xrcenter, yrcenter, zrcenter);
776  int nCompR = currentVectors.size();
777  for (int ich = 0; ich < nCompR; ich++) {
778  originalRelativeVectors.push_back(originalVectors[ich] - CRef);
779  currentRelativeVectors.push_back(currentVectors[ich] - CCur);
780  }
781 
782  // All right. Now let the hacking begin.
783  // First out of the gate let's try using the raw values and see what
784  // diffRot does for us.
785 
786  align::RotationType rtype3 = align::diffRot(currentRelativeVectors, originalRelativeVectors);
787 
789  angles = align::toAngles(rtype3);
790 
791  for (int ich = 0; ich < nComp; ich++) {
792  if (_weightById) {
793  if (!align::readModuleList(curComp[ich]->id(), curComp[ich]->id(), _weightByIdVector))
794  continue;
795  }
796  CLHEP::Hep3Vector Rtotal, Wtotal;
797  Rtotal.set(0., 0., 0.);
798  Wtotal.set(0., 0., 0.);
799  for (int i = 0; i < 100; i++) {
801  align::diffAlignables(refComp[ich], curComp[ich], _weightBy, _weightById, _weightByIdVector);
802  CLHEP::Hep3Vector dR(diff[0], diff[1], diff[2]);
803  Rtotal += dR;
804  CLHEP::Hep3Vector dW(diff[3], diff[4], diff[5]);
805  CLHEP::HepRotation rot(Wtotal.unit(), Wtotal.mag());
806  CLHEP::HepRotation drot(dW.unit(), dW.mag());
807  rot *= drot;
808  Wtotal.set(rot.axis().x() * rot.delta(), rot.axis().y() * rot.delta(), rot.axis().z() * rot.delta());
809  align::moveAlignable(curComp[ich], diff);
810  float tolerance = 1e-7;
812  align::diffAlignables(refComp[ich], curComp[ich], _weightBy, _weightById, _weightByIdVector);
813  align::GlobalVector checkR(check[0], check[1], check[2]);
814  align::GlobalVector checkW(check[3], check[4], check[5]);
815  DetId detid(refComp[ich]->id());
816  if ((checkR.mag() > tolerance) || (checkW.mag() > tolerance)) {
817  // edm::LogInfo("CompareGeoms") << "Tolerance Exceeded!(alObjId: "
818  // << refAli->alignableObjectId()
819  // << ", rawId: " << refComp[ich]->geomDetId().rawId()
820  // << ", subdetId: "<< detid.subdetId() << "): " << diff;
821  } else {
822  TotalX += Rtotal;
823  break;
824  } // end of else
825  } // end of for on int i
826  } // end of for on ich
827 
828  // At this point we should have a total displacement and total L
829  TotalX = TotalX / nUsed;
830 
831  // Now start again!
832  AlgebraicVector change(6);
833  change(1) = TotalX.x();
834  change(2) = TotalX.y();
835  change(3) = TotalX.z();
836 
837  change(4) = angles[0];
838  change(5) = angles[1];
839  change(6) = angles[2];
840  align::moveAlignable(curAli, change); // move as a chunk
841 
842  // Now get the components again. They should be in new locations
843  const auto& curComp2 = curAli->components();
844 
845  for (int ich = 0; ich < nComp; ich++) {
846  CLHEP::Hep3Vector Rtotal, Wtotal;
847  Rtotal.set(0., 0., 0.);
848  Wtotal.set(0., 0., 0.);
849  if (_weightById) {
850  if (!align::readModuleList(curComp[ich]->id(), curComp[ich]->id(), _weightByIdVector))
851  continue;
852  }
853 
854  for (int i = 0; i < 100; i++) {
856  align::diffAlignables(refComp[ich], curComp2[ich], _weightBy, _weightById, _weightByIdVector);
857  CLHEP::Hep3Vector dR(diff[0], diff[1], diff[2]);
858  Rtotal += dR;
859  CLHEP::Hep3Vector dW(diff[3], diff[4], diff[5]);
860  CLHEP::HepRotation rot(Wtotal.unit(), Wtotal.mag());
861  CLHEP::HepRotation drot(dW.unit(), dW.mag());
862  rot *= drot;
863  Wtotal.set(rot.axis().x() * rot.delta(), rot.axis().y() * rot.delta(), rot.axis().z() * rot.delta());
864  align::moveAlignable(curComp2[ich], diff);
865  float tolerance = 1e-7;
867  align::diffAlignables(refComp[ich], curComp2[ich], _weightBy, _weightById, _weightByIdVector);
868  align::GlobalVector checkR(check[0], check[1], check[2]);
869  align::GlobalVector checkW(check[3], check[4], check[5]);
870  if ((checkR.mag() > tolerance) || (checkW.mag() > tolerance)) {
871  } else {
872  break;
873  }
874  } // end of for on int i
875  AlgebraicVector TRtot(6);
876  TRtot(1) = Rtotal.x();
877  TRtot(2) = Rtotal.y();
878  TRtot(3) = Rtotal.z();
879  TRtot(4) = Wtotal.x();
880  TRtot(5) = Wtotal.y();
881  TRtot(6) = Wtotal.z();
882  fillTree(refComp[ich], TRtot);
883  } // end of for on ich
884 }

References _weightBy, _weightById, _weightByIdVector, particleFlowDisplacedVertex_cfi::angles, align::centerOfMass(), RPCNoise_example::check, Alignable::components(), align::createPoints(), change_name::diff, align::diffAlignables(), align::diffRot(), HGC3DClusterGenMatchSelector_cfi::dR, MillePedeFileConverter_cfg::e, fillTree(), mps_fire::i, isMother(), PV3DBase< T, PVType, FrameType >::mag(), Alignable::mother(), align::moveAlignable(), align::readModuleList(), makeMuonMisalignmentScenario::rot, align::toAngles(), tolerance, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by compare().

◆ createROOTGeometry()

void MuonGeometryArrange::createROOTGeometry ( const edm::EventSetup iSetup)
private

Definition at line 618 of file MuonGeometryArrange.cc.

618 {}

◆ endHist()

void MuonGeometryArrange::endHist ( )
private

Definition at line 148 of file MuonGeometryArrange.cc.

148  {
149  // Unpack the list and create ntuples here.
150 
151  int size = _mgacollection.size();
152  if (size <= 0)
153  return; // nothing to do here.
154  std::vector<float> xp(size + 1);
155  std::vector<float> yp(size + 1);
156  int i;
157  float minV, maxV;
158  int minI, maxI;
159 
160  minV = 99999999.;
161  maxV = -minV;
162  minI = 9999999;
163  maxI = -minI;
164  TGraph* grx = nullptr;
165  TH2F* dxh = nullptr;
166 
167  // for position plots:
168  for (i = 0; i < size; i++) {
169  if (_mgacollection[i].phipos < minI)
170  minI = _mgacollection[i].phipos;
171  if (_mgacollection[i].phipos > maxI)
172  maxI = _mgacollection[i].phipos;
173  xp[i] = _mgacollection[i].phipos;
174  }
175  if (minI >= maxI)
176  return; // can't do anything?
177  xp[size] = xp[size - 1] + 1; // wraparound point
178 
179  if (1 < minI)
180  minI = 1;
181  if (size > maxI)
182  maxI = size;
183  maxI++; // allow for wraparound to show neighbors
184  int sizeI = maxI + 1 - minI;
185  float smi = minI - 1;
186  float sma = maxI + 1;
187 
188  // Dx plot
189 
190  for (i = 0; i < size; i++) {
191  if (_mgacollection[i].ldx < minV)
192  minV = _mgacollection[i].ldx;
193  if (_mgacollection[i].ldx > maxV)
194  maxV = _mgacollection[i].ldx;
195  yp[i] = _mgacollection[i].ldx;
196  }
197  yp[size] = yp[0]; // wraparound point
198 
199  makeGraph(sizeI,
200  smi,
201  sma,
202  minV,
203  maxV,
204  dxh,
205  grx,
206  "delX_vs_position",
207  "Local #delta X vs position",
208  "GdelX_vs_position",
209  "#delta x in cm",
210  xp.data(),
211  yp.data(),
212  size);
213  // Dy plot
214  minV = 99999999.;
215  maxV = -minV;
216  for (i = 0; i < size; i++) {
217  if (_mgacollection[i].ldy < minV)
218  minV = _mgacollection[i].ldy;
219  if (_mgacollection[i].ldy > maxV)
220  maxV = _mgacollection[i].ldy;
221  yp[i] = _mgacollection[i].ldy;
222  }
223  yp[size] = yp[0]; // wraparound point
224 
225  makeGraph(sizeI,
226  smi,
227  sma,
228  minV,
229  maxV,
230  dxh,
231  grx,
232  "delY_vs_position",
233  "Local #delta Y vs position",
234  "GdelY_vs_position",
235  "#delta y in cm",
236  xp.data(),
237  yp.data(),
238  size);
239 
240  // Dz plot
241  minV = 99999999.;
242  maxV = -minV;
243  for (i = 0; i < size; i++) {
244  if (_mgacollection[i].dz < minV)
245  minV = _mgacollection[i].dz;
246  if (_mgacollection[i].dz > maxV)
247  maxV = _mgacollection[i].dz;
248  yp[i] = _mgacollection[i].dz;
249  }
250  yp[size] = yp[0]; // wraparound point
251 
252  makeGraph(sizeI,
253  smi,
254  sma,
255  minV,
256  maxV,
257  dxh,
258  grx,
259  "delZ_vs_position",
260  "Local #delta Z vs position",
261  "GdelZ_vs_position",
262  "#delta z in cm",
263  xp.data(),
264  yp.data(),
265  size);
266 
267  // Dphi plot
268  minV = 99999999.;
269  maxV = -minV;
270  for (i = 0; i < size; i++) {
271  if (_mgacollection[i].dphi < minV)
272  minV = _mgacollection[i].dphi;
273  if (_mgacollection[i].dphi > maxV)
274  maxV = _mgacollection[i].dphi;
275  yp[i] = _mgacollection[i].dphi;
276  }
277  yp[size] = yp[0]; // wraparound point
278 
279  makeGraph(sizeI,
280  smi,
281  sma,
282  minV,
283  maxV,
284  dxh,
285  grx,
286  "delphi_vs_position",
287  "#delta #phi vs position",
288  "Gdelphi_vs_position",
289  "#delta #phi in radians",
290  xp.data(),
291  yp.data(),
292  size);
293 
294  // Dr plot
295  minV = 99999999.;
296  maxV = -minV;
297  for (i = 0; i < size; i++) {
298  if (_mgacollection[i].dr < minV)
299  minV = _mgacollection[i].dr;
300  if (_mgacollection[i].dr > maxV)
301  maxV = _mgacollection[i].dr;
302  yp[i] = _mgacollection[i].dr;
303  }
304  yp[size] = yp[0]; // wraparound point
305 
306  makeGraph(sizeI,
307  smi,
308  sma,
309  minV,
310  maxV,
311  dxh,
312  grx,
313  "delR_vs_position",
314  "#delta R vs position",
315  "GdelR_vs_position",
316  "#delta R in cm",
317  xp.data(),
318  yp.data(),
319  size);
320 
321  // Drphi plot
322  minV = 99999999.;
323  maxV = -minV;
324  for (i = 0; i < size; i++) {
325  float ttemp = _mgacollection[i].r * _mgacollection[i].dphi;
326  if (ttemp < minV)
327  minV = ttemp;
328  if (ttemp > maxV)
329  maxV = ttemp;
330  yp[i] = ttemp;
331  }
332  yp[size] = yp[0]; // wraparound point
333 
334  makeGraph(sizeI,
335  smi,
336  sma,
337  minV,
338  maxV,
339  dxh,
340  grx,
341  "delRphi_vs_position",
342  "R #delta #phi vs position",
343  "GdelRphi_vs_position",
344  "R #delta #phi in cm",
345  xp.data(),
346  yp.data(),
347  size);
348 
349  // Dalpha plot
350  minV = 99999999.;
351  maxV = -minV;
352  for (i = 0; i < size; i++) {
353  if (_mgacollection[i].dalpha < minV)
354  minV = _mgacollection[i].dalpha;
355  if (_mgacollection[i].dalpha > maxV)
356  maxV = _mgacollection[i].dalpha;
357  yp[i] = _mgacollection[i].dalpha;
358  }
359  yp[size] = yp[0]; // wraparound point
360 
361  makeGraph(sizeI,
362  smi,
363  sma,
364  minV,
365  maxV,
366  dxh,
367  grx,
368  "delalpha_vs_position",
369  "#delta #alpha vs position",
370  "Gdelalpha_vs_position",
371  "#delta #alpha in rad",
372  xp.data(),
373  yp.data(),
374  size);
375 
376  // Dbeta plot
377  minV = 99999999.;
378  maxV = -minV;
379  for (i = 0; i < size; i++) {
380  if (_mgacollection[i].dbeta < minV)
381  minV = _mgacollection[i].dbeta;
382  if (_mgacollection[i].dbeta > maxV)
383  maxV = _mgacollection[i].dbeta;
384  yp[i] = _mgacollection[i].dbeta;
385  }
386  yp[size] = yp[0]; // wraparound point
387 
388  makeGraph(sizeI,
389  smi,
390  sma,
391  minV,
392  maxV,
393  dxh,
394  grx,
395  "delbeta_vs_position",
396  "#delta #beta vs position",
397  "Gdelbeta_vs_position",
398  "#delta #beta in rad",
399  xp.data(),
400  yp.data(),
401  size);
402 
403  // Dgamma plot
404  minV = 99999999.;
405  maxV = -minV;
406  for (i = 0; i < size; i++) {
407  if (_mgacollection[i].dgamma < minV)
408  minV = _mgacollection[i].dgamma;
409  if (_mgacollection[i].dgamma > maxV)
410  maxV = _mgacollection[i].dgamma;
411  yp[i] = _mgacollection[i].dgamma;
412  }
413  yp[size] = yp[0]; // wraparound point
414 
415  makeGraph(sizeI,
416  smi,
417  sma,
418  minV,
419  maxV,
420  dxh,
421  grx,
422  "delgamma_vs_position",
423  "#delta #gamma vs position",
424  "Gdelgamma_vs_position",
425  "#delta #gamma in rad",
426  xp.data(),
427  yp.data(),
428  size);
429 
430  // Drotx plot
431  minV = 99999999.;
432  maxV = -minV;
433  for (i = 0; i < size; i++) {
434  if (_mgacollection[i].drotx < minV)
435  minV = _mgacollection[i].drotx;
436  if (_mgacollection[i].drotx > maxV)
437  maxV = _mgacollection[i].drotx;
438  yp[i] = _mgacollection[i].drotx;
439  }
440  yp[size] = yp[0]; // wraparound point
441 
442  makeGraph(sizeI,
443  smi,
444  sma,
445  minV,
446  maxV,
447  dxh,
448  grx,
449  "delrotX_vs_position",
450  "#delta rotX vs position",
451  "GdelrotX_vs_position",
452  "#delta rotX in rad",
453  xp.data(),
454  yp.data(),
455  size);
456 
457  // Droty plot
458  minV = 99999999.;
459  maxV = -minV;
460  for (i = 0; i < size; i++) {
461  if (_mgacollection[i].droty < minV)
462  minV = _mgacollection[i].droty;
463  if (_mgacollection[i].droty > maxV)
464  maxV = _mgacollection[i].droty;
465  yp[i] = _mgacollection[i].droty;
466  }
467  yp[size] = yp[0]; // wraparound point
468 
469  makeGraph(sizeI,
470  smi,
471  sma,
472  minV,
473  maxV,
474  dxh,
475  grx,
476  "delrotY_vs_position",
477  "#delta rotY vs position",
478  "GdelrotY_vs_position",
479  "#delta rotY in rad",
480  xp.data(),
481  yp.data(),
482  size);
483 
484  // Drotz plot
485  minV = 99999999.;
486  maxV = -minV;
487  for (i = 0; i < size; i++) {
488  if (_mgacollection[i].drotz < minV)
489  minV = _mgacollection[i].drotz;
490  if (_mgacollection[i].drotz > maxV)
491  maxV = _mgacollection[i].drotz;
492  yp[i] = _mgacollection[i].drotz;
493  }
494  yp[size] = yp[0]; // wraparound point
495 
496  makeGraph(sizeI,
497  smi,
498  sma,
499  minV,
500  maxV,
501  dxh,
502  grx,
503  "delrotZ_vs_position",
504  "#delta rotZ vs position",
505  "GdelrotZ_vs_position",
506  "#delta rotZ in rad",
507  xp.data(),
508  yp.data(),
509  size);
510 
511  // Vector plots
512  // First find the maximum length of sqrt(dx*dx+dy*dy): we'll have to
513  // scale these for visibility
514  maxV = -99999999.;
515  float ttemp, rtemp;
516  float maxR = -9999999.;
517  for (i = 0; i < size; i++) {
520  if (ttemp > maxV)
521  maxV = ttemp;
522  if (rtemp > maxR)
523  maxR = rtemp;
524  }
525 
526  // Don't try to scale rediculously small values
527  float smallestVcm = .001; // 10 microns
528  if (maxV < smallestVcm)
529  maxV = smallestVcm;
530  float scale = 0.;
531  float lside = 1.1 * maxR;
532  if (lside <= 0)
533  lside = 100.;
534  if (maxV > 0) {
535  scale = .09 * lside / maxV;
536  } // units of pad length!
537  char scalename[50];
538  int ret = snprintf(scalename, 50, "#delta #bar{x} length =%f cm", maxV);
539  // If ret<=0 we don't want to print the scale!
540 
541  if (ret > 0) {
542  dxh = new TH2F("vecdrplot", scalename, 80, -lside, lside, 80, -lside, lside);
543  } else {
544  dxh = new TH2F("vecdrplot", "delta #bar{x} Bad scale", 80, -lside, lside, 80, -lside, lside);
545  }
546  dxh->GetXaxis()->SetTitle("x in cm");
547  dxh->GetYaxis()->SetTitle("y in cm");
548  dxh->SetStats(kFALSE);
549  dxh->Draw();
550  TArrow* arrow;
551  for (i = 0; i < size; i++) {
553  // ttemp=ttemp*scale;
554  float nx = _mgacollection[i].x + scale * _mgacollection[i].dx;
555  float ny = _mgacollection[i].y + scale * _mgacollection[i].dy;
556  arrow = new TArrow(_mgacollection[i].x, _mgacollection[i].y, nx, ny); // ttemp*.3*.05, "->");
557  arrow->SetLineWidth(2);
558  arrow->SetArrowSize(ttemp * .2 * .05 / maxV);
559  arrow->SetLineColor(1);
560  arrow->SetLineStyle(1);
561  arrow->Paint();
562  dxh->GetListOfFunctions()->Add(static_cast<TObject*>(arrow));
563  // arrow->Draw();
564  // arrow->Write();
565  }
566  dxh->Write();
567 
568  _theFile->Write();
569  _theFile->Close();
570 }

References _mgacollection, _theFile, flavorHistoryFilter_cfi::dr, PVValHelper::dx, PVValHelper::dy, PVValHelper::dz, mps_fire::i, makeGraph(), findQualityFiles::maxI, findQualityFiles::minI, runTheMatrix::ret, Scenarios_cff::scale, findQualityFiles::size, mathSSE::sqrt(), x, and y.

Referenced by analyze().

◆ fillTree()

void MuonGeometryArrange::fillTree ( Alignable refAli,
const AlgebraicVector diff 
)
private

Definition at line 888 of file MuonGeometryArrange.cc.

888  {
889  _id = refAli->id();
890  _level = refAli->alignableObjectId();
891  //need if ali has no mother
892  if (refAli->mother()) {
893  _mid = refAli->mother()->geomDetId().rawId();
894  _mlevel = refAli->mother()->alignableObjectId();
895  } else {
896  _mid = -1;
897  _mlevel = -1;
898  }
899  DetId detid(_id);
900  _sublevel = detid.subdetId();
901  int ringPhiPos = -99;
902  if (detid.det() == DetId::Muon && detid.subdetId() == MuonSubdetId::CSC) {
903  CSCDetId cscId(refAli->geomDetId());
904  ringPhiPos = cscId.chamber();
905  }
906  _xVal = refAli->globalPosition().x();
907  _yVal = refAli->globalPosition().y();
908  _zVal = refAli->globalPosition().z();
910  _rVal = vec.perp();
911  _phiVal = vec.phi();
912  _etaVal = vec.eta();
914  align::EulerAngles eulerAngles = align::toAngles(rot);
915  _rotxVal = atan2(rot.yz(), rot.zz());
916  float ttt = -rot.xz();
917  if (ttt > 1.)
918  ttt = 1.;
919  if (ttt < -1.)
920  ttt = -1.;
921  _rotyVal = asin(ttt);
922  _rotzVal = atan2(rot.xy(), rot.xx());
923  _alphaVal = eulerAngles[0];
924  _betaVal = eulerAngles[1];
925  _gammaVal = eulerAngles[2];
926  _dxVal = diff[0];
927  _dyVal = diff[1];
928  _dzVal = diff[2];
929  //getting dR and dPhi
932  _drVal = vCur.perp() - vRef.perp();
933  _dphiVal = vCur.phi() - vRef.phi();
934 
935  _dalphaVal = diff[3];
936  _dbetaVal = diff[4];
937  _dgammaVal = diff[5];
938  _drotxVal = -999.;
939  _drotyVal = -999.;
940  _drotzVal = -999.;
941 
942  align::EulerAngles deuler(3);
943  deuler(1) = _dalphaVal;
944  deuler(2) = _dbetaVal;
945  deuler(3) = _dgammaVal;
946  align::RotationType drot = align::toMatrix(deuler);
947  double xx = rot.xx();
948  double xy = rot.xy();
949  double xz = rot.xz();
950  double yx = rot.yx();
951  double yy = rot.yy();
952  double yz = rot.yz();
953  double zx = rot.zx();
954  double zy = rot.zy();
955  double zz = rot.zz();
956  double detrot = (zz * yy - zy * yz) * xx + (-zz * yx + zx * yz) * xy + (zy * yx - zx * yy) * xz;
957  detrot = 1 / detrot;
958  double ixx = (zz * yy - zy * yz) * detrot;
959  double ixy = (-zz * xy + zy * xz) * detrot;
960  double ixz = (yz * xy - yy * xz) * detrot;
961  double iyx = (-zz * yx + zx * yz) * detrot;
962  double iyy = (zz * xx - zx * xz) * detrot;
963  double iyz = (-yz * xx + yx * xz) * detrot;
964  double izx = (zy * yx - zx * yy) * detrot;
965  double izy = (-zy * xx + zx * xy) * detrot;
966  double izz = (yy * xx - yx * xy) * detrot;
967  align::RotationType invrot(ixx, ixy, ixz, iyx, iyy, iyz, izx, izy, izz);
968  align::RotationType prot = rot * drot * invrot;
969  // align::RotationType prot = rot*drot;
970  float protx; //, proty, protz;
971  protx = atan2(prot.yz(), prot.zz());
972  _drotxVal = protx; //_rotxVal-protx; //atan2(drot.yz(), drot.zz());
973  ttt = -prot.xz();
974  if (ttt > 1.)
975  ttt = 1.;
976  if (ttt < -1.)
977  ttt = -1.;
978  _drotyVal = asin(ttt); // -_rotyVal;
979  _drotzVal = atan2(prot.xy(), prot.xx()); // - _rotzVal;
980  // Above does not account for 2Pi wraparounds!
981  // Prior knowledge: these are supposed to be small rotations. Therefore:
982  if (_drotxVal > 3.141592656)
983  _drotxVal = -6.2831853072 + _drotxVal;
984  if (_drotxVal < -3.141592656)
985  _drotxVal = 6.2831853072 + _drotxVal;
986  if (_drotyVal > 3.141592656)
987  _drotyVal = -6.2831853072 + _drotyVal;
988  if (_drotyVal < -3.141592656)
989  _drotyVal = 6.2831853072 + _drotyVal;
990  if (_drotzVal > 3.141592656)
991  _drotzVal = -6.2831853072 + _drotzVal;
992  if (_drotzVal < -3.141592656)
993  _drotzVal = 6.2831853072 + _drotzVal;
994 
995  _ldxVal = -999.;
996  _ldyVal = -999.;
997  _ldxVal = -999.;
998  _ldrVal = -999.;
999  _ldphiVal = -999; // set fake
1000 
1001  // if(refAli->alignableObjectId() == align::AlignableDetUnit){
1003  align::LocalVector pointL = refAli->surface().toLocal(dV);
1004  //align::LocalVector pointL = (refAli->mother())->surface().toLocal(dV);
1005  _ldxVal = pointL.x();
1006  _ldyVal = pointL.y();
1007  _ldzVal = pointL.z();
1008  _ldphiVal = pointL.phi();
1009  _ldrVal = pointL.perp();
1010  // }
1011  //detIdFlag
1012  if (refAli->alignableObjectId() == align::AlignableDetUnit) {
1013  if (_detIdFlag) {
1014  if ((passIdCut(refAli->id())) || (passIdCut(refAli->mother()->id()))) {
1015  _useDetId = 1;
1016  } else {
1017  _useDetId = 0;
1018  }
1019  }
1020  }
1021  // det module dimension
1022  if (refAli->alignableObjectId() == align::AlignableDetUnit) {
1023  if (refAli->mother()->alignableObjectId() != align::AlignableDet) {
1024  _detDim = 1;
1025  } else if (refAli->mother()->alignableObjectId() == align::AlignableDet) {
1026  _detDim = 2;
1027  }
1028  } else
1029  _detDim = 0;
1030 
1031  _surWidth = refAli->surface().width();
1032  _surLength = refAli->surface().length();
1034  _surRot[0] = rt.xx();
1035  _surRot[1] = rt.xy();
1036  _surRot[2] = rt.xz();
1037  _surRot[3] = rt.yx();
1038  _surRot[4] = rt.yy();
1039  _surRot[5] = rt.yz();
1040  _surRot[6] = rt.zx();
1041  _surRot[7] = rt.zy();
1042  _surRot[8] = rt.zz();
1043 
1044  MGACollection holdit;
1045  holdit.id = _id;
1046  holdit.level = _level;
1047  holdit.mid = _mid;
1048  holdit.mlevel = _mlevel;
1049  holdit.sublevel = _sublevel;
1050  holdit.x = _xVal;
1051  holdit.y = _yVal;
1052  holdit.z = _zVal;
1053  holdit.r = _rVal;
1054  holdit.phi = _phiVal;
1055  holdit.eta = _etaVal;
1056  holdit.alpha = _alphaVal;
1057  holdit.beta = _betaVal;
1058  holdit.gamma = _gammaVal;
1059  holdit.dx = _dxVal;
1060  holdit.dy = _dyVal;
1061  holdit.dz = _dzVal;
1062  holdit.dr = _drVal;
1063  holdit.dphi = _dphiVal;
1064  holdit.dalpha = _dalphaVal;
1065  holdit.dbeta = _dbetaVal;
1066  holdit.dgamma = _dgammaVal;
1067  holdit.useDetId = _useDetId;
1068  holdit.detDim = _detDim;
1069  holdit.surW = _surWidth;
1070  holdit.surL = _surLength;
1071  holdit.ldx = _ldxVal;
1072  holdit.ldy = _ldyVal;
1073  holdit.ldz = _ldzVal;
1074  holdit.ldr = _ldrVal;
1075  holdit.ldphi = _ldphiVal;
1076  holdit.rotx = _rotxVal;
1077  holdit.roty = _rotyVal;
1078  holdit.rotz = _rotzVal;
1079  holdit.drotx = _drotxVal;
1080  holdit.droty = _drotyVal;
1081  holdit.drotz = _drotzVal;
1082  for (int i = 0; i < 9; i++) {
1083  holdit.surRot[i] = _surRot[i];
1084  }
1085  holdit.phipos = ringPhiPos;
1086  _mgacollection.push_back(holdit);
1087 
1088  //Fill
1089  _alignTree->Fill();
1090 }

References _alignTree, _alphaVal, _betaVal, _dalphaVal, _dbetaVal, _detDim, _detIdFlag, _dgammaVal, _dphiVal, _drotxVal, _drotyVal, _drotzVal, _drVal, _dxVal, _dyVal, _dzVal, _etaVal, _gammaVal, _id, _ldphiVal, _ldrVal, _ldxVal, _ldyVal, _ldzVal, _level, _mgacollection, _mid, _mlevel, _phiVal, _rotxVal, _rotyVal, _rotzVal, _rVal, _sublevel, _surLength, _surRot, _surWidth, _useDetId, _xVal, _yVal, _zVal, align::AlignableDet, align::AlignableDetUnit, Alignable::alignableObjectId(), MuonGeometryArrange::MGACollection::alpha, MuonGeometryArrange::MGACollection::beta, CSCDetId::chamber(), MuonSubdetId::CSC, MuonGeometryArrange::MGACollection::dalpha, MuonGeometryArrange::MGACollection::dbeta, DetId::det(), MuonGeometryArrange::MGACollection::detDim, MuonGeometryArrange::MGACollection::dgamma, change_name::diff, MuonGeometryArrange::MGACollection::dphi, MuonGeometryArrange::MGACollection::dr, MuonGeometryArrange::MGACollection::drotx, MuonGeometryArrange::MGACollection::droty, MuonGeometryArrange::MGACollection::drotz, MuonGeometryArrange::MGACollection::dx, MuonGeometryArrange::MGACollection::dy, MuonGeometryArrange::MGACollection::dz, PV3DBase< T, PVType, FrameType >::eta(), MuonGeometryArrange::MGACollection::eta, MuonGeometryArrange::MGACollection::gamma, Alignable::geomDetId(), Alignable::globalPosition(), Alignable::globalRotation(), mps_fire::i, MuonGeometryArrange::MGACollection::id, Alignable::id(), ixx, iyy, MuonGeometryArrange::MGACollection::ldphi, MuonGeometryArrange::MGACollection::ldr, MuonGeometryArrange::MGACollection::ldx, MuonGeometryArrange::MGACollection::ldy, MuonGeometryArrange::MGACollection::ldz, AlignableSurface::length(), MuonGeometryArrange::MGACollection::level, MuonGeometryArrange::MGACollection::mid, MuonGeometryArrange::MGACollection::mlevel, Alignable::mother(), DetId::Muon, passIdCut(), PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), MuonGeometryArrange::MGACollection::phi, MuonGeometryArrange::MGACollection::phipos, MuonGeometryArrange::MGACollection::r, DetId::rawId(), makeMuonMisalignmentScenario::rot, MuonGeometryArrange::MGACollection::rotx, MuonGeometryArrange::MGACollection::roty, MuonGeometryArrange::MGACollection::rotz, hcal_runs::rt, DetId::subdetId(), MuonGeometryArrange::MGACollection::sublevel, Alignable::surface(), MuonGeometryArrange::MGACollection::surL, MuonGeometryArrange::MGACollection::surRot, MuonGeometryArrange::MGACollection::surW, align::toAngles(), AlignableSurface::toLocal(), align::toMatrix(), MuonGeometryArrange::MGACollection::useDetId, AlignableSurface::width(), PV3DBase< T, PVType, FrameType >::x(), MuonGeometryArrange::MGACollection::x, geometryCSVtoXML::xx, TkRotation< T >::xx(), geometryCSVtoXML::xy, TkRotation< T >::xy(), geometryCSVtoXML::xz, TkRotation< T >::xz(), PV3DBase< T, PVType, FrameType >::y(), MuonGeometryArrange::MGACollection::y, geometryCSVtoXML::yy, geometryCSVtoXML::yz, TkRotation< T >::yz(), PV3DBase< T, PVType, FrameType >::z(), MuonGeometryArrange::MGACollection::z, geometryCSVtoXML::zz, and TkRotation< T >::zz().

Referenced by compareGeometries(), and core.AutoFillTreeProducer.AutoFillTreeProducer::process().

◆ isMother()

bool MuonGeometryArrange::isMother ( Alignable ali)
private

Definition at line 1093 of file MuonGeometryArrange.cc.

1093  {
1094  // Is this the mother ring?
1095  if (ali == nullptr)
1096  return false; // elementary sanity
1097  const auto& aliComp = ali->components();
1098 
1099  int size = aliComp.size();
1100  if (size <= 0)
1101  return false; // no subcomponents
1102 
1103  for (int i = 0; i < size; i++) {
1104  if (checkChosen(aliComp[i]))
1105  return true; // A ring has CSC chambers
1106  } // as subcomponents
1107  return false; // 1'st layer of subcomponents weren't CSC chambers
1108 }

References checkChosen(), Alignable::components(), mps_fire::i, and findQualityFiles::size.

Referenced by compareGeometries().

◆ makeGraph()

void MuonGeometryArrange::makeGraph ( int  sizeI,
float  smi,
float  sma,
float  minV,
float  maxV,
TH2F *  dxh,
TGraph *  grx,
const char *  name,
const char *  title,
const char *  titleg,
const char *  axis,
const float *  xp,
const float *  yp,
int  numEntries 
)
private

Definition at line 572 of file MuonGeometryArrange.cc.

585  {
586  if (minV >= maxV || smi >= sma || sizeI <= 1 || xp == nullptr || yp == nullptr)
587  return;
588  // out of bounds, bail
589  float diff = maxV - minV;
590  float over = .05 * diff;
591  double ylo = minV - over;
592  double yhi = maxV + over;
593  double dsmi, dsma;
594  dsmi = smi;
595  dsma = sma;
596  dxh = new TH2F(name, title, sizeI + 2, dsmi, dsma, 50, ylo, yhi);
597  dxh->GetXaxis()->SetTitle("Position around ring");
598  dxh->GetYaxis()->SetTitle(axis);
599  dxh->SetStats(kFALSE);
600  dxh->Draw();
601  grx = new TGraph(size, xp, yp);
602  grx->SetName(titleg);
603  grx->SetTitle(title);
604  grx->SetMarkerColor(2);
605  grx->SetMarkerStyle(3);
606  grx->GetXaxis()->SetLimits(dsmi, dsma);
607  grx->GetXaxis()->SetTitle("position number");
608  grx->GetYaxis()->SetLimits(ylo, yhi);
609  grx->GetYaxis()->SetTitle(axis);
610  grx->Draw("A*");
611  grx->Write();
612  return;
613 }

References change_name::diff, Skims_PA_cff::name, findQualityFiles::size, and overlapproblemtsosanalyzer_cfi::title.

Referenced by endHist().

◆ passChosen()

bool MuonGeometryArrange::passChosen ( Alignable ali)
private

Definition at line 1136 of file MuonGeometryArrange.cc.

1136  {
1137  // Check to see if this contains CSC components of the appropriate ring
1138  // Ring will contain N Alignables which represent chambers, each of which
1139  // in turn contains M planes. For our purposes we don't care about the
1140  // planes.
1141  // Hmm. Interesting question: Do I want to try to fit the chamber as
1142  // such, or use the geometry?
1143  // I want to fit the chamber, so I'll try to use its presence as the marker.
1144  // What specifically identifies a chamber as a chamber, and not as a layer?
1145  // The fact that it has layers as sub components, or the fact that it is
1146  // the first item with a non-zero ID breakdown? Pick the latter.
1147  //
1148  if (ali == nullptr)
1149  return false;
1150  if (checkChosen(ali))
1151  return true; // If this is one of the desired
1152  // CSC chambers, accept it
1153  const auto& aliComp = ali->components();
1154 
1155  int size = aliComp.size();
1156  if (size <= 0)
1157  return false; // no subcomponents
1158 
1159  for (int i = 0; i < size; i++) {
1160  if (checkChosen(aliComp[i]))
1161  return true; // A ring has CSC chambers
1162  } // as subcomponents
1163  return false; // 1'st layer of subcomponents weren't CSC chambers
1164 }

References checkChosen(), Alignable::components(), mps_fire::i, and findQualityFiles::size.

◆ passIdCut()

bool MuonGeometryArrange::passIdCut ( uint32_t  id)
private

Definition at line 1166 of file MuonGeometryArrange.cc.

1166  {
1167  bool pass = false;
1168  DetId detid(id);
1169  // if(detid.det()==DetId::Muon && detid.subdetId()== MuonSubdetId::CSC){
1170  // CSCDetId cscId(refAli->geomDetId());
1171  // if(cscId.layer()!=1) return false; // ONLY FIRST LAYER!
1172  // }
1173  int nEntries = _detIdFlagVector.size();
1174 
1175  for (int i = 0; i < nEntries; i++) {
1176  if (_detIdFlagVector[i] == id)
1177  pass = true;
1178  }
1179 
1180  return pass;
1181 }

References _detIdFlagVector, and mps_fire::i.

Referenced by fillTree().

Member Data Documentation

◆ _alignTree

TTree* MuonGeometryArrange::_alignTree
private

Definition at line 155 of file MuonGeometryArrange.h.

Referenced by analyze(), fillTree(), and MuonGeometryArrange().

◆ _alphaVal

float MuonGeometryArrange::_alphaVal
private

Definition at line 162 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _betaVal

float MuonGeometryArrange::_betaVal
private

Definition at line 162 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _commonMuonLevel

align::StructureType MuonGeometryArrange::_commonMuonLevel
private

Definition at line 116 of file MuonGeometryArrange.h.

◆ _dalphaVal

float MuonGeometryArrange::_dalphaVal
private

Definition at line 163 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _dbetaVal

float MuonGeometryArrange::_dbetaVal
private

Definition at line 164 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _detDim

int MuonGeometryArrange::_detDim
private

Definition at line 161 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _detIdFlag

bool MuonGeometryArrange::_detIdFlag
private

Definition at line 106 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _detIdFlagFile

std::string MuonGeometryArrange::_detIdFlagFile
private

Definition at line 107 of file MuonGeometryArrange.h.

Referenced by MuonGeometryArrange().

◆ _detIdFlagVector

std::vector<uint32_t> MuonGeometryArrange::_detIdFlagVector
private

Definition at line 115 of file MuonGeometryArrange.h.

Referenced by MuonGeometryArrange(), and passIdCut().

◆ _dgammaVal

float MuonGeometryArrange::_dgammaVal
private

Definition at line 164 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _dphiVal

float MuonGeometryArrange::_dphiVal
private

Definition at line 163 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _drotxVal

float MuonGeometryArrange::_drotxVal
private

Definition at line 167 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _drotyVal

float MuonGeometryArrange::_drotyVal
private

Definition at line 167 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _drotzVal

float MuonGeometryArrange::_drotzVal
private

Definition at line 167 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _drVal

float MuonGeometryArrange::_drVal
private

Definition at line 163 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _dxVal

float MuonGeometryArrange::_dxVal
private

Definition at line 163 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _dyVal

float MuonGeometryArrange::_dyVal
private

Definition at line 163 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _dzVal

float MuonGeometryArrange::_dzVal
private

Definition at line 163 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _endcap

int MuonGeometryArrange::_endcap
private

Definition at line 111 of file MuonGeometryArrange.h.

Referenced by checkChosen(), and MuonGeometryArrange().

◆ _etaVal

float MuonGeometryArrange::_etaVal
private

Definition at line 162 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _filename

std::string MuonGeometryArrange::_filename
private

Definition at line 122 of file MuonGeometryArrange.h.

Referenced by MuonGeometryArrange().

◆ _gammaVal

float MuonGeometryArrange::_gammaVal
private

Definition at line 162 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _id

int MuonGeometryArrange::_id
private

Definition at line 161 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _inputFilename1

std::string MuonGeometryArrange::_inputFilename1
private

Definition at line 100 of file MuonGeometryArrange.h.

Referenced by MuonGeometryArrange().

◆ _inputFilename2

std::string MuonGeometryArrange::_inputFilename2
private

Definition at line 101 of file MuonGeometryArrange.h.

Referenced by MuonGeometryArrange().

◆ _inputRootFile1

TFile* MuonGeometryArrange::_inputRootFile1
private

Definition at line 156 of file MuonGeometryArrange.h.

◆ _inputRootFile2

TFile* MuonGeometryArrange::_inputRootFile2
private

Definition at line 157 of file MuonGeometryArrange.h.

◆ _inputTree1

TTree* MuonGeometryArrange::_inputTree1
private

Definition at line 158 of file MuonGeometryArrange.h.

◆ _inputTree2

TTree* MuonGeometryArrange::_inputTree2
private

Definition at line 159 of file MuonGeometryArrange.h.

◆ _inputTreename

std::string MuonGeometryArrange::_inputTreename
private

Definition at line 102 of file MuonGeometryArrange.h.

Referenced by MuonGeometryArrange().

◆ _inputXMLCurrent

std::string MuonGeometryArrange::_inputXMLCurrent
private

Definition at line 148 of file MuonGeometryArrange.h.

Referenced by analyze(), and MuonGeometryArrange().

◆ _inputXMLReference

std::string MuonGeometryArrange::_inputXMLReference
private

Definition at line 149 of file MuonGeometryArrange.h.

Referenced by analyze(), and MuonGeometryArrange().

◆ _ldphiVal

float MuonGeometryArrange::_ldphiVal
private

Definition at line 165 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _ldrVal

float MuonGeometryArrange::_ldrVal
private

Definition at line 165 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _ldxVal

float MuonGeometryArrange::_ldxVal
private

Definition at line 164 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _ldyVal

float MuonGeometryArrange::_ldyVal
private

Definition at line 164 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _ldzVal

float MuonGeometryArrange::_ldzVal
private

Definition at line 164 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _level

int MuonGeometryArrange::_level
private

Definition at line 161 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _levelStrings

const std::vector<std::string> MuonGeometryArrange::_levelStrings
private

Definition at line 99 of file MuonGeometryArrange.h.

Referenced by analyze().

◆ _mgacollection

std::vector<MGACollection> MuonGeometryArrange::_mgacollection
private

Definition at line 146 of file MuonGeometryArrange.h.

Referenced by endHist(), fillTree(), and MuonGeometryArrange().

◆ _mid

int MuonGeometryArrange::_mid
private

Definition at line 161 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _mlevel

int MuonGeometryArrange::_mlevel
private

Definition at line 161 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _MuonCommonCM

align::PositionType MuonGeometryArrange::_MuonCommonCM
private

Definition at line 119 of file MuonGeometryArrange.h.

◆ _MuonCommonR

align::EulerAngles MuonGeometryArrange::_MuonCommonR
private

Definition at line 118 of file MuonGeometryArrange.h.

◆ _MuonCommonT

align::GlobalVector MuonGeometryArrange::_MuonCommonT
private

Definition at line 117 of file MuonGeometryArrange.h.

◆ _phiVal

float MuonGeometryArrange::_phiVal
private

Definition at line 162 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _ring

int MuonGeometryArrange::_ring
private

Definition at line 113 of file MuonGeometryArrange.h.

Referenced by checkChosen(), and MuonGeometryArrange().

◆ _rotxVal

float MuonGeometryArrange::_rotxVal
private

Definition at line 166 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _rotyVal

float MuonGeometryArrange::_rotyVal
private

Definition at line 166 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _rotzVal

float MuonGeometryArrange::_rotzVal
private

Definition at line 166 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _rVal

float MuonGeometryArrange::_rVal
private

Definition at line 162 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _setCommonMuonSystem

std::string MuonGeometryArrange::_setCommonMuonSystem
private

Definition at line 105 of file MuonGeometryArrange.h.

◆ _station

int MuonGeometryArrange::_station
private

Definition at line 112 of file MuonGeometryArrange.h.

Referenced by checkChosen(), and MuonGeometryArrange().

◆ _sublevel

int MuonGeometryArrange::_sublevel
private

Definition at line 161 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _surLength

float MuonGeometryArrange::_surLength
private

Definition at line 168 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _surRot

double MuonGeometryArrange::_surRot[9]
private

Definition at line 169 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _surWidth

float MuonGeometryArrange::_surWidth
private

Definition at line 168 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _theFile

TFile* MuonGeometryArrange::_theFile
private

Definition at line 154 of file MuonGeometryArrange.h.

Referenced by analyze(), endHist(), and MuonGeometryArrange().

◆ _useDetId

int MuonGeometryArrange::_useDetId
private

Definition at line 161 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _weightBy

std::string MuonGeometryArrange::_weightBy
private

Definition at line 104 of file MuonGeometryArrange.h.

Referenced by compareGeometries(), and MuonGeometryArrange().

◆ _weightById

bool MuonGeometryArrange::_weightById
private

Definition at line 108 of file MuonGeometryArrange.h.

Referenced by compareGeometries(), and MuonGeometryArrange().

◆ _weightByIdFile

std::string MuonGeometryArrange::_weightByIdFile
private

Definition at line 109 of file MuonGeometryArrange.h.

Referenced by MuonGeometryArrange().

◆ _weightByIdVector

std::vector<unsigned int> MuonGeometryArrange::_weightByIdVector
private

Definition at line 110 of file MuonGeometryArrange.h.

Referenced by compareGeometries(), and MuonGeometryArrange().

◆ _writeToDB

bool MuonGeometryArrange::_writeToDB
private

Definition at line 103 of file MuonGeometryArrange.h.

◆ _xVal

float MuonGeometryArrange::_xVal
private

Definition at line 162 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _yVal

float MuonGeometryArrange::_yVal
private

Definition at line 162 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ _zVal

float MuonGeometryArrange::_zVal
private

Definition at line 162 of file MuonGeometryArrange.h.

Referenced by fillTree(), and MuonGeometryArrange().

◆ currentMuon

AlignableMuon* MuonGeometryArrange::currentMuon
private

Definition at line 90 of file MuonGeometryArrange.h.

Referenced by MuonGeometryArrange().

◆ dummyMuon

AlignableMuon* MuonGeometryArrange::dummyMuon
private

Definition at line 89 of file MuonGeometryArrange.h.

◆ firstEvent_

bool MuonGeometryArrange::firstEvent_
private

Definition at line 171 of file MuonGeometryArrange.h.

Referenced by analyze(), and beginJob().

◆ inputAlign1

MuonAlignment* MuonGeometryArrange::inputAlign1
private

Definition at line 150 of file MuonGeometryArrange.h.

Referenced by analyze().

◆ inputAlign2

MuonAlignment* MuonGeometryArrange::inputAlign2
private

Definition at line 151 of file MuonGeometryArrange.h.

Referenced by analyze().

◆ inputAlign2a

MuonAlignment* MuonGeometryArrange::inputAlign2a
private

Definition at line 152 of file MuonGeometryArrange.h.

Referenced by analyze().

◆ inputGeometry1

Alignable* MuonGeometryArrange::inputGeometry1
private

Definition at line 91 of file MuonGeometryArrange.h.

Referenced by analyze().

◆ inputGeometry2

Alignable* MuonGeometryArrange::inputGeometry2
private

Definition at line 92 of file MuonGeometryArrange.h.

Referenced by analyze().

◆ m_params

edm::ParameterSet MuonGeometryArrange::m_params
private

Definition at line 54 of file MuonGeometryArrange.h.

◆ referenceMuon

AlignableMuon* MuonGeometryArrange::referenceMuon
private

Definition at line 88 of file MuonGeometryArrange.h.

Referenced by MuonGeometryArrange().

◆ theLevels

std::vector<align::StructureType> MuonGeometryArrange::theLevels
private

Definition at line 55 of file MuonGeometryArrange.h.

Referenced by analyze().

◆ theSurveyErrors

const SurveyErrors* MuonGeometryArrange::theSurveyErrors
private

Definition at line 96 of file MuonGeometryArrange.h.

◆ theSurveyIndex

unsigned int MuonGeometryArrange::theSurveyIndex
private

Definition at line 94 of file MuonGeometryArrange.h.

◆ theSurveyValues

const Alignments* MuonGeometryArrange::theSurveyValues
private

Definition at line 95 of file MuonGeometryArrange.h.

Vector3DBase< Scalar, GlobalTag >
MuonGeometryArrange::_dzVal
float _dzVal
Definition: MuonGeometryArrange.h:163
personalPlayback.level
level
Definition: personalPlayback.py:22
runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:355
align::toAngles
EulerAngles toAngles(const RotationType &)
Convert rotation matrix to angles about x-, y-, z-axes (frame rotation).
Definition: Utilities.cc:8
change_name.diff
diff
Definition: change_name.py:13
TkRotation< Scalar >
DDAxes::y
MuonSubdetId::CSC
static constexpr int CSC
Definition: MuonSubdetId.h:12
mps_fire.i
i
Definition: mps_fire.py:355
geometryCSVtoXML.zz
zz
Definition: geometryCSVtoXML.py:19
MuonGeometryArrange::_useDetId
int _useDetId
Definition: MuonGeometryArrange.h:161
MuonGeometryArrange::_inputTreename
std::string _inputTreename
Definition: MuonGeometryArrange.h:102
geometryCSVtoXML.yz
yz
Definition: geometryCSVtoXML.py:19
MuonGeometryArrange::compareGeometries
void compareGeometries(Alignable *refAli, Alignable *curAli, Alignable *curAliCopy2)
Definition: MuonGeometryArrange.cc:681
MuonGeometryArrange::inputAlign2
MuonAlignment * inputAlign2
Definition: MuonGeometryArrange.h:151
MuonGeometryArrange::_weightByIdVector
std::vector< unsigned int > _weightByIdVector
Definition: MuonGeometryArrange.h:110
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
MuonGeometryArrange::_ldxVal
float _ldxVal
Definition: MuonGeometryArrange.h:164
MuonGeometryArrange::_inputXMLReference
std::string _inputXMLReference
Definition: MuonGeometryArrange.h:149
DetId::det
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
gather_cfg.cout
cout
Definition: gather_cfg.py:144
hcal_runs.rt
rt
Definition: hcal_runs.py:76
MuonGeometryArrange::_filename
std::string _filename
Definition: MuonGeometryArrange.h:122
edm::LogInfo
Definition: MessageLogger.h:254
align::moveAlignable
void moveAlignable(Alignable *ali, AlgebraicVector diff)
Moves the alignable by the AlgebraicVector.
Definition: AlignTools.cc:84
align::readModuleList
bool readModuleList(unsigned int, unsigned int, const std::vector< unsigned int > &)
Definition: AlignTools.cc:152
MuonGeometryArrange::_writeToDB
bool _writeToDB
Definition: MuonGeometryArrange.h:103
MuonGeometryArrange::_surRot
double _surRot[9]
Definition: MuonGeometryArrange.h:169
MuonAlignmentInputXML
Definition: MuonAlignmentInputXML.h:33
MuonGeometryArrange::_theFile
TFile * _theFile
Definition: MuonGeometryArrange.h:154
findQualityFiles.maxI
int maxI
Definition: findQualityFiles.py:182
DDAxes::x
AlignableSurface::toLocal
align::RotationType toLocal(const align::RotationType &) const
Return in local frame a rotation given in global frame.
Definition: AlignableSurface.cc:35
MuonGeometryArrange::_rVal
float _rVal
Definition: MuonGeometryArrange.h:162
AlignableSurface::length
align::Scalar length() const
Definition: AlignableSurface.h:32
iyy
int iyy[18][41][3]
Definition: EcalDAQHandler.cc:317
MuonGeometryArrange::_zVal
float _zVal
Definition: MuonGeometryArrange.h:162
MuonGeometryArrange::checkChosen
bool checkChosen(Alignable *ali)
Definition: MuonGeometryArrange.cc:1111
MuonGeometryArrange::_xVal
float _xVal
Definition: MuonGeometryArrange.h:162
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
MuonGeometryArrange::_betaVal
float _betaVal
Definition: MuonGeometryArrange.h:162
MuonGeometryArrange::_surWidth
float _surWidth
Definition: MuonGeometryArrange.h:168
DetId
Definition: DetId.h:17
MuonAlignment
Definition: MuonAlignment.h:20
MuonGeometryArrange::_rotxVal
float _rotxVal
Definition: MuonGeometryArrange.h:166
MuonGeometryArrange::_drotxVal
float _drotxVal
Definition: MuonGeometryArrange.h:167
MuonGeometryArrange::passIdCut
bool passIdCut(uint32_t)
Definition: MuonGeometryArrange.cc:1166
RPCNoise_example.check
check
Definition: RPCNoise_example.py:71
MuonGeometryArrange::_mlevel
int _mlevel
Definition: MuonGeometryArrange.h:161
MuonGeometryArrange::inputAlign1
MuonAlignment * inputAlign1
Definition: MuonGeometryArrange.h:150
MuonGeometryArrange::inputAlign2a
MuonAlignment * inputAlign2a
Definition: MuonGeometryArrange.h:152
AlgebraicVector
CLHEP::HepVector AlgebraicVector
Definition: AlgebraicObjects.h:13
align::createPoints
void createPoints(GlobalVectors *Vs, Alignable *ali, const std::string &weightBy, bool weightById, const std::vector< unsigned int > &weightByIdVector)
Definition: AlignTools.cc:96
groupFilesInBlocks.fin
fin
Definition: groupFilesInBlocks.py:94
MuonAlignment::fillGapsInSurvey
void fillGapsInSurvey(double shiftErr, double angleErr)
Definition: MuonAlignment.cc:175
Alignable::alignableObjectId
virtual StructureType alignableObjectId() const =0
Return the alignable type identifier.
TkRotation::xz
T xz() const
Definition: extTkRotation.h:253
MuonGeometryArrange::_dxVal
float _dxVal
Definition: MuonGeometryArrange.h:163
MuonGeometryArrange::_dyVal
float _dyVal
Definition: MuonGeometryArrange.h:163
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
MuonGeometryArrange::_inputFilename2
std::string _inputFilename2
Definition: MuonGeometryArrange.h:101
align::centerOfMass
GlobalVector centerOfMass(const GlobalVectors &theVs)
Find the CM of a set of points.
Definition: Utilities.cc:174
MuonGeometryArrange::_dphiVal
float _dphiVal
Definition: MuonGeometryArrange.h:163
Alignable::surface
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
Definition: Alignable.h:132
MuonGeometryArrange::_surLength
float _surLength
Definition: MuonGeometryArrange.h:168
geometryCSVtoXML.xy
xy
Definition: geometryCSVtoXML.py:19
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
MuonGeometryArrange::_ldphiVal
float _ldphiVal
Definition: MuonGeometryArrange.h:165
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
MuonGeometryArrange::_detIdFlagFile
std::string _detIdFlagFile
Definition: MuonGeometryArrange.h:107
MuonGeometryArrange::inputGeometry2
Alignable * inputGeometry2
Definition: MuonGeometryArrange.h:92
Scenarios_cff.scale
scale
Definition: Scenarios_cff.py:2186
align::AlignableDetUnit
Definition: StructureType.h:19
TkRotation::xx
T xx() const
Definition: extTkRotation.h:251
geometryCSVtoXML.yy
yy
Definition: geometryCSVtoXML.py:19
align::invalid
Definition: StructureType.h:18
dqmiodatasetharvest.ctr
ctr
Definition: dqmiodatasetharvest.py:191
findQualityFiles.minI
int minI
Definition: findQualityFiles.py:181
MuonGeometryArrange::_ring
int _ring
Definition: MuonGeometryArrange.h:113
MuonGeometryArrange::_weightByIdFile
std::string _weightByIdFile
Definition: MuonGeometryArrange.h:109
MuonGeometryArrange::_drotzVal
float _drotzVal
Definition: MuonGeometryArrange.h:167
Alignable::id
align::ID id() const
Return the ID of Alignable, i.e. DetId of 'first' component GeomDet(Unit).
Definition: Alignable.h:180
geometryCSVtoXML.xz
xz
Definition: geometryCSVtoXML.py:19
CSCDetId
Definition: CSCDetId.h:26
MuonGeometryArrange::_rotyVal
float _rotyVal
Definition: MuonGeometryArrange.h:166
MuonGeometryArrange::_inputXMLCurrent
std::string _inputXMLCurrent
Definition: MuonGeometryArrange.h:148
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
MuonGeometryArrange::inputGeometry1
Alignable * inputGeometry1
Definition: MuonGeometryArrange.h:91
MuonGeometryArrange::isMother
bool isMother(Alignable *ali)
Definition: MuonGeometryArrange.cc:1093
MuonGeometryArrange::theSurveyIndex
unsigned int theSurveyIndex
Definition: MuonGeometryArrange.h:94
tolerance
const double tolerance
Definition: HGCalGeomParameters.cc:27
MuonGeometryArrange::_gammaVal
float _gammaVal
Definition: MuonGeometryArrange.h:162
Alignable::geomDetId
const DetId & geomDetId() const
Definition: Alignable.h:177
MuonGeometryArrange::_level
int _level
Definition: MuonGeometryArrange.h:161
TkRotation::xy
T xy() const
Definition: extTkRotation.h:252
MuonGeometryArrange::_dgammaVal
float _dgammaVal
Definition: MuonGeometryArrange.h:164
MuonGeometryArrange::_phiVal
float _phiVal
Definition: MuonGeometryArrange.h:162
PVValHelper::dy
Definition: PVValidationHelpers.h:49
CSCDetId::chamber
int chamber() const
Definition: CSCDetId.h:62
TkRotation::zz
T zz() const
Definition: extTkRotation.h:259
align::GlobalVectors
std::vector< GlobalVector > GlobalVectors
Definition: Utilities.h:28
align::EulerAngles
AlgebraicVector EulerAngles
Definition: Definitions.h:34
align::diffRot
RotationType diffRot(const GlobalVectors &current, const GlobalVectors &nominal)
Definition: Utilities.cc:68
MuonGeometryArrange::_detDim
int _detDim
Definition: MuonGeometryArrange.h:161
MuonGeometryArrange::_endcap
int _endcap
Definition: MuonGeometryArrange.h:111
MuonGeometryArrange::_dbetaVal
float _dbetaVal
Definition: MuonGeometryArrange.h:164
looper.cfg
cfg
Definition: looper.py:297
overlapproblemtsosanalyzer_cfi.title
title
Definition: overlapproblemtsosanalyzer_cfi.py:7
MuonGeometryArrange::_etaVal
float _etaVal
Definition: MuonGeometryArrange.h:162
MuonGeometryArrange::_weightBy
std::string _weightBy
Definition: MuonGeometryArrange.h:104
MuonGeometryArrange::_drVal
float _drVal
Definition: MuonGeometryArrange.h:163
TkRotation::yz
T yz() const
Definition: extTkRotation.h:256
align::AlignableDet
Definition: StructureType.h:20
MuonGeometryArrange::makeGraph
void makeGraph(int sizeI, float smi, float sma, float minV, float maxV, TH2F *dxh, TGraph *grx, const char *name, const char *title, const char *titleg, const char *axis, const float *xp, const float *yp, int numEntries)
Definition: MuonGeometryArrange.cc:572
MuonGeometryArrange::compare
void compare(Alignable *refAli, Alignable *curAli, Alignable *curAliCopy2)
Definition: MuonGeometryArrange.cc:659
MuonGeometryArrange::_ldrVal
float _ldrVal
Definition: MuonGeometryArrange.h:165
MuonGeometryArrange::currentMuon
AlignableMuon * currentMuon
Definition: MuonGeometryArrange.h:90
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
particleFlowDisplacedVertex_cfi.angles
angles
Definition: particleFlowDisplacedVertex_cfi.py:84
MuonGeometryArrange::_station
int _station
Definition: MuonGeometryArrange.h:112
MuonGeometryArrange::_ldyVal
float _ldyVal
Definition: MuonGeometryArrange.h:164
MuonGeometryArrange::_weightById
bool _weightById
Definition: MuonGeometryArrange.h:108
ixx
int ixx[18][41][3]
Definition: EcalDAQHandler.cc:226
MuonGeometryArrange::_commonMuonLevel
align::StructureType _commonMuonLevel
Definition: MuonGeometryArrange.h:116
PVValHelper::dz
Definition: PVValidationHelpers.h:50
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
AlignableSurface::width
align::Scalar width() const
Definition: AlignableSurface.h:30
flavorHistoryFilter_cfi.dr
dr
Definition: flavorHistoryFilter_cfi.py:37
MuonGeometryArrange::_mgacollection
std::vector< MGACollection > _mgacollection
Definition: MuonGeometryArrange.h:146
MuonGeometryArrange::_detIdFlag
bool _detIdFlag
Definition: MuonGeometryArrange.h:106
makeMuonMisalignmentScenario.rot
rot
Definition: makeMuonMisalignmentScenario.py:322
MuonGeometryArrange::_alignTree
TTree * _alignTree
Definition: MuonGeometryArrange.h:155
MuonGeometryArrange::_alphaVal
float _alphaVal
Definition: MuonGeometryArrange.h:162
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
MuonGeometryArrange::_mid
int _mid
Definition: MuonGeometryArrange.h:161
MuonGeometryArrange::_inputFilename1
std::string _inputFilename1
Definition: MuonGeometryArrange.h:100
MuonGeometryArrange::_sublevel
int _sublevel
Definition: MuonGeometryArrange.h:161
align::toMatrix
RotationType toMatrix(const EulerAngles &)
Convert rotation angles about x-, y-, z-axes to matrix.
Definition: Utilities.cc:34
MuonAlignment::getAlignableMuon
AlignableMuon * getAlignableMuon()
Definition: MuonAlignment.h:31
MuonGeometryArrange::endHist
void endHist()
Definition: MuonGeometryArrange.cc:148
MuonGeometryArrange::_ldzVal
float _ldzVal
Definition: MuonGeometryArrange.h:164
align::diffAlignables
AlgebraicVector diffAlignables(Alignable *refAli, Alignable *curAli, const std::string &weightBy, bool weightById, const std::vector< unsigned int > &weightByIdVector)
Definition: AlignTools.cc:10
DetId::Muon
Definition: DetId.h:26
MuonGeometryArrange::theLevels
std::vector< align::StructureType > theLevels
Definition: MuonGeometryArrange.h:55
HGC3DClusterGenMatchSelector_cfi.dR
dR
Definition: HGC3DClusterGenMatchSelector_cfi.py:7
MuonGeometryArrange::_levelStrings
const std::vector< std::string > _levelStrings
Definition: MuonGeometryArrange.h:99
Alignable::globalPosition
const PositionType & globalPosition() const
Return the global position of the object.
Definition: Alignable.h:135
MuonGeometryArrange::fillTree
void fillTree(Alignable *refAli, const AlgebraicVector &diff)
Definition: MuonGeometryArrange.cc:888
MuonGeometryArrange::referenceMuon
AlignableMuon * referenceMuon
Definition: MuonGeometryArrange.h:88
MuonGeometryArrange::_drotyVal
float _drotyVal
Definition: MuonGeometryArrange.h:167
Alignable::components
virtual const Alignables & components() const =0
Return vector of all direct components.
MuonGeometryArrange::_yVal
float _yVal
Definition: MuonGeometryArrange.h:162
PV3DBase::perp
T perp() const
Definition: PV3DBase.h:69
MuonGeometryArrange::_detIdFlagVector
std::vector< uint32_t > _detIdFlagVector
Definition: MuonGeometryArrange.h:115
PVValHelper::dx
Definition: PVValidationHelpers.h:48
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
geometryCSVtoXML.xx
xx
Definition: geometryCSVtoXML.py:19
MuonGeometryArrange::_dalphaVal
float _dalphaVal
Definition: MuonGeometryArrange.h:163
Alignable::globalRotation
const RotationType & globalRotation() const
Return the global orientation of the object.
Definition: Alignable.h:138
MuonGeometryArrange::_id
int _id
Definition: MuonGeometryArrange.h:161
MuonGeometryArrange::firstEvent_
bool firstEvent_
Definition: MuonGeometryArrange.h:171
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
MuonGeometryArrange::_rotzVal
float _rotzVal
Definition: MuonGeometryArrange.h:166
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
Alignable::mother
Alignable * mother() const
Return pointer to container alignable (if any)
Definition: Alignable.h:91