27 using namespace ctfseeding;
33 std::ostringstream str;
34 str <<
"Layer="<<
name<<
", hitBldr: "<<hitBuilder<<
", useErrorsFromParam: ";
35 if (useErrorsFromParam) {
36 str <<
"true,"<<
" errRPhi: "<<hitErrorRPhi<<
", errRZ: "<<hitErrorRZ;
40 str <<
", useRingSelector: ";
41 if (useRingSelector) {
42 str <<
"true,"<<
" Rings: ("<<minRing<<
","<<maxRing<<
")";
50 std::vector<std::string> namesPset = cfg.
getParameter<std::vector<std::string> >(
"layerList");
51 std::vector<std::vector<std::string> > layerNamesInSets = this->layerNamesInSets(namesPset);
54 typedef std::vector<std::string>::const_iterator IS;
55 typedef std::vector<std::vector<std::string> >::const_iterator
IT;
56 std::ostringstream str;
65 map<string,LayerSpec> mapConfig;
67 for (IT it = layerNamesInSets.begin(); it != layerNamesInSets.end(); it++) {
68 vector<LayerSpec> layersInSet;
69 for (IS is = it->begin(); is != it->end(); is++) {
80 if (cfgLayer.
exists(
"HitProducer")) {
85 if (cfgLayer.
exists(
"matchedRecHits")) {
90 if (cfgLayer.
exists(
"rphiRecHits")) {
95 if (cfgLayer.
exists(
"stereoRecHits")) {
100 if (cfgLayer.
exists(
"skipClusters")){
101 LogDebug(
"SeedingLayerSetsBuilder")<<layer.
name<<
" ready for skipping (1)";
108 if (cfgLayer.
exists(
"useProjection")){
109 LogDebug(
"SeedingLayerSetsBuilder")<<layer.
name<<
" will project partially masked matched rechit";
132 layersInSet.push_back(layer);
133 mapConfig[layer.
name]=layer;
135 theLayersInSets.push_back(layersInSet);
150 string name = nameLayer.substr(0,iEnd);
153 cout <<
"configuration for layer: "<<nameLayer<<
" not found, job will probably crash!"<<endl;
159 std::vector<std::vector<std::string> >
result;
160 for (std::vector<std::string>::const_iterator is=namesPSet.begin(); is < namesPSet.end(); ++is) {
161 vector<std::string> layersInSet;
164 while (pos != string::npos ) {
166 string layer = line.substr(0,pos);
167 layersInSet.push_back(layer);
168 line=line.substr(pos+1,string::npos);
170 result.push_back(layersInSet);
177 typedef std::vector<SeedingLayer> Set;
183 std::vector<BarrelDetLayer*> bpx = tracker->barrelLayers();
184 std::vector<BarrelDetLayer*> tib = tracker->tibLayers();
185 std::vector<BarrelDetLayer*> tob = tracker->tobLayers();
187 std::vector<ForwardDetLayer*> fpx_pos = tracker->posForwardLayers();
188 std::vector<ForwardDetLayer*> tid_pos = tracker->posTidLayers();
189 std::vector<ForwardDetLayer*> tec_pos = tracker->posTecLayers();
191 std::vector<ForwardDetLayer*> fpx_neg = tracker->negForwardLayers();
192 std::vector<ForwardDetLayer*> tid_neg = tracker->negTidLayers();
193 std::vector<ForwardDetLayer*> tec_neg = tracker->negTecLayers();
195 typedef std::vector<std::vector<LayerSpec> >::const_iterator
IT;
196 typedef std::vector<LayerSpec>::const_iterator IS;
198 for (IT it = theLayersInSets.begin(); it != theLayersInSets.end(); it++) {
201 for (IS is = it->begin(), isEnd = it->end(); is < isEnd; ++is) {
213 if (name.substr(0,4) ==
"BPix") {
214 idLayer = atoi(name.substr(4,1).c_str());
216 detLayer=bpx[idLayer-1];
221 else if (name.substr(0,4) ==
"FPix") {
222 idLayer = atoi(name.substr(4,1).c_str());
223 if ( name.find(
"pos") != string::npos ) {
225 detLayer = fpx_pos[idLayer-1];
228 detLayer = fpx_neg[idLayer-1];
234 else if (name.substr(0,3) ==
"TIB") {
235 idLayer = atoi(name.substr(3,1).c_str());
237 detLayer=tib[idLayer-1];
242 else if (name.substr(0,3) ==
"TID") {
243 idLayer = atoi(name.substr(3,1).c_str());
244 if ( name.find(
"pos") != string::npos ) {
246 detLayer = tid_pos[idLayer-1];
249 detLayer = tid_neg[idLayer-1];
255 else if (name.substr(0,3) ==
"TOB") {
256 idLayer = atoi(name.substr(3,1).c_str());
258 detLayer=tob[idLayer-1];
263 else if (name.substr(0,3) ==
"TEC") {
264 idLayer = atoi(name.substr(3,1).c_str());
265 if ( name.find(
"pos") != string::npos ) {
267 detLayer = tec_pos[idLayer-1];
270 detLayer = tec_neg[idLayer-1];
291 extractor = extSTRP.
clone();
294 LogDebug(
"SeedingLayerSetsBuilder")<<layer.
name<<
" ready for skipping (2)";
298 LogDebug(
"SeedingLayerSetsBuilder")<<layer.
name<<
" not skipping ";
313 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
edm::InputTag clustersToSkip
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)
void set(const std::string &name, int value)
set the flag, with a run-time name