Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
This AlgTool merges TileHits from different AthenaHitVectors and stores the result in a TileHitContainer.
More...
#include <TileHitVecToCntTool.h>
|
StatusCode | createContainers () |
|
void | processHitVectorForOverlay (const TileHitVector *inputHits, std::unique_ptr< TileHitNonConstContainer > &hits, int &nHit, double &eHitTot) const |
|
void | processHitVectorForPileUp (const TileHitVector *inputHits, double SubEvtTimOffset, std::vector< std::unique_ptr< TileHit >> &allHits, std::vector< std::unique_ptr< TileHit >> &allHits_DigiHSTruth, int &nHit, double &eHitTot, bool isSignal=false) const |
|
void | processHitVectorWithoutPileUp (const TileHitVector *inputHits, int &nHit, double &eHitTot, TileHitNonConstContainer *hitCont, CLHEP::HepRandomEngine *engine) const |
|
double | applyPhotoStatistics (double energy, Identifier pmt_id, CLHEP::HepRandomEngine *engine, const TileSamplingFraction *samplingFraction, int drawerIdx) const |
|
void | findAndMergeE1 (TileHitCollection *coll, int frag_id, TileHitNonConstContainer *hitCont) const |
|
void | findAndMergeMBTS (TileHitCollection *coll, int frag_id, TileHitNonConstContainer *hitCont) const |
|
void | findAndMergeMultipleHitsInChannel (std::unique_ptr< TileHitNonConstContainer > &hitCont) const |
|
void | mergeExtraHitToChannelHit (TileHit *extraHit, TileHit *channelHit) const |
|
void | putAllHitsInContainer (std::vector< std::unique_ptr< TileHit >> &allHits, std::vector< std::unique_ptr< TileHit >> &allHits_DigiHSTruth, std::unique_ptr< TileHitNonConstContainer > &hits, std::unique_ptr< TileHitNonConstContainer > &hits_DigiHSTruth, SG::OwnershipPolicy ownPolicy) const |
|
StatusCode | commitContainers (const EventContext &ctx, std::unique_ptr< TileHitNonConstContainer > &hits, std::unique_ptr< TileHitNonConstContainer > &hits_DigiHSTruth, SG::OwnershipPolicy ownPolicy) const |
|
void | prepareAllHits (std::vector< std::unique_ptr< TileHit >> &allHits) const |
|
int | mbts_index (int side, int phi, int eta) const |
|
int | e4pr_index (int phi) const |
|
|
Gaudi::Property< bool > | m_onlyUseContainerName {this, "OnlyUseContainerName", true, "Don't use the ReadHandleKey directly. Just extract the container name from it."} |
|
StringArrayProperty | m_inputKeys |
| vector with the names of TileHitVectors to use More...
|
|
SG::ReadHandleKeyArray< TileHitVector > | m_hitVectorKeys {this, "TileHitVectorKeys", {}, "Do not set manually!"} |
|
std::vector< std::string > | m_hitVectorNames {} |
|
SG::WriteHandleKey< TileHitContainer > | m_hitContainerKey |
|
SG::WriteHandleKey< TileHitContainer > | m_hitContainer_DigiHSTruthKey |
|
SG::ReadCondHandleKey< TileSamplingFraction > | m_samplingFractionKey |
| Name of TileSamplingFraction in condition store. More...
|
|
bool | m_run2 {false} |
| if true => RUN2 geometry with E4' and merged E1 More...
|
|
bool | m_run2plus {false} |
| if true => RUN2+ geometry with merged E1 (and E4' in RUN2) More...
|
|
Gaudi::Property< bool > | m_pileUp |
| if true => pileup mode is activated More...
|
|
Gaudi::Property< double > | m_deltaT |
| minimal time granularity for TileHit More...
|
|
Gaudi::Property< int > | m_timeFlag |
| special options to deal with times of hits for cosmics and TB More...
|
|
Gaudi::Property< double > | m_triggerTime |
| fixed trigger time value (default=0) More...
|
|
Gaudi::Property< double > | m_maxHitTime |
| all sub-hits with time above m_maxHitTime will be ignored More...
|
|
Gaudi::Property< double > | m_photoStatisticsWindow |
| sum up energy in [-m_photoStatWindow,+m_photoStatWindow] and use it for photostatistics More...
|
|
Gaudi::Property< int > | m_photoElectronStatistics |
| photoelectron statistics type: 0 - Poisson, 1 - "new" Poisson + Gauss, 2 - Poisson->Gauss More...
|
|
Gaudi::Property< bool > | m_skipNoHit |
| if true => skip events with no Tile hits More...
|
|
Gaudi::Property< bool > | m_rndmEvtOverlay |
| If true => overlay with random event (zero-luminosity pile-up) More...
|
|
Gaudi::Property< bool > | m_useTriggerTime |
| if true => take trigger time from external tool or from m_triggerTime More...
|
|
Gaudi::Property< bool > | m_doDigiTruth |
|
Gaudi::Property< bool > | m_usePhotoStatistics |
|
Gaudi::Property< bool > | m_mergeMultipleHitsInChannel |
|
SG::ReadHandleKey< CosTrigTime > | m_triggerTimeKey {this,"CosTimeKey", "", "To take the trigger time from"} |
|
ServiceHandle< PileUpMergeSvc > | m_mergeSvc {this, "PileUpMergeSvc", "PileUpMergeSvc", ""} |
|
const TileID * | m_tileID {nullptr} |
| Pointer to TileID helper. More...
|
|
const TileTBID * | m_tileTBID {nullptr} |
| Pointer to TileID helper. More...
|
|
const TileHWID * | m_tileHWID {nullptr} |
| Pointer to TileID helper. More...
|
|
ServiceHandle< IAthRNGSvc > | m_rndmSvc {this, "RndmSvc", "AthRNGSvc", ""} |
| Random number generator engine to use. More...
|
|
Gaudi::Property< std::string > | m_randomStreamName {this, "RandomStreamName", "Tile_HitVecToCnt", ""} |
| Random Stream Name. More...
|
|
std::vector< std::unique_ptr< TileHit > > | m_allHits |
| vector for all TileHits More...
|
|
std::vector< std::unique_ptr< TileHit > > | m_allHits_DigiHSTruth |
| vector for all TileHits More...
|
|
std::unique_ptr< TileHitNonConstContainer > | m_hits {} |
| pointer to hits container More...
|
|
std::unique_ptr< TileHitNonConstContainer > | m_hits_DigiHSTruth {} |
| pointer to hits container More...
|
|
int | m_mbtsOffset {0} |
|
ServiceHandle< TileCablingSvc > | m_cablingSvc {this, "TileCablingSvc", "TileCablingSvc", ""} |
|
const TileCablingService * | m_cabling {} |
|
TileFragHash | m_fragHashFunc |
|
std::vector< bool > | m_E1merged |
|
std::vector< bool > | m_MBTSmerged |
|
This AlgTool merges TileHits from different AthenaHitVectors and stores the result in a TileHitContainer.
TileHitVecToCntTool copies all TileHits from TileHitVector (AthenaHitsVector) to TileHitContainer (identifiable container) without any corrections If pileup option is set, all hits are merged, if several hits have the same ID, energy and time from all of them is stored in vectors inside single TileHit
Definition at line 85 of file TileHitVecToCntTool.h.
◆ CELL_TOWER
◆ TileHitVecToCntTool()
TileHitVecToCntTool::TileHitVecToCntTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ applyPhotoStatistics()
double TileHitVecToCntTool::applyPhotoStatistics |
( |
double |
energy, |
|
|
Identifier |
pmt_id, |
|
|
CLHEP::HepRandomEngine * |
engine, |
|
|
const TileSamplingFraction * |
samplingFraction, |
|
|
int |
drawerIdx |
|
) |
| const |
|
private |
Definition at line 955 of file TileHitVecToCntTool.cxx.
965 nPhotoElectrons =
std::round(nPhotoElectrons * 1000) / 1000;
967 double pe =
energy * nPhotoElectrons;
968 double pe_scale = 1., RndmPois = 1.;
973 RndmPois =
std::max(0.0, RandGaussQ::shoot(engine,
pe, sqrt(
pe)));
974 pe_scale = RndmPois /
pe;
978 double singleMEAN = 1.0;
979 double singleSIGMA = 1.0;
980 RndmPois = RandPoissonT::shoot(engine,
pe);
984 for (
int i = 0;
i < RndmPois;
i++)
985 pe_scale += 1 / (1.08332) *
std::max(0., RandGaussQ::shoot(engine, singleMEAN, singleSIGMA));
987 pe_scale /= RndmPois;
996 RndmPois = RandPoissonT::shoot(engine,
pe);
997 pe_scale = RndmPois /
pe;
1004 RndmPois =
std::max(0.0, RandGaussQ::shoot(engine,
pe, sqrt(
pe)));
1007 double * ProbFunc =
new double[nn];
1008 ProbFunc[0] =
exp(-
pe);
1009 for (
int i = 1;
i < nn; ++
i) {
1010 ProbFunc[
i] = ProbFunc[
i - 1] *
pe /
i;
1012 RandGeneral* RandG =
new RandGeneral(ProbFunc, nn, 0);
1013 RndmPois = RandG->shoot(engine) * nn;
1019 pe_scale = RndmPois /
pe;
1026 <<
", numPhElec=" << nPhotoElectrons
1028 <<
", rndmPoisson=" << RndmPois
1029 <<
", pe_scale=" << pe_scale);
◆ commitContainers()
Definition at line 803 of file TileHitVecToCntTool.cxx.
822 for (std::unique_ptr<TileHitCollection>& coll : *
hits ) {
823 int frag_id = coll->identify();
833 for (; collIt != endcollIt; ++collIt) {
834 int frag_id = (*collIt)->identify();
847 CLHEP::HepRandomEngine * engine = rngWrapper->
getEngine(ctx);
855 collIt_DigiHSTruth = hits_DigiHSTruth->
begin();
856 endColl_DigiHSTruth = hits_DigiHSTruth->
end();
859 for (std::unique_ptr<TileHitCollection>& coll : *
hits ) {
864 coll_DigiHSTruth = (*collIt_DigiHSTruth).
get();
865 hitItr_DigiHSTruth = coll_DigiHSTruth->
begin();
866 hitEnd_DigiHSTruth = coll_DigiHSTruth->
end();
876 int hitsize = pHit->size();
877 for (
int i = 0;
i < hitsize; ++
i) {
878 double thit = pHit->time(
i);
890 double scaleFactor = 1.0;
893 pHit->scale(scaleFactor);
897 TileHit *pHit_DigiHSTruth = (*hitItr_DigiHSTruth);
898 pHit_DigiHSTruth->
scale(scaleFactor);
900 ++hitItr_DigiHSTruth;
909 auto hitCont = std::make_unique<TileHitContainer>(
false, ownPolicy);
911 for (std::unique_ptr<TileHitCollection>& coll : *
hits ) {
912 CHECK(hitCont->addCollection (coll.release(), hashId++));
916 ATH_CHECK( hitContainer.record(std::move(hitCont)) );
921 auto hitCont_DigiHSTruth = std::make_unique<TileHitContainer>(
false, ownPolicy);
922 size_t hashId_DigiHSTruth = 0;
923 for (std::unique_ptr<TileHitCollection>& coll : *hits_DigiHSTruth ) {
924 ATH_CHECK(hitCont_DigiHSTruth->addCollection (coll.release(), hashId_DigiHSTruth++));
928 ATH_CHECK( hitContainer_DigiHSTruth.record(std::move(hitCont_DigiHSTruth)) );
932 return StatusCode::SUCCESS;
◆ createContainers()
StatusCode TileHitVecToCntTool::createContainers |
( |
| ) |
|
|
private |
◆ e4pr_index()
int TileHitVecToCntTool::e4pr_index |
( |
int |
phi | ) |
const |
|
inlineprivate |
◆ filterPassed()
virtual bool PileUpToolBase::filterPassed |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ finalize()
StatusCode TileHitVecToCntTool::finalize |
( |
| ) |
|
|
finaloverride |
◆ findAndMergeE1()
Definition at line 1035 of file TileHitVecToCntTool.cxx.
1036 int module = frag_id & 0x3F;
1044 for (; hitIt != endHitIt; ++hitIt) {
1055 if (fromHitIt != coll->
end()) {
1057 <<
"] in module: " <<
module);
1058 bool isToHitNew =
false;
1062 toHit =
new TileHit(to_pmt_id);
1077 toHit->add(*fromHitIt, 0.1);
1084 coll->
erase(fromHitIt);
◆ findAndMergeMBTS()
Definition at line 1093 of file TileHitVecToCntTool.cxx.
1094 int module = frag_id & 0x3F;
1102 for (; hitIt != endHitIt; ++hitIt) {
1113 if (fromHitIt != coll->
end()) {
1115 <<
"] in module: " <<
module);
1116 bool isToHitNew =
false;
1121 toHit =
new TileHit(to_pmt_id);
1136 toHit->add(*fromHitIt, 0.1);
1144 coll->
erase(fromHitIt);
◆ findAndMergeMultipleHitsInChannel()
void TileHitVecToCntTool::findAndMergeMultipleHitsInChannel |
( |
std::unique_ptr< TileHitNonConstContainer > & |
hitCont | ) |
const |
|
private |
Definition at line 1152 of file TileHitVecToCntTool.cxx.
1153 for (std::unique_ptr<TileHitCollection>& coll : *hitCont) {
1155 int frag_id = coll->identify();
1156 int module = frag_id & 0x3F;
1158 std::vector<TileHit*>
hits(48,
nullptr);
1159 std::vector<std::unique_ptr<TileHit>> otherModuleHits;
1160 coll->erase(std::remove_if(coll->begin(), coll->end(),
1162 Identifier pmt_id = hit->pmt_ID();
1163 int channel = m_tileHWID->channel(hit->pmt_HWID());
1164 TileHit* channelHit = hits[channel];
1166 mergeExtraHitToChannelHit(hit, channelHit);
1172 otherModuleHits.push_back(std::make_unique<TileHit>(*hit));
1175 hits[channel] = hit;
1180 for (std::unique_ptr<TileHit>& hit : otherModuleHits) {
1187 coll->push_back(std::move(hit));
◆ initialize()
StatusCode TileHitVecToCntTool::initialize |
( |
| ) |
|
|
finaloverridevirtual |
Reimplemented from PileUpToolBase.
Definition at line 53 of file TileHitVecToCntTool.cxx.
77 ATH_MSG_INFO(
"No photostatistics effect will be simulated");
94 ATH_MSG_INFO(
" In case of pileup, the trigger time subtraction is done in PileUpSvc");
95 ATH_MSG_INFO(
" => TileHitVecToCnt will not apply Trigger Time ");
114 <<
"'; therefore set HitTimeFlag to 2");
127 ATH_MSG_INFO(
"Minimal hit time will be used as trigger time"
128 <<
" with random additional shift between 0 and " << -
m_triggerTime <<
" ns");
131 ATH_MSG_INFO(
"Average time will be calculated in every event");
139 ATH_MSG_INFO(
"Time of all hits will be preserved during copy");
177 ATH_MSG_DEBUG(
"TileHitVecToCntTool initialization completed");
180 return StatusCode::RECOVERABLE;
182 return StatusCode::SUCCESS;
◆ mbts_index()
int TileHitVecToCntTool::mbts_index |
( |
int |
side, |
|
|
int |
phi, |
|
|
int |
eta |
|
) |
| const |
|
inlineprivate |
◆ mergeEvent()
StatusCode TileHitVecToCntTool::mergeEvent |
( |
const EventContext & |
ctx | ) |
|
|
finaloverridevirtual |
◆ mergeExtraHitToChannelHit()
void TileHitVecToCntTool::mergeExtraHitToChannelHit |
( |
TileHit * |
extraHit, |
|
|
TileHit * |
channelHit |
|
) |
| const |
|
private |
◆ prepareAllHits()
void TileHitVecToCntTool::prepareAllHits |
( |
std::vector< std::unique_ptr< TileHit >> & |
allHits | ) |
const |
|
private |
Definition at line 1207 of file TileHitVecToCntTool.cxx.
1211 allHits.reserve(nHits);
1217 allHits.emplace_back(std::make_unique<TileHit>(hit_id, 0., 0.));
1218 allHits.back()->reserve(71);
1227 allHits[mbtsIndex] = std::make_unique<TileHit>(hit_id, 0., 0.);
1228 allHits[mbtsIndex]->reserve(71);
1237 allHits[e4prIndex] = std::make_unique<TileHit>(hit_id, 0., 0.);
1238 allHits[e4prIndex]->reserve(71);
◆ prepareEvent()
StatusCode TileHitVecToCntTool::prepareEvent |
( |
const EventContext & |
ctx, |
|
|
unsigned int |
|
|
) |
| |
|
finaloverridevirtual |
◆ processAllSubEvents() [1/3]
StatusCode TileHitVecToCntTool::processAllSubEvents |
( |
const EventContext & |
ctx | ) |
const |
|
virtual |
Definition at line 657 of file TileHitVecToCntTool.cxx.
660 ATH_MSG_DEBUG(
"TileHitVecToCntTool processAllSubEvents started");
665 std::vector<std::unique_ptr<TileHit>> allHits;
666 auto hits = std::make_unique<TileHitNonConstContainer>(ownPolicy);
668 std::vector<std::unique_ptr<TileHit>> allHits_DigiHSTruth;
669 std::unique_ptr<TileHitNonConstContainer> hits_DigiHSTruth;
671 hits_DigiHSTruth = std::make_unique<TileHitNonConstContainer>(ownPolicy);
686 CLHEP::HepRandomEngine * engine = rngWrapper->
getEngine(ctx);
690 for (
auto & inputHits : hitVectorHandles) {
691 if (!inputHits.isValid()) {
693 return StatusCode::FAILURE;
695 const double SubEvtTimeOffset(0.0);
697 ATH_MSG_DEBUG(
" New HitCont. TimeOffset=" << SubEvtTimeOffset <<
", size =" << inputHits->size());
702 return StatusCode::SUCCESS;
708 TimedHitContList hitContList;
710 if (!(
m_mergeSvc->retrieveSubEvtsData(hitVectorName, hitContList).isSuccess()) || hitContList.size() == 0) {
711 ATH_MSG_WARNING(
"Could not fill TimedHitContList for hit vector " << hitVectorName);
720 if (iCont != iEndCont) {
722 const double SubEvtTimeOffset(iCont->first.time());
723 if (fabs(SubEvtTimeOffset) > 0.1) {
724 ATH_MSG_ERROR(
"Wrong time for in-time event: " << SubEvtTimeOffset <<
" Ignoring all hits ");
728 ATH_MSG_DEBUG(
" New HitCont. TimeOffset=" << SubEvtTimeOffset <<
", size =" << inputHits->
size());
735 for (; iCont != iEndCont; ++iCont) {
737 const double SubEvtTimeOffset(iCont->first.time());
740 ATH_MSG_VERBOSE(
" New HitCont. TimeOffset=" << SubEvtTimeOffset <<
", size =" << inputHits->
size());
741 bool isSignal =
false;
742 if(iCont == hitContList.begin() ) isSignal =
true;
752 if (!inputHits.isValid()) {
753 ATH_MSG_WARNING(
"Hit Vector "<< hitVectorName <<
" not found in StoreGate");
768 return StatusCode::SUCCESS;
◆ processAllSubEvents() [2/3]
StatusCode TileHitVecToCntTool::processAllSubEvents |
( |
const EventContext & |
ctx | ) |
|
|
finaloverridevirtual |
◆ processAllSubEvents() [3/3]
virtual StatusCode IPileUpTool::processAllSubEvents |
|
inherited |
dummy implementation to allow compilation while all Digitization packages are migrated to use this new interface.
◆ processBunchXing()
Reimplemented from PileUpToolBase.
Definition at line 581 of file TileHitVecToCntTool.cxx.
586 ATH_MSG_DEBUG(
"Inside TileHitVecToCntTool processBunchXing" << bunchXing);
590 CLHEP::HepRandomEngine * engine = rngWrapper->
getEngine(Gaudi::Hive::currentContext());
595 while (iEvt != eSubEvents) {
600 std::vector<std::string>::const_iterator hitVecNamesItr =
m_hitVectorNames.begin();
601 std::vector<std::string>::const_iterator hitVecNamesEnd =
m_hitVectorNames.end();
602 for (; hitVecNamesItr != hitVecNamesEnd; ++hitVecNamesItr) {
604 const std::string hitVectorName(*hitVecNamesItr);
609 if (!(
m_mergeSvc->retrieveSingleSubEvtData(hitVectorName, inputHits, bunchXing, iEvt))){
610 ATH_MSG_ERROR(
" Tile Hit container not found for event key " << hitVectorName);
613 const double SubEvtTimOffset(iEvt->time());
616 if (fabs(SubEvtTimOffset) > 0.1) {
617 ATH_MSG_ERROR(
"Wrong time for in-time event: " << SubEvtTimOffset <<
" Ignoring all hits ");
619 ATH_MSG_DEBUG(
" New HitCont. TimeOffset=" << SubEvtTimOffset <<
", size =" << inputHits->
size());
624 bool isSignal =
false;
625 if(iEvt == bSubEvents) isSignal =
true;
633 if (!(
m_mergeSvc->retrieveSingleSubEvtData(hitVectorName, inputHits, bunchXing, iEvt))){
634 ATH_MSG_ERROR(
" Tile Hit container not found for event key " << hitVectorName);
647 ATH_MSG_DEBUG(
"Exiting processBunchXing in TileHitVecToCntTool");
649 return StatusCode::SUCCESS;
◆ processHitVectorForOverlay()
Definition at line 235 of file TileHitVecToCntTool.cxx.
240 for (; inpItr !=
end; ++inpItr) {
242 const TileHit * cinp = &(*inpItr);
244 eHitTot += cinp->
energy();
247 hits->push_back(pHit);
251 int hitsize = cinp->
size();
254 for (
int i = 0;
i < hitsize; ++
i) {
263 eHitTot += eHit - cinp->
energy();
269 <<
" Copy hit: ener=";
270 for (
int i = 0;
i < hitsize; ++
i)
273 for (
int i = 0;
i < hitsize; ++
i)
◆ processHitVectorForPileUp()
void TileHitVecToCntTool::processHitVectorForPileUp |
( |
const TileHitVector * |
inputHits, |
|
|
double |
SubEvtTimOffset, |
|
|
std::vector< std::unique_ptr< TileHit >> & |
allHits, |
|
|
std::vector< std::unique_ptr< TileHit >> & |
allHits_DigiHSTruth, |
|
|
int & |
nHit, |
|
|
double & |
eHitTot, |
|
|
bool |
isSignal = false |
|
) |
| const |
|
private |
Definition at line 281 of file TileHitVecToCntTool.cxx.
294 for (; inpItr !=
end; ++inpItr) {
296 const TileHit * cinp = &(*inpItr);
311 if (hit_idhash >= allHits.size()) {
316 double ener = cinp->
energy();
317 double time = cinp->
time() + SubEvtTimOffset;
322 std::unique_ptr<TileHit>& pHit = allHits[hit_idhash];
323 std::unique_ptr<TileHit> inValidHit(
nullptr);
324 std::unique_ptr<TileHit>& pHit_DigiHSTruth =
m_doDigiTruth ? allHits_DigiHSTruth[hit_idhash] : inValidHit;
338 if (pHit->
size() > 1 || pHit->
energy() != 0.0)
343 <<
" offs=" << SubEvtTimOffset
344 <<
" double hit" <<
endmsg;
351 <<
" offs=" << SubEvtTimOffset
355 int hitsize = cinp->
size();
356 for (
int ind = 1; ind < hitsize; ++ind) {
358 time = cinp->
time(ind) + SubEvtTimOffset;
378 <<
" double hit from single hit" <<
endmsg;
◆ processHitVectorWithoutPileUp()
Definition at line 384 of file TileHitVecToCntTool.cxx.
397 for (; inpItr !=
end; ++inpItr) {
398 const TileHit * cinp = &(*inpItr);
399 eHitTot += cinp->
energy();
406 int hitsize = cinp->
size();
409 for (
int i = 0;
i < hitsize; ++
i) {
418 eHitTot += eHit - cinp->
energy();
424 <<
" Copy hit: ener=";
425 for (
int i = 0;
i < hitsize; ++
i)
428 for (
int i = 0;
i < hitsize; ++
i)
438 for (; inpItr !=
end; ++inpItr) {
439 const TileHit * cinp = &(*inpItr);
442 for (
int i = 0;
i <
size; ++
i) {
455 int hitsize = cinp->
size();
460 <<
" Input hit: ener=";
461 for (
int i = 0;
i < hitsize; ++
i)
464 for (
int i = 0;
i < hitsize; ++
i)
483 avtime = cosTriggerTime->time();
494 for (; inpItr !=
end; ++inpItr) {
495 const TileHit * cinp = &(*inpItr);
497 for (
int i = 0;
i <
size; ++
i) {
498 if (cinp->
time(
i) < avtime) avtime = cinp->
time(
i);
511 for (; inpItr !=
end; ++inpItr) {
512 const TileHit * cinp = &(*inpItr);
514 for (
int i = 0;
i <
size; ++
i) {
528 inpItr = inputHits->
begin();
531 for (; inpItr !=
end; ++inpItr) {
532 const TileHit * cinp = &(*inpItr);
536 for (
int i = 0;
i <
size; ++
i) {
545 int hitsize = pHit->
size();
548 for (
int i = 0;
i < hitsize; ++
i) {
561 <<
" Output hit: ener=";
562 for (
int i = 0;
i < hitsize; ++
i)
565 for (
int i = 0;
i < hitsize; ++
i)
◆ putAllHitsInContainer()
Definition at line 771 of file TileHitVecToCntTool.cxx.
777 std::vector<std::unique_ptr<TileHit>>
::iterator iHit = allHits.begin();
778 std::vector<std::unique_ptr<TileHit>>
::iterator lastHit = allHits.end();
779 std::vector<std::unique_ptr<TileHit>>
::iterator iHit_DigiHSTruth = allHits_DigiHSTruth.begin();
782 double eHitInTime = 0.0;
789 for (; iHit != lastHit; ++iHit) {
790 std::unique_ptr<TileHit>& hit = (*iHit);
791 if (hit->
size() > 1 || hit->
energy() != 0.0) {
792 eHitInTime += hit->
energy();
793 hits->push_back(getOrRelease(hit));
800 ATH_MSG_DEBUG(
" nHitUni=" << nHitUni <<
" eHitInTime="<< eHitInTime);
◆ resetFilter()
virtual void PileUpToolBase::resetFilter |
( |
| ) |
|
|
inlineoverridevirtualinherited |
◆ toProcess()
virtual bool PileUpToolBase::toProcess |
( |
int |
bunchXing | ) |
const |
|
inlineoverridevirtualinherited |
◆ E4_ETA
const int TileHitVecToCntTool::E4_ETA = 2 |
|
staticprivate |
◆ E4_N_PHI
const int TileHitVecToCntTool::E4_N_PHI = 4 |
|
staticprivate |
◆ E4_SIDE
const int TileHitVecToCntTool::E4_SIDE = -1 |
|
staticprivate |
◆ m_allHits
std::vector<std::unique_ptr<TileHit> > TileHitVecToCntTool::m_allHits |
|
private |
◆ m_allHits_DigiHSTruth
std::vector<std::unique_ptr<TileHit> > TileHitVecToCntTool::m_allHits_DigiHSTruth |
|
private |
◆ m_cabling
◆ m_cablingSvc
◆ m_deltaT
Gaudi::Property<double> TileHitVecToCntTool::m_deltaT |
|
private |
Initial value:
"Minimal Time granularity in TileHit (default=1ns)"}
minimal time granularity for TileHit
Definition at line 145 of file TileHitVecToCntTool.h.
◆ m_doDigiTruth
Gaudi::Property<bool> TileHitVecToCntTool::m_doDigiTruth |
|
private |
Initial value:{this, "DoHSTruthReconstruction", false,
"DigiTruth reconstruction"}
Definition at line 163 of file TileHitVecToCntTool.h.
◆ m_E1merged
std::vector<bool> TileHitVecToCntTool::m_E1merged |
|
private |
◆ m_filterPassed
bool PileUpToolBase::m_filterPassed {true} |
|
protectedinherited |
◆ m_firstXing
Gaudi::Property<int> PileUpToolBase::m_firstXing |
|
protectedinherited |
Initial value:{this, "FirstXing", -999,
"First bunch-crossing in which det is live"}
Definition at line 54 of file PileUpToolBase.h.
◆ m_fragHashFunc
◆ m_hitContainer_DigiHSTruthKey
Initial value:{this,"TileHitContainer_DigiHSTruth","TileHitCnt_DigiHSTruth",
"Output DigiHSTruth Tile hit container key"}
Definition at line 132 of file TileHitVecToCntTool.h.
◆ m_hitContainerKey
Initial value:{this,"TileHitContainer","TileHitCnt",
"Output Tile hit container key"}
Definition at line 129 of file TileHitVecToCntTool.h.
◆ m_hits
◆ m_hits_DigiHSTruth
◆ m_hitVectorKeys
◆ m_hitVectorNames
std::vector<std::string> TileHitVecToCntTool::m_hitVectorNames {} |
|
private |
◆ m_inputKeys
StringArrayProperty TileHitVecToCntTool::m_inputKeys |
|
private |
Initial value:{this, "TileHitVectors", {"TileHitVec"},
"Name of input hit vectors (default=TileHitVec)" }
vector with the names of TileHitVectors to use
Definition at line 124 of file TileHitVecToCntTool.h.
◆ m_lastXing
Gaudi::Property<int> PileUpToolBase::m_lastXing |
|
protectedinherited |
Initial value:{this, "LastXing", 999,
"Last bunch-crossing in which det is live"}
Definition at line 56 of file PileUpToolBase.h.
◆ m_maxHitTime
Gaudi::Property<double> TileHitVecToCntTool::m_maxHitTime |
|
private |
Initial value:
"All sub-hits with time above m_maxHitTime will be ignored"}
all sub-hits with time above m_maxHitTime will be ignored
Definition at line 151 of file TileHitVecToCntTool.h.
◆ m_MBTSmerged
std::vector<bool> TileHitVecToCntTool::m_MBTSmerged |
|
private |
◆ m_mbtsOffset
int TileHitVecToCntTool::m_mbtsOffset {0} |
|
private |
◆ m_mergeMultipleHitsInChannel
Gaudi::Property<bool> TileHitVecToCntTool::m_mergeMultipleHitsInChannel |
|
private |
Initial value:{this, "MergeMultipleHitsInChannel", true,
"Find and merge multiple hits for the same channel in container (default=true)"}
Definition at line 167 of file TileHitVecToCntTool.h.
◆ m_mergeSvc
◆ m_onlyUseContainerName
Gaudi::Property<bool> TileHitVecToCntTool::m_onlyUseContainerName {this, "OnlyUseContainerName", true, "Don't use the ReadHandleKey directly. Just extract the container name from it."} |
|
private |
◆ m_photoElectronStatistics
Gaudi::Property<int> TileHitVecToCntTool::m_photoElectronStatistics |
|
private |
Initial value:{this, "PhotostatType", 2,
"Method to apply photostatistics (default=2)"}
photoelectron statistics type: 0 - Poisson, 1 - "new" Poisson + Gauss, 2 - Poisson->Gauss
Definition at line 155 of file TileHitVecToCntTool.h.
◆ m_photoStatisticsWindow
Gaudi::Property<double> TileHitVecToCntTool::m_photoStatisticsWindow |
|
private |
Initial value:
"Sum up energy in [-m_photoStatWindow,+m_photoStatWindow] and use it for photostatistics"}
sum up energy in [-m_photoStatWindow,+m_photoStatWindow] and use it for photostatistics
Definition at line 153 of file TileHitVecToCntTool.h.
◆ m_pileUp
Gaudi::Property<bool> TileHitVecToCntTool::m_pileUp |
|
private |
Initial value:{this, "PileUp", false,
"To switch on pileup (default=false)"}
if true => pileup mode is activated
Definition at line 143 of file TileHitVecToCntTool.h.
◆ m_randomStreamName
Gaudi::Property<std::string> TileHitVecToCntTool::m_randomStreamName {this, "RandomStreamName", "Tile_HitVecToCnt", ""} |
|
private |
◆ m_rndmEvtOverlay
Gaudi::Property<bool> TileHitVecToCntTool::m_rndmEvtOverlay |
|
private |
Initial value:{this, "RndmEvtOverlay", false,
"Pileup and/or noise added by overlaying random events (default=false)"}
If true => overlay with random event (zero-luminosity pile-up)
Definition at line 159 of file TileHitVecToCntTool.h.
◆ m_rndmSvc
◆ m_run2
bool TileHitVecToCntTool::m_run2 {false} |
|
private |
◆ m_run2plus
bool TileHitVecToCntTool::m_run2plus {false} |
|
private |
◆ m_samplingFractionKey
◆ m_skipNoHit
Gaudi::Property<bool> TileHitVecToCntTool::m_skipNoHit |
|
private |
Initial value:{this, "SkipNoHit", false,
"Skip events with no Tile hits (default=false)"}
if true => skip events with no Tile hits
Definition at line 157 of file TileHitVecToCntTool.h.
◆ m_tileHWID
◆ m_tileID
◆ m_tileTBID
◆ m_timeFlag
Gaudi::Property<int> TileHitVecToCntTool::m_timeFlag |
|
private |
Initial value:{this, "HitTimeFlag", 0,
"Special options to deal with times of hits for cosmics and TB (default=0)"}
special options to deal with times of hits for cosmics and TB
Definition at line 147 of file TileHitVecToCntTool.h.
◆ m_triggerTime
Gaudi::Property<double> TileHitVecToCntTool::m_triggerTime |
|
private |
Initial value:{this, "TriggerTime", 0.0,
"Fixed trigger time value (default=0)"}
fixed trigger time value (default=0)
Definition at line 149 of file TileHitVecToCntTool.h.
◆ m_triggerTimeKey
◆ m_usePhotoStatistics
Gaudi::Property<bool> TileHitVecToCntTool::m_usePhotoStatistics |
|
private |
Initial value:{this,
"usePhotoStatistics", true, "Simulate photo statistics effect (default=true)"}
Definition at line 165 of file TileHitVecToCntTool.h.
◆ m_useTriggerTime
Gaudi::Property<bool> TileHitVecToCntTool::m_useTriggerTime |
|
private |
Initial value:{this, "UseTriggerTime", false,
"Take trigger time from external tool (default=false)"}
if true => take trigger time from external tool or from m_triggerTime
Definition at line 161 of file TileHitVecToCntTool.h.
◆ m_vetoPileUpTruthLinks
Gaudi::Property<int> PileUpToolBase::m_vetoPileUpTruthLinks |
|
protectedinherited |
Initial value:{this, "VetoPileUpTruthLinks", true,
"Ignore links to suppressed pile-up truth"}
Definition at line 58 of file PileUpToolBase.h.
◆ N_E4PRIME_CELLS
◆ N_ETA
const int TileHitVecToCntTool::N_ETA = 2 |
|
staticprivate |
◆ N_MBTS_CELLS
◆ N_PHI
const int TileHitVecToCntTool::N_PHI = 8 |
|
staticprivate |
◆ N_SIDE
const int TileHitVecToCntTool::N_SIDE = 2 |
|
staticprivate |
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
JetConstituentVector::iterator iterator
void scale(float coeff)
Scale energy of all sub-hits in a hit
Identifier identify(void) const
Return logical ID of the pmt.
float getSamplingFraction(unsigned int drawerIdx, unsigned int channel) const
Return Tile Calorimeter sampling fraction.
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
Identifier channel_id(int type, int module, int channel) const
identifer for one channel of a Tile testbeam detector
std::string to_string(const Identifier &id, int level=0) const
extract all fields from TileTB identifier Identifier get_all_fields ( const Identifier & id,...
Scalar phi() const
phi method
bool is_tiletb(const Identifier &id) const
Test ID if it is TileTBID.
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
AtlasHitsVector< TileHit >::const_iterator TileHitVecConstIterator
Scalar eta() const
pseudorapidity method
float round(const float toRound, const unsigned int decimals)
int side(const Identifier &id) const
int sample(const Identifier &id) const
const T * get(size_type n) const
Access an element, as an rvalue.
int frag(const HWIdentifier &id) const
extract frag field from HW identifier
size_type drawer_hash_max(void) const
drawer hash table max size
int tower(const Identifier &id) const
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
bool empty() const
Test if the key is blank.
int type(const Identifier &id) const
extract type field from TileTB identifier
const_iterator begin() const
int size(void) const
Return length of energy/time vectors
int module(const Identifier &id) const
extract module field from TileTB identifier
int channel(const HWIdentifier &id) const
extract channel field from HW identifier
int ros(const HWIdentifier &id) const
extract ros field from HW identifier
std::list< value_t > type
type of the collection of timed data object
OwnershipPolicy
describes the possible element ownership policies (see e.g. DataVector)
float getNumberOfPhotoElectrons(unsigned int drawerIdx, unsigned int channel) const
Return number of photoelectrons per 1 GeV in Tile Calorimeter scintilator.
bool isRun2PlusCabling() const
virtual int get_id(const IdentifierHash &hash_id, Identifier &id, const IdContext *context=0) const
create compact id from hash id (return == 0 for OK)
std::vector< std::unique_ptr< TileHitCollection > >::iterator iterator
int module(const Identifier &id) const
(Non-const) Iterator class for DataVector/DataList.
@ OWN_ELEMENTS
this data object owns its elements
IdContext channel_context(void) const
idContext for channels
int add(float energy, float time)
Add sub-hit to a given hit.
#define CHECK(...)
Evaluate an expression and check for errors.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
bool isRun2Cabling() const
void initialize(const TileHWID *tileHWID, TYPE type=Default)
int channel(const Identifier &id) const
extract channel field from TileTB identifier
virtual int get_hash(const Identifier &id, IdentifierHash &hash_id, const IdContext *context=0) const
create hash id from compact id (return == 0 for OK)
void push_back(element_t *rc)
HWIdentifier drawer_id(int frag) const
ROS HWIdentifer.
bool is_MBTS_merged_run2plus(int module) const
A wrapper class for event-slot-local random engines.
StatusCode initialize(bool used=true)
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
size_type pmt_hash_max(void) const
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
int drawer(const HWIdentifier &id) const
extract drawer field from HW identifier
def time(flags, cells_name, *args, **kw)
HWIdentifier pmt_HWID(void) const
Return pmt hardware ID (== channel ID)
std::string to_string(const Identifier &id, int level=0) const
#define ATH_MSG_WARNING(x)
float energy(int ind=0) const
Return energy of ind-th sub-hit
Identifier pmt_id(const Identifier &any_id) const
const_iterator end() const
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
void setTime(float t, int ind=0)
Set time of ind-th sub-hit in a hit
IdContext pmt_context(void) const
id for PMTs
int phi(const Identifier &id) const
extract phi field from MBTS identifier
static unsigned int getDrawerIdx(unsigned int ros, unsigned int drawer)
Returns a drawer hash.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
iterator erase(iterator position)
Remove element at a given position.
Identifier cell_id(const Identifier &any_id) const
float time(int ind=0) const
Return time of ind-th sub-hit
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
int E1_merged_with_run2plus(int ros, int module) const
Identifier pmt_ID(void) const
Return logical ID of the pmt.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
int side(const Identifier &id) const
define synonyms for minimum bias scintillators
HWIdentifier s2h_channel_id(const Identifier &id) const