CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TrackingSlaveSD.cc
Go to the documentation of this file.
2 //#include "SimG4Core/Application/interface/SimTrackManager.h"
4 
5 #include <iostream>
6 //#define DEBUG
7 
8 using std::cout;
9 using std::endl;
10 
12  LogDebug("HitBuildInfo") << " TrackingSlaveSD " << name_;
13 }
14 
16 
18  LogDebug("HitBuildInfo") << " initialize TrackingSlaveSD " << name_;
19 
20  hits_.clear();
21 }
22 /*
23 void TrackingSlaveSD::renumbering(const SimTrackManager* tkManager){
24  //
25  // Now renumber the Hits
26  //
27  edm::LogInfo("TrackRenumberingInfo")<< " TrackingSlaveSD "<<name()<<"
28 renumbering " << hits_.size() <<" hits.";
29  //
30  // now I loop over PSimHits and change the id inside
31  //
32  for(TrackingSlaveSD::Collection::const_iterator it = begin(); it!= end();
33 it++){ PSimHit& temp = const_cast<PSimHit&>(*it); unsigned int nt =
34 tkManager->g4ToSim(temp.trackId());
35 
36  LogDebug("TrackRenumberingInfo")<<" Studying PSimHit " << temp
37  <<" Changing TrackID from " <<
38 temp.trackId()
39  <<" with " << nt;
40 
41  setTrackId( temp, nt);
42  }
43 
44 }
45 */
47  LogDebug("HitBuildInfo") << " TrackingSlaveSD " << name_ << " formatting " << hits_.size() << " hits.";
48 
49  return true;
50 }
51 
53  LogDebug("HitBuildInfo") << " Sent Hit " << ps << " to ROU " << name_;
54 
55  hits_.push_back(ps);
56  return true;
57 }
58 
59 void TrackingSlaveSD::setTrackId(PSimHit &hit, unsigned int k) { hit.theTrackId = k; }
unsigned int theTrackId
Definition: PSimHit.h:140
void setTrackId(PSimHit &hit, unsigned int k)
std::vector< PSimHit > hits_
virtual void Initialize()
TrackingSlaveSD(std::string)
virtual bool format()
virtual bool processHits(const PSimHit &)
tuple cout
Definition: gather_cfg.py:144
std::string name_
virtual ~TrackingSlaveSD()
#define LogDebug(id)