CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
AnomalousECALVariables Class Reference

#include <AnomalousECALVariables.h>

Public Member Functions

 AnomalousECALVariables ()
 
 AnomalousECALVariables (const std::vector< BoundaryInformation > &p_enNeighboursGap_EB, const std::vector< BoundaryInformation > &p_enNeighboursGap_EE, const std::vector< BoundaryInformation > &p_boundaryInfoDeadCells_EB, const std::vector< BoundaryInformation > &p_boundaryInfoDeadCells_EE)
 
bool isDeadEcalCluster (double maxBoundaryEnergy=10, const std::vector< int > &limitDeadCellToChannelStatusEB=std::vector< int >(), const std::vector< int > &limitDeadCellToChannelStatusEE=std::vector< int >()) const
 
bool isGapEcalCluster (double maxGapEnergyEB=10, double maxGapEnergyEE=10) const
 
 ~AnomalousECALVariables ()
 

Public Attributes

std::vector< BoundaryInformationv_boundaryInfoDeadCells_EB
 
std::vector< BoundaryInformationv_boundaryInfoDeadCells_EE
 
std::vector< BoundaryInformationv_enNeighboursGap_EB
 
std::vector< BoundaryInformationv_enNeighboursGap_EE
 

Detailed Description

Definition at line 20 of file AnomalousECALVariables.h.

Constructor & Destructor Documentation

◆ AnomalousECALVariables() [1/2]

AnomalousECALVariables::AnomalousECALVariables ( )
inline

Definition at line 22 of file AnomalousECALVariables.h.

References v_boundaryInfoDeadCells_EB, v_boundaryInfoDeadCells_EE, v_enNeighboursGap_EB, and v_enNeighboursGap_EE.

22  {
23  //energy next to ECAL Gap
24  v_enNeighboursGap_EB.reserve(50);
25  v_enNeighboursGap_EE.reserve(50);
26  v_enNeighboursGap_EB.clear();
27  v_enNeighboursGap_EE.clear();
28 
29  //energy around dead cells
30  v_boundaryInfoDeadCells_EB = std::vector<BoundaryInformation>();
31  v_boundaryInfoDeadCells_EE = std::vector<BoundaryInformation>();
32  v_boundaryInfoDeadCells_EB.reserve(50);
33  v_boundaryInfoDeadCells_EE.reserve(50);
36  };
std::vector< BoundaryInformation > v_enNeighboursGap_EE
std::vector< BoundaryInformation > v_boundaryInfoDeadCells_EE
std::vector< BoundaryInformation > v_enNeighboursGap_EB
std::vector< BoundaryInformation > v_boundaryInfoDeadCells_EB

◆ AnomalousECALVariables() [2/2]

AnomalousECALVariables::AnomalousECALVariables ( const std::vector< BoundaryInformation > &  p_enNeighboursGap_EB,
const std::vector< BoundaryInformation > &  p_enNeighboursGap_EE,
const std::vector< BoundaryInformation > &  p_boundaryInfoDeadCells_EB,
const std::vector< BoundaryInformation > &  p_boundaryInfoDeadCells_EE 
)
inline

Definition at line 38 of file AnomalousECALVariables.h.

References v_boundaryInfoDeadCells_EB, v_boundaryInfoDeadCells_EE, v_enNeighboursGap_EB, and v_enNeighboursGap_EE.

41  {
42  v_boundaryInfoDeadCells_EB = std::vector<BoundaryInformation>();
43  v_boundaryInfoDeadCells_EE = std::vector<BoundaryInformation>();
44  v_boundaryInfoDeadCells_EB.reserve(50);
45  v_boundaryInfoDeadCells_EE.reserve(50);
48  v_boundaryInfoDeadCells_EB = p_boundaryInfoDeadCells_EB;
49  v_boundaryInfoDeadCells_EE = p_boundaryInfoDeadCells_EE;
50 
51  v_enNeighboursGap_EB = p_enNeighboursGap_EB;
52  v_enNeighboursGap_EE = p_enNeighboursGap_EE;
53  };
std::vector< BoundaryInformation > v_enNeighboursGap_EE
std::vector< BoundaryInformation > v_boundaryInfoDeadCells_EE
std::vector< BoundaryInformation > v_enNeighboursGap_EB
std::vector< BoundaryInformation > v_boundaryInfoDeadCells_EB

◆ ~AnomalousECALVariables()

AnomalousECALVariables::~AnomalousECALVariables ( )
inline

Definition at line 55 of file AnomalousECALVariables.h.

References v_boundaryInfoDeadCells_EB, v_boundaryInfoDeadCells_EE, v_enNeighboursGap_EB, and v_enNeighboursGap_EE.

55  {
56  //cout<<"destructor AnomalousECAL"<<endl;
57  v_enNeighboursGap_EB.clear();
58  v_enNeighboursGap_EE.clear();
61  };
std::vector< BoundaryInformation > v_enNeighboursGap_EE
std::vector< BoundaryInformation > v_boundaryInfoDeadCells_EE
std::vector< BoundaryInformation > v_enNeighboursGap_EB
std::vector< BoundaryInformation > v_boundaryInfoDeadCells_EB

Member Function Documentation

◆ isDeadEcalCluster()

bool AnomalousECALVariables::isDeadEcalCluster ( double  maxBoundaryEnergy = 10,
const std::vector< int > &  limitDeadCellToChannelStatusEB = std::vector<int>(),
const std::vector< int > &  limitDeadCellToChannelStatusEE = std::vector<int>() 
) const
inline

Definition at line 67 of file AnomalousECALVariables.h.

References funct::abs(), BoundaryInformation::boundaryEnergy, BoundaryInformation::boundaryET, BoundaryInformation::channelStatus, callgraph::cs, mps_fire::i, createfilelist::int, EcalDeadCellBoundaryEnergyFilter_cfi::limitDeadCellToChannelStatusEB, EcalDeadCellBoundaryEnergyFilter_cfi::limitDeadCellToChannelStatusEE, mps_update::status, v_boundaryInfoDeadCells_EB, and v_boundaryInfoDeadCells_EE.

69  {
70  float highestEnergyDepositAroundDeadCell = 0;
71 
72  for (int i = 0; i < (int)v_boundaryInfoDeadCells_EB.size(); ++i) {
74 
75  //check if channel limitation rejectsbInfo
76  bool passChannelLimitation = false;
77  std::vector<int> status = bInfo.channelStatus;
78 
79  for (int cs = 0; cs < (int)limitDeadCellToChannelStatusEB.size(); ++cs) {
80  int channelAllowed = limitDeadCellToChannelStatusEB[cs];
81 
82  for (std::vector<int>::iterator st_it = status.begin(); st_it != status.end(); ++st_it) {
83  if (channelAllowed == *st_it || (channelAllowed < 0 && abs(channelAllowed) <= *st_it)) {
84  passChannelLimitation = true;
85  break;
86  }
87  }
88  }
89 
90  if (passChannelLimitation || limitDeadCellToChannelStatusEB.empty()) {
91  if (bInfo.boundaryEnergy > highestEnergyDepositAroundDeadCell) {
92  highestEnergyDepositAroundDeadCell = bInfo.boundaryET;
93  //highestEnergyDepositAroundDeadCell = bInfo.boundaryEnergy;
94  }
95  }
96  }
97 
98  for (int i = 0; i < (int)v_boundaryInfoDeadCells_EE.size(); ++i) {
100 
101  //check if channel limitation rejectsbInfo
102  bool passChannelLimitation = false;
103  std::vector<int> status = bInfo.channelStatus;
104 
105  for (int cs = 0; cs < (int)limitDeadCellToChannelStatusEE.size(); ++cs) {
106  int channelAllowed = limitDeadCellToChannelStatusEE[cs];
107 
108  for (std::vector<int>::iterator st_it = status.begin(); st_it != status.end(); ++st_it) {
109  if (channelAllowed == *st_it || (channelAllowed < 0 && abs(channelAllowed) <= *st_it)) {
110  passChannelLimitation = true;
111  break;
112  }
113  }
114  }
115 
116  if (passChannelLimitation || limitDeadCellToChannelStatusEE.empty()) {
117  if (bInfo.boundaryEnergy > highestEnergyDepositAroundDeadCell) {
118  highestEnergyDepositAroundDeadCell = bInfo.boundaryET;
119  //highestEnergyDepositAroundDeadCell = bInfo.boundaryEnergy;
120  }
121  }
122  }
123 
124  if (highestEnergyDepositAroundDeadCell > maxBoundaryEnergy) {
125  // cout << "<<<<<<<<<< List of EB Boundary objects <<<<<<<<<<" << endl;
126  // for (int i = 0; i < (int) v_boundaryInfoDeadCells_EB.size(); ++i) {
127  // BoundaryInformation bInfo = v_boundaryInfoDeadCells_EB[i];
128  // cout << "no of neighbouring RecHits:" << bInfo.recHits.size() << endl;
129  // cout << "no of neighbouring DetIds:" << bInfo.detIds.size() << endl;
130  // cout << "boundary energy:" << bInfo.boundaryEnergy << endl;
131  // cout << "Channel stati: ";
132  // for (std::vector<int>::iterator it = bInfo.channelStatus.begin(); it != bInfo.channelStatus.end(); ++it) {
133  // cout << *it << " ";
134  // }
135  // cout << endl;
136  // }
137  // cout << "<<<<<<<<<< List of EE Boundary objects <<<<<<<<<<" << endl;
138  // for (int i = 0; i < (int) v_boundaryInfoDeadCells_EE.size(); ++i) {
139  // BoundaryInformation bInfo = v_boundaryInfoDeadCells_EE[i];
140  // cout << "no of neighbouring RecHits:" << bInfo.recHits.size() << endl;
141  // cout << "no of neighbouring DetIds:" << bInfo.detIds.size() << endl;
142  // cout << "boundary energy:" << bInfo.boundaryEnergy << endl;
143  // cout << "Channel stati: ";
144  // for (std::vector<int>::iterator it = bInfo.channelStatus.begin(); it != bInfo.channelStatus.end(); ++it) {
145  // cout << *it << " ";
146  // }
147  // cout << endl;
148  // }
149  return true;
150  } else
151  return false;
152  }
std::vector< BoundaryInformation > v_boundaryInfoDeadCells_EE
limitDeadCellToChannelStatusEB
Limit dead cells to channel status, only rec hits around channel with channel status given are consid...
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< int > channelStatus
std::vector< BoundaryInformation > v_boundaryInfoDeadCells_EB

◆ isGapEcalCluster()

bool AnomalousECALVariables::isGapEcalCluster ( double  maxGapEnergyEB = 10,
double  maxGapEnergyEE = 10 
) const
inline

Definition at line 154 of file AnomalousECALVariables.h.

References BoundaryInformation::boundaryEnergy, BoundaryInformation::boundaryET, mps_fire::i, createfilelist::int, v_enNeighboursGap_EB, and v_enNeighboursGap_EE.

154  {
155  float highestEnergyDepositAlongGapEB = 0;
156 
157  for (int i = 0; i < (int)v_enNeighboursGap_EB.size(); ++i) {
159 
160  if (gapInfo.boundaryEnergy > highestEnergyDepositAlongGapEB) {
161  highestEnergyDepositAlongGapEB = gapInfo.boundaryET;
162  //highestEnergyDepositAlongGapEB = gapInfo.boundaryEnergy;
163  }
164  }
165 
166  float highestEnergyDepositAlongGapEE = 0;
167 
168  for (int i = 0; i < (int)v_enNeighboursGap_EE.size(); ++i) {
170 
171  if (gapInfo.boundaryEnergy > highestEnergyDepositAlongGapEE) {
172  highestEnergyDepositAlongGapEE = gapInfo.boundaryET;
173  //highestEnergyDepositAlongGapEE = gapInfo.boundaryEnergy;
174  }
175  }
176 
177  if (highestEnergyDepositAlongGapEB > maxGapEnergyEB || highestEnergyDepositAlongGapEE > maxGapEnergyEE) {
178  // cout << "<<<<<<<<<< List of EB Gap objects <<<<<<<<<<" << endl;
179  // for (int i = 0; i < (int) v_enNeighboursGap_EB.size(); ++i) {
180  // BoundaryInformation gapInfo = v_enNeighboursGap_EB[i];
181  // cout << "no of neighbouring RecHits:" << gapInfo.recHits.size() << endl;
182  // cout << "no of neighbouring DetIds:" << gapInfo.detIds.size() << endl;
183  // cout << "gap energy:" << gapInfo.boundaryEnergy << endl;
184  // }
185  // cout << "<<<<<<<<<< List of EE Gap objects <<<<<<<<<<" << endl;
186  // for (int i = 0; i < (int) v_enNeighboursGap_EE.size(); ++i) {
187  // BoundaryInformation gapInfo = v_enNeighboursGap_EE[i];
188  // cout << "no of neighbouring RecHits:" << gapInfo.recHits.size() << endl;
189  // cout << "no of neighbouring DetIds:" << gapInfo.detIds.size() << endl;
190  // cout << "gap energy:" << gapInfo.boundaryEnergy << endl;
191  // }
192  return true;
193  } else
194  return false;
195  }
std::vector< BoundaryInformation > v_enNeighboursGap_EE
std::vector< BoundaryInformation > v_enNeighboursGap_EB

Member Data Documentation

◆ v_boundaryInfoDeadCells_EB

std::vector<BoundaryInformation> AnomalousECALVariables::v_boundaryInfoDeadCells_EB

◆ v_boundaryInfoDeadCells_EE

std::vector<BoundaryInformation> AnomalousECALVariables::v_boundaryInfoDeadCells_EE

◆ v_enNeighboursGap_EB

std::vector<BoundaryInformation> AnomalousECALVariables::v_enNeighboursGap_EB

◆ v_enNeighboursGap_EE

std::vector<BoundaryInformation> AnomalousECALVariables::v_enNeighboursGap_EE