CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
AnomalousECALVariables Class Reference

#include <AnomalousECALVariables.h>

Public Member Functions

 AnomalousECALVariables ()
 
 AnomalousECALVariables (std::vector< BoundaryInformation > p_enNeighboursGap_EB, std::vector< BoundaryInformation > p_enNeighboursGap_EE, std::vector< BoundaryInformation > p_boundaryInfoDeadCells_EB, std::vector< BoundaryInformation > p_boundaryInfoDeadCells_EE)
 
bool isDeadEcalCluster (double maxBoundaryEnergy=10, std::vector< int > limitDeadCellToChannelStatusEB=std::vector< int >(), 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::AnomalousECALVariables ( )
inline

Definition at line 23 of file AnomalousECALVariables.h.

References v_boundaryInfoDeadCells_EB, v_boundaryInfoDeadCells_EE, v_enNeighboursGap_EB, and v_enNeighboursGap_EE.

23  {
24  //energy next to ECAL Gap
25  v_enNeighboursGap_EB.reserve(50);
26  v_enNeighboursGap_EE.reserve(50);
27  v_enNeighboursGap_EB.clear();
28  v_enNeighboursGap_EE.clear();
29 
30  //energy around dead cells
31  v_boundaryInfoDeadCells_EB = std::vector<BoundaryInformation> ();
32  v_boundaryInfoDeadCells_EE = std::vector<BoundaryInformation> ();
33  v_boundaryInfoDeadCells_EB.reserve(50);
34  v_boundaryInfoDeadCells_EE.reserve(50);
36  v_boundaryInfoDeadCells_EE.clear();
37 
38  }
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 ( std::vector< BoundaryInformation p_enNeighboursGap_EB,
std::vector< BoundaryInformation p_enNeighboursGap_EE,
std::vector< BoundaryInformation p_boundaryInfoDeadCells_EB,
std::vector< BoundaryInformation p_boundaryInfoDeadCells_EE 
)
inline

Definition at line 41 of file AnomalousECALVariables.h.

References v_boundaryInfoDeadCells_EB, v_boundaryInfoDeadCells_EE, v_enNeighboursGap_EB, and v_enNeighboursGap_EE.

43  {
44 
45  v_boundaryInfoDeadCells_EB = std::vector<BoundaryInformation> ();
46  v_boundaryInfoDeadCells_EE = std::vector<BoundaryInformation> ();
47  v_boundaryInfoDeadCells_EB.reserve(50);
48  v_boundaryInfoDeadCells_EE.reserve(50);
50  v_boundaryInfoDeadCells_EE.clear();
51  v_boundaryInfoDeadCells_EB = p_boundaryInfoDeadCells_EB;
52  v_boundaryInfoDeadCells_EE = p_boundaryInfoDeadCells_EE;
53 
54  v_enNeighboursGap_EB = p_enNeighboursGap_EB;
55  v_enNeighboursGap_EE = p_enNeighboursGap_EE;
56  }
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 ( )
inline

Definition at line 59 of file AnomalousECALVariables.h.

References v_boundaryInfoDeadCells_EB, v_boundaryInfoDeadCells_EE, v_enNeighboursGap_EB, and v_enNeighboursGap_EE.

59  {
60  //cout<<"destructor AnomalousECAL"<<endl;
61  v_enNeighboursGap_EB.clear();
62  v_enNeighboursGap_EE.clear();
65  }
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

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

Definition at line 72 of file AnomalousECALVariables.h.

References abs, BoundaryInformation::boundaryEnergy, BoundaryInformation::boundaryET, BoundaryInformation::channelStatus, fwrapper::cs, i, ntuplemaker::status, v_boundaryInfoDeadCells_EB, and v_boundaryInfoDeadCells_EE.

74  {
75 
76  float highestEnergyDepositAroundDeadCell = 0;
77 
78  for (int i = 0; i < (int) v_boundaryInfoDeadCells_EB.size(); ++i) {
80 
81  //check if channel limitation rejectsbInfo
82  bool passChannelLimitation = false;
83  std::vector<int> status = bInfo.channelStatus;
84 
85  for (int cs = 0; cs < (int) limitDeadCellToChannelStatusEB.size(); ++cs) {
86  int channelAllowed = limitDeadCellToChannelStatusEB[cs];
87 
88  for (std::vector<int>::iterator st_it = status.begin(); st_it != status.end(); ++st_it) {
89 
90  if (channelAllowed == *st_it || (channelAllowed < 0 && abs(channelAllowed) <= *st_it)) {
91  passChannelLimitation = true;
92  break;
93  }
94  }
95  }
96 
97  if (passChannelLimitation || limitDeadCellToChannelStatusEB.size() == 0) {
98 
99  if (bInfo.boundaryEnergy > highestEnergyDepositAroundDeadCell) {
100  highestEnergyDepositAroundDeadCell = bInfo.boundaryET;
101  //highestEnergyDepositAroundDeadCell = bInfo.boundaryEnergy;
102  }
103  }
104  }
105 
106  for (int i = 0; i < (int) v_boundaryInfoDeadCells_EE.size(); ++i) {
108 
109  //check if channel limitation rejectsbInfo
110  bool passChannelLimitation = false;
111  std::vector<int> status = bInfo.channelStatus;
112 
113  for (int cs = 0; cs < (int) limitDeadCellToChannelStatusEE.size(); ++cs) {
114  int channelAllowed = limitDeadCellToChannelStatusEE[cs];
115 
116  for (std::vector<int>::iterator st_it = status.begin(); st_it != status.end(); ++st_it) {
117 
118  if (channelAllowed == *st_it || (channelAllowed < 0 && abs(channelAllowed) <= *st_it)) {
119  passChannelLimitation = true;
120  break;
121  }
122  }
123  }
124 
125  if (passChannelLimitation || limitDeadCellToChannelStatusEE.size() == 0) {
126 
127  if (bInfo.boundaryEnergy > highestEnergyDepositAroundDeadCell){
128  highestEnergyDepositAroundDeadCell = bInfo.boundaryET;
129  //highestEnergyDepositAroundDeadCell = bInfo.boundaryEnergy;
130  }
131  }
132  }
133 
134  if (highestEnergyDepositAroundDeadCell > maxBoundaryEnergy) {
135  // cout << "<<<<<<<<<< List of EB Boundary objects <<<<<<<<<<" << endl;
136  // for (int i = 0; i < (int) v_boundaryInfoDeadCells_EB.size(); ++i) {
137  // BoundaryInformation bInfo = v_boundaryInfoDeadCells_EB[i];
138  // cout << "no of neighbouring RecHits:" << bInfo.recHits.size() << endl;
139  // cout << "no of neighbouring DetIds:" << bInfo.detIds.size() << endl;
140  // cout << "boundary energy:" << bInfo.boundaryEnergy << endl;
141  // cout << "Channel stati: ";
142  // for (std::vector<int>::iterator it = bInfo.channelStatus.begin(); it != bInfo.channelStatus.end(); ++it) {
143  // cout << *it << " ";
144  // }
145  // cout << endl;
146  // }
147  // cout << "<<<<<<<<<< List of EE Boundary objects <<<<<<<<<<" << endl;
148  // for (int i = 0; i < (int) v_boundaryInfoDeadCells_EE.size(); ++i) {
149  // BoundaryInformation bInfo = v_boundaryInfoDeadCells_EE[i];
150  // cout << "no of neighbouring RecHits:" << bInfo.recHits.size() << endl;
151  // cout << "no of neighbouring DetIds:" << bInfo.detIds.size() << endl;
152  // cout << "boundary energy:" << bInfo.boundaryEnergy << endl;
153  // cout << "Channel stati: ";
154  // for (std::vector<int>::iterator it = bInfo.channelStatus.begin(); it != bInfo.channelStatus.end(); ++it) {
155  // cout << *it << " ";
156  // }
157  // cout << endl;
158  // }
159  return true;
160  } else
161  return false;
162  }
int i
Definition: DBlmapReader.cc:9
auto_ptr< ClusterSequence > cs
#define abs(x)
Definition: mlp_lapack.h:159
std::vector< BoundaryInformation > v_boundaryInfoDeadCells_EE
std::vector< int > channelStatus
std::vector< BoundaryInformation > v_boundaryInfoDeadCells_EB
tuple status
Definition: ntuplemaker.py:245
bool AnomalousECALVariables::isGapEcalCluster ( double  maxGapEnergyEB = 10,
double  maxGapEnergyEE = 10 
) const
inline

Definition at line 164 of file AnomalousECALVariables.h.

References BoundaryInformation::boundaryEnergy, BoundaryInformation::boundaryET, i, v_enNeighboursGap_EB, and v_enNeighboursGap_EE.

164  {
165 
166  float highestEnergyDepositAlongGapEB = 0;
167 
168  for (int i = 0; i < (int) v_enNeighboursGap_EB.size(); ++i) {
170 
171  if (gapInfo.boundaryEnergy > highestEnergyDepositAlongGapEB){
172  highestEnergyDepositAlongGapEB = gapInfo.boundaryET;
173  //highestEnergyDepositAlongGapEB = gapInfo.boundaryEnergy;
174  }
175  }
176 
177  float highestEnergyDepositAlongGapEE = 0;
178 
179  for (int i = 0; i < (int) v_enNeighboursGap_EE.size(); ++i) {
181 
182  if (gapInfo.boundaryEnergy > highestEnergyDepositAlongGapEE){
183  highestEnergyDepositAlongGapEE = gapInfo.boundaryET;
184  //highestEnergyDepositAlongGapEE = gapInfo.boundaryEnergy;
185  }
186  }
187 
188  if (highestEnergyDepositAlongGapEB > maxGapEnergyEB || highestEnergyDepositAlongGapEE > maxGapEnergyEE) {
189  // cout << "<<<<<<<<<< List of EB Gap objects <<<<<<<<<<" << endl;
190  // for (int i = 0; i < (int) v_enNeighboursGap_EB.size(); ++i) {
191  // BoundaryInformation gapInfo = v_enNeighboursGap_EB[i];
192  // cout << "no of neighbouring RecHits:" << gapInfo.recHits.size() << endl;
193  // cout << "no of neighbouring DetIds:" << gapInfo.detIds.size() << endl;
194  // cout << "gap energy:" << gapInfo.boundaryEnergy << endl;
195  // }
196  // cout << "<<<<<<<<<< List of EE Gap objects <<<<<<<<<<" << endl;
197  // for (int i = 0; i < (int) v_enNeighboursGap_EE.size(); ++i) {
198  // BoundaryInformation gapInfo = v_enNeighboursGap_EE[i];
199  // cout << "no of neighbouring RecHits:" << gapInfo.recHits.size() << endl;
200  // cout << "no of neighbouring DetIds:" << gapInfo.detIds.size() << endl;
201  // cout << "gap energy:" << gapInfo.boundaryEnergy << endl;
202  // }
203  return true;
204  } else
205  return false;
206  }
int i
Definition: DBlmapReader.cc:9
std::vector< BoundaryInformation > v_enNeighboursGap_EE
std::vector< BoundaryInformation > v_enNeighboursGap_EB

Member Data Documentation

std::vector<BoundaryInformation> AnomalousECALVariables::v_boundaryInfoDeadCells_EB
std::vector<BoundaryInformation> AnomalousECALVariables::v_boundaryInfoDeadCells_EE
std::vector<BoundaryInformation> AnomalousECALVariables::v_enNeighboursGap_EB
std::vector<BoundaryInformation> AnomalousECALVariables::v_enNeighboursGap_EE