 |
ATLAS Offline Software
|
Go to the documentation of this file.
8 #include "Identifier/Identifier.h"
26 #include "CLHEP/Matrix/Vector.h"
37 m_IBLParameterSvc(
"IBLParameterSvc",
n),
40 declareInterface<IPixelToTPIDTool>(
this);
42 float energyPair = 3.68e-6;
43 float sidensity = 2.329;
62 return StatusCode::FAILURE;
69 return StatusCode::SUCCESS;
87 int& nUsedIBLOverflowHits)
const
90 unsigned int pixelhits = 0;
92 nUsedIBLOverflowHits=0;
93 float Pixel_sensorthickness=.025;
94 float IBL_3D_sensorthickness=.023;
95 float IBL_PLANAR_sensorthickness=.020;
100 std::multimap<float,int> dEdxMap;
104 if (recoTrackStates) {
109 for (; tsosIter != tsosIterEnd; ++tsosIter) {
112 if (!(*tsosIter)->trackParameters()) {
113 msg(MSG::WARNING) <<
"No track parameters available for a state of type measurement, returning -1" <<
endmsg;
114 msg(MSG::WARNING) <<
"Don't run this tool on slimmed tracks!" <<
endmsg;
133 float dotProd = (*tsosIter)->trackParameters()->momentum().dot(
134 (*tsosIter)->trackParameters()->associatedSurface().normal());
136 fabs(dotProd / (*tsosIter)->trackParameters()->momentum().mag());
138 if (std::abs(cosalpha)<0.16) {
continue; }
149 ->getFEI4OverflowToT();
152 for (
int pixToT : ToTs) {
153 if (pixToT >= overflowIBLToT) {
162 if (((eta_module >= -10 && eta_module <= -7) ||
163 (eta_module >= 6 && eta_module <= 9)) &&
168 dEdxMap.insert(std::pair<float, int>(dEdxValue, iblOverflow));
170 if (iblOverflow == 1) {
171 nUsedIBLOverflowHits++;
173 }
else if ((eta_module >= -6 && eta_module <= 5) &&
180 dEdxMap.insert(std::pair<float, int>(dEdxValue, iblOverflow));
182 if (iblOverflow == 1) {
183 nUsedIBLOverflowHits++;
191 else if(
bec==0 && fabs(locy)<30. && ((locx>-8.20 && locx<-0.60) || (locx>0.50 && locx<8.10))) {
193 dEdxMap.insert(std::pair<float,int>(dEdxValue, iblOverflow));
196 else if (std::abs(
bec)==2 && fabs(locy)<30. && ((locx>-8.15 && locx<-0.55) || (locx>0.55 && locx<8.15))) {
198 dEdxMap.insert(std::pair<float,int>(dEdxValue, iblOverflow));
207 float averagedEdx=0.;
211 for (std::pair<float,int> itdEdx : dEdxMap) {
212 if (itdEdx.second==0) {
213 averagedEdx += itdEdx.first;
216 if (itdEdx.second>0) { IBLOverflow++; }
219 if (((
int)pixelhits>=5) and ((
int)nUsedHits>=(
int)pixelhits-2)) {
break; }
222 if ((
int)IBLOverflow>0 and ((
int)pixelhits==3) and (
int)nUsedHits==1) {
break; }
223 if ((
int)IBLOverflow>0 and ((
int)pixelhits==4) and (
int)nUsedHits==2) {
break; }
225 if (((
int)pixelhits > 1) and ((
int)nUsedHits >=(
int)pixelhits-1)) {
break; }
227 if ((
int)IBLOverflow>0 and (
int)pixelhits==1) {
228 averagedEdx=itdEdx.first;
233 if (nUsedHits>0 or (nUsedHits==0 and(
int)IBLOverflow>0 and (
int)pixelhits==1)) {
234 if (nUsedHits>0) { averagedEdx=averagedEdx/nUsedHits; }
237 ATH_MSG_DEBUG(
"Used hits: " << nUsedHits <<
", IBL overflows: " << IBLOverflow );
238 ATH_MSG_DEBUG(
"Original number of measurements = " << pixelhits <<
"( map size = " << dEdxMap.size() <<
")");
248 int nGoodPixels)
const
251 ->getLikelihoods(dedx2,
p2, nGoodPixels);
258 int nGoodPixels)
const
261 ->getMass(dedx,
p / 1000, nGoodPixels);
def retrieve(aClass, aKey=None)
This is an Identifier helper class for the Pixel subdetector. This class is a factory for creating co...
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Const iterator class for DataVector/DataList.
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
virtual bool rioType(RIO_OnTrackType::Type type) const =0
Method checking the Rio On Track type.
const std::vector< int > & totList() const
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
@ Outlier
This TSoS contains an outlier, that is, it contains a MeasurementBase/RIO_OnTrack which was not used ...
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual bool type(MeasurementBaseType::Type type) const =0
Interface method checking the type.
int layer_disk(const Identifier &id) const
int eta_module(const Identifier &id) const
double charge(const T &p)
StatusCode initialize(bool used=true)
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
virtual const PixelCluster * prepRawData() const override final
returns the PrepRawData - is a SiCluster in this scope
Identifier identify() const
return the identifier -extends MeasurementBase
float totalCharge() const
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.