11#include "GaudiKernel/ThreadLocalContext.h"
72 ISvcLocator* pSvcLocator)
231 m_tree =
new TTree(
"CollectionTree",
"CollectionTree" );
232 std::string treeName =
"/TTREE/CollectionTree" ;
351 return StatusCode::SUCCESS;
359 return StatusCode::SUCCESS;
492 return StatusCode::SUCCESS;
504 return StatusCode::SUCCESS;
512 return StatusCode::SUCCESS;
519 return StatusCode::SUCCESS;
523 if (
sc.isFailure()) {
525 return StatusCode::SUCCESS;
536 return StatusCode::SUCCESS;
545 std::string mychain(
"L1_J75" );
546 if( !
m_trigDec->getListOfTriggers(mychain).empty() ){
549 mychain =
"L1_J10_EMPTY";
550 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
553 mychain =
"L1_J30_FIRSTEMPTY";
554 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
557 mychain =
"L1_J30_EMPTY";
558 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
562 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
566 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
569 mychain =
"L1_XE50_BGRP7";
570 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
574 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
579 mychain =
"EF_j165_u0uchad_LArNoiseBurst";
580 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
583 mychain =
"EF_j30_u0uchad_empty_LArNoiseBurst";
584 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
587 mychain =
"EF_j55_u0uchad_firstempty_LArNoiseBurst";
588 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
591 mychain =
"EF_j55_u0uchad_empty_LArNoiseBurst";
592 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
595 mychain =
"EF_xe45_LArNoiseBurst";
596 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
599 mychain =
"EF_xe55_LArNoiseBurst";
600 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
603 mychain =
"EF_xe60_LArNoiseBurst";
604 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
607 mychain =
"EF_j55_u0uchad_firstempty_LArNoiseBurstT";
608 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
611 mychain =
"EF_j100_u0uchad_LArNoiseBurstT";
612 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
615 mychain =
"EF_j165_u0uchad_LArNoiseBurstT";
616 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
619 mychain =
"EF_j130_u0uchad_LArNoiseBurstT";
620 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
623 mychain =
"EF_j35_u0uchad_empty_LArNoiseBurst";
624 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
627 mychain =
"EF_j35_u0uchad_firstempty_LArNoiseBurst";
628 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
631 mychain =
"EF_j80_u0uchad_LArNoiseBurstT";
632 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
636 return StatusCode::SUCCESS;
663 if (!bunchCrossing) {
665 return StatusCode::FAILURE;
678 return StatusCode::FAILURE;
682 bool checkfirstbunch =
true;
683 for(
int i=1;i<=distFromFront;i++){
693 checkfirstbunch =
false;
701 for (
const auto& streamInfo : eventInfo->
streamTags()) {
702 const std::string& stream_name = streamInfo.name();
703 const std::string& stream_type = streamInfo.type();
708 if(streamInfo.name()==
"CosmicCalo" && streamInfo.type()==
"physics"){
737 StatusCode
sc =
evtStore()->retrieve(larTime,
"LArCollisionTime");
742 ATH_MSG_DEBUG (
"LArCollisionTime successfully retrieved from event store" );
757 return StatusCode::SUCCESS;
765 const EventContext& ctx = Gaudi::Hive::currentContext();
771 return StatusCode::SUCCESS;
777 ATH_MSG_WARNING(
"Do not have bad chan info, not storing LarCellInfo ");
778 return StatusCode::SUCCESS;
788 auto hwidlist = noisyRO->get_noisy_hvlines();
789 for (
auto hw : hwidlist) {
794 ATH_MSG_WARNING(
"Do not have LArNoisyROSummary object, no HVlines filled !!");
813 if (caloTES==
nullptr && LArTES==
nullptr) {
814 ATH_MSG_WARNING (
"Neither CaloCell nor LArRawChannel Containers found!" );
815 return StatusCode::SUCCESS;
836 for (
const CaloCell* cell : *caloTES) {
838 if (caloDDE->
is_tile())
continue;
840 try {onlID = cabling->createSignalChannelID(cell->ID());}
847 bool connected = cabling->isOnlineConnected(onlID);
848 if(!connected)
continue;
849 eCalo = cell->energy();
850 qfactor = cell->quality();
853 ATH_CHECK(
fillCell(onlID, eCalo, qfactor, gain, cabling, bcCont, **totalNoise,caloMgr));
857 std::vector<HWIdentifier> chdone;
859 LArRawChannelContainer::const_iterator caloItr;
860 for(caloItr=LArTES_dig->begin();caloItr!=LArTES_dig->end();++caloItr){
862 bool connected = cabling->isOnlineConnected(onlID);
863 if(!connected)
continue;
864 eCalo = caloItr->energy();
865 qfactor = caloItr->quality();
866 gain = caloItr->gain();
868 ATH_CHECK(
fillCell(onlID, eCalo, qfactor, gain, cabling, bcCont, **totalNoise,caloMgr));
869 chdone.push_back(onlID);
875 LArRawChannelContainer::const_iterator caloItr;
876 for(caloItr=LArTES->begin();caloItr!=LArTES->end();++caloItr){
878 if(std::find(chdone.begin(), chdone.end(), onlID) != chdone.end())
continue;
879 bool connected = cabling->isOnlineConnected(onlID);
880 if(!connected)
continue;
881 eCalo = caloItr->energy();
882 qfactor = caloItr->quality();
883 gain = caloItr->gain();
885 ATH_CHECK(
fillCell(onlID, eCalo, qfactor, gain, cabling, bcCont, **totalNoise,caloMgr));
901 if(LArTES_dig)
ATH_MSG_DEBUG (
"all LArRawCh. from digi size = "<<
int(LArTES_dig->size()));
902 if(LArTES)
ATH_MSG_DEBUG (
"all LArRawCh. size = "<<
int(LArTES->size()));
910 bool checknoise =
false;
912 for(
unsigned int i=0;i<8;i++){
928 return StatusCode::SUCCESS;
931 bool store_condition =
false;
935 store_condition =
true;
941 store_condition =
true;
947 std::vector<short> samples;
949 for(
unsigned int k=0;k<
v_etacell.size();k++){
953 for (
const LArDigit* pLArDigit : *LArDigitCont) {
956 for(
unsigned int j=0;j<
v_IdHash.size();j++){
958 ATH_MSG_DEBUG (
"find a IdentifierHash of the noisy cell in LArDigit container " );
959 samples = pLArDigit->samples();
971 for(
unsigned int i=0;i<
v_etacell.size();i++){
1005 return StatusCode::SUCCESS;
1018 const Identifier idd = cabling->cnvToIdentifier(onlID);
1024 float phi = caloDDE->
phi();
1025 float noise = totalNoise.
getNoise (idd, gain);
1026 float significance = eCalo / noise ;
1027 float eta = caloDDE->
eta();
1028 bool badcell = ! (bcCont->
status(onlID)).good();
1029 unsigned int partition = 0;
1031 if(is_lar_em_barrel){
1039 if(is_lar_em_endcap){
1062 for(
unsigned int k=0;k<8;k++){
1069 if(qfactor>=10000 && qfactor<65535){
m_hiqfactor++;}
1071 ATH_MSG_DEBUG (
"Satured cell at eta: "<<
eta<<
", phi: "<<
phi<<
", energy: "<<eCalo<<
", partition: "<<partition);
1089 if(significance >
m_sigmacut || qfactor > 4000){
1117 ATH_MSG_DEBUG (
"Noisy cell: "<<
m_noisycell<<
" "<<cabling->cnvToIdentifier(onlID)<<
" q: "<<qfactor<<
" sign.: "<<significance<<
" noise: "<<noise);
1118 for(
unsigned int k=0;k<8;k++){
1131 return StatusCode::SUCCESS;
1148 if(bc<0) caloindex = sampling+4;
1149 else caloindex = sampling;
1151 if(bc<0) caloindex = sampling+12;
1152 else caloindex = sampling+8;
1157 if(bc<0) caloindex = sampling+20;
1158 else caloindex = sampling+16;
1162 if(bc<0) caloindex = sampling+26;
1163 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_DEBUG(x,...)
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_WARNING(x,...)
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
int nlarcell
LArNoiseBursts Author: Josu Cantero UAM, November, 2010 Modified by Hideki Okawa BNL,...
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.
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
virtual StatusCode execute(const EventContext &ctx) override
Execute - on event by event.
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)
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
EventInfo_v1 EventInfo
Definition of the latest event info version.
int run(int argc, char *argv[])