12 embeddedSuperCluster_(
false),
13 embeddedSeedCluster_(
false),
14 embeddedRecHits_(
false),
15 passElectronVeto_(
false),
31 maxDRRawEnergy_(-999.),
49 embeddedSuperCluster_(
false),
50 embeddedSeedCluster_(
false),
51 embeddedRecHits_(
false),
52 passElectronVeto_(
false),
68 maxDRRawEnergy_(-999.),
86 embeddedSuperCluster_(
false),
87 embeddedSeedCluster_(
false),
88 embeddedRecHits_(
false),
89 passElectronVeto_(
false),
105 maxDRRawEnergy_(-999.),
106 subClusRawE1_(-999.),
107 subClusRawE2_(-999.),
108 subClusRawE3_(-999.),
109 subClusDPhi1_(-999.),
110 subClusDPhi2_(-999.),
111 subClusDPhi3_(-999.),
112 subClusDEta1_(-999.),
113 subClusDEta2_(-999.),
114 subClusDEta3_(-999.),
123 embeddedSuperCluster_(
false),
124 embeddedSeedCluster_(
false),
125 embeddedRecHits_(
false),
126 passElectronVeto_(
false),
127 hasPixelSeed_(
false),
142 maxDRRawEnergy_(-999.),
143 subClusRawE1_(-999.),
144 subClusRawE2_(-999.),
145 subClusRawE3_(-999.),
146 subClusDPhi1_(-999.),
147 subClusDPhi2_(-999.),
148 subClusDPhi3_(-999.),
149 subClusDEta1_(-999.),
150 subClusDEta2_(-999.),
151 subClusDEta3_(-999.),
164 out <<
"\tpat::Photon: ";
165 out << std::setiosflags(std::ios::right);
166 out << std::setiosflags(std::ios::fixed);
167 out << std::setprecision(3);
168 out <<
" E/pT/eta/phi " << obj.
energy() <<
"/" << obj.
pt() <<
"/" << obj.
eta() <<
"/" << obj.
phi();
175 if (embeddedSuperCluster_) {
176 if (embeddedSeedCluster_ || !basicClusters_.empty() || !preshowerClusters_.empty()) {
177 if (!superClusterRelinked_.isSet()) {
178 std::unique_ptr<std::vector<reco::SuperCluster> > sc(
new std::vector<reco::SuperCluster>(superCluster_));
179 if (embeddedSeedCluster_ && !(*sc)[0].
seed().isAvailable()) {
180 (*sc)[0].setSeed(
seed());
182 if (!basicClusters_.empty() && !(*sc)[0].clusters().isAvailable()) {
184 for (
unsigned int iclus = 0; iclus < basicClusters_.size(); ++iclus) {
187 (*sc)[0].setClusters(clusters);
189 if (!preshowerClusters_.empty() && !(*sc)[0].preshowerClusters().isAvailable()) {
191 for (
unsigned int iclus = 0; iclus < preshowerClusters_.size(); ++iclus) {
194 (*sc)[0].setPreshowerClusters(clusters);
196 superClusterRelinked_.set(
std::move(sc));
209 if (embeddedSeedCluster_) {
217 void Photon::embedSuperCluster() {
218 superCluster_.clear();
221 embeddedSuperCluster_ =
true;
226 void Photon::embedSeedCluster() {
227 seedCluster_.clear();
230 embeddedSeedCluster_ =
true;
235 void Photon::embedBasicClusters() {
236 basicClusters_.clear();
240 for (; itscl != itsclE; ++itscl) {
241 basicClusters_.push_back(**itscl);
247 void Photon::embedPreshowerClusters() {
248 preshowerClusters_.clear();
252 for (; itscl != itsclE; ++itscl) {
253 preshowerClusters_.push_back(**itscl);
260 if (rechits !=
nullptr) {
262 embeddedRecHits_ =
true;
268 for (std::vector<IdPair>::const_iterator it = photonIDs_.begin(), ed = photonIDs_.end(); it != ed; ++it) {
269 if (it->first == name)
273 ex <<
"pat::Photon: the ID " << name <<
" can't be found in this pat::Photon.\n";
274 ex <<
"The available IDs are: ";
275 for (std::vector<IdPair>::const_iterator it = photonIDs_.begin(), ed = photonIDs_.end(); it != ed; ++it) {
276 ex <<
"'" << it->first <<
"' ";
282 bool Photon::isPhotonIDAvailable(
const std::string& name)
const {
283 for (std::vector<IdPair>::const_iterator it = photonIDs_.begin(), ed = photonIDs_.end(); it != ed; ++it) {
284 if (it->first == name)
292 for (uint16_t idx : associatedPackedFCandidateIndices_) {
301 if (i >= associatedPackedFCandidateIndices_.size()) {
Analysis-level Photon class.
tuple ret
prodAgent to be discontinued
Ptr< typename C::value_type > refToPtr(Ref< C, typename C::value_type, refhelper::FindUsingAdvance< C, typename C::value_type > > const &ref)
double pt() const final
transverse momentum
void push_back(Ptr< T > const &iPtr)
CandidatePtr sourceCandidatePtr(size_type i) const override
edm::Ptr< CaloCluster > CaloClusterPtr
edm::Ref< SuperClusterCollection > SuperClusterRef
reference to an object in a collection of SuperCluster objects
Photon()
default constructor
std::ostream & operator<<(std::ostream &, BeamSpot beam)
reco::SuperClusterRef superCluster() const override
Ref to SuperCluster.
~Photon() override
destructor
edm::Ptr< Candidate > CandidatePtr
persistent reference to an object in a collection of Candidate objects
double phi() const final
momentum azimuthal angle
double energy() const final
energy
double eta() const final
momentum pseudorapidity