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";
71 s <<
" => ring E = " << caloRing.
totalE();
78 s <<
"CaloWindow at (" << caloWindow.
baryEta() <<
", " 79 << caloWindow.
baryPhi() <<
"):\n";
81 for (std::map<unsigned, pftools::CaloRing>::const_iterator cit =
83 unsigned ring = (*cit).first;
85 s <<
"Ring " << ring <<
":\t" << cr <<
"\n";
89 s <<
"\tTotal E = " << totalE << std::endl;
95 vector<double> stream;
96 for (map<unsigned, pftools::CaloRing>::const_iterator cit =
97 energies_.begin(); cit != energies_.end(); ++cit) {
100 stream.insert(stream.end(), ringE.begin(), ringE.end());
102 if(normalisation != 1.0){
103 for(vector<double>::iterator
i = stream.begin();
i != stream.end(); ++
i) {
105 entry /= normalisation;
114 for (std::map<unsigned, pftools::CaloRing>::const_iterator cit =
115 energies_.begin(); cit != energies_.end(); ++cit) {
124 baryEta_(0.0), baryPhi_(0.0), nRings_(1),
deltaR_(0.1), nPanes_(1),
axis_(0.0) {
130 init(eta, phi, nRings, deltaR, nPanes, axis);
148 for (
unsigned j(1); j <
nRings_; ++j) {
167 unsigned ring =
static_cast<unsigned> (floor(dR /
deltaR_));
171 return std::pair<unsigned, unsigned>(0, 0);
175 return std::pair<unsigned, unsigned>(
ring, 0);
182 dTheta = TMath::ATan(dPhi / dEta);
184 dTheta = 2 *
TMath::Pi() + TMath::ATan(dPhi / dEta);
187 dTheta =
TMath::Pi() + TMath::ATan(dPhi / dEta);
189 dTheta =
TMath::Pi() + TMath::ATan(dPhi / dEta);
196 dTheta = dTheta -
axis_ - paneOn2;
207 else if (dTheta < 0) {
216 unsigned division =
static_cast<unsigned> (floor((*
energies_.find(ring)).
second.getNPanes() * dTheta
221 return std::pair<unsigned, unsigned>(
ring, division);
228 if (position.first >=
nRings_) {
246 std::map<unsigned, double>
answer;
247 for (std::map<unsigned, CaloRing>::const_iterator cit =
energies_.begin(); cit
249 std::pair<unsigned, CaloRing> pair = *cit;
250 answer[pair.first] = pair.second.totalE();
261 cw.
addHit(0.22, 0.05, 2.0);
264 cw.
addHit(0.15, 0.15, 2.0);
266 cw.
addHit(-0.15, 0.15, 4.0);
268 cw.
addHit(-0.15, -0.15, 6.0);
269 cw.
addHit(-0.0, -0.2, 7.0);
270 cw.
addHit(0.15, -0.15, 8.0);
U second(std::pair< T, U > const &p)
const reco::Candidate::LorentzVector & axis_
double deltaR(double eta1, double eta2, double phi1, double phi2)
static int position[264][3]