30 using namespace ctfseeding;
36 std::ostringstream str;
37 str <<
"Layer="<<
name<<
", hitBldr: "<<hitBuilder<<
", useErrorsFromParam: ";
38 if (useErrorsFromParam) {
39 str <<
"true,"<<
" errRPhi: "<<hitErrorRPhi<<
", errRZ: "<<hitErrorRZ;
43 str <<
", useRingSelector: ";
44 if (useRingSelector) {
45 str <<
"true,"<<
" Rings: ("<<minRing<<
","<<maxRing<<
")";
53 std::vector<std::string> namesPset = cfg.
getParameter<std::vector<std::string> >(
"layerList");
54 std::vector<std::vector<std::string> > layerNamesInSets = this->layerNamesInSets(namesPset);
57 typedef std::vector<std::string>::const_iterator IS;
58 typedef std::vector<std::vector<std::string> >::const_iterator
IT;
59 std::ostringstream str;
68 map<string,LayerSpec> mapConfig;
70 for (IT it = layerNamesInSets.begin(); it != layerNamesInSets.end(); it++) {
71 vector<LayerSpec> layersInSet;
72 for (IS is = it->begin(); is != it->end(); is++) {
83 if (cfgLayer.
exists(
"HitProducer")) {
88 if (cfgLayer.
exists(
"matchedRecHits")) {
93 if (cfgLayer.
exists(
"rphiRecHits")) {
98 if (cfgLayer.
exists(
"stereoRecHits")) {
120 layersInSet.push_back(layer);
121 mapConfig[layer.
name]=layer;
123 theLayersInSets.push_back(layersInSet);
138 string name = nameLayer.substr(0,iEnd);
141 cout <<
"configuration for layer: "<<nameLayer<<
" not found, job will probably crash!"<<endl;
147 std::vector<std::vector<std::string> >
result;
148 for (std::vector<std::string>::const_iterator is=namesPSet.begin(); is < namesPSet.end(); ++is) {
149 vector<std::string> layersInSet;
152 while (pos != string::npos ) {
154 string layer = line.substr(0,pos);
155 layersInSet.push_back(layer);
156 line=line.substr(pos+1,string::npos);
158 result.push_back(layersInSet);
165 typedef std::vector<SeedingLayer> Set;
171 std::vector<BarrelDetLayer*> bpx = tracker->barrelLayers();
172 std::vector<BarrelDetLayer*> tib = tracker->tibLayers();
173 std::vector<BarrelDetLayer*> tob = tracker->tobLayers();
175 std::vector<ForwardDetLayer*> fpx_pos = tracker->posForwardLayers();
176 std::vector<ForwardDetLayer*> tid_pos = tracker->posTidLayers();
177 std::vector<ForwardDetLayer*> tec_pos = tracker->posTecLayers();
179 std::vector<ForwardDetLayer*> fpx_neg = tracker->negForwardLayers();
180 std::vector<ForwardDetLayer*> tid_neg = tracker->negTidLayers();
181 std::vector<ForwardDetLayer*> tec_neg = tracker->negTecLayers();
183 typedef std::vector<std::vector<LayerSpec> >::const_iterator
IT;
184 typedef std::vector<LayerSpec>::const_iterator IS;
186 for (IT it = theLayersInSets.begin(); it != theLayersInSets.end(); it++) {
189 for (IS is = it->begin(), isEnd = it->end(); is < isEnd; ++is) {
201 if (name.substr(0,4) ==
"BPix") {
202 idLayer = atoi(name.substr(4,1).c_str());
204 detLayer=bpx[idLayer-1];
209 else if (name.substr(0,4) ==
"FPix") {
210 idLayer = atoi(name.substr(4,1).c_str());
211 if ( name.find(
"pos") != string::npos ) {
213 detLayer = fpx_pos[idLayer-1];
216 detLayer = fpx_neg[idLayer-1];
222 else if (name.substr(0,3) ==
"TIB") {
223 idLayer = atoi(name.substr(3,1).c_str());
225 detLayer=tib[idLayer-1];
230 else if (name.substr(0,3) ==
"TID") {
231 idLayer = atoi(name.substr(3,1).c_str());
232 if ( name.find(
"pos") != string::npos ) {
234 detLayer = tid_pos[idLayer-1];
237 detLayer = tid_neg[idLayer-1];
243 else if (name.substr(0,3) ==
"TOB") {
244 idLayer = atoi(name.substr(3,1).c_str());
246 detLayer=tob[idLayer-1];
251 else if (name.substr(0,3) ==
"TEC") {
252 idLayer = atoi(name.substr(3,1).c_str());
253 if ( name.find(
"pos") != string::npos ) {
255 detLayer = tec_pos[idLayer-1];
258 detLayer = tec_neg[idLayer-1];
277 extractor = extSTRP.
clone();
292 if(setOK) result.push_back(set);
T getParameter(std::string const &) const
bool useSimpleRphiHitsCleaner
edm::InputTag stereoRecHits
SeedingLayerSetsBuilder()
edm::InputTag rphiRecHits
std::string print() const
bool exists(std::string const ¶meterName) const
checks if a parameter exists
virtual SubDetector subDetector() const =0
The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap)
edm::InputTag matchedRecHits
std::vector< LinkConnSpec >::const_iterator IT
T const * product() const
std::string pixelHitProducer
ctfseeding::SeedingLayerSets layers(const edm::EventSetup &es) const
edm::ParameterSet layerConfig(const std::string &nameLayer, const edm::ParameterSet &cfg) const
std::vector< std::vector< SeedingLayer > > SeedingLayerSets
std::vector< std::vector< std::string > > layerNamesInSets(const std::vector< std::string > &namesPSet)