CMS 3D CMS Logo

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

#include <CreateSurveyRcds.h>

Inheritance diagram for CreateSurveyRcds:
SurveyInputBase edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 Do nothing for each event. More...
 
 CreateSurveyRcds (const edm::ParameterSet &)
 
- Public Member Functions inherited from SurveyInputBase
virtual void beginJob ()
 Read data from input. More...
 
virtual ~SurveyInputBase ()
 
- 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

AlgebraicVector getStructureErrors (int, int)
 default values for survey uncertainty More...
 
AlgebraicVector getStructurePlacements (int, int)
 default values for assembly precision More...
 
void setGeometry (Alignable *)
 module which modifies the geometry More...
 
void setSurveyErrors (Alignable *)
 module which creates/inserts the survey errors More...
 

Private Attributes

edm::ESHandle< Alignmentsalignments
 
bool m_generatedRandom
 
bool m_generatedSimple
 
std::string m_inputGeom
 
double m_inputSimpleMis
 
std::string textFileName
 
const edm::ParameterSet theParameterSet
 
SurveyInputTextReader::MapType uIdMap
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from SurveyInputBase
static void addComponent (Alignable *)
 
static Alignabledetector ()
 Get alignable detector as read from input. More...
 
- 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)
 
- Protected Attributes inherited from SurveyInputBase
bool theFirstEvent
 

Detailed Description

Class to create Survey[Error]Rcd for alignment with survey constraint

Date:
2012/06/13 09:22:26
Revision:
1.3
Author
Chung Khim Lae

Definition at line 21 of file CreateSurveyRcds.h.

Constructor & Destructor Documentation

CreateSurveyRcds::CreateSurveyRcds ( const edm::ParameterSet cfg)

Definition at line 28 of file CreateSurveyRcds.cc.

References edm::ParameterSet::getUntrackedParameter(), m_generatedRandom, m_generatedSimple, m_inputGeom, m_inputSimpleMis, and AlCaHLTBitMon_QueryRunRegistry::string.

29  : theParameterSet( cfg )
30 {
31  m_inputGeom = cfg.getUntrackedParameter< std::string > ("inputGeom");
32  m_inputSimpleMis = cfg.getUntrackedParameter< double > ("simpleMis");
33  m_generatedRandom = cfg.getUntrackedParameter< bool > ("generatedRandom");
34  m_generatedSimple = cfg.getUntrackedParameter< bool > ("generatedSimple");
35 }
T getUntrackedParameter(std::string const &, T const &) const
std::string m_inputGeom
const edm::ParameterSet theParameterSet

Member Function Documentation

void CreateSurveyRcds::analyze ( const edm::Event ,
const edm::EventSetup  
)
virtual

Do nothing for each event.

Implements SurveyInputBase.

Definition at line 37 of file CreateSurveyRcds.cc.

References SurveyInputBase::addComponent(), alignments, GeometryAligner::applyAlignments(), TrackerGeomBuilderFromGeometricDet::build(), SurveyInputBase::detector(), relativeConstraints::geom, edm::EventSetup::get(), m_inputGeom, edm::ESHandle< class >::product(), setGeometry(), setSurveyErrors(), theParameterSet, and patCandidatesForDimuonsSequences_cff::tracker.

37  {
38 
39  //Retrieve tracker topology from geometry
41  setup.get<IdealGeometryRecord>().get(tTopoHandle);
42  const TrackerTopology* const tTopo = tTopoHandle.product();
43 
45  setup.get<IdealGeometryRecord>().get(geom);
47 
48  //take geometry from DB or randomly generate geometry
49  if (m_inputGeom == "sqlite"){
50  //build the tracker
52  edm::ESHandle<AlignmentErrors> alignmentErrors;
53 
54  setup.get<TrackerAlignmentRcd>().get(alignments);
55  setup.get<TrackerAlignmentErrorRcd>().get(alignmentErrors);
56 
57  //apply the latest alignments
58  GeometryAligner aligner;
59  aligner.applyAlignments<TrackerGeometry>( &(*tracker), &(*alignments), &(*alignmentErrors), AlignTransform() );
60 
61  }
62 
63 
64  addComponent(new AlignableTracker( tracker, tTopo ) );
65 
66  Alignable* ali = detector();
67  if(m_inputGeom == "generated"){
68  setGeometry( ali );
69  }
70 
71  setSurveyErrors( ali );
72 
73 }
void setSurveyErrors(Alignable *)
module which creates/inserts the survey errors
Class to update a given geometry with a set of alignments.
TrackerGeometry * build(const GeometricDet *gd, const edm::ParameterSet &pSet)
static void addComponent(Alignable *)
edm::ESHandle< Alignments > alignments
void setGeometry(Alignable *)
module which modifies the geometry
void applyAlignments(C *geometry, const Alignments *alignments, const AlignmentErrors *alignmentErrors, const AlignTransform &globalCoordinates)
static Alignable * detector()
Get alignable detector as read from input.
std::string m_inputGeom
const edm::ParameterSet theParameterSet
T const * product() const
Definition: ESHandle.h:62
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
AlgebraicVector CreateSurveyRcds::getStructureErrors ( int  level,
int  subdetlevel 
)
private

default values for survey uncertainty

Definition at line 384 of file CreateSurveyRcds.cc.

Referenced by setGeometry(), and setSurveyErrors().

385 {
386  AlgebraicVector deltaRW(6);
387  deltaRW(1)=0.0; deltaRW(2)=0.0; deltaRW(3)=0.0; deltaRW(4)=0.0; deltaRW(5)=0.0; deltaRW(6)=0.0;
388  //PIXEL
389  if ((level == 37)&&(subdetlevel == 1)){ //Pixel Detector in Tracker
390  deltaRW(1)=0.2; deltaRW(2)=0.2; deltaRW(3)=0.2; deltaRW(4)=0.0017; deltaRW(5)=0.0017; deltaRW(6)=0.0017;
391  }
392  //STRIP
393  if ((level == 38)&&(subdetlevel == 3)){ //Strip Tracker in Tracker
394  deltaRW(1)=0.2; deltaRW(2)=0.2; deltaRW(3)=0.2; deltaRW(4)=0.0004; deltaRW(5)=0.0004; deltaRW(6)=0.0004;
395  }
396  //TRACKER
397  if ((level == 39)&&(subdetlevel == 1)){ //Tracker
398  deltaRW(1)=0.0; deltaRW(2)=0.0; deltaRW(3)=0.0; deltaRW(4)=0.0; deltaRW(5)=0.0; deltaRW(6)=0.0;
399  }
400  //TPB
401  if ((level == 7)&&(subdetlevel == 1)){ //Barrel Pixel in Pixel
402  deltaRW(1)=0.05; deltaRW(2)=0.05; deltaRW(3)=0.1; deltaRW(4)=0.0008; deltaRW(5)=0.0008; deltaRW(6)=0.0008;
403  }
404  if ((level == 6)&&(subdetlevel == 1)){ //HalfBarrel in Barrel Pixel
405  deltaRW(1)=0.015; deltaRW(2)=0.015; deltaRW(3)=0.03; deltaRW(4)=0.0003; deltaRW(5)=0.0003; deltaRW(6)=0.0003;
406  }
407  if ((level == 5)&&(subdetlevel == 1)){ //HalfShell in HalfBarrel
408  deltaRW(1)=0.005; deltaRW(2)=0.005; deltaRW(3)=0.01; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
409  }
410  if ((level == 4)&&(subdetlevel == 1)){ //Ladder in HalfShell
411  deltaRW(1)=0.001; deltaRW(2)=0.001; deltaRW(3)=0.002; deltaRW(4)=0.00005; deltaRW(5)=0.00005; deltaRW(6)=0.00005;
412  }
413  if ((level == 2)&&(subdetlevel == 1)){ //Det in Ladder
414  deltaRW(1)=0.0005; deltaRW(2)=0.001; deltaRW(3)=0.001; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
415  }
416  if ((level == 1)&&(subdetlevel == 1)){ //DetUnit in Ladder
417  deltaRW(1)=0.0005; deltaRW(2)=0.001; deltaRW(3)=0.001; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
418  }
419  //TPE
420  if ((level == 13)&&(subdetlevel == 2)){ //Forward Pixel in Pixel
421  deltaRW(1)=0.05; deltaRW(2)=0.05; deltaRW(3)=0.1; deltaRW(4)=0.0004; deltaRW(5)=0.0004; deltaRW(6)=0.0004;
422  }
423  if ((level == 12)&&(subdetlevel == 2)){ //HalfCylinder in Forward Pixel
424  deltaRW(1)=0.015; deltaRW(2)=0.015; deltaRW(3)=0.03; deltaRW(4)=0.00015; deltaRW(5)=0.00015; deltaRW(6)=0.00015;
425  }
426  if ((level == 11)&&(subdetlevel == 2)){ //HalfDisk in HalfCylinder
427  deltaRW(1)=0.005; deltaRW(2)=0.005; deltaRW(3)=0.01; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
428  }
429  if ((level == 10)&&(subdetlevel == 2)){ //Blade in HalfDisk
430  deltaRW(1)=0.001; deltaRW(2)=0.001; deltaRW(3)=0.002; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
431  }
432  if ((level == 9)&&(subdetlevel == 2)){ //Panel in Blade
433  deltaRW(1)=0.001; deltaRW(2)=0.0008; deltaRW(3)=0.0006; deltaRW(4)=0.0002; deltaRW(5)=0.0002; deltaRW(6)=0.0002;
434  }
435  if ((level == 2)&&(subdetlevel == 2)){ //Det in Panel
436  deltaRW(1)=0.0005; deltaRW(2)=0.0004; deltaRW(3)=0.0006; deltaRW(4)=0.0001; deltaRW(5)=0.0003; deltaRW(6)=0.0001;
437  }
438  if ((level == 1)&&(subdetlevel == 2)){ //DetUnit in Panel
439  deltaRW(1)=0.0005; deltaRW(2)=0.0004; deltaRW(3)=0.0006; deltaRW(4)=0.0001; deltaRW(5)=0.0003; deltaRW(6)=0.0001;
440  }
441  //TIB
442  if ((level == 20)&&(subdetlevel == 3)){ //TIB in Strip Tracker
443  deltaRW(1)=0.08; deltaRW(2)=0.08; deltaRW(3)=0.04; deltaRW(4)=0.0017; deltaRW(5)=0.0017; deltaRW(6)=0.0017;
444  }
445  if ((level == 19)&&(subdetlevel == 3)){ //HalfBarrel in TIB
446  deltaRW(1)=0.04; deltaRW(2)=0.04; deltaRW(3)=0.02; deltaRW(4)=0.0003; deltaRW(5)=0.0003; deltaRW(6)=0.0003;
447  }
448  if ((level == 18)&&(subdetlevel == 3)){ //Layer in HalfBarrel
449  deltaRW(1)=0.02; deltaRW(2)=0.02; deltaRW(3)=0.01; deltaRW(4)=0.0006; deltaRW(5)=0.0006; deltaRW(6)=0.0006;
450  }
451  if ((level == 17)&&(subdetlevel == 3)){ //HalfShell in Layer
452  deltaRW(1)=0.01; deltaRW(2)=0.01; deltaRW(3)=0.005; deltaRW(4)=0.0002; deltaRW(5)=0.0002; deltaRW(6)=0.0002;
453  }
454  if ((level == 16)&&(subdetlevel == 3)){ //Surface in a HalfShell
455  deltaRW(1)=0.004; deltaRW(2)=0.004; deltaRW(3)=0.008; deltaRW(4)=0.0002; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
456  }
457  if ((level == 15)&&(subdetlevel == 3)){ //String in a Surface
458  deltaRW(1)=0.004; deltaRW(2)=0.004; deltaRW(3)=0.008; deltaRW(4)=0.0002; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
459  }
460  if ((level == 2)&&(subdetlevel == 3)){ //Det in a String
461  deltaRW(1)=0.002; deltaRW(2)=0.002; deltaRW(3)=0.004; deltaRW(4)=0.0004; deltaRW(5)=0.0002; deltaRW(6)=0.0002;
462  }
463  if ((level == 1)&&(subdetlevel == 3)){ //DetUnit in a String
464  deltaRW(1)=0.002; deltaRW(2)=0.002; deltaRW(3)=0.004; deltaRW(4)=0.0004; deltaRW(5)=0.0002; deltaRW(6)=0.0002;
465  }
466  //TID
467  if ((level == 25)&&(subdetlevel == 4)){ //TID in Strip Tracker
468  deltaRW(1)=0.05; deltaRW(2)=0.05; deltaRW(3)=0.1; deltaRW(4)=0.0003; deltaRW(5)=0.0003; deltaRW(6)=0.0003;
469  }
470  if ((level == 24)&&(subdetlevel == 4)){ //Disk in a TID
471  deltaRW(1)=0.01; deltaRW(2)=0.01; deltaRW(3)=0.02; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
472  }
473  if ((level == 23)&&(subdetlevel == 4)){ //Ring is a Disk
474  deltaRW(1)=0.004; deltaRW(2)=0.004; deltaRW(3)=0.005; deltaRW(4)=0.00004; deltaRW(5)=0.00004; deltaRW(6)=0.00004;
475  }
476  if ((level == 22)&&(subdetlevel == 4)){ //Side of a Ring
477  deltaRW(1)=0.002; deltaRW(2)=0.002; deltaRW(3)=0.002; deltaRW(4)=0.00004; deltaRW(5)=0.00004; deltaRW(6)=0.00004;
478  }
479  if ((level == 2)&&(subdetlevel == 4)){ //Det in a Side
480  deltaRW(1)=0.002; deltaRW(2)=0.002; deltaRW(3)=0.002; deltaRW(4)=0.0002; deltaRW(5)=0.0002; deltaRW(6)=0.0002;
481  }
482  if ((level == 1)&&(subdetlevel == 4)){ //DetUnit is a Side
483  deltaRW(1)=0.002; deltaRW(2)=0.002; deltaRW(3)=0.002; deltaRW(4)=0.0002; deltaRW(5)=0.0002; deltaRW(6)=0.0002;
484  }
485  //TOB
486  if ((level == 30)&&(subdetlevel == 5)){ // TOB in Strip Tracker
487  deltaRW(1)=0.06; deltaRW(2)=0.06; deltaRW(3)=0.06; deltaRW(4)=0.00025; deltaRW(5)=0.00025; deltaRW(6)=0.00025;
488  }
489  if ((level == 29)&&(subdetlevel == 5)){ //HalfBarrel in the TOB
490  deltaRW(1)=0.014; deltaRW(2)=0.014; deltaRW(3)=0.05; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
491  }
492  if ((level == 28)&&(subdetlevel == 5)){ //Layer in a HalfBarrel
493  deltaRW(1)=0.02; deltaRW(2)=0.02; deltaRW(3)=0.02; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
494  }
495  if ((level == 27)&&(subdetlevel == 5)){ //Rod in a Layer
496  deltaRW(1)=0.01; deltaRW(2)=0.01; deltaRW(3)=0.02; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
497  }
498  if ((level == 2)&&(subdetlevel == 5)){ //Det in a Rod
499  deltaRW(1)=0.003; deltaRW(2)=0.003; deltaRW(3)=0.01; deltaRW(4)=0.0002; deltaRW(5)=0.0002; deltaRW(6)=0.0002;
500  }
501  if ((level == 1)&&(subdetlevel == 5)){ //DetUnit in a Rod
502  deltaRW(1)=0.003; deltaRW(2)=0.003; deltaRW(3)=0.01; deltaRW(4)=0.0002; deltaRW(5)=0.0002; deltaRW(6)=0.0002;
503  }
504  //TEC
505  if ((level == 36)&&(subdetlevel == 6)){ //TEC in the Strip Tracker
506  deltaRW(1)=0.06; deltaRW(2)=0.06; deltaRW(3)=0.1; deltaRW(4)=0.0003; deltaRW(5)=0.0003; deltaRW(6)=0.0003;
507  }
508  if ((level == 35)&&(subdetlevel == 6)){ //Disk in the TEC
509  deltaRW(1)=0.015; deltaRW(2)=0.015; deltaRW(3)=0.03; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
510  }
511  if ((level == 34)&&(subdetlevel == 6)){ //Side on a Disk
512  deltaRW(1)=0.01; deltaRW(2)=0.01; deltaRW(3)=0.02; deltaRW(4)=0.00005; deltaRW(5)=0.00005; deltaRW(6)=0.00005;
513  }
514  if ((level == 33)&&(subdetlevel == 6)){ //Petal on a Side of a Disk
515  deltaRW(1)=0.01; deltaRW(2)=0.01; deltaRW(3)=0.02; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
516  }
517  if ((level == 32)&&(subdetlevel == 6)){ //Ring on a Petal
518  deltaRW(1)=0.007; deltaRW(2)=0.007; deltaRW(3)=0.015; deltaRW(4)=0.00015; deltaRW(5)=0.00015; deltaRW(6)=0.00015;
519  }
520  if ((level == 2)&&(subdetlevel == 6)){ //Det on a Ring
521  deltaRW(1)=0.002; deltaRW(2)=0.002; deltaRW(3)=0.005; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
522  }
523  if ((level == 1)&&(subdetlevel == 6)){ // DetUnit on a Ring
524  deltaRW(1)=0.002; deltaRW(2)=0.002; deltaRW(3)=0.005; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
525  }
526 
527  return deltaRW;
528 
529 
530 }
CLHEP::HepVector AlgebraicVector
tuple level
Definition: testEve_cfg.py:34
AlgebraicVector CreateSurveyRcds::getStructurePlacements ( int  level,
int  subdetlevel 
)
private

default values for assembly precision

Definition at line 236 of file CreateSurveyRcds.cc.

237 {
238  AlgebraicVector deltaRW(6);
239  deltaRW(1)=0.0; deltaRW(2)=0.0; deltaRW(3)=0.0; deltaRW(4)=0.0; deltaRW(5)=0.0; deltaRW(6)=0.0;
240  //PIXEL
241  if ((level == 37)&&(subdetlevel == 1)){
242  deltaRW(1)=0.3; deltaRW(2)=0.3; deltaRW(3)=0.3; deltaRW(4)=0.0017; deltaRW(5)=0.0017; deltaRW(6)=0.0017;
243  }
244  //STRIP
245  if ((level == 38)&&(subdetlevel == 3)){
246  deltaRW(1)=0.3; deltaRW(2)=0.3; deltaRW(3)=0.3; deltaRW(4)=0.0004; deltaRW(5)=0.0004; deltaRW(6)=0.0004;
247  }
248  //TRACKER
249  if ((level == 39)&&(subdetlevel == 1)){
250  deltaRW(1)=0.0; deltaRW(2)=0.0; deltaRW(3)=0.0; deltaRW(4)=0.0; deltaRW(5)=0.0; deltaRW(6)=0.0;
251  }
252  //TPB
253  if ((level == 7)&&(subdetlevel == 1)){
254  deltaRW(1)=0.2; deltaRW(2)=0.2; deltaRW(3)=0.2; deltaRW(4)=0.003; deltaRW(5)=0.003; deltaRW(6)=0.003;
255  }
256  if ((level == 6)&&(subdetlevel == 1)){
257  deltaRW(1)=0.05; deltaRW(2)=0.05; deltaRW(3)=0.05; deltaRW(4)=0.0008; deltaRW(5)=0.0008; deltaRW(6)=0.0008;
258  }
259  if ((level == 5)&&(subdetlevel == 1)){
260  deltaRW(1)=0.02; deltaRW(2)=0.02; deltaRW(3)=0.02; deltaRW(4)=0.0004; deltaRW(5)=0.0004; deltaRW(6)=0.0004;
261  }
262  if ((level == 4)&&(subdetlevel == 1)){
263  deltaRW(1)=0.01; deltaRW(2)=0.01; deltaRW(3)=0.005; deltaRW(4)=0.0002; deltaRW(5)=0.0002; deltaRW(6)=0.0002;
264  }
265  if ((level == 2)&&(subdetlevel == 1)){
266  deltaRW(1)=0.005; deltaRW(2)=0.005; deltaRW(3)=0.003; deltaRW(4)=0.001; deltaRW(5)=0.001; deltaRW(6)=0.001;
267  }
268  if ((level == 1)&&(subdetlevel == 1)){
269  deltaRW(1)=0.005; deltaRW(2)=0.005; deltaRW(3)=0.003; deltaRW(4)=0.001; deltaRW(5)=0.001; deltaRW(6)=0.001;
270  }
271  //TPE
272  if ((level == 13)&&(subdetlevel == 2)){
273  deltaRW(1)=0.2; deltaRW(2)=0.2; deltaRW(3)=0.2; deltaRW(4)=0.0017; deltaRW(5)=0.0017; deltaRW(6)=0.0017;
274  }
275  if ((level == 12)&&(subdetlevel == 2)){
276  deltaRW(1)=0.05; deltaRW(2)=0.05; deltaRW(3)=0.05; deltaRW(4)=0.0004; deltaRW(5)=0.0004; deltaRW(6)=0.0004;
277  }
278  if ((level == 11)&&(subdetlevel == 2)){
279  deltaRW(1)=0.02; deltaRW(2)=0.02; deltaRW(3)=0.02; deltaRW(4)=0.001; deltaRW(5)=0.001; deltaRW(6)=0.001;
280  }
281  if ((level == 10)&&(subdetlevel == 2)){
282  deltaRW(1)=0.01; deltaRW(2)=0.01; deltaRW(3)=0.01; deltaRW(4)=0.001; deltaRW(5)=0.001; deltaRW(6)=0.001;
283  }
284  if ((level == 9)&&(subdetlevel == 2)){
285  deltaRW(1)=0.01; deltaRW(2)=0.01; deltaRW(3)=0.005; deltaRW(4)=0.002; deltaRW(5)=0.002; deltaRW(6)=0.002;
286  }
287  if ((level == 2)&&(subdetlevel == 2)){
288  deltaRW(1)=0.005; deltaRW(2)=0.005; deltaRW(3)=0.003; deltaRW(4)=0.001; deltaRW(5)=0.001; deltaRW(6)=0.001;
289  }
290  if ((level == 1)&&(subdetlevel == 2)){
291  deltaRW(1)=0.005; deltaRW(2)=0.005; deltaRW(3)=0.003; deltaRW(4)=0.001; deltaRW(5)=0.001; deltaRW(6)=0.001;
292  }
293  //TIB
294  if ((level == 20)&&(subdetlevel == 3)){
295  deltaRW(1)=0.2; deltaRW(2)=0.2; deltaRW(3)=0.2; deltaRW(4)=0.0017; deltaRW(5)=0.0017; deltaRW(6)=0.0017;
296  }
297  if ((level == 19)&&(subdetlevel == 3)){
298  deltaRW(1)=0.1; deltaRW(2)=0.1; deltaRW(3)=0.1; deltaRW(4)=0.0008; deltaRW(5)=0.0008; deltaRW(6)=0.0008;
299  }
300  if ((level == 18)&&(subdetlevel == 3)){
301  deltaRW(1)=0.04; deltaRW(2)=0.04; deltaRW(3)=0.02; deltaRW(4)=0.0006; deltaRW(5)=0.0006; deltaRW(6)=0.0006;
302  }
303  if ((level == 17)&&(subdetlevel == 3)){
304  deltaRW(1)=0.03; deltaRW(2)=0.03; deltaRW(3)=0.015; deltaRW(4)=0.0004; deltaRW(5)=0.0004; deltaRW(6)=0.0004;
305  }
306  if ((level == 16)&&(subdetlevel == 3)){
307  deltaRW(1)=0.01; deltaRW(2)=0.01; deltaRW(3)=0.01; deltaRW(4)=0.0004; deltaRW(5)=0.0002; deltaRW(6)=0.0002;
308  }
309  if ((level == 15)&&(subdetlevel == 3)){
310  deltaRW(1)=0.01; deltaRW(2)=0.01; deltaRW(3)=0.01; deltaRW(4)=0.0004; deltaRW(5)=0.0002; deltaRW(6)=0.0002;
311  }
312  if ((level == 2)&&(subdetlevel == 3)){
313  deltaRW(1)=0.005; deltaRW(2)=0.005; deltaRW(3)=0.005; deltaRW(4)=0.001; deltaRW(5)=0.0005; deltaRW(6)=0.0005;
314  }
315  if ((level == 1)&&(subdetlevel == 3)){
316  deltaRW(1)=0.005; deltaRW(2)=0.005; deltaRW(3)=0.005; deltaRW(4)=0.001; deltaRW(5)=0.0005; deltaRW(6)=0.0005;
317  }
318  //TID
319  if ((level == 25)&&(subdetlevel == 4)){
320  deltaRW(1)=0.2; deltaRW(2)=0.2; deltaRW(3)=0.2; deltaRW(4)=0.0013; deltaRW(5)=0.0013; deltaRW(6)=0.0013;
321  }
322  if ((level == 24)&&(subdetlevel == 4)){
323  deltaRW(1)=0.05; deltaRW(2)=0.05; deltaRW(3)=0.05; deltaRW(4)=0.0004; deltaRW(5)=0.0004; deltaRW(6)=0.0004;
324  }
325  if ((level == 23)&&(subdetlevel == 4)){
326  deltaRW(1)=0.01; deltaRW(2)=0.01; deltaRW(3)=0.01; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
327  }
328  if ((level == 22)&&(subdetlevel == 4)){
329  deltaRW(1)=0.005; deltaRW(2)=0.005; deltaRW(3)=0.005; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
330  }
331  if ((level == 2)&&(subdetlevel == 4)){
332  deltaRW(1)=0.005; deltaRW(2)=0.005; deltaRW(3)=0.005; deltaRW(4)=0.0005; deltaRW(5)=0.0005; deltaRW(6)=0.0005;
333  }
334  if ((level == 1)&&(subdetlevel == 4)){
335  deltaRW(1)=0.005; deltaRW(2)=0.005; deltaRW(3)=0.005; deltaRW(4)=0.0005; deltaRW(5)=0.0005; deltaRW(6)=0.0005;
336  }
337  //TOB
338  if ((level == 30)&&(subdetlevel == 5)){
339  deltaRW(1)=0.2; deltaRW(2)=0.2; deltaRW(3)=0.2; deltaRW(4)=0.0008; deltaRW(5)=0.0008; deltaRW(6)=0.0008;
340  }
341  if ((level == 29)&&(subdetlevel == 5)){
342  deltaRW(1)=0.014; deltaRW(2)=0.014; deltaRW(3)=0.05; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
343  }
344  if ((level == 28)&&(subdetlevel == 5)){
345  deltaRW(1)=0.02; deltaRW(2)=0.02; deltaRW(3)=0.02; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
346  }
347  if ((level == 27)&&(subdetlevel == 5)){
348  deltaRW(1)=0.01; deltaRW(2)=0.01; deltaRW(3)=0.02; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
349  }
350  if ((level == 2)&&(subdetlevel == 5)){
351  deltaRW(1)=0.003; deltaRW(2)=0.003; deltaRW(3)=0.01; deltaRW(4)=0.0002; deltaRW(5)=0.0002; deltaRW(6)=0.0002;
352  }
353  if ((level == 1)&&(subdetlevel == 5)){
354  deltaRW(1)=0.003; deltaRW(2)=0.003; deltaRW(3)=0.01; deltaRW(4)=0.0002; deltaRW(5)=0.0002; deltaRW(6)=0.0002;
355  }
356  //TEC
357  if ((level == 36)&&(subdetlevel == 6)){
358  deltaRW(1)=0.2; deltaRW(2)=0.2; deltaRW(3)=0.2; deltaRW(4)=0.0008; deltaRW(5)=0.0008; deltaRW(6)=0.0008;
359  }
360  if ((level == 35)&&(subdetlevel == 6)){
361  deltaRW(1)=0.05; deltaRW(2)=0.05; deltaRW(3)=0.05; deltaRW(4)=0.0003; deltaRW(5)=0.0003; deltaRW(6)=0.0003;
362  }
363  if ((level == 34)&&(subdetlevel == 6)){
364  deltaRW(1)=0.01; deltaRW(2)=0.01; deltaRW(3)=0.02; deltaRW(4)=0.00005; deltaRW(5)=0.00005; deltaRW(6)=0.00005;
365  }
366  if ((level == 33)&&(subdetlevel == 6)){
367  deltaRW(1)=0.01; deltaRW(2)=0.01; deltaRW(3)=0.02; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
368  }
369  if ((level == 32)&&(subdetlevel == 6)){
370  deltaRW(1)=0.007; deltaRW(2)=0.007; deltaRW(3)=0.015; deltaRW(4)=0.00015; deltaRW(5)=0.00015; deltaRW(6)=0.00015;
371  }
372  if ((level == 2)&&(subdetlevel == 6)){
373  deltaRW(1)=0.002; deltaRW(2)=0.002; deltaRW(3)=0.005; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
374  }
375  if ((level == 1)&&(subdetlevel == 6)){
376  deltaRW(1)=0.002; deltaRW(2)=0.002; deltaRW(3)=0.005; deltaRW(4)=0.0001; deltaRW(5)=0.0001; deltaRW(6)=0.0001;
377  }
378 
379  return deltaRW;
380 }
CLHEP::HepVector AlgebraicVector
tuple level
Definition: testEve_cfg.py:34
void CreateSurveyRcds::setGeometry ( Alignable ali)
private

module which modifies the geometry

Definition at line 75 of file CreateSurveyRcds.cc.

References Alignable::alignableObjectId(), AlCaHLTBitMon_QueryRunRegistry::comp, Alignable::components(), align::diffR(), getStructureErrors(), i, Alignable::id(), AlignableSurface::length(), testEve_cfg::level, m_generatedRandom, m_generatedSimple, m_inputSimpleMis, Alignable::mother(), Alignable::move(), Alignable::rotateAroundLocalX(), Alignable::rotateAroundLocalY(), Alignable::rotateAroundLocalZ(), DetId::subdetId(), Alignable::surface(), AlignableSurface::toGlobal(), and relativeConstraints::value.

Referenced by analyze().

76 {
77 
78  const align::Alignables& comp = ali->components();
79  unsigned int nComp = comp.size();
80  //move then do for lower level object
81  //for issue of det vs detunit
82  bool usecomps = true;
83  if ((ali->alignableObjectId()==2)&&(nComp>=1)) usecomps = false;
84  for (unsigned int i = 0; i < nComp; ++i){
85  if (usecomps) setGeometry(comp[i]);
86  }
87  DetId id( ali->id() );
88  int subdetlevel = id.subdetId();
89  int level = ali->alignableObjectId();
90 
91  //for random misalignment
92  if (m_generatedRandom){
93  if (subdetlevel > 0){
94  AlgebraicVector value = getStructureErrors(level, subdetlevel);
95 
96  double value0 = CLHEP::RandGauss::shoot(0,value[0]);
97  double value1 = CLHEP::RandGauss::shoot(0,value[1]);
98  double value2 = CLHEP::RandGauss::shoot(0,value[2]);
99  double value3 = CLHEP::RandGauss::shoot(0,value[3]);
100  double value4 = CLHEP::RandGauss::shoot(0,value[4]);
101  double value5 = CLHEP::RandGauss::shoot(0,value[5]);
102 
103  //move/rotate the surface
104  align::LocalVector diffR(value0,value1,value2);
105  align::Scalar diffWx = value3;
106  align::Scalar diffWy = value4;
107  align::Scalar diffWz = value5;
108  ali->move(ali->surface().toGlobal(diffR));
109  ali->rotateAroundLocalX(diffWx);
110  ali->rotateAroundLocalY(diffWy);
111  ali->rotateAroundLocalZ(diffWz);
112  }
113  }
114 
115  // for simple misalignments
116  if (m_generatedSimple){
117  if ((level == 2)||((level == 1)&&(ali->mother()->alignableObjectId() != 2))){
118 
119  const double constMis = m_inputSimpleMis;
120  const double dAngle = constMis/ali->surface().length();
121  //std::cout << "Shift: " << constMis << ", Rot: " << dAngle << std::endl;
122  double value0 = CLHEP::RandGauss::shoot(0, constMis);
123  double value1 = CLHEP::RandGauss::shoot(0, constMis);
124  double value2 = CLHEP::RandGauss::shoot(0, constMis);
125  double value3 = CLHEP::RandGauss::shoot(0, dAngle);
126  double value4 = CLHEP::RandGauss::shoot(0, dAngle);
127  double value5 = CLHEP::RandGauss::shoot(0, dAngle);
128 
129  align::LocalVector diffR(value0,value1,value2);
130  ali->move(ali->surface().toGlobal(diffR));
131  align::Scalar diffWx = value3;
132  align::Scalar diffWy = value4;
133  align::Scalar diffWz = value5;
134  ali->rotateAroundLocalX(diffWx);
135  ali->rotateAroundLocalY(diffWy);
136  ali->rotateAroundLocalZ(diffWz);
137  }
138  }
139 
140 }
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
virtual void rotateAroundLocalZ(Scalar radians)
Rotation around local z-axis.
Definition: Alignable.cc:187
double Scalar
Definition: Definitions.h:27
GlobalVector diffR(const GlobalVectors &current, const GlobalVectors &nominal)
Definition: Utilities.cc:166
virtual void move(const GlobalVector &displacement)=0
Movement with respect to the global reference frame.
virtual Alignables components() const =0
Return vector of all direct components.
void setGeometry(Alignable *)
module which modifies the geometry
AlgebraicVector getStructureErrors(int, int)
default values for survey uncertainty
virtual StructureType alignableObjectId() const =0
Return the alignable type identifier.
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
Definition: Alignable.h:126
Definition: DetId.h:18
CLHEP::HepVector AlgebraicVector
align::Scalar length() const
virtual void rotateAroundLocalY(Scalar radians)
Rotation around local y-axis.
Definition: Alignable.cc:161
std::vector< Alignable * > Alignables
Definition: Utilities.h:28
virtual void rotateAroundLocalX(Scalar radians)
Rotation around local x-axis.
Definition: Alignable.cc:135
align::GlobalPoints toGlobal(const align::LocalPoints &) const
Return in global coord given a set of local points.
tuple level
Definition: testEve_cfg.py:34
Alignable * mother() const
Return pointer to container alignable (if any)
Definition: Alignable.h:85
void CreateSurveyRcds::setSurveyErrors ( Alignable ali)
private

module which creates/inserts the survey errors

Definition at line 142 of file CreateSurveyRcds.cc.

References Alignable::alignableObjectId(), AlCaHLTBitMon_QueryRunRegistry::comp, Alignable::components(), relativeConstraints::error, getStructureErrors(), i, Alignable::id(), testEve_cfg::level, Alignable::setSurvey(), DetId::subdetId(), and Alignable::surface().

Referenced by analyze().

142  {
143 
144  const align::Alignables& comp = ali->components();
145  unsigned int nComp = comp.size();
146  //move then do for lower level object
147  //for issue of det vs detunit
148  for (unsigned int i = 0; i < nComp; ++i){
149  setSurveyErrors(comp[i]);
150  }
151 
152  DetId id( ali->id() );
153  int subdetlevel = id.subdetId();
154  int level = ali->alignableObjectId();
155 
156  AlgebraicVector error = getStructureErrors(level, subdetlevel);
157 
158  double error0 = error[0];
159  double error1 = error[1];
160  double error2 = error[2];
161  double error3 = error[3];
162  double error4 = error[4];
163  double error5 = error[5];
164 
165  // ----------------INFLATING ERRORS----------------------
166  // inflating sensitive coordinates in each subdetector
167  // tib
168  if ((level <= 2)&&(subdetlevel == 3)){
169  error0 = 0.01; error5 = 0.001;
170  if ((level==2)&&(nComp == 2)){
171  error1 = 0.01;
172  }
173  }
174  // tid
175  if ((level <= 2)&&(subdetlevel == 4)){
176  error0=0.01; error1=0.01; error2=0.01; error3=0.001; error4=0.001; error5=0.001;
177  //error0=0.01; error1=0.002; error2=0.002; error3=0.0002; error4=0.0002; error5=0.001;
178  //if ((level == 2)&&(nComp == 2)){
179  // error1 = 0.01;
180  //}
181  }
182  if ((level == 23)&&(subdetlevel == 4)){ //Ring is a Disk
183  error0=0.02; error1=0.02; error2=0.03; error3=0.0002; error4=0.0002; error5=0.0002;
184  }
185  if ((level == 22)&&(subdetlevel == 4)){ //Side of a Ring
186  error0=0.01; error1=0.01; error2=0.01; error3=0.0002; error4=0.0002; error5=0.0002;
187  }
188  // tob
189  if ((level <= 2)&&(subdetlevel == 5)){
190  //error0 = 0.015; error1 = 0.015; error2 = 0.05; error3 = 0.001; error4 = 0.001; error5 = 0.001;
191  error0 = 0.015; error1 = 0.003; error2 = 0.003; error3 = 0.0002; error4 = 0.0002; error5 = 0.001;
192  if ((level == 2)&&(nComp == 2)){
193  error1 = 0.015;
194  }
195  }
196  if ((level == 27)&&(subdetlevel == 5)){ //Rod in a Layer
197  error0=0.02; error1=0.02; error2=0.03; error3=0.001; error4=0.001; error5=0.001;
198  }
199  // tec
200  if ((level <= 2)&&(subdetlevel == 6)){
201  error0 = 0.02; error5 = 0.0005;
202  if ((level==2)&&(nComp == 2)){
203  error1 = 0.02;
204  }
205  }
206  if ((level == 34)&&(subdetlevel == 6)){ //Side on a Disk
207  error0=0.01; error1=0.01; error2=0.02; error3=0.00005; error4=0.00005; error5=0.00005;
208  }
209  if ((level == 33)&&(subdetlevel == 6)){ //Petal on a Side of a Disk
210  error0=0.01; error1=0.01; error2=0.02; error3=0.0001; error4=0.0001; error5=0.0001;
211  }
212  if ((level == 32)&&(subdetlevel == 6)){ //Ring on a Petal
213  error0=0.007; error1=0.007; error2=0.015; error3=0.00015; error4=0.00015; error5=0.00015;
214  }
215  // ----------------INFLATING ERRORS----------------------
216 
217  //create the error matrix
218  align::ErrorMatrix error_Matrix;
219  double * errorData = error_Matrix.Array();
220  errorData[0] = error0*error0; errorData[2] = error1*error1; errorData[5] = error2*error2;
221  errorData[9] = error3*error3; errorData[14] = error4*error4; errorData[20] = error5*error5;
222  errorData[1] = 0.0;
223  errorData[3] = 0.0; errorData[4] = 0.0;
224  errorData[6] = 0.0; errorData[7] = 0.0; errorData[8] = 0.0;
225  errorData[10] = 0.0; errorData[11] = 0.0; errorData[12] = 0.0; errorData[13] = 0.0;
226  errorData[15] = 0.0; errorData[16] = 0.0; errorData[17] = 0.0; errorData[18] = 0.0; errorData[19] = 0.0;
227 
228 
229  ali->setSurvey( new SurveyDet(ali->surface(), error_Matrix ) );
230 
231 }
void setSurveyErrors(Alignable *)
module which creates/inserts the survey errors
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
virtual Alignables components() const =0
Return vector of all direct components.
AlgebraicVector getStructureErrors(int, int)
default values for survey uncertainty
virtual StructureType alignableObjectId() const =0
Return the alignable type identifier.
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
Definition: Alignable.h:126
Definition: DetId.h:18
CLHEP::HepVector AlgebraicVector
void setSurvey(const SurveyDet *)
Set survey info.
Definition: Alignable.cc:268
std::vector< Alignable * > Alignables
Definition: Utilities.h:28
tuple level
Definition: testEve_cfg.py:34
math::Error< 6 >::type ErrorMatrix
Definition: Definitions.h:39

Member Data Documentation

edm::ESHandle<Alignments> CreateSurveyRcds::alignments
private

Definition at line 60 of file CreateSurveyRcds.h.

Referenced by analyze().

bool CreateSurveyRcds::m_generatedRandom
private

Definition at line 52 of file CreateSurveyRcds.h.

Referenced by CreateSurveyRcds(), and setGeometry().

bool CreateSurveyRcds::m_generatedSimple
private

Definition at line 53 of file CreateSurveyRcds.h.

Referenced by CreateSurveyRcds(), and setGeometry().

std::string CreateSurveyRcds::m_inputGeom
private

Definition at line 50 of file CreateSurveyRcds.h.

Referenced by analyze(), and CreateSurveyRcds().

double CreateSurveyRcds::m_inputSimpleMis
private

Definition at line 51 of file CreateSurveyRcds.h.

Referenced by CreateSurveyRcds(), and setGeometry().

std::string CreateSurveyRcds::textFileName
private

Definition at line 58 of file CreateSurveyRcds.h.

const edm::ParameterSet CreateSurveyRcds::theParameterSet
private

Definition at line 61 of file CreateSurveyRcds.h.

Referenced by analyze().

SurveyInputTextReader::MapType CreateSurveyRcds::uIdMap
private

Definition at line 56 of file CreateSurveyRcds.h.