test
Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
CondFormats
RPCObjects
src
DBSpecToDetUnit.cc
Go to the documentation of this file.
1
#include "
CondFormats/RPCObjects/interface/DBSpecToDetUnit.h
"
2
#include "
DataFormats/MuonDetId/interface/RPCDetId.h
"
3
#include "
CondFormats/RPCObjects/interface/ChamberLocationSpec.h
"
4
#include "
CondFormats/RPCObjects/interface/FebLocationSpec.h
"
5
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
6
#include "
FWCore/Utilities/interface/Exception.h
"
7
#include <iostream>
8
#include <string>
9
10
using namespace
std;
11
using namespace
edm;
12
13
uint32_t
DBSpecToDetUnit::operator()
(
const
ChamberLocationSpec
& ch,
14
const
FebLocationSpec
& feb)
15
{
16
// REGION
17
int
region
= -2;
18
bool
barrel
= (ch.
barrelOrEndcap
==1);
19
if
(barrel) region = 0;
20
else
if
(ch.
diskOrWheel
<0) region = -1;
21
else
if
(ch.
diskOrWheel
>0) region = 1;
22
23
//ROLL
24
string
localEtaPartVal[6]={
"Forward"
,
"Central"
,
"Backward"
,
"A"
,
"B"
,
"C"
};
25
string
nroll = localEtaPartVal[feb.
localEtaPartition
-1];
26
27
//SUBSECTOR
28
string
subsecVal[5]={
"--"
,
"-"
,
"0"
,
"+"
,
"++"
};
29
string
subsec=subsecVal[ch.
subsector
+2];
30
31
// build RPCdetId
32
try
{
33
RPCDetId
dn;
34
dn.
buildfromDB
(region, ch.
diskOrWheel
, ch.
layer
, ch.
sector
,
35
subsec, nroll,
" "
);
36
return
dn.
rawId
();
37
}
38
catch
(
cms::Exception
&
e
) {
39
LogDebug
(
"CondFormas/DBSpecToDetInit"
)
40
<<
" Problem with RPCDetId, got exception!! "
41
<<
"DB Chamber "
<<ch.
chamberLocationName
()<<
" roll "
<<nroll
42
<<
e
;
43
return
0;
44
}
45
}
LogDebug
#define LogDebug(id)
Definition:
MessageLogger.h:501
ChamberLocationSpec
Definition:
ChamberLocationSpec.h:11
MessageLogger.h
RPCDetId::buildfromDB
void buildfromDB(int region, int ring, int layer, int sector, const std::string &subsector, const std::string &roll, const std::string &dbname)
Definition:
RPCDetId.cc:45
Reference_intrackfit_cff.barrel
barrel
Definition:
Reference_intrackfit_cff.py:37
FebLocationSpec.h
RPCDetId.h
ChamberLocationSpec::layer
int layer
Definition:
ChamberLocationSpec.h:13
ChamberLocationSpec::barrelOrEndcap
char barrelOrEndcap
Definition:
ChamberLocationSpec.h:18
DetId::rawId
uint32_t rawId() const
get the raw id
Definition:
DetId.h:43
ChamberLocationSpec::sector
int sector
Definition:
ChamberLocationSpec.h:14
DBSpecToDetUnit::operator()
uint32_t operator()(const ChamberLocationSpec &location, const FebLocationSpec &feb)
Definition:
DBSpecToDetUnit.cc:13
ChamberLocationSpec::chamberLocationName
std::string chamberLocationName() const
Definition:
ChamberLocationSpec.cc:25
RPCDetId
Definition:
RPCDetId.h:16
ChamberLocationSpec::diskOrWheel
int diskOrWheel
Definition:
ChamberLocationSpec.h:12
Exception.h
HLT_25ns10e33_v2_cff.region
tuple region
Definition:
HLT_25ns10e33_v2_cff.py:61599
FebLocationSpec::localEtaPartition
char localEtaPartition
Definition:
FebLocationSpec.h:16
cms::Exception
Definition:
Exception.h:68
ChamberLocationSpec.h
alignCSCRings.e
list e
Definition:
alignCSCRings.py:90
ChamberLocationSpec::subsector
char subsector
Definition:
ChamberLocationSpec.h:15
FebLocationSpec
Definition:
FebLocationSpec.h:12
DBSpecToDetUnit.h
Generated for CMSSW Reference Manual by
1.8.5