28 #define CONTROL_FOLDER_NAME "ControlView"
29 #define MECHANICAL_FOLDER_NAME "MechanicalView"
82 std::stringstream lokal_folder;
87 lokal_folder <<
SEP <<
"FecSlot" << slot;
89 lokal_folder <<
SEP <<
"FecRing" <<
ring;
91 lokal_folder <<
SEP <<
"CcuAddr" << addr;
93 lokal_folder <<
SEP <<
"CcuChan" << chan;
136 layer=tTopo->
tidRing(detid) * ( tTopo->
tidSide(detid)==1 ? -1 : +1);
143 layer=tTopo->
tecRing(detid) * ( tTopo->
tecSide(detid)==1 ? -1 : +1);
148 edm::LogWarning(
"SiStripMonitorTrack") <<
"WARNING!!! this detid does not belong to tracker" << std::endl;
150 return std::make_pair(cSubDet,layer);
166 cThickness =
"THICK";
176 ring=tTopo->
tecRing(detid) * ( tTopo->
tecSide(detid)==1 ? -1 : +1);
177 if ( ring >= 1 && ring <= 4) cThickness =
"THIN";
178 else cThickness =
"THICK";
181 edm::LogWarning(
"SiStripMonitorTrack") <<
"WARNING!!! this detid does not belong to tracker" << std::endl;
183 return std::make_pair(cSubDet,layer);
199 ring=tTopo->
tidRing(detid) * ( tTopo->
tidSide(detid)==1 ? -1 : +1);
203 ring=tTopo->
tecRing(detid) * ( tTopo->
tecSide(detid)==1 ? -1 : +1);
206 edm::LogWarning(
"SiStripMonitorTrack") <<
"WARNING!!! this detid does not belong to tracker" << std::endl;
208 return std::make_pair(cSubDet,ring);
222 std::stringstream sside;
225 }
else if (side == 2) {
230 ss <<
SEP <<
"TIB" <<
SEP <<
"layer_" << layer <<
SEP;
232 ss <<
SEP <<
"TID" <<
SEP << sside.str() <<
SEP <<
"wheel_" << layer <<
SEP;
234 ss <<
SEP <<
"TOB" <<
SEP <<
"layer_" << layer <<
SEP;
236 ss <<
SEP <<
"TEC" <<
SEP << sside.str() <<
SEP <<
"wheel_" << layer <<
SEP;
239 edm::LogWarning(
"SiStripTkDQM|WrongInput")<<
"no such SubDet :"<< subDet <<
" no folder set!"<<std::endl;
249 std::stringstream rest;
258 else rest <<
"forward_strings" <<
SEP;
260 else rest <<
"internal_strings" <<
SEP;
261 rest <<
"string_" << tTopo->
tibString(rawdetid) << SEP <<
"module_" << rawdetid;
266 rest<<
"ring_" << tTopo->
tidRing(rawdetid) <<
SEP;
268 if (tTopo->
tidIsStereo(rawdetid)) rest <<
"stereo_modules" <<
SEP;
269 else rest <<
"mono_modules" <<
SEP;
270 rest <<
"module_" << rawdetid;
276 else rest <<
"forward_rods" <<
SEP;
277 rest <<
"rod_" << tTopo->
tobRod(rawdetid) << SEP<<
"module_" << rawdetid;
283 else rest <<
"forward_petals" <<
SEP;
288 if (tTopo->
tecIsStereo(rawdetid)) rest <<
"stereo_modules" << SEP;
289 else rest <<
"mono_modules" <<
SEP;
291 rest <<
"module_" << rawdetid;
294 edm::LogWarning(
"SiStripTkDQM|WrongInput")<<
"no such subdetector type :"<<stripdet.
subDetector() <<
" no folder set!"<<std::endl;
297 lokal_folder += rest.str();
308 std::ostringstream rest;
313 int tib_layer = tTopo->
tibLayer(rawdetid);
314 if (
abs(layer) != tib_layer) {
315 edm::LogWarning(
"SiStripTkDQM|Layer mismatch!!!")<<
" expect "<<
abs(layer) <<
" but getting " << tTopo->
tibLayer(rawdetid) <<std::endl;
322 int tid_ring = tTopo->
tidRing(rawdetid);
325 uint32_t side = tTopo->
tidSide(rawdetid);
326 std::stringstream sside;
329 }
else if (side == 2) {
334 if(
abs(layer) != tid_ring) {
335 edm::LogWarning(
"SiStripTkDQM|Layer mismatch!!!")<<
" expect "<<
abs(layer) <<
" but getting " << tTopo->
tidRing(rawdetid) <<std::endl;
340 int tid_wheel = tTopo->
tidWheel(rawdetid);
341 if (
abs(layer) != tid_wheel) {
342 edm::LogWarning(
"SiStripTkDQM|Layer mismatch!!!")<<
" expect "<<
abs(layer) <<
" but getting " << tTopo->
tidWheel(rawdetid) <<std::endl;
350 int tob_layer = tTopo->
tobLayer(rawdetid);
351 if (
abs(layer) != tob_layer) {
352 edm::LogWarning(
"SiStripTkDQM|Layer mismatch!!!")<<
" expect "<<
abs(layer) <<
" but getting " << tTopo->
tobLayer(rawdetid) <<std::endl;
360 uint32_t side = tTopo->
tecSide(rawdetid);
361 std::stringstream sside;
364 }
else if (side == 2) {
369 int tec_ring = tTopo->
tecRing(rawdetid);
370 if (
abs(layer) != tec_ring) {
371 edm::LogWarning(
"SiStripTkDQM|Layer mismatch!!!")<<
" expect "<<
abs(layer) <<
" but getting " << tTopo->
tecRing(rawdetid) <<std::endl;
376 int tec_wheel = tTopo->
tecWheel(rawdetid);
377 if (
abs(layer) != tec_wheel) {
378 edm::LogWarning(
"SiStripTkDQM|Layer mismatch!!!")<<
" expect "<<
abs(layer) <<
" but getting " << tTopo->
tecWheel(rawdetid) <<std::endl;
385 edm::LogWarning(
"SiStripTkDQM|WrongInput")<<
"no such subdetector type :"<<stripdet.
subDetector()<<
" no folder set!"<<std::endl;
389 lokal_folder += rest.str();
396 folder_name = subdet_and_tag.first;
415 uint32_t side = tTopo->
tidSide(rawdetid);
416 std::stringstream sside;
419 }
else if (side == 2) {
435 uint32_t side = tTopo->
tecSide(rawdetid);
436 std::stringstream sside;
439 }
else if (side == 2) {
450 edm::LogWarning(
"SiStripTkDQM|WrongInput")<<
"no such subdetector type :"<<stripdet.
subDetector()<<
" no folder set!"<<std::endl;
459 const char *subdet_folder =
"";
460 const char *
tag =
"";
464 subdet_folder =
"TIB";
468 subdet_folder =
"TOB";
472 if (tTopo->
tidSide(detid) == 2) {
473 subdet_folder =
"TID/PLUS";
475 }
else if (tTopo->
tidSide(detid) == 1) {
476 subdet_folder =
"TID/MINUS";
481 if (tTopo->
tecSide(detid) == 2) {
482 subdet_folder =
"TEC/PLUS";
484 }
else if (tTopo->
tecSide(detid) == 1) {
485 subdet_folder =
"TEC/MINUS";
491 edm::LogWarning(
"SiStripCommon") <<
"WARNING!!! this detid does not belong to tracker" << std::endl;
500 return std::pair<const std::string, const char *>(folder,
tag);
515 std::stringstream rest;
523 else rest <<
"forward_strings" <<
SEP;
525 else rest <<
"internal_strings" <<
SEP;
526 rest <<
"string_" << tib.
stringNumber() << SEP <<
"module_" << rawdetid;
531 rest<<
"ring_" << tid.
ring() <<
SEP;
533 if (tid.
isStereo()) rest <<
"stereo_modules" <<
SEP;
534 else rest <<
"mono_modules" <<
SEP;
535 rest <<
"module_" << rawdetid;
541 else rest <<
"forward_rods" <<
SEP;
542 rest <<
"rod_" << tob.
rodNumber() << SEP<<
"module_" << rawdetid;
548 else rest <<
"forward_petals" <<
SEP;
553 if (tec.
isStereo()) rest <<
"stereo_modules" << SEP;
554 else rest <<
"mono_modules" <<
SEP;
556 rest <<
"module_" << rawdetid;
559 edm::LogWarning(
"SiStripTkDQM|WrongInput")<<
"no such subdetector type :"<<stripdet.
subDetector() <<
" no folder set!"<<std::endl;
562 lokal_folder += rest.str();
void setSiStripControlFolder(unsigned short slot=all_, unsigned short ring=all_, unsigned short addr=all_, unsigned short chan=all_)
bool isZMinusSide() const
unsigned int rodNumber() const
void setSiStripTopControlFolder()
unsigned int petalNumber() const
unsigned int stringNumber() const
void setSiStripFolderName(std::string name)
unsigned int tibLayer(const DetId &id) const
unsigned int tibString(const DetId &id) const
void getSubDetFolder(const uint32_t &detid, const TrackerTopology *tTopo, std::string &folder_name)
unsigned int tidRing(const DetId &id) const
std::pair< const std::string, const char * > getSubDetFolderAndTag(const uint32_t &detid, const TrackerTopology *tTopo)
std::string getSiStripTopControlFolder()
#define CONTROL_FOLDER_NAME
unsigned int tecRing(const DetId &id) const
ring id
void getLayerFolderName(std::stringstream &ss, uint32_t rawdetid, const TrackerTopology *tTopo, bool ring_flag=0)
std::pair< std::string, int32_t > GetSubDetAndLayer(const uint32_t &detid, const TrackerTopology *tTopo, bool ring_flag=0)
unsigned int tidWheel(const DetId &id) const
std::pair< std::string, int32_t > GetSubDetAndRing(const uint32_t &detid, const TrackerTopology *tTopo)
unsigned int side() const
positive or negative id
bool tidIsStereo(const DetId &id) const
unsigned int layerNumber() const
void setDetectorFolder(uint32_t rawdetid, const TrackerTopology *tTopo)
void getSubDetLayerFolderName(std::stringstream &ss, SiStripDetId::SubDetector subDet, uint32_t layer, uint32_t side=0)
std::string getSiStripControlFolder(unsigned short slot=all_, unsigned short ring=all_, unsigned short addr=all_, unsigned short chan=all_)
bool isExternalString() const
bool tecIsStereo(const DetId &id) const
bool isZMinusSide() const
bool tibIsExternalString(const DetId &id) const
unsigned int tidSide(const DetId &id) const
unsigned int layerNumber() const
bool tibIsZMinusSide(const DetId &id) const
bool tobIsZMinusSide(const DetId &id) const
unsigned int ring() const
ring id
Abs< T >::type abs(const T &t)
static unsigned short const all_
virtual ~SiStripFolderOrganizer()
std::string TopFolderName
std::pair< std::string, int32_t > GetSubDetAndLayerThickness(const uint32_t &detid, const TrackerTopology *tTopo, std::string &cThickness)
Detector identifier class for the strip tracker.
SubDetector subDetector() const
bool tecIsBackPetal(const DetId &id) const
std::string getSiStripFolder()
void setLayerFolder(uint32_t rawdetid, const TrackerTopology *tTopo, int32_t layer=0, bool ring_flag=0)
unsigned int side() const
positive or negative id
unsigned int wheel() const
wheel id
unsigned int ringNumber() const
void getFolderName(int32_t rawdetid, const TrackerTopology *tTopo, std::string &lokal_folder)
unsigned int tecPetalNumber(const DetId &id) const
unsigned int tobRod(const DetId &id) const
unsigned int tecWheel(const DetId &id) const
void setCurrentFolder(const std::string &fullpath)
unsigned int tobLayer(const DetId &id) const
#define MECHANICAL_FOLDER_NAME
unsigned int tecSide(const DetId &id) const
unsigned int wheel() const
wheel id