CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 
13  LogDebug("HitBuildInfo")<< " TrackingSlaveSD " << name_;
14 
15 }
16 
18 {}
19 
21 
22 
23  LogDebug("HitBuildInfo")<< " initialize TrackingSlaveSD "<< name_;
24 
25  hits_.clear();
26 }
27 /*
28 void TrackingSlaveSD::renumbering(const SimTrackManager* tkManager){
29  //
30  // Now renumber the Hits
31  //
32  edm::LogInfo("TrackRenumberingInfo")<< " TrackingSlaveSD "<<name()<<" renumbering " << hits_.size() <<" hits.";
33  //
34  // now I loop over PSimHits and change the id inside
35  //
36  for(TrackingSlaveSD::Collection::const_iterator it = begin(); it!= end(); it++){
37  PSimHit& temp = const_cast<PSimHit&>(*it);
38  unsigned int nt = tkManager->g4ToSim(temp.trackId());
39 
40  LogDebug("TrackRenumberingInfo")<<" Studying PSimHit " << temp
41  <<" Changing TrackID from " << temp.trackId()
42  <<" with " << nt;
43 
44  setTrackId( temp, nt);
45  }
46 
47 }
48 */
50 {
51 
52  LogDebug("HitBuildInfo")<< " TrackingSlaveSD " << name_<< " formatting " << hits_.size() << " hits.";
53 
54  return true;
55 }
56 
58 {
59 
60  LogDebug("HitBuildInfo")<<" Sent Hit " << ps << " to ROU " << name_;
61 
62  hits_.push_back(ps);
63  return true;
64 }
65 
67 { hit.theTrackId = k; }
68 
69 
#define LogDebug(id)
unsigned int theTrackId
Definition: PSimHit.h:140
void setTrackId(PSimHit &hit, unsigned int k)
std::vector< PSimHit > hits_
virtual void Initialize()
int k[5][pyjets_maxn]
TrackingSlaveSD(std::string)
virtual bool format()
virtual bool processHits(const PSimHit &)
tuple cout
Definition: gather_cfg.py:121
std::string name_
virtual ~TrackingSlaveSD()