ATLAS Offline Software
VP1SysConf.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
7 // //
8 // Implementation of class VP1SysConf //
9 // //
10 // Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) //
11 // Initial version: July 2008 //
12 // //
14 
21 // #include "VP1VertexSystems/VP1JetSystem.h"
22 #include "VP1Base/VP1QtUtils.h"
23 
24 //____________________________________________________________________
27  VP1TrackSystem * trk,
29  VP1VertexSystem* vtx,
30  CHANNELMODE cm )
31 {
32  if (geo&&cm==EVENTSTUDIES) {
33  geo->setCurvedSurfaceRealism(40);
34  geo->setAutoAdaptMuonChambersToEventData(true);
35  geo->setOrientViewToMuonChambersOnClick(true);
36  }
37 
38  if (geo&&prd&&cm==EVENTSTUDIES) {
39  // To let the prd system know which projection is appropriate according to the geometry:
40  QObject::connect(geo,SIGNAL(appropriateMDTProjectionsChanged(int)),prd,SLOT(appropriateMDTProjectionsChanged(int)));
41  // To let the geometry system reorient view to muon chamber when user click prds:
42  QObject::connect(prd,SIGNAL(prdInMuonChamberSelected(const GeoPVConstLink&)),geo,SLOT(orientViewToMuonChamber(const GeoPVConstLink&)));
43  }
44 
45  if (trk&&prd) {
46  // Colouring PRDs via Tracks/segments
47  QObject::connect( trk, SIGNAL(visibleTracksChanged(const std::vector< std::pair<const Trk::Track*, const SoMaterial*> >&)),
48  prd, SLOT(visibleTracksChanged(const std::vector< std::pair<const Trk::Track*, const SoMaterial*> >&)));
49  QObject::connect( trk, SIGNAL(visibleSegmentsChanged(const std::vector< std::pair<const Trk::Segment*, const SoMaterial*> >&)),
50  prd, SLOT(visibleSegmentsChanged(const std::vector< std::pair<const Trk::Segment*, const SoMaterial*> >&)));
51 
52  //For interactive track fits to selected PRDs:
53  QObject::connect( prd, SIGNAL(selectedPRDsChanged(const QList<const Trk::PrepRawData*>&)),
54  trk, SLOT(setSelectedPRDs(const QList<const Trk::PrepRawData*>&)) );
55  }
56 
57  // Touched muon chambers
58  if (geo&&trk)
59  QObject::connect(trk,SIGNAL(touchedMuonChambersChanged(const std::set<GeoPVConstLink>&)),
60  geo,SLOT(reiconizeToShowSpecificMuonChambers(const std::set<GeoPVConstLink>&)));
61  if (geo&&prd)
62  QObject::connect(prd,SIGNAL(touchedMuonChambersChanged(const std::set<GeoPVConstLink>&)),
63  geo,SLOT(reiconizeToShowSpecificMuonChambers(const std::set<GeoPVConstLink>&)));
64  if (trk&&prd)
65  QObject::connect(trk,SIGNAL(touchedMuonChambersChanged(const std::set<GeoPVConstLink>&)),
66  prd,SLOT(muonChambersWithTracksChanged(const std::set<GeoPVConstLink>&)));
67 
68  // labels
69 
70  if (geo&&trk) {
71  geo->enableMuonChamberLabels(true, false); //void first is t0s, 2nd is hits
72 
73  QObject::connect(trk,SIGNAL(muonChamberT0sChanged(const std::map<GeoPVConstLink, float>&, int)),
74  geo,SLOT(muonChamberT0sChanged(const std::map<GeoPVConstLink, float>&,int)));
75  }
76  //Inner Detector projections:
77  if (guides) {
78  if (prd) {
79  QObject::connect( guides,SIGNAL(applicableProjectionsChanged( InDetProjFlags::InDetProjPartsFlags,
80  InDetProjFlags::InDetProjPartsFlags,
81  InDetProjFlags::InDetProjPartsFlags )),
82  prd,SLOT(setApplicableIDProjections( InDetProjFlags::InDetProjPartsFlags,
83  InDetProjFlags::InDetProjPartsFlags,
84  InDetProjFlags::InDetProjPartsFlags )) );
85  QObject::connect( prd,SIGNAL(usedIDProjectionsChanged(InDetProjFlags::DetTypeFlags)),
86  guides,SLOT(setIDDetTypesUsingProjections(InDetProjFlags::DetTypeFlags)) );
87  }
88  if (trk) {
89  QObject::connect( guides,SIGNAL(applicableProjectionsChanged( InDetProjFlags::InDetProjPartsFlags,
90  InDetProjFlags::InDetProjPartsFlags,
91  InDetProjFlags::InDetProjPartsFlags )),
92  trk,SLOT(setApplicableIDProjections( InDetProjFlags::InDetProjPartsFlags,
93  InDetProjFlags::InDetProjPartsFlags,
94  InDetProjFlags::InDetProjPartsFlags )) );
95  QObject::connect( trk,SIGNAL(usedIDProjectionsChanged(InDetProjFlags::DetTypeFlags)),
96  guides,SLOT(setIDDetTypesUsingProjections(InDetProjFlags::DetTypeFlags)) );
97  }
98  }
99 
100  //Trigger first emissions:
101  if (guides)
103 
104  if (vtx&&trk){
105  // Colour by vertex - maybe add to setupStandardConnectionsAndOptions? FIXME!
106  QObject::connect(vtx,SIGNAL(tracksFromVertexChanged(QList< std::pair<const SoMaterial*, QList< const Trk::Track*> > >&)),
107  trk,SLOT(tracksFromVertexChanged(QList< std::pair<const SoMaterial*, QList< const Trk::Track*> > >&)));
108  }
109 }
110 
111 //____________________________________________________________________
113 {
114  bool ok;
115  unsigned nextra = VP1QtUtils::environmentVariableValue("VP1_NEXTRA_GEOSYS").toUInt ( &ok );
116  if (!ok) nextra = 0;
117 
118  //For backwards compatibility we also look at VP1_SECOND_GEOMSYS:
119  unsigned nextra_old = VP1QtUtils::environmentVariableValue("VP1_SECOND_GEOMSYS").toUInt ( &ok );
120  if (!ok) nextra_old = 0;
121  nextra += nextra_old;
122 
123  if (nextra>20)
124  nextra=20;
125 
126  QStringList l;
127  for (unsigned i=1;i<=nextra;++i)
128  l << ("AltGeo"+(i>1?QString::number(i):QString()));
129  return l;
130 }
131 
132 //____________________________________________________________________
134 {
135  bool ok;
136  unsigned nextra = VP1QtUtils::environmentVariableValue("VP1_NEXTRA_TRKSYS").toUInt ( &ok );
137  if (!ok) nextra = 0;
138 
139  if (nextra>20)
140  nextra=20;
141 
142  QStringList l;
143  for (unsigned i=1;i<=nextra;++i)
144  l << ("AltTrk"+(i>1?QString::number(i):QString()));
145  return l;
146 
147 }
148 
149 //____________________________________________________________________
151 {
152  bool ok;
153  unsigned nextra = VP1QtUtils::environmentVariableValue("VP1_NEXTRA_GUIDESYS").toUInt ( &ok );
154  if (!ok) nextra = 0;
155 
156  if (nextra>20)
157  nextra=20;
158 
159  QStringList l;
160  for (unsigned i=1;i<=nextra;++i)
161  l << ("AltGuide"+(i>1?QString::number(i):QString()));
162  return l;
163 
164 }
165 
VP1VertexSystem
Definition: VP1VertexSystem.h:16
VP1VertexSystem.h
fillPileUpNoiseLumi.connect
string connect
Definition: fillPileUpNoiseLumi.py:70
VP1QtUtils.h
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
VP1SysConf::setupStandardConnectionsAndOptions
static void setupStandardConnectionsAndOptions(VP1GuideLineSystem *, VP1GeometrySystem *, VP1TrackSystem *, VP1PrepRawDataSystem *, VP1VertexSystem *, CHANNELMODE cm=GEOMSTUDIES)
Definition: VP1SysConf.cxx:25
VP1QtUtils::environmentVariableValue
static QString environmentVariableValue(const QString &name)
Definition: VP1QtUtils.cxx:117
VP1GuideLineSystem
Definition: VP1GuideLineSystem.h:22
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
VP1SysConf::EVENTSTUDIES
@ EVENTSTUDIES
Definition: VP1SysConf.h:37
VP1GeometrySystem
Definition: VP1GeometrySystem.h:33
VP1GuideLineSystem::possiblyEmit_ApplicableProjectionsChanged
void possiblyEmit_ApplicableProjectionsChanged()
Definition: VP1GuideLineSystem.cxx:341
lumiFormat.i
int i
Definition: lumiFormat.py:85
VP1PrepRawDataSystem
Definition: VP1PrepRawDataSystem.h:26
VP1SysConf::extraGuideSystems
static QStringList extraGuideSystems()
Definition: VP1SysConf.cxx:150
VP1TrackSystem
Definition: VP1TrackSystem.h:36
VP1SysConf::extraTrackSystems
static QStringList extraTrackSystems()
Definition: VP1SysConf.cxx:133
VP1SysConf::CHANNELMODE
CHANNELMODE
Definition: VP1SysConf.h:37
python.selection.number
number
Definition: selection.py:20
VP1SysConf::extraGeometrySystems
static QStringList extraGeometrySystems()
Definition: VP1SysConf.cxx:112
VP1SysConf.h
VP1GeometrySystem.h
LArCellConditions.geo
bool geo
Definition: LArCellConditions.py:46
VP1GuideLineSystem.h
VP1PrepRawDataSystem.h
VP1TrackSystem.h