28 #define CONTROL_FOLDER_NAME "ControlView"
29 #define MECHANICAL_FOLDER_NAME "MechanicalView"
80 std::stringstream lokal_folder;
85 lokal_folder <<
SEP <<
"FecSlot" << slot;
87 lokal_folder <<
SEP <<
"FecRing" <<
ring;
89 lokal_folder <<
SEP <<
"CcuAddr" << addr;
91 lokal_folder <<
SEP <<
"CcuChan" << chan;
134 layer=tTopo->
tidRing(detid) * ( tTopo->
tidSide(detid)==1 ? -1 : +1);
141 layer=tTopo->
tecRing(detid) * ( tTopo->
tecSide(detid)==1 ? -1 : +1);
146 edm::LogWarning(
"SiStripMonitorTrack") <<
"WARNING!!! this detid does not belong to tracker" << std::endl;
148 return std::make_pair(cSubDet,layer);
162 std::stringstream sside;
165 }
else if (side == 2) {
170 ss <<
SEP <<
"TIB" <<
SEP <<
"layer_" << layer <<
SEP;
172 ss <<
SEP <<
"TID" <<
SEP << sside.str() <<
SEP <<
"wheel_" << layer <<
SEP;
174 ss <<
SEP <<
"TOB" <<
SEP <<
"layer_" << layer <<
SEP;
176 ss <<
SEP <<
"TEC" <<
SEP << sside.str() <<
SEP <<
"wheel_" << layer <<
SEP;
179 edm::LogWarning(
"SiStripTkDQM|WrongInput")<<
"no such SubDet :"<< subDet <<
" no folder set!"<<std::endl;
189 std::stringstream rest;
198 else rest <<
"forward_strings" <<
SEP;
200 else rest <<
"internal_strings" <<
SEP;
201 rest <<
"string_" << tTopo->
tibString(rawdetid) << SEP <<
"module_" << rawdetid;
206 rest<<
"ring_" << tTopo->
tidRing(rawdetid) <<
SEP;
208 if (tTopo->
tidIsStereo(rawdetid)) rest <<
"stereo_modules" <<
SEP;
209 else rest <<
"mono_modules" <<
SEP;
210 rest <<
"module_" << rawdetid;
216 else rest <<
"forward_rods" <<
SEP;
217 rest <<
"rod_" << tTopo->
tobRod(rawdetid) << SEP<<
"module_" << rawdetid;
223 else rest <<
"forward_petals" <<
SEP;
228 if (tTopo->
tecIsStereo(rawdetid)) rest <<
"stereo_modules" << SEP;
229 else rest <<
"mono_modules" <<
SEP;
231 rest <<
"module_" << rawdetid;
234 edm::LogWarning(
"SiStripTkDQM|WrongInput")<<
"no such subdetector type :"<<stripdet.
subDetector() <<
" no folder set!"<<std::endl;
237 lokal_folder += rest.str();
248 std::ostringstream rest;
253 int tib_layer = tTopo->
tibLayer(rawdetid);
254 if (
abs(layer) != tib_layer) {
255 edm::LogWarning(
"SiStripTkDQM|Layer mismatch!!!")<<
" expect "<<
abs(layer) <<
" but getting " << tTopo->
tibLayer(rawdetid) <<std::endl;
262 int tid_ring = tTopo->
tidRing(rawdetid);
265 uint32_t side = tTopo->
tidSide(rawdetid);
266 std::stringstream sside;
269 }
else if (side == 2) {
274 if(
abs(layer) != tid_ring) {
275 edm::LogWarning(
"SiStripTkDQM|Layer mismatch!!!")<<
" expect "<<
abs(layer) <<
" but getting " << tTopo->
tidRing(rawdetid) <<std::endl;
280 int tid_wheel = tTopo->
tidWheel(rawdetid);
281 if (
abs(layer) != tid_wheel) {
282 edm::LogWarning(
"SiStripTkDQM|Layer mismatch!!!")<<
" expect "<<
abs(layer) <<
" but getting " << tTopo->
tidWheel(rawdetid) <<std::endl;
290 int tob_layer = tTopo->
tobLayer(rawdetid);
291 if (
abs(layer) != tob_layer) {
292 edm::LogWarning(
"SiStripTkDQM|Layer mismatch!!!")<<
" expect "<<
abs(layer) <<
" but getting " << tTopo->
tobLayer(rawdetid) <<std::endl;
300 uint32_t side = tTopo->
tecSide(rawdetid);
301 std::stringstream sside;
304 }
else if (side == 2) {
309 int tec_ring = tTopo->
tecRing(rawdetid);
310 if (
abs(layer) != tec_ring) {
311 edm::LogWarning(
"SiStripTkDQM|Layer mismatch!!!")<<
" expect "<<
abs(layer) <<
" but getting " << tTopo->
tecRing(rawdetid) <<std::endl;
316 int tec_wheel = tTopo->
tecWheel(rawdetid);
317 if (
abs(layer) != tec_wheel) {
318 edm::LogWarning(
"SiStripTkDQM|Layer mismatch!!!")<<
" expect "<<
abs(layer) <<
" but getting " << tTopo->
tecWheel(rawdetid) <<std::endl;
325 edm::LogWarning(
"SiStripTkDQM|WrongInput")<<
"no such subdetector type :"<<stripdet.
subDetector()<<
" no folder set!"<<std::endl;
329 lokal_folder += rest.str();
336 folder_name = subdet_and_tag.first;
355 uint32_t side = tTopo->
tidSide(rawdetid);
356 std::stringstream sside;
359 }
else if (side == 2) {
375 uint32_t side = tTopo->
tecSide(rawdetid);
376 std::stringstream sside;
379 }
else if (side == 2) {
390 edm::LogWarning(
"SiStripTkDQM|WrongInput")<<
"no such subdetector type :"<<stripdet.
subDetector()<<
" no folder set!"<<std::endl;
398 std::pair<std::string, std::string>
result;
404 subdet_folder =
"TIB";
405 result.second = subdet_folder;
408 subdet_folder =
"TOB";
409 result.second = subdet_folder;
412 if (tTopo->
tidSide(detid) == 2) {
413 subdet_folder =
"TID/PLUS";
414 result.second =
"TID__PLUS";
415 }
else if (tTopo->
tidSide(detid) == 1) {
416 subdet_folder =
"TID/MINUS";
417 result.second =
"TID__MINUS";
421 if (tTopo->
tecSide(detid) == 2) {
422 subdet_folder =
"TEC/PLUS";
423 result.second =
"TEC__PLUS";
424 }
else if (tTopo->
tecSide(detid) == 1) {
425 subdet_folder =
"TEC/MINUS";
426 result.second =
"TEC__MINUS";
431 edm::LogWarning(
"SiStripCommon") <<
"WARNING!!! this detid does not belong to tracker" << std::endl;
435 result.first += subdet_folder;
451 std::stringstream rest;
459 else rest <<
"forward_strings" <<
SEP;
461 else rest <<
"internal_strings" <<
SEP;
462 rest <<
"string_" << tib.
stringNumber() << SEP <<
"module_" << rawdetid;
467 rest<<
"ring_" << tid.
ring() <<
SEP;
469 if (tid.
isStereo()) rest <<
"stereo_modules" <<
SEP;
470 else rest <<
"mono_modules" <<
SEP;
471 rest <<
"module_" << rawdetid;
477 else rest <<
"forward_rods" <<
SEP;
478 rest <<
"rod_" << tob.
rodNumber() << SEP<<
"module_" << rawdetid;
484 else rest <<
"forward_petals" <<
SEP;
489 if (tec.
isStereo()) rest <<
"stereo_modules" << SEP;
490 else rest <<
"mono_modules" <<
SEP;
492 rest <<
"module_" << rawdetid;
495 edm::LogWarning(
"SiStripTkDQM|WrongInput")<<
"no such subdetector type :"<<stripdet.
subDetector() <<
" no folder set!"<<std::endl;
498 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::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
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
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
std::pair< std::string, std::string > getSubDetFolderAndTag(const uint32_t &detid, const TrackerTopology *tTopo)
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