00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef ATLFAST_CALSECTION_H
00011 #define ATLFAST_CALSECTION_H
00012 #include <cmath>
00013 #include <vector>
00014 #include <map>
00015
00016
00017 #ifndef ATLFAST_CALSECTIONREJECT_H
00018 #include "AtlfastAlgs/CalSectionReject.h"
00019 #endif
00020
00021 #ifndef ATLFAST_COLLECTIONDEFS_H
00022 #include "AtlfastEvent/CollectionDefs.h"
00023 #endif
00024
00025 #ifndef ATLFAST_TRANSPORTEDPARTICLECOLLECTION_H
00026 #include "AtlfastAlgs/TransportedParticleCollection.h"
00027 #endif
00028
00029 class MsgStream;
00030
00031 namespace FastShower{
00032 class GridletElement;
00033 }
00034
00035 namespace Atlfast{
00036 class ICellSelector;
00037 class EPileupDeposit;
00038 class ISmearer;
00039
00040 using FastShower::GridletElement;
00047 class CalSection {
00048 public:
00050 CalSection(
00051 MsgStream& log,
00052 const double minEta,
00053 const double maxEta,
00054 const double granEta,
00055 const double granPhi,
00056 const double minPhi=-M_PI,
00057 const double maxPhi=M_PI);
00058 CalSection(const CalSection& c);
00059 ~CalSection();
00063 void reset();
00068 void deposit(TransportedParticleCollectionIter&,
00069 TransportedParticleCollectionIter&);
00074 void deposit(std::vector<Atlfast::EPileupDeposit*>::iterator& ,
00075 std::vector<Atlfast::EPileupDeposit*>::iterator& );
00077 void depositEcal(std::vector<GridletElement*>::iterator,
00078 std::vector<GridletElement*>::iterator
00079 );
00081 void depositHcal(std::vector<GridletElement*>::iterator ,
00082 std::vector<GridletElement*>::iterator
00083 );
00087 void giveHits(const ICellSelector*, ITwoCptCellCollection*) const;
00088
00092 void smearCells(ISmearer*);
00093 private:
00094
00095 MsgStream& m_log;
00097 void newHit( const TransportedParticle* );
00099 void newHit( const EPileupDeposit*);
00101 void newEHit( const GridletElement*);
00103 void newHHit( const GridletElement*);
00105 int index(const GridletElement*) const;
00106 int index(const TransportedParticle*) const;
00107 int index(const Atlfast::EPileupDeposit*) const;
00108 int iindex(double phi, double eta) const;
00110 const double m_minEta;
00112 const double m_maxEta;
00114 const double m_minPhi;
00116 const double m_maxPhi;
00118 double m_granEta;
00120 double m_granPhi;
00122 int m_nPhi;
00126 CalSectionReject m_calSectionReject;
00130 std::vector<ITwoCptCell*> m_cells;
00131 std::map<int, ITwoCptCell*, std::less<int> > m_hitCells;
00132
00133 };
00134 }
00135 #endif
00136
00137
00138
00139
00140
00141
00142
00143
00144