CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
HGCalTriggerNtupleHGCTriggerCells Class Reference
Inheritance diagram for HGCalTriggerNtupleHGCTriggerCells:
HGCalTriggerNtupleBase

Public Member Functions

virtual void fill (const edm::Event &e, const edm::EventSetup &es) override final
 
 HGCalTriggerNtupleHGCTriggerCells (const edm::ParameterSet &conf)
 
virtual void initialize (TTree &, const edm::ParameterSet &, edm::ConsumesCollector &&) override final
 
 ~HGCalTriggerNtupleHGCTriggerCells ()
 
- Public Member Functions inherited from HGCalTriggerNtupleBase
 HGCalTriggerNtupleBase (const edm::ParameterSet &conf)
 
virtual ~HGCalTriggerNtupleBase ()
 

Private Member Functions

virtual void clear () override final
 

Private Attributes

std::vector< int > tc_cell_
 
std::vector< uint32_t > tc_data_
 
std::vector< float > tc_energy_
 
std::vector< float > tc_eta_
 
std::vector< uint32_t > tc_id_
 
std::vector< int > tc_layer_
 
int tc_n_
 
std::vector< float > tc_phi_
 
std::vector< int > tc_side_
 
std::vector< int > tc_subdet_
 
std::vector< int > tc_wafer_
 
std::vector< int > tc_wafertype_
 
std::vector< float > tc_z_
 
edm::EDGetToken trigger_cells_token_
 

Additional Inherited Members

Detailed Description

Definition at line 9 of file HGCalTriggerNtupleHGCTriggerCells.cc.

Constructor & Destructor Documentation

HGCalTriggerNtupleHGCTriggerCells::HGCalTriggerNtupleHGCTriggerCells ( const edm::ParameterSet conf)

Definition at line 46 of file HGCalTriggerNtupleHGCTriggerCells.cc.

References initialize().

47 {
48 }
HGCalTriggerNtupleBase(const edm::ParameterSet &conf)
HGCalTriggerNtupleHGCTriggerCells::~HGCalTriggerNtupleHGCTriggerCells ( )
inline

Definition at line 14 of file HGCalTriggerNtupleHGCTriggerCells.cc.

References clear(), MillePedeFileConverter_cfg::e, fill(), and initialize().

14 {};

Member Function Documentation

void HGCalTriggerNtupleHGCTriggerCells::clear ( void  )
finaloverrideprivatevirtual

Implements HGCalTriggerNtupleBase.

Definition at line 114 of file HGCalTriggerNtupleHGCTriggerCells.cc.

References tc_cell_, tc_data_, tc_energy_, tc_eta_, tc_id_, tc_layer_, tc_n_, tc_phi_, tc_side_, tc_subdet_, tc_wafer_, tc_wafertype_, and tc_z_.

Referenced by fill(), and ~HGCalTriggerNtupleHGCTriggerCells().

115 {
116  tc_n_ = 0;
117  tc_id_.clear();
118  tc_subdet_.clear();
119  tc_side_.clear();
120  tc_layer_.clear();
121  tc_wafer_.clear();
122  tc_wafertype_.clear();
123  tc_cell_.clear();
124  tc_data_.clear();
125  tc_energy_.clear();
126  tc_eta_.clear();
127  tc_phi_.clear();
128  tc_z_.clear();
129 }
void HGCalTriggerNtupleHGCTriggerCells::fill ( const edm::Event e,
const edm::EventSetup es 
)
finaloverridevirtual

Implements HGCalTriggerNtupleBase.

Definition at line 74 of file HGCalTriggerNtupleHGCTriggerCells.cc.

References BXVector< T >::begin(), clear(), BXVector< T >::end(), geometry, edm::EventSetup::get(), edm::Event::getByToken(), hcalTTPDigis_cfi::id, tc_cell_, tc_data_, tc_energy_, tc_eta_, tc_id_, tc_layer_, tc_n_, tc_phi_, tc_side_, tc_subdet_, tc_wafer_, tc_wafertype_, tc_z_, trigger_cells_token_, and HcalDigiParam_cfi::zside.

Referenced by initialize(), and ~HGCalTriggerNtupleHGCTriggerCells().

75 {
76 
77  // retrieve trigger cells
79  e.getByToken(trigger_cells_token_, trigger_cells_h);
80  const l1t::HGCalTriggerCellBxCollection& trigger_cells = *trigger_cells_h;
81 
82  // retrieve geometry
84  es.get<IdealGeometryRecord>().get(geometry);
85 
86  clear();
87  for(auto tc_itr=trigger_cells.begin(0); tc_itr!=trigger_cells.end(0); tc_itr++)
88  {
89  if(tc_itr->hwPt()>0)
90  {
91  tc_n_++;
92  // hardware data
93  HGCalDetId id(tc_itr->detId());
94  tc_id_.emplace_back(tc_itr->detId());
95  tc_subdet_.emplace_back(id.subdetId());
96  tc_side_.emplace_back(id.zside());
97  tc_layer_.emplace_back(id.layer());
98  tc_wafer_.emplace_back(id.wafer());
99  tc_wafertype_.emplace_back(id.waferType());
100  tc_cell_.emplace_back(id.cell());
101  tc_data_.emplace_back(tc_itr->hwPt());
102  // physical values
103  tc_energy_.emplace_back(tc_itr->energy());
104  tc_eta_.emplace_back(tc_itr->eta());
105  tc_phi_.emplace_back(tc_itr->phi());
106  tc_z_.emplace_back(tc_itr->position().z());
107  }
108  }
109 }
const_iterator end(int bx) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
const T & get() const
Definition: EventSetup.h:56
ESHandle< TrackerGeometry > geometry
const_iterator begin(int bx) const
void HGCalTriggerNtupleHGCTriggerCells::initialize ( TTree &  tree,
const edm::ParameterSet conf,
edm::ConsumesCollector &&  collector 
)
finaloverridevirtual

Implements HGCalTriggerNtupleBase.

Definition at line 52 of file HGCalTriggerNtupleHGCTriggerCells.cc.

References fill(), edm::ParameterSet::getParameter(), tc_cell_, tc_data_, tc_energy_, tc_eta_, tc_id_, tc_layer_, tc_n_, tc_phi_, tc_side_, tc_subdet_, tc_wafer_, tc_wafertype_, tc_z_, and trigger_cells_token_.

Referenced by HGCalTriggerNtupleHGCTriggerCells(), and ~HGCalTriggerNtupleHGCTriggerCells().

53 {
55 
56  tree.Branch("tc_n", &tc_n_, "tc_n/I");
57  tree.Branch("tc_id", &tc_id_);
58  tree.Branch("tc_subdet", &tc_subdet_);
59  tree.Branch("tc_zside", &tc_side_);
60  tree.Branch("tc_layer", &tc_layer_);
61  tree.Branch("tc_wafer", &tc_wafer_);
62  tree.Branch("tc_wafertype", &tc_wafertype_);
63  tree.Branch("tc_cell", &tc_cell_);
64  tree.Branch("tc_data", &tc_data_);
65  tree.Branch("tc_energy", &tc_energy_);
66  tree.Branch("tc_eta", &tc_eta_);
67  tree.Branch("tc_phi", &tc_phi_);
68  tree.Branch("tc_z", &tc_z_);
69 
70 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
Definition: tree.py:1

Member Data Documentation

std::vector<int> HGCalTriggerNtupleHGCTriggerCells::tc_cell_
private

Definition at line 31 of file HGCalTriggerNtupleHGCTriggerCells.cc.

Referenced by clear(), fill(), and initialize().

std::vector<uint32_t> HGCalTriggerNtupleHGCTriggerCells::tc_data_
private

Definition at line 32 of file HGCalTriggerNtupleHGCTriggerCells.cc.

Referenced by clear(), fill(), and initialize().

std::vector<float> HGCalTriggerNtupleHGCTriggerCells::tc_energy_
private

Definition at line 33 of file HGCalTriggerNtupleHGCTriggerCells.cc.

Referenced by clear(), fill(), and initialize().

std::vector<float> HGCalTriggerNtupleHGCTriggerCells::tc_eta_
private

Definition at line 34 of file HGCalTriggerNtupleHGCTriggerCells.cc.

Referenced by clear(), fill(), and initialize().

std::vector<uint32_t> HGCalTriggerNtupleHGCTriggerCells::tc_id_
private

Definition at line 25 of file HGCalTriggerNtupleHGCTriggerCells.cc.

Referenced by clear(), fill(), and initialize().

std::vector<int> HGCalTriggerNtupleHGCTriggerCells::tc_layer_
private

Definition at line 28 of file HGCalTriggerNtupleHGCTriggerCells.cc.

Referenced by clear(), fill(), and initialize().

int HGCalTriggerNtupleHGCTriggerCells::tc_n_
private

Definition at line 24 of file HGCalTriggerNtupleHGCTriggerCells.cc.

Referenced by clear(), fill(), and initialize().

std::vector<float> HGCalTriggerNtupleHGCTriggerCells::tc_phi_
private

Definition at line 35 of file HGCalTriggerNtupleHGCTriggerCells.cc.

Referenced by clear(), fill(), and initialize().

std::vector<int> HGCalTriggerNtupleHGCTriggerCells::tc_side_
private

Definition at line 27 of file HGCalTriggerNtupleHGCTriggerCells.cc.

Referenced by clear(), fill(), and initialize().

std::vector<int> HGCalTriggerNtupleHGCTriggerCells::tc_subdet_
private

Definition at line 26 of file HGCalTriggerNtupleHGCTriggerCells.cc.

Referenced by clear(), fill(), and initialize().

std::vector<int> HGCalTriggerNtupleHGCTriggerCells::tc_wafer_
private

Definition at line 29 of file HGCalTriggerNtupleHGCTriggerCells.cc.

Referenced by clear(), fill(), and initialize().

std::vector<int> HGCalTriggerNtupleHGCTriggerCells::tc_wafertype_
private

Definition at line 30 of file HGCalTriggerNtupleHGCTriggerCells.cc.

Referenced by clear(), fill(), and initialize().

std::vector<float> HGCalTriggerNtupleHGCTriggerCells::tc_z_
private

Definition at line 36 of file HGCalTriggerNtupleHGCTriggerCells.cc.

Referenced by clear(), fill(), and initialize().

edm::EDGetToken HGCalTriggerNtupleHGCTriggerCells::trigger_cells_token_
private

Definition at line 22 of file HGCalTriggerNtupleHGCTriggerCells.cc.

Referenced by fill(), and initialize().