CMS 3D CMS Logo

Measurement Class Reference

#include <Alignment/CocoaModel/interface/Measurement.h>

Inheritance diagram for Measurement:

MeasurementCOPS MeasurementDiffEntry MeasurementDistancemeter MeasurementDistancemeter3dim MeasurementSensor2D MeasurementTiltmeter

List of all members.

Public Member Functions

void addAffectingEntriesFromOptO (const OpticalObject *optoP)
void AddOptOListItem (OpticalObject *opto)
void AddOptONameListItem (ALIstring optos)
const std::vector< Entry * > & affectingEntryList () const
void buildAffectingEntryList ()
void buildOptOList ()
virtual void buildOptONamesList (const std::vector< ALIstring > &wl)
void calculateOriginalSimulatedValue ()
virtual void calculateSimulatedValue (ALIbool firstTime)
void construct ()
void constructFromOA (OpticalAlignMeasurementInfo &measInfo)
void copyMeas (Measurement *meas, const std::string &subsstr1, const std::string &subsstr2)
virtual void correctValueAndSigma ()
ALIdoubleDerivativeRespectEntry (Entry *entry)
const ALIuint dim () const
void DumpBadOrderOptOs ()
void fillData (ALIuint coor, const std::vector< ALIstring > &wl)
const Hep3Vector & getLightRayDirection () const
const Hep3Vector & getLightRayPosition () const
ALIstring getMeasuringBehaviour (const std::vector< OpticalObject * >::const_iterator vocite)
const OpticalObjectgetPreviousOptO (const OpticalObject *Popto) const
 Measurement ()
 Measurement (const ALIint measdim, ALIstring &type, ALIstring &name)
const ALIstringname () const
std::vector< OpticalObject * > & OptOList ()
const std::vector< ALIstring > & OptONameList () const
void postConstruct ()
const ALIstringsensorName ()
virtual void setConversionFactor (const std::vector< ALIstring > &wordlist)
void SetDimension (ALIuint dim)
void setLightRayDirection (const Hep3Vector &lightRayDirection)
void setLightRayPosition (const Hep3Vector &lightRayPosition)
void setName ()
void setSigma (ALIint coor, ALIdouble val)
void setType (ALIstring type)
void setValue (ALIint coor, ALIdouble val)
void setValueSimulated (ALIint coor, ALIdouble value)
void setValueSimulated_orig (ALIint coor, ALIdouble value)
virtual void setXlaserLine (uint ii, int val)
const ALIdouble sigma (uint ii) const
const ALIdoublesigma () const
virtual const ALIdouble sigmaDimensionFactor () const
const ALIstringtype () const
const ALIdouble value (uint ii) const
const ALIdoublevalue () const
virtual const ALIdouble valueDimensionFactor () const
bool valueIsSimulated (ALIint coor)
const ALIdouble valueSimulated (ALIuint ii) const
const ALIdouble valueSimulated_orig (ALIuint ii) const
const ALIstring valueType (uint ii) const
virtual int xlaserLine (uint ii)
virtual ~Measurement ()

Static Public Member Functions

static ALIstring getCurrentDate ()
static ALIstring getCurrentTime ()
static ALIstringmeasurementsFileName ()
static void setCurrentDate (const std::vector< ALIstring > &wl)
 set the date of the current measurement
static void setMeasurementsFileName (const ALIstring &filename)

Static Public Attributes

static ALIdouble cameraScaleFactor = 1.
static ALIbool only1 = 0
static ALIstring only1Date = ""
static ALIstring only1Time = ""

Protected Member Functions

void printStartCalculateSimulatedValue (const Measurement *meas)
void Substitute2p (ALIstring &ref, const ALIstring &firstref, int NtwoPoints)

Private Attributes

std::vector< OpticalObject * > _OptOList
std::vector< ALIstring_OptONameList
std::vector< Entry * > theAffectingEntryList
ALIuint theDim
Hep3Vector theLightRayDirection
Hep3Vector theLightRayPosition
ALIstring theName
ALIdoubletheSigma
ALIstring theType
ALIdoubletheValue
ALIbooltheValueIsSimulated
ALIdoubletheValueSimulated
ALIdoubletheValueSimulated_orig
ALIstringtheValueType

Static Private Attributes

static ALIstring theCurrentDate = "99/99/99"
static ALIstring theCurrentTime = "99:99"
static ALIstring theMeasurementsFileName = ""


Detailed Description

Definition at line 26 of file Measurement.h.


Constructor & Destructor Documentation

Measurement::Measurement ( const ALIint  measdim,
ALIstring type,
ALIstring name 
)

Definition at line 40 of file Measurement.cc.

References theDim, theSigma, theValue, theValueIsSimulated, theValueSimulated, theValueSimulated_orig, and theValueType.

00041 : theDim(measdim), theType(type), theName( name )
00042 {
00043   //  _OptOnames = new ALIstring[theDim];
00044   theValue = new ALIdouble[theDim];
00045   theSigma = new ALIdouble[theDim];
00046   theValueType = new ALIstring[theDim];
00047 
00048   theValueSimulated = new ALIdouble[theDim];
00049   theValueSimulated_orig = new ALIdouble[theDim];
00050   theValueIsSimulated = new ALIbool[theDim];
00051 
00052 }

Measurement::Measurement (  )  [inline]

Definition at line 31 of file Measurement.h.

00031 { };   

Measurement::~Measurement (  )  [virtual]

Definition at line 538 of file Measurement.cc.

References theSigma, and theValue.

00539 {
00540   //  delete[] _name; 
00541   delete[] theValue;
00542   delete[] theSigma;
00543 
00544 }


Member Function Documentation

void Measurement::addAffectingEntriesFromOptO ( const OpticalObject optoP  ) 

Definition at line 347 of file Measurement.cc.

References OpticalObject::CoordinateEntryList(), GenMuonPlsPt100GeV_cfg::cout, ALIUtils::debug, lat::endl(), OpticalObject::ExtraEntryList(), find(), OpticalObject::name(), OpticalObject::parent(), and theAffectingEntryList.

Referenced by buildAffectingEntryList().

00348 {
00349   if(ALIUtils::debug >= 3)  std::cout << "Measurement::addAffectingEntriesFromOptO: OptO taking part in Measurement: " << optoP->name() << std::endl;
00350       //---------- Loop entries in this OptO           
00351   std::vector< Entry* >::const_iterator vecite;
00352   std::vector< Entry* >::const_iterator fvecite;
00353   for (vecite = optoP->CoordinateEntryList().begin();
00354       vecite != optoP->CoordinateEntryList().end(); vecite++) {
00355     //T     if( find( theAffectingEntryList.begin(), theAffectingEntryList.end(), (*vecite) ) == theAffectingEntryList.end() ){
00356     //t      theAffectingEntryList.push_back(*vecite);
00357     //T    }
00358     fvecite = find( theAffectingEntryList.begin(), theAffectingEntryList.end(), (*vecite) );
00359     if (fvecite == theAffectingEntryList.end() ){
00360       theAffectingEntryList.push_back(*vecite);
00361       if(ALIUtils::debug >= 4)  std::cout << "Entry that may affect Measurement: " << (*vecite)->name() << std::endl;
00362     }
00363   }
00364   for (vecite = optoP->ExtraEntryList().begin();
00365       vecite != optoP->ExtraEntryList().end(); vecite++) {
00366     fvecite = find( theAffectingEntryList.begin(), theAffectingEntryList.end(), (*vecite) );
00367     if (fvecite == theAffectingEntryList.end() ){
00368       theAffectingEntryList.push_back(*vecite);
00369       if(ALIUtils::debug >= 4)  std::cout << "Entry that may affect Measurement: " << (*vecite)->name() << std::endl;
00370     }
00371   }
00372   if(optoP->parent() != 0) {
00373     addAffectingEntriesFromOptO( optoP->parent() );
00374   }
00375 }

void Measurement::AddOptOListItem ( OpticalObject opto  )  [inline]

Definition at line 185 of file Measurement.h.

References _OptOList.

00185                                             {
00186       _OptOList.push_back( opto );
00187   }

void Measurement::AddOptONameListItem ( ALIstring  optos  )  [inline]

Definition at line 181 of file Measurement.h.

References _OptONameList.

Referenced by MeasurementDiffEntry::buildOptONamesList().

00181                                             {
00182       _OptONameList.push_back( optos );
00183   }

const std::vector<Entry*>& Measurement::affectingEntryList (  )  const [inline]

Definition at line 110 of file Measurement.h.

References theAffectingEntryList.

00110                                                       {
00111     return theAffectingEntryList;
00112   }

void Measurement::buildAffectingEntryList (  ) 

Definition at line 332 of file Measurement.cc.

References _OptOList, and addAffectingEntriesFromOptO().

Referenced by postConstruct().

00332                                          {
00333   
00334   //---------- Loop OptO MeasuredList
00335   std::vector< OpticalObject* >::const_iterator vocite;
00336   for (vocite = _OptOList.begin();
00337        vocite != _OptOList.end(); vocite++) {
00338       addAffectingEntriesFromOptO( *vocite );
00339   }
00340 }

void Measurement::buildOptOList (  ) 

Definition at line 274 of file Measurement.cc.

References _OptOList, _OptONameList, TestMuL1L2Filter_cff::cerr, GenMuonPlsPt100GeV_cfg::cout, ALIUtils::debug, lat::endl(), cmsRelvalreport::exit, Model::getOptOByName(), OpticalObject::name(), and Substitute2p().

Referenced by postConstruct().

00275 {
00276   //-  if ( ALIUtils::debug >= 3 ) std::cout << std::endl << " MEASUREMENT: " << " " << this->name() << std::endl; 
00277   ALIstring twopoints(".."); // .. goes one level up in the tree fo OptOs
00278 
00279 //---------------------------------------- Loop OptONameList
00280   std::vector<ALIstring>::iterator vsite;
00281   for (vsite = _OptONameList.begin();
00282        vsite != _OptONameList.end(); vsite++) {
00283 //----------------------------------- Count how many '..' there are in the name
00284     ALIuint ii = 0;
00285     //    ALIuint slen = (*vsite).length();
00286     ALIuint Ntwopoints = 0;    //---- No '..' in ALIstring
00287     for(;;) {
00288       int i2p = (*vsite).find_first_of( twopoints, 3*ii ); // if it is ., it also finds it!!!
00289       if ( i2p < 0 ) break;
00290       if ( i2p != ALIint(3*ii)) {
00291         std::cerr << i2p << "!!! Bad position of '..' in reference ALIstring: " 
00292              << (*vsite).c_str() << std::endl; 
00293         exit(2);
00294       } else {
00295         Ntwopoints++;
00296         if ( ALIUtils::debug >=9 ) std::cout << "N2p" << Ntwopoints;
00297       }
00298       ii++;   
00299     }     
00300     //------ Substitute '..' by reference (the last OptO in list)
00301     if (Ntwopoints != 0) {
00302       Substitute2p( (*vsite), *(_OptONameList.end()-1), Ntwopoints);
00303     }
00304     //----- Get OpticalObject* that correspond to ALIstring and fill list
00305     ALIstring referenceOptO = (*vsite);
00306     //--- a ':' is used in OptOs that have several possible behavious
00307     ALIint colon = referenceOptO.find(':');
00308     if ( colon != -1 ) {
00309       if (ALIUtils::debug >=99) { 
00310         std::cout << "colon in reference OptO name " << colon << 
00311           referenceOptO.c_str() << std::endl;
00312       }
00313       referenceOptO = referenceOptO.substr( 0, colon );
00314     }
00315     OpticalObject* OptOitem = Model::getOptOByName( referenceOptO );
00316     if ( ALIUtils::debug >= 3 ) std::cout << "Measurement::buildOptOList: OptO in Measurement: " << OptOitem->name() << std::endl;
00317     if ( OptOitem != (OpticalObject*)0 ) {
00318       _OptOList.push_back( OptOitem);
00319     } else {
00320       std::cerr << "!!! Error in Measurement: can't find Optical Object " <<
00321         (*vsite).c_str() << std::endl;
00322       exit(2);
00323     }      
00324   }
00325 }

void Measurement::buildOptONamesList ( const std::vector< ALIstring > &  wl  )  [virtual]

Reimplemented in MeasurementDiffEntry.

Definition at line 172 of file Measurement.cc.

References _OptONameList, TestMuL1L2Filter_cff::cerr, lat::endl(), and cmsRelvalreport::exit.

Referenced by construct(), constructFromOA(), and copyMeas().

00173 {
00174 
00175   int NPairs = (wl.size()+1)/2;   // Number of OptO names ( pair of name and '&' )
00176 
00177   //--------- Fill list with names 
00178   for ( int ii=0; ii<NPairs; ii++ ) {
00179     _OptONameList.push_back( wl[ii*2] );
00180     // Check for separating '&'
00181     if (ii != NPairs-1 && wl[2*ii+1] != ALIstring("&") ) {
00182       //      ALIFileIn::getInstance( Model::SDFName() ).ErrorInLine();
00183       std::cerr << "!!! Measured Optical Objects should be separated by '&', not by" 
00184                 << wl[2*ii+1] << std::endl; 
00185       exit(2);
00186     }
00187   }
00188  
00189 }

void Measurement::calculateOriginalSimulatedValue (  ) 

Definition at line 410 of file Measurement.cc.

References calculateSimulatedValue(), GenMuonPlsPt100GeV_cfg::cout, ALIUtils::debug, dim(), lat::endl(), ALIUtils::getFirstTime(), GlobalOptionMgr::getInstance(), GlobalOptionMgr::GlobalOptions(), setValue(), setValueSimulated_orig(), valueIsSimulated(), and valueSimulated().

00411 {
00412   //----------  Calculate the simulated value of the Measurement
00413   calculateSimulatedValue( 1 );
00414 
00415 #ifdef COCOA_VIS
00416   if( ALIUtils::getFirstTime() ) {
00417     GlobalOptionMgr* gomgr = GlobalOptionMgr::getInstance();
00418     if(gomgr->GlobalOptions()["VisWriteVRML"] > 1) {
00419       ALIVRMLMgr::getInstance().newLightRay();
00420     }
00421     /*-    if(Model::GlobalOptions()["VisWriteIguana"] > 1) {
00422            IgCocoaFileMgr::getInstance().newLightPath( theName );
00423            } */
00424   }
00425 #endif
00426 
00427   //---------- Set original simulated values to it
00428   //-  if(ALIUtils::debug >= 5) std::cout << "MEAS DIMENSION" << dim() << std::endl;
00429   for ( ALIuint ii = 0; ii < dim(); ii++) {
00430     setValueSimulated_orig( ii, valueSimulated(ii) );
00431     if ( ALIUtils::debug >= 4 ) std::cout << "SETsimuvalOriginal" << valueSimulated(ii) << std::endl;
00432     //----- If Measurement has as value 'simulated_value', set the value to the simulated one
00433     if( valueIsSimulated(ii) == 1 ){
00434       setValue( ii, valueSimulated(ii) );
00435       //- std::cout << ii << " setting value as simulated " <<  valueSimulated(ii) << " " << value(ii) << this << std::endl;
00436     }
00437   }
00438  
00439 }

virtual void Measurement::calculateSimulatedValue ( ALIbool  firstTime  )  [inline, virtual]

Reimplemented in MeasurementCOPS, MeasurementDiffEntry, MeasurementDistancemeter, MeasurementDistancemeter3dim, MeasurementSensor2D, and MeasurementTiltmeter.

Definition at line 48 of file Measurement.h.

Referenced by calculateOriginalSimulatedValue(), and DerivativeRespectEntry().

00048 {};

void Measurement::construct (  ) 

Definition at line 58 of file Measurement.cc.

References buildOptONamesList(), edmNew::copy(), correctValueAndSigma(), GenMuonPlsPt100GeV_cfg::cout, ALIUtils::debug, dim(), lat::endl(), fillData(), ALIFileIn::getInstance(), ALIFileIn::getWordsInLine(), name(), postConstruct(), Model::SDFName(), type(), and valueIsSimulated().

Referenced by Model::readSystemDescription().

00059 {
00060 
00061   ALIFileIn& filein = ALIFileIn::getInstance( Model::SDFName() );
00062 
00063   //---------- Read OptOs that take part in this Measurement
00064   std::vector<ALIstring> wordlist;
00065   filein.getWordsInLine( wordlist );
00066 
00067   //--------- Fill the list of names of OptOs that take part in this measurement ( names only )
00068   buildOptONamesList( wordlist );
00069   
00070   if(ALIUtils::debug >= 3) {
00071     std::cout << "@@@@ Reading Measurement " << name() << " TYPE= " << type() << std::endl
00072               << " MEASURED OPTO NAMES: ";
00073     std::ostream_iterator<ALIstring> outs(std::cout," ");
00074     copy(wordlist.begin(), wordlist.end(), outs);
00075     std::cout << std::endl;
00076   }
00077 
00078 
00079   //---------- Read the data 
00080   for ( uint ii=0; ii<dim(); ii++){
00081     filein.getWordsInLine( wordlist );
00082     fillData( ii, wordlist );
00083   }
00084 
00085   if( !valueIsSimulated(0) ) correctValueAndSigma();
00086 
00087   postConstruct();
00088 }

void Measurement::constructFromOA ( OpticalAlignMeasurementInfo measInfo  ) 

Definition at line 91 of file Measurement.cc.

References buildOptONamesList(), edmNew::copy(), GenMuonPlsPt100GeV_cfg::cout, ALIUtils::debug, dim(), ALIUtils::dumpVS(), lat::endl(), err, fillData(), OpticalAlignMeasurementInfo::isSimulatedValue_, OpticalAlignMeasurementInfo::measObjectNames_, name(), postConstruct(), sigmaDimensionFactor(), type(), valueDimensionFactor(), and OpticalAlignMeasurementInfo::values_.

Referenced by Model::BuildMeasurementsFromOA().

00092 {
00093   //---- Build wordlist to build object name list
00094   std::vector<std::string> objNames = measInfo.measObjectNames_;
00095   std::vector<std::string>::const_iterator site;
00096   std::vector<ALIstring> wordlist;
00097   for( site = objNames.begin(); site != objNames.end(); site++) {
00098     if( site != objNames.begin() ) wordlist.push_back("&");
00099     wordlist.push_back(*site);
00100   }
00101   //--- Fill the list of names of OptOs that take part in this measurement ( names only )
00102   buildOptONamesList( wordlist );
00103   
00104   if(ALIUtils::debug >= 3) {
00105     std::cout << "@@@@ Reading Measurement " << name() << " TYPE= " << type() << " " << measInfo << std::endl
00106               << " MEASURED OPTO NAMES: ";
00107     std::ostream_iterator<ALIstring> outs(std::cout," ");
00108     copy(wordlist.begin(), wordlist.end(), outs);
00109     std::cout << std::endl;
00110   }
00111 
00112 
00113   //---------- No data, set to simulated_value
00114   for ( uint ii=0; ii<dim(); ii++){
00115     wordlist.clear();
00116     wordlist.push_back( (measInfo.values_)[ii].name_ );
00117     char ctmp[20];
00118     if( measInfo.isSimulatedValue_[ii] ){
00119       if ( ALIUtils::debug >= 5 ) {
00120         std::cout << "Measurement::constructFromOA:  meas value " << ii << " "  << dim() << " = simulated_value" << std::endl;
00121       }
00122       wordlist.push_back("simulated_value");
00123     } else { 
00124       if ( ALIUtils::debug >= 5 ) {
00125         std::cout << "Measurement::constructFromOA:  meas value " << ii << " "  << dim() << " = " << measInfo.values_.size() << std::endl;
00126       }
00127       ALIdouble val = (measInfo.values_)[ii].value_ / valueDimensionFactor(); //in XML  values are without dimensions, so neutralize multiplying by valueDimensionFactor() in fillData
00128       gcvt( val, 10, ctmp );
00129       wordlist.push_back( ctmp );
00130     }
00131     ALIdouble err = (measInfo.values_)[ii].error_ / sigmaDimensionFactor(); //in XML  values are without dimensions, so neutralize multiplying by valueDimensionFactor() in fillData
00132     gcvt( err, 10, ctmp );
00133     wordlist.push_back( ctmp );
00134     std::cout << " sigma " << err << " = " << ctmp << " " << (measInfo.values_)[ii].error_ << std::endl;
00135     //-    wordlist.push_back( "simulated_value" );
00136     //-   wordlist.push_back( "1." );
00137       if ( ALIUtils::debug >= 5 ) ALIUtils::dumpVS(wordlist, " Measurement: calling fillData ");
00138     //-    std::cout << " MEAS INFO " << measInfo << std::endl;
00139     //-   std::cout << ii << " MEAS INFO PARAM " <<  (measInfo.values_)[ii] << std::endl;
00140     //- std::cout << ii << " MEAS INFO PARAM VALUE " <<  (measInfo.values_)[ii].value_ << std::endl;
00141     fillData( ii, wordlist );
00142   }
00143 
00144   postConstruct();
00145 
00146 }

void Measurement::copyMeas ( Measurement meas,
const std::string &  subsstr1,
const std::string &  subsstr2 
)

Definition at line 608 of file Measurement.cc.

References buildOptONamesList(), ALIUtils::changeName(), edmNew::copy(), GenMuonPlsPt100GeV_cfg::cout, ALIUtils::debug, dim(), lat::endl(), name(), OptOList(), postConstruct(), sigma(), theDim, theName, theSigma, theType, theValue, theValueIsSimulated, theValueSimulated, theValueSimulated_orig, type(), value(), valueIsSimulated(), valueSimulated(), and valueSimulated_orig().

Referenced by Model::copyMeasurements().

00609 {
00610   theDim = meas->dim();
00611   theType = meas->type();
00612   theName =  ALIUtils::changeName( meas->name(), subsstr1, subsstr2);
00613 
00614    //  _OptOnames = new ALIstring[theDim];
00615   theValueSimulated = new ALIdouble[theDim];
00616   theValueSimulated_orig = new ALIdouble[theDim];
00617   theValueIsSimulated = new ALIbool[theDim];
00618   theValue = const_cast<ALIdouble*>(meas->value());
00619   theSigma = const_cast<ALIdouble*>(meas->sigma());
00620 
00621   uint ii;
00622   for(ii = 0; ii < theDim; ii++) {
00623     theValueSimulated[ii] = meas->valueSimulated( ii );
00624     theValueSimulated_orig[ii] = meas->valueSimulated_orig( ii );
00625     theValueIsSimulated[ii] = meas->valueIsSimulated( ii );
00626   }
00627 
00628   //--------- Fill the list of names of OptOs that take part in this measurement ( names only )
00629 
00630   std::vector<std::string> wordlist;
00631   std::vector<OpticalObject*>& optolist = meas->OptOList();
00632   ALIuint nOptos = optolist.size();
00633   for ( ALIuint ii = 0; ii < nOptos; ii++ ) {
00634     wordlist.push_back( ALIUtils::changeName( optolist[ii]->longName(), subsstr1, subsstr2) );
00635     std::cout << " copymeas " << ALIUtils::changeName( optolist[ii]->longName(), subsstr1, subsstr2) << std::endl;
00636     if( ii != nOptos -1 ) wordlist.push_back("&");
00637   }
00638 
00639   buildOptONamesList( wordlist );
00640   
00641   if(ALIUtils::debug >= 3) {
00642     std::cout << "@@@@ Reading Measurement " << name() << " TYPE= " << type() << std::endl
00643               << " MEASURED OPTO NAMES: ";
00644     std::ostream_iterator<ALIstring> outs(std::cout," ");
00645     copy(wordlist.begin(), wordlist.end(), outs);
00646     std::cout << std::endl;
00647   }
00648 
00649 
00650   postConstruct();
00651 
00652 }

virtual void Measurement::correctValueAndSigma (  )  [inline, virtual]

Reimplemented in MeasurementCOPS, MeasurementDistancemeter, MeasurementDistancemeter3dim, MeasurementSensor2D, and MeasurementTiltmeter.

Definition at line 64 of file Measurement.h.

Referenced by construct(), Model::readMeasurementsFromFile(), and CocoaDaqReaderText::ReadNextEvent().

00064 {};

ALIdouble * Measurement::DerivativeRespectEntry ( Entry entry  ) 

Definition at line 469 of file Measurement.cc.

References calculateSimulatedValue(), TestMuL1L2Filter_cff::cerr, GenMuonPlsPt100GeV_cfg::cout, ALIUtils::debug, Entry::displace(), lat::endl(), cmsRelvalreport::exit, ALIUtils::getMaximumDeviationDerivative(), OpticalObject::name(), name(), Entry::name(), Entry::OptOCurrent(), OpticalObject::resetGlobalCoordinates(), Entry::startingDisplacement(), theDim, theValueSimulated, and theValueSimulated_orig.

00470 {
00471   //---------- std::vector of derivatives to return
00472   ALIdouble* deriv; 
00473   deriv = new ALIdouble[theDim];
00474   ALIdouble sumderiv;
00475   
00476   //---------- displacement to start with 
00477   ALIdouble displacement = entry->startingDisplacement();
00478   //----- all angles are in radians, so, if displace is not, rescale it before making the displacement 
00479   //-  displacement *= entry->SigmaDimensionFactor();
00480   if( ALIUtils::debug >= 3) std::cout << std::endl << "%%% Derivative w.r.t. entry " << entry->name() << ": displacement = " << displacement << std::endl;
00481   
00482   ALIint count_itera = 0; 
00483   
00484   //---------- Loop decreasing the displacement a factor 2, until the precision set is reached
00485   do {
00486     count_itera++;
00487     entry->displace( displacement );
00488     
00489     if ( ALIUtils::debug >= 5) std::cout << "Get simulated value for displacement " << displacement << std::endl;
00490     calculateSimulatedValue( 0 ); 
00491     
00492     //---------- Get sum of derivatives
00493     sumderiv = 0;   
00494     for ( ALIuint ii = 0; ii < theDim; ii++) {
00495       sumderiv += fabs( theValueSimulated[ii] - theValueSimulated_orig[ii] );
00496       if( ALIUtils::debug >= 4 ) {
00497         std::cout << "iteration " << count_itera << " COOR " << ii 
00498              << " difference =" << ( theValueSimulated[ii] - theValueSimulated_orig[ii] )
00499           //-             << "  " << theValueSimulated[ii] << "  " << theValueSimulated_orig[ii] 
00500              << " derivative = " << (theValueSimulated[ii] - theValueSimulated_orig[ii]) /displacement << " disp " << displacement 
00501              << " sum derivatives = " << sumderiv << std::endl;
00502       }
00503       if( ALIUtils::debug >= 5 ) {
00504         std::cout << " new simu value= " << theValueSimulated[ii] << " orig simu value " << theValueSimulated_orig[ii] << std::endl;
00505        }
00506     }
00507     if (count_itera >= 100) {
00508       std::cerr << "EXITING: too many iterations in derivative, displacement is " <<
00509         displacement << " sum of derivatives is " << sumderiv << std::endl;
00510       exit(3);   
00511     }
00512     displacement /= 2.; 
00513     //-    std::cout << "sumderiv " << sumderiv << " maximu " <<  Fit::maximum_deviation_derivative << std::endl;
00514   }while( sumderiv > ALIUtils::getMaximumDeviationDerivative() );
00515   displacement *= 2; 
00516   
00517   //---------- Enough precision reached: pass result
00518   for ( ALIuint ii = 0; ii < theDim; ii++) {
00519     deriv[ii] = ( theValueSimulated[ii] - theValueSimulated_orig[ii] ) / displacement;
00520     //----- change it to entry sigma dimensions
00521     //     deriv[ii] /= entry->SigmaDimensionFactor();
00522     if( ALIUtils::debug >= 1) std::cout << name() << ": " <<  entry->OptOCurrent()->name() << " " <<  entry->name() << " " << ii << "### DERIVATIVE: " << deriv[ii] <<  std::endl;
00523   }
00524   //-  if(ALIUtils::debug >= 5) std::cout << "END derivative: " << deriv << "disp" << displacement << std::endl;
00525   
00526   //--------------------- Reset _centreGlob and _rmGlob of OptO entry belongs to (and component OptOs)
00527   entry->OptOCurrent()->resetGlobalCoordinates();
00528   
00529   return deriv;
00530  
00531 }

const ALIuint Measurement::dim (  )  const [inline]

Definition at line 79 of file Measurement.h.

References theDim.

Referenced by calculateOriginalSimulatedValue(), construct(), constructFromOA(), copyMeas(), MeasurementCOPS::correctValueAndSigma(), CocoaToDDLMgr::measurementsAsSpecPars(), Model::readMeasurementsFromFile(), CocoaDaqReaderText::ReadNextEvent(), and MeasurementCOPS::setConversionFactor().

00079                             { 
00080     return theDim;
00081   }

void Measurement::DumpBadOrderOptOs (  ) 

Definition at line 445 of file Measurement.cc.

References begin, TestMuL1L2Filter_cff::cerr, ALIUtils::debug, lat::endl(), cmsRelvalreport::exit, and OptONameList().

Referenced by MeasurementTiltmeter::calculateSimulatedValue(), MeasurementSensor2D::calculateSimulatedValue(), MeasurementDistancemeter3dim::calculateSimulatedValue(), MeasurementCOPS::calculateSimulatedValue(), MeasurementDistancemeter::calculateSimulatedValue(), and MeasurementDiffEntry::calculateSimulatedValue().

00446 {
00447   std::cerr << " Detector can not make measurement with these optical objects " << std::endl;
00448   if (ALIUtils::debug >= 1) {
00449     //  std::vector<OpticalObject*>::iterator voite;
00450     //      for ( voite = _OptOList.begin(); 
00451     //     voite != _OptOList.end(); voite++) {
00452     //    std::cout << (*voite)->type() << " : " << (*voite)->name() << std::endl;
00453     // }
00454     std::vector<ALIstring>::const_iterator vsite;
00455     for ( vsite = OptONameList().begin(); 
00456           vsite != OptONameList().end(); vsite++) {
00457       std::cerr << (*vsite) << " : " ;
00458     }
00459     std::cerr << std::endl;
00460   }
00461   exit(2);
00462 
00463 }

void Measurement::fillData ( ALIuint  coor,
const std::vector< ALIstring > &  wl 
)

Definition at line 195 of file Measurement.cc.

References TestMuL1L2Filter_cff::cerr, edmNew::copy(), GenMuonPlsPt100GeV_cfg::cout, ALIUtils::debug, lat::endl(), cmsRelvalreport::exit, ParameterMgr::getInstance(), ParameterMgr::getParameterValue(), ALIUtils::IsNumber(), sigmaDimensionFactor(), theDim, theSigma, theValue, theValueIsSimulated, theValueType, and valueDimensionFactor().

Referenced by construct(), constructFromOA(), Model::readMeasurementsFromFile(), and CocoaDaqReaderText::ReadNextEvent().

00196 {
00197   if ( ALIUtils::debug >= 3 ) {
00198     std::cout << "@@ Reading coordinate " << coor << std::endl ;
00199     //-   ostream_iterator<ALIstring> outs(std::cout," ");
00200     //-  copy(wordlist.begin(), wordlist.end(), outs);
00201   }
00202   
00203   ParameterMgr* parmgr = ParameterMgr::getInstance();
00204 
00205   //---------- Check that there are 3 attributes: name, value, error
00206   if( wordlist.size() != 3 ) {
00207     //    ALIFileIn::getInstance( Model::SDFName() ).ErrorInLine();
00208     std::cerr << " Incorrect format for Measurement value:" << std::endl; 
00209     std::ostream_iterator<ALIstring> outs(std::cout," ");
00210     copy(wordlist.begin(), wordlist.end(), outs);
00211     std::cout << std::endl << "There should be three words: name value sigma " << std::endl;
00212     exit(2);
00213   }
00214 
00215   //---------- check coor value
00216   if (coor >= theDim ) {
00217     // ALIFileIn::getInstance( Model::SDFName() ).ErrorInLine();
00218     std::cerr << "Trying to fill Measurement coordinate No "
00219          << coor << " but the dimension is " << theDim << std::endl; 
00220     exit(2);
00221   }
00222 
00223   //---------- set data members 
00224   //----- Set valueType
00225   theValueType[coor] = wordlist[0];
00226 
00227   //----- Set value (translate it if a PARAMETER is used)
00228   ALIdouble val = 0.;
00229   theValueIsSimulated[coor] = 0;
00230   if( !ALIUtils::IsNumber(wordlist[1]) ) {
00231     if ( parmgr->getParameterValue( wordlist[1], val ) == 0 ) {
00232       if( wordlist[1] == ALIstring("simulated_value") ) {
00233         theValueIsSimulated[coor] = 1;
00234       } else {
00235         //      ALIFileIn::getInstance( Model::SDFName() ).ErrorInLine();
00236         std::cerr << "!!! parameter for value not found: " << wordlist[1].c_str() << std::endl;
00237         exit(2);
00238       }
00239     }
00240     //d val *= valueDimensionFactor();
00241   } else {
00242     //d val = DimensionMgr()::getInstance()->extractValue( wordlist[1], ValueDimensionFactor() );
00243     val = atof( wordlist[1].c_str() ); 
00244   }
00245   val *= valueDimensionFactor();
00246   if( ALIUtils::debug >= 3 ) std::cout << "Meas VALUE= " << val << " (ValueDimensionFactor= " << valueDimensionFactor() <<std::endl;
00247 
00248   //----- Set sigma (translate it if a PARAMETER is used)
00249   ALIdouble sig = 0.;
00250   if( !ALIUtils::IsNumber(wordlist[2]) ) {
00251     if ( parmgr->getParameterValue( wordlist[2], sig ) == 0 ) {
00252       // ALIFileIn::getInstance( Model::SDFName() ).ErrorInLine();
00253       std::cerr << "!!! parameter for sigma not found: " << wordlist[2].c_str() << std::endl;
00254       exit(2);
00255     }
00256     //d sig *= sigmaDimensionFactor();
00257   } else {
00258     //    sig = DimensionMgr()::getInstance()->extractValue( wordlist[2], ValueDimensionFactor() );
00259     sig = atof( wordlist[2].c_str() );  
00260   }
00261   sig *= sigmaDimensionFactor();
00262   if( ALIUtils::debug >= 3) std::cout << "SIGMA= " << sig << " (SigmaDimensionFactor= " << sigmaDimensionFactor() <<std::endl;
00263   
00264   //----- set theValue & theSigma
00265   theValue[coor] = val;
00266   theSigma[coor] = sig;
00267 
00268 }

static ALIstring Measurement::getCurrentDate (  )  [inline, static]

Definition at line 149 of file Measurement.h.

References theCurrentDate.

Referenced by FittedEntriesSet::FittedEntriesSet().

00149                                    {
00150     return theCurrentDate;
00151   }

static ALIstring Measurement::getCurrentTime (  )  [inline, static]

Definition at line 152 of file Measurement.h.

References theCurrentTime.

Referenced by FittedEntriesSet::FittedEntriesSet().

00152                                    {
00153     return theCurrentTime;
00154   }

const Hep3Vector& Measurement::getLightRayDirection (  )  const [inline]

Definition at line 159 of file Measurement.h.

References theLightRayDirection.

00159                                                  { 
00160     return theLightRayDirection; 
00161   }

const Hep3Vector& Measurement::getLightRayPosition (  )  const [inline]

Definition at line 156 of file Measurement.h.

References theLightRayPosition.

00156                                                 {
00157     return theLightRayPosition; 
00158   }

ALIstring Measurement::getMeasuringBehaviour ( const std::vector< OpticalObject * >::const_iterator  vocite  ) 

Definition at line 550 of file Measurement.cc.

References _OptOList, and _OptONameList.

Referenced by MeasurementTiltmeter::calculateSimulatedValue(), MeasurementSensor2D::calculateSimulatedValue(), MeasurementDistancemeter3dim::calculateSimulatedValue(), MeasurementCOPS::calculateSimulatedValue(), and MeasurementDistancemeter::calculateSimulatedValue().

00550                                                                                                     { 
00551   std::vector<ALIstring>::const_iterator vscite = _OptONameList.begin() +
00552     ( vocite - _OptOList.begin() ); // point to corresponding name of this OptO
00553   ALIint colon = (*vscite).find(':');
00554   ALIstring behav;
00555   if(colon != -1 ) {
00556     behav = (*vscite).substr(colon+1,(*vscite).size());
00557   } else {
00558     behav = " ";
00559   }
00560   return behav;
00561 }

const OpticalObject * Measurement::getPreviousOptO ( const OpticalObject Popto  )  const

Definition at line 567 of file Measurement.cc.

References _OptOList, TestMuL1L2Filter_cff::cerr, lat::endl(), cmsRelvalreport::exit, OpticalObject::name(), and name().

Referenced by OptODistancemeter::makeMeasurement(), and OptODistancemeter3dim::makeMeasurement().

00568 {
00569   //--------- Loop OptOs that take part in this measurement
00570   std::vector<OpticalObject*>::const_iterator vocite;
00571   for( vocite = _OptOList.begin(); vocite != _OptOList.end(); vocite++ ){
00572     if( *vocite == Popto ) {
00573       if( vocite == _OptOList.begin() ) {
00574         std::cerr << " ERROR in  getPreviousOptO of measurement " << name() << std::endl;
00575         std::cerr << " OptO " << Popto->name() << " is the first one " << std::endl;
00576         exit(1);
00577       } else {
00578         return *(vocite-1);
00579       }
00580     }
00581   }
00582   
00583   std::cerr << " ERROR in  getPreviousOptO of measurement " << name() << std::endl;
00584   std::cerr << " OptO " << Popto->name() << " not found " << std::endl;
00585   exit(1);
00586 }

static ALIstring& Measurement::measurementsFileName (  )  [inline, static]

Definition at line 210 of file Measurement.h.

References theMeasurementsFileName.

Referenced by Model::readMeasurementsFromFile().

00210                                           { 
00211    return theMeasurementsFileName;
00212  }

const ALIstring& Measurement::name (  )  const [inline]

Definition at line 87 of file Measurement.h.

References theName.

Referenced by MeasurementTiltmeter::calculateSimulatedValue(), MeasurementSensor2D::calculateSimulatedValue(), MeasurementDistancemeter3dim::calculateSimulatedValue(), MeasurementCOPS::calculateSimulatedValue(), MeasurementDistancemeter::calculateSimulatedValue(), MeasurementDiffEntry::calculateSimulatedValue(), construct(), constructFromOA(), copyMeas(), Model::copyMeasurements(), DerivativeRespectEntry(), getPreviousOptO(), CocoaToDDLMgr::measurementsAsSpecPars(), printStartCalculateSimulatedValue(), and OptOUserDefined::userDefinedBehaviour().

00087                                 {
00088     return theName;
00089   }

std::vector<OpticalObject*>& Measurement::OptOList (  )  [inline]

Definition at line 106 of file Measurement.h.

References _OptOList.

Referenced by MeasurementTiltmeter::calculateSimulatedValue(), MeasurementSensor2D::calculateSimulatedValue(), MeasurementDistancemeter3dim::calculateSimulatedValue(), MeasurementCOPS::calculateSimulatedValue(), MeasurementDistancemeter::calculateSimulatedValue(), MeasurementDiffEntry::calculateSimulatedValue(), copyMeas(), and OptOCOPS::makeMeasurement().

00106                                         {
00107     return _OptOList;
00108   }

const std::vector<ALIstring>& Measurement::OptONameList (  )  const [inline]

Definition at line 102 of file Measurement.h.

References _OptONameList.

Referenced by DumpBadOrderOptOs(), and CocoaToDDLMgr::measurementsAsSpecPars().

00102                                                    {
00103     return _OptONameList;
00104   }

void Measurement::postConstruct (  ) 

Definition at line 149 of file Measurement.cc.

References Model::addMeasurementToList(), buildAffectingEntryList(), buildOptOList(), GenMuonPlsPt100GeV_cfg::cout, ALIUtils::debug, lat::endl(), Model::MeasurementList(), and setName().

Referenced by construct(), constructFromOA(), and copyMeas().

00150 {
00151   //---------- Set name as name of last OptO 
00152   setName();
00153 
00154   //---------- Transform for each Measurement the Measured OptO names to Measured OptO pointers
00155   buildOptOList();
00156 
00157   //---------- Build list of Entries that affect a Measurement 
00158   buildAffectingEntryList();
00159   
00160   //---------- add this measurement to the global list of measurements
00161   Model::addMeasurementToList( this );
00162 
00163   if ( ALIUtils::debug >= 10 ) {
00164     std::cout << Model::MeasurementList().size() << std::endl;
00165   }
00166 }

void Measurement::printStartCalculateSimulatedValue ( const Measurement meas  )  [protected]

Definition at line 402 of file Measurement.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), name(), and type().

Referenced by MeasurementTiltmeter::calculateSimulatedValue(), MeasurementSensor2D::calculateSimulatedValue(), MeasurementDistancemeter3dim::calculateSimulatedValue(), MeasurementCOPS::calculateSimulatedValue(), MeasurementDistancemeter::calculateSimulatedValue(), and MeasurementDiffEntry::calculateSimulatedValue().

00403 {
00404   std::cout << std::endl << "@@@@ Start calculation of simulated value of " << meas->type() << " Measurement " << meas->name() << std::endl;
00405 }

const ALIstring& Measurement::sensorName (  )  [inline]

Definition at line 91 of file Measurement.h.

References theName.

00091                                 {
00092     ALIstring sensName = theName;
00093     ALIint colon = theName.find(':');
00094     theName = theName.substr(colon+1, theName.length()-colon);
00095     return theName;
00096   }

virtual void Measurement::setConversionFactor ( const std::vector< ALIstring > &  wordlist  )  [inline, virtual]

Reimplemented in MeasurementCOPS, MeasurementDistancemeter, MeasurementDistancemeter3dim, MeasurementSensor2D, and MeasurementTiltmeter.

Definition at line 67 of file Measurement.h.

References TestMuL1L2Filter_cff::cerr, lat::endl(), and cmsRelvalreport::exit.

Referenced by Model::readSystemDescription().

00067                                                                           {
00068     std::cerr << " Measurement::setConversionFactor should never be called " << std::endl;
00069     exit(1); };

void Measurement::setCurrentDate ( const std::vector< ALIstring > &  wl  )  [static]

set the date of the current measurement

Definition at line 590 of file Measurement.cc.

References TestMuL1L2Filter_cff::cerr, ALIUtils::dumpVS(), lat::endl(), cmsRelvalreport::exit, theCurrentDate, and theCurrentTime.

Referenced by Model::readMeasurementsFromFile(), and CocoaDaqReaderText::ReadNextEvent().

00591 {
00592 
00593   if( wl.size() != 3 ){
00594     std::cerr << "!!!EXITING: reading DATE of measurements set: it must have three words, it is though " << std::endl;
00595     ALIUtils::dumpVS(wl, " ");
00596    exit(1);
00597   } else if(wl[0] != "DATE:" ){ 
00598     std::cerr << "!!!EXITING: reading DATE of measurements set: first word must be 'DATE:', it is though " << std::endl;
00599     ALIUtils::dumpVS( wl, " ");
00600     exit(1);
00601   } else {
00602     theCurrentDate = wl[1];
00603     theCurrentTime = wl[2];
00604  }
00605 } 

void Measurement::SetDimension ( ALIuint  dim  )  [inline]

Definition at line 177 of file Measurement.h.

References theDim.

00177                                  {
00178     theDim = dim;
00179   }    

void Measurement::setLightRayDirection ( const Hep3Vector &  lightRayDirection  )  [inline]

Definition at line 221 of file Measurement.h.

References theLightRayDirection.

Referenced by OptOSensor2D::makeMeasurement().

00222    { theLightRayDirection = lightRayDirection; }

void Measurement::setLightRayPosition ( const Hep3Vector &  lightRayPosition  )  [inline]

Definition at line 219 of file Measurement.h.

References theLightRayPosition.

Referenced by OptOSensor2D::makeMeasurement().

00220    { theLightRayPosition = lightRayPosition; }

static void Measurement::setMeasurementsFileName ( const ALIstring filename  )  [inline, static]

Definition at line 213 of file Measurement.h.

References theMeasurementsFileName.

00213                                                                   { 
00214    //-   std::cout << " setting file name " << filename << std::endl;
00215    theMeasurementsFileName = filename;
00216    //-   std::cout << " dsetting file name " << filename << std::endl;
00217  }

void Measurement::setName (  ) 

Definition at line 656 of file Measurement.cc.

References _OptONameList, TestMuL1L2Filter_cff::cerr, lat::endl(), cmsRelvalreport::exit, theName, and type().

Referenced by postConstruct().

00657 {
00658   // name already set by passing one argument with sensor type
00659   if( theName != "" ) return;
00660   if( _OptONameList.size() == 0) {
00661     std::cerr << " !!! Error in your code, you cannot ask for the name of the Measurement before the OptONameList is build " << std::endl;
00662     exit(9);
00663   }
00664   std::vector<ALIstring>::iterator vsite = (_OptONameList.end()-1);
00665   theName = type() + ":" + (*vsite);
00666 }

void Measurement::setSigma ( ALIint  coor,
ALIdouble  val 
) [inline]

Definition at line 168 of file Measurement.h.

References theSigma.

Referenced by MeasurementDistancemeter::correctValueAndSigma(), MeasurementDistancemeter3dim::correctValueAndSigma(), MeasurementTiltmeter::correctValueAndSigma(), Model::readMeasurementsFromFile(), and CocoaDaqReaderText::ReadNextEvent().

00168                                              {
00169     theSigma[coor] = val;
00170     //-    std::cout << coor << " setting sigma " << theSigma[coor] << std::endl;
00171   }

void Measurement::setType ( ALIstring  type  )  [inline]

Definition at line 173 of file Measurement.h.

References theType.

00173                                  {
00174     theType = type;
00175   }

void Measurement::setValue ( ALIint  coor,
ALIdouble  val 
) [inline]

Definition at line 164 of file Measurement.h.

References theValue.

Referenced by calculateOriginalSimulatedValue(), MeasurementCOPS::correctValueAndSigma(), MeasurementDistancemeter::correctValueAndSigma(), MeasurementDistancemeter3dim::correctValueAndSigma(), MeasurementSensor2D::correctValueAndSigma(), and MeasurementTiltmeter::correctValueAndSigma().

00164                                              {
00165     theValue[coor] = val;
00166   }

void Measurement::setValueSimulated ( ALIint  coor,
ALIdouble  value 
) [inline]

Definition at line 193 of file Measurement.h.

References theValueSimulated.

Referenced by MeasurementDiffEntry::calculateSimulatedValue(), OptODistancemeter::makeMeasurement(), OptODistancemeter3dim::makeMeasurement(), OptOTiltmeter::makeMeasurement(), OptOSensor2D::makeMeasurement(), and OptOCOPS::makeMeasurement().

00193                                                         {
00194       theValueSimulated[coor] = value;
00195   }

void Measurement::setValueSimulated_orig ( ALIint  coor,
ALIdouble  value 
) [inline]

Definition at line 189 of file Measurement.h.

References theValueSimulated_orig.

Referenced by calculateOriginalSimulatedValue().

00189                                                              {
00190       theValueSimulated_orig[coor] = value;
00191   }

virtual void Measurement::setXlaserLine ( uint  ii,
int  val 
) [inline, virtual]

Reimplemented in MeasurementCOPS.

Definition at line 206 of file Measurement.h.

Referenced by OptOCOPS::makeMeasurement().

00206 { };

const ALIdouble Measurement::sigma ( uint  ii  )  const [inline]

Definition at line 133 of file Measurement.h.

References theSigma.

00133                                         {
00134     return theSigma[ii];
00135   } 

const ALIdouble* Measurement::sigma (  )  const [inline]

Definition at line 129 of file Measurement.h.

References theSigma.

Referenced by copyMeas(), MeasurementDistancemeter::correctValueAndSigma(), MeasurementDistancemeter3dim::correctValueAndSigma(), MeasurementTiltmeter::correctValueAndSigma(), CocoaToDDLMgr::measurementsAsSpecPars(), Model::readMeasurementsFromFile(), and CocoaDaqReaderText::ReadNextEvent().

00129                                  {
00130     return theSigma;
00131   } 

virtual const ALIdouble Measurement::sigmaDimensionFactor (  )  const [inline, virtual]

Definition at line 145 of file Measurement.h.

References ALIUtils::LengthSigmaDimensionFactor().

Referenced by constructFromOA(), fillData(), and MeasurementTiltmeter::setConversionFactor().

00145                                                       {
00146     return ALIUtils::LengthSigmaDimensionFactor();
00147   }

void Measurement::Substitute2p ( ALIstring ref,
const ALIstring firstref,
int  NtwoPoints 
) [protected]

Definition at line 381 of file Measurement.cc.

References GenMuonPlsPt100GeV_cfg::cout, ALIUtils::debug, and lat::endl().

Referenced by buildOptOList().

00382 {
00383   // '/' sets hierarchy of OptOs
00384   ALIstring slash("/");
00385   
00386   int pos1st = firstref.length();
00387   // Go back an '/' in firstref for each '..' in ref
00388   for (int ii=0; ii < Ntwopoints; ii++) {
00389       pos1st = firstref.find_last_of( slash, pos1st-1);
00390       if ( ALIUtils::debug >=9 ) std::cout << "pos1st=" << pos1st;
00391   }
00392 
00393   if ( ALIUtils::debug >=9 ) std::cout << "before change ref: " << ref << " 1ref " << firstref << std::endl;
00394   // Substitute name
00395   ref.replace( 0, (Ntwopoints*3)-1, firstref, 0, pos1st);
00396   if ( ALIUtils::debug >=9 ) std::cout << "after change ref: " << ref << " 1ref " << firstref << std::endl;
00397 
00398 }

const ALIstring& Measurement::type (  )  const [inline]

Definition at line 83 of file Measurement.h.

References theType.

Referenced by MeasurementDistancemeter3dim::calculateSimulatedValue(), MeasurementCOPS::calculateSimulatedValue(), MeasurementDistancemeter::calculateSimulatedValue(), construct(), constructFromOA(), copyMeas(), Model::copyMeasurements(), CocoaToDDLMgr::measurementsAsSpecPars(), printStartCalculateSimulatedValue(), and setName().

00083                                 {
00084     return theType;
00085   }

const ALIdouble Measurement::value ( uint  ii  )  const [inline]

Definition at line 125 of file Measurement.h.

References theValue.

00125                                          {
00126     return theValue[ii];
00127   } 

const ALIdouble* Measurement::value (  )  const [inline]

Definition at line 122 of file Measurement.h.

References theValue.

Referenced by MeasurementDiffEntry::calculateSimulatedValue(), copyMeas(), MeasurementCOPS::correctValueAndSigma(), MeasurementDistancemeter::correctValueAndSigma(), MeasurementDistancemeter3dim::correctValueAndSigma(), MeasurementSensor2D::correctValueAndSigma(), MeasurementTiltmeter::correctValueAndSigma(), OptOSensor2D::fastTraversesLightRay(), OptODistancemeter::makeMeasurement(), OptODistancemeter3dim::makeMeasurement(), OptOTiltmeter::makeMeasurement(), OptOSensor2D::makeMeasurement(), OptOCOPS::makeMeasurement(), and CocoaToDDLMgr::measurementsAsSpecPars().

00122                                  {
00123     return theValue;
00124   } 

virtual const ALIdouble Measurement::valueDimensionFactor (  )  const [inline, virtual]

Definition at line 141 of file Measurement.h.

References ALIUtils::LengthValueDimensionFactor().

Referenced by constructFromOA(), fillData(), MeasurementCOPS::setConversionFactor(), MeasurementSensor2D::setConversionFactor(), and MeasurementTiltmeter::setConversionFactor().

00141                                                       {
00142     return ALIUtils::LengthValueDimensionFactor();
00143   }

bool Measurement::valueIsSimulated ( ALIint  coor  )  [inline]

Definition at line 202 of file Measurement.h.

References theValueIsSimulated.

Referenced by calculateOriginalSimulatedValue(), construct(), copyMeas(), and CocoaToDDLMgr::measurementsAsSpecPars().

00202                                      {
00203       return theValueIsSimulated[coor];
00204   }

const ALIdouble Measurement::valueSimulated ( ALIuint  ii  )  const [inline]

Definition at line 114 of file Measurement.h.

References theValueSimulated.

Referenced by calculateOriginalSimulatedValue(), MeasurementDiffEntry::calculateSimulatedValue(), copyMeas(), OptODistancemeter::makeMeasurement(), OptODistancemeter3dim::makeMeasurement(), OptOTiltmeter::makeMeasurement(), OptOSensor2D::makeMeasurement(), and OptOCOPS::makeMeasurement().

00114                                                       {
00115     return theValueSimulated[ii];
00116   }

const ALIdouble Measurement::valueSimulated_orig ( ALIuint  ii  )  const [inline]

Definition at line 118 of file Measurement.h.

References theValueSimulated_orig.

Referenced by copyMeas().

00118                                                           {
00119     return theValueSimulated_orig[ii];
00120   }

const ALIstring Measurement::valueType ( uint  ii  )  const [inline]

Definition at line 137 of file Measurement.h.

References theValueType.

Referenced by OptOSensor2D::makeMeasurement(), CocoaToDDLMgr::measurementsAsSpecPars(), Model::readMeasurementsFromFile(), and CocoaDaqReaderText::ReadNextEvent().

00137                                             {
00138     return theValueType[ii];
00139   } 

virtual int Measurement::xlaserLine ( uint  ii  )  [inline, virtual]

Reimplemented in MeasurementCOPS.

Definition at line 196 of file Measurement.h.

References TestMuL1L2Filter_cff::cerr, and lat::endl().

Referenced by OptOCOPS::makeMeasurement().

00196 { std::cerr << "!!!! Measurement::xlaserLine is not returning anything " << std::endl; abort(); };


Member Data Documentation

std::vector<OpticalObject*> Measurement::_OptOList [private]

Definition at line 253 of file Measurement.h.

Referenced by AddOptOListItem(), buildAffectingEntryList(), buildOptOList(), getMeasuringBehaviour(), getPreviousOptO(), and OptOList().

std::vector<ALIstring> Measurement::_OptONameList [private]

Definition at line 251 of file Measurement.h.

Referenced by AddOptONameListItem(), buildOptOList(), buildOptONamesList(), getMeasuringBehaviour(), OptONameList(), and setName().

ALIdouble Measurement::cameraScaleFactor = 1. [static]

Definition at line 206 of file Measurement.h.

Referenced by Fit::FillMatricesWithMeasurements().

ALIbool Measurement::only1 = 0 [static]

Definition at line 264 of file Measurement.h.

Referenced by Fit::fitNextEvent(), Model::readMeasurementsFromFile(), and Model::readSystemDescription().

ALIstring Measurement::only1Date = "" [static]

Definition at line 265 of file Measurement.h.

Referenced by Model::readMeasurementsFromFile(), and Model::readSystemDescription().

ALIstring Measurement::only1Time = "" [static]

Definition at line 266 of file Measurement.h.

Referenced by Model::readMeasurementsFromFile(), and Model::readSystemDescription().

std::vector<Entry*> Measurement::theAffectingEntryList [private]

Definition at line 255 of file Measurement.h.

Referenced by addAffectingEntriesFromOptO(), and affectingEntryList().

ALIstring Measurement::theCurrentDate = "99/99/99" [static, private]

Definition at line 261 of file Measurement.h.

Referenced by getCurrentDate(), and setCurrentDate().

ALIstring Measurement::theCurrentTime = "99:99" [static, private]

Definition at line 262 of file Measurement.h.

Referenced by getCurrentTime(), and setCurrentDate().

ALIuint Measurement::theDim [private]

Definition at line 232 of file Measurement.h.

Referenced by copyMeas(), DerivativeRespectEntry(), dim(), fillData(), Measurement(), and SetDimension().

Hep3Vector Measurement::theLightRayDirection [private]

Definition at line 258 of file Measurement.h.

Referenced by getLightRayDirection(), and setLightRayDirection().

Hep3Vector Measurement::theLightRayPosition [private]

Definition at line 257 of file Measurement.h.

Referenced by getLightRayPosition(), and setLightRayPosition().

ALIstring Measurement::theMeasurementsFileName = "" [static, private]

Definition at line 259 of file Measurement.h.

Referenced by measurementsFileName(), and setMeasurementsFileName().

ALIstring Measurement::theName [private]

Definition at line 236 of file Measurement.h.

Referenced by copyMeas(), name(), sensorName(), and setName().

ALIdouble* Measurement::theSigma [private]

Definition at line 235 of file Measurement.h.

Referenced by copyMeas(), fillData(), Measurement(), setSigma(), sigma(), and ~Measurement().

ALIstring Measurement::theType [private]

Definition at line 233 of file Measurement.h.

Referenced by copyMeas(), setType(), and type().

ALIdouble* Measurement::theValue [private]

Definition at line 234 of file Measurement.h.

Referenced by copyMeas(), fillData(), Measurement(), setValue(), value(), and ~Measurement().

ALIbool* Measurement::theValueIsSimulated [private]

Definition at line 248 of file Measurement.h.

Referenced by copyMeas(), fillData(), Measurement(), and valueIsSimulated().

ALIdouble* Measurement::theValueSimulated [private]

Definition at line 240 of file Measurement.h.

Referenced by copyMeas(), DerivativeRespectEntry(), Measurement(), setValueSimulated(), and valueSimulated().

ALIdouble* Measurement::theValueSimulated_orig [private]

Definition at line 242 of file Measurement.h.

Referenced by copyMeas(), DerivativeRespectEntry(), Measurement(), setValueSimulated_orig(), and valueSimulated_orig().

ALIstring* Measurement::theValueType [private]

Definition at line 237 of file Measurement.h.

Referenced by fillData(), Measurement(), and valueType().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:28:10 2009 for CMSSW by  doxygen 1.5.4