|
ATLAS Offline Software
|
Go to the documentation of this file.
21 bool testbit (
unsigned int x,
unsigned int i)
23 return (
x & (1U <<
i)) != 0;
44 std::vector<float> temp_Moments;
48 std::vector<float>::const_iterator i_mom = temp_Moments.begin();
49 std::vector<float>::const_iterator i_mom_e = temp_Moments.end();
52 unsigned int nkeys =
keys.size();
56 std::vector<float> tmp_badChannelEta;
57 std::vector<float> tmp_badChannelPhi;
63 std::vector<float> tmp_rawE;
64 std::vector<float> tmp_rawEtaPhiM;
66 C.expandToFloat(pers->
m_rawE,tmp_rawE);
67 std::vector<float>::const_iterator iraw1 = tmp_rawE.begin();
68 std::vector<float>::const_iterator iraw2 = tmp_rawE.end();
72 std::vector<float>::const_iterator iraw3 = tmp_rawEtaPhiM.begin();
73 std::vector<float>::const_iterator iraw4 = tmp_rawEtaPhiM.end();
76 std::vector<float> tmp_altE;
77 std::vector<float> tmp_altEtaPhiM;
79 E.expandToFloat(pers->
m_altE,tmp_altE);
80 std::vector<float>::const_iterator ialt1 = tmp_altE.begin();
81 std::vector<float>::const_iterator ialt2 = tmp_altE.end();
84 std::vector<float>::const_iterator ialt3 = tmp_altEtaPhiM.begin();
85 std::vector<float>::const_iterator ialt4 = tmp_altEtaPhiM.end();
92 bool mom_overrun_err =
false;
93 bool store_overrun_err =
false;
94 bool raw_overrun_err =
false;
101 log << MSG::WARNING <<
" problem to decode bad channel information, not filled..." <<
endmsg;
121 for (
int i=0;
i<nVar;++
i) {
125 for (
int j=0;j<nSamplings; ++j){
129 if (
c1 < dataStore_size)
133 if (!store_overrun_err) {
135 "CaloClusterContainerCnv_p7")
136 <<
"Corrupted data: data store array overrun "
137 << pers->
m_vec.size() <<
" clusters "
138 << nkeys <<
" moment keys "
139 << temp_Moments.size() <<
" total moments.";
140 store_overrun_err =
true;
144 static_cast<samptype
>(j),
150 static_cast<samptype
>(j));
167 for (
unsigned short i=0;
i<nkeys;++
i) {
169 if (i_mom == i_mom_e) {
171 if (!mom_overrun_err) {
173 "CaloClusterContainerCnv_p7")
174 <<
"Corrupted data: moment array overrun "
175 << pers->
m_vec.size() <<
" clusters "
176 << nkeys <<
" moment keys "
177 << temp_Moments.size() <<
" total moments.";
178 mom_overrun_err =
true;
185 transStore.insert (transStore.end(), CaloClusterMomentStore::moment_store::value_type(
keys[
i],
val ) );
192 while (ibad1 != ibad2 && (*ibad1) ==
index) {
193 float eta = tmp_badChannelEta[nbad] + transCluster->
eta();
207 if (iraw1 != iraw2) {
208 if (std::fabs(transCluster->
e())>0.1) {
209 transCluster->
m_rawE = (*iraw1) * transCluster->
e();
212 transCluster->
m_rawE = (*iraw1);
215 if (iraw3 != iraw4) {
216 transCluster->
m_rawEta = (*iraw3) + transCluster->
eta();
219 if (iraw3 != iraw4) {
223 if (iraw3 == iraw4 && !raw_overrun_err) {
225 "CaloClusterContainerCnv_p7")
226 <<
"Corrupted data: raw array overrun "
227 << pers->
m_vec.size() <<
" clusters "
228 << tmp_rawE.size() <<
" raw values.";
229 raw_overrun_err =
true;
231 if (iraw3 != iraw4) {
232 transCluster->
m_rawM = (*iraw3);
239 if (ialt1 != ialt2) {
240 if (std::fabs(transCluster->
e())>0.1) {
241 transCluster->
m_altE = (*ialt1) * transCluster->
e();
244 transCluster->
m_altE = (*ialt1);
247 if (ialt3 != ialt4) {
248 transCluster->
m_altEta = (*ialt3) + transCluster->
eta();
251 if (ialt3 != ialt4) {
255 if (ialt3 == ialt4 && !raw_overrun_err) {
257 "CaloClusterContainerCnv_p7")
258 <<
"Corrupted data: raw array overrun "
259 << pers->
m_vec.size() <<
" clusters "
260 << tmp_altE.size() <<
" alt values.";
261 raw_overrun_err =
true;
263 if (ialt3 != ialt4) {
264 transCluster->
m_altM = (*ialt3);
274 if (i_mom != i_mom_e && !mom_overrun_err) {
276 "CaloClusterContainerCnv_p7")
277 <<
"Corrupted data: not all moments read "
278 << pers->
m_vec.size() <<
" clusters "
279 << nkeys <<
" moment keys "
280 << temp_Moments.size() <<
" total moments "
281 << i_mom-temp_Moments.begin() <<
" read.";
284 if (
c1 != dataStore_size && !store_overrun_err) {
286 "CaloClusterContainerCnv_p7")
287 <<
"Corrupted data: not all data store members read "
288 << dataStore_size <<
" elements "
292 if (iraw1 != iraw2 && !raw_overrun_err) {
294 "CaloClusterContainerCnv_p7")
295 <<
"Corrupted data: not all raw values read "
296 << pers->
m_vec.size() <<
" clusters "
297 << tmp_rawE.size() <<
" raw values "
298 << iraw1-tmp_rawE.begin() <<
" read.";
301 if (iraw3 != iraw4 && !raw_overrun_err) {
303 "CaloClusterContainerCnv_p7")
304 <<
"Corrupted data: not all raw values read "
305 << pers->
m_vec.size() <<
" clusters "
306 << tmp_rawEtaPhiM.size() <<
" raw values "
307 << iraw3-tmp_rawEtaPhiM.begin() <<
" read.";
310 if (ialt1 != ialt2 && !raw_overrun_err) {
312 "CaloClusterContainerCnv_p7")
313 <<
"Corrupted data: not all alt values read "
314 << pers->
m_vec.size() <<
" clusters "
315 << tmp_altE.size() <<
" alt values "
316 << ialt1-tmp_altE.begin() <<
" read.";
319 if (ialt3 != ialt4 && !raw_overrun_err) {
321 "CaloClusterContainerCnv_p7")
322 <<
"Corrupted data: not all alt values read "
323 << pers->
m_vec.size() <<
" clusters "
324 << tmp_altEtaPhiM.size() <<
" raw values "
325 << ialt3-tmp_altEtaPhiM.begin() <<
" read.";
330 if (ibad1 != ibad2) {
332 "CaloClusterContainerCnv_p7")
333 <<
"Corrupted data: not all bad data read "
347 MsgStream &
log)
const
349 log << MSG::ERROR <<
"Writing of CaloClusterContainerCnv_p7 not implemented any more" <<
endmsg;
356 MsgStream&
log)
const
380 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
contType::const_iterator const_iterator
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.
double m_altPhi
Stores calibrated (cell weight) signal.
void persToTrans(const PersLink_t &pers, Link_t &trans, MsgStream &log) const
P4EEtaPhiMFloat_p2 m_P4EEtaPhiM
Scalar phi() const
phi method
std::vector< unsigned int > m_rawE
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
unsigned int m_caloRecoStatus
Scalar eta() const
pseudorapidity method
double m_eta0
Cluster seed
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)
}
CaloTowerSegCnv_p1 m_caloTowerSegCnv
unsigned int m_varTypePattern
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.
bool removeVariable(variable_key_type theVariable, sampling_key_type theSampling)
Remove a certain variable.
virtual void transToPers(const AthenaBarCodeImpl *transObj, AthenaBarCode_p1 *persObj, MsgStream &) const override
std::vector< unsigned int > m_Mvalue
virtual void persToTrans(const AthenaBarCode_p1 *persObj, AthenaBarCodeImpl *transObj, MsgStream &) const override
void persToTrans(const CaloTowerSeg_p1 *, CaloTowerSeg *) const
AthenaBarCode_p1 m_barcode
std::vector< unsigned int > m_altE
void transToPers(const Link_t &trans, PersLink_t &pers, const SG::ThinningCache *cache, MsgStream &log) const
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.
CaloTowerSeg_p1 m_towerSeg
CaloClusterMomentContainer_p2 m_momentContainer
ElementLinkCnv_p3< ElementLink< CaloShowerContainer > > m_showerElementLinkCnv
double m_phi0
Cluster seed
unsigned int m_clusterSize
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
ElementLinkInt_p3 m_dataLink
virtual void transToPers(const CaloClusterContainer *trans, CaloClusterContainer_p7 *pers, MsgStream &log) const override
double m_altM
Stores calibrated (cell weight) signal.
ElementLinkCnv_p3< ElementLink< CaloCellLinkContainer > > m_cellElementLinkCnv
Principal data class for CaloCell clusters.
CaloPhiRange class declaration.
double m_rawM
Stores raw signal.
virtual void persToTrans(const CaloClusterContainer_p7 *pers, CaloClusterContainer *trans, MsgStream &log) const override
unsigned int m_samplingPattern
Sampling pattern.
std::vector< unsigned int > m_altEtaPhiM
unsigned int m_varTypePattern
static double fix(double phi)
void clear()
Erase all the elements in the collection.
#define REPORT_MESSAGE_WITH_CONTEXT(LVL, CONTEXT_NAME)
Report a message, with an explicitly specified context name.
double m_rawPhi
Stores raw signal.
std::vector< short > m_badClusIndexList
double getTime() const
Access cluster time.
AthenaBarCodeCnv_p1 m_barcodeCnv
Helpers for checking error return status codes and reporting errors.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
std::vector< float > m_dataStore
CaloRecoStatus m_status
Calorimeter reconstruction status.
double m_altEta
Stores calibrated (cell weight) signal.
std::vector< short > m_badLayerStatusList
unsigned int m_samplingPattern
unsigned int getClusterSize() const
Get cluster size.
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 int > m_rawEtaPhiM
std::vector< unsigned short > m_Mkey
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.
Simple data object to store all variables in calorimeter samplings.
ElementLinkInt_p3 m_cellLink
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.
P4EEtaPhiMCnv_p2 m_P4EEtaPhiMCnv
std::vector< unsigned int > m_badPhiList
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...
virtual double phi() const
Retrieve phi independent of signal state.