ATLAS Offline Software
collSet.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "FPTracker/collSet.h"
6 #include "FPTracker/Collimator.h"
8 #include "FPTracker/STLHelpers.h"
9 #include <algorithm>
10 #include <iostream>
11 namespace FPTracker{
12 
14 
15  Collimator::Container_t collimators;
16  int ncoll = CollimatorData::ncoll;
17  double zsign = side == beam2 ? -1.:1.;
18  for(int i =0; i<ncoll; ++i){
19 
20  double zpos = zsign*cData.coll_z[side][i];
21  Collimator::Ptr_t col(new Collimator(zpos, cData.coll_xap[side][i], side));
22  // std::cout<<*col<<std::endl;
23  collimators.push_back(col);
24 
25  }
26 
27  std::sort(collimators.begin(), collimators.end(), absZGreater<Collimator::ConstPtr_t>);
28  return collimators;
29  }
30 
31 }
FPTracker::CollimatorData::ncoll
static const int ncoll
Definition: FPTracker/FPTracker/CollimatorData.h:15
STLHelpers.h
FPTracker::collSet
Collimator::Container_t collSet(const CollimatorData &, Side)
Definition: collSet.cxx:13
TRT::Hit::side
@ side
Definition: HitInfo.h:83
CollimatorData.h
FPTracker::Collimator::Container_t
std::vector< Ptr_t > Container_t
Definition: FPTracker/FPTracker/Collimator.h:41
FPTracker::CollimatorData::coll_xap
std::vector< std::vector< double > > coll_xap
Definition: FPTracker/FPTracker/CollimatorData.h:17
FPTracker::beam2
@ beam2
Definition: FPTrackerConstants.h:12
lumiFormat.i
int i
Definition: lumiFormat.py:85
Side
Definition: WaferTree.h:36
FPTracker::Collimator
Definition: FPTracker/FPTracker/Collimator.h:20
query_example.col
col
Definition: query_example.py:7
Collimator.h
FPTracker::Collimator::Ptr_t
std::shared_ptr< Collimator > Ptr_t
Definition: FPTracker/FPTracker/Collimator.h:40
collSet.h
FPTracker
Definition: FPTracker/FPTracker/Beamline.h:12
FPTracker::CollimatorData
Definition: FPTracker/FPTracker/CollimatorData.h:13
FPTracker::CollimatorData::coll_z
std::vector< std::vector< double > > coll_z
Definition: FPTracker/FPTracker/CollimatorData.h:16