11 for (
unsigned int i=0;
i<simtracks->size();++
i){
12 (*simtracks)[
i].setEventId(
id);
13 if (!(*simtracks)[
i].noVertex())
14 (*simtracks)[
i].setVertexIndex((*simtracks)[
i].vertIndex()+vertexoffset);
15 pileups_.push_back(&((*simtracks)[
i]));
23 for (
unsigned int i=0;
i<simvertices->size();++
i) {
24 (*simvertices)[
i].setEventId(
id);
25 (*simvertices)[
i].setTof((*simvertices)[
i].
position().
t()+bcr*bunchSpace_);
26 pileups_.push_back(&((*simvertices)[
i]));
35 for (
unsigned int i=0;
i<simhits->size();++
i) {
36 (*simhits)[
i].setEventId(
id);
37 (*simhits)[
i].setTof((*simhits)[
i].
timeOfFlight() + bcr*bunchSpace_);
38 pileups_.push_back(&((*simhits)[
i]));
46 for (
unsigned int i=0;
i<calohits->size();++
i) {
47 PCaloHit hit((*calohits)[
i].
id(),(*calohits)[
i].energyEM(),(*calohits)[
i].energyHad(),(*calohits)[
i].
time()+bcr*bunchSpace_,(*calohits)[
i].geantTrackId());
48 (*calohits)[
i].setEventId(
id);
49 (*calohits)[
i].setTime((*calohits)[
i].
time()+bcr*bunchSpace_);
50 pileups_.push_back(&((*calohits)[
i]));
static int position[TOTALCHAMBERS][3]
void addPileups(const int bcr, std::vector< T > *vec, unsigned int evtId, int vertexoffset=0)
double timeOfFlight(DetId id, const CaloGeometry *geo, bool debug=false)