Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LHCb
Panoramix
Commits
e22a876a
Commit
e22a876a
authored
Mar 31, 2022
by
Sebastien Ponce
Browse files
Removed duplication of channelIDs between LHCb and Detector. Kept Detector ones
parent
dd2c65a6
Pipeline
#3790510
passed with stages
in 26 seconds
Changes
15
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Vis/SoCalo/src/CaloBaseType.cpp
View file @
e22a876a
...
...
@@ -314,7 +314,7 @@ StatusCode CaloBaseType::Exception( const std::string& msg, const MSG::Level&, c
* @return pointer to calorimeter device
*/
// ============================================================================
const
DeCalorimeter
*
CaloBaseType
::
calo
(
LHCb
::
Calo
::
CellCode
::
Index
Calo
)
const
{
const
DeCalorimeter
*
CaloBaseType
::
calo
(
LHCb
::
Detector
::
Calo
::
CellCode
::
Index
Calo
)
const
{
///
StatusCode
sc
=
locateCalo
(
Calo
);
if
(
sc
.
isFailure
()
)
{
return
nullptr
;
}
...
...
@@ -329,7 +329,7 @@ const DeCalorimeter* CaloBaseType::calo( LHCb::Calo::CellCode::Index Calo ) cons
* @return status code
*/
// ============================================================================
StatusCode
CaloBaseType
::
locateCalo
(
LHCb
::
Calo
::
CellCode
::
Index
CaloIn
)
const
{
StatusCode
CaloBaseType
::
locateCalo
(
LHCb
::
Detector
::
Calo
::
CellCode
::
Index
CaloIn
)
const
{
///
const
auto
Calo
=
static_cast
<
unsigned
int
>
(
CaloIn
);
if
(
(
Calo
<
m_calos
.
size
()
)
&&
(
0
!=
m_calos
[
Calo
]
)
)
{
return
StatusCode
::
SUCCESS
;
}
...
...
Vis/SoCalo/src/CaloBaseType.h
View file @
e22a876a
...
...
@@ -44,9 +44,9 @@
# include <string>
// Gaudi
# include "CaloDet/DeCalorimeter.h"
# include "Detector/Calo/CaloCellCode.h"
# include "GaudiKernel/MsgStream.h"
# include "GaudiKernel/StatusCode.h"
# include "Kernel/CaloCellCode.h"
//
// forward declarations
class
ISvcLocator
;
...
...
@@ -150,13 +150,13 @@ protected:
* @param Calo index of calorimeter detector
* @return status code
*/
StatusCode
locateCalo
(
LHCb
::
Calo
::
CellCode
::
Index
calo
)
const
;
StatusCode
locateCalo
(
LHCb
::
Detector
::
Calo
::
CellCode
::
Index
calo
)
const
;
/** accessor to calorimeter detector
* @param Calo calorimeter index
* @return pointer to calorimeter device
*/
const
DeCalorimeter
*
calo
(
LHCb
::
Calo
::
CellCode
::
Index
calo
)
const
;
const
DeCalorimeter
*
calo
(
LHCb
::
Detector
::
Calo
::
CellCode
::
Index
calo
)
const
;
/** print and count error message
* @param Message error message to be printed
...
...
Vis/SoCalo/src/CaloClusterType.cpp
View file @
e22a876a
...
...
@@ -191,7 +191,7 @@ Lib::Variable CaloClusterType::value( Lib::Identifier identifier, const std::str
return
Lib
::
Variable
(
printer
(),
(
int
)
cluster
->
type
()
);
}
const
DeCalorimeter
*
decalo
=
calo
(
LHCb
::
Calo
::
CellCode
::
CaloNumFromName
(
myType
()
)
);
const
DeCalorimeter
*
decalo
=
calo
(
LHCb
::
Detector
::
Calo
::
CellCode
::
CaloNumFromName
(
myType
()
)
);
if
(
"et"
==
tag
)
{
if
(
0
==
decalo
)
{
return
Lib
::
Variable
(
printer
(),
(
double
)
-
1.0
);
}
...
...
@@ -261,7 +261,7 @@ void CaloClusterType::visualize( Lib::Identifier id, void* ) {
return
;
}
/// create and configure visualizator
const
DeCalorimeter
*
Calo
=
calo
(
LHCb
::
Calo
::
CellCode
::
CaloNumFromName
(
myType
()
)
);
const
DeCalorimeter
*
Calo
=
calo
(
LHCb
::
Detector
::
Calo
::
CellCode
::
CaloNumFromName
(
myType
()
)
);
if
(
0
==
Calo
)
{
Error
(
"visualize(): DeCalorimeter* points to NULL! "
).
ignore
(
/* AUTOMATICALLY ADDED FOR gaudi/Gaudi!763 */
);
return
;
...
...
Vis/SoCalo/src/CaloDigitType.cpp
View file @
e22a876a
...
...
@@ -183,7 +183,7 @@ Lib::Variable CaloDigitType::value( Lib::Identifier identifier, const std::strin
return
Lib
::
Variable
(
printer
(),
digit
->
e
()
);
}
///
const
LHCb
::
Calo
::
CellID
cellID
(
digit
->
cellID
()
);
const
LHCb
::
Detector
::
Calo
::
CellID
cellID
(
digit
->
cellID
()
);
if
(
"index"
==
tag
)
{
return
Lib
::
Variable
(
printer
(),
(
int
)
cellID
.
index
()
);
}
else
if
(
"calo"
==
tag
)
{
...
...
Vis/SoCalo/src/SoCaloClusterCnv.cpp
View file @
e22a876a
...
...
@@ -248,7 +248,7 @@ StatusCode SoCaloClusterCnv::createRep( DataObject* object, IOpaqueAddress*& /*
// ============================================================================
/// locate the calorimeter //////
// ============================================================================
StatusCode
SoCaloClusterCnv
::
locateCalo
(
LHCb
::
Calo
::
CellCode
::
Index
caloIn
)
{
StatusCode
SoCaloClusterCnv
::
locateCalo
(
LHCb
::
Detector
::
Calo
::
CellCode
::
Index
caloIn
)
{
///
const
auto
calo
=
static_cast
<
unsigned
int
>
(
caloIn
);
if
(
(
calo
<
m_calos
.
size
()
)
&&
(
0
!=
m_calos
[
calo
]
)
)
{
return
StatusCode
::
SUCCESS
;
}
...
...
@@ -271,7 +271,7 @@ StatusCode SoCaloClusterCnv::locateCalo( LHCb::Calo::CellCode::Index caloIn ) {
// ============================================================================
/// calorimeter
// ============================================================================
const
DeCalorimeter
*
SoCaloClusterCnv
::
calorimeter
(
LHCb
::
Calo
::
CellCode
::
Index
calo
)
{
const
DeCalorimeter
*
SoCaloClusterCnv
::
calorimeter
(
LHCb
::
Detector
::
Calo
::
CellCode
::
Index
calo
)
{
///
StatusCode
sc
=
locateCalo
(
calo
);
if
(
sc
.
isFailure
()
)
{
return
0
;
}
...
...
Vis/SoCalo/src/SoCaloClusterCnv.h
View file @
e22a876a
...
...
@@ -76,9 +76,9 @@ public:
/// virtual destructor
virtual
~
SoCaloClusterCnv
();
/// helpful methos to save typing
StatusCode
locateCalo
(
LHCb
::
Calo
::
CellCode
::
Index
calo
);
StatusCode
locateCalo
(
LHCb
::
Detector
::
Calo
::
CellCode
::
Index
calo
);
/// accessor to calorimeter
const
DeCalorimeter
*
calorimeter
(
LHCb
::
Calo
::
CellCode
::
Index
calo
);
const
DeCalorimeter
*
calorimeter
(
LHCb
::
Detector
::
Calo
::
CellCode
::
Index
calo
);
///
private:
///
...
...
Vis/SoCalo/src/SoCaloDigitCnv.cpp
View file @
e22a876a
...
...
@@ -30,8 +30,8 @@
#include "OnXSvc/Helpers.h"
#include "OnXSvc/IUserInterfaceSvc.h"
// CaloEvent
#include "Detector/Calo/CaloCellID.h"
#include "Event/CaloDigit.h"
#include "Kernel/CaloCellID.h"
// CaloDet
#include "CaloDet/DeCalorimeter.h"
// Local
...
...
@@ -129,16 +129,16 @@ StatusCode SoCaloDigitCnv::createRep( DataObject* object, IOpaqueAddress*& /* Ad
// Build the data-accessor name :
std
::
string
da_name
=
"none"
;
// Should be Ecal, Hcal, Prs, Spd.
if
(
LHCb
::
Calo
::
CellCode
::
CaloNumFromName
(
"Ecal"
)
==
int
(
calo
)
)
{
if
(
LHCb
::
Detector
::
Calo
::
CellCode
::
CaloNumFromName
(
"Ecal"
)
==
int
(
calo
)
)
{
// we are in Ecal
da_name
=
"Ecal"
;
}
else
if
(
LHCb
::
Calo
::
CellCode
::
CaloNumFromName
(
"Prs"
)
==
int
(
calo
)
)
{
}
else
if
(
LHCb
::
Detector
::
Calo
::
CellCode
::
CaloNumFromName
(
"Prs"
)
==
int
(
calo
)
)
{
// we are in Prs
da_name
=
"Prs"
;
}
else
if
(
LHCb
::
Calo
::
CellCode
::
CaloNumFromName
(
"Spd"
)
==
int
(
calo
)
)
{
}
else
if
(
LHCb
::
Detector
::
Calo
::
CellCode
::
CaloNumFromName
(
"Spd"
)
==
int
(
calo
)
)
{
// we are in Spd
da_name
=
"Spd"
;
}
else
if
(
LHCb
::
Calo
::
CellCode
::
CaloNumFromName
(
"Hcal"
)
==
int
(
calo
)
)
{
}
else
if
(
LHCb
::
Detector
::
Calo
::
CellCode
::
CaloNumFromName
(
"Hcal"
)
==
int
(
calo
)
)
{
// we are in Hcal
da_name
=
"Hcal"
;
}
...
...
@@ -212,7 +212,7 @@ StatusCode SoCaloDigitCnv::createRep( DataObject* object, IOpaqueAddress*& /* Ad
// ============================================================================
/// locate the calorimeter //////
// ============================================================================
StatusCode
SoCaloDigitCnv
::
locateCalo
(
LHCb
::
Calo
::
CellCode
::
Index
caloIn
)
{
StatusCode
SoCaloDigitCnv
::
locateCalo
(
LHCb
::
Detector
::
Calo
::
CellCode
::
Index
caloIn
)
{
///
const
auto
calo
=
static_cast
<
unsigned
int
>
(
caloIn
);
if
(
(
calo
<
m_calos
.
size
()
)
&&
(
0
!=
m_calos
[
calo
]
)
)
{
return
StatusCode
::
SUCCESS
;
}
...
...
@@ -235,7 +235,7 @@ StatusCode SoCaloDigitCnv::locateCalo( LHCb::Calo::CellCode::Index caloIn ) {
// ============================================================================
/// calorimeter
// ============================================================================
const
DeCalorimeter
*
SoCaloDigitCnv
::
calorimeter
(
LHCb
::
Calo
::
CellCode
::
Index
calo
)
{
const
DeCalorimeter
*
SoCaloDigitCnv
::
calorimeter
(
LHCb
::
Detector
::
Calo
::
CellCode
::
Index
calo
)
{
///
StatusCode
sc
=
locateCalo
(
calo
);
if
(
sc
.
isFailure
()
)
{
return
0
;
}
...
...
Vis/SoCalo/src/SoCaloDigitCnv.h
View file @
e22a876a
...
...
@@ -79,9 +79,9 @@ public:
/// virtual destructor
virtual
~
SoCaloDigitCnv
();
/// helpful methos to save typing
StatusCode
locateCalo
(
LHCb
::
Calo
::
CellCode
::
Index
calo
);
StatusCode
locateCalo
(
LHCb
::
Detector
::
Calo
::
CellCode
::
Index
calo
);
/// accessor to calorimeter
const
DeCalorimeter
*
calorimeter
(
LHCb
::
Calo
::
CellCode
::
Index
calo
);
const
DeCalorimeter
*
calorimeter
(
LHCb
::
Detector
::
Calo
::
CellCode
::
Index
calo
);
///
private:
///
...
...
Vis/SoEvent/src/FTClusterType.cpp
View file @
e22a876a
...
...
@@ -62,8 +62,8 @@ Lib::Variable FTClusterType::value( Lib::Identifier aIdentifier, const std::stri
//////////////////////////////////////////////////////////////////////////////
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
{
LHCb
::
FTCluster
*
obj
=
(
LHCb
::
FTCluster
*
)
aIdentifier
;
LHCb
::
FTChannelID
chid
=
obj
->
channelID
();
LHCb
::
FTCluster
*
obj
=
(
LHCb
::
FTCluster
*
)
aIdentifier
;
LHCb
::
Detector
::
FTChannelID
chid
=
obj
->
channelID
();
if
(
aName
==
"address"
)
{
return
Lib
::
Variable
(
printer
(),
(
void
*
)
obj
);
}
else
if
(
aName
==
"layer"
)
{
...
...
Vis/SoEvent/src/MCParticleType.cpp
View file @
e22a876a
...
...
@@ -357,8 +357,9 @@ void MCParticleType::visualizeClusters( LHCb::MCParticle& aParticle )
LHCb
::
MuonCoords
*
rawCoords
=
dynamic_cast
<
LHCb
::
MuonCoords
*>
(
dataObject
);
LHCb
::
MuonDigit
*
obj
=
MuonDigitLink
.
first
(
&
aParticle
);
while
(
obj
)
{
LHCb
::
MuonCoord
*
mobj
=
dynamic_cast
<
LHCb
::
MuonCoord
*>
(
rawCoords
->
object
(
LHCb
::
MuonTileID
(
obj
->
index
()
)
)
);
auto
objs
=
std
::
make_unique
<
LHCb
::
MuonCoords
>
();
LHCb
::
MuonCoord
*
mobj
=
dynamic_cast
<
LHCb
::
MuonCoord
*>
(
rawCoords
->
object
(
LHCb
::
Detector
::
Muon
::
TileID
(
obj
->
index
()
)
)
);
auto
objs
=
std
::
make_unique
<
LHCb
::
MuonCoords
>
();
objs
->
add
(
mobj
);
// Convert it :
IOpaqueAddress
*
addr
=
nullptr
;
...
...
Vis/SoEvent/src/MuonCoordType.cpp
View file @
e22a876a
...
...
@@ -46,13 +46,13 @@ Lib::Variable MuonCoordType::value( Lib::Identifier aIdentifier, const std::stri
if
(
aName
==
"address"
)
{
return
Lib
::
Variable
(
printer
(),
(
void
*
)
obj
);
}
else
if
(
aName
==
"station"
)
{
LHCb
::
MuonTileID
tile
=
obj
->
key
();
LHCb
::
Detector
::
Muon
::
TileID
tile
=
obj
->
key
();
return
Lib
::
Variable
(
printer
(),
(
int
)
tile
.
station
()
);
}
else
if
(
aName
==
"region"
)
{
LHCb
::
MuonTileID
tile
=
obj
->
key
();
LHCb
::
Detector
::
Muon
::
TileID
tile
=
obj
->
key
();
return
Lib
::
Variable
(
printer
(),
(
int
)
tile
.
region
()
);
}
else
if
(
aName
==
"quarter"
)
{
LHCb
::
MuonTileID
tile
=
obj
->
key
();
LHCb
::
Detector
::
Muon
::
TileID
tile
=
obj
->
key
();
return
Lib
::
Variable
(
printer
(),
(
int
)
tile
.
quarter
()
);
}
else
if
(
aName
==
"key"
)
{
return
Lib
::
Variable
(
printer
(),
(
int
)(
obj
->
key
().
key
()
)
);
...
...
@@ -88,8 +88,9 @@ void MuonCoordType::visualizeMCParticle( LHCb::MuonCoord& aMuonCoord )
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
{
LinkedTo
<
LHCb
::
MCParticle
,
LHCb
::
MuonDigit
>
MuonCoordLink
(
fDataProviderSvc
,
0
,
LHCb
::
MuonDigitLocation
::
MuonDigit
);
const
std
::
vector
<
LHCb
::
MuonTileID
>
digits
=
(
&
aMuonCoord
)
->
LHCb
::
MuonCoord
::
digitTile
();
for
(
std
::
vector
<
LHCb
::
MuonTileID
>::
const_iterator
idigit
=
digits
.
begin
();
idigit
!=
digits
.
end
();
idigit
++
)
{
const
std
::
vector
<
LHCb
::
Detector
::
Muon
::
TileID
>
digits
=
(
&
aMuonCoord
)
->
LHCb
::
MuonCoord
::
digitTile
();
for
(
std
::
vector
<
LHCb
::
Detector
::
Muon
::
TileID
>::
const_iterator
idigit
=
digits
.
begin
();
idigit
!=
digits
.
end
();
idigit
++
)
{
LHCb
::
MCParticle
*
part
=
MuonCoordLink
.
first
(
(
*
idigit
)
);
while
(
NULL
!=
part
)
{
LHCb
::
MCParticles
*
objs
=
new
LHCb
::
MCParticles
;
...
...
Vis/SoEvent/src/SoFTClusterCnv.cpp
View file @
e22a876a
...
...
@@ -177,8 +177,8 @@ StatusCode SoFTClusterCnv::createRep( DataObject* aObject, IOpaqueAddress*& aAdd
// One scene graph per FTCluster :
for
(
auto
it
=
clusters
->
begin
();
it
!=
clusters
->
end
();
it
++
)
{
LHCb
::
FTCluster
*
cluster
=
(
*
it
);
LHCb
::
FTChannelID
chan
=
cluster
->
channelID
();
LHCb
::
FTCluster
*
cluster
=
(
*
it
);
LHCb
::
Detector
::
FTChannelID
chan
=
cluster
->
channelID
();
// Build name :
char
sid
[
64
];
...
...
Vis/SoEvent/src/SoMuonCoordCnv.cpp
View file @
e22a876a
...
...
@@ -166,7 +166,7 @@ StatusCode SoMuonCoordCnv::createRep( DataObject* aObject, IOpaqueAddress*& aAdd
char
sid
[
64
];
::
sprintf
(
sid
,
"MuonCoord/0x%lx"
,
(
unsigned
long
)
coord
);
LHCb
::
MuonTileID
tile
=
coord
->
key
();
LHCb
::
Detector
::
Muon
::
TileID
tile
=
coord
->
key
();
SoSceneGraph
*
sep
=
new
SoSceneGraph
;
sep
->
setString
(
sid
);
...
...
Vis/SoEvent/src/TrackType.cpp
View file @
e22a876a
...
...
@@ -32,6 +32,7 @@
// Event model
#include "DetDesc/DetectorElement.h"
#include "DetDesc/LVolume.h"
#include "Detector/Muon/TileID.h"
#include "Event/FTCluster.h"
#include "Event/MCParticle.h"
#include "Event/MCRichSegment.h"
...
...
@@ -40,7 +41,6 @@
#include "Event/RecVertex.h"
#include "Event/UTCluster.h"
#include "Event/VPCluster.h"
#include "Kernel/MuonTileID.h"
#include "TrackInterfaces/ITrackExtrapolator.h"
#include "TrackInterfaces/ITrackFitter.h"
...
...
@@ -259,8 +259,8 @@ void TrackType::visualizeMeasurements( LHCb::Track& aTrack ) const
for
(
unsigned
int
index
=
0
;
index
<
meas
.
size
();
index
++
)
{
// FIXME : is it possible to be generic ?
if
(
meas
[
index
].
isVP
()
)
{
LHCb
::
VPChannelID
vid
=
meas
[
index
].
vpID
();
sc
=
fDataProviderSvc
->
retrieveObject
(
slot
+
"Raw/VP/Clusters"
,
dataObject
);
LHCb
::
Detector
::
VPChannelID
vid
=
meas
[
index
].
vpID
();
sc
=
fDataProviderSvc
->
retrieveObject
(
slot
+
"Raw/VP/Clusters"
,
dataObject
);
if
(
sc
.
isSuccess
()
)
{
if
(
debug
==
"True"
)
{
Lib
::
Out
out
(
printer
()
);
...
...
@@ -272,8 +272,8 @@ void TrackType::visualizeMeasurements( LHCb::Track& aTrack ) const
}
}
if
(
meas
[
index
].
isUT
()
)
{
LHCb
::
UT
ChannelID
vid
=
meas
[
index
].
utID
();
sc
=
fDataProviderSvc
->
retrieveObject
(
slot
+
"Raw/UT/Clusters"
,
dataObject
);
LHCb
::
Detector
::
UT
::
ChannelID
vid
=
meas
[
index
].
utID
();
sc
=
fDataProviderSvc
->
retrieveObject
(
slot
+
"Raw/UT/Clusters"
,
dataObject
);
if
(
sc
.
isSuccess
()
)
{
LHCb
::
UTCluster
*
obj
=
dynamic_cast
<
LHCb
::
UTCluster
*>
(
dynamic_cast
<
ObjectContainerBase
*>
(
dataObject
)
->
containedObject
(
vid
.
channelID
()
)
);
...
...
@@ -281,8 +281,8 @@ void TrackType::visualizeMeasurements( LHCb::Track& aTrack ) const
}
}
if
(
meas
[
index
].
isFT
()
)
{
LHCb
::
FTChannelID
vid
=
meas
[
index
].
ftID
();
sc
=
fDataProviderSvc
->
retrieveObject
(
slot
+
"Raw/FT/Clusters"
,
dataObject
);
LHCb
::
Detector
::
FTChannelID
vid
=
meas
[
index
].
ftID
();
sc
=
fDataProviderSvc
->
retrieveObject
(
slot
+
"Raw/FT/Clusters"
,
dataObject
);
if
(
sc
.
isSuccess
()
)
{
LHCb
::
FTCluster
*
obj
=
dynamic_cast
<
LHCb
::
FTCluster
*>
(
dynamic_cast
<
ObjectContainerBase
*>
(
dataObject
)
->
containedObject
(
vid
.
channelID
()
)
);
...
...
@@ -290,8 +290,8 @@ void TrackType::visualizeMeasurements( LHCb::Track& aTrack ) const
}
}
if
(
meas
[
index
].
isMuon
()
)
{
LHCb
::
MuonTileID
vid
=
meas
[
index
].
muonID
();
sc
=
fDataProviderSvc
->
retrieveObject
(
slot
+
"Raw/Muon/Coords"
,
dataObject
);
LHCb
::
Detector
::
Muon
::
TileID
vid
=
meas
[
index
].
muonID
();
sc
=
fDataProviderSvc
->
retrieveObject
(
slot
+
"Raw/Muon/Coords"
,
dataObject
);
if
(
sc
.
isSuccess
()
)
{
LHCb
::
MuonCoord
*
obj
=
dynamic_cast
<
LHCb
::
MuonCoord
*>
(
dynamic_cast
<
ObjectContainerBase
*>
(
dataObject
)
->
containedObject
(
vid
)
);
...
...
Vis/SoEvent/src/VPClusterType.cpp
View file @
e22a876a
...
...
@@ -64,8 +64,8 @@ Lib::Variable VPClusterType::value( Lib::Identifier aIdentifier, const std::stri
//////////////////////////////////////////////////////////////////////////////
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
{
LHCb
::
VPCluster
*
obj
=
(
LHCb
::
VPCluster
*
)
aIdentifier
;
LHCb
::
VPChannelID
chid
=
obj
->
channelID
();
LHCb
::
VPCluster
*
obj
=
(
LHCb
::
VPCluster
*
)
aIdentifier
;
LHCb
::
Detector
::
VPChannelID
chid
=
obj
->
channelID
();
if
(
aName
==
"address"
)
{
return
Lib
::
Variable
(
printer
(),
(
void
*
)
obj
);
}
else
if
(
aName
==
"key"
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment