CMS 3D CMS Logo

PedeSteererWeakModeConstraints.h
Go to the documentation of this file.
1 #ifndef PEDESTEERERWEAKMODECONSTRAINTS_H
2 #define PEDESTEERERWEAKMODECONSTRAINTS_H
3 
13 #include <list>
14 #include <vector>
15 #include <map>
16 #include <set>
17 #include <string>
18 // forward ofstream:
19 #include <iosfwd>
20 
24 
27 
28 class Alignable;
29 class PedeLabelerBase;
30 
31 /***************************************
32 ****************************************/
33 
34 //FIXME: move GeometryConstraintConfigData to PedeSteererWeakModeConstraints?
36 public:
37  GeometryConstraintConfigData(const std::vector<double> &co,
38  const std::string &c,
39  const std::vector<std::pair<Alignable *, std::string> > &alisFile,
40  const int sd,
41  const align::Alignables &ex,
42  const int instance,
43  const bool downToLowestLevel);
44  const std::vector<double> coefficients_;
46  const std::vector<std::pair<Alignable *, std::string> > levelsFilenames_;
48  std::map<std::string, std::ofstream *> mapFileName_;
49  std::list<std::pair<Alignable *, std::list<Alignable *> > >
50  HLSsubdets_; //first pointer to HLS object, second list is the list of pointers to the lowest components
51  const int sysdeformation_;
52  const int instance_;
53  const bool downToLowestLevel_;
54 };
55 
57 public:
60  const PedeLabelerBase *labels,
61  const std::vector<edm::ParameterSet> &config,
62  std::string sf);
63 
64  //FIXME: split the code of the method into smaller pieces/submethods
65  // Main method that configures everything and calculates also the constraints
66  unsigned int constructConstraints(const align::Alignables &);
67 
68  // Returns a references to the container in which the configuration is stored
69  std::list<GeometryConstraintConfigData> &getConfigData() { return ConstraintsConfigContainer_; }
70 
71 private:
72  // Method creates the data structures with the full configuration
73  unsigned int createAlignablesDataStructure();
74 
75  // Write the calculated constraints to the output files
76  void writeOutput(const std::list<std::pair<unsigned int, double> > &output,
78  const Alignable *iHLS,
79  double sum_xi_x0);
80 
81  // find the out file stream for a given constraint and high-level structure
82  std::ofstream *getFile(const GeometryConstraintConfigData &it, const Alignable *iHLS) const;
83 
84  // Close the output files
85  void closeOutputfiles();
86 
87  // Checks whether lowleveldet is a daugther of HLS
88  bool checkMother(const Alignable *const lowleveldet, const Alignable *const HLS) const;
89 
90  std::pair<align::GlobalPoint, align::GlobalPoint> getDoubleSensorPosition(const Alignable *ali) const;
91 
92  double getPhase(const std::vector<double> &coefficients) const;
93 
94  // The function for the geometry deformation is defined as f(x).
95  // The methods returns x depending on the type of deformation
96  double getX(const int sysdeformation, const align::GlobalPoint &pos, const double phase) const;
97 
98  double getX0(const std::pair<Alignable *, std::list<Alignable *> > &iHLS,
99  const GeometryConstraintConfigData &it) const;
100 
101  // Calculates and returns the coefficient for alignment parameter iParameter
102  // for an alignable at position pos.
103  double getCoefficient(const int sysdeformation,
104  const align::GlobalPoint &pos,
105  const GlobalPoint gUDirection,
106  const GlobalPoint gVDirection,
107  const GlobalPoint gWDirection,
108  const int iParameter,
109  const double &x0,
110  const std::vector<double> &constraintparameters) const;
111 
112  //returns true if iParameter of Alignable is selected in configuration file
113  bool checkSelectionShiftParameter(const Alignable *ali, unsigned int iParameter) const;
114 
115  // Method used to test the provided configuration for unknown parameters
116  void verifyParameterNames(const edm::ParameterSet &pset, unsigned int psetnr) const;
117 
118  // Method which creates the associative map between levels and coefficient file names
119  const std::vector<std::pair<Alignable *, std::string> > makeLevelsFilenames(
120  std::set<std::string> &steerFilePrefixContainer,
121  const align::Alignables &alis,
122  const std::string &steerFilePrefix) const;
123 
124  // Verify that the name of the configured deformation is known and that the number of coefficients has been correctly configured
125  int verifyDeformationName(const std::string &name, const std::vector<double> &coefficients) const;
126 
127  //list of dead modules which are not used in any constraint
128  std::list<align::ID> deadmodules_;
129 
130  //the data structure that holds all needed informations for the constraint configuration
131  std::list<GeometryConstraintConfigData> ConstraintsConfigContainer_;
132 
133  const PedeLabelerBase *myLabels_; //PedeLabeler needed to get for the alignables the corresponding Pede label
134 
135  const std::vector<edm::ParameterSet> myConfig_; //the VPSet with the configurations for all constraints
136 
137  const std::string steerFile_; // the name of the PedeSteerer steering file
138 
140 
142  kUnknown = 0,
151  kSkew
152  };
153 };
154 
155 #endif
SummaryClient_cfi.labels
labels
Definition: SummaryClient_cfi.py:61
PedeSteererWeakModeConstraints::verifyDeformationName
int verifyDeformationName(const std::string &name, const std::vector< double > &coefficients) const
Definition: PedeSteererWeakModeConstraints.cc:677
AlignableObjectId
Allows conversion between type and name, and vice-versa.
Definition: AlignableObjectId.h:12
PedeSteererWeakModeConstraints::kTelescope
Definition: PedeSteererWeakModeConstraints.h:146
GeometryConstraintConfigData
Definition: PedeSteererWeakModeConstraints.h:34
PedeSteererWeakModeConstraints::getConfigData
std::list< GeometryConstraintConfigData > & getConfigData()
Definition: PedeSteererWeakModeConstraints.h:68
PedeSteererWeakModeConstraints::closeOutputfiles
void closeOutputfiles()
Definition: PedeSteererWeakModeConstraints.cc:406
GeometryConstraintConfigData::coefficients_
const std::vector< double > coefficients_
Definition: PedeSteererWeakModeConstraints.h:43
PedeSteererWeakModeConstraints::myConfig_
const std::vector< edm::ParameterSet > myConfig_
Definition: PedeSteererWeakModeConstraints.h:134
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:32
PedeSteererWeakModeConstraints::kUnknown
Definition: PedeSteererWeakModeConstraints.h:141
GeometryConstraintConfigData::sysdeformation_
const int sysdeformation_
Definition: PedeSteererWeakModeConstraints.h:50
Alignable
Definition: Alignable.h:27
pos
Definition: PixelAliasList.h:18
PedeSteererWeakModeConstraints::checkSelectionShiftParameter
bool checkSelectionShiftParameter(const Alignable *ali, unsigned int iParameter) const
Definition: PedeSteererWeakModeConstraints.cc:373
PedeSteererWeakModeConstraints::kLayerRotation
Definition: PedeSteererWeakModeConstraints.h:147
HLT_2018_cff.phase
phase
Definition: HLT_2018_cff.py:5346
cms::cuda::co
T *__restrict__ co
Definition: prefixScan.h:46
PedeSteererWeakModeConstraints::constructConstraints
unsigned int constructConstraints(const align::Alignables &)
Definition: PedeSteererWeakModeConstraints.cc:513
PedeSteererWeakModeConstraints::kSagitta
Definition: PedeSteererWeakModeConstraints.h:144
config
Definition: config.py:1
PedeSteererWeakModeConstraints::getDoubleSensorPosition
std::pair< align::GlobalPoint, align::GlobalPoint > getDoubleSensorPosition(const Alignable *ali) const
Definition: PedeSteererWeakModeConstraints.cc:141
PedeSteererWeakModeConstraints::verifyParameterNames
void verifyParameterNames(const edm::ParameterSet &pset, unsigned int psetnr) const
Definition: PedeSteererWeakModeConstraints.cc:639
PedeSteererWeakModeConstraints::PedeSteererWeakModeConstraints
PedeSteererWeakModeConstraints(AlignableTracker *aliTracker, const PedeLabelerBase *labels, const std::vector< edm::ParameterSet > &config, std::string sf)
Definition: PedeSteererWeakModeConstraints.cc:68
AlignableTracker
Definition: AlignableTracker.h:17
PedeSteererWeakModeConstraints::getPhase
double getPhase(const std::vector< double > &coefficients) const
Definition: PedeSteererWeakModeConstraints.cc:730
PedeSteererWeakModeConstraints::myLabels_
const PedeLabelerBase * myLabels_
Definition: PedeSteererWeakModeConstraints.h:132
Point3DBase< Scalar, GlobalTag >
PedeSteererWeakModeConstraints::ConstraintsConfigContainer_
std::list< GeometryConstraintConfigData > ConstraintsConfigContainer_
Definition: PedeSteererWeakModeConstraints.h:130
PedeSteererWeakModeConstraints::SystematicDeformations
SystematicDeformations
Definition: PedeSteererWeakModeConstraints.h:140
PedeSteererWeakModeConstraints::kRadial
Definition: PedeSteererWeakModeConstraints.h:145
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
GeometryConstraintConfigData::downToLowestLevel_
const bool downToLowestLevel_
Definition: PedeSteererWeakModeConstraints.h:52
PedeSteererWeakModeConstraints::getX0
double getX0(const std::pair< Alignable *, std::list< Alignable * > > &iHLS, const GeometryConstraintConfigData &it) const
Definition: PedeSteererWeakModeConstraints.cc:460
edm::ParameterSet
Definition: ParameterSet.h:36
PedeSteererWeakModeConstraints::~PedeSteererWeakModeConstraints
~PedeSteererWeakModeConstraints()
Definitions.h
PedeSteererWeakModeConstraints::createAlignablesDataStructure
unsigned int createAlignablesDataStructure()
Definition: PedeSteererWeakModeConstraints.cc:160
GeometryConstraintConfigData::levelsFilenames_
const std::vector< std::pair< Alignable *, std::string > > levelsFilenames_
Definition: PedeSteererWeakModeConstraints.h:45
PedeLabelerBase
Definition: PedeLabelerBase.h:33
GeometryConstraintConfigData::instance_
const int instance_
Definition: PedeSteererWeakModeConstraints.h:51
Utilities.h
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
PedeSteererWeakModeConstraints::deadmodules_
std::list< align::ID > deadmodules_
Definition: PedeSteererWeakModeConstraints.h:127
PedeSteererWeakModeConstraints::kTwist
Definition: PedeSteererWeakModeConstraints.h:142
GeometryConstraintConfigData::constraintName_
const std::string constraintName_
Definition: PedeSteererWeakModeConstraints.h:44
PedeSteererWeakModeConstraints::alignableObjectId_
const AlignableObjectId alignableObjectId_
Definition: PedeSteererWeakModeConstraints.h:138
instance
static PFTauRenderPlugin instance
Definition: PFTauRenderPlugin.cc:70
PedeSteererWeakModeConstraints::writeOutput
void writeOutput(const std::list< std::pair< unsigned int, double > > &output, const GeometryConstraintConfigData &it, const Alignable *iHLS, double sum_xi_x0)
Definition: PedeSteererWeakModeConstraints.cc:422
PedeSteererWeakModeConstraints::kZexpansion
Definition: PedeSteererWeakModeConstraints.h:143
PedeSteererWeakModeConstraints
Definition: PedeSteererWeakModeConstraints.h:55
align::Alignables
std::vector< Alignable * > Alignables
Definition: Utilities.h:31
PedeSteererWeakModeConstraints::getFile
std::ofstream * getFile(const GeometryConstraintConfigData &it, const Alignable *iHLS) const
Definition: PedeSteererWeakModeConstraints.cc:442
PedeSteererWeakModeConstraints::kElliptical
Definition: PedeSteererWeakModeConstraints.h:148
GeometryConstraintConfigData::HLSsubdets_
std::list< std::pair< Alignable *, std::list< Alignable * > > > HLSsubdets_
Definition: PedeSteererWeakModeConstraints.h:49
GeometryConstraintConfigData::GeometryConstraintConfigData
GeometryConstraintConfigData(const std::vector< double > &co, const std::string &c, const std::vector< std::pair< Alignable *, std::string > > &alisFile, const int sd, const align::Alignables &ex, const int instance, const bool downToLowestLevel)
Definition: PedeSteererWeakModeConstraints.cc:51
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
sd
double sd
Definition: CascadeWrapper.h:113
list
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*", "!HLTx*" if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL. It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of "!*" before the partial wildcard feature was incorporated). Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
ParameterSet.h
PedeSteererWeakModeConstraints::steerFile_
const std::string steerFile_
Definition: PedeSteererWeakModeConstraints.h:136
PedeSteererWeakModeConstraints::makeLevelsFilenames
const std::vector< std::pair< Alignable *, std::string > > makeLevelsFilenames(std::set< std::string > &steerFilePrefixContainer, const align::Alignables &alis, const std::string &steerFilePrefix) const
Definition: PedeSteererWeakModeConstraints.cc:652
PedeSteererWeakModeConstraints::checkMother
bool checkMother(const Alignable *const lowleveldet, const Alignable *const HLS) const
Definition: PedeSteererWeakModeConstraints.cc:627
PedeSteererWeakModeConstraints::getX
double getX(const int sysdeformation, const align::GlobalPoint &pos, const double phase) const
Definition: PedeSteererWeakModeConstraints.cc:238
GlobalPoint.h
PedeSteererWeakModeConstraints::kSkew
Definition: PedeSteererWeakModeConstraints.h:150
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
PedeSteererWeakModeConstraints::getCoefficient
double getCoefficient(const int sysdeformation, const align::GlobalPoint &pos, const GlobalPoint gUDirection, const GlobalPoint gVDirection, const GlobalPoint gWDirection, const int iParameter, const double &x0, const std::vector< double > &constraintparameters) const
Definition: PedeSteererWeakModeConstraints.cc:271
GeometryConstraintConfigData::excludedAlignables_
const align::Alignables excludedAlignables_
Definition: PedeSteererWeakModeConstraints.h:46
GeometryConstraintConfigData::mapFileName_
std::map< std::string, std::ofstream * > mapFileName_
Definition: PedeSteererWeakModeConstraints.h:47
PedeSteererWeakModeConstraints::kBowing
Definition: PedeSteererWeakModeConstraints.h:149
PedeSteerer.h