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

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 623 of file MuonGeometryArrange.cc.

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

References _alignTree, _inputXMLCurrent, _inputXMLReference, _levelStrings, _theFile, compare(), endHist(), MuonAlignment::fillGapsInSurvey(), firstEvent_, MuonAlignment::getAlignableMuon(), idealInputLabel1, idealInputLabel2, idealInputLabel2a, 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 618 of file MuonGeometryArrange.cc.

618 { firstEvent_ = true; }

References firstEvent_.

◆ checkChosen()

bool MuonGeometryArrange::checkChosen ( Alignable ali)
private

Definition at line 1114 of file MuonGeometryArrange.cc.

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

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 662 of file MuonGeometryArrange.cc.

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

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 684 of file MuonGeometryArrange.cc.

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

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 621 of file MuonGeometryArrange.cc.

621 {}

◆ endHist()

void MuonGeometryArrange::endHist ( )
private

Definition at line 151 of file MuonGeometryArrange.cc.

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

References _mgacollection, _theFile, flavorHistoryFilter_cfi::dr, PVValHelper::dx, PVValHelper::dy, PVValHelper::dz, mps_fire::i, makeGraph(), findQualityFiles::maxI, findQualityFiles::minI, runTheMatrix::ret, HLT_FULL_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 891 of file MuonGeometryArrange.cc.

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

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 1096 of file MuonGeometryArrange.cc.

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

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 575 of file MuonGeometryArrange.cc.

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

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

Referenced by endHist().

◆ passChosen()

bool MuonGeometryArrange::passChosen ( Alignable ali)
private

Definition at line 1139 of file MuonGeometryArrange.cc.

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

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

◆ passIdCut()

bool MuonGeometryArrange::passIdCut ( uint32_t  id)
private

Definition at line 1169 of file MuonGeometryArrange.cc.

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

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

◆ idealInputLabel1

std::string MuonGeometryArrange::idealInputLabel1
private

Definition at line 173 of file MuonGeometryArrange.h.

Referenced by analyze().

◆ idealInputLabel2

std::string MuonGeometryArrange::idealInputLabel2
private

Definition at line 173 of file MuonGeometryArrange.h.

Referenced by analyze().

◆ idealInputLabel2a

std::string MuonGeometryArrange::idealInputLabel2a
private

Definition at line 173 of file MuonGeometryArrange.h.

Referenced by analyze().

◆ 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:367
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
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
mps_fire.i
i
Definition: mps_fire.py:428
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:684
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
HLT_FULL_cff.scale
scale
Definition: HLT_FULL_cff.py:6637
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
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
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
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:1114
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:1169
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
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
MuonGeometryArrange::idealInputLabel2a
std::string idealInputLabel2a
Definition: MuonGeometryArrange.h:173
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:1096
MuonGeometryArrange::theSurveyIndex
unsigned int theSurveyIndex
Definition: MuonGeometryArrange.h:94
tolerance
const double tolerance
Definition: HGCalGeomParameters.cc:26
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
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::idealInputLabel1
std::string idealInputLabel1
Definition: MuonGeometryArrange.h:173
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:575
MuonGeometryArrange::compare
void compare(Alignable *refAli, Alignable *curAli, Alignable *curAliCopy2)
Definition: MuonGeometryArrange.cc:662
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::idealInputLabel2
std::string idealInputLabel2
Definition: MuonGeometryArrange.h:173
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:151
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:891
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