|
ATLAS Offline Software
|
Go to the documentation of this file.
11 #include "GaudiKernel/ThreadLocalContext.h"
51 #include "CLHEP/Vector/LorentzVector.h"
86 ISvcLocator* pSvcLocator)
89 m_LArOnlineIDHelper(nullptr),
90 m_LArHVLineIDHelper(nullptr),
91 m_LArElectrodeIDHelper(nullptr),
92 m_LArEM_IDHelper(nullptr),
93 m_LArFCAL_IDHelper(nullptr),
94 m_LArHEC_IDHelper(nullptr),
95 m_CosmicCaloStream(false),
110 m_nt_isbcidFilled(0),
111 m_nt_isbcidInTrain(0),
112 m_nt_isBunchesInFront(0),
117 m_nt_streamTagName(0),
118 m_nt_streamTagType(0),
120 m_nt_larnoisyro_opt(0),
121 m_nt_larnoisyro_satTwo(0),
123 m_nt_larmnbnoisy_sat(0),
140 m_nt_larflag_badFEBs(false),
141 m_nt_larflag_mediumSaturatedDQ(false),
142 m_nt_larflag_tightSaturatedDQ(false),
143 m_nt_larflag_noiseBurstVeto(false),
144 m_nt_larflag_dataCorrupted(false),
145 m_nt_larflag_dataCorruptedVeto(false),
147 m_nt_L1_J10_EMPTY(false),
148 m_nt_L1_J30_FIRSTEMPTY(false),
149 m_nt_L1_J30_EMPTY(false),
152 m_nt_L1_XE50_BGRP7(false),
154 m_nt_EF_j165_u0uchad_LArNoiseBurst(false),
155 m_nt_EF_j30_u0uchad_empty_LArNoiseBurst(false),
156 m_nt_EF_j55_u0uchad_firstempty_LArNoiseBurst(false),
157 m_nt_EF_j55_u0uchad_empty_LArNoiseBurst(false),
158 m_nt_EF_xe45_LArNoiseBurst(false),
159 m_nt_EF_xe55_LArNoiseBurst(false),
160 m_nt_EF_xe60_LArNoiseBurst(false),
161 m_nt_EF_j55_u0uchad_firstempty_LArNoiseBurstT(false),
162 m_nt_EF_j100_u0uchad_LArNoiseBurstT(false),
163 m_nt_EF_j165_u0uchad_LArNoiseBurstT(false),
164 m_nt_EF_j130_u0uchad_LArNoiseBurstT(false),
165 m_nt_EF_j35_u0uchad_empty_LArNoiseBurst(false),
166 m_nt_EF_j35_u0uchad_firstempty_LArNoiseBurst(false),
167 m_nt_EF_j80_u0uchad_LArNoiseBurstT(false),
178 m_nt_barrelec_noisy(0),
179 m_nt_posneg_noisy(0),
182 m_nt_channel_noisy(0),
183 m_nt_cellpartlayerindex(0),
184 m_nt_cellIdentifier(0),
185 m_nt_onlIdentifier(0),
186 m_nt_noisycellpart(0),
187 m_nt_noisycellHVphi(0),
188 m_nt_noisycellHVeta(0),
194 m_nt_isbadcell_sat(0),
195 m_nt_barrelec_sat(0),
200 m_nt_partition_sat(0),
205 m_nt_cellIdentifier_sat(0)
249 const CaloCell_ID* idHelper =
nullptr;
259 m_tree =
new TTree(
"CollectionTree",
"CollectionTree" );
260 std::string
treeName =
"/TTREE/CollectionTree" ;
376 return StatusCode::SUCCESS;
384 return StatusCode::SUCCESS;
536 return StatusCode::SUCCESS;
548 return StatusCode::SUCCESS;
556 return StatusCode::SUCCESS;
563 return StatusCode::SUCCESS;
567 if (
sc.isFailure()) {
569 return StatusCode::SUCCESS;
580 return StatusCode::SUCCESS;
589 std::string mychain(
"L1_J75" );
590 if( !
m_trigDec->getListOfTriggers(mychain).empty() ){
593 mychain =
"L1_J10_EMPTY";
594 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
597 mychain =
"L1_J30_FIRSTEMPTY";
598 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
601 mychain =
"L1_J30_EMPTY";
602 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
606 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
610 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
613 mychain =
"L1_XE50_BGRP7";
614 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
618 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
623 mychain =
"EF_j165_u0uchad_LArNoiseBurst";
624 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
627 mychain =
"EF_j30_u0uchad_empty_LArNoiseBurst";
628 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
631 mychain =
"EF_j55_u0uchad_firstempty_LArNoiseBurst";
632 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
635 mychain =
"EF_j55_u0uchad_empty_LArNoiseBurst";
636 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
639 mychain =
"EF_xe45_LArNoiseBurst";
640 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
643 mychain =
"EF_xe55_LArNoiseBurst";
644 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
647 mychain =
"EF_xe60_LArNoiseBurst";
648 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
651 mychain =
"EF_j55_u0uchad_firstempty_LArNoiseBurstT";
652 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
655 mychain =
"EF_j100_u0uchad_LArNoiseBurstT";
656 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
659 mychain =
"EF_j165_u0uchad_LArNoiseBurstT";
660 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
663 mychain =
"EF_j130_u0uchad_LArNoiseBurstT";
664 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
667 mychain =
"EF_j35_u0uchad_empty_LArNoiseBurst";
668 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
671 mychain =
"EF_j35_u0uchad_firstempty_LArNoiseBurst";
672 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
675 mychain =
"EF_j80_u0uchad_LArNoiseBurstT";
676 if( !
m_trigDec->getListOfTriggers(mychain).empty()){
680 return StatusCode::SUCCESS;
707 if (!bunchCrossing) {
709 return StatusCode::FAILURE;
722 bool checkfirstbunch =
true;
723 for(
unsigned int i=1;
i<=distFromFront;
i++){
733 checkfirstbunch =
false;
743 for (
const auto& streamInfo : eventInfo->
streamTags()) {
744 const std::string& stream_name = streamInfo.name();
745 const std::string& stream_type = streamInfo.type();
750 if(streamInfo.name()==
"CosmicCalo" && streamInfo.type()==
"physics"){
852 if (
evtStore()->contains<LArCollisionTime>(
"LArCollisionTime")) {
858 ATH_MSG_DEBUG (
"LArCollisionTime successfully retrieved from event store" );
873 return StatusCode::SUCCESS;
881 const EventContext& ctx = Gaudi::Hive::currentContext();
884 const LArOnOffIdMapping*
cabling=*larCablingHdl;
887 return StatusCode::SUCCESS;
893 ATH_MSG_WARNING(
"Do not have bad chan info, not storing LarCellInfo ");
894 return StatusCode::SUCCESS;
906 if(
evtStore()->contains<CaloCellContainer>(
"AllCalo")) {
908 }
else if (
evtStore()->contains<LArRawChannelContainer>(
"LArRawChannels") ||
evtStore()->contains<LArRawChannelContainer>(
"LArRawChannels_fB")) {
909 if (
evtStore()->contains<LArRawChannelContainer>(
"LArRawChannels")) {
912 if (
evtStore()->contains<LArRawChannelContainer>(
"LArRawChannels_fB")) {
917 if (caloTES==
nullptr && LArTES==
nullptr) {
918 ATH_MSG_WARNING (
"Neither CaloCell nor LArRawChannel Containers found!" );
919 return StatusCode::SUCCESS;
942 if (caloDDE->
is_tile())
continue;
944 try {onlID =
cabling->createSignalChannelID(
cell->ID());}
951 bool connected =
cabling->isOnlineConnected(onlID);
952 if(!connected)
continue;
953 eCalo =
cell->energy();
954 qfactor =
cell->quality();
961 std::vector<HWIdentifier> chdone;
963 LArRawChannelContainer::const_iterator caloItr;
964 for(caloItr=LArTES_dig->begin();caloItr!=LArTES_dig->end();++caloItr){
965 HWIdentifier onlID=caloItr->identify();
966 bool connected =
cabling->isOnlineConnected(onlID);
967 if(!connected)
continue;
968 eCalo = caloItr->energy();
969 qfactor = caloItr->quality();
970 gain = caloItr->gain();
973 chdone.push_back(onlID);
979 LArRawChannelContainer::const_iterator caloItr;
980 for(caloItr=LArTES->begin();caloItr!=LArTES->end();++caloItr){
981 HWIdentifier onlID=caloItr->identify();
982 if(
std::find(chdone.begin(), chdone.end(), onlID) != chdone.end())
continue;
983 bool connected =
cabling->isOnlineConnected(onlID);
984 if(!connected)
continue;
985 eCalo = caloItr->energy();
986 qfactor = caloItr->quality();
987 gain = caloItr->gain();
1005 if(LArTES_dig)
ATH_MSG_DEBUG (
"all LArRawCh. from digi size = "<<
int(LArTES_dig->size()));
1006 if(LArTES)
ATH_MSG_DEBUG (
"all LArRawCh. size = "<<
int(LArTES->size()));
1014 bool checknoise =
false;
1016 for(
unsigned int i=0;
i<8;
i++){
1030 if (!LArDigitCont) {
1032 return StatusCode::SUCCESS;
1035 bool store_condition =
false;
1039 store_condition =
true;
1045 store_condition =
true;
1050 if(store_condition){
1051 std::vector<short> samples;
1057 for (
const LArDigit* pLArDigit : *LArDigitCont) {
1058 HWIdentifier
id2 = pLArDigit->hardwareID();
1060 for(
unsigned int j=0;j<
v_IdHash.size();j++){
1062 ATH_MSG_DEBUG (
"find a IdentifierHash of the noisy cell in LArDigit container " );
1063 samples = pLArDigit->samples();
1109 return StatusCode::SUCCESS;
1117 ,
const LArOnOffIdMapping*
cabling
1128 float phi = caloDDE->
phi();
1130 float significance = eCalo /
noise ;
1131 float eta = caloDDE->
eta();
1132 bool badcell = ! (bcCont->
status(onlID)).
good();
1135 if(is_lar_em_barrel){
1143 if(is_lar_em_endcap){
1166 for(
unsigned int k=0;
k<8;
k++){
1173 if(qfactor>=10000 && qfactor<65535){
m_hiqfactor++;}
1193 if(significance >
m_sigmacut || qfactor > 4000){
1222 for(
unsigned int k=0;
k<8;
k++){
1235 return StatusCode::SUCCESS;
1251 return StatusCode::SUCCESS;
1271 if(bc<0) caloindex = sampling+4;
1272 else caloindex = sampling;
1274 if(bc<0) caloindex = sampling+12;
1275 else caloindex = sampling+8;
1280 if(bc<0) caloindex = sampling+20;
1281 else caloindex = sampling+16;
1285 if(bc<0) caloindex = sampling+26;
1286 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...
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.
StatusCode doPhysicsObjects()
bool m_nt_EF_j35_u0uchad_firstempty_LArNoiseBurst
std::vector< int > v_partition
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.
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
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
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
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.
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.
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/...
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.
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)
short m_nt_larnoisyro_satTwo
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.
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.
short m_nt_larmnbnoisy_sat
std::vector< bool > v_isbadcell
bool m_nt_EF_j165_u0uchad_LArNoiseBurst
const LArFCAL_ID * m_LArFCAL_IDHelper
Exception class for LAr Identifiers.
short m_nt_larnoisyro_opt
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.