CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
TrackerGeometryCompare Class Reference

#include <TrackerGeometryCompare.h>

Inheritance diagram for TrackerGeometryCompare:
edm::EDAnalyzer edm::EDConsumerBase

Public Types

typedef std::vector< Alignable * > Alignables
 
typedef AlignTransform SurveyValue
 
typedef Alignments SurveyValues
 
- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob ()
 Read from DB and print survey info. More...
 
virtual void endJob ()
 
 TrackerGeometryCompare (const edm::ParameterSet &)
 Do nothing. Required by framework. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

void addSurveyInfo (Alignable *ali)
 
void compareGeometries (Alignable *refAli, Alignable *curAli, const TrackerTopology *tTopo)
 
void compareSurfaceDeformations (TTree *_inputTree11, TTree *_inputTree12)
 
void createROOTGeometry (const edm::EventSetup &iSetup)
 
void diffCommonTrackerSystem (Alignable *refAli, Alignable *curAli)
 
void fillIdentifiers (int subdetlevel, int rawid, const TrackerTopology *tTopo)
 
void fillTree (Alignable *refAli, const AlgebraicVector &diff, const TrackerTopology *tTopo)
 
bool passIdCut (uint32_t)
 
void setCommonTrackerSystem ()
 
void surveyToTracker (AlignableTracker *ali, Alignments *alignVals, AlignmentErrors *alignErrors)
 

Private Attributes

TTree * _alignTree
 
float _alphaVal
 
float _betaVal
 
align::StructureType _commonTrackerLevel
 
float _dalphaVal
 
float _daVal
 
float _dbetaVal
 
float _dbVal
 
int _detDim
 
bool _detIdFlag
 
std::string _detIdFlagFile
 
std::vector< uint32_t > _detIdFlagVector
 
float _dgammaVal
 
float _dgVal
 
float _dphiVal
 
float _drVal
 
float _duVal
 
float _dvVal
 
float _dwVal
 
float _dxVal
 
float _dyVal
 
float _dzVal
 
float _etaVal
 
std::string _filename
 
float _gammaVal
 
int _id
 
uint32_t _identifiers [6]
 
std::string _inputFilename1
 
std::string _inputFilename2
 
TFile * _inputRootFile1
 
TFile * _inputRootFile2
 
TTree * _inputTree01
 
TTree * _inputTree02
 
TTree * _inputTree11
 
TTree * _inputTree12
 
std::string _inputTreenameAlign
 
std::string _inputTreenameDeform
 
int _level
 
int _mid
 
int _mlevel
 
float _phiVal
 
float _rVal
 
std::string _setCommonTrackerSystem
 
int _sublevel
 
double _surfDeform [13]
 
float _surLength
 
double _surRot [9]
 
float _surWidth
 
TFile * _theFile
 
align::PositionType _TrackerCommonCM
 
align::GlobalVector _TrackerCommonR
 
align::GlobalVector _TrackerCommonT
 
int _type
 
int _useDetId
 
std::string _weightBy
 
bool _weightById
 
std::string _weightByIdFile
 
std::vector< unsigned int > _weightByIdVector
 
bool _writeToDB
 
float _xVal
 
float _yVal
 
float _zVal
 
AlignableTrackercurrentTracker
 
AlignableTrackerdummyTracker
 
bool firstEvent_
 
std::map< std::string, TH1D * > m_h1
 
int m_nBins
 
edm::ParameterSet m_params
 
double m_rangeHigh
 
double m_rangeLow
 
std::vector< align::StructureTypem_theLevels
 
std::vector< TrackerMapm_vtkmap
 
AlignableTrackerreferenceTracker
 
const SurveyErrorstheSurveyErrors
 
unsigned int theSurveyIndex
 
const AlignmentstheSurveyValues
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
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 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)
 

Detailed Description

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

Usage: module comparator = TrackerGeometryCompare {

lots of stuff

} path p = { comparator }

Date:
2012/12/02 22:13:12
Revision:
1.14
Author
Nhan Tran

******** Including surface deformations in the geometry comparison ********


Definition at line 50 of file TrackerGeometryCompare.h.

Member Typedef Documentation

Definition at line 54 of file TrackerGeometryCompare.h.

Definition at line 52 of file TrackerGeometryCompare.h.

Definition at line 53 of file TrackerGeometryCompare.h.

Constructor & Destructor Documentation

TrackerGeometryCompare::TrackerGeometryCompare ( const edm::ParameterSet cfg)

Do nothing. Required by framework.

Definition at line 54 of file TrackerGeometryCompare.cc.

References _alignTree, _alphaVal, _betaVal, _dalphaVal, _daVal, _dbetaVal, _dbVal, _detDim, _detIdFlag, _detIdFlagFile, _detIdFlagVector, _dgammaVal, _dgVal, _dphiVal, _drVal, _duVal, _dvVal, _dwVal, _dxVal, _dyVal, _dzVal, _etaVal, _filename, _gammaVal, _id, _identifiers, _inputFilename1, _inputFilename2, _inputTreenameAlign, _inputTreenameDeform, _level, _mid, _mlevel, _phiVal, _rVal, _setCommonTrackerSystem, _sublevel, _surfDeform, _surLength, _surRot, _surWidth, _theFile, _type, _useDetId, _weightBy, _weightById, _weightByIdFile, _weightByIdVector, _writeToDB, _xVal, _yVal, _zVal, groupFilesInBlocks::fin, edm::ParameterSet::getUntrackedParameter(), cuy::ii, ConfigFiles::l, m_h1, m_nBins, m_rangeHigh, m_rangeLow, m_theLevels, m_vtkmap, TFileDirectory::make(), TFileService::mkdir(), AlCaHLTBitMon_QueryRunRegistry::string, and AlignableObjectId::stringToId().

54  :
55  m_params( cfg ),
57  dummyTracker(0),
58  currentTracker(0),
59  theSurveyIndex(0),
60  theSurveyValues(0),
61  theSurveyErrors(0),
63  _inputRootFile1(0),
64  _inputRootFile2(0),
65  _inputTree01(0),
66  _inputTree02(0),
67  _inputTree11(0),
68  _inputTree12(0),
69  m_nBins(10000),
70  m_rangeLow(-.1),
71  m_rangeHigh(.1),
72  firstEvent_(true),
73  m_vtkmap(13)
74 {
75 
76  //input is ROOT
77  _inputFilename1 = cfg.getUntrackedParameter< std::string > ("inputROOTFile1");
78  _inputFilename2 = cfg.getUntrackedParameter< std::string > ("inputROOTFile2");
79  _inputTreenameAlign = cfg.getUntrackedParameter< std::string > ("treeNameAlign");
80  _inputTreenameDeform = cfg.getUntrackedParameter< std::string > ("treeNameDeform");
81 
82  //output file
83  _filename = cfg.getUntrackedParameter< std::string > ("outputFile");
84 
85  _writeToDB = cfg.getUntrackedParameter< bool > ("writeToDB" );
86 
87  const std::vector<std::string>& levels = cfg.getUntrackedParameter< std::vector<std::string> > ("levels");
88 
89  _weightBy = cfg.getUntrackedParameter< std::string > ("weightBy");
90  _setCommonTrackerSystem = cfg.getUntrackedParameter< std::string > ("setCommonTrackerSystem");
91  _detIdFlag = cfg.getUntrackedParameter< bool > ("detIdFlag");
92  _detIdFlagFile = cfg.getUntrackedParameter< std::string > ("detIdFlagFile");
93  _weightById = cfg.getUntrackedParameter< bool > ("weightById");
94  _weightByIdFile = cfg.getUntrackedParameter< std::string > ("weightByIdFile");
95 
96  //setting the levels being used in the geometry comparator
97  //DM_534?? AlignableObjectId dummy;
98  edm::LogInfo("TrackerGeometryCompare") << "levels: " << levels.size();
99  for (unsigned int l = 0; l < levels.size(); ++l){
100  m_theLevels.push_back(AlignableObjectId::stringToId(levels[l])) ; //DM_61X??
101  //DM_534?? m_theLevels.push_back( dummy.nameToType(levels[l]));
102  edm::LogInfo("TrackerGeometryCompare") << "level: " << levels[l];
103  edm::LogInfo("TrackerGeometryCompare") << "structure type: " << AlignableObjectId::stringToId(levels[l]) ;
104  //DM_534?? edm::LogInfo("TrackerGeometryCompare") << "structure type: " << dummy.typeToName(m_theLevels.at(l));
105  }
106 
107 
108  // if want to use, make id cut list
109  if (_detIdFlag){
110  std::ifstream fin;
111  fin.open( _detIdFlagFile.c_str() );
112 
113  while (!fin.eof() && fin.good() ){
114 
115  uint32_t id;
116  fin >> id;
117  _detIdFlagVector.push_back(id);
118  }
119  fin.close();
120  }
121 
122  // turn weightByIdFile into weightByIdVector
123  if (_weightById){
124  std::ifstream inFile;
125  inFile.open( _weightByIdFile.c_str() );
126  int ctr = 0;
127  while ( !inFile.eof() ){
128  ctr++;
129  unsigned int listId;
130  inFile >> listId;
131  inFile.ignore(256, '\n');
132 
133  _weightByIdVector.push_back( listId );
134  }
135  inFile.close();
136  }
137 
138  //root configuration
139  _theFile = new TFile(_filename.c_str(),"RECREATE");
140  _alignTree = new TTree("alignTree","alignTree");//,"id:level:mid:mlevel:sublevel:x:y:z:r:phi:a:b:c:dx:dy:dz:dr:dphi:da:db:dc");
141  _alignTree->Branch("id", &_id, "id/I");
142  _alignTree->Branch("level", &_level, "level/I");
143  _alignTree->Branch("mid", &_mid, "mid/I");
144  _alignTree->Branch("mlevel", &_mlevel, "mlevel/I");
145  _alignTree->Branch("sublevel", &_sublevel, "sublevel/I");
146  _alignTree->Branch("x", &_xVal, "x/F");
147  _alignTree->Branch("y", &_yVal, "y/F");
148  _alignTree->Branch("z", &_zVal, "z/F");
149  _alignTree->Branch("r", &_rVal, "r/F");
150  _alignTree->Branch("phi", &_phiVal, "phi/F");
151  _alignTree->Branch("eta", &_etaVal, "eta/F");
152  _alignTree->Branch("alpha", &_alphaVal, "alpha/F");
153  _alignTree->Branch("beta", &_betaVal, "beta/F");
154  _alignTree->Branch("gamma", &_gammaVal, "gamma/F");
155  _alignTree->Branch("dx", &_dxVal, "dx/F");
156  _alignTree->Branch("dy", &_dyVal, "dy/F");
157  _alignTree->Branch("dz", &_dzVal, "dz/F");
158  _alignTree->Branch("dr", &_drVal, "dr/F");
159  _alignTree->Branch("dphi", &_dphiVal, "dphi/F");
160  _alignTree->Branch("dalpha", &_dalphaVal, "dalpha/F");
161  _alignTree->Branch("dbeta", &_dbetaVal, "dbeta/F");
162  _alignTree->Branch("dgamma", &_dgammaVal, "dgamma/F");
163  _alignTree->Branch("du", &_duVal, "du/F");
164  _alignTree->Branch("dv", &_dvVal, "dv/F");
165  _alignTree->Branch("dw", &_dwVal, "dw/F");
166  _alignTree->Branch("da", &_daVal, "da/F");
167  _alignTree->Branch("db", &_dbVal, "db/F");
168  _alignTree->Branch("dg", &_dgVal, "dg/F");
169  _alignTree->Branch("useDetId", &_useDetId, "useDetId/I");
170  _alignTree->Branch("detDim", &_detDim, "detDim/I");
171  _alignTree->Branch("surW", &_surWidth, "surW/F");
172  _alignTree->Branch("surL", &_surLength, "surL/F");
173  _alignTree->Branch("surRot", &_surRot, "surRot[9]/D");
174  _alignTree->Branch("identifiers", &_identifiers, "identifiers[6]/I");
175  _alignTree->Branch("type", &_type, "type/I");
176  _alignTree->Branch("surfDeform", &_surfDeform, "surfDeform[13]/D");
177 
178  for (std::vector<TrackerMap>::iterator it = m_vtkmap.begin(); it != m_vtkmap.end(); ++it) {
179  it->setPalette(1) ;
180  it->addPixel(true) ;
181  }
182 
184  TFileDirectory subDir_All = fs->mkdir( "AllSubdetectors" );
185  TFileDirectory subDir_PXB = fs->mkdir( "PixelBarrel" );
186  TFileDirectory subDir_PXF = fs->mkdir( "PixelEndcap" );
187  for (int ii = 0; ii < 13; ++ii) {
188  std::stringstream histname0 ;
189  histname0 << "SurfDeform_Par_" << ii ;
190  m_h1[histname0.str()] = subDir_All.make<TH1D>((histname0.str()).c_str(),(histname0.str()).c_str(),m_nBins,m_rangeLow,m_rangeHigh);
191 
192  std::stringstream histname1 ;
193  histname1 << "SurfDeform_PixelBarrel_Par_" << ii ;
194  m_h1[histname1.str()] = subDir_PXB.make<TH1D>((histname1.str()).c_str(),(histname1.str()).c_str(),m_nBins,m_rangeLow,m_rangeHigh);
195 
196  std::stringstream histname2 ;
197  histname2 << "SurfDeform_PixelEndcap_Par_" << ii ;
198  m_h1[histname2.str()] = subDir_PXF.make<TH1D>((histname2.str()).c_str(),(histname2.str()).c_str(),m_nBins,m_rangeLow,m_rangeHigh);
199  }
200 
201 }
T getUntrackedParameter(std::string const &, T const &) const
std::vector< align::StructureType > m_theLevels
const Alignments * theSurveyValues
std::vector< TrackerMap > m_vtkmap
int ii
Definition: cuy.py:588
AlignableTracker * dummyTracker
static align::StructureType stringToId(const char *)
std::map< std::string, TH1D * > m_h1
std::vector< uint32_t > _detIdFlagVector
T * make(const Args &...args) const
make new ROOT object
align::StructureType _commonTrackerLevel
AlignableTracker * currentTracker
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
Definition: TFileService.h:69
AlignableTracker * referenceTracker
const SurveyErrors * theSurveyErrors
std::vector< unsigned int > _weightByIdVector

Member Function Documentation

void TrackerGeometryCompare::addSurveyInfo ( Alignable ali)
private

Definition at line 890 of file TrackerGeometryCompare.cc.

References Alignable::alignableObjectId(), AlCaHLTBitMon_QueryRunRegistry::comp, Alignable::components(), relativeConstraints::error, edm::hlt::Exception, Alignable::geomDetId(), i, AlignableSurface::length(), Alignments::m_align, SurveyErrors::m_surveyErrors, SurveyError::matrix(), SurveyError::rawId(), DetId::rawId(), makeMuonMisalignmentScenario::rot, AlignableSurface::setLength(), Alignable::setSurvey(), AlignableSurface::setWidth(), SurveyError::structureType(), Alignable::surface(), theSurveyErrors, theSurveyIndex, theSurveyValues, and AlignableSurface::width().

890  {
891 
892  const std::vector<Alignable*>& comp = ali->components();
893 
894  unsigned int nComp = comp.size();
895 
896  for (unsigned int i = 0; i < nComp; ++i) addSurveyInfo(comp[i]);
897 
899 
900  if ( ali->geomDetId().rawId() != error.rawId() ||
901  ali->alignableObjectId() != error.structureType() )
902  {
903  throw cms::Exception("DatabaseError")
904  << "Error reading survey info from DB. Mismatched id!";
905  }
906 
907  const CLHEP::Hep3Vector& pos = theSurveyValues->m_align[theSurveyIndex].translation();
908  const CLHEP::HepRotation& rot = theSurveyValues->m_align[theSurveyIndex].rotation();
909 
910  AlignableSurface surf( align::PositionType( pos.x(), pos.y(), pos.z() ),
911  align::RotationType( rot.xx(), rot.xy(), rot.xz(),
912  rot.yx(), rot.yy(), rot.yz(),
913  rot.zx(), rot.zy(), rot.zz() ) );
914 
915  surf.setWidth( ali->surface().width() );
916  surf.setLength( ali->surface().length() );
917 
918  ali->setSurvey( new SurveyDet( surf, error.matrix() ) );
919 
920  ++theSurveyIndex;
921 
922 }
align::Scalar width() const
int i
Definition: DBlmapReader.cc:9
ErrorMatrix matrix() const
Definition: SurveyError.h:76
const Alignments * theSurveyValues
void addSurveyInfo(Alignable *ali)
uint8_t structureType() const
Definition: SurveyError.h:66
virtual Alignables components() const =0
Return vector of all direct components.
std::vector< AlignTransform > m_align
Definition: Alignments.h:19
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
virtual StructureType alignableObjectId() const =0
Return the alignable type identifier.
align::ID rawId() const
Definition: SurveyError.h:71
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
Definition: Alignable.h:126
align::Scalar length() const
void setSurvey(const SurveyDet *)
Set survey info.
Definition: Alignable.cc:268
const SurveyErrors * theSurveyErrors
std::vector< SurveyError > m_surveyErrors
Definition: SurveyErrors.h:23
const DetId & geomDetId() const
Definition: Alignable.h:177
void TrackerGeometryCompare::analyze ( const edm::Event ,
const edm::EventSetup iSetup 
)
virtual

Implements edm::EDAnalyzer.

Definition at line 227 of file TrackerGeometryCompare.cc.

References _inputTree11, _inputTree12, _setCommonTrackerSystem, _writeToDB, AlignableTracker::alignmentErrors(), AlignableTracker::alignments(), cond::service::PoolDBOutputService::beginOfTime(), compareGeometries(), compareSurfaceDeformations(), createROOTGeometry(), currentTracker, firstEvent_, edm::EventSetup::get(), edm::Service< T >::isAvailable(), edm::ESHandle< class >::product(), referenceTracker, setCommonTrackerSystem(), and cond::service::PoolDBOutputService::writeOne().

227  {
228 
229  if (firstEvent_) {
230 
231  //Retrieve tracker topology from geometry
232  edm::ESHandle<TrackerTopology> tTopoHandle;
233  iSetup.get<IdealGeometryRecord>().get(tTopoHandle);
234  const TrackerTopology* const tTopo = tTopoHandle.product();
235 
236  //upload the ROOT geometries
237  createROOTGeometry(iSetup);
238 
239  //set common tracker system first
240  // if setting the tracker common system
241  if (_setCommonTrackerSystem != "NONE"){
243  }
244 
245  //compare the goemetries
248 
249  //write out ntuple
250  //might be better to do within output module
251 
252  if (_writeToDB){
253  Alignments* myAlignments = currentTracker->alignments();
254  AlignmentErrors* myAlignmentErrors = currentTracker->alignmentErrors();
255 
256  // 2. Store alignment[Error]s to DB
258  // Call service
259  if( !poolDbService.isAvailable() ) // Die if not available
260  throw cms::Exception("NotAvailable") << "PoolDBOutputService not available";
261 
262  poolDbService->writeOne<Alignments>(&(*myAlignments), poolDbService->beginOfTime(), "TrackerAlignmentRcd");
263  poolDbService->writeOne<AlignmentErrors>(&(*myAlignmentErrors), poolDbService->beginOfTime(), "TrackerAlignmentErrorRcd");
264 
265  }
266 
267  firstEvent_ = false;
268  }
269 }
void compareGeometries(Alignable *refAli, Alignable *curAli, const TrackerTopology *tTopo)
bool isAvailable() const
Definition: Service.h:46
AlignmentErrors * alignmentErrors() const
Return alignment errors, sorted by DetId.
void writeOne(T *payload, Time_t time, const std::string &recordName, bool withlogging=false)
AlignableTracker * currentTracker
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:86
AlignableTracker * referenceTracker
void createROOTGeometry(const edm::EventSetup &iSetup)
Alignments * alignments() const
Return alignments, sorted by DetId.
void compareSurfaceDeformations(TTree *_inputTree11, TTree *_inputTree12)
void TrackerGeometryCompare::beginJob ( void  )
virtual

Read from DB and print survey info.

Reimplemented from edm::EDAnalyzer.

Definition at line 203 of file TrackerGeometryCompare.cc.

References firstEvent_.

203  {
204  firstEvent_ = true;
205 }
void TrackerGeometryCompare::compareGeometries ( Alignable refAli,
Alignable curAli,
const TrackerTopology tTopo 
)
private

Definition at line 586 of file TrackerGeometryCompare.cc.

References _weightBy, _weightById, _weightByIdVector, Alignable::alignableObjectId(), CastorDataFrameFilter_impl::check(), Alignable::components(), cond::rpcobgas::detid, diffTreeTool::diff, align::diffAlignables(), PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, alignCSCRings::e, edm::hlt::Exception, fillTree(), Alignable::geomDetId(), i, Alignable::id(), m_theLevels, PV3DBase< T, PVType, FrameType >::mag(), align::moveAlignable(), DetId::rawId(), and makeMuonMisalignmentScenario::rot.

Referenced by analyze().

586  {
587 
588  using namespace align ;
589 
590  const std::vector<Alignable*>& refComp = refAli->components();
591  const std::vector<Alignable*>& curComp = curAli->components();
592 
593  unsigned int nComp = refComp.size();
594  //only perform for designate levels
595  bool useLevel = false;
596  for (unsigned int i = 0; i < m_theLevels.size(); ++i){
597  if (refAli->alignableObjectId() == m_theLevels[i]) useLevel = true;
598  }
599 
600  //another added level for difference between det and detunit
601  //if ((refAli->alignableObjectId()==2)&&(nComp == 1)) useLevel = false;
602 
603  //coordinate matching, etc etc
604  if (useLevel){
605  DetId detid(refAli->id());
606 
607  CLHEP::Hep3Vector Rtotal, Wtotal, lRtotal, lWtotal;
608  Rtotal.set(0.,0.,0.);
609  Wtotal.set(0.,0.,0.);
610  lRtotal.set(0.,0.,0.);
611  lWtotal.set(0.,0.,0.);
612 
613  for (int i = 0; i < 100; i++){
615  CLHEP::Hep3Vector dR(diff[0],diff[1],diff[2]);
616  Rtotal+=dR;
617  CLHEP::Hep3Vector dW(diff[3],diff[4],diff[5]);
618  CLHEP::HepRotation rot(Wtotal.unit(),Wtotal.mag());
619  CLHEP::HepRotation drot(dW.unit(),dW.mag());
620  rot*=drot;
621  Wtotal.set(rot.axis().x()*rot.delta(), rot.axis().y()*rot.delta(), rot.axis().z()*rot.delta());
622  // local coordinates
623  lRtotal.set(diff[6],diff[7],diff[8]);
624  lWtotal.set(diff[9],diff[10],diff[11]);
625 
626  align::moveAlignable(curAli, diff);
627  float tolerance = 1e-7;
629  align::GlobalVector checkR(check[0],check[1],check[2]);
630  align::GlobalVector checkW(check[3],check[4],check[5]);
631  if ((checkR.mag() > tolerance)||(checkW.mag() > tolerance)){
632  edm::LogInfo("TrackerGeometryCompare") << "Tolerance Exceeded!(alObjId: " << refAli->alignableObjectId()
633  << ", rawId: " << refAli->geomDetId().rawId()
634  << ", subdetId: "<< detid.subdetId() << "): " << diff;
635  throw cms::Exception("Tolerance in TrackerGeometryCompare exceeded");
636  }
637  else{
638  break;
639  }
640  }
641 
642  AlgebraicVector TRtot(12);
643  // global
644  TRtot(1) = Rtotal.x(); TRtot(2) = Rtotal.y(); TRtot(3) = Rtotal.z();
645  TRtot(4) = Wtotal.x(); TRtot(5) = Wtotal.y(); TRtot(6) = Wtotal.z();
646  // local
647  TRtot(7) = lRtotal.x(); TRtot(8) = lRtotal.y(); TRtot(9) = lRtotal.z();
648  TRtot(10) = lWtotal.x(); TRtot(11) = lWtotal.y(); TRtot(12) = lWtotal.z();
649 
650  fillTree(refAli, TRtot, tTopo);
651  }
652 
653  // another added level for difference between det and detunit
654  for (unsigned int i = 0; i < nComp; ++i)
655  compareGeometries(refComp[i],curComp[i],tTopo);
656 
657 }
align::ID id() const
Return the ID of Alignable, i.e. DetId of &#39;first&#39; component GeomDet(Unit).
Definition: Alignable.h:180
int i
Definition: DBlmapReader.cc:9
void compareGeometries(Alignable *refAli, Alignable *curAli, const TrackerTopology *tTopo)
std::vector< align::StructureType > m_theLevels
AlgebraicVector diffAlignables(Alignable *refAli, Alignable *curAli, const std::string &weightBy, bool weightById, const std::vector< unsigned int > &weightByIdVector)
Definition: AlignTools.cc:10
virtual Alignables components() const =0
Return vector of all direct components.
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
bool check(const DataFrame &df, bool capcheck, bool dvercheck)
virtual StructureType alignableObjectId() const =0
Return the alignable type identifier.
void fillTree(Alignable *refAli, const AlgebraicVector &diff, const TrackerTopology *tTopo)
Definition: DetId.h:18
CLHEP::HepVector AlgebraicVector
std::vector< unsigned int > _weightByIdVector
void moveAlignable(Alignable *ali, AlgebraicVector diff)
Moves the alignable by the AlgebraicVector.
Definition: AlignTools.cc:81
const DetId & geomDetId() const
Definition: Alignable.h:177
void TrackerGeometryCompare::compareSurfaceDeformations ( TTree *  _inputTree11,
TTree *  _inputTree12 
)
private

Definition at line 443 of file TrackerGeometryCompare.cc.

References _inputFilename1, _inputFilename2, _inputRootFile1, _inputRootFile2, _inputTreenameDeform, _surfDeform, cuy::ii, m_h1, m_nBins, m_rangeHigh, m_rangeLow, m_vtkmap, and reco::return().

Referenced by analyze().

443  {
444 
445  if (_inputFilename1 != "IDEAL" && _inputFilename2 != "IDEAL") {
446 
447  int inputRawid1;
448  int inputRawid2;
449  int inputSubdetid1, inputSubdetid2 ;
450  int inputDtype1, inputDtype2 ;
451  std::vector<double> inputDpar1;
452  std::vector<double> inputDpar2 ;
453  std::vector<double>* p_inputDpar1 = &inputDpar1;
454  std::vector<double>* p_inputDpar2 = &inputDpar2;
455 
456  TTree* refTree = (TTree*) _inputRootFile1->Get(_inputTreenameDeform.c_str());
457  refTree->SetBranchAddress("irawid", &inputRawid1);
458  refTree->SetBranchAddress("subdetid", &inputSubdetid1);
459  refTree->SetBranchAddress("dtype", &inputDtype1);
460  refTree->SetBranchAddress("dpar", &p_inputDpar1);
461 
462  TTree* curTree = (TTree*) _inputRootFile2->Get(_inputTreenameDeform.c_str());
463  curTree->SetBranchAddress("irawid", &inputRawid2);
464  curTree->SetBranchAddress("subdetid", &inputSubdetid2);
465  curTree->SetBranchAddress("dtype", &inputDtype2);
466  curTree->SetBranchAddress("dpar", &p_inputDpar2);
467 
468  unsigned int nEntries11 = refTree->GetEntries();
469  unsigned int nEntries12 = curTree->GetEntries();
470 
471  if (nEntries11 != nEntries12) {
472  edm::LogError("TrackerGeometryCompare") << " Surface deformation parameters in two geometries differ!\n" ;
473  return ;
474  }
475 
476  for (unsigned int iEntry = 0; iEntry < nEntries12; ++iEntry) {
477  refTree->GetEntry(iEntry) ;
478  curTree->GetEntry(iEntry) ;
479  for (int ii = 0; ii < 13; ++ii) { _surfDeform[ii] = -1.0 ; }
480  for (int npar = 0; npar < int(inputDpar2.size()); ++npar ) {
481  if (inputRawid1 == inputRawid2) {
482  _surfDeform[npar] = inputDpar2.at(npar) - inputDpar1.at(npar) ;
483  std::stringstream histname0 ;
484  histname0 << "SurfDeform_Par_" << npar ;
485  if ( TMath::Abs(_surfDeform[npar]) > (m_rangeHigh - m_rangeLow)/(10.*m_nBins) ) m_h1[histname0.str()]->Fill(_surfDeform[npar]) ;
486  if (inputSubdetid1 == 1 && inputSubdetid2 == 1) {
487  std::stringstream histname1 ;
488  histname1 << "SurfDeform_PixelBarrel_Par_" << npar ;
489  if ( TMath::Abs(_surfDeform[npar]) > (m_rangeHigh - m_rangeLow)/(10.*m_nBins) ) m_h1[histname1.str()]->Fill(_surfDeform[npar]) ;
490  }
491  if (inputSubdetid1 == 2 && inputSubdetid2 == 2) {
492  std::stringstream histname2 ;
493  histname2 << "SurfDeform_PixelEndcap_Par_" << npar ;
494  if ( TMath::Abs(_surfDeform[npar]) > (m_rangeHigh - m_rangeLow)/(10.*m_nBins) ) m_h1[histname2.str()]->Fill(_surfDeform[npar]) ;
495  }
496  (m_vtkmap.at(npar)).fill_current_val(inputRawid1,_surfDeform[npar]) ;
497  }
498  }
499  }
500 
501  } else if ( _inputFilename1 == "IDEAL" && _inputFilename2 != "IDEAL" ) {
502 
503  int inputRawid2;
504  int inputSubdetid2 ;
505  int inputDtype2 ;
506  std::vector<double> inputDpar2 ;
507  std::vector<double>* p_inputDpar2 = &inputDpar2;
508 
509  TTree* curTree = (TTree*) _inputRootFile2->Get(_inputTreenameDeform.c_str());
510  curTree->SetBranchAddress("irawid", &inputRawid2);
511  curTree->SetBranchAddress("subdetid", &inputSubdetid2);
512  curTree->SetBranchAddress("dtype", &inputDtype2);
513  curTree->SetBranchAddress("dpar", &p_inputDpar2);
514 
515  unsigned int nEntries12 = curTree->GetEntries();
516 
517  for (unsigned int iEntry = 0; iEntry < nEntries12; ++iEntry) {
518  curTree->GetEntry(iEntry) ;
519  for (int ii = 0; ii < 12; ++ii) { _surfDeform[ii] = -1.0 ; }
520  for (int npar = 0; npar < int(inputDpar2.size()); ++npar ) {
521  _surfDeform[npar] = inputDpar2.at(npar) ;
522  std::stringstream histname0 ;
523  histname0 << "SurfDeform_Par_" << npar ;
524  if ( TMath::Abs(_surfDeform[npar]) > (m_rangeHigh - m_rangeLow)/(10.*m_nBins) ) m_h1[histname0.str()]->Fill(_surfDeform[npar]) ;
525  if (inputSubdetid2 == 1) {
526  std::stringstream histname1 ;
527  histname1 << "SurfDeform_PixelBarrel_Par_" << npar ;
528  if ( TMath::Abs(_surfDeform[npar]) > (m_rangeHigh - m_rangeLow)/(10.*m_nBins) ) m_h1[histname1.str()]->Fill(_surfDeform[npar]) ;
529  }
530  if (inputSubdetid2 == 2) {
531  std::stringstream histname2 ;
532  histname2 << "SurfDeform_PixelEndcap_Par_" << npar ;
533  if ( TMath::Abs(_surfDeform[npar]) > (m_rangeHigh - m_rangeLow)/(10.*m_nBins) ) m_h1[histname2.str()]->Fill(_surfDeform[npar]) ;
534  }
535  (m_vtkmap.at(npar)).fill_current_val(inputRawid2,_surfDeform[npar]) ;
536  }
537  }
538 
539  } else if ( _inputFilename1 != "IDEAL" && _inputFilename2 == "IDEAL" ) {
540 
541  int inputRawid1;
542  int inputSubdetid1 ;
543  int inputDtype1 ;
544  std::vector<double> inputDpar1;
545  std::vector<double>* p_inputDpar1 = &inputDpar1;
546 
547  TTree* refTree = (TTree*) _inputRootFile1->Get(_inputTreenameDeform.c_str());
548  refTree->SetBranchAddress("irawid", &inputRawid1);
549  refTree->SetBranchAddress("subdetid", &inputSubdetid1);
550  refTree->SetBranchAddress("dtype", &inputDtype1);
551  refTree->SetBranchAddress("dpar", &p_inputDpar1);
552 
553  unsigned int nEntries11 = refTree->GetEntries();
554 
555  for (unsigned int iEntry = 0; iEntry < nEntries11; ++iEntry) {
556  refTree->GetEntry(iEntry) ;
557  for (int ii = 0; ii < 12; ++ii) { _surfDeform[ii] = -1.0 ; }
558  for (int npar = 0; npar < int(inputDpar1.size()); ++npar ) {
559  _surfDeform[npar] = - inputDpar1.at(npar) ;
560  std::stringstream histname0 ;
561  histname0 << "SurfDeform_Par_" << npar ;
562  if ( TMath::Abs(_surfDeform[npar]) > (m_rangeHigh - m_rangeLow)/(10.*m_nBins) ) m_h1[histname0.str()]->Fill(_surfDeform[npar]) ;
563  if (inputSubdetid1 == 1) {
564  std::stringstream histname1 ;
565  histname1 << "SurfDeform_PixelBarrel_Par_" << npar ;
566  if ( TMath::Abs(_surfDeform[npar]) > (m_rangeHigh - m_rangeLow)/(10.*m_nBins) ) m_h1[histname1.str()]->Fill(_surfDeform[npar]) ;
567  }
568  if (inputSubdetid1 == 2) {
569  std::stringstream histname2 ;
570  histname2 << "SurfDeform_PixelEndcap_Par_" << npar ;
571  if ( TMath::Abs(_surfDeform[npar]) > (m_rangeHigh - m_rangeLow)/(10.*m_nBins) ) m_h1[histname2.str()]->Fill(_surfDeform[npar]) ;
572  }
573  (m_vtkmap.at(npar)).fill_current_val(inputRawid1,_surfDeform[npar]) ;
574  }
575  }
576 
577  } else if ( _inputFilename1 == "IDEAL" && _inputFilename2 == "IDEAL" ) {
578 
579  edm::LogInfo("TrackerGeometryCompare") << ">>>> Comparing IDEAL with IDEAL: nothing to do! <<<<\n" ;
580 
581  }
582 
583  return ;
584 }
std::vector< TrackerMap > m_vtkmap
int ii
Definition: cuy.py:588
std::map< std::string, TH1D * > m_h1
return(e1-e2)*(e1-e2)+dp *dp
void TrackerGeometryCompare::createROOTGeometry ( const edm::EventSetup iSetup)
private

Definition at line 271 of file TrackerGeometryCompare.cc.

References _inputFilename1, _inputFilename2, _inputRootFile1, _inputRootFile2, _inputTree01, _inputTree02, _inputTree11, _inputTree12, _inputTreenameAlign, _inputTreenameDeform, GeometryAligner::applyAlignments(), TrackerGeomBuilderFromGeometricDet::build(), SurfaceDeformationFactory::create(), currentTracker, Alignable::deepComponents(), align::DetectorGlobalPosition(), edm::EventSetup::get(), edm::eventsetup::EventSetupRecord::get(), i, Alignments::m_align, AlignmentErrors::m_alignError, m_params, edm::ESHandle< class >::product(), referenceTracker, python.multivaluedict::sort(), and DetId::Tracker.

Referenced by analyze().

271  {
272 
273  int inputRawId1, inputRawId2;
274  double inputX1, inputY1, inputZ1, inputX2, inputY2, inputZ2;
275  double inputAlpha1, inputBeta1, inputGamma1, inputAlpha2, inputBeta2, inputGamma2;
276 
277  //Retrieve tracker topology from geometry
278  edm::ESHandle<TrackerTopology> tTopoHandle;
279  iSetup.get<IdealGeometryRecord>().get(tTopoHandle);
280  const TrackerTopology* const tTopo = tTopoHandle.product();
281 
282  //declare alignments
283  Alignments* alignments1 = new Alignments();
284  AlignmentErrors* alignmentErrors1 = new AlignmentErrors();
285  if (_inputFilename1 != "IDEAL"){
286  _inputRootFile1 = new TFile(_inputFilename1.c_str());
287  TTree* _inputTree01 = (TTree*) _inputRootFile1->Get(_inputTreenameAlign.c_str());
288  _inputTree01->SetBranchAddress("rawid", &inputRawId1);
289  _inputTree01->SetBranchAddress("x", &inputX1);
290  _inputTree01->SetBranchAddress("y", &inputY1);
291  _inputTree01->SetBranchAddress("z", &inputZ1);
292  _inputTree01->SetBranchAddress("alpha", &inputAlpha1);
293  _inputTree01->SetBranchAddress("beta", &inputBeta1);
294  _inputTree01->SetBranchAddress("gamma", &inputGamma1);
295 
296  int nEntries1 = _inputTree01->GetEntries();
297  //fill alignments
298  for (int i = 0; i < nEntries1; ++i){
299 
300  _inputTree01->GetEntry(i);
301  CLHEP::Hep3Vector translation1(inputX1, inputY1, inputZ1);
302  CLHEP::HepEulerAngles eulerangles1(inputAlpha1,inputBeta1,inputGamma1);
303  uint32_t detid1 = inputRawId1;
304  AlignTransform transform1(translation1, eulerangles1, detid1);
305  alignments1->m_align.push_back(transform1);
306 
307  //dummy errors
308  CLHEP::HepSymMatrix clhepSymMatrix(3,0);
309  AlignTransformError transformError(clhepSymMatrix, detid1);
310  alignmentErrors1->m_alignError.push_back(transformError);
311  }
312 
313  // to get the right order
314  std::sort( alignments1->m_align.begin(), alignments1->m_align.end(), lessAlignmentDetId<AlignTransform>() );
315  std::sort( alignmentErrors1->m_alignError.begin(), alignmentErrors1->m_alignError.end(), lessAlignmentDetId<AlignTransformError>() );
316  }
317  //------------------
318  Alignments* alignments2 = new Alignments();
319  AlignmentErrors* alignmentErrors2 = new AlignmentErrors();
320  if (_inputFilename2 != "IDEAL"){
321  _inputRootFile2 = new TFile(_inputFilename2.c_str());
322  TTree* _inputTree02 = (TTree*) _inputRootFile2->Get(_inputTreenameAlign.c_str());
323  _inputTree02->SetBranchAddress("rawid", &inputRawId2);
324  _inputTree02->SetBranchAddress("x", &inputX2);
325  _inputTree02->SetBranchAddress("y", &inputY2);
326  _inputTree02->SetBranchAddress("z", &inputZ2);
327  _inputTree02->SetBranchAddress("alpha", &inputAlpha2);
328  _inputTree02->SetBranchAddress("beta", &inputBeta2);
329  _inputTree02->SetBranchAddress("gamma", &inputGamma2);
330 
331  int nEntries2 = _inputTree02->GetEntries();
332  //fill alignments
333  for (int i = 0; i < nEntries2; ++i){
334 
335  _inputTree02->GetEntry(i);
336  CLHEP::Hep3Vector translation2(inputX2, inputY2, inputZ2);
337  CLHEP::HepEulerAngles eulerangles2(inputAlpha2,inputBeta2,inputGamma2);
338  uint32_t detid2 = inputRawId2;
339  AlignTransform transform2(translation2, eulerangles2, detid2);
340  alignments2->m_align.push_back(transform2);
341 
342  //dummy errors
343  CLHEP::HepSymMatrix clhepSymMatrix(3,0);
344  AlignTransformError transformError(clhepSymMatrix, detid2);
345  alignmentErrors2->m_alignError.push_back(transformError);
346  }
347 
348  //to get the right order
349  std::sort( alignments2->m_align.begin(), alignments2->m_align.end(), lessAlignmentDetId<AlignTransform>() );
350  std::sort( alignmentErrors2->m_alignError.begin(), alignmentErrors2->m_alignError.end(), lessAlignmentDetId<AlignTransformError>() );
351  }
352 
353  //accessing the initial geometry
355  iSetup.get<IdealGeometryRecord>().get(cpv);
356  edm::ESHandle<GeometricDet> theGeometricDet;
357  iSetup.get<IdealGeometryRecord>().get(theGeometricDet);
358  TrackerGeomBuilderFromGeometricDet trackerBuilder;
359 
360  edm::ESHandle<Alignments> globalPositionRcd;
361  iSetup.get<TrackerDigiGeometryRecord>().getRecord<GlobalPositionRcd>().get(globalPositionRcd);
362 
363  //reference tracker
364  TrackerGeometry* theRefTracker = trackerBuilder.build(&*theGeometricDet, m_params);
365  if (_inputFilename1 != "IDEAL"){
366  GeometryAligner aligner1;
367  aligner1.applyAlignments<TrackerGeometry>( &(*theRefTracker), &(*alignments1), &(*alignmentErrors1),
368  align::DetectorGlobalPosition(*globalPositionRcd, DetId(DetId::Tracker)));
369  }
370  referenceTracker = new AlignableTracker(&(*theRefTracker), tTopo);
371  //referenceTracker->setSurfaceDeformation(surfDef1, true) ;
372 
373  int inputRawid1;
374  int inputRawid2;
375  int inputDtype1, inputDtype2 ;
376  std::vector<double> inputDpar1;
377  std::vector<double> inputDpar2 ;
378  std::vector<double>* p_inputDpar1 = &inputDpar1;
379  std::vector<double>* p_inputDpar2 = &inputDpar2;
380 
381  const std::vector<Alignable*> comp1 = referenceTracker->deepComponents();
382 
383  SurfaceDeformation * surfDef1;
384  if (_inputFilename1 != "IDEAL"){
385  TTree* _inputTree11 = (TTree*) _inputRootFile1->Get(_inputTreenameDeform.c_str());
386  _inputTree11->SetBranchAddress("irawid", &inputRawid1);
387  _inputTree11->SetBranchAddress("dtype", &inputDtype1);
388  _inputTree11->SetBranchAddress("dpar", &p_inputDpar1);
389 
390  unsigned int nEntries11 = _inputTree11->GetEntries();
391  edm::LogInfo("TrackerGeometryCompare") << " nentries11 = " << nEntries11 << std::endl ;
392  for (unsigned int iEntry = 0; iEntry < nEntries11; ++iEntry) {
393  _inputTree11->GetEntry(iEntry) ;
394 
395  surfDef1 = SurfaceDeformationFactory::create( inputDtype1, inputDpar1);
396 
397  if (int(comp1[iEntry]->id()) == inputRawid1) {
398  comp1[iEntry]->setSurfaceDeformation(surfDef1, true) ;
399  }
400 
401  }
402  }
403 
404  //currernt tracker
405  TrackerGeometry* theCurTracker = trackerBuilder.build(&*theGeometricDet,m_params);
406  if (_inputFilename2 != "IDEAL"){
407  GeometryAligner aligner2;
408  aligner2.applyAlignments<TrackerGeometry>( &(*theCurTracker), &(*alignments2), &(*alignmentErrors2),
409  align::DetectorGlobalPosition(*globalPositionRcd, DetId(DetId::Tracker)));
410  }
411  currentTracker = new AlignableTracker(&(*theCurTracker), tTopo);
412 
413  const std::vector<Alignable*> comp2 = currentTracker->deepComponents();
414 
415  SurfaceDeformation * surfDef2 ;
416  if (_inputFilename2 != "IDEAL"){
417  TTree* _inputTree12 = (TTree*) _inputRootFile2->Get(_inputTreenameDeform.c_str());
418  _inputTree12->SetBranchAddress("irawid", &inputRawid2);
419  _inputTree12->SetBranchAddress("dtype", &inputDtype2);
420  _inputTree12->SetBranchAddress("dpar", &p_inputDpar2);
421 
422  unsigned int nEntries12 = _inputTree12->GetEntries();
423  edm::LogInfo("TrackerGeometryCompare") << " nentries12 = " << nEntries12 << std::endl ;
424  for (unsigned int iEntry = 0; iEntry < nEntries12; ++iEntry) {
425  _inputTree12->GetEntry(iEntry) ;
426 
427  surfDef2 = SurfaceDeformationFactory::create( inputDtype2, inputDpar2);
428 
429  if (int(comp2[iEntry]->id()) == inputRawid2) {
430  comp2[iEntry]->setSurfaceDeformation(surfDef2, true) ;
431  }
432 
433  }
434  }
435 
436  delete alignments1;
437  delete alignmentErrors1;
438  delete alignments2;
439  delete alignmentErrors2;
440 
441 }
int i
Definition: DBlmapReader.cc:9
Class to update a given geometry with a set of alignments.
TrackerGeometry * build(const GeometricDet *gd, const edm::ParameterSet &pSet)
std::vector< AlignTransformError > m_alignError
std::vector< AlignTransform > m_align
Definition: Alignments.h:19
void get(HolderT &iHolder) const
void applyAlignments(C *geometry, const Alignments *alignments, const AlignmentErrors *alignmentErrors, const AlignTransform &globalCoordinates)
Definition: DetId.h:18
AlignableTracker * currentTracker
const Alignables & deepComponents() const
Definition: Alignable.h:71
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:86
AlignableTracker * referenceTracker
const AlignTransform & DetectorGlobalPosition(const Alignments &allGlobals, const DetId &id)
SurfaceDeformation * create(int type, const std::vector< double > &params)
void TrackerGeometryCompare::diffCommonTrackerSystem ( Alignable refAli,
Alignable curAli 
)
private

Definition at line 697 of file TrackerGeometryCompare.cc.

References _commonTrackerLevel, _TrackerCommonCM, _TrackerCommonR, _TrackerCommonT, _weightBy, _weightById, _weightByIdVector, Alignable::alignableObjectId(), Alignable::components(), diffTreeTool::diff, align::diffAlignables(), PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, Alignable::globalPosition(), i, and makeMuonMisalignmentScenario::rot.

Referenced by setCommonTrackerSystem().

697  {
698 
699  const std::vector<Alignable*>& refComp = refAli->components();
700  const std::vector<Alignable*>& curComp = curAli->components();
701 
702  unsigned int nComp = refComp.size();
703  //only perform for designate levels
704  bool useLevel = false;
705  if (refAli->alignableObjectId() == _commonTrackerLevel) useLevel = true;
706 
707  //useLevel = false;
708  if (useLevel){
709  CLHEP::Hep3Vector Rtotal, Wtotal;
710  Rtotal.set(0.,0.,0.); Wtotal.set(0.,0.,0.);
711 
713  CLHEP::Hep3Vector dR(diff[0],diff[1],diff[2]);
714  Rtotal+=dR;
715  CLHEP::Hep3Vector dW(diff[3],diff[4],diff[5]);
716  CLHEP::HepRotation rot(Wtotal.unit(),Wtotal.mag());
717  CLHEP::HepRotation drot(dW.unit(),dW.mag());
718  rot*=drot;
719  Wtotal.set(rot.axis().x()*rot.delta(), rot.axis().y()*rot.delta(), rot.axis().z()*rot.delta());
720  /*
721  //std::cout << "a";
722  //if (refAli->alignableObjectId() == 1) std::cout << "DIFF: " << diff << std::endl;
723  align::moveAlignable(curAli, diff);
724  float tolerance = 1e-7;
725  AlgebraicVector check = align::diffAlignables(refAli,curAli, _weightBy, _weightById, _weightByIdVector);
726  align::GlobalVector checkR(check[0],check[1],check[2]);
727  align::GlobalVector checkW(check[3],check[4],check[5]);
728  DetId detid(refAli->id());
729  if ((checkR.mag() > tolerance)||(checkW.mag() > tolerance)){
730  edm::LogInfo("TrackerGeometryCompare") << "Tolerance Exceeded!(alObjId: " << refAli->alignableObjectId()
731  << ", rawId: " << refAli->geomDetId().rawId()
732  << ", subdetId: "<< detid.subdetId() << "): " << diff;
733  }
734  else{
735  break;
736  }
737  }
738  */
739 
740  //_TrackerCommonT.set(Rtotal.x(), Rtotal.y(), Rtotal.z());
741  _TrackerCommonT = align::GlobalVector(Rtotal.x(), Rtotal.y(), Rtotal.z());
742  _TrackerCommonR = align::GlobalVector(Wtotal.x(), Wtotal.y(), Wtotal.z());
743  _TrackerCommonCM = curAli->globalPosition();
744  //_TrackerCommonTR(1) = Rtotal.x(); _TrackerCommonTR(2) = Rtotal.y(); _TrackerCommonTR(3) = Rtotal.z();
745  //_TrackerCommonTR(4) = Wtotal.x(); _TrackerCommonTR(5) = Wtotal.y(); _TrackerCommonTR(6) = Wtotal.z();
746 
747 
748  }
749  else{
750  for (unsigned int i = 0; i < nComp; ++i) diffCommonTrackerSystem(refComp[i],curComp[i]);
751  }
752 
753 
754 }
int i
Definition: DBlmapReader.cc:9
align::GlobalVector _TrackerCommonR
Vector3DBase< Scalar, GlobalTag > GlobalVector
Definition: Definitions.h:33
align::GlobalVector _TrackerCommonT
AlgebraicVector diffAlignables(Alignable *refAli, Alignable *curAli, const std::string &weightBy, bool weightById, const std::vector< unsigned int > &weightByIdVector)
Definition: AlignTools.cc:10
void diffCommonTrackerSystem(Alignable *refAli, Alignable *curAli)
virtual Alignables components() const =0
Return vector of all direct components.
virtual StructureType alignableObjectId() const =0
Return the alignable type identifier.
align::StructureType _commonTrackerLevel
align::PositionType _TrackerCommonCM
CLHEP::HepVector AlgebraicVector
std::vector< unsigned int > _weightByIdVector
const PositionType & globalPosition() const
Return the global position of the object.
Definition: Alignable.h:129
void TrackerGeometryCompare::endJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 207 of file TrackerGeometryCompare.cc.

References _alignTree, _theFile, m_vtkmap, and AlCaHLTBitMon_QueryRunRegistry::string.

207  {
208 
209  int iname(0) ;
210  for (std::vector<TrackerMap>::iterator it = m_vtkmap.begin(); it != m_vtkmap.end(); ++it) {
211  std::stringstream mapname ;
212  mapname << "TkMap_SurfDeform" << iname << ".png" ;
213  it->save(true,0,0,mapname.str());
214  mapname.str( std::string() );
215  mapname.clear() ;
216  mapname << "TkMap_SurfDeform" << iname << ".pdf" ;
217  it->save(true,0,0,mapname.str());
218  ++iname ;
219  }
220 
221  _theFile->cd();
222  _alignTree->Write();
223  _theFile->Close();
224 
225 }
std::vector< TrackerMap > m_vtkmap
void TrackerGeometryCompare::fillIdentifiers ( int  subdetlevel,
int  rawid,
const TrackerTopology tTopo 
)
private

Definition at line 937 of file TrackerGeometryCompare.cc.

References _identifiers, gather_cfg::cout, TrackerTopology::pxbLadder(), TrackerTopology::pxbLayer(), TrackerTopology::pxbModule(), TrackerTopology::pxfBlade(), TrackerTopology::pxfDisk(), TrackerTopology::pxfModule(), TrackerTopology::pxfPanel(), TrackerTopology::pxfSide(), TrackerTopology::tecModule(), TrackerTopology::tecPetalInfo(), TrackerTopology::tecRing(), TrackerTopology::tecSide(), TrackerTopology::tecWheel(), TrackerTopology::tibLayer(), TrackerTopology::tibModule(), TrackerTopology::tibStringInfo(), TrackerTopology::tidModuleInfo(), TrackerTopology::tidRing(), TrackerTopology::tidSide(), TrackerTopology::tidWheel(), TrackerTopology::tobLayer(), TrackerTopology::tobModule(), and TrackerTopology::tobRodInfo().

Referenced by fillTree().

937  {
938 
939 
940  switch( subdetlevel ){
941 
942  case 1:
943  {
944 
945  _identifiers[0] = tTopo->pxbModule( rawid );
946  _identifiers[1] = tTopo->pxbLadder( rawid );
947  _identifiers[2] = tTopo->pxbLayer( rawid );
948  _identifiers[3] = 999;
949  _identifiers[4] = 999;
950  _identifiers[5] = 999;
951  break;
952  }
953  case 2:
954  {
955 
956  _identifiers[0] = tTopo->pxfModule( rawid );
957  _identifiers[1] = tTopo->pxfPanel( rawid );
958  _identifiers[2] = tTopo->pxfBlade( rawid );
959  _identifiers[3] = tTopo->pxfDisk( rawid );
960  _identifiers[4] = tTopo->pxfSide( rawid );
961  _identifiers[5] = 999;
962  break;
963  }
964  case 3:
965  {
966 
967  _identifiers[0] = tTopo->tibModule( rawid );
968  _identifiers[1] = tTopo->tibStringInfo( rawid )[0];
969  _identifiers[2] = tTopo->tibStringInfo( rawid )[1];
970  _identifiers[3] = tTopo->tibStringInfo( rawid )[2];
971  _identifiers[4] = tTopo->tibLayer( rawid );
972  _identifiers[5] = 999;
973  break;
974  }
975  case 4:
976  {
977 
978  _identifiers[0] = tTopo->tidModuleInfo( rawid )[0];
979  _identifiers[1] = tTopo->tidModuleInfo( rawid )[1];
980  _identifiers[2] = tTopo->tidRing( rawid );
981  _identifiers[3] = tTopo->tidWheel( rawid );
982  _identifiers[4] = tTopo->tidSide( rawid );
983  _identifiers[5] = 999;
984  break;
985  }
986  case 5:
987  {
988 
989  _identifiers[0] = tTopo->tobModule( rawid );
990  _identifiers[1] = tTopo->tobRodInfo( rawid )[0];
991  _identifiers[2] = tTopo->tobRodInfo( rawid )[1];
992  _identifiers[3] = tTopo->tobLayer( rawid );
993  _identifiers[4] = 999;
994  _identifiers[5] = 999;
995  break;
996  }
997  case 6:
998  {
999 
1000  _identifiers[0] = tTopo->tecModule( rawid );
1001  _identifiers[1] = tTopo->tecRing( rawid );
1002  _identifiers[2] = tTopo->tecPetalInfo( rawid )[0];
1003  _identifiers[3] = tTopo->tecPetalInfo( rawid )[1];
1004  _identifiers[4] = tTopo->tecWheel( rawid );
1005  _identifiers[5] = tTopo->tecSide( rawid );
1006  break;
1007  }
1008  default:
1009  {
1010  std::cout << "Error: bad subdetid!!" << std::endl;
1011  break;
1012  }
1013 
1014  }
1015 }
unsigned int tibLayer(const DetId &id) const
unsigned int tidRing(const DetId &id) const
std::vector< unsigned int > tidModuleInfo(const DetId &id) const
unsigned int pxfDisk(const DetId &id) const
unsigned int tecRing(const DetId &id) const
ring id
unsigned int pxbLadder(const DetId &id) const
unsigned int tidWheel(const DetId &id) const
unsigned int pxbModule(const DetId &id) const
std::vector< unsigned int > tibStringInfo(const DetId &id) const
std::vector< unsigned int > tecPetalInfo(const DetId &id) const
unsigned int tidSide(const DetId &id) const
std::vector< unsigned int > tobRodInfo(const DetId &id) const
unsigned int tibModule(const DetId &id) const
unsigned int pxfModule(const DetId &id) const
unsigned int pxbLayer(const DetId &id) const
unsigned int tecModule(const DetId &id) const
unsigned int tobModule(const DetId &id) const
unsigned int pxfSide(const DetId &id) const
tuple cout
Definition: gather_cfg.py:121
unsigned int tecWheel(const DetId &id) const
unsigned int pxfPanel(const DetId &id) const
unsigned int pxfBlade(const DetId &id) const
unsigned int tobLayer(const DetId &id) const
unsigned int tecSide(const DetId &id) const
void TrackerGeometryCompare::fillTree ( Alignable refAli,
const AlgebraicVector diff,
const TrackerTopology tTopo 
)
private

Definition at line 756 of file TrackerGeometryCompare.cc.

References _alignTree, _alphaVal, _betaVal, _dalphaVal, _daVal, _dbetaVal, _dbVal, _detDim, _detIdFlag, _dgammaVal, _dgVal, _dphiVal, _drVal, _duVal, _dvVal, _dwVal, _dxVal, _dyVal, _dzVal, _etaVal, _gammaVal, _id, _level, _mid, _mlevel, _phiVal, _rVal, _sublevel, _surLength, _surRot, _surWidth, _useDetId, _xVal, _yVal, _zVal, align::AlignableDet, align::AlignableDetUnit, Alignable::alignableObjectId(), cond::rpcobgas::detid, PV3DBase< T, PVType, FrameType >::eta(), fillIdentifiers(), g, Alignable::geomDetId(), Alignable::globalPosition(), Alignable::globalRotation(), Alignable::id(), AlignableSurface::length(), Alignable::mother(), passIdCut(), PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), DetId::rawId(), makeMuonMisalignmentScenario::rot, DetId::subdetId(), Alignable::surface(), align::toAngles(), AlignableSurface::width(), PV3DBase< T, PVType, FrameType >::x(), TkRotation< T >::xx(), TkRotation< T >::xy(), TkRotation< T >::xz(), PV3DBase< T, PVType, FrameType >::y(), TkRotation< T >::yx(), TkRotation< T >::yy(), TkRotation< T >::yz(), PV3DBase< T, PVType, FrameType >::z(), TkRotation< T >::zx(), TkRotation< T >::zy(), and TkRotation< T >::zz().

Referenced by compareGeometries().

756  {
757 
758  _id = refAli->id();
759  _level = refAli->alignableObjectId();
760  //need if ali has no mother
761  if (refAli->mother()){
762  _mid = refAli->mother()->geomDetId().rawId();
763  _mlevel = refAli->mother()->alignableObjectId();
764  }
765  else{
766  _mid = -1;
767  _mlevel = -1;
768  }
769  DetId detid(_id);
770  _sublevel = detid.subdetId();
771  fillIdentifiers(_sublevel, _id , tTopo);
772  _xVal = refAli->globalPosition().x();
773  _yVal = refAli->globalPosition().y();
774  _zVal = refAli->globalPosition().z();
776  _rVal = vec.perp();
777  _phiVal = vec.phi();
778  _etaVal = vec.eta();
780  align::EulerAngles eulerAngles = align::toAngles(rot);
781  _alphaVal = eulerAngles[0];
782  _betaVal = eulerAngles[1];
783  _gammaVal = eulerAngles[2];
784  // global
785  _dxVal = diff[0];
786  _dyVal = diff[1];
787  _dzVal = diff[2];
788  // local
789  _duVal = diff[6];
790  _dvVal = diff[7];
791  _dwVal = diff[8];
792  //...TODO...
794  //getting dR and dPhi
797  _drVal = vCur.perp() - vRef.perp();
798  _dphiVal = vCur.phi() - vRef.phi();
799  // global
800  _dalphaVal = diff[3];
801  _dbetaVal = diff[4];
802  _dgammaVal = diff[5];
803  // local
804  _daVal = diff[9];
805  _dbVal = diff[10];
806  _dgVal = diff[11];
807 
808  //detIdFlag
809  if (refAli->alignableObjectId() == align::AlignableDetUnit){
810  if (_detIdFlag){
811  if ((passIdCut(refAli->id()))||(passIdCut(refAli->mother()->id()))){
812  _useDetId = 1;
813  }
814  else{
815  _useDetId = 0;
816  }
817  }
818  }
819  // det module dimension
820  if (refAli->alignableObjectId() == align::AlignableDetUnit){
821  if (refAli->mother()->alignableObjectId() != align::AlignableDet) _detDim = 1;
822  else if (refAli->mother()->alignableObjectId() == align::AlignableDet) _detDim = 2;
823  }
824  else _detDim = 0;
825 
826  _surWidth = refAli->surface().width();
827  _surLength = refAli->surface().length();
828  align::RotationType rt = refAli->globalRotation();
829  _surRot[0] = rt.xx(); _surRot[1] = rt.xy(); _surRot[2] = rt.xz();
830  _surRot[3] = rt.yx(); _surRot[4] = rt.yy(); _surRot[5] = rt.yz();
831  _surRot[6] = rt.zx(); _surRot[7] = rt.zy(); _surRot[8] = rt.zz();
832 
833  //Fill
834  _alignTree->Fill();
835 
836 }
T xx() const
align::Scalar width() const
align::ID id() const
Return the ID of Alignable, i.e. DetId of &#39;first&#39; component GeomDet(Unit).
Definition: Alignable.h:180
T y() const
Definition: PV3DBase.h:63
T yx() const
const RotationType & globalRotation() const
Return the global orientation of the object.
Definition: Alignable.h:132
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
T zx() const
T xy() const
T zz() const
T z() const
Definition: PV3DBase.h:64
virtual StructureType alignableObjectId() const =0
Return the alignable type identifier.
T zy() const
EulerAngles toAngles(const RotationType &)
Convert rotation matrix to angles about x-, y-, z-axes (frame rotation).
Definition: Utilities.cc:7
T yy() const
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
Definition: Alignable.h:126
Definition: DetId.h:18
AlgebraicVector EulerAngles
Definition: Definitions.h:36
align::Scalar length() const
void fillIdentifiers(int subdetlevel, int rawid, const TrackerTopology *tTopo)
T xz() const
const PositionType & globalPosition() const
Return the global position of the object.
Definition: Alignable.h:129
T x() const
Definition: PV3DBase.h:62
Alignable * mother() const
Return pointer to container alignable (if any)
Definition: Alignable.h:85
T yz() const
const DetId & geomDetId() const
Definition: Alignable.h:177
bool TrackerGeometryCompare::passIdCut ( uint32_t  id)
private

Definition at line 924 of file TrackerGeometryCompare.cc.

References _detIdFlagVector, and i.

Referenced by fillTree().

924  {
925 
926  bool pass = false;
927  int nEntries = _detIdFlagVector.size();
928 
929  for (int i = 0; i < nEntries; i++){
930  if (_detIdFlagVector[i] == id) pass = true;
931  }
932 
933  return pass;
934 
935 }
int i
Definition: DBlmapReader.cc:9
std::vector< uint32_t > _detIdFlagVector
void TrackerGeometryCompare::setCommonTrackerSystem ( )
private

Definition at line 659 of file TrackerGeometryCompare.cc.

References _commonTrackerLevel, _setCommonTrackerSystem, _TrackerCommonCM, _TrackerCommonR, _TrackerCommonT, gather_cfg::cout, currentTracker, diffCommonTrackerSystem(), Alignable::globalPosition(), align::moveAlignable(), TkRotation< T >::multiplyInverse(), referenceTracker, makeMuonMisalignmentScenario::rot, AlignableObjectId::stringToId(), align::toMatrix(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by analyze().

659  {
660 
661  edm::LogInfo("TrackerGeometryCompare") << "Setting Common Tracker System....";
662 
663  // DM_534??AlignableObjectId dummy;
664  // DM_534??_commonTrackerLevel = dummy.nameToType(_setCommonTrackerSystem);
666 
668 
669  align::EulerAngles dOmega(3); dOmega[0] = _TrackerCommonR.x() ; dOmega[1] = _TrackerCommonR.y(); dOmega[2] = _TrackerCommonR.z();
672 
673  std::cout << "what we get from overlaying the pixels..." << theR << ", " << rot << std::endl;
674 
675  //transform to the Tracker System
677  align::GlobalVector cmDiff( trackerCM.x()-_TrackerCommonCM.x(), trackerCM.y()-_TrackerCommonCM.y(), trackerCM.z()-_TrackerCommonCM.z() );
678 
679  std::cout << "Pixel CM: " << _TrackerCommonCM << ", tracker CM: " << trackerCM << std::endl;
680 
681  //adjust translational difference factoring in different rotational CM
682  //needed because rotateInGlobalFrame is about CM of alignable, not Tracker
683  align::GlobalVector::BasicVectorType lpvgf = cmDiff.basicVector();
684  align::GlobalVector moveV( rot.multiplyInverse(lpvgf) - lpvgf);
685  align::GlobalVector theRprime(theR + moveV);
686 
687  AlgebraicVector TrackerCommonTR(6);
688  TrackerCommonTR(1) = theRprime.x(); TrackerCommonTR(2) = theRprime.y(); TrackerCommonTR(3) = theRprime.z();
689  TrackerCommonTR(4) = _TrackerCommonR.x(); TrackerCommonTR(5) = _TrackerCommonR.y(); TrackerCommonTR(6) = _TrackerCommonR.z();
690 
691  std::cout << "and after the transformation: " << TrackerCommonTR << std::endl;
692 
693  align::moveAlignable(currentTracker, TrackerCommonTR );
694 
695 }
align::GlobalVector _TrackerCommonR
align::GlobalVector _TrackerCommonT
T y() const
Definition: PV3DBase.h:63
void diffCommonTrackerSystem(Alignable *refAli, Alignable *curAli)
static align::StructureType stringToId(const char *)
T z() const
Definition: PV3DBase.h:64
align::StructureType _commonTrackerLevel
align::PositionType _TrackerCommonCM
CLHEP::HepVector AlgebraicVector
AlgebraicVector EulerAngles
Definition: Definitions.h:36
AlignableTracker * currentTracker
AlignableTracker * referenceTracker
RotationType toMatrix(const EulerAngles &)
Convert rotation angles about x-, y-, z-axes to matrix.
Definition: Utilities.cc:40
tuple cout
Definition: gather_cfg.py:121
const PositionType & globalPosition() const
Return the global position of the object.
Definition: Alignable.h:129
Basic3DVector< T > multiplyInverse(const Basic3DVector< T > &v) const
T x() const
Definition: PV3DBase.h:62
void moveAlignable(Alignable *ali, AlgebraicVector diff)
Moves the alignable by the AlgebraicVector.
Definition: AlignTools.cc:81
void TrackerGeometryCompare::surveyToTracker ( AlignableTracker ali,
Alignments alignVals,
AlignmentErrors alignErrors 
)
private

Definition at line 838 of file TrackerGeometryCompare.cc.

References AlCaHLTBitMon_QueryRunRegistry::comp, filterCSVwithJSON::copy, AlignableTracker::endcapGeomDets(), i, AlignableTracker::innerBarrelGeomDets(), j, gen::k, Alignments::m_align, AlignmentErrors::m_alignError, AlignableTracker::outerBarrelGeomDets(), AlignableTracker::pixelEndcapGeomDets(), AlignableTracker::pixelHalfBarrelGeomDets(), SurveyDet::position(), makeMuonMisalignmentScenario::rot, SurveyDet::rotation(), python.multivaluedict::sort(), AlignableTracker::TIDGeomDets(), and create_public_lumi_plots::transform.

838  {
839 
840  //getting the right alignables for the alignment record
841  std::vector<Alignable*> detPB = ali->pixelHalfBarrelGeomDets();
842  std::vector<Alignable*> detPEC = ali->pixelEndcapGeomDets();
843  std::vector<Alignable*> detTIB = ali->innerBarrelGeomDets();
844  std::vector<Alignable*> detTID = ali->TIDGeomDets();
845  std::vector<Alignable*> detTOB = ali->outerBarrelGeomDets();
846  std::vector<Alignable*> detTEC = ali->endcapGeomDets();
847 
848  std::vector<Alignable*> allGeomDets;
849  std::copy(detPB.begin(), detPB.end(), std::back_inserter(allGeomDets));
850  std::copy(detPEC.begin(), detPEC.end(), std::back_inserter(allGeomDets));
851  std::copy(detTIB.begin(), detTIB.end(), std::back_inserter(allGeomDets));
852  std::copy(detTID.begin(), detTID.end(), std::back_inserter(allGeomDets));
853  std::copy(detTOB.begin(), detTOB.end(), std::back_inserter(allGeomDets));
854  std::copy(detTEC.begin(), detTEC.end(), std::back_inserter(allGeomDets));
855 
856  std::vector<Alignable*> rcdAlis;
857  for (std::vector<Alignable*>::iterator i = allGeomDets.begin(); i!= allGeomDets.end(); i++){
858  if ((*i)->components().size() == 1){
859  rcdAlis.push_back((*i));
860  }
861  else if ((*i)->components().size() > 1){
862  rcdAlis.push_back((*i));
863  std::vector<Alignable*> comp = (*i)->components();
864  for (std::vector<Alignable*>::iterator j = comp.begin(); j != comp.end(); j++){
865  rcdAlis.push_back((*j));
866  }
867  }
868  }
869 
870  //turning them into alignments
871  for(std::vector<Alignable*>::iterator k = rcdAlis.begin(); k != rcdAlis.end(); k++){
872 
873  const SurveyDet* surveyInfo = (*k)->survey();
874  align::PositionType pos(surveyInfo->position());
875  align::RotationType rot(surveyInfo->rotation());
876  CLHEP::Hep3Vector clhepVector(pos.x(),pos.y(),pos.z());
877  CLHEP::HepRotation clhepRotation( CLHEP::HepRep3x3(rot.xx(),rot.xy(),rot.xz(),rot.yx(),rot.yy(),rot.yz(),rot.zx(),rot.zy(),rot.zz()));
878  AlignTransform transform(clhepVector, clhepRotation, (*k)->id());
879  AlignTransformError transformError(CLHEP::HepSymMatrix(3,1), (*k)->id());
880  alignVals->m_align.push_back(transform);
881  alignErrors->m_alignError.push_back(transformError);
882  }
883 
884  //to get the right order
885  std::sort( alignVals->m_align.begin(), alignVals->m_align.end(), lessAlignmentDetId<AlignTransform>() );
886  std::sort( alignErrors->m_alignError.begin(), alignErrors->m_alignError.end(), lessAlignmentDetId<AlignTransformError>() );
887 
888 }
int i
Definition: DBlmapReader.cc:9
Alignables & pixelHalfBarrelGeomDets()
Return pixel barrel GeomDets.
std::vector< AlignTransformError > m_alignError
std::vector< AlignTransform > m_align
Definition: Alignments.h:19
const align::RotationType & rotation() const
Definition: SurveyDet.h:68
const align::PositionType & position() const
Definition: SurveyDet.h:63
Alignables & innerBarrelGeomDets()
Return inner barrel GeomDets.
Alignables & TIDGeomDets()
Return TID GeomDets.
int j
Definition: DBlmapReader.cc:9
Alignables & endcapGeomDets()
Return endcap GeomDets.
Alignables & pixelEndcapGeomDets()
Return pixel endcap GeomDets.
int k[5][pyjets_maxn]
Alignables & outerBarrelGeomDets()
Return outer barrel GeomDets.

Member Data Documentation

TTree* TrackerGeometryCompare::_alignTree
private

Definition at line 131 of file TrackerGeometryCompare.h.

Referenced by endJob(), fillTree(), and TrackerGeometryCompare().

float TrackerGeometryCompare::_alphaVal
private

Definition at line 141 of file TrackerGeometryCompare.h.

Referenced by fillTree(), and TrackerGeometryCompare().

float TrackerGeometryCompare::_betaVal
private

Definition at line 141 of file TrackerGeometryCompare.h.

Referenced by fillTree(), and TrackerGeometryCompare().

align::StructureType TrackerGeometryCompare::_commonTrackerLevel
private

Definition at line 123 of file TrackerGeometryCompare.h.

Referenced by diffCommonTrackerSystem(), and setCommonTrackerSystem().

float TrackerGeometryCompare::_dalphaVal
private

Definition at line 143 of file TrackerGeometryCompare.h.

Referenced by fillTree(), and TrackerGeometryCompare().

float TrackerGeometryCompare::_daVal
private

Definition at line 145 of file TrackerGeometryCompare.h.

Referenced by fillTree(), and TrackerGeometryCompare().

float TrackerGeometryCompare::_dbetaVal
private

Definition at line 143 of file TrackerGeometryCompare.h.

Referenced by fillTree(), and TrackerGeometryCompare().

float TrackerGeometryCompare::_dbVal
private

Definition at line 145 of file TrackerGeometryCompare.h.

Referenced by fillTree(), and TrackerGeometryCompare().

int TrackerGeometryCompare::_detDim
private

Definition at line 140 of file TrackerGeometryCompare.h.

Referenced by fillTree(), and TrackerGeometryCompare().

bool TrackerGeometryCompare::_detIdFlag
private

Definition at line 116 of file TrackerGeometryCompare.h.

Referenced by fillTree(), and TrackerGeometryCompare().

std::string TrackerGeometryCompare::_detIdFlagFile
private

Definition at line 117 of file TrackerGeometryCompare.h.

Referenced by TrackerGeometryCompare().

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

Definition at line 122 of file TrackerGeometryCompare.h.

Referenced by passIdCut(), and TrackerGeometryCompare().

float TrackerGeometryCompare::_dgammaVal
private

Definition at line 143 of file TrackerGeometryCompare.h.

Referenced by fillTree(), and TrackerGeometryCompare().

float TrackerGeometryCompare::_dgVal
private

Definition at line 145 of file TrackerGeometryCompare.h.

Referenced by fillTree(), and TrackerGeometryCompare().

float TrackerGeometryCompare::_dphiVal
private

Definition at line 143 of file TrackerGeometryCompare.h.

Referenced by fillTree(), and TrackerGeometryCompare().

float TrackerGeometryCompare::_drVal
private

Definition at line 143 of file TrackerGeometryCompare.h.

Referenced by fillTree(), and TrackerGeometryCompare().

float TrackerGeometryCompare::_duVal
private

Definition at line 145 of file TrackerGeometryCompare.h.

Referenced by fillTree(), and TrackerGeometryCompare().

float TrackerGeometryCompare::_dvVal
private

Definition at line 145 of file TrackerGeometryCompare.h.

Referenced by fillTree(), and TrackerGeometryCompare().

float TrackerGeometryCompare::_dwVal
private

Definition at line 145 of file TrackerGeometryCompare.h.

Referenced by fillTree(), and TrackerGeometryCompare().

float TrackerGeometryCompare::_dxVal
private

Definition at line 143 of file TrackerGeometryCompare.h.

Referenced by fillTree(), and TrackerGeometryCompare().

float TrackerGeometryCompare::_dyVal
private

Definition at line 143 of file TrackerGeometryCompare.h.

Referenced by fillTree(), and TrackerGeometryCompare().

float TrackerGeometryCompare::_dzVal
private

Definition at line 143 of file TrackerGeometryCompare.h.

Referenced by fillTree(), and TrackerGeometryCompare().

float TrackerGeometryCompare::_etaVal
private

Definition at line 141 of file TrackerGeometryCompare.h.

Referenced by fillTree(), and TrackerGeometryCompare().

std::string TrackerGeometryCompare::_filename
private
float TrackerGeometryCompare::_gammaVal
private

Definition at line 141 of file TrackerGeometryCompare.h.

Referenced by fillTree(), and TrackerGeometryCompare().

int TrackerGeometryCompare::_id
private

\ Tree variables

Definition at line 140 of file TrackerGeometryCompare.h.

Referenced by fillTree(), and TrackerGeometryCompare().

uint32_t TrackerGeometryCompare::_identifiers[6]
private

Definition at line 147 of file TrackerGeometryCompare.h.

Referenced by fillIdentifiers(), and TrackerGeometryCompare().

std::string TrackerGeometryCompare::_inputFilename1
private
std::string TrackerGeometryCompare::_inputFilename2
private
TFile* TrackerGeometryCompare::_inputRootFile1
private

Definition at line 132 of file TrackerGeometryCompare.h.

Referenced by compareSurfaceDeformations(), and createROOTGeometry().

TFile* TrackerGeometryCompare::_inputRootFile2
private

Definition at line 133 of file TrackerGeometryCompare.h.

Referenced by compareSurfaceDeformations(), and createROOTGeometry().

TTree* TrackerGeometryCompare::_inputTree01
private

Definition at line 134 of file TrackerGeometryCompare.h.

Referenced by createROOTGeometry().

TTree* TrackerGeometryCompare::_inputTree02
private

Definition at line 135 of file TrackerGeometryCompare.h.

Referenced by createROOTGeometry().

TTree* TrackerGeometryCompare::_inputTree11
private

Definition at line 136 of file TrackerGeometryCompare.h.

Referenced by analyze(), and createROOTGeometry().

TTree* TrackerGeometryCompare::_inputTree12
private

Definition at line 137 of file TrackerGeometryCompare.h.

Referenced by analyze(), and createROOTGeometry().

std::string TrackerGeometryCompare::_inputTreenameAlign
private

Definition at line 111 of file TrackerGeometryCompare.h.

Referenced by createROOTGeometry(), and TrackerGeometryCompare().

std::string TrackerGeometryCompare::_inputTreenameDeform
private
int TrackerGeometryCompare::_level
private
int TrackerGeometryCompare::_mid
private

Definition at line 140 of file TrackerGeometryCompare.h.

Referenced by fillTree(), and TrackerGeometryCompare().

int TrackerGeometryCompare::_mlevel
private

Definition at line 140 of file TrackerGeometryCompare.h.

Referenced by fillTree(), and TrackerGeometryCompare().

float TrackerGeometryCompare::_phiVal
private

Definition at line 141 of file TrackerGeometryCompare.h.

Referenced by fillTree(), and TrackerGeometryCompare().

float TrackerGeometryCompare::_rVal
private

Definition at line 141 of file TrackerGeometryCompare.h.

Referenced by fillTree(), and TrackerGeometryCompare().

std::string TrackerGeometryCompare::_setCommonTrackerSystem
private
int TrackerGeometryCompare::_sublevel
private

Definition at line 140 of file TrackerGeometryCompare.h.

Referenced by fillTree(), and TrackerGeometryCompare().

double TrackerGeometryCompare::_surfDeform[13]
private

Definition at line 150 of file TrackerGeometryCompare.h.

Referenced by compareSurfaceDeformations(), and TrackerGeometryCompare().

float TrackerGeometryCompare::_surLength
private

Definition at line 146 of file TrackerGeometryCompare.h.

Referenced by fillTree(), and TrackerGeometryCompare().

double TrackerGeometryCompare::_surRot[9]
private

Definition at line 148 of file TrackerGeometryCompare.h.

Referenced by fillTree(), and TrackerGeometryCompare().

float TrackerGeometryCompare::_surWidth
private

Definition at line 146 of file TrackerGeometryCompare.h.

Referenced by fillTree(), and TrackerGeometryCompare().

TFile* TrackerGeometryCompare::_theFile
private

Definition at line 130 of file TrackerGeometryCompare.h.

Referenced by endJob(), and TrackerGeometryCompare().

align::PositionType TrackerGeometryCompare::_TrackerCommonCM
private

Definition at line 126 of file TrackerGeometryCompare.h.

Referenced by diffCommonTrackerSystem(), and setCommonTrackerSystem().

align::GlobalVector TrackerGeometryCompare::_TrackerCommonR
private

Definition at line 125 of file TrackerGeometryCompare.h.

Referenced by diffCommonTrackerSystem(), and setCommonTrackerSystem().

align::GlobalVector TrackerGeometryCompare::_TrackerCommonT
private

Definition at line 124 of file TrackerGeometryCompare.h.

Referenced by diffCommonTrackerSystem(), and setCommonTrackerSystem().

int TrackerGeometryCompare::_type
private
int TrackerGeometryCompare::_useDetId
private

Definition at line 140 of file TrackerGeometryCompare.h.

Referenced by fillTree(), and TrackerGeometryCompare().

std::string TrackerGeometryCompare::_weightBy
private
bool TrackerGeometryCompare::_weightById
private
std::string TrackerGeometryCompare::_weightByIdFile
private

Definition at line 119 of file TrackerGeometryCompare.h.

Referenced by TrackerGeometryCompare().

std::vector< unsigned int > TrackerGeometryCompare::_weightByIdVector
private
bool TrackerGeometryCompare::_writeToDB
private

Definition at line 113 of file TrackerGeometryCompare.h.

Referenced by analyze(), and TrackerGeometryCompare().

float TrackerGeometryCompare::_xVal
private

Definition at line 141 of file TrackerGeometryCompare.h.

Referenced by fillTree(), and TrackerGeometryCompare().

float TrackerGeometryCompare::_yVal
private

Definition at line 141 of file TrackerGeometryCompare.h.

Referenced by fillTree(), and TrackerGeometryCompare().

float TrackerGeometryCompare::_zVal
private

Definition at line 141 of file TrackerGeometryCompare.h.

Referenced by fillTree(), and TrackerGeometryCompare().

AlignableTracker* TrackerGeometryCompare::currentTracker
private

Definition at line 102 of file TrackerGeometryCompare.h.

Referenced by analyze(), createROOTGeometry(), and setCommonTrackerSystem().

AlignableTracker* TrackerGeometryCompare::dummyTracker
private

Definition at line 101 of file TrackerGeometryCompare.h.

bool TrackerGeometryCompare::firstEvent_
private

Definition at line 156 of file TrackerGeometryCompare.h.

Referenced by analyze(), and beginJob().

std::map<std::string,TH1D*> TrackerGeometryCompare::m_h1
private

Definition at line 160 of file TrackerGeometryCompare.h.

Referenced by compareSurfaceDeformations(), and TrackerGeometryCompare().

int TrackerGeometryCompare::m_nBins
private

Definition at line 152 of file TrackerGeometryCompare.h.

Referenced by compareSurfaceDeformations(), and TrackerGeometryCompare().

edm::ParameterSet TrackerGeometryCompare::m_params
private

Definition at line 75 of file TrackerGeometryCompare.h.

Referenced by createROOTGeometry().

double TrackerGeometryCompare::m_rangeHigh
private

Definition at line 154 of file TrackerGeometryCompare.h.

Referenced by compareSurfaceDeformations(), and TrackerGeometryCompare().

double TrackerGeometryCompare::m_rangeLow
private

Definition at line 153 of file TrackerGeometryCompare.h.

Referenced by compareSurfaceDeformations(), and TrackerGeometryCompare().

std::vector<align::StructureType> TrackerGeometryCompare::m_theLevels
private

Definition at line 76 of file TrackerGeometryCompare.h.

Referenced by compareGeometries(), and TrackerGeometryCompare().

std::vector<TrackerMap> TrackerGeometryCompare::m_vtkmap
private
AlignableTracker* TrackerGeometryCompare::referenceTracker
private

Definition at line 100 of file TrackerGeometryCompare.h.

Referenced by analyze(), createROOTGeometry(), and setCommonTrackerSystem().

const SurveyErrors* TrackerGeometryCompare::theSurveyErrors
private

Definition at line 106 of file TrackerGeometryCompare.h.

Referenced by addSurveyInfo().

unsigned int TrackerGeometryCompare::theSurveyIndex
private

Definition at line 104 of file TrackerGeometryCompare.h.

Referenced by addSurveyInfo().

const Alignments* TrackerGeometryCompare::theSurveyValues
private

Definition at line 105 of file TrackerGeometryCompare.h.

Referenced by addSurveyInfo().