Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-09-22 23:03:57

0001 // -*- C++ -*-
0002 //
0003 // Package:    Validation/HGCalValidation
0004 // Class:      HGCalWaferValidation
0005 //
0006 /**\class HGCalWaferValidation HGCalWaferValidation.cc Validation/HGCalValidation/plugins/HGCalWaferValidation.cc
0007 
0008  Description: Validates HGCal wafer data inside DD against specifications given in a flat text file.
0009 
0010  Implementation:
0011      * Uses GraphWalker to follow DD hierarchy to find HGCal EE module and the HE modules.
0012      * Search of wafer layers and iterates each wafer found.
0013      * Extract x, y coordinate position from wafer positioning; thickness, u & v coords from copyNo.
0014        Wafer shape and rotation are extracted from given names of wafer logical volumes.
0015      * All extracted wafer info saved into a map indexed by (layer#, u, v).
0016      * Each line in flat text file are compared against wafer information in the map.
0017        Any errors are reported, counted and summarized at the end.
0018      * Unaccounted wafers, which are in DD but not in the flat text file, are also reported and counted.
0019 */
0020 //
0021 // Original Author:  Imran Yusuff
0022 //         Created:  Thu, 27 May 2021 19:47:08 GMT
0023 //
0024 // Additional Author(s): Yulun Miao
0025 /*
0026   Changelog:
0027 
0028     Wed, 17 Nov 2021 21:04:10 UTC by Yulun Miao:
0029 
0030       * Use the l or h preceding the thickness to determine the type of flat file
0031       * Unified partial wafer information to HGCalTypes.h to allow cross-compare
0032 
0033     Tue, 14 Dmr 2021 by Imran Yusuff:
0034 
0035       * Further tidying the code
0036       * Now uses the first line of the flat file to determine flat file type (single number means new format)
0037       * Separate out shape and rotation matching operation into functions
0038       * Fixed validation for D86 geometry (especially in rotation for type-3 layers)
0039 */
0040 
0041 // system include files
0042 #include <memory>
0043 
0044 // user include files
0045 #include "FWCore/Framework/interface/Frameworkfwd.h"
0046 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0047 
0048 #include "FWCore/Framework/interface/Event.h"
0049 #include "FWCore/Framework/interface/MakerMacros.h"
0050 
0051 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0052 #include "FWCore/ParameterSet/interface/FileInPath.h"
0053 #include "FWCore/Utilities/interface/InputTag.h"
0054 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0055 
0056 #include "DetectorDescription/Core/interface/DDCompactView.h"
0057 #include "Geometry/Records/interface/IdealGeometryRecord.h"
0058 #include "Geometry/HGCalCommonData/interface/HGCalTypes.h"
0059 
0060 #include <fstream>
0061 #include <regex>
0062 
0063 //
0064 // class declaration
0065 //
0066 
0067 // If the analyzer does not use TFileService, please remove
0068 // the template argument to the base class so the class inherits
0069 // from  edm::one::EDAnalyzer<>
0070 // This will improve performance in multithreaded jobs.
0071 
0072 class HGCalWaferValidation : public edm::one::EDAnalyzer<> {
0073 public:
0074   explicit HGCalWaferValidation(const edm::ParameterSet&);
0075   ~HGCalWaferValidation() override = default;
0076 
0077   static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0078 
0079 private:
0080   // This is MessageLogger logging category
0081   const std::string logcat = "HGCalWaferValidation";
0082 
0083   // wafer coordinate is (layer, u, v), used as index for map
0084   using WaferCoord = std::tuple<int, int, int>;
0085 
0086   std::string strWaferCoord(const WaferCoord& coord);
0087 
0088   // mapping of wafer shape codes: DD / old format -> new format (LD/HD)
0089   using WaferShapeMap = std::map<std::string, int>;
0090 
0091   const WaferShapeMap waferShapeMapDD = {{"F", HGCalTypes::WaferFull},
0092                                          {"a", HGCalTypes::WaferHalf},
0093                                          {"am", HGCalTypes::WaferHalf2},
0094                                          {"b", HGCalTypes::WaferFive},
0095                                          {"bm", HGCalTypes::WaferFive2},
0096                                          {"c", HGCalTypes::WaferThree},
0097                                          {"d", HGCalTypes::WaferSemi},
0098                                          {"dm", HGCalTypes::WaferSemi2},
0099                                          {"g", HGCalTypes::WaferChopTwo},
0100                                          {"gm", HGCalTypes::WaferChopTwoM}};
0101 
0102   const WaferShapeMap waferShapeMapLD = {{"0", HGCalTypes::WaferFull},
0103                                          {"1", HGCalTypes::WaferHalf},
0104                                          {"2", HGCalTypes::WaferHalf},
0105                                          {"3", HGCalTypes::WaferSemi},
0106                                          {"4", HGCalTypes::WaferSemi},
0107                                          {"5", HGCalTypes::WaferFive},
0108                                          {"6", HGCalTypes::WaferThree}};
0109 
0110   const WaferShapeMap waferShapeMapHD = {{"0", HGCalTypes::WaferFull},
0111                                          {"1", HGCalTypes::WaferHalf2},
0112                                          {"2", HGCalTypes::WaferChopTwoM},
0113                                          {"3", HGCalTypes::WaferSemi2},
0114                                          {"4", HGCalTypes::WaferSemi2},
0115                                          {"5", HGCalTypes::WaferFive2}};
0116 
0117   bool DDFindHGCal(DDCompactView::GraphWalker& walker, std::string targetName);
0118   void DDFindWafers(DDCompactView::GraphWalker& walker);
0119   void ProcessWaferLayer(DDCompactView::GraphWalker& walker);
0120   bool isThicknessMatched(const int geoThickClass, const int fileThickness);
0121   bool isRotationMatched(
0122       const bool isNewFile, const int layer, const int fileShapeCode, const int geoRotCode, const int fileRotCode);
0123 
0124   void beginJob() override;
0125   void analyze(const edm::Event&, const edm::EventSetup&) override;
0126   void endJob() override;
0127 
0128   // ----------member data ---------------------------
0129   // module parameters
0130   edm::FileInPath geometryFileName_;
0131 
0132   // information from newer flat file header
0133   unsigned int layerCount_;
0134   std::vector<int> layerTypes_;
0135 
0136   // struct to hold wafer information from DD in map
0137   struct WaferInfo {
0138     int thickClass;
0139     double x;
0140     double y;
0141     int shapeCode;
0142     int rotCode;
0143     std::string waferName;  // TEMPORARY
0144   };
0145 
0146   // EDM token to access DD
0147   edm::ESGetToken<DDCompactView, IdealGeometryRecord> viewToken_;
0148 
0149   // map holding all wafer properties from DD
0150   std::map<WaferCoord, struct WaferInfo> waferData_;
0151 
0152   // boolean map to keep track of unaccounted DD wafers (not in flat file)
0153   std::map<WaferCoord, bool> waferValidated_;
0154 };
0155 
0156 //
0157 // constants, enums and typedefs
0158 //
0159 
0160 //
0161 // static data member definitions
0162 //
0163 
0164 //
0165 // constructors and destructor
0166 //
0167 HGCalWaferValidation::HGCalWaferValidation(const edm::ParameterSet& iConfig)
0168     : geometryFileName_(iConfig.getParameter<edm::FileInPath>("GeometryFileName")) {
0169   viewToken_ = esConsumes<DDCompactView, IdealGeometryRecord>();
0170   //now do what ever initialization is needed
0171 }
0172 
0173 //
0174 // member functions
0175 //
0176 
0177 // convert WaferCoord tuple to string representation (i.e. for printing)
0178 std::string HGCalWaferValidation::strWaferCoord(const WaferCoord& coord) {
0179   std::stringstream ss;
0180   ss << "(" << std::get<0>(coord) << "," << std::get<1>(coord) << "," << std::get<2>(coord) << ")";
0181   return ss.str();
0182 }
0183 
0184 // ----- find HGCal entry among the DD -----
0185 bool HGCalWaferValidation::DDFindHGCal(DDCompactView::GraphWalker& walker, std::string targetName) {
0186   if (walker.current().first.name().name() == targetName) {
0187     // target found
0188     return true;
0189   }
0190   if (walker.firstChild()) {
0191     do {
0192       if (DDFindHGCal(walker, targetName))
0193         // target inside child
0194         return true;
0195     } while (walker.nextSibling());
0196     walker.parent();
0197   }
0198   return false;
0199 }
0200 
0201 // ----- find the next wafer, then process the wafer layer -----
0202 void HGCalWaferValidation::DDFindWafers(DDCompactView::GraphWalker& walker) {
0203   if (walker.current().first.name().fullname().rfind("hgcalwafer:", 0) == 0) {
0204     // first wafer found. Now process the entire layer of wafers.
0205     ProcessWaferLayer(walker);
0206     return;
0207   }
0208   if (walker.firstChild()) {
0209     do {
0210       DDFindWafers(walker);
0211     } while (walker.nextSibling());
0212     walker.parent();
0213   }
0214 }
0215 
0216 // ----- process the layer of wafers -----
0217 void HGCalWaferValidation::ProcessWaferLayer(DDCompactView::GraphWalker& walker) {
0218   int waferLayer = 0;  // layer numbers in DD are assumed to be sequential from 1
0219   waferLayer++;
0220   edm::LogVerbatim(logcat) << "ProcessWaferLayer: Processing layer " << waferLayer;
0221   do {
0222     if (walker.current().first.name().fullname().rfind("hgcalwafer:", 0) == 0) {
0223       auto wafer = walker.current();
0224       const std::string waferName(walker.current().first.name().fullname());
0225       //edm::LogVerbatim(logcat) << "  " << waferName; // DEBUG: in case wafer name info is needed
0226       const int copyNo = wafer.second->copyno();
0227       // extract DD layer properties
0228       const int waferType = HGCalTypes::getUnpackedType(copyNo);
0229       const int waferU = HGCalTypes::getUnpackedU(copyNo);
0230       const int waferV = HGCalTypes::getUnpackedV(copyNo);
0231       const WaferCoord waferCoord(waferLayer, waferU, waferV);  // map index
0232       // build struct of DD wafer properties
0233       struct WaferInfo waferInfo;
0234       waferInfo.waferName = waferName;  //TEMPORARY
0235       waferInfo.thickClass = waferType;
0236       waferInfo.x = wafer.second->translation().x();
0237       waferInfo.y = wafer.second->translation().y();
0238       const std::string waferNameData =
0239           std::regex_replace(waferName,
0240                              std::regex("(HGCal[EH]E)(Wafer[01])(Fine|Coarse[12])([a-z]*)([0-9]*)"),
0241                              "$1 $2-$3 $4 $5",
0242                              std::regex_constants::format_no_copy);
0243       std::stringstream ss(waferNameData);
0244       std::string EEorHE;
0245       std::string typeStr;
0246       std::string shapeStr;
0247       std::string rotStr;
0248       ss >> EEorHE >> typeStr >> shapeStr >> rotStr;
0249       // assume rotational symmetry of full-sized wafers
0250       if (shapeStr.empty())
0251         shapeStr = "F";
0252       if (rotStr.empty())
0253         rotStr = "0";
0254       const int rotCode(std::stoi(rotStr));
0255       //edm::LogVerbatim(logcat) << "rotStr " << rotStr << " rotCode " << rotCode;
0256 
0257       // convert shape code to wafer types defined in HGCalTypes.h
0258       waferInfo.shapeCode = waferShapeMapDD.at(shapeStr);
0259 
0260       waferInfo.rotCode = rotCode;
0261       // populate the map
0262       waferData_[waferCoord] = waferInfo;
0263       waferValidated_[waferCoord] = false;
0264     }
0265   } while (walker.nextSibling());
0266 }
0267 
0268 // ------------ check if wafer thickness in geo matches in file (true = is a match) ------------
0269 bool HGCalWaferValidation::isThicknessMatched(const int geoThickClass, const int fileThickness) {
0270   if (geoThickClass == 0 && fileThickness == 120)
0271     return true;
0272   if (geoThickClass == 1 && fileThickness == 200)
0273     return true;
0274   if (geoThickClass == 2 && fileThickness == 300)
0275     return true;
0276   return false;
0277 }
0278 
0279 // ------------ check if wafer rotation in geo matches in file (true = is a match) ------------
0280 bool HGCalWaferValidation::isRotationMatched(
0281     const bool isNewFile, const int layer, const int fileShapeCode, const int geoRotCode, const int fileRotCode) {
0282   if (fileShapeCode != HGCalTypes::WaferFull && geoRotCode == fileRotCode)
0283     return true;
0284   if (fileShapeCode == HGCalTypes::WaferFull) {
0285     if (isNewFile && layerTypes_[layer - 1] == 3) {  // this array is index-0 based
0286       if ((geoRotCode + 1) % 2 == fileRotCode % 2)
0287         return true;
0288     } else {
0289       if (geoRotCode % 2 == fileRotCode % 2)
0290         return true;
0291     }
0292   }
0293   return false;
0294 }
0295 
0296 // ------------ method called for each event  ------------
0297 void HGCalWaferValidation::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) {
0298   using namespace edm;
0299 
0300   // Get the CMS DD
0301   auto viewH = iSetup.getHandle(viewToken_);
0302 
0303   if (!viewH.isValid()) {
0304     edm::LogPrint(logcat) << "Error obtaining geometry handle!";
0305     return;
0306   }
0307 
0308   edm::LogVerbatim(logcat) << "Root is : " << viewH->root();
0309   edm::LogVerbatim(logcat) << std::endl;
0310 
0311   // find HGCalEE
0312   auto eeWalker = viewH->walker();
0313   const bool eeFound = DDFindHGCal(eeWalker, "HGCalEE");
0314   if (eeFound) {
0315     edm::LogVerbatim(logcat) << "HGCalEE found!";
0316     edm::LogVerbatim(logcat) << "name     = " << eeWalker.current().first.name().name();
0317     edm::LogVerbatim(logcat) << "fullname = " << eeWalker.current().first.name().fullname();
0318   } else {
0319     edm::LogPrint(logcat) << "HGCalEE not found!";
0320   }
0321   edm::LogVerbatim(logcat) << std::endl;
0322 
0323   // find HGCalHEsil
0324   auto hesilWalker = viewH->walker();
0325   const bool hesilFound = DDFindHGCal(hesilWalker, "HGCalHEsil");
0326   if (hesilFound) {
0327     edm::LogVerbatim(logcat) << "HGCalHEsil found!";
0328     edm::LogVerbatim(logcat) << "name     = " << hesilWalker.current().first.name().name();
0329     edm::LogVerbatim(logcat) << "fullname = " << hesilWalker.current().first.name().fullname();
0330   } else {
0331     edm::LogPrint(logcat) << "HGCalHEsil not found!";
0332   }
0333   edm::LogVerbatim(logcat) << std::endl;
0334 
0335   // find HGCalHEmix
0336   auto hemixWalker = viewH->walker();
0337   const bool hemixFound = DDFindHGCal(hemixWalker, "HGCalHEmix");
0338   if (hemixFound) {
0339     edm::LogVerbatim(logcat) << "HGCalHEmix found!";
0340     edm::LogVerbatim(logcat) << "name     = " << hemixWalker.current().first.name().name();
0341     edm::LogVerbatim(logcat) << "fullname = " << hemixWalker.current().first.name().fullname();
0342   } else {
0343     edm::LogPrint(logcat) << "HGCalHEmix not found!";
0344   }
0345   edm::LogVerbatim(logcat) << std::endl;
0346 
0347   // give up if no HGCal found at all
0348   if (!(eeFound || hesilFound || hemixFound)) {
0349     edm::LogPrint(logcat) << "Nothing found. Giving up.";
0350     return;
0351   }
0352 
0353   // Now walk the HGCalEE walker to find the first wafer on each layer and process them
0354   edm::LogVerbatim(logcat) << "Calling DDFindWafers(eeWalker);";
0355   DDFindWafers(eeWalker);
0356 
0357   // Walk the HGCalHEsilwalker to find the first wafer on each layer and process them
0358   edm::LogVerbatim(logcat) << "Calling DDFindWafers(hesilWalker);";
0359   DDFindWafers(hesilWalker);
0360 
0361   // Walk the HGCalHEmix walker to find the first wafer on each layer and process them
0362   edm::LogVerbatim(logcat) << "Calling DDFindWafers(hemixWalker);";
0363   DDFindWafers(hemixWalker);
0364 
0365   // Confirm all the DD wafers have been read
0366   edm::LogVerbatim(logcat) << "Number of wafers read from DD: " << waferData_.size();
0367 
0368   // Now open the geometry text file
0369   std::string fileName = geometryFileName_.fullPath();
0370   edm::LogVerbatim(logcat) << "Opening geometry text file: " << fileName;
0371   std::ifstream geoTxtFile(fileName);
0372 
0373   if (!geoTxtFile) {
0374     edm::LogPrint(logcat) << "Cannot open geometry text file.";
0375     return;
0376   }
0377 
0378   // total processed counter
0379   int nTotalProcessed = 0;
0380 
0381   // geometry error counters
0382   int nMissing = 0;
0383   int nThicknessError = 0;
0384   int nPosXError = 0;
0385   int nPosYError = 0;
0386   int nShapeError = 0;
0387   int nRotError = 0;
0388   int nUnaccounted = 0;
0389 
0390   std::string buf;
0391 
0392   // find out if this file is an old file or a new file
0393   std::getline(geoTxtFile, buf);
0394   std::stringstream ss(buf);
0395   std::vector<std::string> first_tokens;
0396   while (ss >> buf)
0397     if (!buf.empty())
0398       first_tokens.push_back(buf);
0399 
0400   const bool isNewFile(first_tokens.size() == 1);
0401 
0402   if (isNewFile) {
0403     edm::LogVerbatim(logcat) << "Text file is of newer version.";
0404     layerCount_ = std::stoi(buf);
0405     std::getline(geoTxtFile, buf);
0406     std::stringstream layerTypesSS(buf);
0407     while (layerTypesSS >> buf)
0408       if (!buf.empty())
0409         layerTypes_.push_back(std::stoi(buf));
0410     if (layerTypes_.size() != layerCount_)
0411       edm::LogWarning(logcat) << "Number of layer types does not tally with layer count.";
0412 
0413     // TEMP: make sure reading is correct
0414     edm::LogVerbatim(logcat) << "layerCount = " << layerCount_;
0415     for (unsigned i = 0; i < layerTypes_.size(); i++) {
0416       edm::LogVerbatim(logcat) << "  layerType " << i + 1 << " = " << layerTypes_[i];  // 1-based
0417     }
0418   } else {
0419     layerCount_ = 0;
0420     // rewind back
0421     geoTxtFile.clear();
0422     geoTxtFile.seekg(0);
0423   }
0424 
0425   // process each line on the text file
0426   while (std::getline(geoTxtFile, buf)) {
0427     std::stringstream ss(buf);
0428     std::vector<std::string> tokens;
0429     while (ss >> buf)
0430       if (!buf.empty())
0431         tokens.push_back(buf);
0432     if (tokens.size() != 8)
0433       continue;
0434 
0435     nTotalProcessed++;
0436 
0437     // extract wafer info from a textfile line
0438     const int waferLayer(std::stoi(tokens[0]));
0439     const std::string waferShapeStr(tokens[1]);
0440     const std::string waferDensityStr(isNewFile ? tokens[2].substr(0, 1) : "");
0441     const int waferThickness(isNewFile ? std::stoi(tokens[2].substr(1)) : std::stoi(tokens[2]));
0442     const double waferX(std::stod(tokens[3]));
0443     const double waferY(std::stod(tokens[4]));
0444     const int waferRotCode(std::stoi(tokens[5]));
0445     const int waferU(std::stoi(tokens[6]));
0446     const int waferV(std::stoi(tokens[7]));
0447     const int waferShapeCode(isNewFile ? (waferDensityStr == "l"   ? waferShapeMapLD.at(waferShapeStr)
0448                                           : waferDensityStr == "h" ? waferShapeMapHD.at(waferShapeStr)
0449                                                                    : HGCalTypes::WaferOut)
0450                                        : waferShapeMapDD.at(waferShapeStr));
0451 
0452     // map index for crosschecking with DD
0453     const WaferCoord waferCoord(waferLayer, waferU, waferV);
0454 
0455     // now check for (and report) wafer data disagreements
0456 
0457     if (waferData_.find(waferCoord) == waferData_.end()) {
0458       nMissing++;
0459       edm::LogVerbatim(logcat) << "MISSING: " << strWaferCoord(waferCoord);
0460       continue;
0461     }
0462 
0463     const struct WaferInfo waferInfo = waferData_[waferCoord];
0464     waferValidated_[waferCoord] = true;
0465 
0466     if (!isThicknessMatched(waferInfo.thickClass, waferThickness)) {
0467       nThicknessError++;
0468       edm::LogVerbatim(logcat) << "THICKNESS ERROR: " << strWaferCoord(waferCoord);
0469     }
0470 
0471     // it seems that wafer x-coords relative to their layer plane are mirrored...
0472     if (fabs(-waferInfo.x - waferX) > 0.015) {  // assuming this much tolerance
0473       nPosXError++;
0474       edm::LogVerbatim(logcat) << "POSITION x ERROR: " << strWaferCoord(waferCoord);
0475     }
0476 
0477     if (fabs(waferInfo.y - waferY) > 0.015) {  // assuming this much tolerance
0478       nPosYError++;
0479       edm::LogVerbatim(logcat) << "POSITION y ERROR: " << strWaferCoord(waferCoord);
0480     }
0481 
0482     if (waferInfo.shapeCode != waferShapeCode || waferShapeCode == HGCalTypes::WaferOut) {
0483       nShapeError++;
0484       edm::LogVerbatim(logcat) << "SHAPE ERROR: " << strWaferCoord(waferCoord) << "  ( " << waferInfo.shapeCode
0485                                << " != " << waferDensityStr << waferShapeCode << " )  name=" << waferInfo.waferName;
0486     }
0487 
0488     if (!isRotationMatched(isNewFile, std::get<0>(waferCoord), waferShapeCode, waferInfo.rotCode, waferRotCode)) {
0489       nRotError++;
0490       edm::LogVerbatim(logcat) << "ROTATION ERROR: " << strWaferCoord(waferCoord) << "  ( " << waferInfo.rotCode
0491                                << " != " << waferRotCode << " (" << waferShapeCode
0492                                << ") )  name=" << waferInfo.waferName;
0493     }
0494   }
0495 
0496   geoTxtFile.close();
0497 
0498   // Find unaccounted DD wafers
0499   for (auto const& accounted : waferValidated_) {
0500     if (!accounted.second) {
0501       nUnaccounted++;
0502       edm::LogVerbatim(logcat) << "UNACCOUNTED: " << strWaferCoord(accounted.first);
0503     }
0504   }
0505 
0506   // Print out error counts
0507   edm::LogVerbatim(logcat) << std::endl;
0508   edm::LogVerbatim(logcat) << "*** ERROR COUNTS ***";
0509   edm::LogVerbatim(logcat) << "Missing         :  " << nMissing;
0510   edm::LogVerbatim(logcat) << "Thickness error :  " << nThicknessError;
0511   edm::LogVerbatim(logcat) << "Pos-x error     :  " << nPosXError;
0512   edm::LogVerbatim(logcat) << "Pos-y error     :  " << nPosYError;
0513   edm::LogVerbatim(logcat) << "Shape error     :  " << nShapeError;
0514   edm::LogVerbatim(logcat) << "Rotation error  :  " << nRotError;
0515   edm::LogVerbatim(logcat) << "Unaccounted     :  " << nUnaccounted;
0516   edm::LogVerbatim(logcat) << std::endl;
0517   edm::LogVerbatim(logcat) << "Total wafers processed from geotxtfile = " << nTotalProcessed;
0518   edm::LogVerbatim(logcat) << std::endl;
0519 
0520   // Issue a LogPrint (warning) if there is at least one wafer errors
0521   if (nMissing > 0 || nThicknessError > 0 || nPosXError > 0 || nPosYError > 0 || nShapeError > 0 || nRotError > 0 ||
0522       nUnaccounted > 0) {
0523     edm::LogPrint(logcat) << "There are at least one wafer error.";
0524   }
0525 }
0526 
0527 // ------------ method called once each job just before starting event loop  ------------
0528 void HGCalWaferValidation::beginJob() {
0529   // please remove this method if not needed
0530 }
0531 
0532 // ------------ method called once each job just after ending the event loop  ------------
0533 void HGCalWaferValidation::endJob() {
0534   // please remove this method if not needed
0535 }
0536 
0537 // ------------ method fills 'descriptions' with the allowed parameters for the module  ------------
0538 void HGCalWaferValidation::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
0539   //The following says we do not know what parameters are allowed so do no validation
0540   // Please change this to state exactly what you do use, even if it is no parameters
0541   edm::ParameterSetDescription desc;
0542   desc.add<edm::FileInPath>("GeometryFileName",
0543                             edm::FileInPath("Validation/HGCalValidation/data/geomnew_corrected_360.txt"));
0544   descriptions.add("hgcalWaferValidation", desc);
0545 }
0546 
0547 //define this as a plug-in
0548 DEFINE_FWK_MODULE(HGCalWaferValidation);