|
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;
48 std::vector<float> temp_Moments;
52 std::vector<float>::const_iterator i_mom = temp_Moments.begin();
53 std::vector<float>::const_iterator i_mom_e = temp_Moments.end();
56 unsigned int nkeys =
keys.size();
60 std::vector<float> tmp_badChannelEta;
61 std::vector<float> tmp_badChannelPhi;
67 std::vector<float> tmp_rawE;
68 std::vector<float> tmp_rawEtaPhiM;
70 C.expandToFloat(pers->
m_rawE,tmp_rawE);
71 std::vector<float>::const_iterator iraw1 = tmp_rawE.begin();
72 std::vector<float>::const_iterator iraw2 = tmp_rawE.end();
76 std::vector<float>::const_iterator iraw3 = tmp_rawEtaPhiM.begin();
77 std::vector<float>::const_iterator iraw4 = tmp_rawEtaPhiM.end();
80 std::vector<float> tmp_altE;
81 std::vector<float> tmp_altEtaPhiM;
83 E.expandToFloat(pers->
m_altE,tmp_altE);
84 std::vector<float>::const_iterator ialt1 = tmp_altE.begin();
85 std::vector<float>::const_iterator ialt2 = tmp_altE.end();
88 std::vector<float>::const_iterator ialt3 = tmp_altEtaPhiM.begin();
89 std::vector<float>::const_iterator ialt4 = tmp_altEtaPhiM.end();
96 bool mom_overrun_err =
false;
97 bool store_overrun_err =
false;
98 bool raw_overrun_err =
false;
105 log << MSG::WARNING <<
" problem to decode bad channel information, not filled..." <<
endmsg;
128 for (
int i=0;
i<nVar;++
i) {
132 for (
int j=0;j<nSamplings; ++j){
136 if (
c1 < dataStore_size)
140 if (!store_overrun_err) {
142 "CaloClusterContainerCnv_p6")
143 <<
"Corrupted data: data store array overrun "
144 << pers->
m_vec.size() <<
" clusters "
145 << nkeys <<
" moment keys "
146 << temp_Moments.size() <<
" total moments.";
147 store_overrun_err =
true;
151 static_cast<samptype
>(j),
157 static_cast<samptype
>(j));
174 for (
unsigned short i=0;
i<nkeys;++
i) {
176 if (i_mom == i_mom_e) {
178 if (!mom_overrun_err) {
180 "CaloClusterContainerCnv_p6")
181 <<
"Corrupted data: moment array overrun "
182 << pers->
m_vec.size() <<
" clusters "
183 << nkeys <<
" moment keys "
184 << temp_Moments.size() <<
" total moments.";
185 mom_overrun_err =
true;
192 transStore.insert (transStore.end(), CaloClusterMomentStore::moment_store::value_type(
keys[
i],
val ) );
199 while (ibad1 != ibad2 && (*ibad1) ==
index) {
200 float eta = tmp_badChannelEta[nbad] + transCluster->
eta();
214 if (iraw1 != iraw2) {
215 if (std::fabs(transCluster->
e())>0.1) {
216 transCluster->
m_rawE = (*iraw1) * transCluster->
e();
219 transCluster->
m_rawE = (*iraw1);
222 if (iraw3 != iraw4) {
223 transCluster->
m_rawEta = (*iraw3) + transCluster->
eta();
226 if (iraw3 != iraw4) {
230 if (iraw3 == iraw4 && !raw_overrun_err) {
232 "CaloClusterContainerCnv_p6")
233 <<
"Corrupted data: raw array overrun "
234 << pers->
m_vec.size() <<
" clusters "
235 << tmp_rawE.size() <<
" raw values.";
236 raw_overrun_err =
true;
238 if (iraw3 != iraw4) {
239 transCluster->
m_rawM = (*iraw3);
246 if (ialt1 != ialt2) {
247 if (std::fabs(transCluster->
e())>0.1) {
248 transCluster->
m_altE = (*ialt1) * transCluster->
e();
251 transCluster->
m_altE = (*ialt1);
254 if (ialt3 != ialt4) {
255 transCluster->
m_altEta = (*ialt3) + transCluster->
eta();
258 if (ialt3 != ialt4) {
262 if (ialt3 == ialt4 && !raw_overrun_err) {
264 "CaloClusterContainerCnv_p6")
265 <<
"Corrupted data: raw array overrun "
266 << pers->
m_vec.size() <<
" clusters "
267 << tmp_altE.size() <<
" alt values.";
268 raw_overrun_err =
true;
270 if (ialt3 != ialt4) {
271 transCluster->
m_altM = (*ialt3);
281 if (i_mom != i_mom_e && !mom_overrun_err) {
283 "CaloClusterContainerCnv_p6")
284 <<
"Corrupted data: not all moments read "
285 << pers->
m_vec.size() <<
" clusters "
286 << nkeys <<
" moment keys "
287 << temp_Moments.size() <<
" total moments "
288 << i_mom-temp_Moments.begin() <<
" read.";
291 if (
c1 != dataStore_size && !store_overrun_err) {
293 "CaloClusterContainerCnv_p6")
294 <<
"Corrupted data: not all data store members read "
295 << dataStore_size <<
" elements "
299 if (iraw1 != iraw2 && !raw_overrun_err) {
301 "CaloClusterContainerCnv_p6")
302 <<
"Corrupted data: not all raw values read "
303 << pers->
m_vec.size() <<
" clusters "
304 << tmp_rawE.size() <<
" raw values "
305 << iraw1-tmp_rawE.begin() <<
" read.";
308 if (iraw3 != iraw4 && !raw_overrun_err) {
310 "CaloClusterContainerCnv_p6")
311 <<
"Corrupted data: not all raw values read "
312 << pers->
m_vec.size() <<
" clusters "
313 << tmp_rawEtaPhiM.size() <<
" raw values "
314 << iraw3-tmp_rawEtaPhiM.begin() <<
" read.";
317 if (ialt1 != ialt2 && !raw_overrun_err) {
319 "CaloClusterContainerCnv_p6")
320 <<
"Corrupted data: not all alt values read "
321 << pers->
m_vec.size() <<
" clusters "
322 << tmp_altE.size() <<
" alt values "
323 << ialt1-tmp_altE.begin() <<
" read.";
326 if (ialt3 != ialt4 && !raw_overrun_err) {
328 "CaloClusterContainerCnv_p6")
329 <<
"Corrupted data: not all alt values read "
330 << pers->
m_vec.size() <<
" clusters "
331 << tmp_altEtaPhiM.size() <<
" raw values "
332 << ialt3-tmp_altEtaPhiM.begin() <<
" read.";
337 if (ibad1 != ibad2) {
339 "CaloClusterContainerCnv_p6")
340 <<
"Corrupted data: not all bad data read "
354 MsgStream &
log)
const
356 log << MSG::ERROR <<
"Writing of CaloClusterContainer_p6 not implemented any more!" <<
endmsg;
365 MsgStream&
log)
const
388 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 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.