31 theAlignableTracker(alignableTracker),
33 theAlignableExtras(alignableExtras)
83 std::vector<std::string> selsTypes(pSet.
getParameter<std::vector<std::string> >(
"parameterTypes"));
85 for (
unsigned int i = 0;
i < selsTypes.size(); ++
i) {
86 std::vector<std::string> selSetType(selector.
decompose(selsTypes[
i],
','));
87 if (selSetType.size() != 2) {
89 <<
"parameterTypes should contain 2 comma separated strings" 90 <<
", but found '" << selsTypes[
i] <<
"'.";
110 align::Alignables::const_iterator iAli = alignables.begin();
111 std::vector<std::vector<char> >::const_iterator iParamSel = paramSels.begin();
112 unsigned int nHigherLevel = 0;
114 while (iAli != alignables.end() && iParamSel != paramSels.end()) {
115 std::vector<bool> boolParSel;
116 std::vector<char> parSel(*iParamSel);
118 if (this->
add(*iAli, parType, boolParSel)) ++nHigherLevel;
119 if (charSelIsGeneral) this->
addFullParamSel((*iAli)->alignmentParameters(), parSel);
125 edm::LogInfo(
"Alignment") <<
"@SUB=AlignmentParameterBuilder::addSelections" 126 <<
" Added " << addedSets <<
" set(s) of alignables with " 127 <<
theAlignables.size() - oldAliSize <<
" alignables in total," 128 <<
" of which " << nHigherLevel <<
" are higher level " 137 const std::vector<bool> &
sel)
146 return isHigherLevel;
155 unsigned int nHigherLevel = 0;
157 for (align::Alignables::const_iterator iAli = alignables.begin();
158 iAli != alignables.end(); ++iAli) {
159 if (this->
add(*iAli, parType, sel)) ++nHigherLevel;
171 edm::LogError(
"BadArgument") <<
" n = " << n <<
" is not in [1,3]";
178 for ( align::Alignables::const_iterator ia=
theAlignables.begin();
183 theNewAlignables.push_back(*ia);
184 else if ( n==2 && i>1 && i<imax )
185 theNewAlignables.push_back(*ia);
186 else if ( n==3 && i>2 && i<imax)
187 theNewAlignables.push_back(*ia);
192 edm::LogInfo(
"Alignment") <<
"@SUB=AlignmentParameterBuilder::fixAlignables" 193 <<
"removing " << n <<
" alignables, so that " 199 std::vector<bool> &
result)
const 203 paramSelChar.erase(
std::remove(paramSelChar.begin(), paramSelChar.end(),
' '),
206 bool anyNon01 =
false;
208 for (
unsigned int pos = 0;
pos < paramSelChar.size(); ++
pos) {
210 switch (paramSelChar[
pos]) {
215 result.push_back(
true);
218 result.push_back(
false);
228 const std::vector<char> &fullSel)
const 230 if (!aliParams)
return false;
T getParameter(std::string const &) const
AlignmentParameterBuilder(AlignableTracker *alignableTracker, AlignableExtras *alignableExtras)
Constructor from tracker only.
unsigned int addSelections(const edm::ParameterSet &pset, AlignmentParametersFactory::ParametersType parType)
std::string parametersTypeName(ParametersType parType)
convert ParametersType to string understood by parametersType(string &typeString) ...
const AlignableTracker * alignableTracker() const
Alignable tracker.
bool decodeParamSel(std::vector< char > ¶mSelChar, std::vector< bool > &result) const
ParametersType
enums for all available AlignmentParameters
AlignableExtras * theAlignableExtras
extra Alignables
virtual StructureType alignableObjectId() const =0
Return the alignable type identifier.
void setAlignmentParameters(AlignmentParameters *dap)
Set the AlignmentParameters.
bool addFullParamSel(AlignmentParameters *aliPar, const std::vector< char > &fullSel) const
add SelectionUserVariables corresponding to fullSel
std::vector< std::string > decompose(const std::string &s, std::string::value_type delimiter) const
Decomposing input string 's' into parts separated by 'delimiter'.
void fixAlignables(int n)
Remove n Alignables from list.
AlignableMuon * theAlignableMuon
Alignable muon.
AlignmentParameters * createParameters(Alignable *ali, ParametersType parType, const std::vector< bool > &sel)
unsigned int add(const align::Alignables &alignables, AlignmentParametersFactory::ParametersType parType, const std::vector< bool > &sel)
Add arbitrary selection of Alignables, return number of higher level Alignables.
const align::Alignables & selectedAlignables() const
vector of alignables selected so far
void setUserVariables(AlignmentUserVariables *auv)
Set pointer to user variables.
def remove(d, key, TELL=False)
std::vector< Alignable * > Alignables
unsigned int addSelections(const edm::ParameterSet &pSet)
align::Alignables theAlignables
Vector of alignables.
ParametersType parametersType(const std::string &typeString)
convert string to ParametersType - exception if not known
const std::vector< std::vector< char > > & selectedParameters() const
vector of selection 'strings' for alignables, parallel to selectedAlignables()
Constructor of the full muon geometry.
AlignableTracker * theAlignableTracker
Alignable tracker.
void addAllSelections(const edm::ParameterSet &pSet)
master initialisation method, PSet must have form as constructor wants it
const align::Alignables & alignables() const
Get list of alignables for which AlignmentParameters are built.