5 using namespace pftools;
17 for (
unsigned j(0);
j < nPanes; ++
j)
46 for (std::vector<double>::const_iterator cit =
myPanes_.begin(); cit
54 for (std::vector<double>::iterator cit =
myPanes_.begin(); cit
61 for (std::vector<double>::iterator cit =
myPanes_.begin(); cit
63 s << (*cit)/range <<
"\t";
68 for (std::vector<double>::const_iterator it = caloRing.
myPanes_.begin(); it
72 s <<
" => ring E = " << caloRing.
totalE();
79 s <<
"CaloWindow at (" << caloWindow.
baryEta_ <<
", "
82 for (std::map<unsigned, pftools::CaloRing>::const_iterator cit =
84 unsigned ring = (*cit).first;
86 s <<
"Ring " << ring <<
":\t" << cr <<
"\n";
90 s <<
"\tTotal E = " << totalE << std::endl;
97 for (map<unsigned, pftools::CaloRing>::const_iterator cit =
101 stream.insert(stream.end(), ringE.begin(), ringE.end());
103 if(normalisation != 1.0){
104 for(vector<double>::iterator
i = stream.begin();
i != stream.end(); ++
i) {
106 entry /= normalisation;
115 for (std::map<unsigned, pftools::CaloRing>::const_iterator cit =
125 baryEta_(0.0), baryPhi_(0.0), nRings_(1),
deltaR_(0.1), nPanes_(1),
axis_(0.0) {
131 init(eta, phi, nRings, deltaR, nPanes, axis);
168 unsigned ring =
static_cast<unsigned> (floor(dR /
deltaR_));
172 return std::pair<unsigned, unsigned>(0, 0);
176 return std::pair<unsigned, unsigned>(
ring, 0);
183 dTheta = TMath::ATan(dPhi / dEta);
185 dTheta = 2 *
TMath::Pi() + TMath::ATan(dPhi / dEta);
188 dTheta =
TMath::Pi() + TMath::ATan(dPhi / dEta);
190 dTheta =
TMath::Pi() + TMath::ATan(dPhi / dEta);
197 dTheta = dTheta -
axis_ - paneOn2;
208 else if (dTheta < 0) {
217 unsigned division =
static_cast<unsigned> (floor((*
energies_.find(ring)).
second.getNPanes() * dTheta
222 return std::pair<unsigned, unsigned>(
ring, division);
229 if (position.first >=
nRings_) {
247 std::map<unsigned, double>
answer;
248 for (std::map<unsigned, CaloRing>::const_iterator cit =
energies_.begin(); cit
250 std::pair<unsigned, CaloRing> pair = *cit;
251 answer[pair.first] = pair.second.totalE();
262 cw.
addHit(0.22, 0.05, 2.0);
265 cw.
addHit(0.15, 0.15, 2.0);
267 cw.
addHit(-0.15, 0.15, 4.0);
269 cw.
addHit(-0.15, -0.15, 6.0);
270 cw.
addHit(-0.0, -0.2, 7.0);
271 cw.
addHit(0.15, -0.15, 8.0);
U second(std::pair< T, U > const &p)
double dPhi(double phi1, double phi2)
const reco::Candidate::LorentzVector & axis_
double deltaR(double eta1, double eta2, double phi1, double phi2)
static int position[264][3]