5 : userContent(
nullptr), genericVariablesTmp_(6, std::vector<double>(100,0) )
20 std::memory_order_acq_rel);
29 : userContent(
nullptr), iterator_(src.iterator_), modules_(src.modules_),
30 genericVariables_(src.genericVariables_),
31 genericVariablesTmp_(src.genericVariablesTmp_)
52 int placeInModsVector = -1;
56 for(std::vector<int>::const_iterator it =
modules_.begin(); it !=
modules_.end(); ++it) {
73 placeInModsVector = cnt;
80 placeInModsVector = pixelcnt;
87 if (placeInModsVector == -1){
89 edm::LogWarning(
"NoModule") <<
"No information for requested module "<<mod<<
". Please check in the Provinence Infomation for proper modules.";
95 return placeInModsVector;
103 for (
unsigned int i = 0;
i < (*
userContent.load(std::memory_order_acquire)).
size(); ++
i){
112 auto ptr =
new std::vector<std::string>;
113 for(
auto i=Content.begin();
i!=Content.end(); ++
i) {
117 std::vector<std::string>* expect =
nullptr;
118 bool exchanged =
userContent.compare_exchange_strong(expect, ptr, std::memory_order_acq_rel);
126 return (*
userContent.load(std::memory_order_acquire));
134 for (
unsigned int i = 0;
i < (*
userContent.load(std::memory_order_acquire)).
size(); ++
i) {
142 int placeInUserVector = -1;
147 for(
auto it=
obj.begin(); it!=
obj.end(); ++it) {
149 if ( var == (*it) ) {
150 placeInUserVector = cnt;
174 if (placeInUserVector == -1){
175 std::ostringstream err;
176 err<<
"No information for requested var "<<var<<
". Please check if you have chosen a proper variable.";
181 return placeInUserVector;
189 std::vector<std::string> v_moduleTypes;
195 if ( j == std::string::npos ){
196 v_moduleTypes.push_back(mod);
200 while (j != std::string::npos) {
201 v_moduleTypes.push_back(mod.substr(i, j-i));
203 j = mod.find(
',', j);
204 if (j == std::string::npos)
205 v_moduleTypes.push_back(mod.substr(i, mod.length( )));
210 return v_moduleTypes;
227 if(result != std::string::npos) {
234 size_t pos = modStr.find(
"_", 0);
238 std::stringstream
ss(Layer);
246 int layer = tib.
layer();
247 if (layer_id == layer){
261 int layer = tob.
layer();
262 if (layer_id == layer){
279 int layerwheel = tec.
wheel();
281 if (layer_id == layerwheel && side == -1){
301 int layerwheel = tec.
wheel();
303 if (layer_id == layerwheel && side == 1){
326 if (layer_id == ring && side == -1){
346 if (layer_id == ring && side == 1){
364 int layerwheel = tid.
wheel();
366 if (layer_id == layerwheel && side == -1){
380 int layerwheel = tid.
wheel();
382 if (layer_id == layerwheel && side == 1){
397 if (layer_id == ring && side == -1){
413 if (layer_id == ring && side == 1){
494 else if(
geosearch.compare(
"TRACKER")==0) {
500 return std::make_pair(isselected, enumVal);
517 unsigned int detType=detId.
det();
518 unsigned int subdetid=detId.
subdetId();
520 if(detType!=1)
return std::make_pair(0,99999);
524 if(result != std::string::npos) {
527 size_t pos = modStr.find(
"_", 0);
531 std::stringstream
ss(Layer);
540 if (subdetid == 1 && Mod ==
"BPIX"){
544 int layer=pdetId.
layer();
546 if (layer_id == layer){
559 else if (subdetid == 2 && Mod ==
"FPIX"){
562 int disk=pdetId.
disk();
564 if (layer_id == disk){
579 else if (subdetid == 2 && Mod ==
"FPIXM"){
582 int side=pdetId.
side();
583 int disk=pdetId.
disk();
585 if (layer_id == disk && side == 1 ){
596 else if (subdetid == 2 && Mod ==
"FPIXP"){
599 int side=pdetId.
side();
600 int disk=pdetId.
disk();
602 if (layer_id == disk && side == 2){
618 else if( subdetid == 2 && geosearch.compare(
"FPIXM")==0 ) {
621 int side=pdetId.
side();
629 else if( subdetid == 2 && geosearch.compare(
"FPIXP")==0 ) {
632 int side=pdetId.
side();
645 else if(subdetid == 1 && geosearch.compare(
"BPIX")==0 ) {
649 else if(subdetid == 2 && geosearch.compare(
"FPIX")==0 ) {
653 else if( geosearch.compare(
"PIXEL")==0) {
659 return std::make_pair(isselected, enumVal);
std::vector< std::string > DecodeProvInfo(std::string ProvInfo) const
unsigned int layer() const
layer id
std::atomic< std::vector< std::string > * > userContent
virtual std::pair< int, int > IsPixelSelected(int DetId)
std::vector< int > modules_
unsigned int ringNumber() const
std::vector< std::vector< double > > genericVariablesTmp_
void SetUserContent(const std::vector< std::string > &Content) const
unsigned int layer() const
layer id
SeedingLayerSetsHits::SeedingLayer Layer
double Mod(double phi)
autoexplaining
bool isZMinusSide() const
std::vector< std::vector< double > > genericVariables_
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
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
void swap(ClusterSummary &other)
std::vector< std::string > GetUserContent()
Detector identifier class for the strip tracker.
SubDetector subDetector() const
bool isZMinusSide() const
virtual ~ModuleSelection()
void PrepairGenericVariable()
unsigned int wheel() const
wheel id
unsigned int layer() const
layer id
unsigned int ringNumber() const
ClusterSummary & operator=(const ClusterSummary &rhs)
unsigned int side() const
positive or negative id
void GetUserContentInfo() const
Detector det() const
get the detector field from this detid
int GetModuleLocation(int mod) const
T mod(const T &a, const T &b)
tuple size
Write out results.
std::vector< int > iterator_
unsigned int wheel() const
wheel id
ModuleSelection(std::string gs)