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::one::EDAnalyzer<> edm::one::EDAnalyzerBase edm::EDConsumerBase

Classes

struct  MGACollection
 

Public Types

typedef AlignTransform SurveyValue
 
typedef Alignments SurveyValues
 
- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase 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::one::EDAnalyzer<>
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () 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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
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
 
const edm::ESGetToken< CSCGeometry, MuonGeometryRecordcscGeomIdealToken_
 
const edm::ESGetToken< CSCGeometry, MuonGeometryRecordcscGeomToken1_
 
const edm::ESGetToken< CSCGeometry, MuonGeometryRecordcscGeomToken2_
 
const edm::ESGetToken< CSCGeometry, MuonGeometryRecordcscGeomToken3_
 
AlignableMuoncurrentMuon
 
const edm::ESGetToken< DTGeometry, MuonGeometryRecorddtGeomIdealToken_
 
const edm::ESGetToken< DTGeometry, MuonGeometryRecorddtGeomToken1_
 
const edm::ESGetToken< DTGeometry, MuonGeometryRecorddtGeomToken2_
 
const edm::ESGetToken< DTGeometry, MuonGeometryRecorddtGeomToken3_
 
AlignableMuondummyMuon
 
bool firstEvent_
 
const edm::ESGetToken< GEMGeometry, MuonGeometryRecordgemGeomIdealToken_
 
const edm::ESGetToken< GEMGeometry, MuonGeometryRecordgemGeomToken1_
 
const edm::ESGetToken< GEMGeometry, MuonGeometryRecordgemGeomToken2_
 
const edm::ESGetToken< GEMGeometry, MuonGeometryRecordgemGeomToken3_
 
std::string geomIdeal
 
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::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

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.

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.

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  geomIdeal("MuonGeometryArrangeGeomIdeal"),
64  referenceMuon = nullptr;
65  currentMuon = nullptr;
66  // Input is XML
67  _inputXMLCurrent = cfg.getUntrackedParameter<std::string>("inputXMLCurrent");
68  _inputXMLReference = cfg.getUntrackedParameter<std::string>("inputXMLReference");
69 
70  //input is ROOT
71  _inputFilename1 = cfg.getUntrackedParameter<std::string>("inputROOTFile1");
72  _inputFilename2 = cfg.getUntrackedParameter<std::string>("inputROOTFile2");
73  _inputTreename = cfg.getUntrackedParameter<std::string>("treeName");
74 
75  //output file
76  _filename = cfg.getUntrackedParameter<std::string>("outputFile");
77 
78  _weightBy = cfg.getUntrackedParameter<std::string>("weightBy");
79  _detIdFlag = cfg.getUntrackedParameter<bool>("detIdFlag");
80  _detIdFlagFile = cfg.getUntrackedParameter<std::string>("detIdFlagFile");
81  _weightById = cfg.getUntrackedParameter<bool>("weightById");
82  _weightByIdFile = cfg.getUntrackedParameter<std::string>("weightByIdFile");
83  _endcap = cfg.getUntrackedParameter<int>("endcapNumber");
84  _station = cfg.getUntrackedParameter<int>("stationNumber");
85  _ring = cfg.getUntrackedParameter<int>("ringNumber");
86 
87  // if want to use, make id cut list
88  if (_detIdFlag) {
89  std::ifstream fin;
90  fin.open(_detIdFlagFile.c_str());
91 
92  while (!fin.eof() && fin.good()) {
93  uint32_t id;
94  fin >> id;
95  _detIdFlagVector.push_back(id);
96  }
97  fin.close();
98  }
99 
100  // turn weightByIdFile into weightByIdVector
101  unsigned int lastID = 999999999;
102  if (_weightById) {
103  std::ifstream inFile;
104  inFile.open(_weightByIdFile.c_str());
105  int ctr = 0;
106  while (!inFile.eof()) {
107  ctr++;
108  unsigned int listId;
109  inFile >> listId;
110  inFile.ignore(256, '\n');
111  if (listId != lastID) {
112  _weightByIdVector.push_back(listId);
113  }
114  lastID = listId;
115  }
116  inFile.close();
117  }
118 
119  //root configuration
120  _theFile = new TFile(_filename.c_str(), "RECREATE");
121  _alignTree = new TTree("alignTree", "alignTree");
122  _alignTree->Branch("id", &_id, "id/I");
123  _alignTree->Branch("level", &_level, "level/I");
124  _alignTree->Branch("mid", &_mid, "mid/I");
125  _alignTree->Branch("mlevel", &_mlevel, "mlevel/I");
126  _alignTree->Branch("sublevel", &_sublevel, "sublevel/I");
127  _alignTree->Branch("x", &_xVal, "x/F");
128  _alignTree->Branch("y", &_yVal, "y/F");
129  _alignTree->Branch("z", &_zVal, "z/F");
130  _alignTree->Branch("r", &_rVal, "r/F");
131  _alignTree->Branch("phi", &_phiVal, "phi/F");
132  _alignTree->Branch("eta", &_etaVal, "eta/F");
133  _alignTree->Branch("alpha", &_alphaVal, "alpha/F");
134  _alignTree->Branch("beta", &_betaVal, "beta/F");
135  _alignTree->Branch("gamma", &_gammaVal, "gamma/F");
136  _alignTree->Branch("dx", &_dxVal, "dx/F");
137  _alignTree->Branch("dy", &_dyVal, "dy/F");
138  _alignTree->Branch("dz", &_dzVal, "dz/F");
139  _alignTree->Branch("dr", &_drVal, "dr/F");
140  _alignTree->Branch("dphi", &_dphiVal, "dphi/F");
141  _alignTree->Branch("dalpha", &_dalphaVal, "dalpha/F");
142  _alignTree->Branch("dbeta", &_dbetaVal, "dbeta/F");
143  _alignTree->Branch("dgamma", &_dgammaVal, "dgamma/F");
144  _alignTree->Branch("ldx", &_ldxVal, "ldx/F");
145  _alignTree->Branch("ldy", &_ldyVal, "ldy/F");
146  _alignTree->Branch("ldz", &_ldzVal, "ldz/F");
147  _alignTree->Branch("ldr", &_ldrVal, "ldr/F");
148  _alignTree->Branch("ldphi", &_ldphiVal, "ldphi/F");
149  _alignTree->Branch("useDetId", &_useDetId, "useDetId/I");
150  _alignTree->Branch("detDim", &_detDim, "detDim/I");
151  _alignTree->Branch("rotx", &_rotxVal, "rotx/F");
152  _alignTree->Branch("roty", &_rotyVal, "roty/F");
153  _alignTree->Branch("rotz", &_rotzVal, "rotz/F");
154  _alignTree->Branch("drotx", &_drotxVal, "drotx/F");
155  _alignTree->Branch("droty", &_drotyVal, "droty/F");
156  _alignTree->Branch("drotz", &_drotzVal, "drotz/F");
157  _alignTree->Branch("surW", &_surWidth, "surW/F");
158  _alignTree->Branch("surL", &_surLength, "surL/F");
159  _alignTree->Branch("surRot", &_surRot, "surRot[9]/D");
160 
161  _mgacollection.clear();
162 }
const edm::ESGetToken< CSCGeometry, MuonGeometryRecord > cscGeomIdealToken_
const edm::ESGetToken< GEMGeometry, MuonGeometryRecord > gemGeomIdealToken_
const edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomIdealToken_
const edm::ESGetToken< CSCGeometry, MuonGeometryRecord > cscGeomToken3_
const edm::ESGetToken< GEMGeometry, MuonGeometryRecord > gemGeomToken3_
std::vector< unsigned int > _weightByIdVector
const edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken2_
const edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken1_
align::StructureType _commonMuonLevel
const edm::ESGetToken< CSCGeometry, MuonGeometryRecord > cscGeomToken2_
const std::vector< std::string > _levelStrings
AlignableMuon * referenceMuon
const edm::ESGetToken< CSCGeometry, MuonGeometryRecord > cscGeomToken1_
AlignableMuon * currentMuon
const edm::ESGetToken< GEMGeometry, MuonGeometryRecord > gemGeomToken2_
const edm::ESGetToken< GEMGeometry, MuonGeometryRecord > gemGeomToken1_
const edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken3_
std::vector< uint32_t > _detIdFlagVector
std::vector< MGACollection > _mgacollection

Member Function Documentation

◆ analyze()

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

Implements edm::one::EDAnalyzerBase.

Definition at line 636 of file MuonGeometryArrange.cc.

References _alignTree, _inputXMLCurrent, _inputXMLReference, _levelStrings, _theFile, compare(), cscGeomToken1_, cscGeomToken2_, cscGeomToken3_, dtGeomToken1_, dtGeomToken2_, dtGeomToken3_, endHist(), MuonAlignment::fillGapsInSurvey(), firstEvent_, gemGeomToken1_, gemGeomToken2_, gemGeomToken3_, MuonAlignment::getAlignableMuon(), edm::EventSetup::getData(), inputAlign1, inputAlign2, inputAlign2a, inputGeometry1, inputGeometry2, personalPlayback::level, and theLevels.

636  {
637  if (firstEvent_) {
639  &iSetup.getData(dtGeomToken1_),
640  &iSetup.getData(cscGeomToken1_),
641  &iSetup.getData(gemGeomToken1_),
642  &iSetup.getData(dtGeomToken1_),
643  &iSetup.getData(cscGeomToken1_),
644  &iSetup.getData(gemGeomToken1_));
645  inputAlign1 = new MuonAlignment(iSetup, inputMethod1);
648  &iSetup.getData(dtGeomToken2_),
649  &iSetup.getData(cscGeomToken2_),
650  &iSetup.getData(gemGeomToken2_),
651  &iSetup.getData(dtGeomToken1_),
652  &iSetup.getData(cscGeomToken1_),
653  &iSetup.getData(gemGeomToken1_));
654  inputAlign2 = new MuonAlignment(iSetup, inputMethod2);
657  &iSetup.getData(dtGeomToken3_),
658  &iSetup.getData(cscGeomToken3_),
659  &iSetup.getData(gemGeomToken3_),
660  &iSetup.getData(dtGeomToken1_),
661  &iSetup.getData(cscGeomToken1_),
662  &iSetup.getData(gemGeomToken1_));
663  inputAlign2a = new MuonAlignment(iSetup, inputMethod2a);
665 
668  auto inputGeometry2Copy2 = inputAlign2a->getAlignableMuon();
669 
670  //setting the levels being used in the geometry comparator
671  edm::LogInfo("MuonGeometryArrange") << "levels: " << _levelStrings.size();
672  for (const auto& level : _levelStrings) {
673  theLevels.push_back(inputGeometry2Copy2->objectIdProvider().stringToId(level));
674  edm::LogInfo("MuonGeometryArrange") << "level: " << level;
675  }
676 
677  //compare the goemetries
678  compare(inputGeometry1, inputGeometry2, inputGeometry2Copy2);
679 
680  //write out ntuple
681  //might be better to do within output module
682  _theFile->cd();
683  _alignTree->Write();
684  endHist();
685  // _theFile->Close();
686 
687  firstEvent_ = false;
688  }
689 }
std::vector< align::StructureType > theLevels
const edm::ESGetToken< CSCGeometry, MuonGeometryRecord > cscGeomToken3_
MuonAlignment * inputAlign2a
MuonAlignment * inputAlign2
const edm::ESGetToken< GEMGeometry, MuonGeometryRecord > gemGeomToken3_
const edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken2_
const edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken1_
AlignableMuon * getAlignableMuon()
Definition: MuonAlignment.h:32
void compare(Alignable *refAli, Alignable *curAli, Alignable *curAliCopy2)
const edm::ESGetToken< CSCGeometry, MuonGeometryRecord > cscGeomToken2_
bool getData(T &iHolder) const
Definition: EventSetup.h:122
MuonAlignment * inputAlign1
Log< level::Info, false > LogInfo
void fillGapsInSurvey(double shiftErr, double angleErr)
const std::vector< std::string > _levelStrings
const edm::ESGetToken< CSCGeometry, MuonGeometryRecord > cscGeomToken1_
const edm::ESGetToken< GEMGeometry, MuonGeometryRecord > gemGeomToken2_
const edm::ESGetToken< GEMGeometry, MuonGeometryRecord > gemGeomToken1_
const edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken3_

◆ beginJob()

void MuonGeometryArrange::beginJob ( )
overridevirtual

Read from DB and print survey info.

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 631 of file MuonGeometryArrange.cc.

References firstEvent_.

631 { firstEvent_ = true; }

◆ checkChosen()

bool MuonGeometryArrange::checkChosen ( Alignable ali)
private

Definition at line 1144 of file MuonGeometryArrange.cc.

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

1144  {
1145  // Check whether the item passed satisfies the criteria given.
1146  if (ali == nullptr)
1147  return false; // elementary sanity
1148  // Is this in the CSC section? If not, bail. Later may extend.
1149  if (ali->geomDetId().det() != DetId::Muon || ali->geomDetId().subdetId() != MuonSubdetId::CSC)
1150  return false;
1151  // If it is a CSC alignable, then check that the station, etc are
1152  // those requested.
1153  // One might think of aligning more than a single ring at a time,
1154  // by using a vector of ring numbers. I don't see the sense in
1155  // trying to align more than one station at a time for comparison.
1156  CSCDetId cscId(ali->geomDetId());
1157 #ifdef jnbdebug
1158  std::cout << "JNB " << ali->id() << " " << cscId.endcap() << " " << cscId.station() << " " << cscId.ring() << " "
1159  << cscId.chamber() << " " << _endcap << " " << _station << " " << _ring << "\n"
1160  << std::flush;
1161 #endif
1162  if (cscId.endcap() == _endcap && cscId.station() == _station && cscId.ring() == _ring) {
1163  return true;
1164  }
1165  return false;
1166 }
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
align::ID id() const
Return the ID of Alignable, i.e. DetId of &#39;first&#39; component GeomDet(Unit).
Definition: Alignable.h:180
const DetId & geomDetId() const
Definition: Alignable.h:177
static constexpr int CSC
Definition: MuonSubdetId.h:12

◆ compare()

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

Definition at line 692 of file MuonGeometryArrange.cc.

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

Referenced by analyze().

692  {
693  // First sanity
694  if (refAli == nullptr) {
695  return;
696  }
697  if (curAli == nullptr) {
698  return;
699  }
700 
701  const auto& refComp = refAli->components();
702  const auto& curComp = curAli->components();
703  const auto& curComp2 = curAliCopy2->components();
704  compareGeometries(refAli, curAli, curAliCopy2);
705 
706  int nComp = refComp.size();
707  for (int i = 0; i < nComp; i++) {
708  compare(refComp[i], curComp[i], curComp2[i]);
709  }
710  return;
711 }
void compareGeometries(Alignable *refAli, Alignable *curAli, Alignable *curAliCopy2)
void compare(Alignable *refAli, Alignable *curAli, Alignable *curAliCopy2)
virtual const Alignables & components() const =0
Return vector of all direct components.

◆ compareGeometries()

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

Definition at line 714 of file MuonGeometryArrange.cc.

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

714  {
715  // First sanity
716  if (refAli == nullptr) {
717  return;
718  }
719  if (curAli == nullptr) {
720  return;
721  }
722  // Is this the Ring we want to align? If so it will contain the
723  // chambers specified in the configuration file
724  if (!isMother(refAli))
725  return; // Not the desired alignable object
726  // But... There are granddaughters involved--and I don't want to monkey with
727  // the layers of the chambers. So, if the mother of this is also an approved
728  // mother, bail.
729  if (isMother(refAli->mother()))
730  return;
731  const auto& refComp = refAli->components();
732  const auto& curComp = curCopy->components();
733  if (refComp.size() != curComp.size()) {
734  return;
735  }
736  // GlobalVectors is a vector of GlobalVector which is a 3D vector
737  align::GlobalVectors originalVectors;
738  align::GlobalVectors currentVectors;
739  align::GlobalVectors originalRelativeVectors;
740  align::GlobalVectors currentRelativeVectors;
741 
742  int nComp = refComp.size();
743  int nUsed = 0;
744  // Use the total displacements here:
745  CLHEP::Hep3Vector TotalX, TotalL;
746  TotalX.set(0., 0., 0.);
747  TotalL.set(0., 0., 0.);
748  // CLHEP::Hep3Vector* Rsubtotal, Wsubtotal, DRsubtotal, DWsubtotal;
749  std::vector<CLHEP::Hep3Vector> Positions;
750  std::vector<CLHEP::Hep3Vector> DelPositions;
751 
752  double xrcenter = 0.;
753  double yrcenter = 0.;
754  double zrcenter = 0.;
755  double xccenter = 0.;
756  double yccenter = 0.;
757  double zccenter = 0.;
758 
759  bool useIt;
760  // Create the "center" for the reference alignment chambers, and
761  // load a vector of their centers
762  for (int ich = 0; ich < nComp; ich++) {
763  useIt = true;
764  if (_weightById) {
765  if (!align::readModuleList(curComp[ich]->id(), curComp[ich]->id(), _weightByIdVector))
766  useIt = false;
767  }
768  if (!useIt)
769  continue;
770  align::GlobalVectors curVs;
772  align::GlobalVector pointsCM = align::centerOfMass(curVs);
773  originalVectors.push_back(pointsCM);
774  nUsed++;
775  xrcenter += pointsCM.x();
776  yrcenter += pointsCM.y();
777  zrcenter += pointsCM.z();
778  }
779  xrcenter = xrcenter / nUsed;
780  yrcenter = yrcenter / nUsed;
781  zrcenter = zrcenter / nUsed;
782 
783  // Create the "center" for the current alignment chambers, and
784  // load a vector of their centers
785  for (int ich = 0; ich < nComp; ich++) {
786  useIt = true;
787  if (_weightById) {
788  if (!align::readModuleList(curComp[ich]->id(), curComp[ich]->id(), _weightByIdVector))
789  useIt = false;
790  }
791  if (!useIt)
792  continue;
793  align::GlobalVectors curVs;
795  align::GlobalVector pointsCM = align::centerOfMass(curVs);
796  currentVectors.push_back(pointsCM);
797 
798  xccenter += pointsCM.x();
799  yccenter += pointsCM.y();
800  zccenter += pointsCM.z();
801  }
802  xccenter = xccenter / nUsed;
803  yccenter = yccenter / nUsed;
804  zccenter = zccenter / nUsed;
805 
806  // OK, now load the <very approximate> vectors from the ring "centers"
807  align::GlobalVector CCur(xccenter, yccenter, zccenter);
808  align::GlobalVector CRef(xrcenter, yrcenter, zrcenter);
809  int nCompR = currentVectors.size();
810  for (int ich = 0; ich < nCompR; ich++) {
811  originalRelativeVectors.push_back(originalVectors[ich] - CRef);
812  currentRelativeVectors.push_back(currentVectors[ich] - CCur);
813  }
814 
815  // All right. Now let the hacking begin.
816  // First out of the gate let's try using the raw values and see what
817  // diffRot does for us.
818 
819  align::RotationType rtype3 = align::diffRot(currentRelativeVectors, originalRelativeVectors);
820 
822  angles = align::toAngles(rtype3);
823 
824  for (int ich = 0; ich < nComp; ich++) {
825  if (_weightById) {
826  if (!align::readModuleList(curComp[ich]->id(), curComp[ich]->id(), _weightByIdVector))
827  continue;
828  }
829  CLHEP::Hep3Vector Rtotal, Wtotal;
830  Rtotal.set(0., 0., 0.);
831  Wtotal.set(0., 0., 0.);
832  for (int i = 0; i < 100; i++) {
834  align::diffAlignables(refComp[ich], curComp[ich], _weightBy, _weightById, _weightByIdVector);
835  CLHEP::Hep3Vector dR(diff[0], diff[1], diff[2]);
836  Rtotal += dR;
837  CLHEP::Hep3Vector dW(diff[3], diff[4], diff[5]);
838  CLHEP::HepRotation rot(Wtotal.unit(), Wtotal.mag());
839  CLHEP::HepRotation drot(dW.unit(), dW.mag());
840  rot *= drot;
841  Wtotal.set(rot.axis().x() * rot.delta(), rot.axis().y() * rot.delta(), rot.axis().z() * rot.delta());
842  align::moveAlignable(curComp[ich], diff);
843  float tolerance = 1e-7;
845  align::diffAlignables(refComp[ich], curComp[ich], _weightBy, _weightById, _weightByIdVector);
846  align::GlobalVector checkR(check[0], check[1], check[2]);
847  align::GlobalVector checkW(check[3], check[4], check[5]);
848  DetId detid(refComp[ich]->id());
849  if ((checkR.mag() > tolerance) || (checkW.mag() > tolerance)) {
850  // edm::LogInfo("CompareGeoms") << "Tolerance Exceeded!(alObjId: "
851  // << refAli->alignableObjectId()
852  // << ", rawId: " << refComp[ich]->geomDetId().rawId()
853  // << ", subdetId: "<< detid.subdetId() << "): " << diff;
854  } else {
855  TotalX += Rtotal;
856  break;
857  } // end of else
858  } // end of for on int i
859  } // end of for on ich
860 
861  // At this point we should have a total displacement and total L
862  TotalX = TotalX / nUsed;
863 
864  // Now start again!
865  AlgebraicVector change(6);
866  change(1) = TotalX.x();
867  change(2) = TotalX.y();
868  change(3) = TotalX.z();
869 
870  change(4) = angles[0];
871  change(5) = angles[1];
872  change(6) = angles[2];
873  align::moveAlignable(curAli, change); // move as a chunk
874 
875  // Now get the components again. They should be in new locations
876  const auto& curComp2 = curAli->components();
877 
878  for (int ich = 0; ich < nComp; ich++) {
879  CLHEP::Hep3Vector Rtotal, Wtotal;
880  Rtotal.set(0., 0., 0.);
881  Wtotal.set(0., 0., 0.);
882  if (_weightById) {
883  if (!align::readModuleList(curComp[ich]->id(), curComp[ich]->id(), _weightByIdVector))
884  continue;
885  }
886 
887  for (int i = 0; i < 100; i++) {
889  align::diffAlignables(refComp[ich], curComp2[ich], _weightBy, _weightById, _weightByIdVector);
890  CLHEP::Hep3Vector dR(diff[0], diff[1], diff[2]);
891  Rtotal += dR;
892  CLHEP::Hep3Vector dW(diff[3], diff[4], diff[5]);
893  CLHEP::HepRotation rot(Wtotal.unit(), Wtotal.mag());
894  CLHEP::HepRotation drot(dW.unit(), dW.mag());
895  rot *= drot;
896  Wtotal.set(rot.axis().x() * rot.delta(), rot.axis().y() * rot.delta(), rot.axis().z() * rot.delta());
897  align::moveAlignable(curComp2[ich], diff);
898  float tolerance = 1e-7;
900  align::diffAlignables(refComp[ich], curComp2[ich], _weightBy, _weightById, _weightByIdVector);
901  align::GlobalVector checkR(check[0], check[1], check[2]);
902  align::GlobalVector checkW(check[3], check[4], check[5]);
903  if ((checkR.mag() > tolerance) || (checkW.mag() > tolerance)) {
904  } else {
905  break;
906  }
907  } // end of for on int i
908  AlgebraicVector TRtot(6);
909  TRtot(1) = Rtotal.x();
910  TRtot(2) = Rtotal.y();
911  TRtot(3) = Rtotal.z();
912  TRtot(4) = Wtotal.x();
913  TRtot(5) = Wtotal.y();
914  TRtot(6) = Wtotal.z();
915  fillTree(refComp[ich], TRtot);
916  } // end of for on ich
917 }
Alignable * mother() const
Return pointer to container alignable (if any)
Definition: Alignable.h:91
bool isMother(Alignable *ali)
T z() const
Definition: PV3DBase.h:61
const double tolerance
AlgebraicVector diffAlignables(Alignable *refAli, Alignable *curAli, const std::string &weightBy, bool weightById, const std::vector< unsigned int > &weightByIdVector)
Definition: AlignTools.cc:10
void createPoints(GlobalVectors *Vs, Alignable *ali, const std::string &weightBy, bool weightById, const std::vector< unsigned int > &weightByIdVector)
Definition: AlignTools.cc:96
RotationType diffRot(const GlobalVectors &current, const GlobalVectors &nominal)
Definition: Utilities.cc:68
std::vector< unsigned int > _weightByIdVector
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
bool readModuleList(unsigned int, unsigned int, const std::vector< unsigned int > &)
Definition: AlignTools.cc:152
EulerAngles toAngles(const RotationType &)
Convert rotation matrix to angles about x-, y-, z-axes (frame rotation).
Definition: Utilities.cc:8
virtual const Alignables & components() const =0
Return vector of all direct components.
GlobalVector centerOfMass(const GlobalVectors &theVs)
Find the CM of a set of points.
Definition: Utilities.cc:174
void fillTree(Alignable *refAli, const AlgebraicVector &diff)
Definition: DetId.h:17
CLHEP::HepVector AlgebraicVector
AlgebraicVector EulerAngles
Definition: Definitions.h:34
std::vector< GlobalVector > GlobalVectors
Definition: Utilities.h:28
void moveAlignable(Alignable *ali, AlgebraicVector diff)
Moves the alignable by the AlgebraicVector.
Definition: AlignTools.cc:84

◆ createROOTGeometry()

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

Definition at line 634 of file MuonGeometryArrange.cc.

634 {}

◆ endHist()

void MuonGeometryArrange::endHist ( )
private

Definition at line 164 of file MuonGeometryArrange.cc.

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

Referenced by analyze().

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

◆ fillTree()

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

Definition at line 921 of file MuonGeometryArrange.cc.

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

921  {
922  _id = refAli->id();
923  _level = refAli->alignableObjectId();
924  //need if ali has no mother
925  if (refAli->mother()) {
926  _mid = refAli->mother()->geomDetId().rawId();
927  _mlevel = refAli->mother()->alignableObjectId();
928  } else {
929  _mid = -1;
930  _mlevel = -1;
931  }
932  DetId detid(_id);
933  _sublevel = detid.subdetId();
934  int ringPhiPos = -99;
935  if (detid.det() == DetId::Muon && detid.subdetId() == MuonSubdetId::CSC) {
936  CSCDetId cscId(refAli->geomDetId());
937  ringPhiPos = cscId.chamber();
938  }
939  _xVal = refAli->globalPosition().x();
940  _yVal = refAli->globalPosition().y();
941  _zVal = refAli->globalPosition().z();
943  _rVal = vec.perp();
944  _phiVal = vec.phi();
945  _etaVal = vec.eta();
947  align::EulerAngles eulerAngles = align::toAngles(rot);
948  _rotxVal = atan2(rot.yz(), rot.zz());
949  float ttt = -rot.xz();
950  if (ttt > 1.)
951  ttt = 1.;
952  if (ttt < -1.)
953  ttt = -1.;
954  _rotyVal = asin(ttt);
955  _rotzVal = atan2(rot.xy(), rot.xx());
956  _alphaVal = eulerAngles[0];
957  _betaVal = eulerAngles[1];
958  _gammaVal = eulerAngles[2];
959  _dxVal = diff[0];
960  _dyVal = diff[1];
961  _dzVal = diff[2];
962  //getting dR and dPhi
965  _drVal = vCur.perp() - vRef.perp();
966  _dphiVal = vCur.phi() - vRef.phi();
967 
968  _dalphaVal = diff[3];
969  _dbetaVal = diff[4];
970  _dgammaVal = diff[5];
971  _drotxVal = -999.;
972  _drotyVal = -999.;
973  _drotzVal = -999.;
974 
975  align::EulerAngles deuler(3);
976  deuler(1) = _dalphaVal;
977  deuler(2) = _dbetaVal;
978  deuler(3) = _dgammaVal;
979  align::RotationType drot = align::toMatrix(deuler);
980  double xx = rot.xx();
981  double xy = rot.xy();
982  double xz = rot.xz();
983  double yx = rot.yx();
984  double yy = rot.yy();
985  double yz = rot.yz();
986  double zx = rot.zx();
987  double zy = rot.zy();
988  double zz = rot.zz();
989  double detrot = (zz * yy - zy * yz) * xx + (-zz * yx + zx * yz) * xy + (zy * yx - zx * yy) * xz;
990  detrot = 1 / detrot;
991  double ixx = (zz * yy - zy * yz) * detrot;
992  double ixy = (-zz * xy + zy * xz) * detrot;
993  double ixz = (yz * xy - yy * xz) * detrot;
994  double iyx = (-zz * yx + zx * yz) * detrot;
995  double iyy = (zz * xx - zx * xz) * detrot;
996  double iyz = (-yz * xx + yx * xz) * detrot;
997  double izx = (zy * yx - zx * yy) * detrot;
998  double izy = (-zy * xx + zx * xy) * detrot;
999  double izz = (yy * xx - yx * xy) * detrot;
1000  align::RotationType invrot(ixx, ixy, ixz, iyx, iyy, iyz, izx, izy, izz);
1001  align::RotationType prot = rot * drot * invrot;
1002  // align::RotationType prot = rot*drot;
1003  float protx; //, proty, protz;
1004  protx = atan2(prot.yz(), prot.zz());
1005  _drotxVal = protx; //_rotxVal-protx; //atan2(drot.yz(), drot.zz());
1006  ttt = -prot.xz();
1007  if (ttt > 1.)
1008  ttt = 1.;
1009  if (ttt < -1.)
1010  ttt = -1.;
1011  _drotyVal = asin(ttt); // -_rotyVal;
1012  _drotzVal = atan2(prot.xy(), prot.xx()); // - _rotzVal;
1013  // Above does not account for 2Pi wraparounds!
1014  // Prior knowledge: these are supposed to be small rotations. Therefore:
1015  if (_drotxVal > 3.141592656)
1016  _drotxVal = -6.2831853072 + _drotxVal;
1017  if (_drotxVal < -3.141592656)
1018  _drotxVal = 6.2831853072 + _drotxVal;
1019  if (_drotyVal > 3.141592656)
1020  _drotyVal = -6.2831853072 + _drotyVal;
1021  if (_drotyVal < -3.141592656)
1022  _drotyVal = 6.2831853072 + _drotyVal;
1023  if (_drotzVal > 3.141592656)
1024  _drotzVal = -6.2831853072 + _drotzVal;
1025  if (_drotzVal < -3.141592656)
1026  _drotzVal = 6.2831853072 + _drotzVal;
1027 
1028  _ldxVal = -999.;
1029  _ldyVal = -999.;
1030  _ldxVal = -999.;
1031  _ldrVal = -999.;
1032  _ldphiVal = -999; // set fake
1033 
1034  // if(refAli->alignableObjectId() == align::AlignableDetUnit){
1036  align::LocalVector pointL = refAli->surface().toLocal(dV);
1037  //align::LocalVector pointL = (refAli->mother())->surface().toLocal(dV);
1038  _ldxVal = pointL.x();
1039  _ldyVal = pointL.y();
1040  _ldzVal = pointL.z();
1041  _ldphiVal = pointL.phi();
1042  _ldrVal = pointL.perp();
1043  // }
1044  //detIdFlag
1045  if (refAli->alignableObjectId() == align::AlignableDetUnit) {
1046  if (_detIdFlag) {
1047  if ((passIdCut(refAli->id())) || (passIdCut(refAli->mother()->id()))) {
1048  _useDetId = 1;
1049  } else {
1050  _useDetId = 0;
1051  }
1052  }
1053  }
1054  // det module dimension
1055  if (refAli->alignableObjectId() == align::AlignableDetUnit) {
1056  if (refAli->mother()->alignableObjectId() != align::AlignableDet) {
1057  _detDim = 1;
1058  } else if (refAli->mother()->alignableObjectId() == align::AlignableDet) {
1059  _detDim = 2;
1060  }
1061  } else
1062  _detDim = 0;
1063 
1064  _surWidth = refAli->surface().width();
1065  _surLength = refAli->surface().length();
1067  _surRot[0] = rt.xx();
1068  _surRot[1] = rt.xy();
1069  _surRot[2] = rt.xz();
1070  _surRot[3] = rt.yx();
1071  _surRot[4] = rt.yy();
1072  _surRot[5] = rt.yz();
1073  _surRot[6] = rt.zx();
1074  _surRot[7] = rt.zy();
1075  _surRot[8] = rt.zz();
1076 
1077  MGACollection holdit;
1078  holdit.id = _id;
1079  holdit.level = _level;
1080  holdit.mid = _mid;
1081  holdit.mlevel = _mlevel;
1082  holdit.sublevel = _sublevel;
1083  holdit.x = _xVal;
1084  holdit.y = _yVal;
1085  holdit.z = _zVal;
1086  holdit.r = _rVal;
1087  holdit.phi = _phiVal;
1088  holdit.eta = _etaVal;
1089  holdit.alpha = _alphaVal;
1090  holdit.beta = _betaVal;
1091  holdit.gamma = _gammaVal;
1092  holdit.dx = _dxVal;
1093  holdit.dy = _dyVal;
1094  holdit.dz = _dzVal;
1095  holdit.dr = _drVal;
1096  holdit.dphi = _dphiVal;
1097  holdit.dalpha = _dalphaVal;
1098  holdit.dbeta = _dbetaVal;
1099  holdit.dgamma = _dgammaVal;
1100  holdit.useDetId = _useDetId;
1101  holdit.detDim = _detDim;
1102  holdit.surW = _surWidth;
1103  holdit.surL = _surLength;
1104  holdit.ldx = _ldxVal;
1105  holdit.ldy = _ldyVal;
1106  holdit.ldz = _ldzVal;
1107  holdit.ldr = _ldrVal;
1108  holdit.ldphi = _ldphiVal;
1109  holdit.rotx = _rotxVal;
1110  holdit.roty = _rotyVal;
1111  holdit.rotz = _rotzVal;
1112  holdit.drotx = _drotxVal;
1113  holdit.droty = _drotyVal;
1114  holdit.drotz = _drotzVal;
1115  for (int i = 0; i < 9; i++) {
1116  holdit.surRot[i] = _surRot[i];
1117  }
1118  holdit.phipos = ringPhiPos;
1119  _mgacollection.push_back(holdit);
1120 
1121  //Fill
1122  _alignTree->Fill();
1123 }
Alignable * mother() const
Return pointer to container alignable (if any)
Definition: Alignable.h:91
T perp() const
Definition: PV3DBase.h:69
T xx() const
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
Definition: Alignable.h:132
T z() const
Definition: PV3DBase.h:61
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
T xy() const
T zz() const
align::Scalar width() const
T yz() const
const int iyy[18][41][3]
const int ixx[18][41][3]
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
const PositionType & globalPosition() const
Return the global position of the object.
Definition: Alignable.h:135
virtual StructureType alignableObjectId() const =0
Return the alignable type identifier.
int chamber() const
Definition: CSCDetId.h:62
EulerAngles toAngles(const RotationType &)
Convert rotation matrix to angles about x-, y-, z-axes (frame rotation).
Definition: Utilities.cc:8
Definition: DetId.h:17
align::ID id() const
Return the ID of Alignable, i.e. DetId of &#39;first&#39; component GeomDet(Unit).
Definition: Alignable.h:180
AlgebraicVector EulerAngles
Definition: Definitions.h:34
const DetId & geomDetId() const
Definition: Alignable.h:177
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
align::Scalar length() const
align::RotationType toLocal(const align::RotationType &) const
Return in local frame a rotation given in global frame.
RotationType toMatrix(const EulerAngles &)
Convert rotation angles about x-, y-, z-axes to matrix.
Definition: Utilities.cc:34
const RotationType & globalRotation() const
Return the global orientation of the object.
Definition: Alignable.h:138
static constexpr int CSC
Definition: MuonSubdetId.h:12
T xz() const
std::vector< MGACollection > _mgacollection

◆ isMother()

bool MuonGeometryArrange::isMother ( Alignable ali)
private

Definition at line 1126 of file MuonGeometryArrange.cc.

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

Referenced by compareGeometries().

1126  {
1127  // Is this the mother ring?
1128  if (ali == nullptr)
1129  return false; // elementary sanity
1130  const auto& aliComp = ali->components();
1131 
1132  int size = aliComp.size();
1133  if (size <= 0)
1134  return false; // no subcomponents
1135 
1136  for (int i = 0; i < size; i++) {
1137  if (checkChosen(aliComp[i]))
1138  return true; // A ring has CSC chambers
1139  } // as subcomponents
1140  return false; // 1'st layer of subcomponents weren't CSC chambers
1141 }
size
Write out results.
bool checkChosen(Alignable *ali)
virtual const Alignables & components() const =0
Return vector of all direct components.

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

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

Referenced by endHist().

601  {
602  if (minV >= maxV || smi >= sma || sizeI <= 1 || xp == nullptr || yp == nullptr)
603  return;
604  // out of bounds, bail
605  float diff = maxV - minV;
606  float over = .05 * diff;
607  double ylo = minV - over;
608  double yhi = maxV + over;
609  double dsmi, dsma;
610  dsmi = smi;
611  dsma = sma;
612  dxh = new TH2F(name, title, sizeI + 2, dsmi, dsma, 50, ylo, yhi);
613  dxh->GetXaxis()->SetTitle("Position around ring");
614  dxh->GetYaxis()->SetTitle(axis);
615  dxh->SetStats(kFALSE);
616  dxh->Draw();
617  grx = new TGraph(size, xp, yp);
618  grx->SetName(titleg);
619  grx->SetTitle(title);
620  grx->SetMarkerColor(2);
621  grx->SetMarkerStyle(3);
622  grx->GetXaxis()->SetLimits(dsmi, dsma);
623  grx->GetXaxis()->SetTitle("position number");
624  grx->GetYaxis()->SetLimits(ylo, yhi);
625  grx->GetYaxis()->SetTitle(axis);
626  grx->Draw("A*");
627  grx->Write();
628  return;
629 }
size
Write out results.

◆ passChosen()

bool MuonGeometryArrange::passChosen ( Alignable ali)
private

Definition at line 1169 of file MuonGeometryArrange.cc.

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

1169  {
1170  // Check to see if this contains CSC components of the appropriate ring
1171  // Ring will contain N Alignables which represent chambers, each of which
1172  // in turn contains M planes. For our purposes we don't care about the
1173  // planes.
1174  // Hmm. Interesting question: Do I want to try to fit the chamber as
1175  // such, or use the geometry?
1176  // I want to fit the chamber, so I'll try to use its presence as the marker.
1177  // What specifically identifies a chamber as a chamber, and not as a layer?
1178  // The fact that it has layers as sub components, or the fact that it is
1179  // the first item with a non-zero ID breakdown? Pick the latter.
1180  //
1181  if (ali == nullptr)
1182  return false;
1183  if (checkChosen(ali))
1184  return true; // If this is one of the desired
1185  // CSC chambers, accept it
1186  const auto& aliComp = ali->components();
1187 
1188  int size = aliComp.size();
1189  if (size <= 0)
1190  return false; // no subcomponents
1191 
1192  for (int i = 0; i < size; i++) {
1193  if (checkChosen(aliComp[i]))
1194  return true; // A ring has CSC chambers
1195  } // as subcomponents
1196  return false; // 1'st layer of subcomponents weren't CSC chambers
1197 }
size
Write out results.
bool checkChosen(Alignable *ali)
virtual const Alignables & components() const =0
Return vector of all direct components.

◆ passIdCut()

bool MuonGeometryArrange::passIdCut ( uint32_t  id)
private

Definition at line 1199 of file MuonGeometryArrange.cc.

References _detIdFlagVector, and mps_fire::i.

Referenced by fillTree().

1199  {
1200  bool pass = false;
1201  DetId detid(id);
1202  // if(detid.det()==DetId::Muon && detid.subdetId()== MuonSubdetId::CSC){
1203  // CSCDetId cscId(refAli->geomDetId());
1204  // if(cscId.layer()!=1) return false; // ONLY FIRST LAYER!
1205  // }
1206  int nEntries = _detIdFlagVector.size();
1207 
1208  for (int i = 0; i < nEntries; i++) {
1209  if (_detIdFlagVector[i] == id)
1210  pass = true;
1211  }
1212 
1213  return pass;
1214 }
Definition: DetId.h:17
std::vector< uint32_t > _detIdFlagVector

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

◆ cscGeomIdealToken_

const edm::ESGetToken<CSCGeometry, MuonGeometryRecord> MuonGeometryArrange::cscGeomIdealToken_
private

Definition at line 188 of file MuonGeometryArrange.h.

◆ cscGeomToken1_

const edm::ESGetToken<CSCGeometry, MuonGeometryRecord> MuonGeometryArrange::cscGeomToken1_
private

Definition at line 176 of file MuonGeometryArrange.h.

Referenced by analyze().

◆ cscGeomToken2_

const edm::ESGetToken<CSCGeometry, MuonGeometryRecord> MuonGeometryArrange::cscGeomToken2_
private

Definition at line 180 of file MuonGeometryArrange.h.

Referenced by analyze().

◆ cscGeomToken3_

const edm::ESGetToken<CSCGeometry, MuonGeometryRecord> MuonGeometryArrange::cscGeomToken3_
private

Definition at line 184 of file MuonGeometryArrange.h.

Referenced by analyze().

◆ currentMuon

AlignableMuon* MuonGeometryArrange::currentMuon
private

Definition at line 90 of file MuonGeometryArrange.h.

Referenced by MuonGeometryArrange().

◆ dtGeomIdealToken_

const edm::ESGetToken<DTGeometry, MuonGeometryRecord> MuonGeometryArrange::dtGeomIdealToken_
private

Definition at line 187 of file MuonGeometryArrange.h.

◆ dtGeomToken1_

const edm::ESGetToken<DTGeometry, MuonGeometryRecord> MuonGeometryArrange::dtGeomToken1_
private

Definition at line 175 of file MuonGeometryArrange.h.

Referenced by analyze().

◆ dtGeomToken2_

const edm::ESGetToken<DTGeometry, MuonGeometryRecord> MuonGeometryArrange::dtGeomToken2_
private

Definition at line 179 of file MuonGeometryArrange.h.

Referenced by analyze().

◆ dtGeomToken3_

const edm::ESGetToken<DTGeometry, MuonGeometryRecord> MuonGeometryArrange::dtGeomToken3_
private

Definition at line 183 of file MuonGeometryArrange.h.

Referenced by analyze().

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

◆ gemGeomIdealToken_

const edm::ESGetToken<GEMGeometry, MuonGeometryRecord> MuonGeometryArrange::gemGeomIdealToken_
private

Definition at line 189 of file MuonGeometryArrange.h.

◆ gemGeomToken1_

const edm::ESGetToken<GEMGeometry, MuonGeometryRecord> MuonGeometryArrange::gemGeomToken1_
private

Definition at line 177 of file MuonGeometryArrange.h.

Referenced by analyze().

◆ gemGeomToken2_

const edm::ESGetToken<GEMGeometry, MuonGeometryRecord> MuonGeometryArrange::gemGeomToken2_
private

Definition at line 181 of file MuonGeometryArrange.h.

Referenced by analyze().

◆ gemGeomToken3_

const edm::ESGetToken<GEMGeometry, MuonGeometryRecord> MuonGeometryArrange::gemGeomToken3_
private

Definition at line 185 of file MuonGeometryArrange.h.

Referenced by analyze().

◆ geomIdeal

std::string MuonGeometryArrange::geomIdeal
private

Definition at line 173 of file MuonGeometryArrange.h.

◆ idealInputLabel1

std::string MuonGeometryArrange::idealInputLabel1
private

Definition at line 173 of file MuonGeometryArrange.h.

◆ idealInputLabel2

std::string MuonGeometryArrange::idealInputLabel2
private

Definition at line 173 of file MuonGeometryArrange.h.

◆ idealInputLabel2a

std::string MuonGeometryArrange::idealInputLabel2a
private

Definition at line 173 of file MuonGeometryArrange.h.

◆ 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.