11#include "GaudiKernel/ThreadLocalContext.h"
50#include "CLHEP/Vector/LorentzVector.h"
85 ISvcLocator* pSvcLocator)
244 m_tree =
new TTree(
"CollectionTree",
"CollectionTree" );
245 std::string treeName =
"/TTREE/CollectionTree" ;
364 return StatusCode::SUCCESS;
372 return StatusCode::SUCCESS;
505 return StatusCode::SUCCESS;
517 return StatusCode::SUCCESS;
525 return StatusCode::SUCCESS;
532 return StatusCode::SUCCESS;
536 if (
sc.isFailure()) {
538 return StatusCode::SUCCESS;
549 return StatusCode::SUCCESS;
558 std::string mychain(
"L1_J75" );
559 if( !
m_trigDec->getListOfTriggers(mychain).empty() ){
562 mychain =
"L1_J10_EMPTY";
563 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
566 mychain =
"L1_J30_FIRSTEMPTY";
567 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
570 mychain =
"L1_J30_EMPTY";
571 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
575 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
579 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
582 mychain =
"L1_XE50_BGRP7";
583 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
587 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
592 mychain =
"EF_j165_u0uchad_LArNoiseBurst";
593 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
596 mychain =
"EF_j30_u0uchad_empty_LArNoiseBurst";
597 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
600 mychain =
"EF_j55_u0uchad_firstempty_LArNoiseBurst";
601 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
604 mychain =
"EF_j55_u0uchad_empty_LArNoiseBurst";
605 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
608 mychain =
"EF_xe45_LArNoiseBurst";
609 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
612 mychain =
"EF_xe55_LArNoiseBurst";
613 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
616 mychain =
"EF_xe60_LArNoiseBurst";
617 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
620 mychain =
"EF_j55_u0uchad_firstempty_LArNoiseBurstT";
621 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
624 mychain =
"EF_j100_u0uchad_LArNoiseBurstT";
625 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
628 mychain =
"EF_j165_u0uchad_LArNoiseBurstT";
629 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
632 mychain =
"EF_j130_u0uchad_LArNoiseBurstT";
633 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
636 mychain =
"EF_j35_u0uchad_empty_LArNoiseBurst";
637 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
640 mychain =
"EF_j35_u0uchad_firstempty_LArNoiseBurst";
641 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
644 mychain =
"EF_j80_u0uchad_LArNoiseBurstT";
645 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
649 return StatusCode::SUCCESS;
676 if (!bunchCrossing) {
678 return StatusCode::FAILURE;
691 bool checkfirstbunch =
true;
692 for(
unsigned int i=1;i<=distFromFront;i++){
702 checkfirstbunch =
false;
712 for (
const auto& streamInfo : eventInfo->
streamTags()) {
713 const std::string& stream_name = streamInfo.name();
714 const std::string& stream_type = streamInfo.type();
719 if(streamInfo.name()==
"CosmicCalo" && streamInfo.type()==
"physics"){
779 StatusCode
sc =
evtStore()->retrieve(larTime,
"LArCollisionTime");
784 ATH_MSG_DEBUG (
"LArCollisionTime successfully retrieved from event store" );
799 return StatusCode::SUCCESS;
807 const EventContext& ctx = Gaudi::Hive::currentContext();
813 return StatusCode::SUCCESS;
819 ATH_MSG_WARNING(
"Do not have bad chan info, not storing LarCellInfo ");
820 return StatusCode::SUCCESS;
830 auto hwidlist = noisyRO->get_noisy_hvlines();
831 for (
auto hw : hwidlist) {
836 ATH_MSG_WARNING(
"Do not have LArNoisyROSummary object, no HVlines filled !!");
855 if (caloTES==
nullptr && LArTES==
nullptr) {
856 ATH_MSG_WARNING (
"Neither CaloCell nor LArRawChannel Containers found!" );
857 return StatusCode::SUCCESS;
878 for (
const CaloCell* cell : *caloTES) {
880 if (caloDDE->
is_tile())
continue;
882 try {onlID = cabling->createSignalChannelID(cell->ID());}
889 bool connected = cabling->isOnlineConnected(onlID);
890 if(!connected)
continue;
891 eCalo = cell->energy();
892 qfactor = cell->quality();
895 ATH_CHECK(
fillCell(onlID, eCalo, qfactor, gain, cabling, bcCont, **totalNoise,caloMgr));
899 std::vector<HWIdentifier> chdone;
901 LArRawChannelContainer::const_iterator caloItr;
902 for(caloItr=LArTES_dig->begin();caloItr!=LArTES_dig->end();++caloItr){
904 bool connected = cabling->isOnlineConnected(onlID);
905 if(!connected)
continue;
906 eCalo = caloItr->energy();
907 qfactor = caloItr->quality();
908 gain = caloItr->gain();
910 ATH_CHECK(
fillCell(onlID, eCalo, qfactor, gain, cabling, bcCont, **totalNoise,caloMgr));
911 chdone.push_back(onlID);
917 LArRawChannelContainer::const_iterator caloItr;
918 for(caloItr=LArTES->begin();caloItr!=LArTES->end();++caloItr){
920 if(std::find(chdone.begin(), chdone.end(), onlID) != chdone.end())
continue;
921 bool connected = cabling->isOnlineConnected(onlID);
922 if(!connected)
continue;
923 eCalo = caloItr->energy();
924 qfactor = caloItr->quality();
925 gain = caloItr->gain();
927 ATH_CHECK(
fillCell(onlID, eCalo, qfactor, gain, cabling, bcCont, **totalNoise,caloMgr));
943 if(LArTES_dig)
ATH_MSG_DEBUG (
"all LArRawCh. from digi size = "<<
int(LArTES_dig->size()));
944 if(LArTES)
ATH_MSG_DEBUG (
"all LArRawCh. size = "<<
int(LArTES->size()));
952 bool checknoise =
false;
954 for(
unsigned int i=0;i<8;i++){
970 return StatusCode::SUCCESS;
973 bool store_condition =
false;
977 store_condition =
true;
983 store_condition =
true;
989 std::vector<short> samples;
991 for(
unsigned int k=0;k<
v_etacell.size();k++){
995 for (
const LArDigit* pLArDigit : *LArDigitCont) {
998 for(
unsigned int j=0;j<
v_IdHash.size();j++){
1000 ATH_MSG_DEBUG (
"find a IdentifierHash of the noisy cell in LArDigit container " );
1001 samples = pLArDigit->samples();
1013 for(
unsigned int i=0;i<
v_etacell.size();i++){
1047 return StatusCode::SUCCESS;
1060 const Identifier idd = cabling->cnvToIdentifier(onlID);
1066 float phi = caloDDE->
phi();
1067 float noise = totalNoise.
getNoise (idd, gain);
1068 float significance = eCalo / noise ;
1069 float eta = caloDDE->
eta();
1070 bool badcell = ! (bcCont->
status(onlID)).good();
1073 if(is_lar_em_barrel){
1081 if(is_lar_em_endcap){
1104 for(
unsigned int k=0;k<8;k++){
1111 if(qfactor>=10000 && qfactor<65535){
m_hiqfactor++;}
1131 if(significance >
m_sigmacut || qfactor > 4000){
1159 ATH_MSG_DEBUG (
"Noisy cell: "<<
m_noisycell<<
" "<<cabling->cnvToIdentifier(onlID)<<
" q: "<<qfactor<<
" sign.: "<<significance<<
" noise: "<<noise);
1160 for(
unsigned int k=0;k<8;k++){
1173 return StatusCode::SUCCESS;
1190 if(bc<0) caloindex = sampling+4;
1191 else caloindex = sampling;
1193 if(bc<0) caloindex = sampling+12;
1194 else caloindex = sampling+8;
1199 if(bc<0) caloindex = sampling+20;
1200 else caloindex = sampling+16;
1204 if(bc<0) caloindex = sampling+26;
1205 else caloindex = sampling+23;
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
Calo Subsystem specific Detector Elements + Dummy element for testing.
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
LArBadXCont< LArBadChannel > LArBadChannelCont
std::vector< int > v_cellpartlayerindex
std::vector< float > v_signifcell
std::vector< float > v_qfactorcell
std::vector< bool > v_isbadcell
std::vector< bool > v_isendcap
std::vector< short > v_slot_noisy
std::vector< float > v_etacell
std::vector< HWIdentifier > v_onlIdentifier
std::vector< float > v_phicell
std::vector< Identifier > v_cellIdentifier
std::vector< short > v_layer
std::vector< short > v_posneg_noisy
std::vector< bool > v_isbarrel
std::vector< IdentifierHash > v_IdHash
std::vector< short > v_barrelec_noisy
std::vector< float > v_energycell
std::vector< bool > v_isfcal
std::vector< bool > v_ishec
std::vector< short > v_channel_noisy
std::vector< int > v_noisycellHVphi
std::vector< int > v_noisycellHVeta
std::vector< int > v_partition
std::vector< short > v_ft_noisy
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
ServiceHandle< StoreGateSvc > & evtStore()
const ServiceHandle< StoreGateSvc > & detStore() const
int distanceFromFront(const bcid_type bcid, const BunchDistanceType type=NanoSec) const
The distance of the specific bunch crossing from the front of the train.
@ BunchCrossings
Distance in units of 25 nanoseconds.
BunchCrossingType bcType(const bcid_type bcid) const
Convenience function for the type of the specific bunch crossing.
bool isInTrain(const bcid_type bcid) const
Function deciding if a given bunch crossing is in a filled train.
bool isFilled(const bcid_type bcid) const
The simplest query: Is the bunch crossing filled or not?
Container class for CaloCell.
Helper class for offline cell identifiers.
const LArFCAL_ID * fcal_idHelper() const
access to FCAL idHelper
const LArEM_ID * em_idHelper() const
access to EM idHelper
const LArHEC_ID * hec_idHelper() const
access to HEC idHelper
Data object for each calorimeter readout cell.
This class groups all DetDescr information related to a CaloCell.
virtual int getLayer() const
cell layer
bool is_tile() const
cell belongs to Tile
float eta() const
cell eta
float phi() const
cell phi
bool is_lar_em_endcap() const
cell belongs to EM end cap
bool is_lar_hec() const
cell belongs to HEC
bool is_lar_em_barrel() const
cell belongs to EM barrel
bool is_lar_fcal() const
cell belongs to FCAL
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
This class provides the client interface for accessing the detector description information common to...
float getNoise(const IdentifierHash h, const int gain) const
Accessor by IdentifierHash and gain.
size_type size() const noexcept
Returns the number of elements in the collection.
This is a "hash" representation of an Identifier.
LArBC_t status(const HWIdentifier channel) const
Query the status of a particular channel or FEB This is the main client access method.
Holds information about collisions timing from end-cap LAr calorimeters.
int ncellA() const
get number of cells for time A side
double timeA() const
time A side
int ncellC() const
get number of cells for time C side
double timeC() const
time C side
Container class for LArDigit.
Liquid Argon digit base class.
Helper for the Liquid Argon Calorimeter cell at the electrode level.
Helper for the Liquid Argon Calorimeter High-Voltage identifiers.
Exception class for LAr Identifiers.
std::vector< short > m_nt_cellpartlayerindex
std::vector< float > m_nt_etacell
const LArHEC_ID * m_LArHEC_IDHelper
const LArHVLineID * m_LArHVLineIDHelper
SG::ReadCondHandleKey< CaloNoise > m_totalNoiseKey
bool m_nt_larflag_mediumSaturatedDQ
bool m_nt_larflag_dataCorruptedVeto
std::vector< short > m_nt_ft_sat
std::vector< float > m_nt_signifcell
std::vector< int > m_nt_noisycellHVphi
bool m_nt_larflag_tightSaturatedDQ
std::vector< float > m_nt_phicell
std::vector< unsigned int > m_nt_badHVlines
virtual StatusCode clear()
Clear - clear CBNT members.
std::vector< int > m_nt_partition
bool m_nt_EF_j165_u0uchad_LArNoiseBurstT
bool m_nt_EF_j30_u0uchad_empty_LArNoiseBurst
int GetPartitionLayerIndex(const Identifier &id)
unsigned int m_nt_stablebeams
std::vector< short > m_nt_posneg_noisy
StatusCode doLArNoiseBursts()
virtual StatusCode finalize() override
Finalize - delete any memory allocation from the heap.
virtual StatusCode initialize() override
std::vector< float > m_nt_etacell_sat
bool m_nt_EF_j165_u0uchad_LArNoiseBurst
bool m_nt_EF_j55_u0uchad_firstempty_LArNoiseBurstT
bool m_nt_EF_j35_u0uchad_firstempty_LArNoiseBurst
const LArElectrodeID * m_LArElectrodeIDHelper
bool m_nt_EF_xe45_LArNoiseBurst
std::vector< int > m_nt_layer_sat
std::vector< float > m_nt_energycell
const LArEM_ID * m_LArEM_IDHelper
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
bool m_nt_EF_j130_u0uchad_LArNoiseBurstT
ServiceHandle< ITHistSvc > m_thistSvc
std::vector< float > m_nt_energy_sat
std::vector< short > m_nt_barrelec_noisy
std::vector< short > m_nt_slot_noisy
std::vector< int > m_nt_isbadcell
bool m_nt_L1_J30_FIRSTEMPTY
bool m_nt_EF_xe55_LArNoiseBurst
bool m_nt_larflag_badFEBS_w
bool m_nt_larflag_noiseBurstVeto
const LArOnlineID * m_LArOnlineIDHelper
std::vector< int > m_nt_noisycellHVeta
SG::ReadCondHandleKey< LArBadChannelCont > m_BCKey
bool m_nt_EF_j55_u0uchad_empty_LArNoiseBurst
std::vector< int > m_nt_partition_sat
std::vector< int > m_nt_layer
std::vector< float > m_nt_noisycellpart
bool m_nt_larflag_mnbTight
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
std::vector< int > m_nt_posneg_sat
SG::ReadCondHandleKey< BunchCrossingCondData > m_bcDataKey
StatusCode doTrigger()
methods called by execute()
bool m_nt_EF_j80_u0uchad_LArNoiseBurstT
std::vector< int > m_nt_barrelec_sat
std::vector< std::string > m_nt_streamTagType
bool m_nt_larflag_mnbLoose
bool m_nt_EF_j35_u0uchad_empty_LArNoiseBurst
std::vector< int > m_nt_isbadcell_sat
SG::ReadHandleKey< LArNoisyROSummary > m_NoisyROKey
bool m_nt_EF_xe60_LArNoiseBurst
std::vector< float > m_nt_qfactorcell
LArNoiseBursts(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
bool m_nt_EF_j55_u0uchad_firstempty_LArNoiseBurst
std::vector< short > m_nt_slot_sat
std::vector< float > m_nt_phicell_sat
unsigned int m_nt_atlasready
bool m_nt_larflag_dataCorrupted
std::vector< unsigned int > m_nt_cellIdentifier_sat
std::vector< unsigned int > m_nt_cellIdentifier
std::vector< unsigned int > m_nt_onlIdentifier
std::vector< int > m_nt_gain
bool m_nt_larflag_badFEBs
StatusCode fillCell(HWIdentifier onlID, float eCalo, float qfactor, CaloGain::CaloGain gain, const LArOnOffIdMapping *cabling, const LArBadChannelCont *bcCont, const CaloNoise &totalNoise, const CaloDetDescrManager *caloMgr)
virtual StatusCode execute() override
Execute - on event by event.
unsigned int m_frontbunches
bool m_nt_EF_j100_u0uchad_LArNoiseBurstT
bool m_nt_larflag_mnbTight_psveto
uint8_t m_nt_badHVPartitions
std::vector< short > m_nt_ft_noisy
StatusCode doEventProperties()
const LArFCAL_ID * m_LArFCAL_IDHelper
bool m_nt_larflag_badHVlines
std::vector< std::vector< short > > m_nt_samples
std::vector< short > m_nt_channel_sat
std::vector< short > m_nt_channel_noisy
PublicToolHandle< Trig::TrigDecisionTool > m_trigDec
std::vector< int > m_nt_isBunchesInFront
std::vector< std::string > m_nt_streamTagName
Container for LArRawChannel (IDC using LArRawChannelCollection)
virtual bool isValid() override final
Can the handle be successfully dereferenced?
uint32_t lumiBlock() const
The current event's luminosity block number.
uint32_t bcid() const
The bunch crossing ID of the event.
@ LAr
The LAr calorimeter.
bool isEventFlagBitSet(EventFlagSubDet subDet, size_t bit) const
Check one particular bit of one particular sub-detector.
uint32_t timeStamp() const
POSIX time in seconds from 1970. January 1st.
const std::vector< StreamTag > & streamTags() const
Get the streams that the event was put in.
uint32_t runNumber() const
The current event's run number.
uint32_t timeStampNSOffset() const
Nanosecond time offset wrt. the time stamp.
uint64_t eventNumber() const
The current event's event number.
bool contains(const std::string &s, const std::string ®x)
does a string contain the substring
@ MININOISEBURSTTIGHT_PSVETO
DataModel_detail::iterator< DVL > partition(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end, Predicate pred)
Specialization of partition for DataVector/List.
EventInfo_v1 EventInfo
Definition of the latest event info version.