CMS 3D CMS Logo

Public Member Functions | Private Attributes

AlignmentMonitorSurvey Class Reference

#include <AlignmentMonitorSurvey.h>

Inheritance diagram for AlignmentMonitorSurvey:
AlignmentMonitorBase

List of all members.

Public Member Functions

 AlignmentMonitorSurvey (const edm::ParameterSet &)
virtual void book ()
 Book or retrieve histograms; MUST be reimplemented.
virtual void event (const edm::Event &, const edm::EventSetup &, const ConstTrajTrackPairCollection &)
 Called for each event (by "run()"): may be reimplemented.

Private Attributes

std::vector< align::StructureTypetheLevels

Detailed Description

Definition at line 20 of file AlignmentMonitorSurvey.h.


Constructor & Destructor Documentation

AlignmentMonitorSurvey::AlignmentMonitorSurvey ( const edm::ParameterSet cfg)

Definition at line 7 of file AlignmentMonitorSurvey.cc.

References edm::ParameterSet::getUntrackedParameter(), prof2calltree::l, AlignableObjectId::nameToType(), and theLevels.

  :AlignmentMonitorBase(cfg, "AlignmentMonitorSurvey")
{
  static AlignableObjectId dummy;

  const std::vector<std::string>& levels = cfg.getUntrackedParameter< std::vector<std::string> >("surveyResiduals");

  for (unsigned int l = 0; l < levels.size(); ++l)
  {
    theLevels.push_back( dummy.nameToType(levels[l]) );
  }
}

Member Function Documentation

void AlignmentMonitorSurvey::book ( ) [virtual]

Book or retrieve histograms; MUST be reimplemented.

Implements AlignmentMonitorBase.

Definition at line 20 of file AlignmentMonitorSurvey.cc.

References AlignmentParameterStore::alignables(), cond::ecalcond::all, AlignmentMonitorBase::directory(), i, errorMatrix2Lands_multiChannel::id, Alignable::id(), prof2calltree::l, testEve_cfg::level, TFileDirectory::make(), AlignmentMonitorBase::pStore(), SurveyResidual::sensorResidual(), theLevels, and diffTreeTool::tree.

{
  align::ID id;
  align::StructureType level;

  double par[6]; // survey residual

  TTree* tree = directory("/iterN/")->make<TTree>("survey", "");

  tree->Branch("id"   , &id   , "id/i");
  tree->Branch("level", &level, "level/I");
  tree->Branch("par"  , &par  , "par[6]/D");

  const align::Alignables& all = pStore()->alignables();

  const unsigned int nAlignable = all.size();

  for (unsigned int i = 0; i < nAlignable; ++i)
  {
    const Alignable* ali = all[i];

    id = ali->id();

    for (unsigned int l = 0; l < theLevels.size(); ++l)
    {
      level = theLevels[l];

      SurveyResidual resid(*ali, level, true);
      AlgebraicVector resParams = resid.sensorResidual();
                        
      par[0] = resParams[0];
      par[1] = resParams[1];
      par[2] = resParams[2];
      par[3] = resParams[3];
      par[4] = resParams[4];
      par[5] = resParams[5];
                
      tree->Fill();
    }
  }
}
virtual void AlignmentMonitorSurvey::event ( const edm::Event iEvent,
const edm::EventSetup iSetup,
const ConstTrajTrackPairCollection iTrajTracks 
) [inline, virtual]

Called for each event (by "run()"): may be reimplemented.

Reimplemented from AlignmentMonitorBase.

Definition at line 29 of file AlignmentMonitorSurvey.h.

                                                          {}

Member Data Documentation

Definition at line 35 of file AlignmentMonitorSurvey.h.

Referenced by AlignmentMonitorSurvey(), and book().