27 #define CONTROL_FOLDER_NAME "ControlView"
28 #define MECHANICAL_FOLDER_NAME "MechanicalView"
69 std::stringstream lokal_folder;
74 lokal_folder <<
SEP <<
"FecSlot" << slot;
76 lokal_folder <<
SEP <<
"FecRing" <<
ring;
78 lokal_folder <<
SEP <<
"CcuAddr" <<
addr;
80 lokal_folder <<
SEP <<
"CcuChan" <<
chan;
123 layer = tTopo->
tidRing(detid) * (tTopo->
tidSide(detid) == 1 ? -1 : +1);
125 layer = tTopo->
tidWheel(detid) * (tTopo->
tidSide(detid) == 1 ? -1 : +1);
130 layer = tTopo->
tecRing(detid) * (tTopo->
tecSide(detid) == 1 ? -1 : +1);
132 layer = tTopo->
tecWheel(detid) * (tTopo->
tecSide(detid) == 1 ? -1 : +1);
135 edm::LogWarning(
"SiStripMonitorTrack") <<
"WARNING!!! this detid does not belong to tracker" << std::endl;
137 return std::make_pair(cSubDet, layer);
155 cThickness =
"THICK";
159 layer = tTopo->
tidWheel(detid) * (tTopo->
tidSide(detid) == 1 ? -1 : +1);
164 layer = tTopo->
tecWheel(detid) * (tTopo->
tecSide(detid) == 1 ? -1 : +1);
165 ring = tTopo->
tecRing(detid) * (tTopo->
tecSide(detid) == 1 ? -1 : +1);
166 if (ring >= 1 && ring <= 4)
169 cThickness =
"THICK";
172 edm::LogWarning(
"SiStripMonitorTrack") <<
"WARNING!!! this detid does not belong to tracker" << std::endl;
174 return std::make_pair(cSubDet, layer);
190 ring = tTopo->
tidRing(detid) * (tTopo->
tidSide(detid) == 1 ? -1 : +1);
194 ring = tTopo->
tecRing(detid) * (tTopo->
tecSide(detid) == 1 ? -1 : +1);
197 edm::LogWarning(
"SiStripMonitorTrack") <<
"WARNING!!! this detid does not belong to tracker" << std::endl;
199 return std::make_pair(cSubDet, ring);
215 std::stringstream sside;
218 }
else if (side == 2) {
223 ss <<
SEP <<
"TIB" <<
SEP <<
"layer_" << layer <<
SEP;
225 ss <<
SEP <<
"TID" <<
SEP << sside.str() <<
SEP <<
"wheel_" << layer <<
SEP;
227 ss <<
SEP <<
"TOB" <<
SEP <<
"layer_" << layer <<
SEP;
229 ss <<
SEP <<
"TEC" <<
SEP << sside.str() <<
SEP <<
"wheel_" << layer <<
SEP;
232 edm::LogWarning(
"SiStripTkDQM|WrongInput") <<
"no such SubDet :" << subDet <<
" no folder set!" << std::endl;
241 std::stringstream rest;
250 rest <<
"backward_strings" <<
SEP;
252 rest <<
"forward_strings" <<
SEP;
254 rest <<
"external_strings" << SEP;
256 rest <<
"internal_strings" <<
SEP;
257 rest <<
"string_" << tTopo->
tibString(rawdetid) << SEP <<
"module_" << rawdetid;
262 rest <<
"ring_" << tTopo->
tidRing(rawdetid) <<
SEP;
265 rest <<
"stereo_modules" <<
SEP;
267 rest <<
"mono_modules" <<
SEP;
268 rest <<
"module_" << rawdetid;
274 rest <<
"backward_rods" <<
SEP;
276 rest <<
"forward_rods" <<
SEP;
277 rest <<
"rod_" << tTopo->
tobRod(rawdetid) << SEP <<
"module_" << rawdetid;
283 rest <<
"backward_petals" <<
SEP;
285 rest <<
"forward_petals" <<
SEP;
290 rest <<
"stereo_modules" << SEP;
292 rest <<
"mono_modules" <<
SEP;
294 rest <<
"module_" << rawdetid;
298 <<
"no such subdetector type :" << stripdet.
subDetector() <<
" no folder set!" << std::endl;
301 lokal_folder += rest.str();
314 std::ostringstream rest;
319 int tib_layer = tTopo->
tibLayer(rawdetid);
320 if (
abs(layer) != tib_layer) {
322 <<
" expect " <<
abs(layer) <<
" but getting " << tTopo->
tibLayer(rawdetid) << std::endl;
325 rest <<
SEP <<
"TIB" <<
SEP <<
"layer_" << tTopo->
tibLayer(rawdetid);
329 int tid_ring = tTopo->
tidRing(rawdetid);
332 uint32_t side = tTopo->
tidSide(rawdetid);
333 std::stringstream sside;
336 }
else if (side == 2) {
341 if (
abs(layer) != tid_ring) {
343 <<
" expect " <<
abs(layer) <<
" but getting " << tTopo->
tidRing(rawdetid) << std::endl;
346 rest <<
SEP <<
"TID" <<
SEP << sside.str() <<
SEP <<
"ring_" << tTopo->
tidRing(rawdetid);
348 int tid_wheel = tTopo->
tidWheel(rawdetid);
349 if (
abs(layer) != tid_wheel) {
351 <<
" expect " <<
abs(layer) <<
" but getting " << tTopo->
tidWheel(rawdetid) << std::endl;
354 rest <<
SEP <<
"TID" <<
SEP << sside.str() <<
SEP <<
"wheel_" << tTopo->
tidWheel(rawdetid);
359 int tob_layer = tTopo->
tobLayer(rawdetid);
360 if (
abs(layer) != tob_layer) {
362 <<
" expect " <<
abs(layer) <<
" but getting " << tTopo->
tobLayer(rawdetid) << std::endl;
365 rest <<
SEP <<
"TOB" <<
SEP <<
"layer_" << tTopo->
tobLayer(rawdetid);
370 uint32_t side = tTopo->
tecSide(rawdetid);
371 std::stringstream sside;
374 }
else if (side == 2) {
379 int tec_ring = tTopo->
tecRing(rawdetid);
380 if (
abs(layer) != tec_ring) {
382 <<
" expect " <<
abs(layer) <<
" but getting " << tTopo->
tecRing(rawdetid) << std::endl;
385 rest <<
SEP <<
"TEC" <<
SEP << sside.str() <<
SEP <<
"ring_" << tTopo->
tecRing(rawdetid);
387 int tec_wheel = tTopo->
tecWheel(rawdetid);
388 if (
abs(layer) != tec_wheel) {
390 <<
" expect " <<
abs(layer) <<
" but getting " << tTopo->
tecWheel(rawdetid) << std::endl;
393 rest <<
SEP <<
"TEC" <<
SEP << sside.str() <<
SEP <<
"wheel_" << tTopo->
tecWheel(rawdetid);
398 <<
"no such subdetector type :" << stripdet.
subDetector() <<
" no folder set!" << std::endl;
402 lokal_folder += rest.str();
410 folder_name = subdet_and_tag.first;
428 ss <<
SEP <<
"TIB" <<
SEP <<
"layer_" << tTopo->
tibLayer(rawdetid);
432 uint32_t side = tTopo->
tidSide(rawdetid);
433 std::stringstream sside;
436 }
else if (side == 2) {
441 ss <<
SEP <<
"TID" <<
SEP << sside.str() <<
SEP <<
"ring_" << tTopo->
tidRing(rawdetid);
443 ss <<
SEP <<
"TID" <<
SEP << sside.str() <<
SEP <<
"wheel_" << tTopo->
tidWheel(rawdetid);
448 ss <<
SEP <<
"TOB" <<
SEP <<
"layer_" << tTopo->
tobLayer(rawdetid);
452 uint32_t side = tTopo->
tecSide(rawdetid);
453 std::stringstream sside;
456 }
else if (side == 2) {
461 ss <<
SEP <<
"TEC" <<
SEP << sside.str() <<
SEP <<
"ring_" << tTopo->
tecRing(rawdetid);
463 ss <<
SEP <<
"TEC" <<
SEP << sside.str() <<
SEP <<
"wheel_" << tTopo->
tecWheel(rawdetid);
468 <<
"no such subdetector type :" << stripdet.
subDetector() <<
" no folder set!" << std::endl;
477 const char* subdet_folder =
"";
478 const char*
tag =
"";
481 subdet_folder =
"TIB";
485 subdet_folder =
"TOB";
489 if (tTopo->
tidSide(detid) == 2) {
490 subdet_folder =
"TID/PLUS";
492 }
else if (tTopo->
tidSide(detid) == 1) {
493 subdet_folder =
"TID/MINUS";
498 if (tTopo->
tecSide(detid) == 2) {
499 subdet_folder =
"TEC/PLUS";
501 }
else if (tTopo->
tecSide(detid) == 1) {
502 subdet_folder =
"TEC/MINUS";
507 edm::LogWarning(
"SiStripCommon") <<
"WARNING!!! this detid does not belong to tracker" << std::endl;
516 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_)
static constexpr auto TEC
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()
static constexpr auto TID
tuple chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi...
#define CONTROL_FOLDER_NAME
unsigned int tecRing(const DetId &id) const
ring id
void setCurrentFolder(std::string const &fullpath) override
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
constexpr std::array< uint8_t, layerIndexSize > layer
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_
static constexpr auto TOB
virtual ~SiStripFolderOrganizer()
static constexpr auto TOB
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()
static constexpr auto TIB
static constexpr auto TIB
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
Log< level::Warning, false > LogWarning
unsigned int tobRod(const DetId &id) const
unsigned int tecWheel(const DetId &id) const
static constexpr auto TID
static constexpr auto TEC
unsigned int tobLayer(const DetId &id) const
#define MECHANICAL_FOLDER_NAME
unsigned int tecSide(const DetId &id) const