|
ATLAS Offline Software
|
#include <TRT_TrackSegmentsMakerCondAlg_ATLxk.h>
|
| TRT_TrackSegmentsMakerCondAlg_ATLxk (const std::string &name, ISvcLocator *pSvcLocator) |
|
virtual | ~TRT_TrackSegmentsMakerCondAlg_ATLxk ()=default |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | execute (const EventContext &ctx) const override |
|
virtual bool | isReEntrant () const override final |
|
void | printStraw (const InDetDD::TRT_BaseElement *elementCS, unsigned int strawNum) const |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual bool | isClonable () const override |
| Specify if the algorithm is clonable. More...
|
|
virtual unsigned int | cardinality () const override |
| Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
|
|
virtual StatusCode | sysExecute (const EventContext &ctx) override |
| Execute an algorithm. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
virtual bool | filterPassed (const EventContext &ctx) const |
|
virtual void | setFilterPassed (bool state, const EventContext &ctx) const |
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
◆ StoreGateSvc_t
◆ TRT_TrackSegmentsMakerCondAlg_ATLxk()
InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk::TRT_TrackSegmentsMakerCondAlg_ATLxk |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~TRT_TrackSegmentsMakerCondAlg_ATLxk()
virtual InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk::~TRT_TrackSegmentsMakerCondAlg_ATLxk |
( |
| ) |
|
|
virtualdefault |
◆ cardinality()
unsigned int AthReentrantAlgorithm::cardinality |
( |
| ) |
const |
|
overridevirtualinherited |
Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
Override this to return 0 for reentrant algorithms.
Override this to return 0 for reentrant algorithms.
Definition at line 55 of file AthReentrantAlgorithm.cxx.
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detElementInformation()
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk::execute |
( |
const EventContext & |
ctx | ) |
const |
|
overridevirtual |
Definition at line 84 of file TRT_TrackSegmentsMakerCondAlg_ATLxk.cxx.
88 if (writeHandle.isValid()) {
89 ATH_MSG_DEBUG(
"CondHandle " << writeHandle.fullKey() <<
" is already valid.");
90 return StatusCode::SUCCESS;
93 EventIDRange rangeTrt;
96 if (not trtDetEleHandle.isValid()) {
98 return StatusCode::FAILURE;
102 if (trtNum==
nullptr){
106 if (not trtDetEleHandle.range(rangeTrt)) {
107 ATH_MSG_FATAL(
"Failed to retrieve validity range for " << trtDetEleHandle.key());
108 return StatusCode::FAILURE;
111 auto writeCdo = std::make_unique<InDet::TRT_TrackSegmentsToolCondData_xk>();
112 if(writeCdo->m_ndzdr )
delete [] writeCdo->m_ndzdr ;
113 if(writeCdo->m_slope )
delete [] writeCdo->m_slope ;
114 if(writeCdo->m_islope )
delete [] writeCdo->m_islope ;
126 for(
int ring = 0; ring!=Rings; ++ring) {
130 writeCdo->m_flayers[1][ring] = writeCdo->m_nlayers[1]; writeCdo->m_flayers[2][ring] = writeCdo->m_nlayers[2];
131 writeCdo->m_nlayers[1] += NSlayers ; writeCdo->m_nlayers[2] += NSlayers ;
133 for(
int nsl=0; nsl!=NSlayers; ++nsl) {
136 for(
int f=0;
f!=NPhi; ++
f) {
140 if(!base1 || !base2)
continue;
147 if(!bael1 || !rb1 || !rb2)
continue;
153 RZ [1][
n] = std::sqrt(C1.x()*C1.x()+C1.y()*C1.y());
158 RZ [2][
n] = std::sqrt(C2.x()*C2.x()+C2.y()*C2.y());
165 for(
int s=0;
s!=
ns; ++
s) {
171 if(
f==0) rmean+=std::sqrt(sc1->x()*sc1->x()+sc1->y()*sc1->y());
173 if(!sc1 || !st1 || !tr1 ) {
ATH_MSG_ERROR(
"problem with TRT geometry");}
174 ++writeCdo->m_nstraws[1];
179 if(!sc2 || !st2 || !tr2) {
ATH_MSG_ERROR(
"problem with TRT geometry");}
180 ++writeCdo->m_nstraws[2];
182 if(
f==0) { RZ[1][
n-1] = RZ[2][
n-1] = rmean/
float(
ns);}
189 int Wheels = trtNum->
getNEndcapWheels();
if(!Wheels)
return StatusCode::SUCCESS;
192 for(
int wh = 0;
wh!=Wheels; ++
wh) {
195 writeCdo->m_flayers[0][
wh] = writeCdo->m_nlayers[0]; writeCdo->m_flayers[3][
wh] = writeCdo->m_nlayers[3];
196 writeCdo->m_nlayers[0] += NSlayers ; writeCdo->m_nlayers[3] += NSlayers ;
198 for(
int nsl = 0; nsl!=NSlayers; ++nsl) {
200 for(
int f=0;
f!=NPhi; ++
f) {
204 if(!base1 || !base2)
continue;
212 if(!enel1 || !
db1 || !
db2)
continue;
230 for(
int s=0;
s!=
ns; ++
s) {
237 if(!sc1 || !st1 || !tr1) {
ATH_MSG_ERROR(
"problem with TRT geometry");}
238 ++writeCdo->m_nstraws[0];
245 if(!sc2 || !st2 || !tr2) {
ATH_MSG_ERROR(
"problem with TRT geometry");}
246 ++writeCdo->m_nstraws[3];
252 double zmax = RZ[3][writeCdo->m_nlayers[3]-1]+10.;
253 double rmax = RZ[2][writeCdo->m_nlayers[2]-1]+10.;
257 {-2.05,-1.95,-1.84,-1.72,-1.62,-1.53,-1.43,-1.33,-1.21,-1.00,-.94, -.85,-.32,
258 .32, .85, .94, 1.00, 1.21, 1.33, 1.43, 1.53, 1.62, 1.72,1.84, 1.95,2.05};
260 std::deque<Amg::Vector3D>
G [26];
264 for(
int r=0;
r!=26; ++
r) {
266 double pinv =-1./(
m_pTmin*std::sqrt(1.+writeCdo->m_dzdr[
r]*writeCdo->m_dzdr[
r]));
267 auto trackPar = ps.createUniqueTrackParameters(
271 std::atan2(1.,
double(writeCdo->m_dzdr[
r])),
279 for(
int b=0;
b!=4; ++
b) {
280 for(
unsigned int i=0;
i!=writeCdo->m_nlayers[
b]; ++
i) {
281 writeCdo->m_begin[
b][
i] =
n;
282 for(
float r : writeCdo->m_dzdr) {
284 writeCdo->m_end[
b][
i] =
n++;
290 writeCdo->m_ndzdr =
new unsigned int[
n];
291 writeCdo->m_islope =
new int[
n];
292 writeCdo->m_slope =
new float [
n];
293 writeCdo->m_cirsize = writeCdo->m_nstraws[0]+writeCdo->m_nstraws[1];
296 for (
int b = 0;
b != 4; ++
b) {
298 for (
unsigned int i = 0;
i != writeCdo->m_nlayers[
b]; ++
i) {
300 for (
int r = 0;
r != 26; ++
r) {
301 if (writeCdo->m_dzdr[
r] >=
Tmin[
b][
i] &&
302 writeCdo->m_dzdr[
r] <=
Tmax[
b][
i]) {
303 writeCdo->m_ndzdr[
n] =
r;
305 if (
b == 0 ||
b == 3) {
308 for (++gp; gp != gpe; ++gp) {
309 if (
b == 3 && (*gp).z() >= RZ[
b][
i])
311 if (
b == 0 && (*gp).z() <= RZ[
b][
i])
318 for (++gp; gp != gpe; ++gp) {
319 if (std::sqrt((*gp).x() * (*gp).x() + (*gp).y() * (*gp).y()) >
334 double as = 1. / std::sqrt(
ax *
ax +
ay *
ay + az * az);
345 double as = 1. / std::sqrt(
ax *
ax +
ay *
ay + az * az);
352 if (
b == 0 ||
b == 3) {
353 S = (RZ[
b][
i] -
z) / az;
355 double A = (
ax *
x +
ay *
y) * 2.;
356 double D = (RZ[
b][
i] -
x -
y) * (RZ[
b][
i] +
x +
y) + 2. *
x *
y;
359 double Sq =
A *
A + 2. * D *
B;
360 Sq > 0. ? Sq = std::sqrt(Sq) : Sq = 0.;
361 double S1 = -(
A + Sq) /
B;
362 double S2 = -(
A - Sq) /
B;
368 writeCdo->m_slope[
n] = std::atan2(
y +
S *
ay,
x +
S *
ax) *
m_A;
369 writeCdo->m_islope[
n] =
int(writeCdo->m_slope[
n] *
m_Psi128);
376 if (writeHandle.record(rangeTrt, std::move(writeCdo)).isFailure()) {
378 <<
" with EventRange " << rangeTrt
379 <<
" into Conditions Store");
380 return StatusCode::FAILURE;
382 ATH_MSG_DEBUG(
"recorded new CDO " << writeHandle.key() <<
" with range "
383 << rangeTrt <<
" into Conditions Store");
385 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ extraOutputDeps()
const DataObjIDColl & AthReentrantAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 79 of file AthReentrantAlgorithm.cxx.
86 return Algorithm::extraOutputDeps();
◆ filterPassed()
virtual bool AthReentrantAlgorithm::filterPassed |
( |
const EventContext & |
ctx | ) |
const |
|
inlinevirtualinherited |
◆ initialize()
StatusCode InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk::initialize |
( |
| ) |
|
|
overridevirtual |
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ isClonable()
bool AthReentrantAlgorithm::isClonable |
( |
| ) |
const |
|
overridevirtualinherited |
Specify if the algorithm is clonable.
Reentrant algorithms are clonable.
Reimplemented in Simulation::BeamEffectsAlg, InDet::SiTrackerSpacePointFinder, InDet::SCT_Clusterization, InDet::SiSPSeededTrackFinder, SCTRawDataProvider, InDet::GNNSeedingTrackMaker, SCT_PrepDataToxAOD, RoIBResultToxAOD, SCT_CablingCondAlgFromCoraCool, SCT_ReadCalibDataTestAlg, SCT_CablingCondAlgFromText, InDet::SiSPGNNTrackMaker, SCT_ReadCalibChipDataTestAlg, SCT_TestCablingAlg, SCT_ConfigurationConditionsTestAlg, ITkPixelCablingAlg, ITkStripCablingAlg, SCTEventFlagWriter, SCT_ConditionsSummaryTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_TdaqEnabledTestAlg, SCT_SiliconConditionsTestAlg, SCTSiLorentzAngleTestAlg, SCT_ByteStreamErrorsTestAlg, SCT_ConditionsParameterTestAlg, SCT_FlaggedConditionTestAlg, SCT_StripVetoTestAlg, SCT_RawDataToxAOD, and SCTSiPropertiesTestAlg.
Definition at line 44 of file AthReentrantAlgorithm.cxx.
◆ isReEntrant()
virtual bool InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk::isReEntrant |
( |
| ) |
const |
|
inlinefinaloverridevirtual |
◆ magneticFieldInit()
void InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk::magneticFieldInit |
( |
| ) |
|
|
private |
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ printStraw()
◆ renounce()
◆ renounceArray()
◆ setFilterPassed()
virtual void AthReentrantAlgorithm::setFilterPassed |
( |
bool |
state, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
inlinevirtualinherited |
◆ sysExecute()
StatusCode AthReentrantAlgorithm::sysExecute |
( |
const EventContext & |
ctx | ) |
|
|
overridevirtualinherited |
Execute an algorithm.
We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.
Definition at line 67 of file AthReentrantAlgorithm.cxx.
69 return Gaudi::Algorithm::sysExecute (ctx);
◆ sysInitialize()
StatusCode AthReentrantAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
Override sysInitialize.
Override sysInitialize from the base class.
Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc
Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc
Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.
Reimplemented in InputMakerBase, and HypoBase.
Definition at line 96 of file AthReentrantAlgorithm.cxx.
107 if ( cs.retrieve().isFailure() ) {
109 return StatusCode::SUCCESS;
111 if (cs->regHandle(
this,*
h).isFailure()) {
112 sc = StatusCode::FAILURE;
113 ATH_MSG_ERROR(
"unable to register WriteCondHandle " <<
h->fullKey()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_A
float InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk::m_A {} |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthReentrantAlgorithm::m_extendedExtraObjects |
|
privateinherited |
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Empty if no symlinks were found.
Definition at line 153 of file AthReentrantAlgorithm.h.
◆ m_fieldmode
std::string InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk::m_fieldmode |
|
private |
◆ m_fieldprop
◆ m_nMom
int InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk::m_nMom |
|
private |
◆ m_nPhi
int InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk::m_nPhi {} |
|
private |
◆ m_propTool
ToolHandle<Trk::IPropagator> InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk::m_propTool |
|
private |
◆ m_Psi
float InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk::m_Psi {} |
|
private |
◆ m_Psi128
float InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk::m_Psi128 {} |
|
private |
◆ m_pTmin
float InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk::m_pTmin |
|
private |
◆ m_trtDetEleContKey
◆ m_trtid
const TRT_ID* InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk::m_trtid {} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_writeKey
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
JetConstituentVector::iterator iterator
struct TBPatternUnitContext S1
Trk::MagneticFieldProperties m_fieldprop
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
unsigned int nStraws() const
Number of straws in the element.
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
const Amg::Vector3D & strawCenter(int straw) const
Straw Surface: Local -> global transform of the straw via integer.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
@ FastField
call the fast field access method of the FieldSvc
unsigned int getNEndcapWheels() const
SG::ReadCondHandleKey< InDetDD::TRT_DetElementContainer > m_trtDetEleContKey
AthReentrantAlgorithm()
Default constructor:
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
ToolHandle< Trk::IPropagator > m_propTool
Eigen::Affine3d Transform3D
unsigned int getNBarrelPhi() const
unsigned int getNBarrelLayers(unsigned int iMod) const
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
@ FullField
Field is set to be realistic, but within a given Volume.
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
@ NoField
Field is set to 0., 0., 0.,.
virtual StatusCode sysInitialize() override
Override sysInitialize.
double halflengthY() const
for consitant naming
StatusCode initialize(bool used=true)
Eigen::Matrix< double, 3, 1 > Vector3D
virtual const Trk::SurfaceBounds & bounds() const override final
Straw layer bounds.
const Amg::Transform3D & strawTransform(unsigned int straw) const
Straw transform - fast access in array, in Tracking frame: Amg.
#define ATH_MSG_WARNING(x)
virtual const Amg::Vector3D & center() const override final
Element Surface: center of a straw layer.
struct TBPatternUnitContext S2
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
unsigned int getNEndcapPhi() const
unsigned int getNEndcapLayers(unsigned int iWheel) const
unsigned int getNBarrelRings() const
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
virtual const Trk::Surface & surface() const override final
Element Surface: access to the Surface (straw layer)
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
SG::WriteCondHandleKey< TRT_TrackSegmentsToolCondData_xk > m_writeKey
Identifier straw_id(int barrel_ec, int phi_module, int layer_or_wheel, int straw_layer, int straw) const
Three ways of getting id for a single straw: