SimDataFormats
SimHitMaker
src
TrackingSlaveSD.cc
Go to the documentation of this file.
1
#include "
SimDataFormats/SimHitMaker/interface/TrackingSlaveSD.h
"
2
//#include "SimG4Core/Application/interface/SimTrackManager.h"
3
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
4
5
#include <iostream>
6
//#define DEBUG
7
8
using
std::cout
;
9
using
std::endl;
10
11
TrackingSlaveSD::TrackingSlaveSD
(
std::string
myName) : name_(myName) {
12
LogDebug
(
"HitBuildInfo"
) <<
" TrackingSlaveSD "
<<
name_
;
13
}
14
15
TrackingSlaveSD::~TrackingSlaveSD
() {}
16
17
void
TrackingSlaveSD::Initialize
() {
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
*/
46
bool
TrackingSlaveSD::format
() {
47
LogDebug
(
"HitBuildInfo"
) <<
" TrackingSlaveSD "
<<
name_
<<
" formatting "
<<
hits_
.size() <<
" hits."
;
48
49
return
true
;
50
}
51
52
bool
TrackingSlaveSD::processHits
(
const
PSimHit
&ps) {
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
; }
TrackingSlaveSD::setTrackId
void setTrackId(PSimHit &hit, unsigned int k)
Definition:
TrackingSlaveSD.cc:59
MessageLogger.h
TrackingSlaveSD::hits_
std::vector< PSimHit > hits_
Definition:
TrackingSlaveSD.h:28
TrackingSlaveSD::name_
std::string name_
Definition:
TrackingSlaveSD.h:32
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
TrackingSlaveSD.h
TrackingSlaveSD::TrackingSlaveSD
TrackingSlaveSD(std::string)
Definition:
TrackingSlaveSD.cc:11
dqmdumpme.k
k
Definition:
dqmdumpme.py:60
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
TrackingSlaveSD::Initialize
virtual void Initialize()
Definition:
TrackingSlaveSD.cc:17
LogDebug
#define LogDebug(id)
Definition:
MessageLogger.h:670
TrackingSlaveSD::processHits
virtual bool processHits(const PSimHit &)
Definition:
TrackingSlaveSD.cc:52
TrackingSlaveSD::~TrackingSlaveSD
virtual ~TrackingSlaveSD()
Definition:
TrackingSlaveSD.cc:15
PSimHit
Definition:
PSimHit.h:15
hit
Definition:
SiStripHitEffFromCalibTree.cc:88
TrackingSlaveSD::format
virtual bool format()
Definition:
TrackingSlaveSD.cc:46
Generated for CMSSW Reference Manual by
1.8.16