CMS 3D CMS Logo

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

void analyze (const edm::Event &, const edm::EventSetup &) override
 Do nothing for each event. More...
 
 CreateSurveyRcds (const edm::ParameterSet &)
 
- Public Member Functions inherited from SurveyInputBase
void beginJob () override
 Read data from input. More...
 
 ~SurveyInputBase () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

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
 
SurveyInputTextReader::MapType uIdMap
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- 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 &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- 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 31 of file CreateSurveyRcds.cc.

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

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

Member Function Documentation

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

Do nothing for each event.

Implements SurveyInputBase.

Definition at line 39 of file CreateSurveyRcds.cc.

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

39  {
40 
41  //Retrieve tracker topology from geometry
43  setup.get<TrackerTopologyRcd>().get(tTopoHandle);
44  const TrackerTopology* const tTopo = tTopoHandle.product();
45 
47  setup.get<IdealGeometryRecord>().get(geom);
49  setup.get<PTrackerParametersRcd>().get( ptp );
51 
52  //take geometry from DB or randomly generate geometry
53  if (m_inputGeom == "sqlite"){
54  //build the tracker
57 
58  setup.get<TrackerAlignmentRcd>().get(alignments);
59  setup.get<TrackerAlignmentErrorExtendedRcd>().get(alignmentErrors);
60 
61  //apply the latest alignments
62  GeometryAligner aligner;
63  aligner.applyAlignments<TrackerGeometry>( &(*tracker), &(*alignments), &(*alignmentErrors), AlignTransform() );
64 
65  }
66 
67 
68  addComponent(new AlignableTracker( tracker, tTopo ) );
69 
70  Alignable* ali = detector();
71  if(m_inputGeom == "generated"){
72  setGeometry( ali );
73  }
74 
75  setSurveyErrors( ali );
76 
77 }
void setSurveyErrors(Alignable *)
module which creates/inserts the survey errors
Class to update a given geometry with a set of alignments.
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:1
TrackerGeometry * build(const GeometricDet *gd, const PTrackerParameters &ptp, const TrackerTopology *tTopo)
static void addComponent(Alignable *)
edm::ESHandle< Alignments > alignments
void setGeometry(Alignable *)
module which modifies the geometry
static Alignable * detector()
Get alignable detector as read from input.
std::string m_inputGeom
void applyAlignments(C *geometry, const Alignments *alignments, const AlignmentErrorsExtended *alignmentErrors, const AlignTransform &globalCoordinates)
T const * product() const
Definition: ESHandle.h:86
AlgebraicVector CreateSurveyRcds::getStructureErrors ( int  level,
int  subdetlevel 
)
private

default values for survey uncertainty

Definition at line 388 of file CreateSurveyRcds.cc.

References DEFINE_FWK_MODULE.

Referenced by setGeometry(), and setSurveyErrors().

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

default values for assembly precision

Definition at line 240 of file CreateSurveyRcds.cc.

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

module which modifies the geometry

Definition at line 79 of file CreateSurveyRcds.cc.

References Alignable::alignableObjectId(), AlCaHLTBitMon_QueryRunRegistry::comp, Alignable::components(), align::diffR(), getStructureErrors(), mps_fire::i, triggerObjects_cff::id, Alignable::id(), AlignableSurface::length(), hcalDigis_cfi::level, m_generatedRandom, m_generatedSimple, m_inputSimpleMis, Alignable::mother(), Alignable::move(), Alignable::rotateAroundLocalX(), Alignable::rotateAroundLocalY(), Alignable::rotateAroundLocalZ(), Alignable::surface(), AlignableSurface::toGlobal(), hiDetachedQuadStep_cff::value1, and hiDetachedQuadStep_cff::value2.

Referenced by analyze().

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

module which creates/inserts the survey errors

Definition at line 146 of file CreateSurveyRcds.cc.

References Alignable::alignableObjectId(), AlCaHLTBitMon_QueryRunRegistry::comp, Alignable::components(), relativeConstraints::error, getStructureErrors(), mps_fire::i, triggerObjects_cff::id, Alignable::id(), hcalDigis_cfi::level, Alignable::setSurvey(), and Alignable::surface().

Referenced by analyze().

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

SurveyInputTextReader::MapType CreateSurveyRcds::uIdMap
private

Definition at line 56 of file CreateSurveyRcds.h.