 |
ATLAS Offline Software
|
Go to the documentation of this file.
20 bool testbit (
unsigned int x,
unsigned int i)
22 return (
x & (1U <<
i)) != 0;
47 std::vector<float> temp_Moments;
51 std::vector<float>::const_iterator i_mom = temp_Moments.begin();
52 std::vector<float>::const_iterator i_mom_e = temp_Moments.end();
55 unsigned int nkeys =
keys.size();
59 std::vector<float> tmp_badChannelEta;
60 std::vector<float> tmp_badChannelPhi;
66 std::vector<float> tmp_rawE;
67 std::vector<float> tmp_rawEtaPhiM;
69 C.expandToFloat(pers->
m_rawE,tmp_rawE);
70 std::vector<float>::const_iterator iraw1 = tmp_rawE.begin();
71 std::vector<float>::const_iterator iraw2 = tmp_rawE.end();
75 std::vector<float>::const_iterator iraw3 = tmp_rawEtaPhiM.begin();
76 std::vector<float>::const_iterator iraw4 = tmp_rawEtaPhiM.end();
79 std::vector<float> tmp_altE;
80 std::vector<float> tmp_altEtaPhiM;
82 E.expandToFloat(pers->
m_altE,tmp_altE);
83 std::vector<float>::const_iterator ialt1 = tmp_altE.begin();
84 std::vector<float>::const_iterator ialt2 = tmp_altE.end();
87 std::vector<float>::const_iterator ialt3 = tmp_altEtaPhiM.begin();
88 std::vector<float>::const_iterator ialt4 = tmp_altEtaPhiM.end();
95 bool mom_overrun_err =
false;
96 bool store_overrun_err =
false;
97 bool raw_overrun_err =
false;
104 log << MSG::WARNING <<
" problem to decode bad channel information, not filled..." <<
endmsg;
127 for (
int i=0;
i<nVar;++
i) {
131 for (
int j=0;j<nSamplings; ++j){
135 if (
c1 < dataStore_size)
139 if (!store_overrun_err) {
141 "CaloClusterContainerCnv_p6")
142 <<
"Corrupted data: data store array overrun "
143 << pers->
m_vec.size() <<
" clusters "
144 << nkeys <<
" moment keys "
145 << temp_Moments.size() <<
" total moments.";
146 store_overrun_err =
true;
150 static_cast<samptype
>(j),
156 static_cast<samptype
>(j));
173 for (
unsigned short i=0;
i<nkeys;++
i) {
175 if (i_mom == i_mom_e) {
177 if (!mom_overrun_err) {
179 "CaloClusterContainerCnv_p6")
180 <<
"Corrupted data: moment array overrun "
181 << pers->
m_vec.size() <<
" clusters "
182 << nkeys <<
" moment keys "
183 << temp_Moments.size() <<
" total moments.";
184 mom_overrun_err =
true;
191 transStore.insert (transStore.end(), CaloClusterMomentStore::moment_store::value_type(
keys[
i],
val ) );
198 while (ibad1 != ibad2 && (*ibad1) ==
index) {
199 float eta = tmp_badChannelEta[nbad] + transCluster->
eta();
213 if (iraw1 != iraw2) {
214 if (std::fabs(transCluster->
e())>0.1) {
215 transCluster->
m_rawE = (*iraw1) * transCluster->
e();
218 transCluster->
m_rawE = (*iraw1);
221 if (iraw3 != iraw4) {
222 transCluster->
m_rawEta = (*iraw3) + transCluster->
eta();
225 if (iraw3 != iraw4) {
229 if (iraw3 == iraw4 && !raw_overrun_err) {
231 "CaloClusterContainerCnv_p6")
232 <<
"Corrupted data: raw array overrun "
233 << pers->
m_vec.size() <<
" clusters "
234 << tmp_rawE.size() <<
" raw values.";
235 raw_overrun_err =
true;
237 if (iraw3 != iraw4) {
238 transCluster->
m_rawM = (*iraw3);
245 if (ialt1 != ialt2) {
246 if (std::fabs(transCluster->
e())>0.1) {
247 transCluster->
m_altE = (*ialt1) * transCluster->
e();
250 transCluster->
m_altE = (*ialt1);
253 if (ialt3 != ialt4) {
254 transCluster->
m_altEta = (*ialt3) + transCluster->
eta();
257 if (ialt3 != ialt4) {
261 if (ialt3 == ialt4 && !raw_overrun_err) {
263 "CaloClusterContainerCnv_p6")
264 <<
"Corrupted data: raw array overrun "
265 << pers->
m_vec.size() <<
" clusters "
266 << tmp_altE.size() <<
" alt values.";
267 raw_overrun_err =
true;
269 if (ialt3 != ialt4) {
270 transCluster->
m_altM = (*ialt3);
280 if (i_mom != i_mom_e && !mom_overrun_err) {
282 "CaloClusterContainerCnv_p6")
283 <<
"Corrupted data: not all moments read "
284 << pers->
m_vec.size() <<
" clusters "
285 << nkeys <<
" moment keys "
286 << temp_Moments.size() <<
" total moments "
287 << i_mom-temp_Moments.begin() <<
" read.";
290 if (
c1 != dataStore_size && !store_overrun_err) {
292 "CaloClusterContainerCnv_p6")
293 <<
"Corrupted data: not all data store members read "
294 << dataStore_size <<
" elements "
298 if (iraw1 != iraw2 && !raw_overrun_err) {
300 "CaloClusterContainerCnv_p6")
301 <<
"Corrupted data: not all raw values read "
302 << pers->
m_vec.size() <<
" clusters "
303 << tmp_rawE.size() <<
" raw values "
304 << iraw1-tmp_rawE.begin() <<
" read.";
307 if (iraw3 != iraw4 && !raw_overrun_err) {
309 "CaloClusterContainerCnv_p6")
310 <<
"Corrupted data: not all raw values read "
311 << pers->
m_vec.size() <<
" clusters "
312 << tmp_rawEtaPhiM.size() <<
" raw values "
313 << iraw3-tmp_rawEtaPhiM.begin() <<
" read.";
316 if (ialt1 != ialt2 && !raw_overrun_err) {
318 "CaloClusterContainerCnv_p6")
319 <<
"Corrupted data: not all alt values read "
320 << pers->
m_vec.size() <<
" clusters "
321 << tmp_altE.size() <<
" alt values "
322 << ialt1-tmp_altE.begin() <<
" read.";
325 if (ialt3 != ialt4 && !raw_overrun_err) {
327 "CaloClusterContainerCnv_p6")
328 <<
"Corrupted data: not all alt values read "
329 << pers->
m_vec.size() <<
" clusters "
330 << tmp_altEtaPhiM.size() <<
" raw values "
331 << ialt3-tmp_altEtaPhiM.begin() <<
" read.";
336 if (ibad1 != ibad2) {
338 "CaloClusterContainerCnv_p6")
339 <<
"Corrupted data: not all bad data read "
353 MsgStream &
log)
const
355 log << MSG::ERROR <<
"Writing of CaloClusterContainer_p6 not implemented any more!" <<
endmsg;
364 MsgStream&
log)
const
387 MsgStream&
log)
const
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
std::vector< unsigned int > m_badEtaList
char data[hepevt_bytes_allocation_ATLAS]
double phi0() const
Returns raw of cluster seed.
CaloClusterMomentStore m_momentStore
cluster moments
void setTime(double theTime)
Set cluster time.
static const AthenaBarCode_t UNDEFINEDBARCODE
double m_altPhi
Stores calibrated (cell weight) signal.
Scalar phi() const
phi method
virtual void transToPers(const CaloClusterContainer *trans, CaloClusterContainer_p6 *pers, MsgStream &log) const override
ElementLinkInt_p2 m_cellLink
void transToPers(State &state, const Link_t &trans, PersLink_t &pers, const SG::ThinningCache *cache, MsgStream &log) const
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Scalar eta() const
pseudorapidity method
double m_eta0
Cluster seed
virtual void setAthenaBarCode(AthenaBarCode_t id)
virtual void setMomentStore(const moment_store &rMomStore)
Set internal store.
Storable container for CaloCluster.
bool storeData(variable_key_type theVariable, sampling_key_type theSampling, value_type theData)
}
std::vector< unsigned int > m_altEtaPhiM
unsigned int m_varTypePattern
std::vector< unsigned int > m_rawE
double m_altE
Stores calibrated (cell weight) signal.
virtual void transToPers(const P4EEtaPhiM *transObj, P4EEtaPhiMFloat_p2 *persObj, MsgStream &log) const override
Method creating the persistent representation P4EEtaPhiMFloat_p2 from its transient representation P4...
virtual double getBasicEnergy() const
Access basic energy scale signal.
bool setDefaultSignalState(signalstate_t s)
Sets default signal state.
unsigned int m_samplingPattern
bool removeVariable(variable_key_type theVariable, sampling_key_type theSampling)
Remove a certain variable.
P4EEtaPhiMCnv_p2 m_P4EEtaPhiMCnv
ElementLinkInt_p2 m_dataLink
std::vector< float > m_dataStore
std::vector< unsigned int > m_Mvalue
ElementLinkContNames_p2 m_linkNames
ElementLinkCnv_p2< ElementLink< CaloCellLinkContainer > > m_cellElementLinkCnv
void persToTrans(const CaloTowerSeg_p1 *, CaloTowerSeg *) const
unsigned int m_caloRecoStatus
cell_link_type m_cellLink
Local pointer to cell store.
data_link_type m_dataLink
{
size_t getNumberOfSamplings() const
Set variable type pattern for this store.
double m_phi0
Cluster seed
ElementLinkCnv_p2< ElementLink< CaloShowerContainer > >::State ShowerLinkState
void expandToFloat(const std::vector< unsigned int > &vc, std::vector< float > &vf)
size_t getNumberOfVariableTypes() const
Return number of variable types.
bool m_endcap
Flag is true if at least one cell in EMB.
CaloSamplingData m_dataStore
{\ brief Cached Stores
double m_altM
Stores calibrated (cell weight) signal.
std::vector< unsigned int > m_altE
contType::const_iterator const_iterator
Principal data class for CaloCell clusters.
CaloPhiRange class declaration.
double m_rawM
Stores raw signal.
unsigned int m_samplingPattern
Sampling pattern.
static double fix(double phi)
void clear()
Erase all the elements in the collection.
void persToTrans(State &state, const PersLink_t &pers, Link_t &trans, MsgStream &log) const
CaloTowerSeg_p1 m_towerSeg
#define REPORT_MESSAGE_WITH_CONTEXT(LVL, CONTEXT_NAME)
Report a message, with an explicitly specified context name.
double m_rawPhi
Stores raw signal.
double getTime() const
Access cluster time.
CaloClusterMomentContainer_p2 m_momentContainer
std::vector< short > m_badClusIndexList
Helpers for checking error return status codes and reporting errors.
unsigned int m_varTypePattern
virtual void persToTrans(const CaloClusterContainer_p6 *pers, CaloClusterContainer *trans, MsgStream &log) const override
value_type push_back(value_type pElem)
Add an element to the end of the collection.
std::vector< unsigned int > m_badPhiList
CaloRecoStatus m_status
Calorimeter reconstruction status.
double m_altEta
Stores calibrated (cell weight) signal.
std::vector< short > m_badLayerStatusList
ElementLinkCnv_p2< ElementLink< CaloShowerContainer > > m_showerElementLinkCnv
unsigned int getClusterSize() const
Get cluster size.
std::vector< unsigned int > m_rawEtaPhiM
std::map< moment_key, moment_value > moment_store
Internal moment store type.
virtual double eta() const
Retrieve eta independent of signal state.
std::vector< unsigned short > m_Mkey
CaloTowerSegCnv_p1 m_caloTowerSegCnv
virtual double e() const
Retrieve energy independent of signal state.
void setClusterSize(unsigned int theClusterSize)
Set cluster size.
a typed memory pool that saves time spent allocation small object. This is typically used by containe...
virtual const store_type & getStatusWord() const
retrieve the entire status word
double m_rawE
Stores raw signal.
double eta0() const
Returns raw of cluster seed.
Data object stores CaloTower segmentation.
virtual void setTowerSeg(const CaloTowerSeg &towerSeg)
Set tower segmentation into CaloClusterContainer.
virtual void setBasicEnergy(double theEnergy)
Set basic energy scale signal.
unsigned int m_clusterSize
Simple data object to store all variables in calorimeter samplings.
P4EEtaPhiMFloat_p2 m_P4EEtaPhiM
setBGCode setTAP setLVL2ErrorBits bool
void addBadChannel(const CaloClusterBadChannelData &badChannel)
Add Bad channel information.
bool m_barrel
Flag is true if at least one cell in EMB.
reconstruction status indicator
void resetBadChannel()
Reset Bad channel list.
double m_rawEta
Stores raw signal.
virtual void persToTrans(const P4EEtaPhiMFloat_p2 *persObj, P4EEtaPhiM *transObj, MsgStream &log) const override
Method creating the transient representation of P4EEtaPhiM from its persistent representation P4EEtaP...
ElementLinkCnv_p2< ElementLink< CaloCellLinkContainer > >::State CellLinkState
virtual double phi() const
Retrieve phi independent of signal state.