|
ATLAS Offline Software
|
Go to the documentation of this file.
11 #include "GaudiKernel/ThreadLocalContext.h"
50 #include "CLHEP/Vector/LorentzVector.h"
85 ISvcLocator* pSvcLocator)
88 m_LArOnlineIDHelper(nullptr),
89 m_LArHVLineIDHelper(nullptr),
90 m_LArElectrodeIDHelper(nullptr),
91 m_LArEM_IDHelper(nullptr),
92 m_LArFCAL_IDHelper(nullptr),
93 m_LArHEC_IDHelper(nullptr),
94 m_CosmicCaloStream(false),
109 m_nt_isbcidFilled(0),
110 m_nt_isbcidInTrain(0),
111 m_nt_isBunchesInFront(0),
116 m_nt_streamTagName(0),
117 m_nt_streamTagType(0),
118 m_nt_larflag_badFEBs(false),
119 m_nt_larflag_mediumSaturatedDQ(false),
120 m_nt_larflag_tightSaturatedDQ(false),
121 m_nt_larflag_noiseBurstVeto(false),
122 m_nt_larflag_dataCorrupted(false),
123 m_nt_larflag_dataCorruptedVeto(false),
124 m_nt_larflag_badFEBS_w(false),
125 m_nt_larflag_mnbLoose(false),
126 m_nt_larflag_mnbTight(false),
127 m_nt_larflag_mnbTight_psveto(false),
128 m_nt_larflag_badHVlines(false),
129 m_nt_badHVPartitions(0),
131 m_nt_L1_J10_EMPTY(false),
132 m_nt_L1_J30_FIRSTEMPTY(false),
133 m_nt_L1_J30_EMPTY(false),
136 m_nt_L1_XE50_BGRP7(false),
138 m_nt_EF_j165_u0uchad_LArNoiseBurst(false),
139 m_nt_EF_j30_u0uchad_empty_LArNoiseBurst(false),
140 m_nt_EF_j55_u0uchad_firstempty_LArNoiseBurst(false),
141 m_nt_EF_j55_u0uchad_empty_LArNoiseBurst(false),
142 m_nt_EF_xe45_LArNoiseBurst(false),
143 m_nt_EF_xe55_LArNoiseBurst(false),
144 m_nt_EF_xe60_LArNoiseBurst(false),
145 m_nt_EF_j55_u0uchad_firstempty_LArNoiseBurstT(false),
146 m_nt_EF_j100_u0uchad_LArNoiseBurstT(false),
147 m_nt_EF_j165_u0uchad_LArNoiseBurstT(false),
148 m_nt_EF_j130_u0uchad_LArNoiseBurstT(false),
149 m_nt_EF_j35_u0uchad_empty_LArNoiseBurst(false),
150 m_nt_EF_j35_u0uchad_firstempty_LArNoiseBurst(false),
151 m_nt_EF_j80_u0uchad_LArNoiseBurstT(false),
162 m_nt_barrelec_noisy(0),
163 m_nt_posneg_noisy(0),
166 m_nt_channel_noisy(0),
167 m_nt_cellpartlayerindex(0),
168 m_nt_cellIdentifier(0),
169 m_nt_onlIdentifier(0),
170 m_nt_noisycellpart(0),
171 m_nt_noisycellHVphi(0),
172 m_nt_noisycellHVeta(0),
178 m_nt_isbadcell_sat(0),
179 m_nt_barrelec_sat(0),
184 m_nt_partition_sat(0),
189 m_nt_cellIdentifier_sat(0)
234 const CaloCell_ID* idHelper =
nullptr;
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"){
778 if (
evtStore()->contains<LArCollisionTime>(
"LArCollisionTime")) {
784 ATH_MSG_DEBUG (
"LArCollisionTime successfully retrieved from event store" );
799 return StatusCode::SUCCESS;
807 const EventContext& ctx = Gaudi::Hive::currentContext();
810 const LArOnOffIdMapping*
cabling=*larCablingHdl;
813 return StatusCode::SUCCESS;
819 ATH_MSG_WARNING(
"Do not have bad chan info, not storing LarCellInfo ");
820 return StatusCode::SUCCESS;
831 for (
auto hw : hwidlist) {
836 ATH_MSG_WARNING(
"Do not have LArNoisyROSummary object, no HVlines filled !!");
844 if(
evtStore()->contains<CaloCellContainer>(
"AllCalo")) {
846 }
else if (
evtStore()->contains<LArRawChannelContainer>(
"LArRawChannels") ||
evtStore()->contains<LArRawChannelContainer>(
"LArRawChannels_fB")) {
847 if (
evtStore()->contains<LArRawChannelContainer>(
"LArRawChannels")) {
850 if (
evtStore()->contains<LArRawChannelContainer>(
"LArRawChannels_fB")) {
855 if (caloTES==
nullptr && LArTES==
nullptr) {
856 ATH_MSG_WARNING (
"Neither CaloCell nor LArRawChannel Containers found!" );
857 return StatusCode::SUCCESS;
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();
899 std::vector<HWIdentifier> chdone;
901 LArRawChannelContainer::const_iterator caloItr;
902 for(caloItr=LArTES_dig->begin();caloItr!=LArTES_dig->end();++caloItr){
903 HWIdentifier onlID=caloItr->identify();
904 bool connected =
cabling->isOnlineConnected(onlID);
905 if(!connected)
continue;
906 eCalo = caloItr->energy();
907 qfactor = caloItr->quality();
908 gain = caloItr->gain();
911 chdone.push_back(onlID);
917 LArRawChannelContainer::const_iterator caloItr;
918 for(caloItr=LArTES->begin();caloItr!=LArTES->end();++caloItr){
919 HWIdentifier onlID=caloItr->identify();
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();
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;
995 for (
const LArDigit* pLArDigit : *LArDigitCont) {
996 HWIdentifier
id2 = pLArDigit->hardwareID();
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();
1047 return StatusCode::SUCCESS;
1055 ,
const LArOnOffIdMapping*
cabling
1066 float phi = caloDDE->
phi();
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){
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;
def retrieve(aClass, aKey=None)
std::vector< float > m_nt_phicell_sat
virtual StatusCode finalize() override
Finalize - delete any memory allocation from the heap.
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
std::vector< float > v_phicell
std::vector< short > m_nt_channel_sat
std::vector< float > m_nt_signifcell
SG::ReadCondHandleKey< LArBadChannelCont > m_BCKey
std::vector< std::vector< short > > m_nt_samples
bool m_nt_EF_j165_u0uchad_LArNoiseBurstT
std::vector< float > m_nt_qfactorcell
std::vector< int > m_nt_partition
IdentifierHash channel_Hash(HWIdentifier channelId) const
Create channel_hash from channel_Id.
std::vector< short > m_nt_ft_sat
std::vector< bool > v_isfcal
ServiceHandle< ITHistSvc > m_thistSvc
unsigned int m_nt_atlasready
Scalar phi() const
phi method
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
bool m_nt_larflag_mnbTight
std::string find(const std::string &s)
return a remapped string
bool m_nt_larflag_dataCorruptedVeto
uint64_t eventNumber() const
The current event's event number.
std::vector< short > v_barrelec_noisy
bool is_lar_fcal(Identifier id) const
std::vector< short > m_nt_barrelec_noisy
Holds information about collisions timing from end-cap LAr calorimeters.
int pos_neg(const Identifier id) const
pos_neg : +/- 2 (A/C side)
Scalar eta() const
pseudorapidity method
Helper for the Liquid Argon Calorimeter cell at the electrode level.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::vector< float > v_qfactorcell
std::vector< std::string > m_nt_streamTagName
Conditions-Data class holding LAr Bad Channel or Bad Feb information.
std::vector< unsigned int > m_nt_onlIdentifier
std::vector< short > m_nt_posneg_noisy
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
std::vector< short > m_nt_channel_noisy
std::vector< int > v_cellpartlayerindex
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
bool m_nt_EF_j130_u0uchad_LArNoiseBurstT
std::vector< float > m_nt_energycell
int slot(const HWIdentifier id) const
Return the slot number of a hardware cell identifier: slot = [1,15] Slot-ID in top part of the crat...
StatusCode doLArNoiseBursts()
int module(const Identifier id) const
module [1,3]
std::vector< Identifier > v_cellIdentifier
StatusCode doEventProperties()
int sampling(const Identifier id) const
return sampling according to :
LArNoiseBursts(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
std::vector< bool > v_isendcap
std::vector< int > m_nt_posneg_sat
std::vector< bool > v_isbarrel
std::vector< unsigned int > m_nt_cellIdentifier
std::vector< int > m_nt_isBunchesInFront
bool is_lar_em_endcap() const
cell belongs to EM end cap
bool m_nt_larflag_badFEBs
bool m_nt_larflag_mediumSaturatedDQ
uint32_t timeStampNSOffset() const
Nanosecond time offset wrt. the time stamp.
bool m_nt_larflag_tightSaturatedDQ
bool m_nt_EF_j55_u0uchad_firstempty_LArNoiseBurst
std::vector< HWIdentifier > v_onlIdentifier
float getNoise(const IdentifierHash h, const int gain) const
Accessor by IdentifierHash and gain.
std::vector< unsigned int > m_nt_cellIdentifier_sat
int barrel_ec(const HWIdentifier id) const
Return the position barrel or endcap of a hardware cell identifier: barrel_ec = [0,...
std::vector< int > v_noisycellHVeta
@ LAr
The LAr calorimeter.
LArBC_t status(const HWIdentifier channel) const
Query the status of a particular channel or FEB This is the main client access method.
SG::ReadCondHandleKey< CaloNoise > m_totalNoiseKey
uint32_t runNumber() const
The current event's run number.
std::vector< std::string > m_nt_streamTagType
const LArOnlineID * m_LArOnlineIDHelper
const LArEM_ID * m_LArEM_IDHelper
virtual StatusCode execute() override
Execute - on event by event.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
bool m_nt_EF_j35_u0uchad_firstempty_LArNoiseBurst
std::vector< int > v_partition
uint8_t m_nt_badHVPartitions
bool m_nt_larflag_noiseBurstVeto
std::vector< short > m_nt_slot_noisy
std::vector< int > m_nt_partition_sat
int ncellC() const
get number of cells for time C side
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
bool m_nt_larflag_mnbTight_psveto
std::vector< int > m_nt_noisycellHVphi
int channel(const HWIdentifier id) const
Return the channel number of a hardware cell identifier channel = [0,127] in all FEB.
std::vector< float > m_nt_etacell_sat
@ MININOISEBURSTTIGHT_PSVETO
bool m_nt_EF_xe55_LArNoiseBurst
Liquid Argon digit base class.
::StatusCode StatusCode
StatusCode definition for legacy code.
StatusCode fillCell(HWIdentifier onlID, float eCalo, float qfactor, CaloGain::CaloGain gain, const LArOnOffIdMapping *cabling, const LArBadChannelCont *bcCont, const CaloNoise &totalNoise, const CaloDetDescrManager *caloMgr)
bool m_nt_EF_xe45_LArNoiseBurst
std::vector< int > m_nt_layer
bool m_nt_EF_j55_u0uchad_firstempty_LArNoiseBurstT
std::vector< short > m_nt_cellpartlayerindex
bool m_nt_EF_j100_u0uchad_LArNoiseBurstT
bool m_nt_larflag_badFEBS_w
std::vector< IdentifierHash > v_IdHash
const LArElectrodeID * m_LArElectrodeIDHelper
@ BunchCrossings
Distance in units of 25 nanoseconds.
int pos_neg(const HWIdentifier id) const
Return the side of a hardware cell identifier pos_neg = [0,1] positive-side or negative-side Barrel...
bool m_nt_EF_j80_u0uchad_LArNoiseBurstT
double timeC() const
time C side
std::vector< bool > v_ishec
bool is_lar_hec(Identifier id) const
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
bool is_lar_fcal() const
cell belongs to FCAL
int GetPartitionLayerIndex(const Identifier &id)
uint32_t lumiBlock() const
The current event's luminosity block number.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
unsigned int m_nt_stablebeams
std::vector< float > m_nt_noisycellpart
int distanceFromFront(const bcid_type bcid, const BunchDistanceType type=NanoSec) const
The distance of the specific bunch crossing from the front of the train.
virtual StatusCode initialize() override
bool is_tile() const
cell belongs to Tile
bool m_nt_EF_j55_u0uchad_empty_LArNoiseBurst
std::vector< short > v_posneg_noisy
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
std::vector< int > v_noisycellHVphi
std::vector< float > m_nt_energy_sat
unsigned int m_frontbunches
std::vector< int > m_nt_layer_sat
PublicToolHandle< Trig::TrigDecisionTool > m_trigDec
std::vector< short > v_slot_noisy
int hv_eta(const HWIdentifier id) const
Return an integer corresponding to the high volatge eta sector of an hardware electrode identifier.
int barrel_ec(const Identifier id) const
return barrel_ec according to :
StatusCode doTrigger()
methods called by execute()
SG::ReadCondHandleKey< BunchCrossingCondData > m_bcDataKey
std::vector< float > v_signifcell
StatusCode initialize(bool used=true)
std::vector< int > m_nt_barrelec_sat
Container class for CaloCell.
std::vector< int > m_nt_isbadcell
bool m_nt_L1_J30_FIRSTEMPTY
std::vector< float > m_nt_phicell
bool isInTrain(const bcid_type bcid) const
Function deciding if a given bunch crossing is in a filled train.
Class describing the basic event information.
const std::vector< StreamTag > & streamTags() const
Get the streams that the event was put in.
const std::vector< HWIdentifier > & get_noisy_hvlines() const
int ncellA() const
get number of cells for time A side
bool is_lar_em_barrel() const
cell belongs to EM barrel
int feedthrough(const HWIdentifier id) const
Return the feedthrough of a hardware cell identifier : feedthrough = [0,31] Barrel - A/C side or H/...
SG::ReadHandleKey< LArNoisyROSummary > m_NoisyROKey
virtual int getLayer() const
cell layer
This class provides the client interface for accessing the detector description information common to...
Data object for each calorimeter readout cell.
bool m_nt_larflag_mnbLoose
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
std::vector< float > v_etacell
def time(flags, cells_name, *args, **kw)
#define ATH_MSG_WARNING(x)
std::vector< float > m_nt_etacell
std::vector< int > m_nt_gain
BunchCrossingType bcType(const bcid_type bcid) const
Convenience function for the type of the specific bunch crossing.
const LArHVLineID * m_LArHVLineIDHelper
int sampling(const Identifier id) const
return sampling [0,3] (only 0 for supercells)
std::vector< float > v_energycell
bool m_nt_larflag_dataCorrupted
int pos_neg(const Identifier id) const
return pos_neg -2 (C side) or 2 (A side)
Container class for LArDigit.
int hv_phi(const HWIdentifier id) const
Return an integer corresponding to the high voltage phi sector of an hardware electrode identifier.
uint32_t timeStamp() const
POSIX time in seconds from 1970. January 1st.
uint8_t HVlineFlaggedPartitions() const
bool isEventFlagBitSet(EventFlagSubDet subDet, size_t bit) const
Check one particular bit of one particular sub-detector.
float eta() const
cell eta
bool m_nt_EF_xe60_LArNoiseBurst
double timeA() const
time A side
float phi() const
cell phi
const LArHEC_ID * m_LArHEC_IDHelper
std::vector< int > m_nt_isbadcell_sat
std::vector< short > m_nt_ft_noisy
bool is_lar_hec() const
cell belongs to HEC
uint32_t bcid() const
The bunch crossing ID of the event.
bool m_nt_EF_j35_u0uchad_empty_LArNoiseBurst
std::vector< short > v_ft_noisy
std::vector< short > v_channel_noisy
bool is_lar_em(Identifier id) const
size_type size() const noexcept
Returns the number of elements in the collection.
std::vector< bool > v_isbadcell
bool m_nt_EF_j165_u0uchad_LArNoiseBurst
const LArFCAL_ID * m_LArFCAL_IDHelper
Exception class for LAr Identifiers.
bool m_nt_larflag_badHVlines
std::vector< unsigned int > m_nt_badHVlines
std::vector< int > m_nt_noisycellHVeta
Calo Subsystem specific Detector Elements + Dummy element for testing.
std::vector< short > v_layer
bool isFilled(const bcid_type bcid) const
The simplest query: Is the bunch crossing filled or not?
Container for LArRawChannel (IDC using LArRawChannelCollection)
std::vector< short > m_nt_slot_sat
bool m_nt_EF_j30_u0uchad_empty_LArNoiseBurst
virtual StatusCode clear()
Clear - clear CBNT members.
Helper for the Liquid Argon Calorimeter High-Voltage identifiers.