Changeset 5 in Idarraga for SLHCVP1TrackVis
- Timestamp:
- Nov 24, 2010, 6:15:51 PM (14 years ago)
- Location:
- SLHCVP1TrackVis/SLHCVP1Systems/src
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
SLHCVP1TrackVis/SLHCVP1Systems/src/SLHCVP1TraceTracks.cxx
r2 r5 22 22 23 23 void SLHCVP1TrackSystem::TraceTracks(const TrackCollection * trackColl, SoSeparator * root){ 24 25 // A separator for the labels 26 SoSeparator * tracksSep = new SoSeparator; 24 27 25 28 TrackCollection::const_iterator trackItr, trackItrEnd = trackColl->end(); … … 65 68 66 69 sw->addChild(line); 67 root->addChild(sw);70 tracksSep->addChild(sw); 68 71 69 72 //Bookkeep which track this 3D object corresponds to (we will need this to display track info when the user clicks): … … 71 74 72 75 //To avoid GUI freeze-ups: 73 updateGUI();76 //updateGUI(); 74 77 } 75 78 76 79 root->addChild(tracksSep); 77 80 } -
SLHCVP1TrackVis/SLHCVP1Systems/src/SLHCVP1TraceTruth.cxx
r2 r5 45 45 46 46 // A separator for the labels 47 SoGroup * textGroup = new SoGroup; 48 textGroup->ref(); 47 SoSeparator * textGroup = new SoSeparator; 49 48 50 49 // Get the GenEvent … … 118 117 119 118 // 2D text, added to a Separator. 120 121 119 SoTranslation * trans = new SoTranslation; 122 120 CalcTranslation(endx, endy, endz); … … 132 130 textGroup->addChild(text); 133 131 134 //To avoid GUI freeze-ups:135 updateGUI();136 nParticles++;137 138 132 // Store this new position, is going to be the old one 139 133 // in the next iteration … … 141 135 m_translationArray[_TRANS_INFO_X1][_TRANS_ARR_Y] = endy; 142 136 m_translationArray[_TRANS_INFO_X1][_TRANS_ARR_Z] = endz; 137 nParticles++; 138 143 139 } 144 140 -
SLHCVP1TrackVis/SLHCVP1Systems/src/SLHCVP1TrackSystem.cxx
r2 r5 26 26 #include "HepMC/GenVertex.h" 27 27 28 #include "InDetSimEvent/SiHitCollection.h" 28 29 #include "GeneratorObjects/McEventCollection.h" 29 30 … … 37 38 //declareProperty("McEventCollectionKey", m_McEventCollectionKey="TruthEvent"); 38 39 m_McEventCollectionKey="TruthEvent"; 40 m_SiHitCollKey= "PixelHits"; 41 m_SiClusterContKey = "PixelClusters"; 39 42 40 43 // Only for plotting purposes. End point of non decaying particles. … … 69 72 const TrackCollection *trackColl; 70 73 std::string trackname="Tracks"; 71 StatusCode status 1= sg->retrieve(trackColl, trackname);72 if (status 1!= StatusCode::SUCCESS || !trackColl) {74 StatusCode status = sg->retrieve(trackColl, trackname); 75 if (status != StatusCode::SUCCESS || !trackColl) { 73 76 message("Error: Could not retrieve track collection (used key="+QString(trackname.c_str())+")"); 74 77 }else{ … … 80 83 //sg->dump(); <-- don't call StoreGate::dump() here, VP1 freaks out, why ? 81 84 const McEventCollection * McEventColl; 82 StatusCode status2= sg->retrieve(McEventColl, m_McEventCollectionKey);83 if (status 2!= StatusCode::SUCCESS || !McEventColl) {85 status = sg->retrieve(McEventColl, m_McEventCollectionKey); 86 if (status != StatusCode::SUCCESS || !McEventColl) { 84 87 message("Could not find the McEventCollection"); 85 88 }else{ 86 89 TraceTruth(McEventColl, root); 87 90 } 91 92 ///////////////////////////////////////////////////////////////////////// 93 // Pixels, hits and clusters 94 const SiHitCollection * SiHitColl; 95 const InDet::SiClusterContainer * SiClusterCont; 96 97 status = sg->retrieve(SiHitColl, m_SiHitCollKey); 98 StatusCode status2 = sg->retrieve(SiClusterCont, m_SiClusterContKey); 99 100 if (status != StatusCode::SUCCESS || !SiHitColl || status2 != StatusCode::SUCCESS || !SiClusterCont) { 101 message("Could not find the SiHitCollection or SiClusterContainer"); 102 }else{ 103 DrawPixels(SiHitColl, SiClusterCont, root); 104 } 105 106 //To avoid GUI freeze-ups: 107 updateGUI(); 88 108 89 109 return; … … 155 175 156 176 switch(TMath::Abs(pdgid)) { 177 case(0): 178 string = "(*)"; 179 break; 157 180 case(11): 158 181 string = "e(11)"; … … 171 194 break; 172 195 case(211): 173 string = "pi+/-"; 196 string = "pi+"; 197 break; 198 case(-211): 199 string = "pi-"; 174 200 break; 175 201 default:
Note: See TracChangeset
for help on using the changeset viewer.