Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #include "DataFormats/SiStripDetId/interface/StripSubdetector.h"
00015 #include "DataFormats/SiStripDetId/interface/TIBDetId.h"
00016 #include "DataFormats/SiStripDetId/interface/TIDDetId.h"
00017 #include "DataFormats/SiStripDetId/interface/TOBDetId.h"
00018 #include "DataFormats/SiStripDetId/interface/TECDetId.h"
00019 #include "DataFormats/SiStripDetId/interface/SiStripSubStructure.h"
00020
00021 using namespace std;
00022
00023 SiStripSubStructure::SiStripSubStructure(){
00024 }
00025
00026 SiStripSubStructure::~SiStripSubStructure(){
00027 }
00028
00029
00030 void SiStripSubStructure::getTIBDetectors(const std::vector<uint32_t> & inputDetRawIds,
00031 std::vector<uint32_t> & tibDetRawIds,
00032 uint32_t requested_layer,
00033 uint32_t requested_bkw_frw,
00034 uint32_t requested_int_ext,
00035 uint32_t requested_string) const{
00036
00037 for(vector<uint32_t>::const_iterator it = inputDetRawIds.begin(); it!=inputDetRawIds.end();it++){
00038 uint32_t therawid = (*it);
00039 TIBDetId potentialTIB = TIBDetId(therawid);
00040 if( potentialTIB.subdetId() == int (StripSubdetector::TIB) ){
00041 if(
00042 ( (potentialTIB.layer()==requested_layer) || requested_layer==0 )
00043 && ( ((potentialTIB.string()).at(0)==(requested_bkw_frw)) || requested_bkw_frw==0 )
00044 && ( ((potentialTIB.string()).at(1)==(requested_int_ext)) || requested_int_ext==0 )
00045 && ( ((potentialTIB.string()).at(2)==requested_string) || requested_string==0 )
00046 ){
00047 tibDetRawIds.push_back(therawid);
00048 }
00049 }
00050 }
00051 }
00052
00053
00054 void SiStripSubStructure::getTIDDetectors(const std::vector<uint32_t> & inputDetRawIds,
00055 std::vector<uint32_t> & tidDetRawIds,
00056 uint32_t requested_side,
00057 uint32_t requested_wheel,
00058 uint32_t requested_ring,
00059 uint32_t requested_ster) const{
00060
00061 for(vector<uint32_t>::const_iterator it = inputDetRawIds.begin(); it!=inputDetRawIds.end();it++){
00062 uint32_t therawid = (*it);
00063 TIDDetId potentialTID = TIDDetId(therawid);
00064 if( potentialTID.subdetId() == int (StripSubdetector::TID) ){
00065 if(
00066 ( (potentialTID.side()==requested_side) || requested_side==0 )
00067 && ( (potentialTID.wheel()==requested_wheel) || requested_wheel==0 )
00068 && ( (potentialTID.ring()==requested_ring) || requested_ring==0 )
00069 && ( (potentialTID.stereo()==requested_ster) || requested_ster==0 )
00070 ){
00071 tidDetRawIds.push_back(therawid);
00072 }
00073 }
00074 }
00075 }
00076
00077
00078 void SiStripSubStructure::getTOBDetectors(const std::vector<uint32_t> & inputDetRawIds,
00079 std::vector<uint32_t> & tobDetRawIds,
00080 uint32_t requested_layer,
00081 uint32_t requested_bkw_frw,
00082 uint32_t requested_rod) const{
00083
00084 for(vector<uint32_t>::const_iterator it = inputDetRawIds.begin(); it!=inputDetRawIds.end();it++){
00085 uint32_t therawid = (*it);
00086 TOBDetId potentialTOB = TOBDetId(therawid);
00087 if( potentialTOB.subdetId() == int (StripSubdetector::TOB) ){
00088 if(
00089 ( (potentialTOB.layer()==requested_layer) || requested_layer==0 )
00090 && ( ((potentialTOB.rod()).at(0)==(requested_bkw_frw)) || requested_bkw_frw==0 )
00091 && ( ((potentialTOB.rod()).at(1)==requested_rod) || requested_rod==0 )
00092 ){
00093 tobDetRawIds.push_back(therawid);
00094 }
00095 }
00096 }
00097 }
00098
00099
00100 void SiStripSubStructure::getTECDetectors(const std::vector<uint32_t> & inputDetRawIds,
00101 std::vector<uint32_t> & tecDetRawIds,
00102 uint32_t requested_side,
00103 uint32_t requested_wheel,
00104 uint32_t requested_petal_bkw_frw,
00105 uint32_t requested_petal,
00106 uint32_t requested_ring,
00107 uint32_t requested_ster) const{
00108
00109 for(vector<uint32_t>::const_iterator it = inputDetRawIds.begin(); it!=inputDetRawIds.end();it++){
00110 uint32_t therawid = (*it);
00111 TECDetId potentialTEC = TECDetId(therawid);
00112 if( potentialTEC.subdetId() == int (StripSubdetector::TEC) ){
00113 if(
00114 ( (potentialTEC.side()==requested_side) || requested_side==0 )
00115 && ( (potentialTEC.wheel()==requested_wheel) || requested_wheel==0 )
00116 && ( ((potentialTEC.petal()).at(0)==(requested_petal_bkw_frw-1)) || requested_petal_bkw_frw==0 )
00117 && ( ((potentialTEC.petal()).at(1)==requested_petal) || requested_petal==0 )
00118 && ( (potentialTEC.ring()==requested_ring) || requested_ring==0 )
00119 && ( (potentialTEC.stereo()==requested_ster) || requested_ster==0 )
00120 ){
00121 tecDetRawIds.push_back(therawid);
00122 }
00123 }
00124 }
00125 }
00126
00127