14 embeddedSuperCluster_(
false),
15 embeddedSeedCluster_(
false),
16 embeddedRecHits_(
false),
17 passElectronVeto_(
false),
33 maxDRRawEnergy_(-999.),
53 embeddedSuperCluster_(
false),
54 embeddedSeedCluster_(
false),
55 embeddedRecHits_(
false),
56 passElectronVeto_(
false),
72 maxDRRawEnergy_(-999.),
92 embeddedSuperCluster_(
false),
93 embeddedSeedCluster_(
false),
94 embeddedRecHits_(
false),
95 passElectronVeto_(
false),
111 maxDRRawEnergy_(-999.),
112 subClusRawE1_(-999.),
113 subClusRawE2_(-999.),
114 subClusRawE3_(-999.),
115 subClusDPhi1_(-999.),
116 subClusDPhi2_(-999.),
117 subClusDPhi3_(-999.),
118 subClusDEta1_(-999.),
119 subClusDEta2_(-999.),
120 subClusDEta3_(-999.),
131 embeddedSuperCluster_(
false),
132 embeddedSeedCluster_(
false),
133 embeddedRecHits_(
false),
134 passElectronVeto_(
false),
135 hasPixelSeed_(
false),
150 maxDRRawEnergy_(-999.),
151 subClusRawE1_(-999.),
152 subClusRawE2_(-999.),
153 subClusRawE3_(-999.),
154 subClusDPhi1_(-999.),
155 subClusDPhi2_(-999.),
156 subClusDPhi3_(-999.),
157 subClusDEta1_(-999.),
158 subClusDEta2_(-999.),
159 subClusDEta3_(-999.),
176 out <<
"\tpat::Photon: ";
177 out << std::setiosflags(std::ios::right);
178 out << std::setiosflags(std::ios::fixed);
179 out << std::setprecision(3);
180 out <<
" E/pT/eta/phi "
191 if (embeddedSuperCluster_) {
192 if (embeddedSeedCluster_ || !basicClusters_.empty() || !preshowerClusters_.empty()) {
193 if (!superClusterRelinked_.isSet()) {
194 std::unique_ptr<std::vector<reco::SuperCluster> > sc(
new std::vector<reco::SuperCluster>(superCluster_));
195 if (embeddedSeedCluster_ && !(*sc)[0].
seed().isAvailable()) {
196 (*sc)[0].setSeed(
seed());
198 if (basicClusters_.size() && !(*sc)[0].clusters().isAvailable()) {
200 for (
unsigned int iclus=0; iclus<basicClusters_.size(); ++iclus) {
203 (*sc)[0].setClusters(clusters);
205 if (preshowerClusters_.size() && !(*sc)[0].preshowerClusters().isAvailable()) {
207 for (
unsigned int iclus=0; iclus<preshowerClusters_.size(); ++iclus) {
210 (*sc)[0].setPreshowerClusters(clusters);
212 superClusterRelinked_.set(std::move(sc));
225 if(embeddedSeedCluster_){
233 void Photon::embedSuperCluster() {
234 superCluster_.clear();
237 embeddedSuperCluster_ =
true;
242 void Photon::embedSeedCluster() {
243 seedCluster_.clear();
246 embeddedSeedCluster_ =
true;
251 void Photon::embedBasicClusters() {
252 basicClusters_.clear();
256 for(;itscl!=itsclE;++itscl){
257 basicClusters_.push_back( **itscl ) ;
263 void Photon::embedPreshowerClusters() {
264 preshowerClusters_.clear();
268 for(;itscl!=itsclE;++itscl){
269 preshowerClusters_.push_back( **itscl ) ;
278 embeddedRecHits_ =
true;
284 for (std::vector<IdPair>::const_iterator it = photonIDs_.begin(), ed = photonIDs_.end(); it != ed; ++it) {
285 if (it->first == name)
return it->second;
288 ex <<
"pat::Photon: the ID " << name <<
" can't be found in this pat::Photon.\n";
289 ex <<
"The available IDs are: ";
290 for (std::vector<IdPair>::const_iterator it = photonIDs_.begin(), ed = photonIDs_.end(); it != ed; ++it) {
291 ex <<
"'" << it->first <<
"' ";
297 bool Photon::isPhotonIDAvailable(
const std::string & name)
const {
298 for (std::vector<IdPair>::const_iterator it = photonIDs_.begin(), ed = photonIDs_.end(); it != ed; ++it) {
299 if (it->first == name)
return true;
306 if (!associatedPackedFCandidateIndices_.empty())
throw cms::Exception(
"Unsupported",
"You can't call setPackedPFCandidateCollection _after_ having called setAssociatedPackedPFCandidates");
307 packedPFCandidates_ = refprod;
312 for (uint16_t
idx : associatedPackedFCandidateIndices_) {
319 if (packedPFCandidates_.isNonnull()) {
320 if (refvector.
id().isValid() && refvector.
id() != packedPFCandidates_.id()) {
321 throw cms::Exception(
"Unsupported",
"setAssociatedPackedPFCandidates pointing to a collection other than the one from setPackedPFCandidateCollection");
326 associatedPackedFCandidateIndices_.clear();
328 associatedPackedFCandidateIndices_.push_back(ref.key());
335 if (i >= associatedPackedFCandidateIndices_.size()) {
Analysis-level Photon class.
Ptr< typename C::value_type > refToPtr(Ref< C, typename C::value_type, refhelper::FindUsingAdvance< C, typename C::value_type > > const &ref)
virtual float pt() const
transverse momentum
reco::SuperClusterRef superCluster() const
Ref to SuperCluster.
virtual ~Photon()
destructor
void push_back(Ptr< T > const &iPtr)
virtual float phi() const
momentum azimuthal angle
edm::Ptr< CaloCluster > CaloClusterPtr
edm::Ref< SuperClusterCollection > SuperClusterRef
reference to an object in a collection of SuperCluster objects
Photon()
default constructor
virtual double energy() const
energy
std::ostream & operator<<(std::ostream &, BeamSpot beam)
ProductID id() const
Accessor for product ID.
virtual float eta() const
momentum pseudorapidity
virtual CandidatePtr sourceCandidatePtr(size_type i) const
edm::Ptr< Candidate > CandidatePtr
persistent reference to an object in a collection of Candidate objects
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
volatile std::atomic< bool > shutdown_flag false