6 int placeInModsVector = -1;
10 for(std::vector<int>::const_iterator it =
modules_.begin(); it !=
modules_.end(); ++it) {
27 placeInModsVector = cnt;
34 placeInModsVector = pixelcnt;
41 if (placeInModsVector == -1){
43 edm::LogWarning(
"NoModule") <<
"No information for requested module "<<mod<<
". Please check in the Provinence Infomation for proper modules.";
49 return placeInModsVector;
57 int placeInUserVector = -1;
64 placeInUserVector = cnt;
88 if (placeInUserVector == -1){
89 std::ostringstream err;
90 err<<
"No information for requested var "<<var<<
". Please check if you have chosen a proper variable.";
95 return placeInUserVector;
103 std::vector<std::string> v_moduleTypes;
109 if ( j == std::string::npos ){
110 v_moduleTypes.push_back(mod);
114 while (j != std::string::npos) {
115 v_moduleTypes.push_back(mod.substr(i, j-i));
117 j = mod.find(
',', j);
118 if (j == std::string::npos)
119 v_moduleTypes.push_back(mod.substr(i, mod.length( )));
124 return v_moduleTypes;
141 if(result != std::string::npos) {
148 size_t pos = modStr.find(
"_", 0);
150 std::string Layer = modStr.substr(pos+1, modStr.length());
152 std::stringstream ss(Layer);
160 int layer = tib.
layer();
161 if (layer_id == layer){
175 int layer = tob.
layer();
176 if (layer_id == layer){
193 int layerwheel = tec.
wheel();
195 if (layer_id == layerwheel && side == -1){
215 int layerwheel = tec.
wheel();
217 if (layer_id == layerwheel && side == 1){
240 if (layer_id == ring && side == -1){
260 if (layer_id == ring && side == 1){
278 int layerwheel = tid.
wheel();
280 if (layer_id == layerwheel && side == -1){
294 int layerwheel = tid.
wheel();
296 if (layer_id == layerwheel && side == 1){
311 if (layer_id == ring && side == -1){
327 if (layer_id == ring && side == 1){
408 else if(
geosearch.compare(
"TRACKER")==0) {
414 return std::make_pair(isselected, enumVal);
431 unsigned int detType=detId.
det();
432 unsigned int subdetid=detId.
subdetId();
434 if(detType!=1)
return std::make_pair(0,99999);
438 if(result != std::string::npos) {
441 size_t pos = modStr.find(
"_", 0);
443 std::string Layer = modStr.substr(pos+1, modStr.length());
445 std::stringstream ss(Layer);
454 if (subdetid == 1 && Mod ==
"BPIX"){
458 int layer=pdetId.
layer();
460 if (layer_id == layer){
473 else if (subdetid == 2 && Mod ==
"FPIX"){
476 int disk=pdetId.
disk();
478 if (layer_id == disk){
493 else if (subdetid == 2 && Mod ==
"FPIXM"){
496 int side=pdetId.
side();
497 int disk=pdetId.
disk();
499 if (layer_id == disk && side == 1 ){
510 else if (subdetid == 2 && Mod ==
"FPIXP"){
513 int side=pdetId.
side();
514 int disk=pdetId.
disk();
516 if (layer_id == disk && side == 2){
532 else if( subdetid == 2 && geosearch.compare(
"FPIXM")==0 ) {
535 int side=pdetId.
side();
543 else if( subdetid == 2 && geosearch.compare(
"FPIXP")==0 ) {
546 int side=pdetId.
side();
559 else if(subdetid == 1 && geosearch.compare(
"BPIX")==0 ) {
563 else if(subdetid == 2 && geosearch.compare(
"FPIX")==0 ) {
567 else if( geosearch.compare(
"PIXEL")==0) {
573 return std::make_pair(isselected, enumVal);
std::vector< std::string > DecodeProvInfo(std::string ProvInfo) const
unsigned int layer() const
layer id
virtual std::pair< int, int > IsPixelSelected(int DetId)
std::vector< std::string > userContent
std::vector< int > modules_
unsigned int ringNumber() const
unsigned int layer() const
layer id
double Mod(double phi)
autoexplaining
bool isZMinusSide() const
virtual std::pair< int, int > IsStripSelected(int DetId)
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
unsigned int disk() const
disk id
int GetVariableLocation(std::string var) const
Detector identifier class for the strip tracker.
SubDetector subDetector() const
bool isZMinusSide() const
virtual ~ModuleSelection()
unsigned int wheel() const
wheel id
unsigned int layer() const
layer id
unsigned int ringNumber() const
unsigned int side() const
positive or negative id
Detector det() const
get the detector field from this detid
int GetModuleLocation(int mod) const
T mod(const T &a, const T &b)
unsigned int wheel() const
wheel id
ModuleSelection(std::string gs)