Report problems to ATLAS LXR Team (with time and IP address indicated)

The LXR Cross Referencer

source navigation ]
diff markup ]
identifier search ]
general search ]
 
 
Architecture: linux ]
Version: head ] [ nightly ] [ GaudiDev ]
  Links to LXR source navigation pages for stable releases [ 12.*.* ]   [ 13.*.* ]   [ 14.*.* ]   [ 15.*.* ] 

001 //=================================================
002 //
003 //
004 // Selector function object used by CalSection to
005 // make acceptance cuts on particles.
006 //
007 // Cuts on:
008 //
009 // pseudoRapidity - from CLHEP momentum
010 // phi            - given separately (eg rotated by B field) 
011 //
012 // Author: Peter Sherwood
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 //#include <ios>
023 //#include <iomanip>
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    * Returns true if particle fails acceptance cuts:
044    * pseudoRapidity - from CLHEP momentum
045    * phi            - rotated by B field 
046    */
047   bool CalSectionReject::operator()(const ITransportedParticle* p) {
048     double eta = p->eta();
049     //double eta = ((p->particle())->momentum()).pseudoRapidity();
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   //debug
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   //debug
086   //  ostream& CalSectionReject::writeout(ostream& stream) const{
087   //  stream<<setiosflags(ios::fixed);
088   //  stream<<setprecision(3);
089   //  stream<<"Lower limits (phi, eta):"<<endreq;
090   //  stream<< m_phiMin <<" "<<m_etaMin<<endreq;
091   //  stream<<"Upper limit (phi, eta):"<<endreq;
092   //  stream<< m_phiMax <<" "<<m_etaMax<<endreq;
093   //  return stream;
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   //  ostream& operator <<( ostream& stream, const CalSectionReject& c) {
105   //    return c.writeout(stream);
106   //  }
107   //  ostream& operator <<( ostream& stream, const CalSectionReject* const c) {
108   //    return (*c).writeout(stream);
109   //  }
110 
111 
112 
113 }//namespace
114 
115 
116 
117 
118 
119 
120 

source navigation ] diff markup ] identifier search ] general search ]

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. Valid HTML 4.01!