00001 #ifndef PHOTONBUILDER_H_ 00002 #define PHOTONBUILDER_H_ 00003 00004 #include <initializer_list> 00005 #include <vector> 00006 00007 #include <TTreeReaderArray.h> 00008 #include <TTreeReaderValue.h> 00009 00010 #include <CollectionBuilder.h> 00011 #include <Dataset.h> 00012 #include <Options.h> 00013 #include <PhysicsObjects.h> 00014 00015 00021 class PhotonBuilder : public CollectionBuilder<Photon> { 00022 public: 00023 PhotonBuilder(Dataset &dataset, Options const &); 00024 00026 std::vector<Photon> const &Get() const override; 00027 00028 private: 00030 void Build() const override; 00031 00033 double minPt_; 00034 00036 bool isSim_; 00037 00039 std::string idBranchName_; 00040 bool isIdBitmap_; 00041 00043 mutable std::vector<Photon> photons_; 00044 00045 mutable std::unique_ptr<TTreeReaderArray<float>> srcGenPt_, srcGenEta_; 00046 mutable std::unique_ptr<TTreeReaderArray<float>> srcGenPhi_; 00047 mutable std::unique_ptr<TTreeReaderArray<int>> srcPhotonGenPartIndex_; 00048 mutable std::unique_ptr<TTreeReaderArray<UChar_t>> srcFlavour_; 00049 mutable TTreeReaderArray<float> srcPt_, srcEta_, srcPhi_; 00050 mutable std::unique_ptr<TTreeReaderArray<int>> srcId_; 00051 mutable TTreeReaderArray<bool> srcIsEtaScEb_; 00052 }; 00053 00054 #endif // PHOTONBUILDER_H_ 00055