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 10 of file HGCalTriggerNtupleHGCTriggerCells.cc.

Constructor & Destructor Documentation

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

Definition at line 47 of file HGCalTriggerNtupleHGCTriggerCells.cc.

References initialize().

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

Definition at line 15 of file HGCalTriggerNtupleHGCTriggerCells.cc.

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

15 {};

Member Function Documentation

void HGCalTriggerNtupleHGCTriggerCells::clear ( void  )
finaloverrideprivatevirtual

Implements HGCalTriggerNtupleBase.

Definition at line 115 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().

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

Implements HGCalTriggerNtupleBase.

Definition at line 75 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().

76 {
77 
78  // retrieve trigger cells
80  e.getByToken(trigger_cells_token_, trigger_cells_h);
81  const l1t::HGCalTriggerCellBxCollection& trigger_cells = *trigger_cells_h;
82 
83  // retrieve geometry
85  es.get<CaloGeometryRecord>().get(geometry);
86 
87  clear();
88  for(auto tc_itr=trigger_cells.begin(0); tc_itr!=trigger_cells.end(0); tc_itr++)
89  {
90  if(tc_itr->hwPt()>0)
91  {
92  tc_n_++;
93  // hardware data
94  HGCalDetId id(tc_itr->detId());
95  tc_id_.emplace_back(tc_itr->detId());
96  tc_subdet_.emplace_back(id.subdetId());
97  tc_side_.emplace_back(id.zside());
98  tc_layer_.emplace_back(id.layer());
99  tc_wafer_.emplace_back(id.wafer());
100  tc_wafertype_.emplace_back(id.waferType());
101  tc_cell_.emplace_back(id.cell());
102  tc_data_.emplace_back(tc_itr->hwPt());
103  // physical values
104  tc_energy_.emplace_back(tc_itr->energy());
105  tc_eta_.emplace_back(tc_itr->eta());
106  tc_phi_.emplace_back(tc_itr->phi());
107  tc_z_.emplace_back(tc_itr->position().z());
108  }
109  }
110 }
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:55
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 53 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().

54 {
56 
57  tree.Branch("tc_n", &tc_n_, "tc_n/I");
58  tree.Branch("tc_id", &tc_id_);
59  tree.Branch("tc_subdet", &tc_subdet_);
60  tree.Branch("tc_zside", &tc_side_);
61  tree.Branch("tc_layer", &tc_layer_);
62  tree.Branch("tc_wafer", &tc_wafer_);
63  tree.Branch("tc_wafertype", &tc_wafertype_);
64  tree.Branch("tc_cell", &tc_cell_);
65  tree.Branch("tc_data", &tc_data_);
66  tree.Branch("tc_energy", &tc_energy_);
67  tree.Branch("tc_eta", &tc_eta_);
68  tree.Branch("tc_phi", &tc_phi_);
69  tree.Branch("tc_z", &tc_z_);
70 
71 }
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 32 of file HGCalTriggerNtupleHGCTriggerCells.cc.

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

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

Definition at line 33 of file HGCalTriggerNtupleHGCTriggerCells.cc.

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

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

Definition at line 34 of file HGCalTriggerNtupleHGCTriggerCells.cc.

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

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

Definition at line 35 of file HGCalTriggerNtupleHGCTriggerCells.cc.

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

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

Definition at line 26 of file HGCalTriggerNtupleHGCTriggerCells.cc.

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

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

Definition at line 29 of file HGCalTriggerNtupleHGCTriggerCells.cc.

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

int HGCalTriggerNtupleHGCTriggerCells::tc_n_
private

Definition at line 25 of file HGCalTriggerNtupleHGCTriggerCells.cc.

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

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

Definition at line 36 of file HGCalTriggerNtupleHGCTriggerCells.cc.

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

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

Definition at line 28 of file HGCalTriggerNtupleHGCTriggerCells.cc.

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

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

Definition at line 27 of file HGCalTriggerNtupleHGCTriggerCells.cc.

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

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

Definition at line 30 of file HGCalTriggerNtupleHGCTriggerCells.cc.

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

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

Definition at line 31 of file HGCalTriggerNtupleHGCTriggerCells.cc.

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

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

Definition at line 37 of file HGCalTriggerNtupleHGCTriggerCells.cc.

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

edm::EDGetToken HGCalTriggerNtupleHGCTriggerCells::trigger_cells_token_
private

Definition at line 23 of file HGCalTriggerNtupleHGCTriggerCells.cc.

Referenced by fill(), and initialize().