CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Adjuster.cc
Go to the documentation of this file.
1 #include "Adjuster.h"
3 
4 namespace edm {
5 namespace detail {
6 void doTheOffset(int bunchSpace, int bcr, std::vector<SimTrack>& simtracks, unsigned int evtNr, int vertexOffset) {
7 
8  EncodedEventId id(bcr,evtNr);
9  for (auto& item : simtracks) {
10  item.setEventId(id);
11  if (!item.noVertex()) {
12  item.setVertexIndex(item.vertIndex() + vertexOffset);
13  }
14  }
15 }
16 
17 void doTheOffset(int bunchSpace, int bcr, std::vector<SimVertex>& simvertices, unsigned int evtNr, int vertexOffset) {
18 
19  int timeOffset = bcr * bunchSpace;
20  EncodedEventId id(bcr,evtNr);
21  for (auto& item : simvertices) {
22  item.setEventId(id);
23  item.setTof(item.position().t() + timeOffset);
24  }
25 }
26 
27 void doTheOffset(int bunchSpace, int bcr, std::vector<PSimHit>& simhits, unsigned int evtNr, int vertexOffset) {
28 
29  int timeOffset = bcr * bunchSpace;
30  EncodedEventId id(bcr,evtNr);
31  for (auto& item : simhits) {
32  item.setEventId(id);
33  item.setTof(item.timeOfFlight() + timeOffset);
34  }
35 }
36 
37 void doTheOffset(int bunchSpace, int bcr, std::vector<PCaloHit>& calohits, unsigned int evtNr, int vertexOffset) {
38 
39  int timeOffset = bcr * bunchSpace;
40  EncodedEventId id(bcr,evtNr);
41  for (auto& item : calohits) {
42  item.setEventId(id);
43  item.setTime(item.time() + timeOffset);
44  }
45 }
46 }
47 }
void doTheOffset(int bunchSpace, int bcr, std::vector< SimTrack > &simtracks, unsigned int evtNr, int vertexOffset)
Definition: Adjuster.cc:6