001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016 #include "AtlfastAlgs/CalSectionReject.h"
017 #include "AtlfastEvent/ITransportedParticle.h"
018 #include "FastShowerUtils/Gridlet.h"
019 #include "GaudiKernel/MsgStream.h"
020 #include <iomanip>
021 #include <iostream>
022
023
024 #include <fstream>
025
026 namespace Atlfast{
027 using std::ios;
028 using std::setprecision;
029 using std::setw;
030 using std::ostream;
031
032 using FastShower::GridletElement;
033
034 CalSectionReject::CalSectionReject(double etaMin, double etaMax,
035 double phiMin, double phiMax):
036 m_etaMin(etaMin), m_etaMax(etaMax),
037 m_phiMin(phiMin), m_phiMax(phiMax) {}
038
039 CalSectionReject::CalSectionReject(const CalSectionReject& other):
040 m_etaMin(other.m_etaMin), m_etaMax(other.m_etaMax),
041 m_phiMin(other.m_phiMin), m_phiMax(other.m_phiMax) {}
042
043
044
045
046
047 bool CalSectionReject::operator()(const ITransportedParticle* p) {
048 double eta = p->eta();
049
050 ::Phi phi = p->phi();
051 if(eta<=m_etaMin || eta > m_etaMax) {
052 return true;
053 }
054 if(phi<=m_phiMin || phi > m_phiMax){
055 return true;
056 }
057 return false;
058 }
059
060 bool CalSectionReject::operator()(const GridletElement* p) {
061 double eta = p->eta();
062 ::Phi phi = p->phi();
063 if(eta<=m_etaMin || eta > m_etaMax) {return true;}
064 if(phi<=m_phiMin || phi > m_phiMax) {return true;}
065 return false;
066 }
067
068 bool CalSectionReject::operator()(const Gridlet* g) {
069 double eta = g->eta0();
070 ::Phi phi = g->phi0();
071 if(eta<=m_etaMin || eta > m_etaMax) return true;
072 if(phi<=m_phiMin || phi > m_phiMax) return true;
073 return false;
074 }
075
076 MsgStream& CalSectionReject::writeout(MsgStream& stream) const{
077 stream<<setiosflags(ios::fixed);
078 stream<<setprecision(3);
079 stream<<"Lower limits (phi, eta):"<<endreq;
080 stream<< m_phiMin <<" "<<m_etaMin<<endreq;
081 stream<<"Upper limit (phi, eta):"<<endreq;
082 stream<< m_phiMax <<" "<<m_etaMax<<endreq;
083 return stream;
084 }
085
086
087
088
089
090
091
092
093
094
095
096
097 MsgStream& operator <<( MsgStream& stream, const CalSectionReject& c) {
098 return c.writeout(stream);
099 }
100 MsgStream& operator <<( MsgStream& stream, const CalSectionReject* const c) {
101 return (*c).writeout(stream);
102 }
103
104
105
106
107
108
109
110
111
112
113 }
114
115
116
117
118
119
120
| Due to the LXR bug, the updates fail sometimes to remove references to deleted files. The Saturday's full rebuilds fix these problems |
|
This page was automatically generated by the
LXR engine.
|
|