CMS 3D CMS Logo

Public Member Functions | Public Attributes

AnomalousECALVariables Class Reference

#include <AnomalousECALVariables.h>

List of all members.

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.

                               {
         //energy next to ECAL Gap
         v_enNeighboursGap_EB.reserve(50);
         v_enNeighboursGap_EE.reserve(50);
         v_enNeighboursGap_EB.clear();
         v_enNeighboursGap_EE.clear();

         //energy around dead cells
         v_boundaryInfoDeadCells_EB = std::vector<BoundaryInformation> ();
         v_boundaryInfoDeadCells_EE = std::vector<BoundaryInformation> ();
         v_boundaryInfoDeadCells_EB.reserve(50);
         v_boundaryInfoDeadCells_EE.reserve(50);
         v_boundaryInfoDeadCells_EB.clear();
         v_boundaryInfoDeadCells_EE.clear();

      }
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.

                                                                       {

         v_boundaryInfoDeadCells_EB = std::vector<BoundaryInformation> ();
         v_boundaryInfoDeadCells_EE = std::vector<BoundaryInformation> ();
         v_boundaryInfoDeadCells_EB.reserve(50);
         v_boundaryInfoDeadCells_EE.reserve(50);
         v_boundaryInfoDeadCells_EB.clear();
         v_boundaryInfoDeadCells_EE.clear();
         v_boundaryInfoDeadCells_EB = p_boundaryInfoDeadCells_EB;
         v_boundaryInfoDeadCells_EE = p_boundaryInfoDeadCells_EE;

         v_enNeighboursGap_EB = p_enNeighboursGap_EB;
         v_enNeighboursGap_EE = p_enNeighboursGap_EE;
      }
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.

                                {
         //cout<<"destructor AnomalousECAL"<<endl;
         v_enNeighboursGap_EB.clear();
         v_enNeighboursGap_EE.clear();
         v_boundaryInfoDeadCells_EB.clear();
         v_boundaryInfoDeadCells_EE.clear();
      }

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, i, ntuplemaker::status, v_boundaryInfoDeadCells_EB, and v_boundaryInfoDeadCells_EE.

                                           {

         float highestEnergyDepositAroundDeadCell = 0;

         for (int i = 0; i < (int) v_boundaryInfoDeadCells_EB.size(); ++i) {
            BoundaryInformation bInfo = v_boundaryInfoDeadCells_EB[i];

            //check if channel limitation rejectsbInfo
            bool passChannelLimitation = false;
            std::vector<int> status = bInfo.channelStatus;

            for (int cs = 0; cs < (int) limitDeadCellToChannelStatusEB.size(); ++cs) {
               int channelAllowed = limitDeadCellToChannelStatusEB[cs];

               for (std::vector<int>::iterator st_it = status.begin(); st_it != status.end(); ++st_it) {

                  if (channelAllowed == *st_it || (channelAllowed < 0 && abs(channelAllowed) <= *st_it)) {
                     passChannelLimitation = true;
                     break;
                  }
               }
            }

            if (passChannelLimitation || limitDeadCellToChannelStatusEB.size() == 0) {

               if (bInfo.boundaryEnergy > highestEnergyDepositAroundDeadCell) {
                  highestEnergyDepositAroundDeadCell = bInfo.boundaryET;
                  //highestEnergyDepositAroundDeadCell = bInfo.boundaryEnergy;
               }
            }
         }

         for (int i = 0; i < (int) v_boundaryInfoDeadCells_EE.size(); ++i) {
            BoundaryInformation bInfo = v_boundaryInfoDeadCells_EE[i];

            //check if channel limitation rejectsbInfo
            bool passChannelLimitation = false;
            std::vector<int> status = bInfo.channelStatus;

            for (int cs = 0; cs < (int) limitDeadCellToChannelStatusEE.size(); ++cs) {
               int channelAllowed = limitDeadCellToChannelStatusEE[cs];

               for (std::vector<int>::iterator st_it = status.begin(); st_it != status.end(); ++st_it) {

                  if (channelAllowed == *st_it || (channelAllowed < 0 && abs(channelAllowed) <= *st_it)) {
                     passChannelLimitation = true;
                     break;
                  }
               }
            }

            if (passChannelLimitation || limitDeadCellToChannelStatusEE.size() == 0) {

               if (bInfo.boundaryEnergy > highestEnergyDepositAroundDeadCell){
                  highestEnergyDepositAroundDeadCell = bInfo.boundaryET;
                  //highestEnergyDepositAroundDeadCell = bInfo.boundaryEnergy;
               }
            }
         }

         if (highestEnergyDepositAroundDeadCell > maxBoundaryEnergy) {
            //            cout << "<<<<<<<<<< List of EB  Boundary objects <<<<<<<<<<" << endl;
            //            for (int i = 0; i < (int) v_boundaryInfoDeadCells_EB.size(); ++i) {
            //               BoundaryInformation bInfo = v_boundaryInfoDeadCells_EB[i];
            //               cout << "no of neighbouring RecHits:" << bInfo.recHits.size() << endl;
            //               cout << "no of neighbouring DetIds:" << bInfo.detIds.size() << endl;
            //               cout << "boundary energy:" << bInfo.boundaryEnergy << endl;
            //               cout << "Channel stati: ";
            //               for (std::vector<int>::iterator it = bInfo.channelStatus.begin(); it != bInfo.channelStatus.end(); ++it) {
            //                  cout << *it << " ";
            //               }
            //               cout << endl;
            //            }
            //            cout << "<<<<<<<<<< List of EE  Boundary objects <<<<<<<<<<" << endl;
            //            for (int i = 0; i < (int) v_boundaryInfoDeadCells_EE.size(); ++i) {
            //               BoundaryInformation bInfo = v_boundaryInfoDeadCells_EE[i];
            //               cout << "no of neighbouring RecHits:" << bInfo.recHits.size() << endl;
            //               cout << "no of neighbouring DetIds:" << bInfo.detIds.size() << endl;
            //               cout << "boundary energy:" << bInfo.boundaryEnergy << endl;
            //               cout << "Channel stati: ";
            //               for (std::vector<int>::iterator it = bInfo.channelStatus.begin(); it != bInfo.channelStatus.end(); ++it) {
            //                  cout << *it << " ";
            //               }
            //               cout << endl;
            //            }
            return true;
         } else
            return false;
      }
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.

                                                                                          {

         float highestEnergyDepositAlongGapEB = 0;

         for (int i = 0; i < (int) v_enNeighboursGap_EB.size(); ++i) {
            BoundaryInformation gapInfo = v_enNeighboursGap_EB[i];

            if (gapInfo.boundaryEnergy > highestEnergyDepositAlongGapEB){
               highestEnergyDepositAlongGapEB = gapInfo.boundaryET;
               //highestEnergyDepositAlongGapEB = gapInfo.boundaryEnergy;
            }
         }

         float highestEnergyDepositAlongGapEE = 0;

         for (int i = 0; i < (int) v_enNeighboursGap_EE.size(); ++i) {
            BoundaryInformation gapInfo = v_enNeighboursGap_EE[i];

            if (gapInfo.boundaryEnergy > highestEnergyDepositAlongGapEE){
               highestEnergyDepositAlongGapEE = gapInfo.boundaryET;
               //highestEnergyDepositAlongGapEE = gapInfo.boundaryEnergy;
            }
         }

         if (highestEnergyDepositAlongGapEB > maxGapEnergyEB || highestEnergyDepositAlongGapEE > maxGapEnergyEE) {
            //            cout << "<<<<<<<<<< List of EB Gap objects <<<<<<<<<<" << endl;
            //            for (int i = 0; i < (int) v_enNeighboursGap_EB.size(); ++i) {
            //               BoundaryInformation gapInfo = v_enNeighboursGap_EB[i];
            //               cout << "no of neighbouring RecHits:" << gapInfo.recHits.size() << endl;
            //               cout << "no of neighbouring DetIds:" << gapInfo.detIds.size() << endl;
            //               cout << "gap energy:" << gapInfo.boundaryEnergy << endl;
            //            }
            //            cout << "<<<<<<<<<< List of EE Gap objects <<<<<<<<<<" << endl;
            //            for (int i = 0; i < (int) v_enNeighboursGap_EE.size(); ++i) {
            //               BoundaryInformation gapInfo = v_enNeighboursGap_EE[i];
            //               cout << "no of neighbouring RecHits:" << gapInfo.recHits.size() << endl;
            //               cout << "no of neighbouring DetIds:" << gapInfo.detIds.size() << endl;
            //               cout << "gap energy:" << gapInfo.boundaryEnergy << endl;
            //            }
            return true;
         } else
            return false;
      }

Member Data Documentation