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 noexcept final
 
bool wantsGlobalRuns () const noexcept final
 
bool wantsInputProcessBlocks () const noexcept final
 
bool wantsProcessBlocks () const noexcept 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 noexcept
 
bool wantsStreamRuns () const noexcept
 
 ~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
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices 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 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, currentMuon, groupFilesInBlocks::fin, EcalPhiSymFlatTableProducers_cfi::id, testHGCalDigi_cfg::inFile, 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  while (!inFile.eof()) {
106  unsigned int listId;
107  inFile >> listId;
108  inFile.ignore(256, '\n');
109  if (listId != lastID) {
110  _weightByIdVector.push_back(listId);
111  }
112  lastID = listId;
113  }
114  inFile.close();
115  }
116 
117  //root configuration
118  _theFile = new TFile(_filename.c_str(), "RECREATE");
119  _alignTree = new TTree("alignTree", "alignTree");
120  _alignTree->Branch("id", &_id, "id/I");
121  _alignTree->Branch("level", &_level, "level/I");
122  _alignTree->Branch("mid", &_mid, "mid/I");
123  _alignTree->Branch("mlevel", &_mlevel, "mlevel/I");
124  _alignTree->Branch("sublevel", &_sublevel, "sublevel/I");
125  _alignTree->Branch("x", &_xVal, "x/F");
126  _alignTree->Branch("y", &_yVal, "y/F");
127  _alignTree->Branch("z", &_zVal, "z/F");
128  _alignTree->Branch("r", &_rVal, "r/F");
129  _alignTree->Branch("phi", &_phiVal, "phi/F");
130  _alignTree->Branch("eta", &_etaVal, "eta/F");
131  _alignTree->Branch("alpha", &_alphaVal, "alpha/F");
132  _alignTree->Branch("beta", &_betaVal, "beta/F");
133  _alignTree->Branch("gamma", &_gammaVal, "gamma/F");
134  _alignTree->Branch("dx", &_dxVal, "dx/F");
135  _alignTree->Branch("dy", &_dyVal, "dy/F");
136  _alignTree->Branch("dz", &_dzVal, "dz/F");
137  _alignTree->Branch("dr", &_drVal, "dr/F");
138  _alignTree->Branch("dphi", &_dphiVal, "dphi/F");
139  _alignTree->Branch("dalpha", &_dalphaVal, "dalpha/F");
140  _alignTree->Branch("dbeta", &_dbetaVal, "dbeta/F");
141  _alignTree->Branch("dgamma", &_dgammaVal, "dgamma/F");
142  _alignTree->Branch("ldx", &_ldxVal, "ldx/F");
143  _alignTree->Branch("ldy", &_ldyVal, "ldy/F");
144  _alignTree->Branch("ldz", &_ldzVal, "ldz/F");
145  _alignTree->Branch("ldr", &_ldrVal, "ldr/F");
146  _alignTree->Branch("ldphi", &_ldphiVal, "ldphi/F");
147  _alignTree->Branch("useDetId", &_useDetId, "useDetId/I");
148  _alignTree->Branch("detDim", &_detDim, "detDim/I");
149  _alignTree->Branch("rotx", &_rotxVal, "rotx/F");
150  _alignTree->Branch("roty", &_rotyVal, "roty/F");
151  _alignTree->Branch("rotz", &_rotzVal, "rotz/F");
152  _alignTree->Branch("drotx", &_drotxVal, "drotx/F");
153  _alignTree->Branch("droty", &_drotyVal, "droty/F");
154  _alignTree->Branch("drotz", &_drotzVal, "drotz/F");
155  _alignTree->Branch("surW", &_surWidth, "surW/F");
156  _alignTree->Branch("surL", &_surLength, "surL/F");
157  _alignTree->Branch("surRot", &_surRot, "surRot[9]/D");
158 
159  _mgacollection.clear();
160 }
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 634 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, gammaJetAnalysis_CHSJECs_cff::level, and theLevels.

634  {
635  if (firstEvent_) {
637  &iSetup.getData(dtGeomToken1_),
638  &iSetup.getData(cscGeomToken1_),
639  &iSetup.getData(gemGeomToken1_),
640  &iSetup.getData(dtGeomToken1_),
641  &iSetup.getData(cscGeomToken1_),
642  &iSetup.getData(gemGeomToken1_));
643  inputAlign1 = new MuonAlignment(iSetup, inputMethod1);
646  &iSetup.getData(dtGeomToken2_),
647  &iSetup.getData(cscGeomToken2_),
648  &iSetup.getData(gemGeomToken2_),
649  &iSetup.getData(dtGeomToken1_),
650  &iSetup.getData(cscGeomToken1_),
651  &iSetup.getData(gemGeomToken1_));
652  inputAlign2 = new MuonAlignment(iSetup, inputMethod2);
655  &iSetup.getData(dtGeomToken3_),
656  &iSetup.getData(cscGeomToken3_),
657  &iSetup.getData(gemGeomToken3_),
658  &iSetup.getData(dtGeomToken1_),
659  &iSetup.getData(cscGeomToken1_),
660  &iSetup.getData(gemGeomToken1_));
661  inputAlign2a = new MuonAlignment(iSetup, inputMethod2a);
663 
666  auto inputGeometry2Copy2 = inputAlign2a->getAlignableMuon();
667 
668  //setting the levels being used in the geometry comparator
669  edm::LogInfo("MuonGeometryArrange") << "levels: " << _levelStrings.size();
670  for (const auto& level : _levelStrings) {
671  theLevels.push_back(inputGeometry2Copy2->objectIdProvider().stringToId(level));
672  edm::LogInfo("MuonGeometryArrange") << "level: " << level;
673  }
674 
675  //compare the goemetries
676  compare(inputGeometry1, inputGeometry2, inputGeometry2Copy2);
677 
678  //write out ntuple
679  //might be better to do within output module
680  _theFile->cd();
681  _alignTree->Write();
682  endHist();
683  // _theFile->Close();
684 
685  firstEvent_ = false;
686  }
687 }
std::vector< align::StructureType > theLevels
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
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_
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 629 of file MuonGeometryArrange.cc.

References firstEvent_.

629 { firstEvent_ = true; }

◆ checkChosen()

bool MuonGeometryArrange::checkChosen ( Alignable ali)
private

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

1142  {
1143  // Check whether the item passed satisfies the criteria given.
1144  if (ali == nullptr)
1145  return false; // elementary sanity
1146  // Is this in the CSC section? If not, bail. Later may extend.
1147  if (ali->geomDetId().det() != DetId::Muon || ali->geomDetId().subdetId() != MuonSubdetId::CSC)
1148  return false;
1149  // If it is a CSC alignable, then check that the station, etc are
1150  // those requested.
1151  // One might think of aligning more than a single ring at a time,
1152  // by using a vector of ring numbers. I don't see the sense in
1153  // trying to align more than one station at a time for comparison.
1154  CSCDetId cscId(ali->geomDetId());
1155 #ifdef jnbdebug
1156  std::cout << "JNB " << ali->id() << " " << cscId.endcap() << " " << cscId.station() << " " << cscId.ring() << " "
1157  << cscId.chamber() << " " << _endcap << " " << _station << " " << _ring << "\n"
1158  << std::flush;
1159 #endif
1160  if (cscId.endcap() == _endcap && cscId.station() == _station && cscId.ring() == _ring) {
1161  return true;
1162  }
1163  return false;
1164 }
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 690 of file MuonGeometryArrange.cc.

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

Referenced by analyze().

690  {
691  // First sanity
692  if (refAli == nullptr) {
693  return;
694  }
695  if (curAli == nullptr) {
696  return;
697  }
698 
699  const auto& refComp = refAli->components();
700  const auto& curComp = curAli->components();
701  const auto& curComp2 = curAliCopy2->components();
702  compareGeometries(refAli, curAli, curAliCopy2);
703 
704  int nComp = refComp.size();
705  for (int i = 0; i < nComp; i++) {
706  compare(refComp[i], curComp[i], curComp2[i]);
707  }
708  return;
709 }
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 712 of file MuonGeometryArrange.cc.

References _weightBy, _weightById, _weightByIdVector, align::centerOfMass(), RPCNoise_example::check, Alignable::components(), align::createPoints(), ALCARECOPPSCalTrackBasedSel_cff::detid, 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().

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

632 {}

◆ endHist()

void MuonGeometryArrange::endHist ( )
private

Definition at line 162 of file MuonGeometryArrange.cc.

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

Referenced by analyze().

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

◆ fillTree()

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

Definition at line 919 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, Matriplex::atan2(), MuonGeometryArrange::MGACollection::beta, CSCDetId::chamber(), MuonSubdetId::CSC, MuonGeometryArrange::MGACollection::dalpha, MuonGeometryArrange::MGACollection::dbeta, MuonGeometryArrange::MGACollection::detDim, ALCARECOPPSCalTrackBasedSel_cff::detid, 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, 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().

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

◆ isMother()

bool MuonGeometryArrange::isMother ( Alignable ali)
private

Definition at line 1124 of file MuonGeometryArrange.cc.

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

Referenced by compareGeometries().

1124  {
1125  // Is this the mother ring?
1126  if (ali == nullptr)
1127  return false; // elementary sanity
1128  const auto& aliComp = ali->components();
1129 
1130  int size = aliComp.size();
1131  if (size <= 0)
1132  return false; // no subcomponents
1133 
1134  for (int i = 0; i < size; i++) {
1135  if (checkChosen(aliComp[i]))
1136  return true; // A ring has CSC chambers
1137  } // as subcomponents
1138  return false; // 1'st layer of subcomponents weren't CSC chambers
1139 }
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 586 of file MuonGeometryArrange.cc.

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

Referenced by endHist().

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

◆ passChosen()

bool MuonGeometryArrange::passChosen ( Alignable ali)
private

Definition at line 1167 of file MuonGeometryArrange.cc.

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

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

References _detIdFlagVector, ALCARECOPPSCalTrackBasedSel_cff::detid, and mps_fire::i.

Referenced by fillTree().

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