|
ATLAS Offline Software
|
Go to the documentation of this file.
11 #include <Inventor/nodes/SoSeparator.h>
14 #include "CaloDetDescr/CaloDetDescrElement.h"
29 #include <Inventor/nodes/SoTransform.h>
41 throw std::runtime_error(
"VP1CaloCell: Calo Cell has no Calo DDE");
93 double z = ddElement->
z();
95 if (radialDistance < globalCuts.
clipRadius )
return true;
101 const QPair<bool,double>&
scale,
130 node2cc->erase(
m_hit);
143 throw std::runtime_error(
"VP1CC_LArEMB: 0 pointer to VP1CC Separator Map");
152 VP1CC_SeparatorMap::const_iterator
it =
separators->find(mySeparatorType);
154 throw std::runtime_error(
"VP1CC_LArEMB: Missing separator helper in the map");
159 throw std::runtime_error(
"VP1CC_LArEMB: 0 pointer to separator helper");
168 const QPair<bool,double>&
scale,
172 bool createNewHit =
false;
182 double eta = ddElement->
eta();
183 double deta = ddElement->
deta()*0.5;
184 double phi = ddElement->
phi();
185 double dphi = ddElement->
dphi()*0.5;
186 double radius = ddElement->
r();
189 double z = std::fabs(ddElement->
z());
203 (*node2cc)[
m_hit] =
this;
209 std::vector<std::string>
result;
211 std::ostringstream
msg, msg1, msg2, msg3;
213 std::string stars(
"***");
218 msg1 <<
" Eta = " << ddElement->
eta()
219 <<
" Phi = " << ddElement->
phi();
229 result.push_back(msg1.str());
230 result.push_back(msg2.str());
231 result.push_back(msg3.str());
244 throw std::runtime_error(
"VP1CC_LArEMECHEC: 0 pointer to VP1CC Separator Map");
249 else if(calo_id->
is_hec(caloCell->
ID()))
252 throw std::runtime_error(
"VP1CC_LArEMECHEC: Calo Cell is neither EMEC nor HEC!");
256 if(caloCell->
energy()<0) {
269 VP1CC_SeparatorMap::const_iterator
it =
separators->find(mySeparatorType);
271 throw std::runtime_error(
"VP1CC_LArEMECHEC: Missing separator in the map");
276 throw std::runtime_error(
"VP1CC_LArEMECHEC: 0 pointer to the separator helper");
285 std::vector<std::string>
result;
288 std::ostringstream
msg, msg1, msg2, msg3;
290 std::string stars(
"***");
297 msg <<
" " << extrainfos;
299 msg1 <<
" Eta = " << ddElement->
eta()
300 <<
" Phi = " << ddElement->
phi();
310 result.push_back(msg1.str());
311 result.push_back(msg2.str());
312 result.push_back(msg3.str());
320 const QPair<bool,double>&
scale,
324 bool createNewHit =
false;
334 double eta = ddElement->
eta();
335 double deta = ddElement->
deta()*0.5;
336 double phi = ddElement->
phi();
337 double dphi = ddElement->
dphi()*0.5;
338 double z = ddElement->
z();
350 (*node2cc)[
m_hit] =
this;
360 throw std::runtime_error(
"VP1CC_LArFCAL: 0 pointer to VP1CC Separator Map");
370 VP1CC_SeparatorMap::const_iterator
it =
separators->find(mySeparatorType);
372 throw std::runtime_error(
"VP1CC_LArFCAL: Missing separator in the map");
377 throw std::runtime_error(
"VP1CC_LArFCAL: Wrong 0 pointer to the separator helper");
386 std::vector<std::string>
result;
388 std::ostringstream
msg, msg1, msg2, msg3;
390 std::string stars(
"***");
395 msg1 <<
" Eta = " << ddElement->
eta()
396 <<
" Phi = " << ddElement->
phi();
406 result.push_back(msg1.str());
407 result.push_back(msg2.str());
408 result.push_back(msg3.str());
416 const QPair<bool,double>&
scale,
420 bool createNewHit =
false;
430 double x = ddElement->
x();
431 double dx = ddElement->
dx()*0.5;
432 double y = ddElement->
y();
433 double dy = ddElement->
dy()*0.5;
434 double z = ddElement->
z();
435 double dz = ddElement->
dz()*0.5;
450 (*node2cc)[
m_hit] =
this;
479 throw std::runtime_error(
"VP1CC_TileBarEc: 0 pointer to VP1CC Separator Map");
484 throw std::runtime_error(
"VP1CC_TileBarEc: CaloCell is not TileCell");
490 double energy1 = tile_cell->
ene1();
491 double energy2 = tile_cell->
ene2();
518 VP1CC_SeparatorMap::const_iterator
it =
separators->find(mySeparatorTypeDown);
520 throw std::runtime_error(
"VP1CC_TileBarEc: Missing separator helper in the map");
526 throw std::runtime_error(
"VP1CC_TileBarEc: Missing separator helper in the map");
531 throw std::runtime_error(
"VP1CC_TileBarEc: 0 pointer to one of separator helpers" );
540 std::vector<std::string>
result;
542 if (not tile_cell)
return result;
547 double pmt_energy1 = tile_cell->ene1();
548 double pmt_time1 = tile_cell->time1();
549 double pmt_energy2 = tile_cell->ene2();
550 double pmt_time2 = tile_cell->time2();
552 std::ostringstream
msg, msg1, msg2, msg3, msg4;
553 msg <<
"Cell: " <<
id2name(cellid) <<
" " << extrainfos;
554 msg1 <<
"Energy = " << total_energy <<
" (Mev)";
555 msg2 <<
"Time = " << total_time;
556 msg3 <<
" PMT1 Energy = " << pmt_energy1 <<
" (Mev)"
557 <<
" PMT1 Time = " << pmt_time1;
558 msg4 <<
" PMT2 Energy = " << pmt_energy2 <<
" (Mev)"
559 <<
" PMT2 Time = " << pmt_time2;
561 std::string stars(
"***");
565 result.push_back(msg1.str());
566 result.push_back(msg2.str());
567 result.push_back(msg3.str());
568 result.push_back(msg4.str());
592 frag = tile_hw_id->
frag(hwId);
600 const QPair<bool,double>&
scale,
604 bool createNewHit =
false;
612 if (not tile_cell)
return;
618 double eta = ddElement->
eta();
619 double deta = ddElement->
deta()*0.5;
620 double phi = ddElement->
phi();
621 double dphi = ddElement->
dphi()*0.5;
622 double radius = ddElement->
r();
623 double dradius = ddElement->
dr()*0.5;
625 double z = ddElement->
z();
626 double minR =
radius - dradius;
627 double radialDistance = sqrt(minR*minR +
z*
z);
642 depth1,
radius-dradius,0.9,0.9);
645 depth2,
radius-dradius,0.9,0.9);
658 double z = ddElement->
z();
659 double radius = ddElement->
r();
660 double dradius = ddElement->
dr()*0.5;
661 double minR =
radius - dradius;
663 double radialDistance = sqrt(minR*minR +
z*
z);
665 if ( radialDistance > globalCuts.
clipRadius )
return false;
688 std::string
name(
"");
692 name += std::string(
"LB");
694 name += std::string(
"EB");
698 name += std::string(
"A");
700 name += std::string(
"C");
703 std::ostringstream
modnum;
713 name += std::string(
"A");
720 name += std::string(
"B");
722 name += std::string(
"C");
727 name += std::string(
"B");
729 name += std::string(
"C");
735 name += std::string(
"D");
743 std::ostringstream townum;
749 name += townum.str();
762 throw std::runtime_error(
"VP1CC_TileCrack: 0 pointer to VP1CC Separator Map");
772 VP1CC_SeparatorMap::const_iterator
it =
separators->find(mySeparatorType);
774 throw std::runtime_error(
"VP1CC_TileCrack: Missing separator in the map");
779 throw std::runtime_error(
"VP1CC_TileCrack: 0 pointer to the separator");
788 std::vector<std::string>
result;
789 std::ostringstream
msg, msg1;
791 std::string stars(
"***");
793 result.push_back(std::string(
"TileCrack Calo Cell"));
803 std::ostringstream
modnum;
838 result.push_back(msg1.str());
857 frag = tile_hw_id->
frag(hwId);
865 const QPair<bool,double>&
scale,
869 bool createNewHit =
false;
876 double eta = ddElement->
eta();
877 double deta = ddElement->
deta()*0.5;
878 double phi = ddElement->
phi();
879 double dphi = ddElement->
dphi()*0.5;
880 double z = ddElement->
z();
881 double dz = ddElement->
dz()*0.5;
884 double radius = ddElement->
r();
885 double minZ = std::fabs(
z)-dz;
886 double radialDistance = sqrt(
radius*
radius + minZ*minZ);
903 (*node2cc)[
m_hit] =
this;
910 double z = ddElement->
z();
911 double dz = ddElement->
dz()*0.5;
912 double radius = ddElement->
r();
913 double minZ = std::fabs(
z)-dz;
914 double radialDistance = sqrt(
radius*
radius + minZ*minZ);
916 if ( radialDistance > globalCuts.
clipRadius )
return false;
924 node2cc->erase(
m_hit);
938 SoSeparator* separator,
941 m_idhelper(idhelper),
942 m_separator(separator),
963 if (clipRadius < 350 )
973 if(drawinfo->find(
channel) ==drawinfo->end())
974 throw std::runtime_error(
"Unable to find scintillator global info");
979 SoTransform* scinXF = 0;
982 throw std::runtime_error(
"Unable to find global transform for the scintillator");
985 else if(
type == 1) {
987 throw std::runtime_error(
"Unable to find global transform for the scintillator");
1002 SoSeparator* scinSep =
new SoSeparator;
1003 scinSep->addChild(scinXF);
1004 scinSep->addChild(scinTrd);
1008 (*node2mbts)[scinTrd] =
this;
1013 SoTransform* scinXF1 = 0;
1016 throw std::runtime_error(
"Unable to find global transform for the scintillator");
1019 else if(
type == 1) {
1021 throw std::runtime_error(
"Unable to find global transform for the scintillator");
1032 SoSeparator* scinSep1 =
new SoSeparator();
1033 scinSep1->addChild(scinXF1);
1034 scinSep1->addChild(scinTrd1);
1038 (*node2mbts)[scinTrd1] =
this;
1048 std::vector<std::string>
result;
1058 std::ostringstream
msg, msg1, msg2, msg3;
1059 msg <<
" MBTS. Side = " <<
type <<
". Scintillator Type = " <<
channel
1064 std::string stars(
"***");
1068 result.push_back(msg1.str());
1069 result.push_back(msg2.str());
float deta() const
cell deta
std::vector< std::string > ToString(const CaloCell_ID *calo_id, const std::string &extrainfos="")
IdentifierHash onl2() const
cell online identifier 2
VP1ExtraSepLayerHelper * m_helper
VP1ExtraSepLayerHelper * m_helperUp
int GetFragChannel(const TileHWID *tile_hw_id, bool up, int &frag, int &channel)
std::vector< std::string > ToString()
VP1CC_LAr(const CaloCell *caloCell)
virtual void build3DObjects(VP1CC_SoNode2CCMap *node2cc, bool useEt, const QPair< bool, double > &scale, bool outline, const VP1CC_GlobalCuts &)=0
@ depth
pointing depth of the shower as calculated in egammaqgcld
virtual double phi() const override final
get phi (through CaloDetDescrElement)
std::vector< std::string > ToString(const CaloCell_ID *calo_id, const std::string &extrainfos="")
int tower(const Identifier id) const
Tile field values (NOT_VALID == invalid request)
Scalar phi() const
phi method
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
@ VP1CC_SepTileNegativeUp
virtual int get_id(const IdentifierHash &hash_id, HWIdentifier &id, const IdContext *context=0) const
create compact HW ID from hash id (return == 0 for OK)
virtual void remove3DObjects(VP1CC_SoNode2CCMap *node2cc)
int GetFragChannel(const TileHWID *tile_hw_id, bool up, int &frag, int &channel)
@ VP1CC_SepTilePositiveNeg
@ VP1CC_SepTilePositiveUp
VP1ExtraSepLayerHelper * m_helperDown
Scalar eta() const
pseudorapidity method
bool is_em_endcap(const Identifier id) const
test if the id belongs to the EM Endcap
float ene1(void) const
get energy of first PMT
std::string id2name(Identifier &id)
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
IdContext channel_context(void) const
idContext for channels
void setParametersForEndCapEtaPhiCell(double etaMin, double etaMax, double phiMin, double phiMax, double cellDepth, double cellDistance, double etasqueezefact=1.0, double phisqueezefact=1.0)
VP1CC_TileCrack(const CaloCell *caloCell, const TileID *tile_id, const VP1CC_SeparatorMap *separators)
int side(const Identifier &id) const
void setParametersForBarrelEtaPhiCell(double etaMin, double etaMax, double phiMin, double phiMax, double cellDepth, double cellDistance, double etasqueezefact=1.0, double phisqueezefact=1.0)
int sample(const Identifier &id) const
QList< VP1Interval > allowedPhi
virtual bool isInsideClipVolume(const VP1CC_GlobalCuts &globalCuts)
int frag(const HWIdentifier &id) const
extract frag field from HW identifier
int tower(const Identifier &id) const
uint16_t provenance() const
get provenance (data member)
int module(const Identifier id) const
Tile field values (NOT_VALID == invalid request)
int type(const Identifier &id) const
extract type field from TileTB identifier
float time() const
get time (data member)
@ VP1CC_SepTileNegativeDown
bool is_hec(const Identifier id) const
test if the id belongs to the HEC
int module(const Identifier &id) const
extract module field from TileTB identifier
void updateScene(VP1CC_SoNode2CCMap *node2cc, bool useEt, const QPair< bool, double > &scale, bool outline, const VP1CC_GlobalCuts &globalCuts)
int channel(const HWIdentifier &id) const
extract channel field from HW identifier
double energy() const
get energy (data member)
SoSeparator * m_separator
virtual ~VP1CC_TileCrack()
VP1ExtraSepLayerHelper * m_helper
IdentifierHash onl1() const
cell online identifier 1
virtual void build3DObjects(VP1CC_SoNode2CCMap *node2cc, bool useEt, const QPair< bool, double > &scale, bool outline, const VP1CC_GlobalCuts &)
Helper class for TileCal online (hardware) identifiers.
virtual void remove3DObjects(VP1CC_SoNode2CCMap *node2cc)=0
int module(const Identifier &id) const
VP1CC_LArFCAL(const CaloCell *caloCell, const VP1CC_SeparatorMap *separators)
@ VP1CC_SepTileNegativePos
Helper class for TileCal offline identifiers.
VP1CaloCell(const CaloCell *caloCell)
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
double energyToTransverse(const double &) const
std::vector< std::string > ToString(const CaloCell_ID *calo_id, const std::string &extrainfos="")
Helper class for offline cell identifiers.
virtual void remove3DObjects(VP1CC_SoNode2CCMap *node2cc)
virtual ~VP1CC_TileBarEc()
void setParametersForBox(float dx, float dy, float dz, float xcenter=0.0, float ycenter=0.0, float zcenter=0.0)
std::map< int, VP1CC_MbtsScinInfo *, std::less< int > > VP1CC_MbtsScinInfoMap
int channel(const Identifier &id) const
extract channel field from TileTB identifier
uint16_t quality() const
get quality (data member)
VP1Mbts(const TileCell *cell, const TileTBID *idhelper, SoSeparator *separator, bool run2Geo)
bool isInsideClipVolume(const VP1CC_GlobalCuts &globalCuts)
std::vector< std::string > ToString(const CaloCell_ID *calo_id, const std::string &extrainfos="")
std::map< VP1CC_SeparatorTypes, VP1ExtraSepLayerHelper *, std::less< VP1CC_SeparatorTypes > > VP1CC_SeparatorMap
VP1CC_MbtsXfMap cTransforms
const TileTBID * m_idhelper
double cellDepth(const QPair< bool, double > &scale, const double &energy)
bool contains(const double &x) const
virtual ~VP1CC_LArEMECHEC()
bool cutPassed(const VP1CC_GlobalCuts &globalCuts)
CaloGain::CaloGain gain() const
get gain (data member )
Identifier ID() const
get ID (from cached data member) non-virtual and inline for fast access
@ VP1CC_SepTilePositiveDown
VP1CC_MbtsXfMap aTransforms
virtual void build3DObjects(VP1CC_SoNode2CCMap *node2cc, bool useEt, const QPair< bool, double > &scale, bool outline, const VP1CC_GlobalCuts &)
const CaloCell * m_caloCell
float dphi() const
cell dphi
std::string getString() const
Provide a string form of the identifier - hexadecimal.
float ene2(void) const
get energy of second PMT
const CaloCell * getCaloCell()
std::vector< std::string > ToString(const CaloCell_ID *calo_id, const std::string &extrainfos="")
virtual void remove3DObjects(VP1CC_SoNode2CCMap *node2cc)
int side(const Identifier id) const
Tile field values (NOT_VALID == invalid request)
Data object for each calorimeter readout cell.
VP1CC_LArEMECHEC(const CaloCell *caloCell, const CaloCell_ID *calo_id, const VP1CC_SeparatorMap *separators)
virtual void build3DObjects(VP1CC_SoNode2CCMap *node2cc, bool useEt, const QPair< bool, double > &scale, bool outline, const VP1CC_GlobalCuts &)
VP1CC_LArEMB(const CaloCell *caloCell, const VP1CC_SeparatorMap *separators)
virtual void build3DObjects(VP1CC_SoNode2CCMap *node2cc, bool useEt, const QPair< bool, double > &scale, bool outline, const VP1CC_GlobalCuts &)
bool UpdateScene(VP1CC_MbtsScinInfoMap *drawinfo, VP1CC_SoNode2MbtsMap *node2mbts, double energy, bool outline, double clipRadius)
float eta() const
cell eta
Helper class for TileCal offline identifiers of ancillary testbeam detectors and MBTS.
float phi() const
cell phi
std::map< SoNode *, VP1Mbts *, std::less< SoNode * > > VP1CC_SoNode2MbtsMap
VP1CC_TileBarEc(const CaloCell *caloCell, const TileID *tile_id, const VP1CC_SeparatorMap *separators)
int section(const Identifier &id) const
virtual void build3DObjects(VP1CC_SoNode2CCMap *node2cc, bool useEt, const QPair< bool, double > &scale, bool outline, const VP1CC_GlobalCuts &)
bool is_tile_barrel(const Identifier &id) const
Test of an Identifier to see if it belongs to a particular part of the calorimeter.
bool isInsideClipVolume(const VP1CC_GlobalCuts &globalCuts)
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
static SoTransform * toSoTransform(const HepGeom::Transform3D &, SoTransform *t=0)
VP1CC_Tile(const CaloCell *caloCell, const TileID *tile_id)
virtual double sinTh() const override final
get sin(theta) (through CaloDetDescrElement)
virtual double eta() const override final
get eta (through CaloDetDescrElement)
std::map< SoNode *, VP1CaloCell *, std::less< SoNode * > > VP1CC_SoNode2CCMap
void setParametersForTrd(float dx1, float dx2, float dy1, float dy2, float dz)