16#include "Identifier/Identifier.h"
26#include "CLHEP/Units/SystemOfUnits.h"
31#define MYDEBUG() std::cout<<__FILE__<<" "<<__func__<<" "<<__LINE__<<std::endl
48 declareInterface<ITrkMaterialProviderTool>(
this);
96 return StatusCode::FAILURE;
103 ATH_MSG_ERROR(
"Unable to retrieve MuonSpectrometerEntryLayer volume");
104 return StatusCode::FAILURE;
109 ATH_MSG_ERROR(
"Unable to retrieve CalorimeterEntryLayer volume");
110 return StatusCode::FAILURE;
118 return StatusCode::SUCCESS;
126 return StatusCode::SUCCESS;
133 ATH_MSG_VERBOSE(
"updateCaloTSOS(Trk::Track& track, const Trk::TrackParameters* startParameters)");
139 auto inputTSOS = std::make_unique<Trk::TrackStates>();
141 inputTSOS->push_back (tsos->clone());
153 for(; it!=itEnd; ++it) {
161 if(firstCALO==inputTSOS->end() && this->getVolumeByGeo(*it)==2 && firstMS==itEnd)
163 else if(this->
getVolumeByGeo(*it)==3 && firstCALO!=inputTSOS->end()) {
166 if((*it)->trackParameters() && (*it)->trackParameters()->covariance()) {
174 if(lastIDwP != inputTSOS->end()) {
178 startParameters = (*lastIDwP)->trackParameters();
181 if(lastIDwP == inputTSOS->end() && !startParameters) {
182 ATH_MSG_WARNING(
"Unable to find starting parameters for extrapolation");
186 if(firstCALO == inputTSOS->end()) {
190 if(firstMS == inputTSOS->end()) {
200 firstMSnotPerigee=firstMS+1;
206 printTSOS(*firstMSnotPerigee,
"FIRST MS");
209 double X0ScaleMS = 0.;
210 double ElossScaleMS = 0.;
214 (*firstMSnotPerigee)->surface(),
217 Eloss, X0ScaleMS, ElossScaleMS,
218 (firstMSwP == inputTSOS->end()) ?
nullptr : (*firstMSwP)->trackParameters(),
222 if(!caloTSOS || caloTSOS->
size()!=3) {
223 ATH_MSG_WARNING(
"Unable to retrieve Calorimeter TSOS from extrapolateM (null or <3)");
230 for(
auto m : *inputTSOS) this->
printTSOS(m,
"OLD TSOS");
234 this->
updateVectorMS(inputTSOS.get(),firstMS,X0ScaleMS,ElossScaleMS);
237 track.setTrackStateOnSurfaces (std::move (inputTSOS));
245 ATH_MSG_VERBOSE(
"updateCaloTSOS(Trk::Track& idTrack, Trk::Track& extrapolatedTrack)");
250 auto inputTSOS_MS = std::make_unique<Trk::TrackStates>();
252 inputTSOS_MS->push_back (tsos->clone());
261 if(this->
getVolumeByGeo(*itID)==1 && (*itID)->trackParameters()) {
265 if(itID==itFront)
break;
275 for(; it!=itEnd; ++it) {
281 if(firstCALO==inputTSOS_MS->end() && this->getVolumeByGeo(*it)==2)
286 if((*it)->trackParameters() && (*it)->trackParameters()->covariance()) {
293 if(firstCALO == inputTSOS_MS->end()) {
297 if(lastIDwP == inputTSOS_ID->
end()) {
302 if(firstMS == inputTSOS_MS->end()) {
312 firstMSnotPerigee=firstMS+1;
319 printTSOS(*firstMSnotPerigee,
"FIRST MS");
320 if(firstMSwP != inputTSOS_MS->end())
326 double X0ScaleMS = 0.;
327 double ElossScaleMS = 0.;
331 (*firstMSnotPerigee)->surface(),
334 Eloss, X0ScaleMS, ElossScaleMS,
335 (firstMSwP == inputTSOS_MS->end()) ?
nullptr : (*firstMSwP)->trackParameters(),
340 if(!caloTSOS || caloTSOS->
size()!=3) {
341 ATH_MSG_WARNING(
"Unable to retrieve Calorimeter TSOS from extrapolateM (null or <3)");
348 for(
auto m : *inputTSOS_ID)
printTSOS(m,
"ID TSOS");
349 ATH_MSG_VERBOSE(
"OLD-MS TSOS multiplicity : " << inputTSOS_MS->size());
350 for(
auto m : *inputTSOS_MS)
printTSOS(m,
"OLD-MS TSOS");
354 this->
updateVectorMS(inputTSOS_MS.get(),firstMS,X0ScaleMS,ElossScaleMS);
366 std::vector<MaterialEffectsOnTrack>& calomeots)
const
368 ATH_MSG_VERBOSE(
"getCaloMEOT(const Trk::Track& idTrack, const Trk::Track& msTrack, std::vector<MaterialEffectsOnTrack>& calomeots)");
374 for(
auto m : *inputTSOS_ID)
printTSOS(m,
"TSOS ID TRACK");
375 for(
auto m : *inputTSOS_MS)
printTSOS(m,
"TSOS MS TRACK");
380 for (
auto it = inputTSOS_ID->
rbegin(); it != inputTSOS_ID->
rend(); ++it) {
387 if(lastIDwP == inputTSOS_ID->
rend()) {
397 for(
auto it = inputTSOS_MS->
begin(); it!=itEnd ; ++it) {
401 if((*it)->trackParameters() && (*it)->trackParameters()->covariance()) {
408 if(firstMS == inputTSOS_MS->
end()) {
417 firstMSnotPerigee=firstMS+1;
422 printTSOS(*firstMSnotPerigee,
"FIRST MS");
423 if(firstMSwP != inputTSOS_MS->
end())
426 ATH_MSG_WARNING(
"Unable to find first MS TSOS with Track Parameters!");
431 const EventContext& ctx = Gaudi::Hive::currentContext();
435 if (fieldCondObj ==
nullptr) {
442 double X0ScaleMS = 0.;
443 double ElossScaleMS = 0.;
447 fieldCache.
toroidOn() ? msTrack : idTrack,
448 (*firstMSnotPerigee)->surface(),
451 Eloss, X0ScaleMS, ElossScaleMS,
452 (firstMSwP == inputTSOS_MS->
end()) ?
nullptr : (*firstMSwP)->trackParameters(),
456 if (!caloTSOS || caloTSOS->
size() != 3)
461 if ((!fieldCache.
toroidOn() && idqOverP * 4000. < 1) || (fieldCache.
toroidOn() && msqOverP != 1 / 100000. && msqOverP != 0))
465 ATH_MSG_WARNING(
" Toroid off q*momentum of ID track " << 1. / idqOverP);
467 ATH_MSG_WARNING(
" Toroid on q*momentum of MS track " << 1. / msqOverP);
468 ATH_MSG_WARNING(
"Unable to retrieve Calorimeter TSOS from extrapolateM+aggregation (null or !=3)");
470 ATH_MSG_WARNING(
" Zero Calorimeter TSOS from extrapolateM+aggregation");
472 ATH_MSG_WARNING(
" nr Calorimeter TSOS from extrapolateM+aggregation not equal to 3 " << caloTSOS->
size());
481 for (
auto && i : *caloTSOS){
484 throw std::logic_error(
"TrackStateOnSurface without material effects on track." );
486 double sintheta=std::sin(i->trackParameters()->parameters()[
Trk::theta]);
487 double qoverp=i->trackParameters()->parameters()[
Trk::qOverP];
491 std::unique_ptr<Trk::EnergyLoss> neweloss=
nullptr;
492 std::optional<Trk::ScatteringAngles> newsa= std::nullopt;
493 if (eloss) neweloss = std::make_unique<CaloEnergy>(*eloss);
496 double sigmascat = std::abs(qoverp)>0.0 ? std::sqrt(
m_scattool->sigmaSquare(matprop,std::abs(1./qoverp),1.,
Trk::muon)) : 0.0;
503 i->trackParameters()->associatedSurface());
504 calomeots.push_back(newmeot);
513std::vector<const Trk::TrackStateOnSurface*>*
517 std::vector<const Trk::TrackStateOnSurface*>* caloTSOS =
new std::vector<const Trk::TrackStateOnSurface*>();
520 const EventContext& ctx = Gaudi::Hive::currentContext();
523 if(!trackingGeometry) {
532 targetVolume = trackingGeometry->
trackingVolume(
"MuonSpectrometerEntrance");
534 ATH_MSG_WARNING(
"Unable to get target volume for calo material collection!");
537 ATH_MSG_VERBOSE(
"TP inside ID -> extrapolating TP "<<parm<<
" to MS entry volume "<<*targetVolume);
542 targetVolume = trackingGeometry->
trackingVolume(
"InDet::Containers::InnerDetector");
544 ATH_MSG_WARNING(
"Unable to get target volume for calo material collection!");
547 ATH_MSG_VERBOSE(
"TP inside MS -> extrapolating TP "<<parm<<
" to ID exit volume "<<*targetVolume);
552 targetVolume = trackingGeometry->
trackingVolume(
"InDet::Containers::InnerDetector");
554 ATH_MSG_WARNING(
"Unable to get target volume for calo material collection!");
557 ATH_MSG_DEBUG(
"TP inside CALO or between CALO and MS -> assuming ID as target : "<<*targetVolume);
568 for(; it!=itEnd; ++it) {
570 if((*it)->trackParameters() && (*it)->trackParameters()->covariance()) {
571 parms = (*it)->trackParameters();
585 double X0ScaleMS = 0.;
586 double ElossScaleMS = 0.;
593 Eloss, X0ScaleMS, ElossScaleMS,
599 ATH_MSG_DEBUG(
" go to Beam Line destination surface position radius " << surface.
center().perp() <<
" z " << surface.
center().z());
602 for(
unsigned int i=0; i<caloTSOSdv->
size(); ++i)
603 caloTSOS->push_back(caloTSOSdv->
get(i));
614 double Eloss_previous = 0.;
615 for (
auto& boundaryCandidate : boundaryIntersections){
619 if(!surfaceTV)
continue;
624 double X0ScaleMS = 0.;
625 double ElossScaleMS = 0.;
632 Eloss, X0ScaleMS, ElossScaleMS,
637 if(caloTSOSdv&&Eloss>Eloss_previous) {
643 ATH_MSG_DEBUG(
" getCaloTSOS: Previous solution had Eloss " << Eloss_previous <<
" latest " << Eloss);
647 for(
unsigned int i=0; i<caloTSOSdv->
size(); ++i)
648 caloTSOS->push_back(caloTSOSdv->
get(i));
669 double& ElossScaleMS,
672 bool removeOoC)
const
674 const EventContext& ctx = Gaudi::Hive::currentContext();
675 bool fremoveMS =
false;
676 if(!removeOoC) fremoveMS =
true;
678 ATH_MSG_DEBUG(
"Retrieving Calorimeter TSOS from extrapolateM (dir=" << dir <<
") with starting parameters : "
679 << parm <<
" to surface "<<surf);
680 if(parms)
ATH_MSG_DEBUG(
"Parameters in MS provided : "<< *parms);
682 double pOri = parm.
momentum().mag();
685 std::vector<const Trk::TrackStateOnSurface*>* caloTSOS =
m_muonExtrapolator->extrapolateM(ctx,
691 ATH_MSG_DEBUG(
"Retrieved " << caloTSOS->size() <<
" Calorimeter TSOS from extrapolateM, no-removal");
694 ATH_MSG_DEBUG(
"Retrieved " << caloTSOS->size() <<
" Calorimeter TSOS from extrapolateM, no-removal");
695 for(
auto m : *caloTSOS) this->
printTSOS(m,
"BEFORE-REMOVAL CALO TSOS");
701 double ElossCalo = 0.;
703 for(
const auto *m : *caloTSOS) {
704 if(m->materialEffectsOnTrack()) {
711 Eloss += std::abs(energyLoss->
deltaE());
720 ATH_MSG_DEBUG(
"Total Eloss on TSOS from extrapolateM " << Eloss <<
" ElossID " << ElossID <<
" ElossMS " << ElossMS <<
" Elosscalo " << ElossCalo);
721 if(fremoveMS)
ATH_MSG_DEBUG(
" ID Eloss will be added to Calo Eloss " << ElossID+ElossCalo);
727 ATH_MSG_DEBUG(
"Retrieved " << caloTSOS->size() <<
" Calorimeter TSOS from extrapolateM");
729 if(fremoveMS && !caloTSOS->empty())
removeMS(caloTSOS);
730 ATH_MSG_DEBUG(
"Retrieved " << caloTSOS->size() <<
" Calorimeter TSOS from extrapolateM");
733 for(
auto m : *caloTSOS) this->
printTSOS(m,
"ORIGINAL CALO TSOS");
738 if(caloTSOS->empty() || Eloss<=0) {
740 ATH_MSG_WARNING(
"Unable to retrieve Calorimeter TSOS from extrapolateM caloTSOS->size() "<< caloTSOS->size() <<
" Eloss " << Eloss );
747 return finalCaloTSOS;
751 double X0ScaleCALO=1.0;
752 double ElossScaleCALO=1.0;
757 if(!tsosAtCaloExit) {
758 ATH_MSG_WARNING( name() <<
" Unable to find Calorimeter Exit TSOS with TrackParameters! No TG Scaling applied!" );
763 X0ScaleCALO, ElossScaleCALO);
767 X0ScaleMS, ElossScaleMS);
770 ATH_MSG_DEBUG(
"Eloss/X0 scaling corrections set to : " << ElossScaleCALO <<
" " << X0ScaleCALO);
774 double pAtCaloEntry = 0;
776 double OneOverP = std::abs(parm.parameters()[
Trk::qOverP]);
778 pAtCaloEntry = 1./OneOverP;
780 pAtCaloEntry = parm.
momentum().norm();
783 if(!tsosAtCaloEntry) {
784 ATH_MSG_WARNING( name() <<
" Unable to find Calorimeter Entry TSOS with TrackParameters! Momentum at Calo Entry not available!" );
788 pAtCaloEntry = 1./OneOverP;
798 if(!tsosAtCaloExit) {
799 ATH_MSG_DEBUG(
"Unable to find Calorimeter Exit TSOS with TrackParameters! Momentum at MS not available!" );
802 ATH_MSG_DEBUG(
"MS track parameters taken from calorimeter TSOS");
807 double pAtMuonEntryError = 0.0;
809 if( std::abs(parms->parameters()[
Trk::qOverP]) > 0.0 ) {
810 double pAtMuonEntry = std::abs(1./parms->parameters()[
Trk::qOverP]);
811 if (!parms->covariance() ||
814 "MS track parameters without covariance, using 10% relative error!");
815 pAtMuonEntryError = pAtMuonEntry*0.1;
818 pAtMuonEntryError = pAtMuonEntry*pAtMuonEntry*qOverpAtMuonEntryError;
823 ATH_MSG_DEBUG(
"Momentum Error at MS Entry : " << pAtMuonEntryError);
826 double measCaloEnergy = 0.0;
827 double measCaloEnergyError = 0.0;
828 double fsrCaloEnergy = 0.0;
831 double totalEloss=0.0;
832 double meanElossIoni=0.0;
833 double sigmaElossIoni=0.0;
845 double E_em_meas = 0.;
846 double E_em_exp = 0.;
847 double E_tile_meas = 0.;
848 double E_tile_exp = 0.;
849 double E_HEC_meas = 0.;
850 double E_HEC_exp = 0.;
851 double E_dead_exp = 0.;
860 totalEloss, meanElossIoni, 0.45*sigmaElossIoni,
861 measCaloEnergy, measCaloEnergyError, fsrCaloEnergy, e_exp,
862 E_em_meas,E_em_exp,E_tile_meas,E_tile_exp,E_HEC_meas,E_HEC_exp,E_dead_exp);
865 ATH_MSG_DEBUG(
" eta " <<
eta <<
" Energy measurement from calorimeter: inputs totalEloss, meanElossIoni, sigmaElossIoni "
866 << totalEloss <<
" " << meanElossIoni <<
" " << sigmaElossIoni <<
" e_exp Ioni from TG " << e_exp <<
" e_exp original " << e_exp*totalEloss/(meanElossIoni+0.001));
875 measCaloEnergyError = 0.50 * sqrt(measCaloEnergy/CLHEP::GeV) * CLHEP::GeV;
878 ATH_MSG_DEBUG(
"Final measured energy in calorimeter : " << measCaloEnergy <<
" +- " << measCaloEnergyError <<
" MeV"
879 <<
" momentum fraction " << measCaloEnergy/pAtCaloEntry);
888 double Eloss_tot=0.0;
895 measCaloEnergy, measCaloEnergyError, fsrCaloEnergy,
896 pAtCaloEntry, pAtMuonEntryError,
897 Eloss_tot, useMeasuredEnergy,
898 totalEloss, meanElossIoni, sigmaElossIoni);
900 ATH_MSG_DEBUG(
" after modifyTSOSvector X0ScaleCALO " << X0ScaleCALO <<
" ElossScaleCALO " << ElossScaleCALO <<
901 " pAtCaloEntry " << pAtCaloEntry <<
" pAtMuonEntryError " << pAtMuonEntryError <<
" total Eloss from TG through MuonEnergyTool " << Eloss_tot );
902 ATH_MSG_DEBUG(
"Aggregating and correcting TSOS down to : " << finalCaloTSOS->
size() <<
" with total Eloss " << Eloss_tot);
906 for(
auto m : *finalCaloTSOS) this->
printTSOS(m,
"FINAL CALO TSOS");
912 return finalCaloTSOS;
918 if(tsos->materialEffectsOnTrack()) {
935 return paramCaloEnergy;
937 return caloEnergy->
clone();
954 std::vector<const Trk::TrackStateOnSurface*>::const_reverse_iterator it = caloTSOS->rbegin();
955 std::vector<const Trk::TrackStateOnSurface*>::const_reverse_iterator itEnd = caloTSOS->rend();
956 for(; it!=itEnd; ++it) {
957 if((*it)->trackParameters()) {
958 ATH_MSG_DEBUG(
"Parameters at CALO exit found : "<< *((*it)->trackParameters()));
959 tsosAtCaloExit = *it;
960 return tsosAtCaloExit;
964 std::vector<const Trk::TrackStateOnSurface*>::const_iterator it = caloTSOS->begin();
965 std::vector<const Trk::TrackStateOnSurface*>::const_iterator itEnd = caloTSOS->end();
966 for(; it!=itEnd; ++it) {
967 if((*it)->trackParameters()) {
968 ATH_MSG_DEBUG(
"Parameters at CALO exit found : "<< *((*it)->trackParameters()));
969 tsosAtCaloExit = *it;
970 return tsosAtCaloExit;
974 return tsosAtCaloExit;
983 std::vector<const Trk::TrackStateOnSurface*>::const_iterator it = caloTSOS->begin();
984 std::vector<const Trk::TrackStateOnSurface*>::const_iterator itEnd = caloTSOS->end();
985 for(; it!=itEnd; ++it) {
986 if((*it)->trackParameters()) {
987 ATH_MSG_DEBUG(
"Parameters at CALO entry found : "<< *((*it)->trackParameters()));
988 tsosAtCaloEntry = *it;
989 return tsosAtCaloEntry;
993 std::vector<const Trk::TrackStateOnSurface*>::const_reverse_iterator it = caloTSOS->rbegin();
994 std::vector<const Trk::TrackStateOnSurface*>::const_reverse_iterator itEnd = caloTSOS->rend();
995 for(; it!=itEnd; ++it) {
996 if((*it)->trackParameters()) {
997 ATH_MSG_DEBUG(
"Parameters at CALO entry found : "<< *((*it)->trackParameters()));
998 tsosAtCaloEntry = *it;
999 return tsosAtCaloEntry;
1003 return tsosAtCaloEntry;
1018 if (state && this_->getVolumeByGeo(state)!=2) {
1042 if (state && this_->getVolumeByGeo(state)==3) {
1064 unsigned int ntoupdate=0;
1066 while(it!=firstMS) {
1072 if(ntoupdate==caloTSOS->
size()) {
1073 std::copy(caloTSOS->
begin(), caloTSOS->
end(), firstCALO);
1077 while(i<ntoupdate) {
1078 it = inputTSOS->
erase(it);
1089 double X0ScaleMS,
double ElossScaleMS)
const
1096 std::bitset<Trk::MaterialEffectsBase::NumberOfMaterialEffectsTypes> meotPattern(0);
1099 std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern(0);
1103 if(X0ScaleMS<0.5||ElossScaleMS<0.5||X0ScaleMS>2.||ElossScaleMS>2.) {
1104 ATH_MSG_WARNING(
"Too large or too small X0ScaleMS " << X0ScaleMS <<
" ElossScaleMS " << ElossScaleMS);
1109 int msMatStates = 0;
1110 int msMatParStates = 0;
1114 for(;it!= inputTSOS->
end();++it) {
1116 if((*it)->materialEffectsOnTrack()) {
1134 double deltaE = (ElossScaleMS * energyLoss->
deltaE());
1135 double sigmaDeltaE = (ElossScaleMS * energyLoss->
sigmaDeltaE());
1136 double sigmaPlusDeltaE =
1138 double sigmaMinusDeltaE =
1140 double deltaE_ioni = (ElossScaleMS * energyLoss->
meanIoni());
1141 double sigmaDeltaE_ioni = (ElossScaleMS * energyLoss->
sigmaIoni());
1142 double deltaE_rad = (ElossScaleMS * energyLoss->
meanRad());
1143 double sigmaDeltaE_rad = (ElossScaleMS * energyLoss->
sigmaRad());
1147 std::cout <<
" updateVectorMS Old Eloss " << energyLoss->
deltaE()
1148 <<
" new Eloss " << deltaE << std::endl;
1150 auto energyLossNew = std::make_unique<Trk::EnergyLoss>(deltaE,
1161 std::make_unique<Trk::MaterialEffectsOnTrack>(X0ScaleMS * meot->
thicknessInX0(),
1163 std::move(energyLossNew),
1166 std::unique_ptr<Trk::TrackParameters> pars{};
1167 if ((*it)->trackParameters())
1168 pars = (*it)->trackParameters()->uniqueClone();
1172 nullptr, std::move(pars), std::move(newMeot), typePattern);
1177 std::copy(newTSOSvector->
begin(), newTSOSvector->
end(), it);
1178 delete newTSOSvector;
1187 std::cout <<
" msStates " << msStates <<
" msMatStates " << msMatStates <<
" msMatParStates " << msMatParStates << std::endl;
1190 for(it = firstMS;it!= inputTSOS->
end();++it) {
1191 if((*it)->materialEffectsOnTrack()) {
1198 std::cout <<
" updateVectorMS dump NEW Eloss " << energyLoss->
deltaE() << std::endl;
1213 unsigned int vol = 0;
1218 if(
m_DetID->is_indet(
id)) vol=1;
1219 else if(
m_DetID->is_muon(
id)) vol=3;
1225 if(
m_indetVolume->inside(m->surface().globalReferencePoint())) vol=1;
1235 std::vector<const Trk::TrackStateOnSurface*>::const_iterator it = vecTSOS->begin();
1236 std::vector<const Trk::TrackStateOnSurface*>::const_iterator itEnd = vecTSOS->end();
1237 for (; it != itEnd; ++it)
delete *it;
1245 for (; it != itEnd; ++it)
delete *it;
1255 std::string volGeo=
"ID";
1256 if(ivolGeo==2) volGeo=
"CALO";
1257 else if(ivolGeo==3) volGeo=
"MS";
1258 ATH_MSG_VERBOSE(tag<<
" Type "<<std::left<<std::setw(35)<<m->dumpType()
1259 <<
" Volume "<<std::left<<std::setw(5)<<volGeo
1260 <<
" r "<<std::left<<std::setw(10)<<m->surface().globalReferencePoint().perp()
1261 <<
" z "<<std::left<<std::setw(10)<<m->surface().globalReferencePoint().z());
1262 if(m->materialEffectsOnTrack()) {
1263 ATH_MSG_VERBOSE(
" -> Material: X0 "<<std::left<<std::setw(10)<<m->materialEffectsOnTrack()->thicknessInX0());
1268 ATH_MSG_DEBUG(
" geo " << volGeo <<
" radius " << m->surface().globalReferencePoint().perp() <<
" z " << m->surface().globalReferencePoint().z() <<
" TSOS Eloss " <<energyLoss->
deltaE());
1269 std::string
type=
"P";
1274 <<
" MopIoni "<<std::left<<std::setw(10)<<energyLoss->
meanIoni()<<
" +- "<<std::left<<std::setw(10)<<energyLoss->
sigmaIoni()
1275 <<
" MeanRad "<<std::left<<std::setw(10)<<energyLoss->
meanRad()<<
" +- "<<std::left<<std::setw(10)<<energyLoss->
sigmaRad() );
1280 " dTheta "<<std::left<<std::setw(10)<<scatAngles->
deltaTheta()<<
" +- "<<std::left<<std::setw(10)<<scatAngles->
sigmaDeltaTheta());
1284 if(m->trackParameters()) {
1285 ATH_MSG_VERBOSE(
" -> TP: r "<<std::left<<std::setw(10)<<m->trackParameters()->position().perp()
1286 <<
" z "<<std::left<<std::setw(10)<<m->trackParameters()->position().z()
1287 <<
" phi0 "<<std::left<<std::setw(10)<<m->trackParameters()->parameters()[
Trk::phi0]
1288 <<
" eta "<<std::left<<std::setw(10)<<-std::log(std::tan(m->trackParameters()->parameters()[
Trk::theta]/2)));
1289 if(m->trackParameters()->covariance()) {
1291 <<
" phi0 "<<std::left<<std::setw(10)<<
Amg::error(*m->trackParameters()->covariance(),
Trk::phi0)
1292 <<
" theta "<<std::left<<std::setw(10)<<
Amg::error(*m->trackParameters()->covariance(),
Trk::theta));
1306 double caloEnergyError,
1307 double fsrCaloEnergy,
1309 double momentumError,
1311 bool useMeasuredEnergy,
1312 double totalEloss,
double meanElossIoni,
double sigmaElossIoni)
const
1332 <<
" with X0, Eloss scales " << scaleX0 <<
" " << scaleEloss
1333 <<
" rep agg upd " << reposition <<
" " << aggregate <<
" " << updateEloss
1334 <<
" caloE " << caloEnergy <<
" +- " << caloEnergyError
1335 <<
" fsrCaloEnergy "<< fsrCaloEnergy
1336 <<
" p " << pCaloEntry <<
" dp " << momentumError);
1348 double sigmaDeltaPhi2_tot = 0.;
1349 double sigmaDeltaTheta2_tot = 0.;
1350 double deltaE_tot = 0.;
1351 double sigmaDeltaE_tot = 0.;
1352 double sigmaPlusDeltaE_tot = 0.;
1353 double sigmaMinusDeltaE_tot = 0.;
1354 double deltaE_ioni_tot = 0.;
1355 double sigmaDeltaE_ioni_tot=0.;
1356 double deltaE_rad_tot = 0.;
1357 double sigmaDeltaE_rad_tot =0.;
1363 double deltaEFirst = 0.;
1366 double deltaTheta = 0.;
1375 std::bitset<Trk::MaterialEffectsBase::NumberOfMaterialEffectsTypes> meotPattern(0);
1379 std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern(0);
1383 std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePatternScat(0);
1386 std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePatternDeposit(0);
1388 const auto sqrt12=std::sqrt(12.);
1389 for(
const auto *m : *matvec) {
1391 if(!m->trackParameters()) {
1395 if(m->materialEffectsOnTrack()) {
1396 double X0 = m->materialEffectsOnTrack()->thicknessInX0();
1417 X0_tot += std::abs(scaleX0 * X0);
1423 deltaE_tot += std::abs(scaleEloss*energyLoss->
deltaE());
1424 sigmaDeltaE_tot += std::abs(scaleEloss*energyLoss->
sigmaDeltaE());
1425 sigmaPlusDeltaE_tot += std::abs(scaleEloss*energyLoss->
sigmaPlusDeltaE());
1426 sigmaMinusDeltaE_tot += std::abs(scaleEloss*energyLoss->
sigmaMinusDeltaE());
1427 deltaE_ioni_tot += std::abs(scaleEloss*energyLoss->
meanIoni());
1428 sigmaDeltaE_ioni_tot += std::abs(scaleEloss*energyLoss->
sigmaIoni());
1429 deltaE_rad_tot += std::abs(scaleEloss*energyLoss->
meanRad());
1430 sigmaDeltaE_rad_tot += std::abs(scaleEloss*energyLoss->
sigmaRad());
1434 Amg::Vector3D dir = m->trackParameters()->momentum().unit();
1440 dir = dir/dir.mag();
1446 deltaEFirst = energyLoss->
deltaE();
1454 wpos += w*posNew/2.;
1457 wdist2 += w*(pos0-posFirst).
mag2()/2.;
1458 wdist2 += w*(posNew-posFirst).
mag2()/2.;
1460 if (!aggregate&&!reposition) {
1464 std::sqrt(sigmaDeltaPhi2_tot),
1465 std::sqrt(sigmaDeltaTheta2_tot));
1468 sigmaMinusDeltaE_tot,
1469 sigmaPlusDeltaE_tot,
1471 sigmaDeltaE_ioni_tot,
1473 sigmaDeltaE_rad_tot,
1475 auto caloEnergyNew = std::make_unique<CaloEnergy>(energyLossNew);
1476 Eloss_tot += caloEnergyNew->deltaE();
1479 std::make_unique<Trk::MaterialEffectsOnTrack>(
1480 X0_tot, scatNew, std::move(caloEnergyNew), surf, meotPattern);
1481 auto pars = m->trackParameters()->uniqueClone();
1485 nullptr, std::move(pars), std::move(meotLast), typePattern);
1490 sigmaDeltaTheta2_tot = 0.;
1491 sigmaDeltaPhi2_tot = 0.;
1493 sigmaDeltaE_tot = 0;
1494 sigmaPlusDeltaE_tot = 0.;
1495 sigmaMinusDeltaE_tot = 0.;
1496 deltaE_ioni_tot = 0.;
1497 sigmaDeltaE_ioni_tot = 0.;
1498 deltaE_rad_tot = 0.;
1499 sigmaDeltaE_rad_tot = 0.;
1502 }
else if(!aggregate&&reposition) {
1504 if(std::abs(
depth)<10.) {
1511 sqrt(sigmaDeltaPhi2_tot),
1512 sqrt(sigmaDeltaTheta2_tot));
1515 sigmaMinusDeltaE_tot,
1516 sigmaPlusDeltaE_tot,
1518 sigmaDeltaE_ioni_tot,
1520 sigmaDeltaE_rad_tot,
1522 auto caloEnergyNew = std::make_unique<CaloEnergy>(energyLossNew);
1523 Eloss_tot += caloEnergyNew->deltaE();
1526 std::make_unique<Trk::MaterialEffectsOnTrack>(
1527 X0_tot, scatNew, std::move(caloEnergyNew), surf, meotPattern);
1528 auto pars = m->trackParameters()->uniqueClone();
1532 nullptr, std::move(pars), std::move(meotLast), typePattern);
1536 sigmaDeltaTheta2_tot = 0.;
1537 sigmaDeltaPhi2_tot = 0.;
1539 sigmaDeltaE_tot = 0;
1540 sigmaPlusDeltaE_tot = 0.;
1541 sigmaMinusDeltaE_tot = 0.;
1542 deltaE_ioni_tot = 0.;
1543 sigmaDeltaE_ioni_tot = 0.;
1544 deltaE_rad_tot = 0.;
1545 sigmaDeltaE_rad_tot = 0.;
1552 auto energyLoss0 = std::make_unique<Trk::EnergyLoss>(0.,0.,0.,0.);
1555 std::sqrt(sigmaDeltaPhi2_tot / 2.),
1556 std::sqrt(sigmaDeltaTheta2_tot / 2.));
1562 std::sqrt(sigmaDeltaPhi2_tot / 2.),
1563 std::sqrt(sigmaDeltaTheta2_tot / 2.));
1566 sigmaMinusDeltaE_tot,
1567 sigmaPlusDeltaE_tot,
1569 sigmaDeltaE_ioni_tot,
1571 sigmaDeltaE_rad_tot,
1573 auto caloEnergyNew = std::make_unique<CaloEnergy>(energyLossNew);
1574 Eloss_tot += caloEnergyNew->deltaE();
1575 double norm = dir.perp();
1579 -dir.x() * dir.z() / norm, -dir.y() * dir.z() / norm, norm);
1590 std::make_unique<Trk::MaterialEffectsOnTrack>(
1591 X0_tot / 2., scatFirst, std::move(energyLoss0), surfFirst, meotPattern);
1593 std::make_unique<Trk::MaterialEffectsOnTrack>(
1594 X0_tot / 2., scatNew, std::move(caloEnergyNew), surfLast, meotPattern);
1598 double qOverP0 = m->trackParameters()->charge()/ (m->trackParameters()->momentum().
mag()-std::abs(energyLoss->
deltaE()));
1601 std::unique_ptr<Trk::TrackParameters> parsFirst =
1603 0., 0., dir.phi(), dir.theta(), qOverP0);
1605 double qOverPNew = m->trackParameters()->charge() /
1606 m->trackParameters()->momentum().mag();
1607 std::unique_ptr<Trk::TrackParameters> parsLast =
1609 0., 0., dir.phi(), dir.theta(), qOverPNew);
1614 nullptr, std::move(parsFirst), std::move(meotFirst), typePattern);
1617 nullptr, std::move(parsLast), std::move(meotLast), typePattern);
1624 sigmaDeltaTheta2_tot = 0.;
1625 sigmaDeltaPhi2_tot = 0.;
1627 sigmaDeltaE_tot = 0;
1628 sigmaPlusDeltaE_tot = 0.;
1629 sigmaMinusDeltaE_tot = 0.;
1630 deltaE_ioni_tot = 0.;
1631 sigmaDeltaE_ioni_tot = 0.;
1632 deltaE_rad_tot = 0.;
1633 sigmaDeltaE_rad_tot = 0.;
1642 if (aggregate&&reposition) {
1649 bool threePlanes =
false;
1650 if (std::abs(pos.z()) < 6700 && pos.perp() < 4200)
1656 std::sqrt(sigmaDeltaPhi2_tot / 2.),
1657 std::sqrt(sigmaDeltaTheta2_tot / 2.));
1661 std::sqrt(sigmaDeltaPhi2_tot / 2.),
1662 std::sqrt(sigmaDeltaTheta2_tot / 2.));
1665 sigmaMinusDeltaE_tot,
1666 sigmaPlusDeltaE_tot,
1668 sigmaDeltaE_ioni_tot,
1670 sigmaDeltaE_rad_tot,
1674 << energyLoss2.
deltaE() <<
" meanIoni "
1675 << energyLoss2.
meanIoni() <<
" sigmaIoni "
1676 << energyLoss2.
sigmaIoni() <<
" X0_tot " << X0_tot);
1681 double calE = caloEnergy;
1682 double calEr = caloEnergyError;
1685 if (!useMeasuredEnergy)
1691 energyLoss2, calE, calEr, pCaloEntry, momentumError, elossFlag)
1694 sigmaMinusDeltaE_tot,
1695 sigmaPlusDeltaE_tot,
1697 sigmaDeltaE_ioni_tot,
1699 sigmaDeltaE_rad_tot,
1701 auto caloEnergyNew = std::make_unique<CaloEnergy>(energyLossNew);
1704 << energyLossNew.
deltaE() <<
" meanIoni "
1705 << energyLossNew.
meanIoni() <<
" sigmaIoni "
1708 caloEnergyNew->set_measEnergyLoss(caloEnergy, caloEnergyError);
1710 caloEnergyNew->set_fsrCandidateEnergy(fsrCaloEnergy);
1718 int eLossFlagTmp = 0;
1723 ATH_MSG_DEBUG(
" modifyTSOSvector energyLossParam Eloss " << energyLossParam.
deltaE() <<
" on TSOS " << energyLossNew.
deltaE() <<
" calE " << calE);
1724 Eloss_tot += caloEnergyNew->deltaE();
1728 dir = dir/dir.mag();
1729 double norm = dir.perp();
1732 Amg::Vector3D coly(-dir.x()*dir.z()/norm, -dir.y()*dir.z()/norm, norm);
1735 double halflength2 = wdist2/w_tot - (pos-posFirst).
mag()*(pos-posFirst).
mag();
1736 double halflength = 0.;
1737 if(halflength2>0) halflength = sqrt(halflength2);
1743 double scaleCalo = 1.;
1744 double scaleCaloNew = std::abs(pos0.z())/6700;
1745 if(scaleCaloNew>scaleCalo) scaleCalo = scaleCaloNew;
1746 scaleCaloNew = std::abs(posNew.z())/6700;
1747 if(scaleCaloNew>scaleCalo) scaleCalo = scaleCaloNew;
1748 scaleCaloNew = std::abs(pos0.perp())/4200;
1749 if(scaleCaloNew>scaleCalo) scaleCalo = scaleCaloNew;
1750 scaleCaloNew = std::abs(posNew.perp())/4200;
1751 if(scaleCaloNew>scaleCalo) scaleCalo = scaleCaloNew;
1754 pos0 = pos0/scaleCalo;
1755 pos = pos/scaleCalo;
1756 posNew = posNew/scaleCalo;
1757 halflength = halflength/scaleCalo;
1758 ATH_MSG_VERBOSE(
" position scattering planes inside calo scale factor " << scaleCalo);
1770 std::unique_ptr<Trk::TrackParameters> parsFirst =
1772 0., 0., dir.phi(), dir.theta(), qOverP0);
1773 std::unique_ptr<Trk::TrackParameters> parsLast =
1775 0., 0., dir.phi(), dir.theta(), qOverPNew);
1784 std::make_unique<Trk::MaterialEffectsOnTrack>(X0_tot / 2.,
1792 std::make_unique<Trk::MaterialEffectsOnTrack>(X0_tot / 2.,
1794 std::move(caloEnergyNew),
1801 nullptr, std::move(parsFirst), std::move(meotFirst), typePattern);
1802 auto whichPattern = (elossFlag != 0) ? typePatternDeposit : typePattern;
1804 std::move(parsLast), std::move(meotLast), whichPattern);
1813 std::unique_ptr<Trk::TrackParameters> pars =
1815 0., 0., dir.phi(), dir.theta(), qOverPNew);
1820 std::make_unique<Trk::MaterialEffectsOnTrack>(
1821 X0_tot / 2., scatFirst,
nullptr, surfFirst, meotPattern);
1826 std::make_unique<Trk::MaterialEffectsOnTrack>(
1827 0.,std::nullopt, std::move(caloEnergyNew), surf, meotPattern);
1832 std::make_unique<Trk::MaterialEffectsOnTrack>(
1833 X0_tot / 2., scatNew,
nullptr, surfLast, meotPattern);
1838 nullptr, std::move(parsFirst), std::move(meotFirst), typePatternScat);
1840 nullptr, std::move(pars), std::move(meot), typePatternDeposit);
1843 nullptr, std::move(parsLast), std::move(meotLast), typePatternScat);
1855 return newTSOSvector;
1864 double& meanElossIoni,
1865 double& sigmaElossIoni)
const
1874 double deltaE_tot = 0.;
1875 double sigmaDeltaE_tot = 0.;
1876 double sigmaPlusDeltaE_tot = 0.;
1877 double sigmaMinusDeltaE_tot = 0.;
1878 double deltaE_ioni_tot = 0.;
1879 double sigmaDeltaE_ioni_tot=0.;
1880 double deltaE_rad_tot = 0.;
1881 double sigmaDeltaE_rad_tot =0.;
1883 for(
const auto *m : *matvec) {
1884 if(!m->trackParameters()) {
1888 if(m->materialEffectsOnTrack()) {
1901 deltaE_tot += std::abs(scaleEloss*energyLoss->
deltaE());
1902 sigmaDeltaE_tot += std::abs(scaleEloss*energyLoss->
sigmaDeltaE());
1903 sigmaPlusDeltaE_tot += std::abs(scaleEloss*energyLoss->
sigmaPlusDeltaE());
1904 sigmaMinusDeltaE_tot += std::abs(scaleEloss*energyLoss->
sigmaMinusDeltaE());
1905 deltaE_ioni_tot += std::abs(scaleEloss*energyLoss->
meanIoni());
1906 sigmaDeltaE_ioni_tot += std::abs(scaleEloss*energyLoss->
sigmaIoni());
1907 deltaE_rad_tot += std::abs(scaleEloss*energyLoss->
meanRad());
1908 sigmaDeltaE_rad_tot += std::abs(scaleEloss*energyLoss->
sigmaRad());
1910 ATH_MSG_DEBUG(
" position x " << m->trackParameters()->position().x() <<
" y " << m->trackParameters()->position().y() <<
" perp " << m->trackParameters()->position().perp() <<
" z " << m->trackParameters()->position().z() );
1911 ATH_MSG_DEBUG(
" deltaE " << (scaleEloss*energyLoss->
deltaE()) <<
" deltaE_ioni " << (scaleEloss*energyLoss->
meanIoni()) <<
" sigmaDeltaE_ioni " << (scaleEloss*energyLoss->
sigmaIoni()));
1912 ATH_MSG_DEBUG(
" deltaE_tot " << deltaE_tot <<
" deltaE_ioni_tot " << deltaE_ioni_tot <<
" sigmaDeltaE_ioni_tot " << sigmaDeltaE_ioni_tot);
1919 EnergyLoss eLoss =
EnergyLoss(deltaE_tot, sigmaDeltaE_tot, sigmaMinusDeltaE_tot, sigmaPlusDeltaE_tot,
1920 deltaE_ioni_tot, sigmaDeltaE_ioni_tot,
1921 deltaE_rad_tot, sigmaDeltaE_rad_tot, 0.) ;
1931 ATH_MSG_DEBUG(
"Mop Energy Loss " << totalEloss <<
" mean ionization energy loss " << meanElossIoni <<
" sigmaElossIoni " << sigmaElossIoni);
1939 nTracks = inner.first;
1949 double meanElossIoni,
1950 double& fsrCaloEnergy)
const
1959 return FinalMeasuredEnergy;
1965 double meanElossIoni,
1967 double& fsrCaloEnergy)
const
1969 double MopLossCorrected = totalEloss;
1970 double MopLoss = totalEloss;
1982 double MaterialCorrection =
InertMaterial * MopLossCorrected;
1996 double ForwardHECCorrection = 0.;
1998 ForwardHECCorrection = (1. - LArHECMeasurementMaterial) * HECMaterial * MopLossCorrected;
2001 double TotalMeasuredEnergy = TileEnergy + EmEnergy + LArHECEnergy;
2004 <<
" LArHEC " << LArHECEnergy
2005 <<
" EM " << EmEnergy);
2007 <<
" HECMaterial " << HECMaterial
2008 <<
" MopLossCorrected " << MopLossCorrected );
2014 if (std::abs(
eta)<1.4) {
2015 if (LArHECEnergy + TileEnergy > 0.1 * MopLoss * HECMaterial) bHEC=
true;
2017 else if (std::abs(
eta)>1.8) {
2018 if (LArHECEnergy + TileEnergy > 0.2 * MopLoss * HECMaterial) bHEC=
true;
2020 if (LArHECEnergy + TileEnergy > 0.25 * MopLoss * HECMaterial) bHEC=
true;
2022 if (EmEnergy > 0.5 * MopLoss * EmMaterial) bEM =
true;
2024 double MeasCorrected = TotalMeasuredEnergy + MaterialCorrection;
2029 const double IonizationLoss = (1./1.4) * meanElossIoni;
2030 double eOverMipCorrectionEm = 0.;
2031 double eOverMipCorrectionHEC = 0.;
2035 const double emipEM = 0.78;
2036 eOverMipCorrectionEm = - (1./emipEM-1.) * IonizationLoss * EmMaterial * LArEmMeasurementMaterial;
2037 if (EmEnergy + eOverMipCorrectionEm<0.)eOverMipCorrectionEm=0.;
2040 const double emipTile = 0.86;
2041 const double emipLAr = 0.94;
2042 const double HECEnergy = TileEnergy + LArHECEnergy;
2043 const double eOverMipCorrectionTile = - (1./emipTile-1.) * TileEnergy / HECEnergy * IonizationLoss * HECMaterial * TileMeasurementMaterial;
2044 const double eOverMipCorrectionLAr = - (1./emipLAr-1.) * LArHECEnergy / HECEnergy * IonizationLoss * HECMaterial * LArHECMeasurementMaterial;
2045 eOverMipCorrectionHEC = eOverMipCorrectionTile + eOverMipCorrectionLAr;
2046 if (LArHECEnergy + TileEnergy + eOverMipCorrectionHEC < 0.0) eOverMipCorrectionHEC=0.;
2048 const double eOverMipCorrection = eOverMipCorrectionEm + eOverMipCorrectionHEC;
2067 double FinalMeasuredEnergy = MeasCorrected + eOverMipCorrection;
2069 return FinalMeasuredEnergy;
2073 std::stringstream
msg;
2075 throw std::runtime_error(
msg.str());
Scalar eta() const
pseudorapidity method
Scalar deltaPhi(const MatrixBase< Derived > &vec) const
Scalar mag() const
mag method
Scalar mag2() const
mag2 method - forward to squaredNorm()
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const ServiceHandle< StoreGateSvc > & detStore() const
void getInitializedCache(MagField::AtlasFieldCache &cache) const
get B field cache for evaluation as a function of 2-d or 3-d position.
class extending the basic Trk::EnergyLoss to describe the measured or parameterised muon energy loss ...
CaloEnergy::EnergyLossType energyLossType(void) const
Accessor methods.
double caloLRLikelihood() const
the calo Muon Identification likehood
double sigmaMinusDeltaEParam() const
get parametrised energy loss minus error
void set_measEnergyLoss(const double deltaE, const double sigmaDeltaE)
set measured energy loss
CaloEnergy * clone() const
Virtual constructor.
double deltaEMeas() const
get measured energy loss
void set_paramEnergyLoss(const double deltaE, const double sigmaMinusDeltaE, const double sigmaPlusDeltaE)
set parametrised energy loss
double sigmaDeltaEMeas() const
get measured energy loss error
unsigned short caloMuonIdTag() const
the Calo Muon Identification tag
double deltaEParam() const
get parametrised energy loss
double sigmaPlusDeltaEParam() const
get parametrised energy loss plus error
DataModel_detail::const_iterator< DataVector > const_iterator
const T * get(size_type n) const
Access an element, as an rvalue.
const_reverse_iterator rend() const noexcept
Return a const_reverse_iterator pointing at the beginning of the collection.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
DataModel_detail::iterator< DataVector > iterator
iterator insert(iterator position, value_type pElem)
Add a new element to the collection.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_reverse_iterator rbegin() const noexcept
Return a const_reverse_iterator pointing past the end of the collection.
iterator erase(iterator position)
Remove element at a given position.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
std::reverse_iterator< const_iterator > const_reverse_iterator
SG::OwnershipPolicy ownPolicy() const
Return the ownership policy setting for this container.
size_type size() const noexcept
Returns the number of elements in the collection.
Local cache for magnetic field (based on MagFieldServices/AtlasFieldSvcTLS.h)
double LArEM_SamplingFraction(void) const
double LArEM_EnergyMeasured(void) const
double Tile_SamplingFraction(void) const
double LArHEC_SamplingFraction(void) const
double Tile_EnergyMeasured(void) const
double LArHEC_EnergyMeasured(void) const
Description of a BoundarySurface inside the tracking realm, it extends the Surface description to mak...
virtual const Surface & surfaceRepresentation() const =0
The Surface Representation of this.
Simple helper class for defining track parameters for charged particles.
This class describes energy loss material effects in the ATLAS tracking EDM.
double sigmaPlusDeltaE() const
returns the positive side
double sigmaMinusDeltaE() const
returns the negative side
double sigmaDeltaE() const
returns the symmatric error
double deltaE() const
returns the
@ CalorimeterEntryLayer
Tracking Volume which defines the entrance srufaces of the calorimeter.
@ MuonSpectrometerEntryLayer
Tracking Volume which defines the entrance surfaces of the MS.
@ ScatteringEffects
contains material effects due to multiple scattering
@ EnergyLossEffects
contains energy loss corrections
const Surface & associatedSurface() const
returns the surface to which these m.eff. are associated.
double thicknessInX0() const
returns the actually traversed material .
represents the full description of deflection and e-loss of a track in material.
const EnergyLoss * energyLoss() const
returns the energy loss object.
const ScatteringAngles * scatteringAngles() const
returns the MCS-angles object.
Material with information about thickness of material.
This class is the pure abstract base class for all fittable tracking measurements.
const Amg::Vector3D & momentum() const
Access method for the momentum.
const Amg::Vector3D & position() const
Access method for the position.
double charge() const
Returns the charge.
Class describing the Line to which the Perigee refers to.
Class for a planaer rectangular or trapezoidal surface in the ATLAS detector.
represents a deflection of the track caused through multiple scattering in material.
double sigmaDeltaPhi() const
returns the
double deltaPhi() const
returns the
double sigmaDeltaTheta() const
returns the
double deltaTheta() const
returns the
Abstract Base Class for tracking surfaces.
const Amg::Vector3D & center() const
Returns the center position of the Surface.
represents the track state (measurement, material, fit parameters and quality) at a surface.
const TrackParameters * trackParameters() const
return ptr to trackparameters const overload
@ Perigee
This represents a perigee, and so will contain a Perigee object only.
@ InertMaterial
This represents inert material, and so will contain MaterialEffectsBase.
@ Scatterer
This represents a scattering point on the track, and so will contain TrackParameters and MaterialEffe...
@ CaloDeposit
This TSOS contains a CaloEnergy object.
const Trk::TrackStates * trackStateOnSurfaces() const
return a pointer to a const DataVector of const TrackStateOnSurfaces.
const DataVector< const TrackParameters > * trackParameters() const
Return a pointer to a vector of TrackParameters.
void setTrackStateOnSurfaces(std::unique_ptr< Trk::TrackStates > input)
Set the TrackStateOnSurfaces.
const Perigee * perigeeParameters() const
return Perigee.
The TrackingGeometry class is the owner of the constructed TrackingVolumes.
const TrackingVolume * trackingVolume(const std::string &name) const
return the tracking Volume by name, 0 if it doesn't exist
Full Volume description used in Tracking, it inherits from Volume to get the geometrical structure,...
std::vector< BoundaryIntersection< T > > boundarySurfacesOrdered(const T ¶meters, PropDirection pDir=alongMomentum, bool startOffBoundary=false) const
Returns the boundary surfaces ordered in probability to hit them based on straight line intersection.
std::string depth
tag string for intendation
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
Eigen::Affine3d Transform3D
bool hasPositiveDiagElems(const AmgSymMatrix(N) &mat)
Returns true if all diagonal elements of the covariance matrix are finite aka sane in the above defin...
Eigen::Matrix< double, 3, 1 > Vector3D
=============================================================================
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
PropDirection
PropDirection, enum for direction of the propagation.
DataVector< const Trk::TrackStateOnSurface > TrackStates
ParticleHypothesis
Enumeration for Particle hypothesis respecting the interaction with material.
ParametersBase< TrackParametersDim, Charged > TrackParameters
DataModel_detail::iterator< DVL > remove_if(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end, Predicate pred)
Specialization of remove_if for DataVector/List.