27 #define CONTROL_FOLDER_NAME "ControlView" 28 #define MECHANICAL_FOLDER_NAME "MechanicalView" 81 std::stringstream lokal_folder;
86 lokal_folder <<
SEP <<
"FecSlot" << slot;
88 lokal_folder <<
SEP <<
"FecRing" <<
ring;
90 lokal_folder <<
SEP <<
"CcuAddr" << addr;
92 lokal_folder <<
SEP <<
"CcuChan" <<
chan;
135 layer=tTopo->
tidRing(detid) * ( tTopo->
tidSide(detid)==1 ? -1 : +1);
142 layer=tTopo->
tecRing(detid) * ( tTopo->
tecSide(detid)==1 ? -1 : +1);
147 edm::LogWarning(
"SiStripMonitorTrack") <<
"WARNING!!! this detid does not belong to tracker" << std::endl;
149 return std::make_pair(cSubDet,layer);
165 cThickness =
"THICK";
175 ring=tTopo->
tecRing(detid) * ( tTopo->
tecSide(detid)==1 ? -1 : +1);
176 if ( ring >= 1 && ring <= 4) cThickness =
"THIN";
177 else cThickness =
"THICK";
180 edm::LogWarning(
"SiStripMonitorTrack") <<
"WARNING!!! this detid does not belong to tracker" << std::endl;
182 return std::make_pair(cSubDet,layer);
198 ring=tTopo->
tidRing(detid) * ( tTopo->
tidSide(detid)==1 ? -1 : +1);
202 ring=tTopo->
tecRing(detid) * ( tTopo->
tecSide(detid)==1 ? -1 : +1);
205 edm::LogWarning(
"SiStripMonitorTrack") <<
"WARNING!!! this detid does not belong to tracker" << std::endl;
207 return std::make_pair(cSubDet,ring);
221 std::stringstream sside;
224 }
else if (side == 2) {
229 ss <<
SEP <<
"TIB" <<
SEP <<
"layer_" << layer <<
SEP;
231 ss <<
SEP <<
"TID" <<
SEP << sside.str() <<
SEP <<
"wheel_" << layer <<
SEP;
233 ss <<
SEP <<
"TOB" <<
SEP <<
"layer_" << layer <<
SEP;
235 ss <<
SEP <<
"TEC" <<
SEP << sside.str() <<
SEP <<
"wheel_" << layer <<
SEP;
238 edm::LogWarning(
"SiStripTkDQM|WrongInput")<<
"no such SubDet :"<< subDet <<
" no folder set!"<<std::endl;
248 std::stringstream rest;
257 else rest <<
"forward_strings" <<
SEP;
259 else rest <<
"internal_strings" <<
SEP;
260 rest <<
"string_" << tTopo->
tibString(rawdetid) << SEP <<
"module_" << rawdetid;
265 rest<<
"ring_" << tTopo->
tidRing(rawdetid) <<
SEP;
267 if (tTopo->
tidIsStereo(rawdetid)) rest <<
"stereo_modules" <<
SEP;
268 else rest <<
"mono_modules" <<
SEP;
269 rest <<
"module_" << rawdetid;
275 else rest <<
"forward_rods" <<
SEP;
276 rest <<
"rod_" << tTopo->
tobRod(rawdetid) << SEP<<
"module_" << rawdetid;
282 else rest <<
"forward_petals" <<
SEP;
287 if (tTopo->
tecIsStereo(rawdetid)) rest <<
"stereo_modules" << SEP;
288 else rest <<
"mono_modules" <<
SEP;
290 rest <<
"module_" << rawdetid;
293 edm::LogWarning(
"SiStripTkDQM|WrongInput")<<
"no such subdetector type :"<<stripdet.
subDetector() <<
" no folder set!"<<std::endl;
296 lokal_folder += rest.str();
307 std::ostringstream rest;
312 int tib_layer = tTopo->
tibLayer(rawdetid);
313 if (
abs(layer) != tib_layer) {
314 edm::LogWarning(
"SiStripTkDQM|Layer mismatch!!!")<<
" expect "<<
abs(layer) <<
" but getting " << tTopo->
tibLayer(rawdetid) <<std::endl;
321 int tid_ring = tTopo->
tidRing(rawdetid);
324 uint32_t side = tTopo->
tidSide(rawdetid);
325 std::stringstream sside;
328 }
else if (side == 2) {
333 if(
abs(layer) != tid_ring) {
334 edm::LogWarning(
"SiStripTkDQM|Layer mismatch!!!")<<
" expect "<<
abs(layer) <<
" but getting " << tTopo->
tidRing(rawdetid) <<std::endl;
339 int tid_wheel = tTopo->
tidWheel(rawdetid);
340 if (
abs(layer) != tid_wheel) {
341 edm::LogWarning(
"SiStripTkDQM|Layer mismatch!!!")<<
" expect "<<
abs(layer) <<
" but getting " << tTopo->
tidWheel(rawdetid) <<std::endl;
349 int tob_layer = tTopo->
tobLayer(rawdetid);
350 if (
abs(layer) != tob_layer) {
351 edm::LogWarning(
"SiStripTkDQM|Layer mismatch!!!")<<
" expect "<<
abs(layer) <<
" but getting " << tTopo->
tobLayer(rawdetid) <<std::endl;
359 uint32_t side = tTopo->
tecSide(rawdetid);
360 std::stringstream sside;
363 }
else if (side == 2) {
368 int tec_ring = tTopo->
tecRing(rawdetid);
369 if (
abs(layer) != tec_ring) {
370 edm::LogWarning(
"SiStripTkDQM|Layer mismatch!!!")<<
" expect "<<
abs(layer) <<
" but getting " << tTopo->
tecRing(rawdetid) <<std::endl;
375 int tec_wheel = tTopo->
tecWheel(rawdetid);
376 if (
abs(layer) != tec_wheel) {
377 edm::LogWarning(
"SiStripTkDQM|Layer mismatch!!!")<<
" expect "<<
abs(layer) <<
" but getting " << tTopo->
tecWheel(rawdetid) <<std::endl;
384 edm::LogWarning(
"SiStripTkDQM|WrongInput")<<
"no such subdetector type :"<<stripdet.
subDetector()<<
" no folder set!"<<std::endl;
388 lokal_folder += rest.str();
395 folder_name = subdet_and_tag.first;
414 uint32_t side = tTopo->
tidSide(rawdetid);
415 std::stringstream sside;
418 }
else if (side == 2) {
434 uint32_t side = tTopo->
tecSide(rawdetid);
435 std::stringstream sside;
438 }
else if (side == 2) {
449 edm::LogWarning(
"SiStripTkDQM|WrongInput")<<
"no such subdetector type :"<<stripdet.
subDetector()<<
" no folder set!"<<std::endl;
458 const char *subdet_folder =
"";
459 const char *
tag =
"";
463 subdet_folder =
"TIB";
467 subdet_folder =
"TOB";
471 if (tTopo->
tidSide(detid) == 2) {
472 subdet_folder =
"TID/PLUS";
474 }
else if (tTopo->
tidSide(detid) == 1) {
475 subdet_folder =
"TID/MINUS";
480 if (tTopo->
tecSide(detid) == 2) {
481 subdet_folder =
"TEC/PLUS";
483 }
else if (tTopo->
tecSide(detid) == 1) {
484 subdet_folder =
"TEC/MINUS";
490 edm::LogWarning(
"SiStripCommon") <<
"WARNING!!! this detid does not belong to tracker" << std::endl;
499 return std::pair<const std::string, const char *>(
folder,
tag);
void setSiStripControlFolder(unsigned short slot=all_, unsigned short ring=all_, unsigned short addr=all_, unsigned short chan=all_)
void setSiStripTopControlFolder()
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=false)
unsigned int tidWheel(const DetId &id) const
void setLayerFolder(uint32_t rawdetid, const TrackerTopology *tTopo, int32_t layer=0, bool ring_flag=false)
std::pair< std::string, int32_t > GetSubDetAndRing(const uint32_t &detid, const TrackerTopology *tTopo)
bool tidIsStereo(const DetId &id) 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 tecIsStereo(const DetId &id) const
bool tibIsExternalString(const DetId &id) const
unsigned int tidSide(const DetId &id) const
bool tibIsZMinusSide(const DetId &id) const
bool tobIsZMinusSide(const DetId &id) const
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()
chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi...
std::pair< std::string, int32_t > GetSubDetAndLayer(const uint32_t &detid, const TrackerTopology *tTopo, bool ring_flag=false)
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